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
Register bindings in the container.
public function boot() { View::composer(['widgets.category', 'partials.navbar', 'partials.sidenav'], CategoriesComposer::class); View::composer('widgets.tag', TagsComposer::class); View::composer('widgets.hot', HotPostsComposer::class); View::composer('partials.comment', CommentComposer::class); View::composer('partials.google_analytics', GoogleAnalyticsComposer::class); View::composer(['partials.footer', 'admin.partials.footer'], FooterComposer::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n foreach ($this->bindings as $abstract => $concrete) {\n $this->app->bind($abstract, $concrete);\n }\n }", "public function register()\n {\n foreach ($this->simpleBindings as $contract => $service) {\n $this->app->bind($contract, $service);\n }\n }", "private function registerBindings()\n {\n foreach($this->bindings as $key => $val)\n {\n $this->app->bind($key, $val);\n }\n }", "public function register()\n {\n foreach ($this->getBindings() as $interface => $class) {\n $this->app->bind($interface, $class);\n }\n }", "public function register()\n {\n $this->registerBindings($this->app);\n }", "public function register()\n {\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerBindings();\n }", "private function registerBinding()\n {\n /**\n * bind Tax Repository to its Eloquent implementation\n */\n $this->app->bind(\n \\Innovate\\Repositories\\Tax\\TaxContract::class,\n \\Innovate\\Repositories\\Tax\\EloquentTaxRepository::class\n );\n /**\n * bind BankTransferInfoContract to its elquent implementation EloquentBankTransferInfoRepository\n */\n $this->app->bind(\n \\Innovate\\Repositories\\StaticPages\\BankTransferInfo\\BankTransferInfoContract::class,\n \\Innovate\\Repositories\\StaticPages\\BankTransferInfo\\EloquentBankTransferInfoRepository::class\n );\n\n /**\n *\n */\n $this->app->bind(\n \\Innovate\\Repositories\\StaticPages\\CheckOutAgreement\\CheckOutAgreementContract::class,\n \\Innovate\\Repositories\\StaticPages\\CheckOutAgreement\\EloquentCheckOutAgreementRepository::class\n );\n\n $this->eavAttributeBindings();\n $this->eavAttributeCategoryBindings();\n }", "protected function bindings()\n\t{\n\t\t$this->app->singleton('anodyne', function ($app) {\n\t\t\treturn new \\App\\Anodyne;\n\t\t});\n\n\t\t// Bind the avatar class into the container\n\t\t$this->app->bind('avatar', function ($app) {\n\t\t\treturn new \\App\\Avatar;\n\t\t});\n\n\t\t// Bind the flash notifier class into the container\n\t\t$this->app->bind('flash', function ($app) {\n\t\t\treturn new \\App\\FlashNotifier;\n\t\t});\n\t}", "public function registerBindings() {\n $this->app->bind(\n 'App\\Repositories\\Backend\\Slider\\SliderContract',\n 'App\\Repositories\\Backend\\Slider\\EloquentSliderRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Frontend\\Slider\\SliderContract',\n 'App\\Repositories\\Frontend\\Slider\\EloquentSliderRepository'\n );\n }", "public function register()\n {\n\n $this->registerBindings();\n\n }", "protected function registerBindings()\n {\n // bind the manager class.\n $this->app->bind(Contracts\\Token\\Manager::class, Manager::class);\n\n // bind the guard class.\n $this->app->bind(Contracts\\Auth\\Guard::class, Guard::class);\n }", "protected function registerBaseBindings()\n {\n static::setInstance($this);\n\n $this->instance('app', $this);\n\n $this->instance(Container::class, $this);\n }", "protected function registerBindings()\n {\n $this->app->bind(\n \\LaravelFlare\\Flare\\Contracts\\Permissions\\Permissionable::class,\n \\Flare::config('permissions')\n );\n }", "public function register()\n {\n\n $this->registerBinding();\n }", "protected function registerBaseBindings()\n {\n $this->container->bind(\n \\Lib\\Contracts\\Http\\Kernel::class,\n \\Lib\\Http\\Kernel::class\n );\n\n $this->container->bind(\n \\Lib\\Contracts\\Support\\Config::class,\n \\Lib\\Support\\Config::class\n );\n }", "protected function registerConfigBindings()\n {\n $this->singleton('config', function () {\n return new ConfigRepository;\n });\n }", "public function register(): void\n {\n $this->app->singleton(CertificateBuilder::class, function () {\n return new CertificateBuilder(\n app(CliContract::class),\n app(Filesystem::class),\n app(Mechanic::class),\n app(PorterLibrary::class)->sslPath()\n );\n });\n\n $this->app->bind(ConsoleWriter::class);\n\n $this->app->bind(CliContract::class, Cli::class);\n $this->app->bind(Cli::class, function () {\n return (new Cli())->setTimeout(config('porter.process_timeout'));\n });\n\n $this->app->bind(ImageSetRepositoryContract::class, function () {\n return new ImageSetRepository([\n resource_path('image_sets'),\n app(PorterLibrary::class)->dockerImagesPath(),\n ]);\n });\n\n $this->app->bind(Organiser::class, function () {\n return new Organiser(\n app(Porter::class)->getDockerImageSet(),\n app(CliContract::class),\n app(FileSystem::class)\n );\n });\n\n $this->app->singleton(Porter::class);\n\n $this->app->singleton(PorterLibrary::class, function (Application $app) {\n return new PorterLibrary($app->make(FilePublisher::class), $app->make(Mechanic::class), config('porter.library_path'));\n });\n\n $this->app->singleton(ServerBag::class);\n\n $this->app->bind(Mechanic::class, function () {\n return ChooseMechanic::forOS();\n });\n }", "public function register()\n {\n $contracts = config(\"api.contracts\");\n $bindings = config('api.bindings');\n foreach($contracts as $contract)\n {\n $this->app->bind($contract, function($app) use ($contract, $bindings)\n {\n $version = Request::segment(2);\n return $app[$bindings[$version][$contract]];\n });\n }\n }", "public function registerBindings() {\n $this->app->bind(\n 'App\\Repositories\\Backend\\Course\\CourseContract',\n 'App\\Repositories\\Backend\\Course\\EloquentCourseRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Frontend\\Course\\CourseContract',\n 'App\\Repositories\\Frontend\\Course\\EloquentCourseRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Backend\\CourseContent\\CourseContentContract',\n 'App\\Repositories\\Backend\\CourseContent\\EloquentCourseContentRepository'\n );\n }", "protected function registerBaseBindings()\n {\n $container = $this->getContainer();\n\n $container->share(Parser::class, Parser::class);\n }", "private function bindServices()\n {\n // $this->app->singleton('package-blueprint-service', function ($app) {\n // return new FooService();\n // });\n }", "public function register() {\n\n // Bind any implementations.\n\n }", "public function register()\n {\n $this->app->bind(SuperComponent::class, function () {\n $component = new SuperComponent('intelligence');\n $component->setProperty('WOW THIS IS PROPERTY');\n\n return $component;\n });\n\n $this->app->bind(SuperContract::class, function () {\n $component = new SuperComponent('intelligence');\n $component->setProperty('WOW THIS IS PROPERTY');\n\n return $component;\n });\n }", "public function register()\n {\n // Bind any implementations.\n }", "protected function registerDatabaseBindings()\n {\n $this->singleton('db', function () {\n $this->register(\\App\\Providers\\DatabaseServiceProvider::class);\n return $this->make('db');\n });\n }", "private function registerBaseBindings()\n {\n static::setInstance($this);\n\n $this->instance(self::class, $this);\n\n $this->singleton('config', \\config\\Repository::class);\n }", "private function bindContainer()\n {\n parent::setInstance($this);\n \n $this->instance('container', $this);\n $this->instance(BaseContainer::class, $this);\n }", "public function register(): void {\n\t\t// Bindings.\n\n\t\t$this->container->singleton( Breezy::class, Breezy::class );\n\t\t$this->container->singleton( Steps\\Loader::class, Steps\\Loader::class );\n\n\t\t// Initializations.\n\n\t\t$this->initialize_themes();\n\t\t$this->hooks();\n\t}", "protected function registerBindings(Collection $bindings)\n {\n $bindings->each(function ($concretion, $abstraction) {\n $this->app->bind($abstraction, $concretion);\n });\n }", "protected function registerComposerBindings()\n {\n $this->singleton('composer', function ($app) {\n return new Composer($app->make('files'), $this->basePath());\n });\n }", "public function register()\n {\n $this->app->bind(\n CommandBus::class,\n SimpleCommandBus::class\n );\n\n $this->app->bind(\n Container::class,\n LaravelContainer::class\n );\n\n $this->app->bind(\n ArticleRepository::class,\n ArticleEloquentRepository::class\n );\n }", "public function registerInterfaceBindings()\n {\n $this->app->bind('League\\OAuth2\\Server\\Storage\\ClientInterface', 'LucaDegasperi\\OAuth2Server\\Repositories\\FluentClient');\n $this->app->bind('League\\OAuth2\\Server\\Storage\\ScopeInterface', 'LucaDegasperi\\OAuth2Server\\Repositories\\FluentScope');\n $this->app->bind('League\\OAuth2\\Server\\Storage\\SessionInterface', 'LucaDegasperi\\OAuth2Server\\Repositories\\FluentSession');\n $this->app->bind('League\\OAuth2\\Server\\Storage\\AccessTokenInterface', 'LucaDegasperi\\OAuth2Server\\Repositories\\FluentAccessToken');\n $this->app->bind('League\\OAuth2\\Server\\Storage\\RefreshTokenInterface', 'LucaDegasperi\\OAuth2Server\\Repositories\\FluentRefreshToken');\n }", "public function register()\n {\n foreach ($this->entities as $entity) {\n $this->{'bind' . $entity . 'Repository'}();\n }\n }", "public function register()\n {\n $this->app->bind(\n Services\\UserService::class,\n Services\\Implementations\\UserServiceImplementation::class\n );\n $this->app->bind(\n Services\\FamilyCardService::class,\n Services\\Implementations\\FamilyCardServiceImplementation::class\n );\n }", "public function register()\n {\n $this->app->bind(UserRepository::class, UserRepositoryEloquent::class);\n $this->app->bind(PermissionRepository::class, PermissionRepositoryEloquent::class);\n $this->app->bind(RoleRepository::class, RoleRepositoryEloquent::class);\n //:end-bindings:\n }", "public function register()\n {\n $this->app->bind(Notification::class, NotificationModule::class);\n $this->app->bind(File::class, FileModule::class);\n $this->app->bind(Encryption::class, EncryptionModule::class);\n }", "public function register()\n {\n $this->app->bind(VacancyRepository::class, VacancyRepositoryEloquent::class);\n $this->app->bind(CandidateRepository::class, CandidateRepositoryEloquent::class);\n //:end-bindings:\n }", "public function register()\n {\n $this->registerBindings(collect($this->bindings));\n $this->registerFactories(collect($this->factories));\n $this->registerProviders(collect($this->providers));\n $this->registerSeeders(collect($this->seeders));\n }", "public function register()\n {\n $this->app->bind(IStorage::class, MySqlStorage::class);\n }", "public function register()\n {\n $this->app->bind('Payment', Payment::class);\n $this->app->bind('GetData', GetData::class);\n }", "public function register(): void\n {\n $this->app->bind('invite_codes', InviteCodes::class);\n }", "public function register()\n {\n $this->app->bind(\n IMEIValidatorInterface::class,\n IMEIValidator::class\n );\n\n $this->app->bind(\n GeoInterface::class,\n GoogleGeo::class\n );\n }", "public function register()\n {\n $this->registerBindings();\n $this->registerEventListeners();\n }", "public function register()\n {\n // Bind Credential Contract with Service\n $this->app->bind(Credentials::class, function ($app){\n return new CredentialsManger($app->make('filesystem.disk'), $app->make('encrypter'));\n });\n\n // Bind Caption Contract with Service\n $this->app->bind(Configuration::class, function ($app){\n return new ConfigurationManager($app->make('filesystem.disk'));\n });\n\n // Inject dependencies into Auth Service.\n $this->app->singleton(Post::class, function ($app){\n return new PostService(new Instagram(true, true), $app->make(Credentials::class));\n });\n\n // Inject Guzzle Into Reddit Service\n $this->app->singleton(Scraper::class, function ($app){\n return new ScraperService(new Client(['base_uri' => 'http://www.reddit.com']), $app->make(Configuration::class), $app->make('filesystem.disk'));\n });\n\n $this->app->bind(Caption::class, function ($app){\n return new CaptionManager($app->make('filesystem.disk'), $app->make('encrypter'));\n });\n }", "public function register() {\n\t\t$this->app->bind('holder', 'T20n\\Holder\\Holder');\n\t}", "public function register()\n {\n $this->app->bind('ManipulatorService', function() {\n return new \\SB\\Services\\ManipulatorService();\n });\n\n $this->app->bind('manipulator', function() {\n return new \\SB\\Services\\ManipulatorService();\n });\n }", "public function register(): void\n {\n $this->app->bind(HttpRequest::class, function () {\n return Config::get('request-insurance.httpRequestClass');\n });\n\n $this->app->bind(IdentityProvider::class, function () {\n return new CegoIdentityProvider();\n });\n }", "public function register()\n {\n //Bind all interfaces with repositories\n $this->app->bind(UserRepository::class, UserRepositoryImpl::class);\n $this->app->bind(ProductRepository::class, ProductRepositoryImpl::class);\n }", "public function register()\n {\n $this->app->bind(NonceGenerator::class, ConcreteCSP::class);\n $this->app->bind(Builder::class, ConcreteCSP::class);\n $this->app->alias(Builder::class, 'csp');\n }", "public function register()\n {\n $this->app->bind(ExpoRepository::class, get_class($this->getInterestsDriver()));\n }", "public function register(): void\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/framekit.php', 'framekit');\n\n $this->app->bind(\n CommandBus::class,\n function($app) {\n return $app->make(\\Mrluke\\Bus\\Contracts\\CommandBus::class);\n }\n );\n\n $this->app->singleton(\n Config::class,\n function($app) {\n\n $schema = Schema::createFromFile(\n __DIR__ . '/../../config/schema.json',\n true\n );\n\n return new Host(\n $app['config']->get('framekit'),\n $schema\n );\n }\n );\n\n $this->app->singleton(\n \\Framekit\\Contracts\\EventBus::class,\n function($app) {\n return $app->make('framekit.event.bus');\n }\n );\n\n $this->app->singleton(\n Mapper::class,\n function($app) {\n return $app->make('framekit.event.mapper');\n }\n );\n\n $this->app->bind(\n \\Framekit\\Contracts\\Projector::class,\n function($app) {\n return $app->make('framekit.projector');\n }\n );\n\n $this->app->bind(\n Store::class,\n function($app) {\n return $app->make('framekit.event.store');\n }\n );\n\n $this->app->bind(\n EventRepository::class,\n function($app) {\n return $app->make('framekit.event.repository');\n }\n );\n\n $this->app->bind(\n \\Framekit\\Contracts\\Retrospector::class,\n function($app) {\n return $app->make('framekit.event.retrospector');\n }\n );\n\n $this->app->singleton(\n 'framekit.projector',\n function($app) {\n /* @var \\Mrluke\\Configuration\\Contracts\\ArrayHost $config */\n $config = $app->make(Config::class);\n $className = $config->get('drivers.projector');\n\n return new $className(\n $app->make(Config::class),\n $app->make(ProcessRepository::class),\n $app->make(Container::class),\n $app->make(Logger::class),\n function($connection = null) use ($app) {\n return $app->make(Factory::class)->connection($connection);\n }\n );\n }\n );\n\n $this->app->singleton(\n 'framekit.event.bus',\n function($app) {\n /* @var \\Mrluke\\Configuration\\Contracts\\ArrayHost $config */\n $config = $app->make(Config::class);\n $className = $config->get('drivers.event_bus');\n\n return new $className(\n $app->make(Config::class),\n $app->make(ProcessRepository::class),\n $app->make(Container::class),\n $app->make(Logger::class),\n function($connection = null) use ($app) {\n return $app->make(Factory::class)->connection($connection);\n }\n );\n }\n );\n\n $this->app->singleton(\n 'framekit.event.mapper',\n function($app) {\n return new EventMapper($app);\n }\n );\n\n $this->app->singleton(\n 'framekit.event.store',\n function($app) {\n /* @var \\Mrluke\\Configuration\\Contracts\\ArrayHost $config */\n $config = $app->make(Config::class);\n $className = $config->get('drivers.event_store');\n\n return new $className(\n $app->make(Config::class),\n new EventSerializer,\n $app->make(Mapper::class)\n );\n }\n );\n\n $this->app->singleton(\n 'framekit.event.repository',\n function($app) {\n\n return new EventStoreRepository(\n $app->make('framekit.event.bus'),\n $app->make('framekit.event.store'),\n $app->make('framekit.projector')\n );\n }\n );\n\n $this->app->singleton(\n 'framekit.event.retrospector',\n function($app) {\n\n return new Retrospector(\n $app->make('framekit.event.bus'),\n $app->make('framekit.event.store'),\n $app->make('framekit.projector')\n );\n }\n );\n }", "public function register()\n {\n // Register all repositories\n foreach ($this->repositories as $repository) {\n $this->app->bind(\"App\\Repository\\Contracts\\I{$repository}\",\n \"App\\Repository\\Repositories\\\\{$repository}\");\n }\n\n // Register all services\n foreach ($this->services as $service) {\n $this->app->bind(\"App\\Service\\Contracts\\I{$service}\", \n \"App\\Service\\Modules\\\\{$service}\");\n }\n }", "public function register()\n {\n $this->app->bind(ClientCredentialsClientInterface::class, function () {\n return $this->createClientCredentialsClient();\n });\n\n $this->app->bind(PasswordClientInterface::class, function () {\n return $this->createPasswordClient();\n });\n\n $this->app->bind(TokenRepositoryInterface::class, function () {\n return new SessionTokenRepository();\n });\n }", "protected function registerFacadeServiceContainerBindings()\n {\n $facades = base_path(config('make-facades.path'));\n $directories = glob($facades . '/*' , GLOB_ONLYDIR);\n\n foreach($directories as $directory)\n {\n $path = explode('/', $directory);\n $service = end($path);\n $namespace = config('make-facades.namespace');\n $serviceClass = \"{$namespace}\\\\{$service}\\\\{$service}\";\n $retrieveService = (new \\ReflectionClass($serviceClass));\n $this->bindings[$retrieveService->getShortName()] = $retrieveService->getName();\n }\n\n return $this;\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/config/line-bot.php',\n 'line-bot'\n );\n $this->app->bind('line-bot-http-client', function () {\n return new GuzzleHttpClient(\n config: config('line-bot.client.config'),\n );\n });\n foreach (self::$apiBindings as $facadeName => $classes) {\n $this->bindApis($facadeName, $classes['api'], $classes['config']);\n }\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__ . '/../config/' . $this->packageName . '.php', $this->packageName);\n\n $this->app->bind(AmqpListener::class, function () {\n $amqpProperties = config('amqp-consumer')['properties'];\n $messageHandlers = config('amqp-consumer')['message_handlers'];\n\n $routingKeys = array_unique(Arr::flatten($messageHandlers));\n\n $amqpProperties['routing'] = $routingKeys;\n\n return new AmqpListener(\n config('amqp-consumer')['queue'],\n $amqpProperties\n );\n });\n\n $this->app->bind(AmqpHandler::class, function () {\n return new AmqpHandler(\n config('amqp-consumer')['message_handlers']\n );\n });\n\n $this->commands([AmqpListener::class]);\n }", "public function register()\n {\n $this->app->bind(SoapService::class, PhpSoapService::class);\n\n $this->registerSaman();\n\n $this->app->singleton(NikPayFactory::class, function () {\n return new NikPayFactory();\n });\n }", "public function register()\n {\n $this->app->bind('date', Date::class);\n $this->app->bind('resizer', Resizer::class);\n }", "public function register()\n {\n foreach (static::$repositories as $repository) {\n $this->app->singleton(\n $repository[0],\n $repository[1]\n );\n }\n }", "public function register()\n {\n $this->app->bind(OrderBLLInterface::class, OrderBLL::class);\n $this->app->bind(OrderDALInterface::class, OrderDAL::class);\n }", "public function register(): void {\n $this->app->bind(ItemAffixService::class, function ($app) {\n return new ItemAffixService();\n });\n\n $this->app->bind(AssignSkillService::class, function ($app) {\n return new AssignSkillService();\n });\n\n $this->app->bind(UpdateCharacterStatsService::class, function ($app) {\n return new UpdateCharacterStatsService();\n });\n\n $this->app->bind(UserService::class, function($app) {\n return new UserService();\n });\n\n $this->app->bind(ItemsService::class, function($app) {\n return new ItemsService();\n });\n\n $this->app->bind(QuestService::class, function() {\n return new QuestService();\n });\n\n $this->app->bind(InfoPageService::class, function() {\n return new InfoPageService();\n });\n\n $this->app->bind(GuideQuestService::class, function() {\n return new GuideQuestService();\n });\n\n $this->app->bind(LocationService::class, function($app) {\n return new LocationService($app->make(CoordinatesCache::class));\n });\n\n $this->commands([CreateAdminAccount::class, GiveKingdomsToNpcs::class]);\n }", "protected function registerCustomBindings(): void\n {\n $entityServiceFactory = $this->app->make(IEntityServiceFactory::class);\n\n foreach (config('laravel_entity_services.bindings') as $className => $entityService) {\n $entityServiceFactory->register($className, $entityService);\n }\n }", "public function register(): void\n {\n $this->configurePaths();\n\n $this->mergeConfig();\n\n $this->registerBindings();\n }", "public function register() {\n $this->app->bind(\n App\\Manager\\MySQLConnection::class,\n App\\Contracts\\DBInterface::class\n );\n }", "public function register()\n {\n $this->app->bind(HttpClient::class, function ($app) {\n return new HttpClient();\n });\n\n $this->app->bind(SeasonService::class, function ($app) {\n return new SeasonService($app->make(HttpClient::class));\n });\n\n $this->app->bind(MatchListingController::class, function ($app) {\n return new MatchListingController($app->make(SeasonService::class));\n });\n\n }", "public function register()\n {\n $this->app->bind('blockchain', function () {\n return new Blockchain();\n });\n $this->app->bind('ethereum', function () {\n return new Ethereum();\n });\n }", "public function register()\n {\n $this->app->bind(RateSourceInterface::class, CoinbaseRateSource::class);\n }", "public function register()\n {\n $this->app->bind(Client::class, function () {\n return new Client(['cookies' => true]);\n });\n \n $this->app->bind(UGentCas::class, function ($app) {\n return new UGentCas($app->make(Client::class));\n });\n \n $this->app->bind(UGentCalendar::class, function ($app) {\n return new UGentCalendar(\n $app->make(Client::class),\n $app->make(UGentCas::class)\n );\n });\n }", "public function register()\n {\n // General binding. Resolved every time\n $this->app->bind('Phone', function($app) {\n return new Phone('Apple iPhone','Qualcomm 5555',2,'480x320','8 megapixels','1234 mAh');\n });\n\n// // Singleton binding. Resolved once\n// $this->app->singleton('Phone', function($app) {\n// return new Phone();\n// });\n//\n// //Instance binding\n// $phone = new Phone();\n// $this->app->instance('Phone', $phone);\n//\n//\n// // Automatic resolving\n// $this->app->bind('Phone', Phone::class); // or full path\n }", "public function register()\n {\n $this->app->bind(\\App\\Contracts\\Repositories\\InstancesRepository::class, \\App\\Repositories\\Eloquent\\InstancesRepositoryEloquent::class);\n $this->app->bind(\\App\\Contracts\\Repositories\\CompaniesRepository::class, \\App\\Repositories\\Eloquent\\CompaniesRepositoryEloquent::class);\n $this->app->bind(\\App\\Contracts\\Repositories\\RepositoriesRepository::class, \\App\\Repositories\\Eloquent\\RepositoriesRepositoryEloquent::class);\n $this->app->bind(\\App\\Contracts\\Repositories\\DocumentRepository::class, \\App\\Repositories\\Eloquent\\DocumentRepositoryEloquent::class);\n //:end-bindings:\n }", "public function register()\n {\n $this->app->bind(AttributeServiceInterface::class,AttributeService::class);\n $this->app->bind(ProductServiceIntarface::class,ProductService::class);\n\n\n }", "public function register()\n {\n $this->app->bind(\n 'SurveysLibrary',\n function () {\n return new SurveyEngine();\n }\n );\n }", "public function register()\n {\n $this->app->bind(\n 'auditor',\n Auditor::class\n );\n }", "public function register()\n {\n $this->app->bind('App\\Repositories\\CollectionRepository', 'App\\Repositories\\CollectionRepositoryJSONImpl');\n }", "public function register()\n {\n /**\n * Bind singleton\n */\n $this->app->singleton('Jhesyong\\Attribute\\Registrar');\n $this->app->singleton('Jhesyong\\Attribute\\Delegate');\n $this->app->singleton('attr', 'Jhesyong\\Attribute\\Delegate');\n }", "public function register()\n {\n $this->app->bind(EventRepositoryInterface::class, EventRepository::class);\n }", "public function add(Bind $bind): void\n {\n $dependency = $bind->getBound();\n $dependency->register($this->container, $bind);\n }", "public function register()\n {\n $this->app->bind(CurrencyRepositoryInterface::class, CurrencyRepository::class);\n }", "public function register()\n {\n // register routes\n $this->registerConfigurations();\n\n // https://github.com/laravolt/indonesia\n $this->app->bind('linebot', function() {\n return new LineBotManager(\"ko\");\n });\n \n // $this->app->bind('linebot', function($app){\n \n // $config = $this->app['config']->get('services.linebot', []);\n // // dd($config);\n // $client = new Client(Arr::get($config, 'guzzle', []));\n \n // return new LineBotManager(\"Kiw\");\n // });\n }", "public function register()\n {\n\n $this->app->bind(\n \\App\\Repositories\\UserRepository::class, // we are dealing with repositories\n \\App\\Repositories\\DbUserRepository::class// multi ways to feaching and storing users\n );\n\n //or\n // $this->app->bind('foo')\n\n /*\n app()->singleton('foo')\n $this->app->singleton('foo')\n */\n\n }", "public function register()\n {\n foreach ($this->singletonClassMap as $abstract => $concrete)\n {\n $this->app->singleton($abstract, function() use ($concrete)\n {\n return $this->app->make($concrete);\n });\n }\n }", "public function register()\n\t{\n\t\tapp()->bind(UtilityServiceInterface::class, UtilityService::class);\n\t}", "public function register()\n {\n $this->app->bind(ItemService::class, function () {\n return new ItemService();\n });\n }", "public function register()\r\n {\r\n $this->app->bind(\r\n ViberServiceInterface::class,\r\n ViberService::class\r\n );\r\n\r\n $this->app->bind(\r\n ApplicantServiceInterface::class,\r\n ApplicantService::class\r\n );\r\n }", "public function register()\n {\n $this->app->bind(OrderConfirmationNumberGenerator::class, RandomOrderConfirmationNumberGenerator::class);\n $this->app->bind(TicketCodeGenerator::class, RandomTicketCodeGenerator::class);\n }", "public function register()\n {\n $this->app->bind(CardService::class, function(){\n return new CardService(cache()->store());\n });\n }", "public function register()\n {\n $this->app->bind(FrontendRepositoryInterface::class,function(){\n return new FrontendRepository;\n });\n\n $this->app->bind(BackendRepositoryInterface::class,function(){\n return new BackendRepository;\n });\n }", "public function register()\n {\n $this->app->bind(RepositoryInterface::class, EloquentRepository::class);\n $this->app->bind(ApartmentInterfaceRepository::class, ApartmentRepository::class);\n $this->app->bind(ApartmentImagefaceRepository::class, ApartmentImageRepository::class);\n }", "public function register()\n {\n $this->app->bind(NotesSearcherInterface::class, NotesSearcherByTitle::class);\n $this->app->bind(FileServiceInterface::class, FileService::class);\n $this->app->bind(LinkSharedInterface::class, LinkShareService::class);\n $this->app->bind(NotesSearcherInterface::class, NotesSearcherByTitle::class);\n $this->app->bind(NoteRepositoryInterface::class, NotesRepository::class);\n $this->app->bind(UploadRepositoryInterface::class,UploadRepository::class);\n }", "public function register()\n {\n $this->app->bind(HttpClient::class, GuzzleHttpClient::class);\n }", "public function register()\n {\n $models = [\n 'User',\n 'Story',\n 'Chapter',\n 'Category',\n ];\n foreach ($models as $model) {\n $this->app->bind(\n \"App\\\\Repositories\\\\Contracts\\\\{$model}RepositoryInterface\",\n \"App\\\\Repositories\\\\Eloquents\\\\{$model}Repository\"\n );\n }\n }", "public function register()\n {\n $this->app->bind('Setting', Setting::class);\n $this->app->bind(SettingStorageContract::class, EloquentStorage::class);\n }", "public function register()\n {\n $this->app->bind(TwitterClientInterface::class, TwitterClient::class);\n $this->app->bind(CacheServiceInterface::class, CacheService::class);\n $this->app->bind(TweetRepositoryInterface::class, TweetRepository::class);\n }", "public function register()\n {\n $this->app->bind(ImageStorage::class, function () {\n if($_REQUEST['type'] == 'S3'){\n\n return new ImageS3Storage;\n }\n if($_REQUEST['type'] == 'Local'){\n\n return new ImageLocalStorage;\n }\n });\n }", "public function register()\n {\n $this->container->share(Rocketeer::class)->withArgument($this->container);\n }", "protected function registerApplicationsBaseBindings(): void\n {\n static::setInstance($this);\n\n $this->instance('application', $this);\n $this->instance('container', $this);\n }", "public function register()\n {\n $this->app->bind(VehicleRepository::class, GuzzleVehicleRepository::class);\n }" ]
[ "0.82230145", "0.81314135", "0.8025142", "0.7994707", "0.7524165", "0.74514663", "0.74514663", "0.74514663", "0.74514663", "0.74514663", "0.7384354", "0.73624694", "0.7312191", "0.72548735", "0.725104", "0.72491163", "0.7179243", "0.7171105", "0.71576154", "0.71562195", "0.7134435", "0.71170855", "0.7112313", "0.70882463", "0.7047576", "0.704281", "0.7042574", "0.700957", "0.6994994", "0.69874597", "0.69274217", "0.692573", "0.6923885", "0.6901614", "0.68981594", "0.6895164", "0.68932384", "0.6892689", "0.6887473", "0.6881773", "0.6873635", "0.68735534", "0.6872098", "0.6870772", "0.68526536", "0.68523324", "0.6848338", "0.68372375", "0.6834965", "0.68331367", "0.6828259", "0.68205947", "0.6820432", "0.6795723", "0.678185", "0.6768916", "0.67683804", "0.6767729", "0.6761873", "0.675246", "0.6748215", "0.67376053", "0.673721", "0.67294866", "0.6721957", "0.6710259", "0.67084706", "0.66939586", "0.66764224", "0.666864", "0.6664416", "0.6656873", "0.66532177", "0.665307", "0.6647363", "0.66416436", "0.6640979", "0.6631019", "0.66293", "0.662453", "0.66234624", "0.66234076", "0.6623036", "0.66225713", "0.6622442", "0.66194236", "0.6616854", "0.66151136", "0.66129535", "0.66114515", "0.66109693", "0.66098034", "0.66081345", "0.660729", "0.6603041", "0.66015226", "0.66003567", "0.6599232", "0.6596971", "0.6588114", "0.6586448" ]
0.0
-1
Register the service provider.
public function register() { // In this case, I just simply register the CategoriesComposer to singleton to avoid duplicate // DB queries while rendering multiple views in the same time. Another ways like using cache, // shared data are might be better solutions. $this->app->singleton(CategoriesComposer::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }", "public function register()\n {\n\n $this->registerBinding();\n }", "public function register()\n\t{\n\t\t$this->registerCommands();\n\t\t$this->registerHybridAuth();\n\t}", "public function register()\n {\n $this->registerAuthenticator();\n }", "public function register()\n {\n $this->loadHelpers();\n \n $this->passportSetting();\n }", "public function register()\n {\n //Bind service in IoC container\n $this->app->singleton('tenancy', function(){\n return new TenantManager();\n });\n }", "public function register()\n {\n\n $this->app->register(HookProvider::class);\n $this->app->register(RouteProvider::class);\n// $this->app->register(InstallModuleProvider::class);\n }", "public function register()\n\t{\n\t\t\n\t\t$this->registerViewManager();\n\t\t$this->registerResponseHandler();\n\t\t$this->registerHttpMethods();\n\t}", "public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n //$this->registerMenuService();\n\n //$this->registerReplyService();\n }", "public function register()\n {\n // ...\n }", "public function register()\n {\n // ...\n }", "public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }", "public function register()\n {\n $this->registerServiceProvider();\n\n $this->addAssetNamespaceHint();\n $this->addStreamsNamespaceHint();\n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "public function register()\n {\n $this->registerContracts();\n }", "public function register()\n\t{\n $this->registerApi();\n\t}", "public function register()\n {\n \n $this->registerLoader();\n $this->registerTranslator();\n }", "public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register() {\n //\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }", "public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }", "public function register()\n {\n $this->registerFinite();\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n $this->registerServices();\n $this->setupStubPath();\n $this->registerProviders();\n }", "public function register()\n {\n $this->app['cache'] = $this->app->share(function($app)\n {\n return new CacheManagerMaster($app);\n });\n\n $this->app['memcached.connector'] = $this->app->share(function()\n {\n return new MemcachedConnector;\n });\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }", "public function register()\n {\n $this->registerCacheManager();\n $this->registerCourier();\n }", "public function register()\n {\n $this->app->singleton(Adapter::class, function () {\n\n return new Adapter(config('services.sso.id'), config('services.sso.secret'));\n\n });\n }", "public function register()\n {\n $this->registerRollbar();\n }", "public function register()\n {\n $this->configure();\n }", "public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n }", "public function register(): void\n {\n parent::register();\n\n $this->singleton(RouteViewerContract::class, RouteViewer::class);\n }", "public function register() {\n\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n {\n $this->registerBindings();\n $this->registerEventListeners();\n }", "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }", "public function register()\n {\n $this->app->singleton(Service\\TagsSynchronizer::class, function ($app) {\n return new Service\\TagsSynchronizer();\n });\n }", "public function register() {\n }", "public function register() {\n }", "public function register() {\n }", "public function register() {\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }", "public function register()\n {\n //\n }" ]
[ "0.71774215", "0.7054453", "0.6968271", "0.69677705", "0.6952019", "0.6931252", "0.6926226", "0.6918423", "0.6899592", "0.6895726", "0.6894278", "0.68906504", "0.68906504", "0.6883112", "0.6872877", "0.6865099", "0.68640506", "0.68627584", "0.68624485", "0.68491566", "0.6823619", "0.68196595", "0.681956", "0.681956", "0.681956", "0.681956", "0.681956", "0.681956", "0.681956", "0.681956", "0.68090034", "0.68089324", "0.6807419", "0.6803942", "0.6802752", "0.679191", "0.67904466", "0.67874974", "0.6785141", "0.6785141", "0.6785141", "0.6780175", "0.67768264", "0.6776666", "0.6770326", "0.6762759", "0.67627436", "0.67611307", "0.6757141", "0.67570823", "0.67548144", "0.6753397", "0.6753232", "0.67504245", "0.67504245", "0.67504245", "0.67504245", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705", "0.6749705" ]
0.0
-1
Output the widget form in the admin. Use this function instead of form.
public function print_widget_form( $options ) { $options = $this->merge_options( $options ); extract( $options ); ?> <p> <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label> <input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" class="widefat"> </p> <p> <label for="<?php echo $this->get_field_id( 'placeholder' ); ?>"><?php _e( 'Placeholder:' ); ?></label> <input id="<?php echo $this->get_field_id( 'placeholder' ); ?>" name="<?php echo $this->get_field_name( 'placeholder' ); ?>" type="text" value="<?php echo esc_attr( $placeholder ); ?>" class="widefat"> </p> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function form( $instance ) {\n \t// outputs the options form on admin\n }", "public function admin_render()\n {\n $output = $this->admin_form_before();\n $output .= $this->admin_form_start();\n $output .= $this->default_fields();\n $widget_saved_values = $this->get_settings();\n\n //render language tab\n $output .= $this->admin_language_tab();\n $output .= $this->admin_language_tab_start();\n\n $all_languages = Language::all();\n foreach ($all_languages as $key => $lang) {\n $output .= $this->admin_language_tab_content_start([\n 'class' => $key == 0 ? 'tab-pane fade show active' : 'tab-pane fade',\n 'id' => \"nav-home-\" . $lang->slug\n ]);\n $widget_title = $widget_saved_values['widget_title_' . $lang->slug] ?? '';\n $output .= '<div class=\"form-group\"><input type=\"text\" name=\"widget_title_' . $lang->slug . '\" class=\"form-control\" placeholder=\"' . __('Widget Title') . '\" value=\"' . purify_html($widget_title) . '\"></div>';\n\n $output .= $this->admin_language_tab_content_end();\n }\n $output .= $this->admin_language_tab_end();\n //end multi langual tab option\n\n $output .= $this->admin_form_submit_button();\n $output .= $this->admin_form_end();\n $output .= $this->admin_form_after();\n\n return $output;\n }", "public function form( $instance ) {\n\t\t// outputs the options form on admin\n\t}", "public function form( $instance ) {\n\t\t// outputs the options form on admin\n\t}", "public function form( $instance ) {\n\t\t// outputs the options form on admin\n\t}", "public function form( $instance ) {\n\t\t// outputs the options form on admin\n\t\t\n\t\n\t}", "function form( $instance ){\n\n\t\t\t// $instance Defaults\n\t\t\t$instance_defaults = $this->defaults;\n\n\t\t\t// If we have information in this widget, then ignore the defaults\n\t\t\tif( !empty( $instance ) ) $instance_defaults = array();\n\n\t\t\t// Parse $instance\n\t\t\t$instance = wp_parse_args( $instance, $instance_defaults );\n\n\t\t\textract( $instance, EXTR_SKIP );\n\n\t\t\t$design_bar_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_components' , array(\n\t\t\t\t\t'layout',\n\t\t\t\t\t'fonts',\n\t\t\t\t\t'custom',\n\t\t\t\t\t'columns',\n\t\t\t\t\t'liststyle',\n\t\t\t\t\t'imageratios',\n\t\t\t\t\t'background',\n\t\t\t\t\t'advanced'\n\t\t\t\t) );\n\n\t\t\t$design_bar_custom_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_custom_components' , array(\n\t\t\t\t\t'display' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-display',\n\t\t\t\t\t\t'label' => __( 'Display', 'layerswp' ),\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t\t'text_style' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'text_style' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'text_style' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $text_style ) ) ? $text_style : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Title &amp; Excerpt Position' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t\t\t'regular' => __( 'Regular' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t\t\t'overlay' => __( 'Overlay' , 'layerswp' )\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_media' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_media' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_media' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_media ) ) ? $show_media : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Featured Images' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_titles' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_titles' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_titles' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_titles ) ) ? $show_titles : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Titles' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_excerpts' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_excerpts' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_excerpts' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_excerpts ) ) ? $show_excerpts : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Excerpts' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n 'excerpt_length' => array(\n 'type' => 'number',\n 'name' => $this->get_field_name( 'excerpt_length' ) ,\n 'id' => $this->get_field_id( 'excerpt_length' ) ,\n 'min' => 0,\n 'max' => 10000,\n 'value' => ( isset( $excerpt_length ) ) ? $excerpt_length : NULL,\n 'label' => __( 'Excerpts Length' , 'layerswp' )\n ),\n\t\t\t\t\t\t\t\t'show_dates' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_dates' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_dates' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_dates ) ) ? $show_dates : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Dates' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_author' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_author' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_author' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_author ) ) ? $show_author : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Author' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_tags' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_tags' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_tags' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_tags ) ) ? $show_tags : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Tags' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_categories' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_categories' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_categories' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_categories ) ) ? $show_categories : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Categories' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_call_to_action' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_call_to_action' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_call_to_action' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_call_to_action ) ) ? $show_call_to_action : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show \"Read More\" Buttons' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n 'call_to_action' => array(\n 'type' => 'text',\n 'name' => $this->get_field_name( 'call_to_action' ) ,\n 'id' => $this->get_field_id( 'call_to_action' ) ,\n 'value' => ( isset( $call_to_action ) ) ? $call_to_action : NULL,\n 'label' => __( '\"Read More\" Text' , 'layerswp' )\n ),\n\t\t\t\t\t\t\t\t'show_pagination' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_pagination' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_pagination' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_pagination ) ) ? $show_pagination : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Pagination' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t) );\n\n\t\t\t$this->design_bar(\n\t\t\t\t'side', // CSS Class Name\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->get_field_name( 'design' ),\n\t\t\t\t\t'id' => $this->get_field_id( 'design' ),\n\t\t\t\t), // Widget Object\n\t\t\t\t$instance, // Widget Values\n\t\t\t\t$design_bar_components, // Standard Components\n\t\t\t\t$design_bar_custom_components // Add-on Components\n\t\t\t); ?>\n\t\t\t<div class=\"layers-container-large\">\n\n\t\t\t\t<?php $this->form_elements()->header( array(\n\t\t\t\t\t'title' => __( 'Post' , 'layerswp' ),\n\t\t\t\t\t'icon_class' =>'post'\n\t\t\t\t) ); ?>\n\n\t\t\t\t<section class=\"layers-accordion-section layers-content\">\n\n\t\t\t\t\t<div class=\"layers-row layers-push-bottom\">\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'title' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'title' ) ,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Enter title here' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $title ) ) ? $title : NULL ,\n\t\t\t\t\t\t\t\t\t'class' => 'layers-text layers-large'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'excerpt' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'excerpt' ) ,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Short Excerpt' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $excerpt ) ) ? $excerpt : NULL ,\n\t\t\t\t\t\t\t\t\t'class' => 'layers-textarea layers-large'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php // Grab the terms as an array and loop 'em to generate the $options for the input\n\t\t\t\t\t\t$terms = get_terms( $this->taxonomy );\n\t\t\t\t\t\tif( !is_wp_error( $terms ) ) { ?>\n\t\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'category' ); ?>\"><?php echo __( 'Category to Display' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t\t<?php $category_options[ 0 ] = __( 'All' , 'layerswp' );\n\t\t\t\t\t\t\t\tforeach ( $terms as $t ) $category_options[ $t->term_id ] = $t->name;\n\t\t\t\t\t\t\t\techo $this->form_elements()->input(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'category' ) ,\n\t\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'category' ) ,\n\t\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Select a Category' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t\t'value' => ( isset( $category ) ) ? $category : NULL ,\n\t\t\t\t\t\t\t\t\t\t'options' => $category_options\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php } // if !is_wp_error ?>\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'posts_per_page' ); ?>\"><?php echo __( 'Number of items to show' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t<?php $select_options[ '-1' ] = __( 'Show All' , 'layerswp' );\n\t\t\t\t\t\t\t$select_options = $this->form_elements()->get_incremental_options( $select_options , 1 , 20 , 1);\n\t\t\t\t\t\t\techo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'posts_per_page' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'posts_per_page' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $posts_per_page ) ) ? $posts_per_page : NULL ,\n\t\t\t\t\t\t\t\t\t'min' => '-1',\n\t\t\t\t\t\t\t\t\t'max' => '100'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'order' ); ?>\"><?php echo __( 'Sort by' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'order' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'order' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $order ) ) ? $order : NULL ,\n\t\t\t\t\t\t\t\t\t'options' => $this->form_elements()->get_sort_options()\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\n\t\t\t</div>\n\t\t<?php }", "public function admin_render()\n {\n $output = $this->admin_form_before();\n $output .= $this->admin_form_start();\n $output .= $this->default_fields();\n $widget_saved_values = $this->get_settings();\n\n $output .= $this->admin_language_tab(); //have to start language tab from here on\n $output .= $this->admin_language_tab_start();\n\n $all_languages = LanguageHelper::all_languages();\n foreach ($all_languages as $key => $lang) {\n $output .= $this->admin_language_tab_content_start([\n 'class' => $key == 0 ? 'tab-pane fade show active' : 'tab-pane fade',\n 'id' => \"nav-home-\" . $lang->slug\n ]);\n $output .= Text::get([\n 'name' => 'title_'.$lang->slug,\n 'label' => __('Title'),\n 'value' => $widget_saved_values['title_' . $lang->slug] ?? null,\n ]);\n $output .= $this->admin_language_tab_content_end();\n }\n\n $output .= $this->admin_language_tab_end(); //have to end language tab\n\n $output .= Text::get([\n 'name' => 'location',\n 'label' => __('Location'),\n 'value' => $widget_saved_values['location'] ?? null,\n ]);\n $output .= Select::get([\n 'name' => 'custom_form_id',\n 'label' => __('Custom Form'),\n 'placeholder' => __('Select form'),\n 'options' => FormBuilder::all()->pluck('title','id')->toArray(),\n 'value' => $widget_saved_values['custom_form_id'] ?? []\n ]);\n $output .= Slider::get([\n 'name' => 'padding_top',\n 'label' => __('Padding Top'),\n 'value' => $widget_saved_values['padding_top'] ?? 50,\n 'max' => 200,\n ]);\n $output .= Slider::get([\n 'name' => 'padding_bottom',\n 'label' => __('Padding Bottom'),\n 'value' => $widget_saved_values['padding_bottom'] ?? 50,\n 'max' => 200,\n ]);\n $output .= $this->admin_form_submit_button();\n $output .= $this->admin_form_end();\n $output .= $this->admin_form_after();\n\n return $output;\n }", "function form( $instance ) {\n\n\t\tfor ( $i = 0; $i < count( $this->widget_fields ); $i ++ ) :\n\t\t\t$field_id = $this->widget_fields[$i]['id'];\n\t\t\t$this->widget_fields[$i]['field_id'] = $this->get_field_id( $field_id );\n\t\t\t$this->widget_fields[$i]['field_name'] = $this->get_field_name( $field_id );\n\t\tendfor;\n\n\t\tallonsy_display_widget_form( $this->widget_fields, $instance );\n\n\t}", "public function form($instance)\r\n {\r\n echo 'There are no options for this widget.\r\n Click on <a href=\"http://localhost/th-wp/wp-admin/admin.php?page=sunset-sidebar\" target=\"_blank\" >\r\n this link</a> to edit the options.';\r\n }", "public function dashboard_widget() {\n\t\tglobal $wpdb;\n\n\t\t// Get the date/time format that is saved in the options table\n\t\t$date_format = get_option( 'date_format' );\n\t\t$time_format = get_option( 'time_format' );\n\n\t\t$widgets = get_option( 'vfb_dashboard_widget_options' );\n\t\t$total_items = isset( $widgets['vfb_dashboard_recent_entries'] ) && isset( $widgets['vfb_dashboard_recent_entries']['items'] ) ? absint( $widgets['vfb_dashboard_recent_entries']['items'] ) : 5;\n\n\t\t$forms = $wpdb->get_var( \"SELECT COUNT(*) FROM {$this->form_table_name}\" );\n\n\t\tif ( !$forms ) :\n\t\t\techo sprintf(\n\t\t\t\t'<p>%1$s <a href=\"%2$s\">%3$s</a></p>',\n\t\t\t\t__( 'You currently do not have any forms.', 'visual-form-builder-pro' ),\n\t\t\t\tesc_url( admin_url( 'admin.php?page=vfb-add-new' ) ),\n\t\t\t\t__( 'Get started!', 'visual-form-builder-pro' )\n\t\t\t);\n\n\t\t\treturn;\n\t\tendif;\n\n\t\t$entries = $wpdb->get_results( $wpdb->prepare( \"SELECT forms.form_title, entries.entries_id, entries.form_id, entries.sender_name, entries.sender_email, entries.date_submitted FROM $this->form_table_name AS forms INNER JOIN $this->entries_table_name AS entries ON entries.form_id = forms.form_id ORDER BY entries.date_submitted DESC LIMIT %d\", $total_items ) );\n\n\t\tif ( current_user_can( 'vfb_edit_entries' ) )\n\t\t\t$action = 'edit';\n\t\telseif ( current_user_can( 'vfb_view_entries' ) )\n\t\t\t$action = 'view';\n\n\t\tif ( !$entries ) :\n\t\t\techo sprintf( '<p>%1$s</p>', __( 'You currently do not have any entries.', 'visual-form-builder-pro' ) );\n\t\telse :\n\n\t\t\t$content = '';\n\n\t\t\tforeach ( $entries as $entry ) :\n\n\t\t\t\t$content .= sprintf(\n\t\t\t\t\t'<li><a href=\"%1$s\">%4$s</a> via <a href=\"%2$s\">%5$s</a> <span class=\"rss-date\">%6$s</span><cite>%3$s</cite></li>',\n\t\t\t\t\tesc_url( add_query_arg( array( 'action' => $action, 'entry' => absint( $entry->entries_id ) ), admin_url( 'admin.php?page=vfb-entries' ) ) ),\n\t\t\t\t\tesc_url( add_query_arg( 'form-filter', absint( $entry->form_id ), admin_url( 'admin.php?page=vfb-entries' ) ) ),\n\t\t\t\t\tesc_html( $entry->sender_name ),\n\t\t\t\t\tesc_html( $entry->sender_email ),\n\t\t\t\t\tesc_html( $entry->form_title ),\n\t\t\t\t\tdate( \"$date_format $time_format\", strtotime( $entry->date_submitted ) )\n\t\t\t\t);\n\n\t\t\tendforeach;\n\n\t\t\techo \"<div class='rss-widget'><ul>$content</ul></div>\";\n\n\t\tendif;\n\t}", "public function form( $instance ) {\n // Output admin widget options form\n\n $title = (!empty($instance['title']) ? $instance['title'] : 'Top Post');\n $post_num = (!empty($instance['post_num']) ? $instance['post_num'] : 5); ?>\n\n <p> \n <label for=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ) ?>\">Title: </label>\n <input \n type=\"text\" \n class=\"widefat\" \n id=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ) ?>\" \n name=\"<?php echo esc_attr( $this->get_field_name( 'title' ) ) ?>\" \n value=\"<?php echo esc_attr( $title ) ?>\">\n </p>\n\n <p>\n <label for=\"<?php echo esc_attr( $this->get_field_id( 'post_num' ) ) ?>\">PostNumber: </label>\n <input \n type=\"text\" \n class=\"widefat\" \n id=\"<?php echo esc_attr( $this->get_field_id( 'post_num' ) ) ?>\" \n name=\"<?php echo esc_attr( $this->get_field_name( 'post_num' ) ) ?>\" \n value=\"<?php echo esc_attr( $post_num ) ?>\">\n </p>\n <?php\n }", "function widgetControlOutput( ) {\r\n\t\t\t$options = get_option( 'ILuvWalking.com Widget' );\r\n\t\t\tif( isset( $_POST[ \"iluvwalking-com-submit\" ] ) ) {\r\n\t\t\t\t$options[ 'title' ] = strip_tags( stripslashes( $_POST[ 'iluvwalking-com-title' ] ) );\r\n\t\t\t\t$options[ 'name' ] = strip_tags( stripslashes( $_POST[ 'iluvwalking-com-name' ] ) );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tupdate_option( 'ILuvWalking.com Widget', $options );\r\n\t\t\t\r\n\t\t\t$title = attribute_escape( $options[ 'title' ] );\r\n\t\t\t$name = attribute_escape( $options[ 'name' ] );\r\n\t\t\t\r\n\t\t\tinclude ( 'views/widget-control.php' );\r\n\t\t}", "public function form( $instance ) {\r\n\t\t// outputs the options form on admin\r\n\r\n $title = (! empty($instance['title'])) ? $instance['title'] : 'Stay in touch with us';\r\n $description = (! empty($instance['description'])) ? $instance['description'] : 'Join our mailing list or follow us & stay informed about our news and updates.';\r\n\r\n\t\t$output = '<p><label for=\"'.esc_attr($this->get_field_id('title')).'\" >Widget Title:</label></br>';\r\n\t\t$output .= '<input name=\"'.esc_html($this->get_field_name('title')).'\" id=\"'.esc_attr($this->get_field_id('title')).'\" type=\"text\" class=\"widefat\" value=\"'.esc_html($title).'\"></p>';\r\n\t\t$output .='<p><label for=\"'.esc_attr($this->get_field_id('description')).'\" >Short description about sbscription form : </label>';\r\n\t\t$output .= '<input name=\"'.esc_html($this->get_field_name('description')).'\" id=\"'.esc_attr($this->get_field_id('deacription')).'\" type=\"text\" class=\"widefat\" value=\"'.esc_html($description).'\"></p>';\r\n\r\n\t\techo $output;\r\n\r\n\t}", "function form( $instance ){\n\n\t\t\t// $instance Defaults\n\t\t\t$instance_defaults = $this->defaults;\n\n\t\t\t// If we have information in this widget, then ignore the defaults\n\t\t\tif( !empty( $instance ) ) $instance_defaults = array();\n\n\t\t\t// Parse $instance\n\t\t\t$instance = wp_parse_args( $instance, $instance_defaults );\n\t\t\textract( $instance, EXTR_SKIP );\n\n\t\t\t$design_bar_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_components' , array(\n\t\t\t\t\t'custom',\n\t\t\t\t\t'advanced'\n\t\t\t\t) );\n\n\t\t\t$design_bar_custom_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_custom_components' , array(\n\t\t\t\t\t'layout' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-layout-fullwidth',\n\t\t\t\t\t\t'label' => __( 'Layout', 'layerswp' ),\n\t\t\t\t\t\t'wrapper-class' => 'layers-pop-menu-wrapper layers-small',\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t'layout' => array(\n\t\t\t\t\t\t\t\t'type' => 'select-icons',\n\t\t\t\t\t\t\t\t'label' => __( '' , 'layerswp' ),\n\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'design' ) . '[layout]' ,\n\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'design-layout' ) ,\n\t\t\t\t\t\t\t\t'value' => ( isset( $design['layout'] ) ) ? $design['layout'] : NULL,\n\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t'layout-boxed' => __( 'Boxed' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'layout-fullwidth' => __( 'Full Width' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'layout-full-screen' => __( 'Full Screen' , 'layerswp' )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'display' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-slider',\n\t\t\t\t\t\t'label' => __( 'Slider', 'layerswp' ),\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t\t'show_slider_arrows' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_slider_arrows' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_slider_arrows' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_slider_arrows ) ) ? $show_slider_arrows : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Slider Arrows' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_slider_dots' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_slider_dots' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_slider_dots' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_slider_dots ) ) ? $show_slider_dots : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Slider Dots' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'autoplay_slides' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'autoplay_slides' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'autoplay_slides' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $autoplay_slides ) ) ? $autoplay_slides : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Autoplay Slides' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'slide_time' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_time' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'slide_time' ) ,\n\t\t\t\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t\t\t\t'max' => 10,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Time in seconds, eg. 2' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $slide_time ) ) ? $slide_time : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Slide Interval' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'data' => array( 'show-if-selector' => '#' . $this->get_field_id( 'autoplay_slides' ), 'show-if-value' => 'true' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'slide_height' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_height' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'slide_height' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $slide_height ) ) ? $slide_height : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Slider Height' , 'layerswp' )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t) );\n\n\t\t\t$this->design_bar(\n\t\t\t\t'side', // CSS Class Name\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->get_field_name( 'design' ),\n\t\t\t\t\t'id' => $this->get_field_id( 'design' ),\n\t\t\t\t), // Widget Object\n\t\t\t\t$instance, // Widget Values\n\t\t\t\t$design_bar_components, // Standard Components\n\t\t\t\t$design_bar_custom_components // Add-on Components\n\t\t\t); ?>\n\t\t\t<div class=\"layers-container-large\" id=\"layers-slide-widget-<?php echo esc_attr( $this->number ); ?>\">\n\n\t\t\t\t<?php $this->form_elements()->header( array(\n\t\t\t\t\t'title' =>'Sliders',\n\t\t\t\t\t'icon_class' =>'slider'\n\t\t\t\t) ); ?>\n\n\t\t\t\t<section class=\"layers-accordion-section layers-content\">\n\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'type' => 'hidden',\n\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_ids' ) ,\n\t\t\t\t\t\t\t\t'id' => 'slide_ids_input_' . $this->number,\n\t\t\t\t\t\t\t\t'value' => ( isset( $slide_ids ) ) ? $slide_ids : NULL\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t); ?>\n\n\t\t\t\t\t\t<?php // If we have some slides, let's break out their IDs into an array\n\t\t\t\t\t\tif( isset( $slide_ids ) && '' != $slide_ids ) $slides = explode( ',' , $slide_ids ); ?>\n\n\t\t\t\t\t\t<ul id=\"slide_list_<?php echo esc_attr( $this->number ); ?>\" class=\"layers-accordions layers-accordions-sortable layers-sortable\" data-id_base=\"<?php echo $this->id_base; ?>\" data-number=\"<?php echo esc_attr( $this->number ); ?>\">\n\t\t\t\t\t\t\t<?php if( isset( $slides ) && is_array( $slides ) ) { ?>\n\t\t\t\t\t\t\t\t<?php foreach( $slides as $slide ) {\n\t\t\t\t\t\t\t\t\t$this->slide_item( array(\n\t\t\t\t\t\t\t\t\t\t\t\t'id_base' => $this->id_base ,\n\t\t\t\t\t\t\t\t\t\t\t\t'number' => $this->number\n\t\t\t\t\t\t\t\t\t\t\t) ,\n\t\t\t\t\t\t\t\t\t\t\t$slide ,\n\t\t\t\t\t\t\t\t\t\t\t( isset( $instance[ 'slides' ][ $slide ] ) ) ? $instance[ 'slides' ][ $slide ] : NULL );\n\t\t\t\t\t\t\t\t} ?>\n\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<button class=\"layers-button btn-full layers-add-widget-slide add-new-widget\" data-number=\"<?php echo esc_attr( $this->number ); ?>\"><?php _e( 'Add New Slide' , 'layerswp' ) ; ?></button>\n\t\t\t\t</section>\n\n\t\t\t</div>\n\n\t\t<?php }", "public function form($instance)\n {\n // Set widget defaults\n $defaults = [\n \"design_style\" => \"circles\",\n \"background_color\" => \"#ff7a59\",\n \"icon_color\" => \"#ffffff\",\n \"layout\" => \"horizontal\",\n \"facebook\" => \"\",\n \"twitter\" => \"\",\n \"email\" => \"\",\n \"linkedin\" => \"\",\n ];\n\n // Parse current settings with defaults\n extract(wp_parse_args((array) $instance, $defaults));\n // Design Style\n ?>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id(\n \"design_style\"\n ); ?>\"><?php _e(\"Design Style\", \"kelp_agency\"); ?></label>\n\t\t\t<select required name=\"<?php echo $this->get_field_name(\n \"design_style\"\n ); ?>\" id=\"<?php echo $this->get_field_id(\"design_style\"); ?>\" class=\"widefat\">\n\t\t\t<?php\n $options = [\n \"circles\" => __(\"Circles\", \"kelp_agency\"),\n \"squircles\" => __(\"Squircles\", \"kelp_agency\"),\n \"square\" => __(\"Square\", \"kelp_agency\"),\n \"basic\" => __(\"Basic\", \"kelp_agency\"),\n ];\n // Loop through options and add each one to the select dropdown\n foreach ($options as $key => $name) {\n echo '<option value=\"' .\n esc_attr($key) .\n '\" id=\"' .\n esc_attr($key) .\n '\" ' .\n selected($select, $key, false) .\n \">\" .\n $name .\n \"</option>\";\n }\n ?>\n\t\t\t</select>\n\t\t</p>\n\n\t\t<?php // Background Color\n ?>\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr(\n $this->get_field_id(\"background_color\")\n ); ?>\"><?php _e(\"Background Color:\", \"kelp_agency\"); ?></label>\n\t\t\t<input required id=\"<?php echo esc_attr(\n $this->get_field_id(\"background_color\")\n ); ?>\" name=\"<?php echo esc_attr($this->get_field_name(\"background_color\")); ?>\" type=\"color\" value=\"<?php echo esc_attr($background_color); ?>\" />\n\t\t</p>\n\n\t\t<?php // Icon Color\n ?>\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr(\n $this->get_field_id(\"icon_color\")\n ); ?>\"><?php _e(\"Icon Color:\", \"kelp_agency\"); ?></label>\n\t\t\t<input required id=\"<?php echo esc_attr(\n $this->get_field_id(\"icon_color\")\n ); ?>\" name=\"<?php echo esc_attr($this->get_field_name(\"icon_color\")); ?>\" type=\"color\" value=\"<?php echo esc_attr($icon_color); ?>\" />\n\t\t</p>\n\n\t\t<?php // Layout\n ?>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id(\n \"layout\"\n ); ?>\"><?php _e(\"Layout\", \"kelp_agency\"); ?></label>\n\t\t\t<select required name=\"<?php echo $this->get_field_name(\n \"layout\"\n ); ?>\" id=\"<?php echo $this->get_field_id(\"layout\"); ?>\" class=\"widefat\">\n\t\t\t\t<?php\n // Your options array\n $options = [\n \"horizontal\" => __(\"Horizontal\", \"kelp_agency\"),\n \"vertical\" => __(\"Vertical\", \"kelp_agency\"),\n ];\n // Loop through options and add each one to the select dropdown\n foreach ($options as $key => $name) {\n echo '<option value=\"' .\n esc_attr($key) .\n '\" id=\"' .\n esc_attr($key) .\n '\" ' .\n selected($select, $key, false) .\n \">\" .\n $name .\n \"</option>\";\n }\n ?>\n\t\t\t</select>\n\t\t</p>\n\n\t\t<?php // Facebook\n ?>\n\t\t<p>\n\t\t\t<input id=\"<?php echo esc_attr(\n $this->get_field_id(\"facebook\")\n ); ?>\" name=\"<?php echo esc_attr($this->get_field_name(\"facebook\")); ?>\" type=\"checkbox\" value=\"1\" <?php checked(\"1\", $facebook); ?> />\n\t\t\t<label for=\"<?php echo esc_attr(\n $this->get_field_id(\"facebook\")\n ); ?>\"><?php _e(\"Facebook\", \"text_domain\"); ?></label>\n\t\t</p>\n\n\t\t<?php // Twitter\n ?>\n\t\t<p>\n\t\t\t<input id=\"<?php echo esc_attr(\n $this->get_field_id(\"twitter\")\n ); ?>\" name=\"<?php echo esc_attr($this->get_field_name(\"twitter\")); ?>\" type=\"checkbox\" value=\"1\" <?php checked(\"1\", $twitter); ?> />\n\t\t\t<label for=\"<?php echo esc_attr(\n $this->get_field_id(\"twitter\")\n ); ?>\"><?php _e(\"Twitter\", \"text_domain\"); ?></label>\n\t\t</p>\n\n\t\t<?php // Email\n ?>\n\t\t<p>\n\t\t\t<input id=\"<?php echo esc_attr(\n $this->get_field_id(\"email\")\n ); ?>\" name=\"<?php echo esc_attr($this->get_field_name(\"email\")); ?>\" type=\"checkbox\" value=\"1\" <?php checked(\"1\", $email); ?> />\n\t\t\t<label for=\"<?php echo esc_attr(\n $this->get_field_id(\"email\")\n ); ?>\"><?php _e(\"Email\", \"text_domain\"); ?></label>\n\t\t</p>\n\n\t\t<?php // LinkedIn\n ?>\n\t\t<p>\n\t\t\t<input id=\"<?php echo esc_attr(\n $this->get_field_id(\"linkedin\")\n ); ?>\" name=\"<?php echo esc_attr($this->get_field_name(\"linkedin\")); ?>\" type=\"checkbox\" value=\"1\" <?php checked(\"1\", $linkedin); ?> />\n\t\t\t<label for=\"<?php echo esc_attr(\n $this->get_field_id(\"linkedin\")\n ); ?>\"><?php _e(\"LinkedIn\", \"text_domain\"); ?></label>\n\t\t</p>\n\t<?php\n }", "public function dashboard_widget() {\n global $wpdb;\n\n // Get the date/time format that is saved in the options table\n $date_format = get_option('date_format');\n $time_format = get_option('time_format');\n\n $widgets = get_option('swpm_dashboard_widget_options');\n $total_items = isset($widgets['swpm_dashboard_recent_entries']) && isset($widgets['swpm_dashboard_recent_entries']['items']) ?\n absint($widgets['swpm_dashboard_recent_entries']['items']) : 5;\n\n $forms = $wpdb->get_var(\"SELECT COUNT(*) FROM {$this->form_table_name}\");\n\n if (!$forms) :\n echo sprintf(\n '<p>%1$s <a href=\"%2$s\">%3$s</a></p>', __('You currently do not have any forms.', 'swpm-form-builder'), esc_url(admin_url('admin.php?page=swpm-add-new')), __('Get started!', 'swpm-form-builder')\n );\n\n return;\n endif;\n\n $entries = $wpdb->get_results($wpdb->prepare(\"SELECT forms.form_title, entries.entries_id, entries.form_id, \"\n . \"entries.sender_name, entries.sender_email, entries.date_submitted FROM $this->form_table_name \"\n . \"AS forms INNER JOIN $this->entries_table_name AS entries ON entries.form_id = forms.form_id ORDER BY \"\n . \"entries.date_submitted DESC LIMIT %d\", $total_items));\n\n if (!$entries) :\n echo sprintf('<p>%1$s</p>', __('You currently do not have any entries.', 'swpm-form-builder'));\n else :\n\n $content = '';\n\n foreach ($entries as $entry) :\n\n $content .= sprintf(\n '<li><a href=\"%1$s\">%4$s</a> via <a href=\"%2$s\">%5$s</a> <span class=\"rss-date\">%6$s</span><cite>%3$s</cite></li>', esc_url(add_query_arg(array('action' => 'view', 'entry' => absint($entry->entries_id)), admin_url('admin.php?page=swpm-entries'))), esc_url(add_query_arg('form-filter', absint($entry->form_id), admin_url('admin.php?page=swpm-entries'))), esc_html($entry->sender_name), esc_html($entry->sender_email), esc_html($entry->form_title), date(\"$date_format $time_format\", strtotime($entry->date_submitted))\n );\n\n endforeach;\n\n echo \"<div class='rss-widget'><ul>$content</ul></div>\";\n\n endif;\n }", "public function form( $instance ) {\n\t\t// outputs the options form on admin\n $this->getForm($instance);\n\t}", "function form( $instance ) {\r\n /* Set up some default widget settings. */\r\n $defaults = array(\r\n 'title' => '热门文章',\r\n 'type' => 'hot',\r\n 'style' => 'image',\r\n 'limit' => '5',\r\n );\r\n $instance = wp_parse_args( (array) $instance, $defaults ); ?>\r\n <!-- widget title: -->\r\n <p>\r\n <label for=\"<?php echo $this->get_field_id( 'title' ); ?>\">显示标题</label>\r\n <input type=\"text\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:100%;\" />\r\n </p>\r\n <!-- type -->\r\n <p>\r\n <label for=\"<?php echo $this->get_field_id( 'type' ); ?>\">类型</label>\r\n <select id=\"<?php echo $this->get_field_id( 'type' ); ?>\" name=\"<?php echo $this->get_field_name( 'type' ); ?>\" class=\"widefat\" style=\"width:100%;\">\r\n <option value=\"hot\" <?php if ( 'hot' == $instance['type'] ) echo 'selected=\"selected\"'; ?>>热门</option>\r\n <option value=\"random\" <?php if ( 'random' == $instance['type'] ) echo 'selected=\"selected\"'; ?>>随机</option>\r\n <option value=\"comment\" <?php if ( 'comment' == $instance['type'] ) echo 'selected=\"selected\"'; ?>>评论数</option>\r\n </select>\r\n </p>\r\n <!-- style -->\r\n <p>\r\n <label for=\"<?php echo $this->get_field_id( 'style' ); ?>\">样式</label>\r\n <select id=\"<?php echo $this->get_field_id( 'style' ); ?>\" name=\"<?php echo $this->get_field_name( 'style' ); ?>\" class=\"widefat\" style=\"width:100%;\">\r\n <option value=\"image\" <?php if ( 'image' == $instance['style'] ) echo 'selected=\"selected\"'; ?>>图片</option>\r\n <option value=\"side\" <?php if ( 'side' == $instance['style'] ) echo 'selected=\"selected\"'; ?>>侧边图片</option>\r\n <option value=\"brief\" <?php if ( 'brief' == $instance['style'] ) echo 'selected=\"selected\"'; ?>>简约</option>\r\n </select>\r\n </p>\r\n <!-- limit -->\r\n <p>\r\n <label for=\"<?php echo $this->get_field_id( 'limit' ); ?>\">显示数量</label>\r\n <input type=\"number\" id=\"<?php echo $this->get_field_id( 'limit' ); ?>\" name=\"<?php echo $this->get_field_name( 'limit' ); ?>\" value=\"<?php echo $instance['limit']; ?>\" style=\"width:100%;\" />\r\n </p>\r\n <!-- Sex: Select Box -->\r\n <?php\r\n }", "function form($instance)\n\t{\n\t\t/* Set up some default widget settings. */\n\t\t$defaults = array('title' => __('Guild News', 'guildnews'),\n\t\t\t\t'region' => 'eu.battle.net',\n\t\t\t\t'locale' => 'de_DE',\n\t\t\t\t'realm' => 'Blackhand',\n\t\t\t\t'guild' => 'Embargo Agency',\n\t\t\t\t'max' => '5'\n\t\t);\n\n\t\t$instance = wp_parse_args((array) $instance, $defaults); ?>\n\n<!-- Widget Title: Text Input -->\n<p>\n\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'hybrid'); ?>\n\t</label> <input id=\"<?php echo $this->get_field_id( 'title' ); ?>\"\n\t\tname=\"<?php echo $this->get_field_name( 'title' ); ?>\"\n\t\tvalue=\"<?php echo $instance['title']; ?>\" style=\"width: 100%;\" />\n</p>\n\n<!-- Guild Name: Text Input -->\n<p>\n\t<label for=\"<?php echo $this->get_field_id( 'guild' ); ?>\"><?php _e('Guild Name:', 'guildnews'); ?>\n\t</label> <input id=\"<?php echo $this->get_field_id( 'guild' ); ?>\"\n\t\tname=\"<?php echo $this->get_field_name( 'guild' ); ?>\"\n\t\tvalue=\"<?php echo $instance['guild']; ?>\" style=\"width: 100%;\" />\n</p>\n\n<!-- Realm Name: Text Input -->\n<p>\n\t<label for=\"<?php echo $this->get_field_id( 'realm' ); ?>\"><?php _e('Realm Name:', 'guildnews'); ?>\n\t</label> <input id=\"<?php echo $this->get_field_id( 'realm' ); ?>\"\n\t\tname=\"<?php echo $this->get_field_name( 'realm' ); ?>\"\n\t\tvalue=\"<?php echo $instance['realm']; ?>\" style=\"width: 100%;\" />\n</p>\n\n<!-- Region: Select Box -->\n<p>\n\t<label for=\"<?php echo $this->get_field_id( 'region' ); ?>\"><?php _e('Region:', 'guildnews'); ?>\n\t</label> <select id=\"<?php echo $this->get_field_id( 'region' ); ?>\"\n\t\tname=\"<?php echo $this->get_field_name( 'region' ); ?>\"\n\t\tclass=\"widefat\" style=\"width: 100%;\">\n\t\t<option\n\t\t<?php if ( 'eu.battle.net' == $instance['region'] ) echo 'selected=\"selected\"'; ?>>eu.battle.net</option>\n\t\t<option\n\t\t<?php if ( 'us.battle.net' == $instance['region'] ) echo 'selected=\"selected\"'; ?>>us.battle.net</option>\n\t\t<option\n\t\t<?php if ( 'kr.battle.net' == $instance['region'] ) echo 'selected=\"selected\"'; ?>>kr.battle.net</option>\n\t\t<option\n\t\t<?php if ( 'tw.battle.net' == $instance['region'] ) echo 'selected=\"selected\"'; ?>>tw.battle.net</option>\n\t</select>\n</p>\n\n<!-- Locale: Select Box -->\n<p>\n\t<label for=\"<?php echo $this->get_field_id( 'locale' ); ?>\"><?php _e('Locale:', 'guildnews'); ?>\n\t</label> <select id=\"<?php echo $this->get_field_id( 'locale' ); ?>\"\n\t\tname=\"<?php echo $this->get_field_name( 'locale' ); ?>\"\n\t\tclass=\"widefat\" style=\"width: 100%;\">\n\t\t<option\n\t\t<?php if ( 'en_US' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>en_US</option>\n\t\t<option\n\t\t<?php if ( 'es_MX' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>es_MX</option>\n\t\t<option\n\t\t<?php if ( 'pt_BR' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>pt_BR</option>\n\t\t<option\n\t\t<?php if ( 'en_GB' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>en_GB</option>\n\t\t<option\n\t\t<?php if ( 'es_ES' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>es_ES</option>\n\t\t<option\n\t\t<?php if ( 'fr_FR' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>fr_FR</option>\n\t\t<option\n\t\t<?php if ( 'ru_RU' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>ru_RU</option>\n\t\t<option\n\t\t<?php if ( 'de_DE' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>de_DE</option>\n\t\t<option\n\t\t<?php if ( 'pt_PT' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>pt_PT</option>\n\t\t<option\n\t\t<?php if ( 'ko_KR' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>ko_KR</option>\n\t\t<option\n\t\t<?php if ( 'zh_TW' == $instance['locale'] ) echo 'selected=\"selected\"'; ?>>zh_TW</option>\n\t</select>\n</p>\n\n<!-- Number of News Items: Text Input -->\n<p>\n\t<label for=\"<?php echo $this->get_field_id( 'max' ); ?>\"><?php _e('Number of News Items: (empty for all)', 'guildnews'); ?>\n\t</label> <input id=\"<?php echo $this->get_field_id( 'max' ); ?>\"\n\t\tname=\"<?php echo $this->get_field_name( 'max' ); ?>\"\n\t\tvalue=\"<?php echo $instance['max']; ?>\" style=\"width: 100%;\" />\n</p>\n\n<?php\n\n\t}", "function form( $instance ) {\n\t\t\n\t\tTrends()->view->load(\n\t\t\t'/view/backend',\n\t\t\tarray(\n\t\t\t\t'widget' => $this,\n\t\t\t\t'instance' => $instance\n\t\t\t),\n\t\t\tfalse,\n\t\t\tdirname( __FILE__ )\n\t\t);\n\t\t\n\t}", "public function form( $instance ) {\n\n // Define default values for variables\n $defaults = array(\n 'school' => '',\n 'department' => '',\n 'limit' => '5',\n );\n $instance = wp_parse_args((array) $instance, $defaults);\n\n // TODO: Store the values of the widget in their own variable\n\n // Display the admin form\n include( plugin_dir_path(__FILE__) . 'views/admin.php' );\n\n }", "function form( $instance ) {\n // Retrieve previous values from $instance or set defaults\n // $render_widget = ( ! empty( $instance['render_widget'] ) ? $instance['render_widget'] : 'true' );\n $widget_title = ( ! empty( $instance['widget_title'] ) ? esc_attr( $instance['widget_title'] ) : __( 'Today\\'s Tasks', 'adventure-log' ) );\n ?>\n <!-- Display fields for widget options -->\n <p>\n <label for=\"<?php echo $this->get_field_id( 'widget_title' ); ?>\">\n <?php _e( 'Title:', 'adventure-log' ); ?>\n </label>\n <input type=\"text\" class=\"widefat title\" id=\"<?php echo $this->get_field_id( 'widget_title' ); ?>\" name=\"<?php echo $this->get_field_name( 'widget_title' );?>\" value=\"<?php echo $widget_title; ?>\"> \n </p>\n <?php\n }", "public function admin_options() {\r\n echo '<h3>' . __('Mondido', 'mondido') . '</h3>';\r\n echo '<p>' . __('Mondido, Simple payments, smart functions', 'mondido') . '</p>';\r\n echo '<table class=\"form-table\">';\r\n // Generate the HTML For the settings form.\r\n $this->generate_settings_html();\r\n echo '</table>';\r\n }", "function form( $instance ) {\r\n\t\t?>\r\n\r\n\t\t<!-- Widget Title: Text Input -->\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:'); ?></label>\r\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:80%;\" />\r\n\t\t</p>\r\n\r\n\t\t<!-- Your Name: Text Input -->\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'taxonomy' ); ?>\"><?php _e('Taxonomy:', 'forritz'); ?></label>\r\n\t\t\t<!--\t\t\t<input id=\"<?php echo $this->get_field_id( 'taxonomy' ); ?>\" name=\"<?php echo $this->get_field_name( 'taxonomy' ); ?>\" value=\"<?php echo $instance['taxonomy']; ?>\" style=\"width:100%;\" />-->\r\n\t\t\t<select id=\"<?php echo $this->get_field_id( 'taxonomy' ); ?>\" name=\"<?php echo $this->get_field_name( 'taxonomy' ); ?>\" class=\"widefat\" style=\"width:80%;\">\r\n\t\t\t\t<?php $taxonomies = get_taxonomies(array(),'objects');\r\n\t\t\t\tforeach($taxonomies as $taxonomy)\r\n\t\t\t\t\tif ( $taxonomy->name == $instance['taxonomy'])\r\n\t\t\t\t\t\tprintf('<option value=\"%s\" selected=\"selected\">%s</option>',$taxonomy->name,$taxonomy->label);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tprintf('<option value=\"%s\">%s</option>',$taxonomy->name,$taxonomy->label);\r\n\t\t\t\t\t?>\r\n\t\t\t\t</select>\r\n\t\t\t</p>\r\n\r\n\t\t\t<p>\r\n\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'parameter' ); ?>\"><?php _e('parameter:', 'forritz'); ?></label>\r\n\t\t\t\t<input id=\"<?php echo $this->get_field_id( 'parameter' ); ?>\" name=\"<?php echo $this->get_field_name( 'parameter' ); ?>\" value=\"<?php echo $instance['parameter']; ?>\" style=\"width:80%;\" />\r\n\t\t\t</p>\r\n\r\n\t\t\t<?php\r\n\t\t}", "function form( $instance ) {\n\n\t\tfor ( $i = 0; $i < count( $this->widget_fields ); $i ++ ) :\n\t\t\t$field_id = $this->widget_fields[$i]['id'];\n\t\t\t$this->widget_fields[$i]['field_id'] = $this->get_field_id( $field_id );\n\t\t\t$this->widget_fields[$i]['field_name'] = $this->get_field_name( $field_id );\n\t\tendfor;\n\n\t\tproper_widget_output_fields( $this->widget_fields, $instance );\n\n\t}", "public function form( $instance ) { \n\t\t/* Set up default widget settings. */ \n\t\t$defaults = array( 'title' => '', 'size' => '32', 'icon_shape' => 'round', 'facebook' => '', 'twitter' => '', 'instagram' => '', 'parler' => '', 'pinterest' => '', 'behance' => '', 'flickr' => '', 'foursquare' => '', 'github' => '', 'linkedin' => '', 'linkedin_company' => '', 'medium' => '', 'mewe' => '', 'odnoklassniki' => '', 'snapchat' => '', 'telegram' => '', 'tumblr' => '', 'vimeo' => '', 'vkontakte' => '', 'xing' => '', 'youtube' => '', 'youtube_channel' => '', 'rss_feed' => '', 'before_widget_content' => '', 'after_widget_content' => '' ); \n\n\t\tforeach( $instance as $key => $value ) { \n\t\t\tif ( is_string( $value ) ) {\n\t\t\t\t$instance[ $key ] = esc_attr( $value ); \n\t\t\t}\n\t\t}\n\n\t\t$instance = wp_parse_args( (array)$instance, $defaults ); \n\t\t?> \n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'before_widget_content' ); ?>\"><?php _e( 'Before widget content:', 'super-socializer' ); ?></label> \n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'before_widget_content' ); ?>\" name=\"<?php echo $this->get_field_name( 'before_widget_content' ); ?>\" type=\"text\" value=\"<?php echo $instance['before_widget_content']; ?>\" /><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e( 'Title', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" type=\"text\" value=\"<?php echo $instance['title']; ?>\" /><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'size' ); ?>\"><?php _e( 'Size of icons', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 82%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'size' ); ?>\" name=\"<?php echo $this->get_field_name( 'size' ); ?>\" type=\"text\" value=\"<?php echo $instance['size']; ?>\" />pixels<br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'icon_shape' ); ?>\"><?php _e( 'Icon Shape', 'super-socializer' ); ?></label> \n\t\t\t<select style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'icon_shape' ); ?>\" name=\"<?php echo $this->get_field_name( 'icon_shape' ); ?>\">\n\t\t\t\t<option value=\"round\" <?php echo !isset($instance['icon_shape']) || $instance['icon_shape'] == 'round' ? 'selected' : '' ; ?>><?php _e( 'Round', 'super-socializer' ); ?></option>\n\t\t\t\t<option value=\"square\" <?php echo isset($instance['icon_shape']) && $instance['icon_shape'] == 'square' ? 'selected' : '' ; ?>><?php _e( 'Square', 'super-socializer' ); ?></option>\n\t\t\t</select><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'facebook' ); ?>\"><?php _e( 'Facebook URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'facebook' ); ?>\" name=\"<?php echo $this->get_field_name( 'facebook' ); ?>\" type=\"text\" value=\"<?php echo $instance['facebook']; ?>\" /><br/>\n\t\t\t<span>https://www.facebook.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'twitter' ); ?>\"><?php _e( 'Twitter URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'twitter' ); ?>\" name=\"<?php echo $this->get_field_name( 'twitter' ); ?>\" type=\"text\" value=\"<?php echo $instance['twitter']; ?>\" /><br/>\n\t\t\t<span>https://twitter.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'parler' ); ?>\"><?php _e( 'Parler URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'parler' ); ?>\" name=\"<?php echo $this->get_field_name( 'parler' ); ?>\" type=\"text\" value=\"<?php echo $instance['parler']; ?>\" /><br/>\n\t\t\t<span>https://parler.com/profile/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'instagram' ); ?>\"><?php _e( 'Instagram URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'instagram' ); ?>\" name=\"<?php echo $this->get_field_name( 'instagram' ); ?>\" type=\"text\" value=\"<?php echo $instance['instagram']; ?>\" /><br/>\n\t\t\t<span>https://www.instagram.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'pinterest' ); ?>\"><?php _e( 'Pinterest URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'pinterest' ); ?>\" name=\"<?php echo $this->get_field_name( 'pinterest' ); ?>\" type=\"text\" value=\"<?php echo $instance['pinterest']; ?>\" /><br/>\n\t\t\t<span>https://www.pinterest.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'behance' ); ?>\"><?php _e( 'Behance URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'behance' ); ?>\" name=\"<?php echo $this->get_field_name( 'behance' ); ?>\" type=\"text\" value=\"<?php echo $instance['behance']; ?>\" /><br/>\n\t\t\t<span>https://www.behance.net/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'flickr' ); ?>\"><?php _e( 'Flickr URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'flickr' ); ?>\" name=\"<?php echo $this->get_field_name( 'flickr' ); ?>\" type=\"text\" value=\"<?php echo $instance['flickr']; ?>\" /><br/>\n\t\t\t<span>https://www.flickr.com/photos/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'foursquare' ); ?>\"><?php _e( 'Foursquare URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'foursquare' ); ?>\" name=\"<?php echo $this->get_field_name( 'foursquare' ); ?>\" type=\"text\" value=\"<?php echo $instance['foursquare']; ?>\" /><br/>\n\t\t\t<span>https://foursquare.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'github' ); ?>\"><?php _e( 'Github URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'github' ); ?>\" name=\"<?php echo $this->get_field_name( 'github' ); ?>\" type=\"text\" value=\"<?php echo $instance['github']; ?>\" /><br/>\n\t\t\t<span>https://github.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'linkedin' ); ?>\"><?php _e( 'LinkedIn URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'linkedin' ); ?>\" name=\"<?php echo $this->get_field_name( 'linkedin' ); ?>\" type=\"text\" value=\"<?php echo $instance['linkedin']; ?>\" /><br/>\n\t\t\t<span>https://www.linkedin.com/in/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'linkedin_company' ); ?>\"><?php _e( 'LinkedIn Company URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'linkedin_company' ); ?>\" name=\"<?php echo $this->get_field_name( 'linkedin_company' ); ?>\" type=\"text\" value=\"<?php echo $instance['linkedin_company']; ?>\" /><br/>\n\t\t\t<span>https://www.linkedin.com/company/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'medium' ); ?>\"><?php _e( 'Medium URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'medium' ); ?>\" name=\"<?php echo $this->get_field_name( 'medium' ); ?>\" type=\"text\" value=\"<?php echo $instance['medium']; ?>\" /><br/>\n\t\t\t<span>https://medium.com/@ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'mewe' ); ?>\"><?php _e( 'MeWe URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'mewe' ); ?>\" name=\"<?php echo $this->get_field_name( 'mewe' ); ?>\" type=\"text\" value=\"<?php echo $instance['mewe']; ?>\" /><br/>\n\t\t\t<span>https://mewe.com/profile/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'odnoklassniki' ); ?>\"><?php _e( 'Odnoklassniki URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'odnoklassniki' ); ?>\" name=\"<?php echo $this->get_field_name( 'odnoklassniki' ); ?>\" type=\"text\" value=\"<?php echo $instance['odnoklassniki']; ?>\" /><br/>\n\t\t\t<span>https://ok.ru/profile/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'snapchat' ); ?>\"><?php _e( 'Snapchat URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'snapchat' ); ?>\" name=\"<?php echo $this->get_field_name( 'snapchat' ); ?>\" type=\"text\" value=\"<?php echo $instance['snapchat']; ?>\" /><br/>\n\t\t\t<span>https://www.snapchat.com/add/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'telegram' ); ?>\"><?php _e( 'Telegram URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'telegram' ); ?>\" name=\"<?php echo $this->get_field_name( 'telegram' ); ?>\" type=\"text\" value=\"<?php echo $instance['telegram']; ?>\" /><br/>\n\t\t\t<span>https://t.me/username</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'tumblr' ); ?>\"><?php _e( 'Tumblr URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'tumblr' ); ?>\" name=\"<?php echo $this->get_field_name( 'tumblr' ); ?>\" type=\"text\" value=\"<?php echo $instance['tumblr']; ?>\" /><br/>\n\t\t\t<span>https://ID.tumblr.com</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'vimeo' ); ?>\"><?php _e( 'Vimeo URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'vimeo' ); ?>\" name=\"<?php echo $this->get_field_name( 'vimeo' ); ?>\" type=\"text\" value=\"<?php echo $instance['vimeo']; ?>\" /><br/>\n\t\t\t<span>https://vimeo.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'vkontakte' ); ?>\"><?php _e( 'Vkontakte URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'vkontakte' ); ?>\" name=\"<?php echo $this->get_field_name( 'vkontakte' ); ?>\" type=\"text\" value=\"<?php echo $instance['vkontakte']; ?>\" /><br/>\n\t\t\t<span>https://vk.com/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'xing' ); ?>\"><?php _e( 'Xing URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'xing' ); ?>\" name=\"<?php echo $this->get_field_name( 'xing' ); ?>\" type=\"text\" value=\"<?php echo $instance['xing']; ?>\" /><br/>\n\t\t\t<span>https://www.xing.com/profile/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'youtube' ); ?>\"><?php _e( 'Youtube URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'youtube' ); ?>\" name=\"<?php echo $this->get_field_name( 'youtube' ); ?>\" type=\"text\" value=\"<?php echo $instance['youtube']; ?>\" /><br/>\n\t\t\t<span>https://www.youtube.com/user/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'youtube_channel' ); ?>\"><?php _e( 'Youtube Channel URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'youtube_channel' ); ?>\" name=\"<?php echo $this->get_field_name( 'youtube_channel' ); ?>\" type=\"text\" value=\"<?php echo $instance['youtube_channel']; ?>\" /><br/>\n\t\t\t<span>https://www.youtube.com/channel/ID</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'rss_feed' ); ?>\"><?php _e( 'RSS Feed URL:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'rss_feed' ); ?>\" name=\"<?php echo $this->get_field_name( 'rss_feed' ); ?>\" type=\"text\" value=\"<?php echo $instance['rss_feed']; ?>\" /><br/>\n\t\t\t<span>http://www.example.com/feed/</span><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'after_widget_content' ); ?>\"><?php _e( 'After widget content:', 'super-socializer' ); ?></label> \n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'after_widget_content' ); ?>\" name=\"<?php echo $this->get_field_name( 'after_widget_content' ); ?>\" type=\"text\" value=\"<?php echo $instance['after_widget_content']; ?>\" /> \n\t\t</p> \n<?php \n }", "function form( $instance ) {\n\n\t\t/* Set up some default widget settings. */\n\t\t$defaults = array(\n\t\t\n\t\t 'title' => '',\n\t\t\n\t\t 'text_widget' => 'Collaboratively administrate empowered markets via plug-and-play networks. Dynamically procrastinate B2C users after installed base benefits. Dramatically visualize customer directed convergence without revolutionary ROI. Efficiently unleash cross-media information without cross-media value. Quickly maximize timely deliverables for real-time schemas.',\n\t\t\t\n\t\t\t'more_linkurl' => 'http://www.anariel.com/intune/bio/',\n\t\t\t'more_linktext' => 'Do you want to help us?'\n\t\t\n\t\t);\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n<!-- Widget Title: Text Input -->\n<p>\n <label for=\"<?php echo $this->get_field_id( 'title' ); ?>\">\n <?php _e('Title:', 'anariel') ?>\n </label>\n <input type=\"text\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" />\n</p>\n<hr>\n<p>\n <label for=\"<?php echo $this->get_field_id( 'text_widget' ); ?>\">\n <?php _e('Sponsors Text:', 'anariel') ?>\n </label>\n <textarea type=\"text\" id=\"<?php echo $this->get_field_id( 'text_widget' ); ?>\" name=\"<?php echo $this->get_field_name( 'text_widget' ); ?>\"><?php echo $instance['text_widget']; ?></textarea>\n</p>\n<hr>\n<p>\n <label for=\"<?php echo $this->get_field_id( 'more_linkurl' ); ?>\">\n <?php _e('Button link url:', 'anariel') ?>\n </label>\n <input type=\"text\" id=\"<?php echo $this->get_field_id( 'more_linkurl' ); ?>\" name=\"<?php echo $this->get_field_name( 'more_linkurl' ); ?>\" value=\"<?php echo $instance['more_linkurl']; ?>\" />\n</p>\n<hr>\n<p>\n <label for=\"<?php echo $this->get_field_id( 'more_linktext' ); ?>\">\n <?php _e('Button link text:', 'anariel') ?>\n </label>\n <input type=\"text\" id=\"<?php echo $this->get_field_id( 'more_linktext' ); ?>\" name=\"<?php echo $this->get_field_name( 'more_linktext' ); ?>\" value=\"<?php echo $instance['more_linktext']; ?>\" />\n</p>\n<?php\n\t}", "public function form( $instance ) {\n\t\t// Set widget defaults\n\t\t$defaults = array(\n\t\t\t'title' => 'remoteok.io Jobs',\n\t\t\t'page_size' => 10\n\t\t);\n\t\t\n\t\t// Parse current settings with defaults\n extract( wp_parse_args( ( array ) $instance, $defaults ) ); ?>\n \n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\"><?php _e( 'Widget Title', 'mtc_text' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $title ); ?>\" />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'page_size' ) ); ?>\"><?php _e( 'Page Size:', 'mtc_text' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'page_size' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'page_size' ) ); ?>\" type=\"number\" min=\"1\" value=\"<?php echo esc_attr( $page_size ); ?>\" />\n\t\t</p>\n\t<?php }", "public function form( $instance ) {\n\t\t// outputs the options form on admin\n\t\t$title \t= esc_attr( $instance['title'] );\n \t$videoId \t= esc_attr( $instance['videoId'] );\n \t$height \t = esc_attr( $instance['height'] );\n \t$width \t = esc_attr( $instance['width'] );\n \t?>\n \t<p>\n <label for=\"<?php echo $this->get_field_id('title'); ?>\"><?php _e('Title:'); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('title'); ?>\" name=\"<?php echo $this->get_field_name('title'); ?>\" type=\"text\" value=\"<?php echo $title; ?>\" />\n\t </p>\n\t <p>\n\t <label for=\"<?php echo $this->get_field_id('videoId'); ?>\"><?php _e('YouTube Video ID'); ?></label>\n\t <input class=\"widefat\" id=\"<?php echo $this->get_field_id('videoId'); ?>\" name=\"<?php echo $this->get_field_name('videoId'); ?>\" type=\"text\" value=\"<?php echo $videoId; ?>\"/>\n\t </p>\n <p>\n\t <label for=\"<?php echo $this->get_field_id('height'); ?>\"><?php _e('YouTube Video Height'); ?></label>\n\t <input class=\"widefat\" id=\"<?php echo $this->get_field_id('height'); ?>\" name=\"<?php echo $this->get_field_name('height'); ?>\" type=\"text\" value=\"<?php echo $height; ?>\"/>\n\t </p>\n <p>\n\t <label for=\"<?php echo $this->get_field_id('width'); ?>\"><?php _e('YouTube Video Width'); ?></label>\n\t <input class=\"widefat\" id=\"<?php echo $this->get_field_id('width'); ?>\" name=\"<?php echo $this->get_field_name('width'); ?>\" type=\"text\" value=\"<?php echo $width; ?>\"/>\n\t </p>\n\n\n\n\t <?php\n\t}", "function form( $instance ) {\n\n\t\t/* Set up some default widget settings. */\n\t\t$defaults = array( 'title' => __('Active Listing', 'example'), 'website' => __('http://yourwebsite.com', 'example'));\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n\t\t<!-- Widget Title: Text Input -->\n\t\t<p><?php _e('Title:', 'hybrid'); ?></label><br/><input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:250px;\" />\n\t\t</p>\n\n\t\t<!-- myRealPage Website URL -->\n\t\t<p><?php _e('Your myRealPage Website:', 'example'); ?><br/><input id=\"<?php echo $this->get_field_id( 'name' ); ?>\" name=\"<?php echo $this->get_field_name( 'website' ); ?>\" value=\"<?php echo $instance['website']; ?>\" style=\"width:250px\" />\n\t\t</p>\n\n\t<?php\n\t}", "public function dashboard_widget_control() {\n\t\tif ( !$widget_options = get_option( 'vfb_dashboard_widget_options' ) )\n\t\t\t$widget_options = array();\n\n\t\tif ( !isset( $widget_options['vfb_dashboard_recent_entries'] ) )\n\t\t\t$widget_options['vfb_dashboard_recent_entries'] = array();\n\n\t\tif ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST['vfb-widget-recent-entries'] ) ) {\n\t\t\t$number = absint( $_POST['vfb-widget-recent-entries']['items'] );\n\t\t\t$widget_options['vfb_dashboard_recent_entries']['items'] = $number;\n\t\t\tupdate_option( 'vfb_dashboard_widget_options', $widget_options );\n\t\t}\n\n\t\t$number = isset( $widget_options['vfb_dashboard_recent_entries']['items'] ) ? (int) $widget_options['vfb_dashboard_recent_entries']['items'] : '';\n\n\t\techo sprintf(\n\t\t\t'<p>\n\t\t\t<label for=\"comments-number\">%1$s</label>\n\t\t\t<input id=\"comments-number\" name=\"vfb-widget-recent-entries[items]\" type=\"text\" value=\"%2$d\" size=\"3\" />\n\t\t\t</p>',\n\t\t\t__( 'Number of entries to show:', 'visual-form-builder-pro' ),\n\t\t\t$number\n\t\t);\n\t}", "function form( $instance ) {\r\n\r\n\t\t/* Set up some default widget settings. */\r\n\t\t$defaults = array( 'title' => 'Recent Posts' );\r\n\t\t$instance = wp_parse_args( (array) $instance, $defaults );?>\r\n\t\t<!-- Widget Title: Text Input -->\r\n\t\t<p>\r\n\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'hybrid'); ?></label>\r\n\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:100%;\" />\r\n <p><label for=\"cat\">Select a category to display</label><?php wp_dropdown_categories( array('selected'=>$instance['category'], 'name'=>$this->get_field_name('category')) );?>\r\n\t\t</p>\r\n\r\n\t<?php\r\n\t}", "public function admin() {\n\t\tglobal $wpdb, $current_user;\n\n\t\tget_currentuserinfo();\n\n\t\t// Save current user ID\n\t\t$user_id = $current_user->ID;\n\n\t\t// Get the Form Order type settings, if any\n\t\t$user_form_order_type = get_user_meta( $user_id, 'vfb-form-order-type', true );\n\n\t\t$form_nav_selected_id = ( isset( $_REQUEST['form'] ) ) ? $_REQUEST['form'] : '0';\n\t?>\n\t<div class=\"wrap\">\n\t\t<h2>\n\t\t\t<?php _e( 'Visual Form Builder Pro', 'visual-form-builder-pro' ); ?>\n<?php\n\t\t\t// Add New link\n\t\t\techo sprintf( ' <a href=\"%1$s\" class=\"add-new-h2\">%2$s</a>', esc_url( admin_url( 'admin.php?page=vfb-add-new' ) ), esc_html( __( 'Add New', 'visual-form-builder-pro' ) ) );\n\n\t\t\t// If searched, output the query\n\t\t\tif ( isset( $_REQUEST['s'] ) && !empty( $_REQUEST['s'] ) )\n\t\t\t\techo '<span class=\"subtitle\">' . sprintf( __( 'Search results for \"%s\"' , 'visual-form-builder-pro'), $_REQUEST['s'] );\n?>\n\t\t</h2>\n<?php\n\t\t\t// Display form editor or the form list\n\t\t\tif ( isset( $_GET['form'] ) && 'edit' == $_GET['action'] ) :\n\t\t\t\tinclude_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/admin-form-creator.php' );\n\t\t\telse :\n?>\n\t\t\t<div id=\"vfb-form-list\">\n\t\t\t\t<div id=\"vfb-main\" class=\"vfb-order-type-<?php echo ( in_array( $user_form_order_type, array( 'order', '' ) ) ) ? 'order' : 'list'; ?>\">\n\t\t\t\t<?php $this->all_forms(); ?>\n\t\t\t\t</div> <!-- #vfb-main -->\n\t\t\t</div> <!-- #vfb-form-list -->\n<?php\n\t\t\tendif;\n?>\n\t</div>\n\t<?php\n\t}", "public function form( $instance ) { \n\t\t/* Set up default widget settings. */ \n\t\t$defaults = array( 'title' => 'Share the joy', 'before_widget_content' => '', 'after_widget_content' => '', 'target_url_custom' => '', 'target_url' => 'default' );\n\n\t\tforeach( $instance as $key => $value ) { \n\t\t\tif ( is_string( $value ) ) {\n\t\t\t\t$instance[ $key ] = esc_attr( $value ); \n\t\t\t}\n\t\t}\n\t\t\n\t\t$instance = wp_parse_args( (array)$instance, $defaults ); \n\t\t?> \n\t\t<script type=\"text/javascript\">\n\t\t\tfunction theChampToggleHorCounterTargetUrl(val){\n\t\t\t\tif(val == 'custom'){\n\t\t\t\t\tjQuery('.theChampHorCounterTargetUrl').css('display', 'block');\n\t\t\t\t}else{\n\t\t\t\t\tjQuery('.theChampHorCounterTargetUrl').css('display', 'none');\n\t\t\t\t}\n\t\t\t}\n\t\t</script>\n\t\t<p> \n\t\t\t<p><strong>Note:</strong> <?php _e('Make sure \"Standard Like Buttons\" are enabled from \"Super Socializer > Like Buttons\" page.', 'super-socializer') ?></p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e( 'Title:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" type=\"text\" value=\"<?php echo $instance['title']; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'target_url' ); ?>\"><?php _e( 'Target Url:', 'super-socializer' ); ?></label> \n\t\t\t<select style=\"width: 95%\" onchange=\"theChampToggleHorCounterTargetUrl(this.value)\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'target_url' ); ?>\" name=\"<?php echo $this->get_field_name( 'target_url' ); ?>\">\n\t\t\t\t<option value=\"\">--<?php _e('Select', 'super-socializer') ?>--</option>\n\t\t\t\t<option value=\"default\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'default' ? 'selected' : '' ; ?>>Url of the webpage where icons are located (default)</option>\n\t\t\t\t<option value=\"homepage\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'homepage' ? 'selected' : '' ; ?>>Url of the homepage of your website</option>\n\t\t\t\t<option value=\"custom\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'custom' ? 'selected' : '' ; ?>>Custom Url</option>\n\t\t\t</select>\n\t\t\t<input placeholder=\"Custom url\" style=\"width:95%; margin-top: 5px; <?php echo !isset($instance['target_url']) || $instance['target_url'] != 'custom' ? 'display: none' : '' ; ?>\" class=\"widefat theChampHorCounterTargetUrl\" id=\"<?php echo $this->get_field_id( 'target_url_custom' ); ?>\" name=\"<?php echo $this->get_field_name( 'target_url_custom' ); ?>\" type=\"text\" value=\"<?php echo isset($instance['target_url_custom']) ? $instance['target_url_custom'] : ''; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'before_widget_content' ); ?>\"><?php _e( 'Before widget content:', 'super-socializer' ); ?></label> \n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'before_widget_content' ); ?>\" name=\"<?php echo $this->get_field_name( 'before_widget_content' ); ?>\" type=\"text\" value=\"<?php echo $instance['before_widget_content']; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'after_widget_content' ); ?>\"><?php _e( 'After widget content:', 'super-socializer' ); ?></label> \n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'after_widget_content' ); ?>\" name=\"<?php echo $this->get_field_name( 'after_widget_content' ); ?>\" type=\"text\" value=\"<?php echo $instance['after_widget_content']; ?>\" /> \n\t\t\t<br /><br /><label for=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\"><?php _e( 'Hide for logged in users:', 'super-socializer' ); ?></label> \n\t\t\t<input type=\"checkbox\" id=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\" name=\"<?php echo $this->get_field_name( 'hide_for_logged_in' ); ?>\" type=\"text\" value=\"1\" <?php if(isset($instance['hide_for_logged_in']) && $instance['hide_for_logged_in']==1) echo 'checked=\"checked\"'; ?> /> \n\t\t</p> \n\t<?php \n }", "public function form( $instance ) { \n\t\t/* Set up default widget settings. */ \n\t\t$defaults = array('alignment' => 'left', 'left_offset' => '40', 'right_offset' => '0', 'top_offset' => '100', 'vertical_bg' => '', 'target_url' => 'default', 'target_url_custom' => '');\n\n\t\tforeach( $instance as $key => $value ) { \n\t\t\tif ( is_string( $value ) ) {\n\t\t\t\t$instance[ $key ] = esc_attr( $value ); \n\t\t\t}\n\t\t}\n\t\t\n\t\t$instance = wp_parse_args( (array)$instance, $defaults ); \n\t\t?> \n\t\t<p> \n\t\t\t<script>\n\t\t\tfunction theChampToggleCounterOffset(alignment){\n\t\t\t\tif(alignment == 'left'){\n\t\t\t\t\tjQuery('.theChampCounterLeftOffset').css('display', 'block');\n\t\t\t\t\tjQuery('.theChampCounterRightOffset').css('display', 'none');\n\t\t\t\t}else{\n\t\t\t\t\tjQuery('.theChampCounterLeftOffset').css('display', 'none');\n\t\t\t\t\tjQuery('.theChampCounterRightOffset').css('display', 'block');\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction theChampToggleVerticalCounterTargetUrl(val){\n\t\t\t\tif(val == 'custom'){\n\t\t\t\t\tjQuery('.theChampVerticalCounterTargetUrl').css('display', 'block');\n\t\t\t\t}else{\n\t\t\t\t\tjQuery('.theChampVerticalCounterTargetUrl').css('display', 'none');\n\t\t\t\t}\n\t\t\t}\n\t\t\t</script>\n\t\t<p> \n\t\t\t<p><strong>Note:</strong> <?php _e('Make sure \"Floating Like Buttons\" are enabled from \"Super Socializer > Like Buttons\" page.', 'super-socializer') ?></p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'target_url' ); ?>\"><?php _e( 'Target Url:', 'super-socializer' ); ?></label> \n\t\t\t<select style=\"width: 95%\" onchange=\"theChampToggleVerticalCounterTargetUrl(this.value)\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'target_url' ); ?>\" name=\"<?php echo $this->get_field_name( 'target_url' ); ?>\">\n\t\t\t\t<option value=\"\">--<?php _e('Select', 'super-socializer') ?>--</option>\n\t\t\t\t<option value=\"default\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'default' ? 'selected' : '' ; ?>>Url of the webpage where icons are located (default)</option>\n\t\t\t\t<option value=\"homepage\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'homepage' ? 'selected' : '' ; ?>>Url of the homepage of your website</option>\n\t\t\t\t<option value=\"custom\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'custom' ? 'selected' : '' ; ?>>Custom Url</option>\n\t\t\t</select>\n\t\t\t<input placeholder=\"Custom url\" style=\"width:95%; margin-top: 5px; <?php echo !isset($instance['target_url']) || $instance['target_url'] != 'custom' ? 'display: none' : '' ; ?>\" class=\"widefat theChampVerticalCounterTargetUrl\" id=\"<?php echo $this->get_field_id( 'target_url_custom' ); ?>\" name=\"<?php echo $this->get_field_name( 'target_url_custom' ); ?>\" type=\"text\" value=\"<?php echo isset($instance['target_url_custom']) ? $instance['target_url_custom'] : ''; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'alignment' ); ?>\"><?php _e( 'Alignment', 'super-socializer' ); ?></label> \n\t\t\t<select style=\"width: 95%\" onchange=\"theChampToggleCounterOffset(this.value)\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'alignment' ); ?>\" name=\"<?php echo $this->get_field_name( 'alignment' ); ?>\">\n\t\t\t\t<option value=\"left\" <?php echo $instance['alignment'] == 'left' ? 'selected' : ''; ?>><?php _e( 'Left', 'super-socializer' ) ?></option>\n\t\t\t\t<option value=\"right\" <?php echo $instance['alignment'] == 'right' ? 'selected' : ''; ?>><?php _e( 'Right', 'super-socializer' ) ?></option>\n\t\t\t</select>\n\t\t\t<div class=\"theChampCounterLeftOffset\" <?php echo $instance['alignment'] == 'right' ? 'style=\"display: none\"' : ''; ?>>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'left_offset' ); ?>\"><?php _e( 'Left Offset', 'super-socializer' ); ?></label> \n\t\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'left_offset' ); ?>\" name=\"<?php echo $this->get_field_name( 'left_offset' ); ?>\" type=\"text\" value=\"<?php echo $instance['left_offset']; ?>\" />px<br/>\n\t\t\t</div>\n\t\t\t<div class=\"theChampCounterRightOffset\" <?php echo $instance['alignment'] == 'left' ? 'style=\"display: none\"' : ''; ?>>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'right_offset' ); ?>\"><?php _e( 'Right Offset', 'super-socializer' ); ?></label> \n\t\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'right_offset' ); ?>\" name=\"<?php echo $this->get_field_name( 'right_offset' ); ?>\" type=\"text\" value=\"<?php echo $instance['right_offset']; ?>\" />px<br/>\n\t\t\t</div>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'top_offset' ); ?>\"><?php _e( 'Top Offset', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'top_offset' ); ?>\" name=\"<?php echo $this->get_field_name( 'top_offset' ); ?>\" type=\"text\" value=\"<?php echo $instance['top_offset']; ?>\" />px<br/>\n\t\t\t\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'vertical_bg' ); ?>\"><?php _e( 'Background Color', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'vertical_bg' ); ?>\" name=\"<?php echo $this->get_field_name( 'vertical_bg' ); ?>\" type=\"text\" value=\"<?php echo $instance['vertical_bg']; ?>\" />\n\t\t\t\n\t\t\t<br /><br /><label for=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\"><?php _e( 'Hide for logged in users:', 'super-socializer' ); ?></label> \n\t\t\t<input type=\"checkbox\" id=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\" name=\"<?php echo $this->get_field_name( 'hide_for_logged_in' ); ?>\" type=\"text\" value=\"1\" <?php if(isset($instance['hide_for_logged_in']) && $instance['hide_for_logged_in']==1) echo 'checked=\"checked\"'; ?> />\n\t\t</p> \n\t<?php \n }", "function form( $instance ) {\n\t\t$instance = wp_parse_args( (array) $instance, array( 'title' => 'Multi Twitter', 'users' => 'wrought thinkclay', 'terms' => 'wordpress, plos', 'user_limit' => 5, 'term_limit' => 5, 'result_limit' => 2, 'links' => 1, 'reply' => 1, 'hash' => 1, 'date' => 1, 'credits' => 1, 'styles' => 1 ) );\n\t\t// Output admin widget options form\n\t\t?>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('title'); ?>\">Widget Title: </label><br />\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id('title'); ?>\" name=\"<?php echo $this->get_field_name('title'); ?>\" value=\"<?php echo $instance['title']; ?>\" />\n\t\t</p>\n\t\t<p>\t\n\t\t\t<label for=\"<?php echo $this->get_field_id('users'); ?>\">Users: </label><br />\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id('users'); ?>\" name=\"<?php echo $this->get_field_name('users'); ?>\" value=\"<?php echo $instance['users']; ?>\" /><br />\n\t\t\t<small><em>enter accounts separated with a space</em></small>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('terms'); ?>\">Search Terms: </label><br />\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id('terms'); ?>\" name=\"<?php echo $this->get_field_name('terms'); ?>\" value=\"<?php echo $instance['terms']; ?>\" /><br />\n\t\t\t<small><em>enter search terms separated with a comma</em></small>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('user_limit'); ?>\">Limit user feed to: </label>\n\t\t\t<select id=\"<?php echo $this->get_field_id('user_limit'); ?>\" name=\"<?php echo $this->get_field_name('user_limit'); ?>\">\t\t\t\t<option value=\"<?php echo $instance['user_limit']; ?>\"><?php echo $instance['user_limit']; ?></option>\n\t\t\t\t<option value=\"1\">1</option>\n\t\t\t\t<option value=\"2\">2</option>\n\t\t\t\t<option value=\"3\">3</option>\n\t\t\t\t<option value=\"4\">4</option>\n\t\t\t\t<option value=\"5\">5</option>\n\t\t\t\t<option value=\"6\">6</option>\n\t\t\t\t<option value=\"7\">7</option>\n\t\t\t\t<option value=\"8\">8</option>\n\t\t\t\t<option value=\"9\">9</option>\n\t\t\t\t<option value=\"10\">10</option>\n\t\t\t</select>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('term_limit'); ?>\">Limit search terms to: </label>\n\t\t\t<select id=\"<?php echo $this->get_field_id('term_limit'); ?>\" name=\"<?php echo $this->get_field_name('term_limit'); ?>\">\n\t\t\t\t<option value=\"<?php echo $instance['term_limit']; ?>\"><?php echo $instance['term_limit']; ?></option>\n\t\t\t\t<option value=\"1\">1</option>\n\t\t\t\t<option value=\"2\">2</option>\n\t\t\t\t<option value=\"3\">3</option>\n\t\t\t\t<option value=\"4\">4</option>\n\t\t\t\t<option value=\"5\">5</option>\n\t\t\t\t<option value=\"6\">6</option>\n\t\t\t\t<option value=\"7\">7</option>\n\t\t\t\t<option value=\"8\">8</option>\n\t\t\t\t<option value=\"9\">9</option>\n\t\t\t\t<option value=\"10\">10</option>\n\t\t\t</select>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('result_limit'); ?>\">Limit search results to: </label>\n\t\t\t<select id=\"<?php echo $this->get_field_id('result_limit'); ?>\" name=\"<?php echo $this->get_field_name('result_limit'); ?>\">\n\t\t\t\t<option value=\"<?php echo $instance['result_limit']; ?>\"><?php echo $instance['result_limit']; ?></option>\n\t\t\t\t<option value=\"1\">1</option>\n\t\t\t\t<option value=\"2\">2</option>\n\t\t\t\t<option value=\"3\">3</option>\n\t\t\t\t<option value=\"4\">4</option>\n\t\t\t\t<option value=\"5\">5</option>\n\t\t\t\t<option value=\"6\">6</option>\n\t\t\t\t<option value=\"7\">7</option>\n\t\t\t\t<option value=\"8\">8</option>\n\t\t\t\t<option value=\"9\">9</option>\n\t\t\t\t<option value=\"10\">10</option>\n\t\t\t</select>\n\t\t<br />\n\t\t<small><em>Limits number of results for each term.</em></small>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('links'); ?>\">Automatically convert links?</label>\n\t\t\t<input type=\"checkbox\" name=\"<?php echo $this->get_field_name('links'); ?>\" id=\"<?php echo $this->get_field_id('links'); ?>\" <?php if ($instance['links']) echo 'checked=\"checked\"'; ?> />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('reply'); ?>\">Automatically convert @replies?</label>\n\t\t\t<input type=\"checkbox\" name=\"<?php echo $this->get_field_name('reply'); ?>\" id=\"<?php echo $this->get_field_id('reply'); ?>\" <?php if ($instance['reply']) echo 'checked=\"checked\"'; ?> />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('hash'); ?>\">Automatically convert #hashtags?</label>\n\t\t\t<input type=\"checkbox\" name=\"<?php echo $this->get_field_name('hash'); ?>\" id=\"<?php echo $this->get_field_id('hash'); ?>\" <?php if ($instance['hash']) echo 'checked=\"checked\"'; ?> />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('date'); ?>\">Show Date?</label>\n\t\t\t<input type=\"checkbox\" name=\"<?php echo $this->get_field_name('date'); ?>\" id=\"<?php echo $this->get_field_id('date'); ?>\" <?php if ($instance['date']) echo 'checked=\"checked\"'; ?> />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('credits'); ?>\">Show Credits?</label>\n\t\t\t<input type=\"checkbox\" name=\"<?php echo $this->get_field_name('credits'); ?>\" id=\"<?php echo $this->get_field_id('credits'); ?>\" <?php if ($instance['credits']) echo 'checked=\"checked\"'; ?> />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('styles'); ?>\">Use Default Styles?</label>\n\t\t\t<input type=\"checkbox\" name=\"<?php echo $this->get_field_name('styles'); ?>\" id=\"<?php echo $this->get_field_id('styles'); ?>\" <?php if ($instance['styles']) echo 'checked=\"checked\"'; ?> />\n\t\t</p>\n\t\t<?php\n\t}", "public function form( $instance ) {\n\n\t\t$instance = $this->adapt_settings( $instance );\n\n\t\t$title = isset( $instance['widget_title'] ) ? $instance['widget_title'] : '';\n\n\t\t$link_type = isset( $instance['widget_link_type'] ) ? $instance['widget_link_type'] : '';\n\n\t\t$display_flag = ! empty( $instance['widget_display_flag'] );\n\n\t\t$show_current_blog = ! empty( $instance['widget_show_current_blog'] );\n\n\t\t$show_widget = ! empty( $instance['widget_toggle_view_on_translated_posts'] );\n\t\t?>\n\t\t<p>\n\t\t\t<?php\n\t\t\t$id = $this->get_field_id( 'mlp_widget_title' );\n\n\t\t\t$name = $this->get_field_name( 'mlp_widget_title' );\n\t\t\t?>\n\t\t\t<label for=\"<?php echo esc_attr( $id ); ?>\">\n\t\t\t\t<?php esc_html_e( 'Title', 'multilingual-press' ); ?>\n\t\t\t</label><br>\n\t\t\t<input type=\"text\" name=\"<?php echo esc_attr( $name ); ?>\" value=\"<?php echo esc_attr( $title ); ?>\"\n\t\t\t\tclass=\"widefat\" id=\"<?php echo esc_attr( $id ); ?>\">\n\t\t</p>\n\t\t<p>\n\t\t\t<?php\n\t\t\t$id = $this->get_field_id( 'mlp_widget_link_type' );\n\n\t\t\t$name = $this->get_field_name( 'mlp_widget_link_type' );\n\n\t\t\t$options = array(\n\t\t\t\t'native' => __( 'Native name', 'multilingual-press' ),\n\t\t\t\t'text' => __( 'Custom name', 'multilingual-press' ),\n\t\t\t\t'english' => __( 'English name', 'multilingual-press' ),\n\t\t\t\t'http' => __( 'Language code', 'multilingual-press' ),\n\t\t\t\t'language_short' => __( 'Language code (short)', 'multilingual-press' ),\n\t\t\t\t'none' => __( 'None', 'multilingual-press' ),\n\t\t\t);\n\t\t\t?>\n\t\t\t<label for=\"<?php echo esc_attr( $id ); ?>\">\n\t\t\t\t<?php esc_html_e( 'Link text', 'multilingual-press' ); ?>\n\t\t\t</label>\n\t\t\t<select name=\"<?php echo esc_attr( $name ); ?>\" class=\"widefat\" id=\"<?php echo esc_attr( $id ); ?>\"\n\t\t\t\tautocomplete=\"off\">\n\t\t\t\t<?php foreach ( $options as $value => $text ) : ?>\n\t\t\t\t\t<option value=\"<?php echo esc_attr( $value ); ?>\"<?php selected( $value, $link_type ); ?>>\n\t\t\t\t\t\t<?php echo esc_html( $text ); ?>\n\t\t\t\t\t</option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</select>\n\t\t</p>\n\t\t<p>\n\t\t\t<?php\n\t\t\t$id = $this->get_field_id( 'mlp_widget_display_flag' );\n\n\t\t\t$name = $this->get_field_name( 'mlp_widget_display_flag' );\n\t\t\t?>\n\t\t\t<label for=\"<?php echo esc_attr( $id ); ?>\">\n\t\t\t\t<input type=\"checkbox\" name=\"<?php echo esc_attr( $name ); ?>\" value=\"1\"\n\t\t\t\t\tid=\"<?php echo esc_attr( $id ); ?>\"<?php checked( $display_flag ); ?>>\n\t\t\t\t<?php esc_html_e( 'Show flag', 'multilingual-press' ); ?>\n\t\t\t</label>\n\t\t</p>\n\t\t<p>\n\t\t\t<?php\n\t\t\t$id = $this->get_field_id( 'mlp_widget_show_current_blog' );\n\n\t\t\t$name = $this->get_field_name( 'mlp_widget_show_current_blog' );\n\t\t\t?>\n\t\t\t<label for=\"<?php echo esc_attr( $id ); ?>\">\n\t\t\t\t<input type=\"checkbox\" name=\"<?php echo esc_attr( $name ); ?>\" value=\"1\"\n\t\t\t\t\tid=\"<?php echo esc_attr( $id ); ?>\"<?php checked( $show_current_blog ); ?>>\n\t\t\t\t<?php esc_html_e( 'Show current site', 'multilingual-press' ); ?>\n\t\t\t</label>\n\t\t</p>\n\t\t<p>\n\t\t\t<?php\n\t\t\t$id = $this->get_field_id( 'mlp_widget_toggle_view_on_translated_posts' );\n\n\t\t\t$name = $this->get_field_name( 'mlp_widget_toggle_view_on_translated_posts' );\n\t\t\t?>\n\t\t\t<label for=\"<?php echo esc_attr( $id ); ?>\">\n\t\t\t\t<input type=\"checkbox\" name=\"<?php echo esc_attr( $name ); ?>\" value=\"1\"\n\t\t\t\t\tid=\"<?php echo esc_attr( $id ); ?>\"<?php checked( $show_widget ); ?>>\n\t\t\t\t<?php esc_html_e( 'Show links for translated content only.', 'multilingual-press' ); ?>\n\t\t\t</label>\n\t\t</p>\n\t\t<p>\n\t\t\t<?php if ( current_user_can( 'manage_network_options' ) ) : ?>\n\t\t\t\t<?php\n\t\t\t\t$message = sprintf(\n\t\t\t\t\t__( 'Languages are sorted by <a href=\"%s\">priority</a>.', 'multilingual-press' ),\n\t\t\t\t\tnetwork_admin_url( 'settings.php?page=language-manager' )\n\t\t\t\t);\n\t\t\t\t$tags = array(\n\t\t\t\t\t'a' => array(\n\t\t\t\t\t\t'href' => true,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\techo wp_kses( $message, $tags );\n\t\t\t\t?>\n\t\t\t<?php else : ?>\n\t\t\t\t<?php esc_html_e( 'Languages are sorted by priority.', 'multilingual-press' ); ?>\n\t\t\t<?php endif; ?>\n\t\t</p>\n\t\t<?php\n\t}", "function form( $instance ) {\n\n\t\t/* Set up some default widget settings. */\n\t\t$defaults = array(\n\t\t\n\t\t 'title' => '',\n\t\t\n\t\t 'text_widget' => '<strong>4 Children</strong> is charitable organization dedicated to the children.',\n\t\t\t'textone_widget' => 'Organization is estamblish in early 1985. Proactively envisioned multimedia based expertise and cross-media growth strategies.',\n\t\t\t'texttwo_widget' => 'Seamlessly visualize quality intellectual capital without superior collaboration and idea-sharing. Holistically pontificate installed base portals after maintainable products.'\n\t\t\n\t\t);\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n<!-- Widget Title: Text Input -->\n<p>\n <label for=\"<?php echo $this->get_field_id( 'title' ); ?>\">\n <?php _e('Title:', 'anariel') ?>\n </label>\n <input type=\"text\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" />\n</p>\n<hr>\n<p>\n <label for=\"<?php echo $this->get_field_id( 'text_widget' ); ?>\">\n <?php _e('First Sentence:', 'anariel') ?>\n </label>\n <textarea type=\"text\" id=\"<?php echo $this->get_field_id( 'text_widget' ); ?>\" name=\"<?php echo $this->get_field_name( 'text_widget' ); ?>\"><?php echo $instance['text_widget']; ?></textarea>\n</p>\n<p>\n <label for=\"<?php echo $this->get_field_id( 'textone_widget' ); ?>\">\n <?php _e('Second Sentence:', 'anariel') ?>\n </label>\n <textarea type=\"text\" id=\"<?php echo $this->get_field_id( 'textone_widget' ); ?>\" name=\"<?php echo $this->get_field_name( 'textone_widget' ); ?>\"><?php echo $instance['textone_widget']; ?></textarea>\n</p>\n<p>\n <label for=\"<?php echo $this->get_field_id( 'texttwo_widget' ); ?>\">\n <?php _e('Third Sentence:', 'anariel') ?>\n </label>\n <textarea type=\"text\" id=\"<?php echo $this->get_field_id( 'texttwo_widget' ); ?>\" name=\"<?php echo $this->get_field_name( 'texttwo_widget' ); ?>\"><?php echo $instance['texttwo_widget']; ?></textarea>\n</p>\n\n<?php\n\t}", "function form( $instance ) {\r\n\t\t?>\r\n\r\n\t\t<!-- Widget Title: Text Input -->\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:'); ?></label>\r\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:80%;\" />\r\n\t\t</p>\r\n\r\n\t\t\r\n\r\n\t\t<?php\r\n\t}", "function form( $instance ) {\n\n /* Set up some default widget settings. */\n $defaults = array( \n 'title' => __('', 'hybrid'), \n 'post_count' => __('4', 'hybrid')\n );\n $instance = wp_parse_args( (array) $instance, $defaults );?>\n \n\n <!-- Widget Title: Text Input -->\n <p>\n <label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'hybrid'); ?></label>\n <input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:100%;\" />\n </p>\n\n <!-- Sponsor image url: Text Input -->\n <p>\n <label for=\"<?php echo $this->get_field_id( 'post_count' ); ?>\"><?php _e('Show Post Count:', 'hybrid'); ?></label>\n <input id=\"<?php echo $this->get_field_id( 'post_count' ); ?>\" name=\"<?php echo $this->get_field_name( 'post_count' ); ?>\" value=\"<?php echo $instance['post_count']; ?>\" style=\"width:100%;\" />\n </p>\n \n <?php\n }", "public function dashboard_widget_control() {\n if (!$widget_options = get_option('swpm_dashboard_widget_options'))\n $widget_options = array();\n\n if (!isset($widget_options['swpm_dashboard_recent_entries']))\n $widget_options['swpm_dashboard_recent_entries'] = array();\n\n if ('POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['swpm-widget-recent-entries'])) {\n $number = absint($_POST['swpm-widget-recent-entries']['items']);\n $widget_options['swpm_dashboard_recent_entries']['items'] = $number;\n update_option('swpm_dashboard_widget_options', $widget_options);\n }\n\n $number = isset($widget_options['swpm_dashboard_recent_entries']['items']) ? (int) $widget_options['swpm_dashboard_recent_entries']['items'] : '';\n\n echo sprintf(\n '<p>\n\t\t\t<label for=\"comments-number\">%1$s</label>\n\t\t\t<input id=\"comments-number\" name=\"swpm-widget-recent-entries[items]\" type=\"text\" value=\"%2$d\" size=\"3\" />\n\t\t\t</p>', __('Number of entries to show:', 'swpm-form-builder'), $number\n );\n }", "protected function form()\n {\n return Admin::form(AreaPriceLog::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }", "public function admin_render()\n {\n $output = $this->admin_form_before();\n $output .= $this->admin_form_start();\n $output .= $this->default_fields();\n $widget_saved_values = $this->get_settings();\n\n $output .= $this->admin_language_tab(); //have to start language tab from here on\n $output .= $this->admin_language_tab_start();\n\n $all_languages = LanguageHelper::all_languages();\n foreach ($all_languages as $key => $lang) {\n $output .= $this->admin_language_tab_content_start([\n 'class' => $key == 0 ? 'tab-pane fade show active' : 'tab-pane fade',\n 'id' => \"nav-home-\" . $lang->slug\n ]);\n $output .= Text::get([\n 'name' => 'title_'.$lang->slug,\n 'label' => __('Title'),\n 'value' => $widget_saved_values['title_' . $lang->slug] ?? null,\n ]);\n $output .= $this->admin_language_tab_content_end();\n }\n\n $output .= $this->admin_language_tab_end(); //have to end language tab\n\n $output .= Repeater::get([\n 'multi_lang' => true,\n 'settings' => $widget_saved_values,\n 'id' => 'contact_page_contact_info_01',\n 'fields' => [\n [\n 'type' => RepeaterField::TEXT,\n 'name' => 'title',\n 'label' => __('Title')\n ],\n [\n 'type' => RepeaterField::TEXTAREA,\n 'name' => 'description',\n 'label' => __('Details'),\n 'info' => __('new line count as a separate text')\n ],\n [\n 'type' => RepeaterField::ICON_PICKER,\n 'name' => 'icon',\n 'label' => __('Icon')\n ]\n ]\n ]);\n $output .= Select::get([\n 'name' => 'custom_form_id',\n 'label' => __('Custom Form'),\n 'placeholder' => __('Select form'),\n 'options' => FormBuilder::all()->pluck('title','id')->toArray(),\n 'value' => $widget_saved_values['custom_form_id'] ?? []\n ]);\n $output .= Slider::get([\n 'name' => 'padding_top',\n 'label' => __('Padding Top'),\n 'value' => $widget_saved_values['padding_top'] ?? 120,\n 'max' => 500,\n ]);\n $output .= Slider::get([\n 'name' => 'padding_bottom',\n 'label' => __('Padding Bottom'),\n 'value' => $widget_saved_values['padding_bottom'] ?? 120,\n 'max' => 500,\n ]);\n $output .= $this->admin_form_submit_button();\n $output .= $this->admin_form_end();\n $output .= $this->admin_form_after();\n\n return $output;\n }", "function form($instance) {\n\t\t\n\t\tfor ($i = 0; $i < count($this->widget_fields); $i++) :\n\t\t\t$field_id = $this->widget_fields[$i]['id'];\n\t\t\t$this->widget_fields[$i]['field_id'] = $this->get_field_id($field_id);\n\t\t\t$this->widget_fields[$i]['field_name'] = $this->get_field_name($field_id);\n\t\tendfor;\n\t\tproper_widget_output_fields($this->widget_fields, $instance);\n\n\t}", "function cbstdsys_render_form() {\n\t?>\n\t<div class=\"wrap\">\n\n\t\t<!-- Display Plugin Icon, Header, and Description -->\n\t\t<div class=\"icon32\" id=\"icon-options-general\"><br></div>\n\t\t<h2><span style=\"font-family:Consolas,Monaco,Courier,monospace\">cb-std-sys</span>-<?php _e('Settings'); ?>, Version <?php echo CB_STD_SYS_VERSION; ?></h2>\n\n\t\t<!-- Beginning of the Plugin Options Form -->\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields('cbstdsys_plugin_options'); ?>\n\n<!--\n <fieldset>\n <legend><?php _e('Content','cb-std-sys'); ?></legend>\n\n \t\t\t<table class=\"form-table\">\n-->\n<?php render_form_fields( get_cbstdsys_options(), 'cbstdsys', 'cbstdsys_options' ); ?>\n<!--\n </table>\n\n </fieldset>\n-->\n\t\t\t<p class=\"submit\">\n\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n\t\t\t</p>\n\n\t\t</form>\n\n\t</div>\n\t<?php\n}", "public function form()\n\t{\n\t\tglobal $L;\n\n\t\t$html = '<div class=\"mb-3\">';\n\t\t$html .= '<label class=\"form-label\" for=\"label\">' . $L->get('Label') . '</label>';\n\t\t$html .= '<input class=\"form-control\" id=\"label\" name=\"label\" type=\"text\" value=\"' . $this->getValue('label') . '\">';\n\t\t$html .= '<div class=\"form-text\">' . $L->get('This title is almost always used in the sidebar of the site') . '</div>';\n\t\t$html .= '</div>';\n\n\t\tif (defined('BLUDIT_PRO')) {\n\t\t\t$html .= '<div class=\"mb-3\">';\n\t\t\t$html .= '<label class=\"form-label\" for=\"excludeAdmins\">' . $L->get('Exclude administrators users') . '</label>';\n\t\t\t$html .= '<select class=\"form-select\" id=\"excludeAdmins\" name=\"excludeAdmins\">';\n\t\t\t$html .= '<option value=\"true\" ' . ($this->getValue('excludeAdmins') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';\n\t\t\t$html .= '<option value=\"false\" ' . ($this->getValue('excludeAdmins') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';\n\t\t\t$html .= '</select>';\n\t\t\t$html .= '</div>';\n\t\t}\n\n\t\treturn $html;\n\t}", "public function form( $instance ) {\n\t\t?><p>This widget has no settings.</p><?php\n\t}", "protected function form()\n {\n // return Admin::form(Campaign_setting_form::class, function (Form $form) {\n // });\n }", "public function form( $instance ) {\n\t\t// outputs the options form on admin\n\t\t\n $title = ! empty( $instance['title'] ) ? $instance['title'] : '';\n $usernames = ! empty( $instance['usernames'] ) ? $instance['usernames'] : '';\n $output = '';\n \n if(isset($instance['error'])){\n $output .= '<p>'.$instance['error'].'</p>';\n }\n \n $output .= '<p><label for=\"'.$this->get_field_id('title').'\">Title:</label><br>';\n $output .= '<input type=\"text\" id=\"'.$this->get_field_id('title').'\" name=\"'.$this->get_field_name('title').'\" value=\"'.esc_attr($title).'\" /></p>';\n \n $output .= '<p><label for=\"'.$this->get_field_id('usernames').'\">Twitter Usernames:</label><br>';\n $output .= '<input type=\"text\" id=\"'.$this->get_field_id('usernames').'\" name=\"'.$this->get_field_name('usernames').'\" value=\"'.esc_attr($usernames).'\" />';\n $output .= '<br><small>Enter a comma-separated list of own accounts.</small></p>';\n \n\t\techo $output;\n\t\t\n\t}", "function form( $instance ) {\n\t\t$defaults = array( 'title' => 'Title', 'tags' => '', 'showcat' => 'on', 'number' => 5 );\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\t\t<!-- Widget Title: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\">Title:</label>\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:90%;\" />\n\t\t</p>\n\t\t<!-- Category -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('categories'); ?>\">Select category:</label>\n\t\t\t<select id=\"<?php echo $this->get_field_id('categories'); ?>\" name=\"<?php echo $this->get_field_name('categories'); ?>\" style=\"width:100%;\">\n\t\t\t\t<option value='all' <?php if ('all' == $instance['categories']) echo 'selected=\"selected\"'; ?>>All Categories</option>\n\t\t\t\t<?php $categories = get_categories('hide_empty=0&depth=1&type=post'); ?>\n\t\t\t\t<?php foreach($categories as $category) { ?>\n\t\t\t\t<option value='<?php echo $category->term_id; ?>' <?php if ($category->term_id == $instance['categories']) echo 'selected=\"selected\"'; ?>><?php echo $category->cat_name; ?></option>\n\t\t\t\t<?php } ?>\n\t\t\t</select>\n\t\t</p>\n <!-- Tag -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'tags' ); ?>\">Tag Name:</label>\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'tags' ); ?>\" name=\"<?php echo $this->get_field_name( 'tags' ); ?>\" value=\"<?php echo $instance['tags']; ?>\" style=\"width:90%;\" />\n\t\t</p>\n\t<?php\n\t}", "function form( $instance ) {\n\n require( 'src/widget-fields.php' );\n }", "function miracle_in_widget_form_extend($widget, $return, $instance)\n {\n $this->miracle_add_visibility_fields($widget, $instance);\n $this->miracle_add_style_fields($widget, $instance);\n echo '<div class=\"clear\"></div>';\n\n }", "public function form( $instance ) { \n\t\t/* Set up default widget settings. */ \n\t\t$defaults = array('alignment' => 'left', 'show_counts' => '', 'total_shares' => '', 'left_offset' => '40', 'right_offset' => '0', 'target_url' => 'default', 'target_url_custom' => '', 'top_offset' => '100', 'vertical_bg' => '', 'hide_for_logged_in' => '');\n\n\t\tforeach( $instance as $key => $value ) { \n\t\t\tif ( is_string( $value ) ) {\n\t\t\t\t$instance[ $key ] = esc_attr( $value ); \n\t\t\t}\n\t\t}\n\t\t\n\t\t$instance = wp_parse_args( (array)$instance, $defaults ); \n\t\t?> \n\t\t<p> \n\t\t\t<script>\n\t\t\tfunction theChampToggleSharingOffset(alignment){\n\t\t\t\tif(alignment == 'left'){\n\t\t\t\t\tjQuery('.theChampSharingLeftOffset').css('display', 'block');\n\t\t\t\t\tjQuery('.theChampSharingRightOffset').css('display', 'none');\n\t\t\t\t}else{\n\t\t\t\t\tjQuery('.theChampSharingLeftOffset').css('display', 'none');\n\t\t\t\t\tjQuery('.theChampSharingRightOffset').css('display', 'block');\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction theChampToggleVerticalSharingTargetUrl(val){\n\t\t\t\tif(val == 'custom'){\n\t\t\t\t\tjQuery('.theChampVerticalSharingTargetUrl').css('display', 'block');\n\t\t\t\t}else{\n\t\t\t\t\tjQuery('.theChampVerticalSharingTargetUrl').css('display', 'none');\n\t\t\t\t}\n\t\t\t}\n\t\t\t</script>\n\t\t\t<p><strong>Note:</strong> <?php _e('Make sure \"Floating Social Sharing\" is enabled at \"Super Socializer > Social Sharing\" page.', 'super-socializer') ?></p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'show_counts' ); ?>\"><?php _e( 'Show individual share counts:', 'super-socializer' ); ?></label>\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'show_counts' ); ?>\" name=\"<?php echo $this->get_field_name( 'show_counts' ); ?>\" type=\"checkbox\" value=\"1\" <?php echo isset($instance['show_counts']) && $instance['show_counts'] == 1 ? 'checked' : ''; ?> /><br/><br/> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'total_shares' ); ?>\"><?php _e( 'Show total shares:', 'super-socializer' ); ?></label> \n\t\t\t<input id=\"<?php echo $this->get_field_id( 'total_shares' ); ?>\" name=\"<?php echo $this->get_field_name( 'total_shares' ); ?>\" type=\"checkbox\" value=\"1\" <?php echo isset($instance['total_shares']) && $instance['total_shares'] == 1 ? 'checked' : ''; ?> /><br/> <br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'target_url' ); ?>\"><?php _e( 'Target Url:', 'super-socializer' ); ?></label> \n\t\t\t<select style=\"width: 95%\" onchange=\"theChampToggleVerticalSharingTargetUrl(this.value)\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'target_url' ); ?>\" name=\"<?php echo $this->get_field_name( 'target_url' ); ?>\">\n\t\t\t\t<option value=\"\">--<?php _e('Select', 'super-socializer') ?>--</option>\n\t\t\t\t<option value=\"default\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'default' ? 'selected' : '' ; ?>>Url of the webpage where icons are located (default)</option>\n\t\t\t\t<option value=\"homepage\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'homepage' ? 'selected' : '' ; ?>>Url of the homepage of your website</option>\n\t\t\t\t<option value=\"custom\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'custom' ? 'selected' : '' ; ?>>Custom Url</option>\n\t\t\t</select>\n\t\t\t<input placeholder=\"Custom url\" style=\"width:95%; margin-top: 5px; <?php echo !isset($instance['target_url']) || $instance['target_url'] != 'custom' ? 'display: none' : '' ; ?>\" class=\"widefat theChampVerticalSharingTargetUrl\" id=\"<?php echo $this->get_field_id( 'target_url_custom' ); ?>\" name=\"<?php echo $this->get_field_name( 'target_url_custom' ); ?>\" type=\"text\" value=\"<?php echo isset($instance['target_url_custom']) ? $instance['target_url_custom'] : ''; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'alignment' ); ?>\"><?php _e( 'Alignment', 'super-socializer' ); ?></label> \n\t\t\t<select onchange=\"theChampToggleSharingOffset(this.value)\" style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'alignment' ); ?>\" name=\"<?php echo $this->get_field_name( 'alignment' ); ?>\">\n\t\t\t\t<option value=\"left\" <?php echo $instance['alignment'] == 'left' ? 'selected' : ''; ?>><?php _e( 'Left', 'super-socializer' ) ?></option>\n\t\t\t\t<option value=\"right\" <?php echo $instance['alignment'] == 'right' ? 'selected' : ''; ?>><?php _e( 'Right', 'super-socializer' ) ?></option>\n\t\t\t</select>\n\t\t\t<div class=\"theChampSharingLeftOffset\" <?php echo $instance['alignment'] == 'right' ? 'style=\"display: none\"' : ''; ?>>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'left_offset' ); ?>\"><?php _e( 'Left Offset', 'super-socializer' ); ?></label> \n\t\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'left_offset' ); ?>\" name=\"<?php echo $this->get_field_name( 'left_offset' ); ?>\" type=\"text\" value=\"<?php echo $instance['left_offset']; ?>\" />px<br/>\n\t\t\t</div>\n\t\t\t<div class=\"theChampSharingRightOffset\" <?php echo $instance['alignment'] == 'left' ? 'style=\"display: none\"' : ''; ?>>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'right_offset' ); ?>\"><?php _e( 'Right Offset', 'super-socializer' ); ?></label> \n\t\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'right_offset' ); ?>\" name=\"<?php echo $this->get_field_name( 'right_offset' ); ?>\" type=\"text\" value=\"<?php echo $instance['right_offset']; ?>\" />px<br/>\n\t\t\t</div>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'top_offset' ); ?>\"><?php _e( 'Top Offset', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'top_offset' ); ?>\" name=\"<?php echo $this->get_field_name( 'top_offset' ); ?>\" type=\"text\" value=\"<?php echo $instance['top_offset']; ?>\" />px<br/>\n\t\t\t\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'vertical_bg' ); ?>\"><?php _e( 'Background Color', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'vertical_bg' ); ?>\" name=\"<?php echo $this->get_field_name( 'vertical_bg' ); ?>\" type=\"text\" value=\"<?php echo $instance['vertical_bg']; ?>\" />\n\t\t\t\n\t\t\t<br /><br /><label for=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\"><?php _e( 'Hide for logged in users:', 'super-socializer' ); ?></label> \n\t\t\t<input type=\"checkbox\" id=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\" name=\"<?php echo $this->get_field_name( 'hide_for_logged_in' ); ?>\" type=\"text\" value=\"1\" <?php if(isset($instance['hide_for_logged_in']) && $instance['hide_for_logged_in']==1) echo 'checked=\"checked\"'; ?> /> \n\t\t</p> \n\t<?php \n }", "function form( $instance ) {\n\n\t\t// Setup the default values for the widget\n\t\t$defaults = array(\n\t\t\t'title' => __( 'Videos', 'madeleine' ),\n\t\t\t'total' => 6,\n\t\t);\n\t\t\n\t\t$instance = wp_parse_args( (array) $instance, $defaults );\n\t\t// Possible options for the select menu\n\t\t$total_values = array(3, 5, 7);\n\t\t\n\t\t?>\n\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e( 'Title:', 'madeleine' ) ?></label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\">\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t\t<?php _e( 'Display a total of', 'madeleine' ) ?>\n\t\t\t<select id=\"<?php echo $this->get_field_id( 'total' ); ?>\" name=\"<?php echo $this->get_field_name( 'total' ); ?>\">\n\t\t\t\t<?php\n\t\t\t\tforeach ( $total_values as $value ):\n\t\t\t\t\techo '<option value=\"' . $value . '\"';\n\t\t\t\t\tif ( $value == $instance['total'] )\n\t\t\t\t\t\techo ' selected=\"selected\"';\n\t\t\t\t\techo '\">' . $value . '</option>';\n\t\t\t\tendforeach;\n\t\t\t\t?>\n\t\t\t</select>\n\t\t\tvideos\n\t\t</p>\n\t\t\t\n\t\t<?php\n\t}", "public function form( $instance ) { \n\t\t/* Set up default widget settings. */ \n\t\t$defaults = array( 'title' => 'Share the joy', 'show_counts' => '', 'total_shares' => '', 'target_url' => 'default', 'target_url_custom' => '', 'before_widget_content' => '', 'after_widget_content' => '', 'hide_for_logged_in' => '' );\n\n\t\tforeach( $instance as $key => $value ) { \n\t\t\tif ( is_string( $value ) ) {\n\t\t\t\t$instance[ $key ] = esc_attr( $value ); \n\t\t\t}\n\t\t}\n\t\t\n\t\t$instance = wp_parse_args( (array)$instance, $defaults );\n\t\t?> \n\t\t<script type=\"text/javascript\">\n\t\t\tfunction theChampToggleHorSharingTargetUrl(val){\n\t\t\t\tif(val == 'custom'){\n\t\t\t\t\tjQuery('.theChampHorSharingTargetUrl').css('display', 'block');\n\t\t\t\t}else{\n\t\t\t\t\tjQuery('.theChampHorSharingTargetUrl').css('display', 'none');\n\t\t\t\t}\n\t\t\t}\n\t\t</script>\n\t\t<p> \n\t\t\t<p><strong>Note:</strong> <?php _e('Make sure \"Standard Social Sharing\" is enabled at \"Super Socializer > Social Sharing\" page.', 'super-socializer') ?></p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e( 'Title:', 'super-socializer' ); ?></label> \n\t\t\t<input style=\"width: 95%\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" type=\"text\" value=\"<?php echo $instance['title']; ?>\" /> <br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'show_counts' ); ?>\"><?php _e( 'Show individual share counts:', 'super-socializer' ); ?></label> \n\t\t\t<input id=\"<?php echo $this->get_field_id( 'show_counts' ); ?>\" name=\"<?php echo $this->get_field_name( 'show_counts' ); ?>\" type=\"checkbox\" value=\"1\" <?php echo isset($instance['show_counts']) && $instance['show_counts'] == 1 ? 'checked' : ''; ?> /><br/><br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'total_shares' ); ?>\"><?php _e( 'Show total shares:', 'super-socializer' ); ?></label> \n\t\t\t<input id=\"<?php echo $this->get_field_id( 'total_shares' ); ?>\" name=\"<?php echo $this->get_field_name( 'total_shares' ); ?>\" type=\"checkbox\" value=\"1\" <?php echo isset($instance['total_shares']) && $instance['total_shares'] == 1 ? 'checked' : ''; ?> /><br/> <br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'target_url' ); ?>\"><?php _e( 'Target Url:', 'super-socializer' ); ?></label> \n\t\t\t<select style=\"width: 95%\" onchange=\"theChampToggleHorSharingTargetUrl(this.value)\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'target_url' ); ?>\" name=\"<?php echo $this->get_field_name( 'target_url' ); ?>\">\n\t\t\t\t<option value=\"\">--<?php _e('Select', 'super-socializer') ?>--</option>\n\t\t\t\t<option value=\"default\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'default' ? 'selected' : '' ; ?>>Url of the webpage where icons are located (default)</option>\n\t\t\t\t<option value=\"homepage\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'homepage' ? 'selected' : '' ; ?>>Url of the homepage of your website</option>\n\t\t\t\t<option value=\"custom\" <?php echo isset($instance['target_url']) && $instance['target_url'] == 'custom' ? 'selected' : '' ; ?>>Custom Url</option>\n\t\t\t</select>\n\t\t\t<input placeholder=\"Custom url\" style=\"margin-top: 5px; <?php echo !isset($instance['target_url']) || $instance['target_url'] != 'custom' ? 'display: none' : '' ; ?>\" class=\"widefat theChampHorSharingTargetUrl\" id=\"<?php echo $this->get_field_id( 'target_url_custom' ); ?>\" name=\"<?php echo $this->get_field_name( 'target_url_custom' ); ?>\" type=\"text\" value=\"<?php echo isset($instance['target_url_custom']) ? $instance['target_url_custom'] : ''; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'before_widget_content' ); ?>\"><?php _e( 'Before widget content:', 'super-socializer' ); ?></label> \n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'before_widget_content' ); ?>\" name=\"<?php echo $this->get_field_name( 'before_widget_content' ); ?>\" type=\"text\" value=\"<?php echo $instance['before_widget_content']; ?>\" /> \n\t\t\t<label for=\"<?php echo $this->get_field_id( 'after_widget_content' ); ?>\"><?php _e( 'After widget content:', 'super-socializer' ); ?></label> \n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'after_widget_content' ); ?>\" name=\"<?php echo $this->get_field_name( 'after_widget_content' ); ?>\" type=\"text\" value=\"<?php echo $instance['after_widget_content']; ?>\" /> \n\t\t\t<br /><br /><label for=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\"><?php _e( 'Hide for logged in users:', 'super-socializer' ); ?></label> \n\t\t\t<input type=\"checkbox\" id=\"<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>\" name=\"<?php echo $this->get_field_name( 'hide_for_logged_in' ); ?>\" type=\"text\" value=\"1\" <?php if(isset($instance['hide_for_logged_in']) && $instance['hide_for_logged_in']==1) echo 'checked=\"checked\"'; ?> /> \n\t\t</p> \n\t<?php \n }", "public function form( $instance ) {\r\n\t\t// outputs the options form on admin\r\n\r\n\t\t$title = (! empty($instance['title'])) ? $instance['title'] : 'Popular Posts';\r\n\t\t$tot = (! empty($instance['tot'])) ? $instance['tot'] : 4;\r\n\r\n\t\t$output = '<p><label for=\"'.esc_attr($this->get_field_id('title')).'\" >Title:</label></br>';\r\n\t\t$output .= '<input name=\"'.esc_html($this->get_field_name('title')).'\" id=\"'.esc_attr($this->get_field_id('title')).'\" type=\"text\" class=\"widefat\" value=\"'.esc_html($title).'\"></p>';\r\n\t\t$output .='<p><label for=\"'.esc_attr($this->get_field_id('tot')).'\" >Total Number of Posts to Show : </label>';\r\n\t\t$output .= '<input name=\"'.esc_html($this->get_field_name('tot')).'\" id=\"'.esc_attr($this->get_field_id('tot')).'\" type=\"number\" class=\"tiny-text\" value=\"'.esc_html($tot).'\"></p>';\r\n\r\n\t\techo $output;\r\n\t}", "public function form()\n\t{\n\t?>\n\t<table class=\"form-table\">\n\t\t<tbody>\n\t\t<?php foreach( (array) $this->InstanceRegistred as $id => $args ) : ?>\n\t\t\t<tr>\n\t\t\t\t<th><?php echo $args['title'];?></th>\n\t\t\t\t<td>\n\t\t\t\t<?php \n\t\t\t\t\twp_dropdown_pages(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' \t\t\t\t=> $args['name'],\n\t\t\t\t\t\t\t'post_type' \t\t=> $args['post_type'],\n\t\t\t\t\t\t\t'selected' \t\t\t=> $args['selected'],\n\t\t\t\t\t\t\t'sort_column' \t\t=> $args['listorder'],\n\t\t\t\t\t\t\t'show_option_none' \t=> $args['show_option_none']\t\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\t\t\t?>\t\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php endforeach;?>\n\t\t</tbody>\n\t</table>\n\t<?php\t\t\n\t}", "function form( $instance ) {\n\n\t// Set up some default widget settings\n\t$defaults = array(\n\t\t'title' => 'Featured Clients',\n\t\t'image1' => '',\n\t\t'image2' => '',\n\t\t'image3' => '',\n\t\t'image4' => '',\n\t\t'image5' => '',\n\t\t'client1' => '',\n\t\t'client2' => '',\n\t\t'client3' => '',\n\t\t'client4' => '',\n\t\t'client5' => '',\n\t\t'link1' => '',\n\t\t'link2' => '',\n\t\t'link3' => '',\n\t\t'link4' => '',\n\t\t'link5' => '',\n\t);\n\t\n\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n\t<!-- Widget Title: Text Input -->\n\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'cleanbusiness') ?></label>\n\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" />\n\t</p>\n\n\t\n\t\t<!-- Image 1: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'client1' ); ?>\"><?php _e('Client 1:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'client1' ); ?>\" name=\"<?php echo $this->get_field_name( 'client1' ); ?>\" value=\"<?php echo $instance['client1']; ?>\" />\n\t\t\t\t\t\t\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'image1' ); ?>\"><?php _e('Image 1:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"client-image\" type=\"text\" id=\"<?php echo $this->get_field_id( 'image1' ); ?>\" name=\"<?php echo $this->get_field_name( 'image1' ); ?>\" value=\"<?php echo $instance['image1']; ?>\" />&nbsp;<input type=\"button\" class=\"upload_button client-image-upload\" value=\"Upload\"/>\n\t\t\t<br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'link1' ); ?>\"><?php _e('link 1:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'link1' ); ?>\" name=\"<?php echo $this->get_field_name( 'link1' ); ?>\" value=\"<?php echo $instance['link1']; ?>\" />\n\t\t</p>\n\t\n\t\n\t\t<!-- Image 2: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'client2' ); ?>\"><?php _e('Client 2:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'client2' ); ?>\" name=\"<?php echo $this->get_field_name( 'client2' ); ?>\" value=\"<?php echo $instance['client2']; ?>\" />\n\t\t\t\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'image2' ); ?>\"><?php _e('Image 2:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"client-image\" type=\"text\" id=\"<?php echo $this->get_field_id( 'image2' ); ?>\" name=\"<?php echo $this->get_field_name( 'image2' ); ?>\" value=\"<?php echo $instance['image2']; ?>\" />&nbsp;<input type=\"button\" class=\"upload_button client-image-upload\" value=\"Upload\"/>\n\t\t\t<br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'link2' ); ?>\"><?php _e('link 2:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'link2' ); ?>\" name=\"<?php echo $this->get_field_name( 'link2' ); ?>\" value=\"<?php echo $instance['link2']; ?>\" />\n\t\t</p>\t\n\t\t<!-- Image 3: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'client3' ); ?>\"><?php _e('Client 3:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'client3' ); ?>\" name=\"<?php echo $this->get_field_name( 'client3' ); ?>\" value=\"<?php echo $instance['client3']; ?>\" />\n\t\t\t\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'image3' ); ?>\"><?php _e('Image 3:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"client-image\" type=\"text\" id=\"<?php echo $this->get_field_id( 'image3' ); ?>\" name=\"<?php echo $this->get_field_name( 'image3' ); ?>\" value=\"<?php echo $instance['image3']; ?>\" />&nbsp;<input type=\"button\" class=\"upload_button client-image-upload\" value=\"Upload\"/>\n\t\t\t<br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'link3' ); ?>\"><?php _e('link 3:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'link3' ); ?>\" name=\"<?php echo $this->get_field_name( 'link3' ); ?>\" value=\"<?php echo $instance['link3']; ?>\" />\n\t\t</p>\n\t\n\t\t<!-- Image 4: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'client4' ); ?>\"><?php _e('Client 4:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'client4' ); ?>\" name=\"<?php echo $this->get_field_name( 'client4' ); ?>\" value=\"<?php echo $instance['client4']; ?>\" />\n\t\t\t\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'image4' ); ?>\"><?php _e('Image 4:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"client-image\" type=\"text\" id=\"<?php echo $this->get_field_id( 'image4' ); ?>\" name=\"<?php echo $this->get_field_name( 'image4' ); ?>\" value=\"<?php echo $instance['image4']; ?>\" />&nbsp;<input type=\"button\" class=\"upload_button client-image-upload\" value=\"Upload\"/>\n\t\t\t<br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'link4' ); ?>\"><?php _e('link 4:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'link4' ); ?>\" name=\"<?php echo $this->get_field_name( 'link4' ); ?>\" value=\"<?php echo $instance['link4']; ?>\" />\n\t\t</p>\n\n\t\t<!-- Image 5: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'client5' ); ?>\"><?php _e('Client 5:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'client5' ); ?>\" name=\"<?php echo $this->get_field_name( 'client5' ); ?>\" value=\"<?php echo $instance['client5']; ?>\" />\n\t\t\t\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'image5' ); ?>\"><?php _e('Image 5:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"client-image\" type=\"text\" id=\"<?php echo $this->get_field_id( 'image5' ); ?>\" name=\"<?php echo $this->get_field_name( 'image5' ); ?>\" value=\"<?php echo $instance['image5']; ?>\" />&nbsp;<input type=\"button\" class=\"upload_button client-image-upload\" value=\"Upload\"/>\n\t\t\t<br/>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'link5' ); ?>\"><?php _e('link 5:', 'cleanbusiness') ?> </label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'link5' ); ?>\" name=\"<?php echo $this->get_field_name( 'link5' ); ?>\" value=\"<?php echo $instance['link5']; ?>\" />\n\t\t</p>\n\t\n\t\t\t\n\t<?php\n\t}", "public function widget( $args, $instance ) {\n\t\techo $args['before_widget'];\n\t\techo $args['before_title']\n\t\t. apply_filters( 'widget_title', $instance['title'] )\n\t\t. $args['after_title'];\n\t\t$form_action = get_bloginfo('url');\n\t\t$nonce = wp_create_nonce( $instance['securitycode'] );\n\t\t?>\n\t\t\t<form id=\"<?php echo $nonce; ?>\" action=\"<?php echo admin_url('admin-ajax.php'); ?>?_wpnonce=<?php echo $nonce ?>\" method=\"post\" accept-charset=\"utf-8\" class=\"call_rada\">\n\t\t\t\t<p class=\"widget-control\">\n\t\t\t \t<label for=\"<?php echo esc_attr( $this->get_field_id( 'Customer_name' ) ); ?>\"><?php _e( esc_attr( 'Tên:' ) ); ?><span class=\"red\">*</span></label>\n\t\t\t \t<input type=\"text\" class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'Customer_name' ) ); ?>\" name=\"customer_name\" value=\"\" required placeholder=\"Nhập tên của bạn\">\n\t\t\t </p>\n\t\t\t\t<p class=\"widget-control\">\n\t\t\t \t<label for=\"<?php echo esc_attr( $this->get_field_id( 'Message' ) ); ?>\"><?php _e( esc_attr( 'Vấn đề:' ) ); ?><span class=\"red\">*</span></label>\n\t\t\t \t<input type=\"text\" class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'Message' ) ); ?>\" name=\"message\" value=\"\" required placeholder=\"Nhập vấn đề cần hỗ trợ\">\n\n\t\t\t </p>\n\t\t\t <p class=\"widget-control\">\n\t\t\t \t<label for=\"<?php echo esc_attr( $this->get_field_id( 'Customer' ) ); ?>\"><?php _e( esc_attr( 'Số điện thoại:' ) ); ?><span class=\"red\">*</span></label>\n\t\t\t \t<input type=\"text\" class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'Customer' ) ); ?>\" name=\"customer\" value=\"\" required>\n\t\t\t </p>\n\t\t\t <p class=\"widget-control\">\n\t\t\t \t<label for=\"<?php echo esc_attr( $this->get_field_id( 'Location' ) ); ?>\"><?php _e( esc_attr( 'Địa chỉ:' ) ); ?><span class=\"red\">*</span></label>\n\t\t\t \t<input type=\"text\" class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'Location' ) ); ?>\" name=\"location\" value=\"\" required>\n\t\t\t </p>\n\t\t\t <p class=\"widget-control\">\n\t\t\t \t<label for=\"<?php echo esc_attr( $this->get_field_id( 'Latitude' ) ); ?>\"><?php _e( esc_attr( 'Lat:' ) ); ?></label>\n\t\t\t \t<input type=\"text\" class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'Latitude' ) ); ?>\" name=\"lat\" value=\"\">\n\t\t\t </p>\n\t\t\t <p class=\"widget-control\">\n\t\t\t \t<label for=\"<?php echo esc_attr( $this->get_field_id( 'Longitude' ) ); ?>\"><?php _e( esc_attr( 'Long:' ) ); ?></label>\n\t\t\t \t<input type=\"text\" class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'Longitude' ) ); ?>\" name=\"lng\" value=\"\">\n\t\t\t </p>\n\t\t\t <p class=\"widget-control\">\n\t\t\t \t<label for=\"<?php echo esc_attr( $this->get_field_id( 'Region_code' ) ); ?>\"><?php _e( esc_attr( 'Tỉnh:' ) ); ?></label>\n\t\t\t \t<select class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'Region_code' ) ); ?>\" name=\"region_code\">\n\t\t\t \t\t<?php\n\t\t\t \t\t\t$region = $this->getRegion();\n\t\t\t \t\t\tif (count($region) > 0) {\n\t\t\t \t\t\t\tforeach ($region as $key => $reg) {\n\t\t\t \t\t\t\t\t?>\n\t\t\t \t\t\t\t\t\t<option value=\"<?php echo $key; ?>\"><?php echo trim($reg); ?></option>\n\t\t\t \t\t\t\t\t<?php\n\t\t\t \t\t\t\t}\n\t\t\t \t\t\t}\n\t\t\t \t\t?>\n\t\t\t \t</select>\n\t\t\t </p>\n\t\t\t <div class=\"widget-control submit\">\n\t\t\t \t<div class=\"error\">\n\t\t\t \t\t<span class=\"status\"></span>\n\t\t\t \t</div>\n\t\t\t \t<div class=\"recaptcha-error width80\"><!-- BEGIN: ReCAPTCHA implementation example. --><div class=\"g-recaptcha\" data-sitekey=\"<?php echo $instance['datasitekey']; ?>\" data-callback=\"onSuccess\"></div></div>\n\t\t\t \t<div class=\"sublit-button width20\">\n\t\t\t \t\t<input type=\"submit\" name=\"get-rada\" class=\"btn btn-1 btn-1b button button-primary\" value=\"Call\">\n\t\t\t \t</div>\n\t\t\t </div>\n\t\t\t <input name=\"action\" value=\"add_transfer\" type=\"hidden\">\n\t\t\t <input type=\"hidden\" class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'apiurl' ) ); ?>\" name=\"apiurl\" value=\"<?php echo $instance['apiurl']; ?>\">\n\t\t\t <input type=\"hidden\" class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'securitycode' ) ); ?>\" name=\"securitycode\" value=\"<?php echo $instance['securitycode']; ?>\">\n\t\t\t\t<input type=\"hidden\" class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'uid' ) ); ?>\" name=\"uid\" value=\"<?php echo $instance['uid']; ?>\">\n\t\t \t<input type=\"hidden\" class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'apikey' ) ); ?>\" name=\"apikey\" value=\"<?php echo $instance['apikey']; ?>\">\n\t\t \t<input type=\"hidden\" class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'serviceid' ) ); ?>\" name=\"serviceid\" value=\"<?php echo $instance['serviceid']; ?>\">\n\t\t \t<input type=\"hidden\" class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'securitycode' ) ); ?>\" name=\"securitycode\" value=\"<?php echo $instance['securitycode']; ?>\">\n\t\t\t</form>\n\t\t\t<style type=\"text/css\" media=\"screen\">\n\n\t\t\t\tform.call_rada{\n\t\t\t\t\tposition: relative;\n\t\t\t\t\tborder: thin solid #CCC;\n padding: 10px;\n\t\t\t\t}\n\n\t\t\t\tform.call_rada .width75 {\n\t\t\t\t width: 74%;\n\t\t\t\t display: inline-block;\n\t\t\t\t}\n\t\t\t\tform.call_rada .width25 {\n\t\t\t\t width: 24%;\n\t\t\t\t display: inline-block;\n\t\t\t\t}\n\t\t\t\tform.call_rada .width80 {\n\t\t\t\t width: 79%;\n\t\t\t\t display: inline-block;\n\t\t\t\t}\n\t\t\t\tform.call_rada .width20 {\n\t\t\t\t width: 19%;\n\t\t\t\t display: inline-block;\n\t\t\t\t}\n\t\t\t\tform.call_rada .g-recaptcha {\n\t\t\t\t float: right;\n\t\t\t\t}\n\t\t\t\tform.call_rada select.widefat{\n\t\t\t\t\tbackground: #f7f7f7;\n\t\t\t\t background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0));\n\t\t\t\t border: 1px solid #d1d1d1;\n\t\t\t\t border-radius: 2px;\n\t\t\t\t color: #686868;\n\t\t\t\t padding: 0.625em 0.4375em;\n\t\t\t\t width: 100%;\n\t\t\t\t}\n\t\t\t\tform.call_rada .widget-control {\n\t\t\t\t display: block;\n\t\t\t\t}\n\t\t\t\tform.call_rada .error{\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tbottom: 5%;\n\t\t\t\t width: 33%;\n\t\t\t\t padding: 10px;\n\t\t\t\t height: auto;\n\t\t\t\t}\n\t\t\t\t.status.active {\n\t\t\t\t width: 100%;\n\t\t\t\t text-align: center;\n\t\t\t\t padding: 7px 17px 7px;\n\t\t\t\t display: block;\n\t\t\t\t}\n\t\t\t\t.error>.status.active{\n\t\t\t\t\tbackground: aquamarine;\n\t\t\t\t}\n\t\t\t\t.red{\n\t\t\t\t\tcolor: red;\n\t\t\t\t}\n\t\t\t\tform.call_rada input.widefat, form.call_rada select.widefat{\n\t\t\t\t\twidth: 65%;\n\t\t\t\t\tfloat: right;\n\t\t\t\t}\n\t\t\t\tform.call_rada input.widefat{\n\t\t\t\t\tpadding-left: 8px;\n\t\t\t\t}\n\t\t\t\tform.call_rada .right{\n\t\t\t\t\tfloat: right;\n\t\t\t\t}\n\t\t\t\tform.call_rada .left{\n\t\t\t\t\tfloat: left;\n\t\t\t\t}\n\t\t\t\tform.call_rada .widget-control.submit{\n\t\t\t\t\theight: 80px;\n\t\t\t\t}\n\t\t\t\tform.call_rada input[type=\"submit\"] {\n\t\t\t\t float: right;\n\t\t\t\t background-color: #A0CE4E;\n\t\t\t\t padding: 5% 30% 5%;\n\t\t\t\t text-align: center;\n\t\t\t\t color: white;\n\t\t\t\t font-weight: bolder;\n\t\t\t\t text-transform: uppercase;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<script>\n\t\t\t\tif (navigator.geolocation) {\n\t\t\t\t \tvar timeoutVal = 10 * 1000 * 1000;\n\t\t\t\t\tnavigator.geolocation.getCurrentPosition(\n\t\t\t\t\t\tdisplayPosition, \n\t\t\t\t\t displayError,\n\t\t\t\t\t {\n\t\t\t\t\t \tenableHighAccuracy: true,\n\t\t\t\t\t \ttimeout: timeoutVal,\n\t\t\t\t\t \tmaximumAge: 0\n\t\t\t\t\t }\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\talert(\"Geolocation is not supported by this browser\");\n\t\t\t\t}\n\n\t\t\t\tfunction displayPosition(position) {\n\t\t\t\t\tvar form = jQuery('form.call_rada');\n\t\t\t\t\tform.find('input[name=\"lat\"]').val(position.coords.latitude);\n\t\t\t\t\tform.find('input[name=\"lng\"]').val(position.coords.longitude);\n\t\t\t\t}\n\t\t\t\tfunction displayError(error) {\n\t\t\t\t\tvar errors = { \n\t\t\t\t\t 1: 'Geo location permission denied',\n\t\t\t\t\t 2: 'Geo location position unavailable',\n\t\t\t\t\t 3: 'Geo location pequest timeout'\n\t\t\t\t\t};\n\t\t\t\t\tconsole.log(\"Error: \" + errors[error.code]);\n\t\t\t\t}\n\t\t\t</script>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tvar onSuccess = function(response) {\n return true;\n };\n\t\t\t\tfunction isValid (value) {\n\t\t\t\t\tif( value ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tjQuery(document).ready(function () {\n\n\t\t\t\t\t//setup before functions\n\t\t\t\t\tvar typingTimer; //timer identifier\n\t\t\t\t\tvar doneTypingInterval = 5000; //time in ms, 5 second for example\n\t\t\t\t\tvar input = jQuery('form#<?php echo $nonce ?> input[name=\"location\"]');\n\n\t\t\t\t\t//on keyup, start the countdown\n\t\t\t\t\tinput.on('input', function () {\n\t\t\t\t\t\tclearTimeout(typingTimer);\n\t\t\t\t\t\ttypingTimer = setTimeout(doneTyping(this), doneTypingInterval);\n\t\t\t\t\t});\n\n\t\t\t\t\t//on keydown, clear the countdown \n\t\t\t\t\tinput.on('keydown', function () {\n\t\t\t\t\t \tclearTimeout(typingTimer);\n\t\t\t\t\t});\n\n\t\t\t\t\t//user is \"finished typing,\" do something\n\t\t\t\t\tfunction doneTyping (el) {\n\t\t\t\t\t \t//do something\n\t\t\t\t\t \tvar addr = jQuery(el).val();\n\t\t\t\t\t \tvar url = 'https://maps.googleapis.com/maps/api/geocode/json?address=' + addr + '&key=<?php echo $instance[\"geokey\"] ?>';\n\t\t\t\t\t \tvar form = jQuery(el).parents('form.call_rada');\n\t\t\t\t\t \tif (addr == '') {\n\t\t\t\t\t \t\treturn true;\n\t\t\t\t\t \t};\n\t\t\t\t\t \tjQuery.get(\n\t\t\t\t\t\t \turl, {},\n\t\t\t\t\t\t\tfunction(data) {\n\t\t\t\t\t\t\t\tif (typeof data.results[0] != \"undefined\" && typeof data.results[0].geometry != \"undefined\") {\n\t\t\t\t\t\t\t\t\tvar geo = data.results[0].geometry;\n\t\t\t\t\t\t\t\t\tform.find('input[name=\"lat\"]').val(geo.location.lat);\n\t\t\t\t\t\t\t\t\tform.find('input[name=\"lng\"]').val(geo.location.lng);\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery('form#<?php echo $nonce ?>').submit(function (event) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tresponse = grecaptcha.getResponse();\n\t\t\t\t\t\tif (!response) {\n\t\t\t\t\t alert(\"Please fill the captcha!\");\n\t\t\t\t\t return false;\n\t\t\t\t\t }\n\t\t\t\t\t\tvar location = jQuery(this).find('input[name=\"location\"]').val();\n\t\t\t\t\t\tvar region_code = jQuery(this).find('input[name=\"region_code\"]').val();\n\t\t\t\t\t\tvar lat = jQuery(this).find('input[name=\"lat\"]').val();\n\t\t\t\t\t\tvar lng = jQuery(this).find('input[name=\"lng\"]').val();\n\t\t\t\t\t\tif (!(isValid(location) || isValid(region_code) || (isValid(lat) && isValid(lng)))) {\n\t\t\t\t\t\t\talert(\"Vui lòng nhập 1 trong các trường Region code, Longitude - Latitude, Location\");\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t};\n\t\t\t\t\t\tvar data = jQuery(this).serialize();\n\t\t\t\t\t\tvar status = jQuery(this).find('.status');\n\t\t\t\t\t\tstatus.addClass('active').html('Đang gửi yêu cầu');\n\t\t\t\t\t\tjQuery.post(\n\t\t\t\t\t\t jQuery(this).attr('action'), data,\n\t\t\t\t\t\t\tfunction(data) {\n\t\t\t\t\t\t\t\tvar result = JSON.parse(data);\n\t\t\t\t\t\t\t\tstatus.addClass('active').html(result.message);\n\t\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\t\tstatus.html('').removeClass('active');\n\t\t\t\t\t\t\t\t}, 5000);\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</script>\n\t\t<?php\n\t}", "function form( $instance ) {\n\n $title = @ $instance['title'] ? $instance['title'] : __('Последние приказы АНК', 'advanced-widget');\n $orderby = @ $instance['orderby'] ? $instance['orderby'] : '';\n ?>\n <p>\n <label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e( 'Title:' ); ?></label> \n <input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $title ); ?>\">\n </p>\n <?php\n }", "public function form( $instance ) {\r\n\r\n\t\t// Set widget defaults\r\n\t\t$defaults = array(\r\n\t\t\t'title' => '',\r\n\t\t\t'cptm' => '',\r\n\t\t\t'metro' => ''\r\n\t\t);\r\n\t\t\r\n\t\t// Parse current settings with defaults\r\n\t\textract( wp_parse_args( ( array ) $instance, $defaults ) ); ?>\r\n\r\n\t\t<?php // Widget Title ?>\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\"><?php _e( 'Widget Title', 'text_domain' ); ?></label>\r\n\t\t\t<input class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $title ); ?>\" />\r\n\t\t</p>\r\n\r\n\t\t<?php // Checkboxes ?>\r\n\t\t<p>\r\n\t\t\t<input id=\"<?php echo esc_attr( $this->get_field_id( 'cptm' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'cptm' ) ); ?>\" type=\"checkbox\" value=\"1\" <?php checked( '1', $cptm ); ?> />\r\n\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'cptm' ) ); ?>\"><?php _e( 'CPTM', 'text_domain' ); ?></label>\r\n\t\t</p>\r\n\r\n\t\t<p>\r\n\t\t\t<input id=\"<?php echo esc_attr( $this->get_field_id( 'metro' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'metro' ) ); ?>\" type=\"checkbox\" value=\"1\" <?php checked( '1', $metro ); ?> />\r\n\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'metro' ) ); ?>\"><?php _e( 'Metrô', 'text_domain' ); ?></label>\r\n\t\t</p>\r\n\r\n\t<?php }", "public function widget( $args, $instance ) {\r\n\t$title = apply_filters( 'widget_title', $instance['title'] );\r\n\t// before and after widget arguments are defined by themes\r\n\techo $args['before_widget']; ?>\r\n\t\r\n\t\t<p><img src=\"/app/uploads/2016/10/logo-alt.png\"/></p>\r\n\t\t<p><img src=\"/app/uploads/2016/10/oaklins-blue.png\"/></p>\r\n\t\t<ul>\r\n\t\t\t<li class=\"address\">\r\n\t\t\t\tMain Office 475 Park Avenue South, 22nd Floor<br />\r\n\t\t\t\tNew York, NY 10016\r\n\t\t\t</li>\r\n\t\t\t<li class=\"phone\">212.686.9700</li>\t\r\n\t\t\t<li class=\"mail\"><a href=\"/contact\">Email Us</a></li>\r\n\t\t</ul>\t\r\n\t\t<?php gravity_form( 3, true, false, false, '', false ); ?>\r\n\t<?php echo $args['after_widget'];\r\n}", "function form($instance) { \n // Check values\n if( $instance) {\n $title = esc_attr($instance['title']);\n $textarea = esc_textarea($instance['textarea']);\n $textarea2 = esc_textarea($instance['textarea2']);\n } else {\n $title = '';\n $textarea = '';\n $textarea2 = '';\n }\n ?>\n \n <p>\n <label for=\"<?php echo $this->get_field_id('title'); ?>\"><?php _e('Widget Title', 'wp_widget_plugin'); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('title'); ?>\" name=\"<?php echo $this->get_field_name('title'); ?>\" type=\"text\" value=\"<?php echo $title; ?>\" />\n </p>\n \n <p>\n <label for=\"<?php echo $this->get_field_id('textarea'); ?>\"><?php _e('Textarea:', 'wp_widget_plugin'); ?></label>\n <textarea class=\"widefat\" id=\"<?php echo $this->get_field_id('textarea'); ?>\" name=\"<?php echo $this->get_field_name('textarea'); ?>\"><?php echo $textarea; ?></textarea>\n </p>\n\n <p>\n <label for=\"<?php echo $this->get_field_id('textarea2'); ?>\"><?php _e('Textarea2:', 'wp_widget_plugin'); ?></label>\n <textarea class=\"widefat\" id=\"<?php echo $this->get_field_id('textarea2'); ?>\" name=\"<?php echo $this->get_field_name('textarea2'); ?>\"><?php echo $textarea2; ?></textarea>\n </p>\n <?php\n }", "public function form( $instace ){\n echo '<p><strong>Widget ini belum bisa diubag secara Manual!</strong><br> Hubungi developer untuk melakukan perubahan</p>'; \n }", "protected function form()\n {\n return Admin::form(Ad::class, function (Form $form) {\n\n $form->text('title','广告标题');\n $form->text('link_address','连接地址');\n\n list($usec, $sec) = explode(\" \", microtime());\n $name = $sec.str_replace('0.', '_',$usec);\n $form->image('image', \"主图\")->move(\"specialty_images\", $name.\".jpg\");\n\n\n $form->display('created_at', '创建时间');\n $form->display('updated_at', '最后修改时间');\n });\n }", "function form( $instance ) {\r\n\r\n\t\t/* Set up some default widget settings. */\r\n\t\t$defaults = array( 'title' => __('Good Reads', 'gr'), 'name' => __('John Doe', 'gr'), 'sex' => 'male', 'show_sex' => true, 'sort_type' => 'Publish Date', 'window_action' => 'new tab' );\r\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\r\n\r\n\t\t<!-- Widget Title: Text Input -->\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'hybrid'); ?></label>\r\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" />\r\n\t\t</p>\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'sort_type' ); ?>\"><?php _e('Sort Method:', 'gr'); ?></label>\r\n\t\t\t<select id=\"<?php echo $this->get_field_id( 'sort_type' ); ?>\" name=\"<?php echo $this->get_field_name( 'sort_type' ); ?>\">\r\n\t\t\t\t<option <?php if ( 'Publish Date' == $instance['format'] ) echo 'selected=\"selected\"'; ?>>Publish Date</option>\r\n\t\t\t\t<option <?php if ( 'Alpha' == $instance['format'] ) echo 'selected=\"selected\"'; ?>>Site Title</option>\r\n\t\t\t</select>\r\n\t\t</p>\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'window_action' ); ?>\"><?php _e('Open links in:', 'gr'); ?></label>\r\n\t\t\t<select id=\"<?php echo $this->get_field_id( 'window_action' ); ?>\" name=\"<?php echo $this->get_field_name( 'window_action' ); ?>\">\r\n\t\t\t\t<option <?php if ( 'new tab' == $instance['format'] ) echo 'selected=\"selected\"'; ?>>new tab</option>\r\n\t\t\t\t<option <?php if ( 'same tab' == $instance['format'] ) echo 'selected=\"selected\"'; ?>>same tab</option>\r\n\t\t\t</select>\r\n\t\t</p>\r\n\r\n\t<?php\r\n\t}", "public function form( $instance ) {\r\n\r\n\t\t/* Set up some default widget settings. */\r\n\t\t$defaults = array();\r\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); \r\n\t\t\r\n\t\t$default_attribute = array();\r\n\t\t$attribute_taxonomies = wc_get_attribute_taxonomies();\t\r\n\t\t$count_atribute = 0 ;\r\n\t\tif($attribute_taxonomies){\r\n\t\t\tforeach ( $attribute_taxonomies as $value ) :\r\n\t\t\t\t$default_attribute[] = $value->attribute_name;\r\n\t\t\t\t$c_taxonomy = wc_attribute_taxonomy_name( $value->attribute_name );\r\n\t\t\t\t$c_terms = get_terms( $c_taxonomy);\r\n\t\t\t\t$count_atribute = $count_atribute + count($c_terms);\r\n\t\t\tendforeach;\r\n\t\t}\t\r\n\t\t$title1 \t\t\t\t= isset( $instance['title1'] ) ? \tstrip_tags($instance['title1']) : '';\t\t\t\r\n\t\t$attribute\t\t\t\t= isset( $instance['attribute'] ) && is_array($instance['attribute']) ? $instance['attribute'] : $default_attribute;\r\n\t\t$showcount \t\t\t= isset( $instance['showcount'] ) ? strip_tags($instance['showcount']) : 1; \r\n\t\t$show_price \t\t\t= isset( $instance['show_price'] ) ? strip_tags($instance['show_price']) : 1;\r\n\t\t$show_category \t\t= isset( $instance['show_category'] ) ? strip_tags($instance['show_category']) : 1;\r\n\t\t$show_only_sale \t\t= isset( $instance['show_only_sale'] ) ? strip_tags($instance['show_only_sale']) : 1; \t\r\n\t\t$show_in_stock \t\t= isset( $instance['show_in_stock'] ) ? strip_tags($instance['show_in_stock']) : 1; \t\r\n\t\t$show_brand \t\t\t= isset( $instance['show_brand'] ) ? strip_tags($instance['show_brand']) : 1;\r\n\t\t$show_rating \t\t\t= isset( $instance['show_rating'] ) ? strip_tags($instance['show_rating']) : 1;\r\n\t\t?>\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id('title1'); ?>\"><?php _e('Title', 'wpbingo')?></label>\r\n\t\t\t<br />\r\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('title1'); ?>\" name=\"<?php echo $this->get_field_name('title1'); ?>\"\r\n\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($title1); ?>\" />\r\n\t\t</p>\t\t\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id('show_price'); ?>\"><?php _e(\"Show Filter Price\", 'wpbingo')?></label>\r\n\t\t\t<br/>\r\n\t\t\t<select class=\"widefat\"\r\n\t\t\t\tid=\"<?php echo $this->get_field_id('show_price'); ?>\"\tname=\"<?php echo $this->get_field_name('show_price'); ?>\">\r\n\t\t\t\t<option value=\"1\" <?php if ($show_price==1){?> selected=\"selected\"\r\n\t\t\t\t<?php } ?>>\r\n\t\t\t\t\t<?php _e('Yes', 'wpbingo')?>\r\n\t\t\t\t</option>\r\n\t\t\t\t<option value=\"0\" <?php if ($show_price==0){?> selected=\"selected\"\r\n\t\t\t\t<?php } ?>>\r\n\t\t\t\t\t<?php _e('No', 'wpbingo')?>\r\n\t\t\t\t</option>\t\t\t\t\r\n\t\t\t</select>\r\n\t\t</p>\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id('show_only_sale'); ?>\"><?php _e(\"Show Only Sale\", 'wpbingo')?></label>\r\n\t\t\t<br/>\r\n\t\t\t<select class=\"widefat\"\r\n\t\t\t\tid=\"<?php echo $this->get_field_id('show_only_sale'); ?>\"\tname=\"<?php echo $this->get_field_name('show_only_sale'); ?>\">\r\n\t\t\t\t<option value=\"1\" <?php if ($show_only_sale==1){?> selected=\"selected\"\r\n\t\t\t\t<?php } ?>>\r\n\t\t\t\t\t<?php _e('Yes', 'wpbingo')?>\r\n\t\t\t\t</option>\r\n\t\t\t\t<option value=\"0\" <?php if ($show_only_sale==0){?> selected=\"selected\"\r\n\t\t\t\t<?php } ?>>\r\n\t\t\t\t\t<?php _e('No', 'wpbingo')?>\r\n\t\t\t\t</option>\t\t\t\t\r\n\t\t\t</select>\r\n\t\t</p>\t\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id('show_in_stock'); ?>\"><?php _e(\"Show In Stock\", 'wpbingo')?></label>\r\n\t\t\t<br/>\r\n\t\t\t<select class=\"widefat\"\r\n\t\t\t\tid=\"<?php echo $this->get_field_id('show_in_stock'); ?>\"\tname=\"<?php echo $this->get_field_name('show_in_stock'); ?>\">\r\n\t\t\t\t<option value=\"1\" <?php if ($show_in_stock==1){?> selected=\"selected\"\r\n\t\t\t\t<?php } ?>>\r\n\t\t\t\t\t<?php _e('Yes', 'wpbingo')?>\r\n\t\t\t\t</option>\r\n\t\t\t\t<option value=\"0\" <?php if ($show_in_stock==0){?> selected=\"selected\"\r\n\t\t\t\t<?php } ?>>\r\n\t\t\t\t\t<?php _e('No', 'wpbingo')?>\r\n\t\t\t\t</option>\t\t\t\t\r\n\t\t\t</select>\r\n\t\t</p>\t\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id('showcount'); ?>\"><?php _e(\"Show Number Of Product\", 'wpbingo')?></label>\r\n\t\t\t<br/>\r\n\t\t\t<select class=\"widefat\"\r\n\t\t\t\tid=\"<?php echo $this->get_field_id('showcount'); ?>\"\tname=\"<?php echo $this->get_field_name('showcount'); ?>\">\r\n\t\t\t\t<option value=\"1\" <?php if ($showcount==1){?> selected=\"selected\"\r\n\t\t\t\t<?php } ?>>\r\n\t\t\t\t\t<?php _e('Yes', 'wpbingo')?>\r\n\t\t\t\t</option>\r\n\t\t\t\t<option value=\"0\" <?php if ($showcount==0){?> selected=\"selected\"\r\n\t\t\t\t<?php } ?>>\r\n\t\t\t\t\t<?php _e('No', 'wpbingo')?>\r\n\t\t\t\t</option>\t\t\t\t\r\n\t\t\t</select>\r\n\t\t</p>\t\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id('show_brand'); ?>\"><?php _e(\"Show Brand\", 'wpbingo')?></label>\r\n\t\t\t<br/>\r\n\t\t\t<select class=\"widefat\"\r\n\t\t\t\tid=\"<?php echo $this->get_field_id('show_brand'); ?>\"\tname=\"<?php echo $this->get_field_name('show_brand'); ?>\">\r\n\t\t\t\t<option value=\"1\" <?php if ($show_brand==1){?> selected=\"selected\"\r\n\t\t\t\t<?php } ?>>\r\n\t\t\t\t\t<?php _e('Yes', 'wpbingo')?>\r\n\t\t\t\t</option>\r\n\t\t\t\t<option value=\"0\" <?php if ($show_brand==0){?> selected=\"selected\"\r\n\t\t\t\t<?php } ?>>\r\n\t\t\t\t\t<?php _e('No', 'wpbingo')?>\r\n\t\t\t\t</option>\t\t\t\t\r\n\t\t\t</select>\r\n\t\t</p>\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id('show_rating'); ?>\"><?php _e(\"Show Filter Rating\", 'wpbingo')?></label>\r\n\t\t\t<br/>\r\n\t\t\t<select class=\"widefat\"\r\n\t\t\t\tid=\"<?php echo $this->get_field_id('show_rating'); ?>\"\tname=\"<?php echo $this->get_field_name('show_rating'); ?>\">\r\n\t\t\t\t<option value=\"1\" <?php if ($show_rating==1){?> selected=\"selected\"\r\n\t\t\t\t<?php } ?>>\r\n\t\t\t\t\t<?php _e('Yes', 'wpbingo')?>\r\n\t\t\t\t</option>\r\n\t\t\t\t<option value=\"0\" <?php if ($show_rating==0){?> selected=\"selected\"\r\n\t\t\t\t<?php } ?>>\r\n\t\t\t\t\t<?php _e('No', 'wpbingo')?>\r\n\t\t\t\t</option>\t\t\t\t\r\n\t\t\t</select>\r\n\t\t</p>\r\n\t\t<?php if($attribute_taxonomies && $count_atribute > 0) : ?>\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id('attribute'); ?>\"><?php _e('Attribute', 'wpbingo')?></label>\r\n\t\t\t<br />\r\n\t\t\t<select class=\"widefat\"\tid=\"<?php echo $this->get_field_id('attribute'); ?>\" name=\"<?php echo $this->get_field_name('attribute'); ?>[]\" multiple=\"multiple\">\r\n\t\t\t\t<?php\r\n\t\t\t\t$option ='';\r\n\t\t\t\tforeach ( $attribute_taxonomies as $value ) :\r\n\t\t\t\t\t$get_terms_args['menu_order'] = 'ASC';\r\n\t\t\t\t\t$taxonomy = wc_attribute_taxonomy_name( $value -> attribute_name );\r\n\t\t\t\t\t$terms = get_terms( $taxonomy, $get_terms_args );\r\n\t\t\t\t\tif(count($terms) > 0){\t\t\t\t\r\n\t\t\t\t\t\t$option .= '<option value=\"' . $value -> attribute_name . '\" ';\r\n\t\t\t\t\t\tif ( is_array( $attribute ) && in_array( $value -> attribute_name, $attribute ) ){\r\n\t\t\t\t\t\t\t$option .= 'selected=\"selected\"';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$option .= '>'.$value -> attribute_label.'</option>';\r\n\t\t\t\t\t}\r\n\t\t\t\tendforeach;\r\n\t\t\t\techo $option;\r\n\t\t\t\t?>\r\n\t\t\t</select>\r\n\t\t</p>\r\n\t\t<?php endif;?>\r\n\t\t<p>\r\n\t\t\t<table>\r\n\t\t\t<?php \r\n\t\t\t\tforeach( $attribute as $att ){\r\n\t\t\t\t\tif( preg_match('/'.__('color', 'wpbingo').'/', $att, $matches) ){ ?>\r\n\t\t\t\t\t\t<?php \r\n\t\t\t\t\t\t$taxonomy = wc_attribute_taxonomy_name( $att );\r\n\t\t\t\t\t\t$orderby = wc_attribute_orderby( $taxonomy );\r\n\t\t\t\t\t\tswitch ( $orderby ) {\r\n\t\t\t\t\t\t\tcase 'name' :\r\n\t\t\t\t\t\t\t\t$get_terms_args['orderby'] = 'name';\r\n\t\t\t\t\t\t\t\t$get_terms_args['menu_order'] = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'id' :\r\n\t\t\t\t\t\t\t\t$get_terms_args['orderby'] = 'id';\r\n\t\t\t\t\t\t\t\t$get_terms_args['order'] = 'ASC';\r\n\t\t\t\t\t\t\t\t$get_terms_args['menu_order'] = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'menu_order' :\r\n\t\t\t\t\t\t\t\t$get_terms_args['menu_order'] = 'ASC';\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t<?php } \r\n\t\t\t\t}\r\n\t\t\t?>\r\n\t\t\t</table>\r\n\t\t</p>\t\t\r\n\t<?php\r\n\t}", "protected function form()\n {\n return Admin::form(Weapp::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }", "function form( $instance ) {\n\t\n\t\t/* Set up some default widget settings. */\n\t\t$defaults = array(\n\t\t\t'api_id' => '',\n\t\t\t'location_id' => '',\n\t\t\t'weather_unit' => 'metric'\t\t\t\n\t\t);\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'api_id' ); ?>\"><?php _e('API-Key:', 'makakken') ?></label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'api_id' ); ?>\" name=\"<?php echo $this->get_field_name( 'api_id' ); ?>\" value=\"<?php echo $instance['api_id']; ?>\" />\n\t\t\t<?php _e( 'API-Key openweathermap.org.', 'makakken' ); ?>\n\t\t</p>\t\t\n\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'location_id' ); ?>\"><?php _e('Location ID:', 'makakken') ?></label>\n\t\t\t<input class=\"widefat\" type=\"text\" id=\"<?php echo $this->get_field_id( 'location_id' ); ?>\" name=\"<?php echo $this->get_field_name( 'location_id' ); ?>\" value=\"<?php echo $instance['location_id']; ?>\" />\n\t\t\t<?php _e( 'Location ID from openweathermap.org', 'makakken' ); ?>\n\t\t</p>\n\t\t\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'unit' ); ?>\"><?php _e('Weather unit:', 'makakken') ?></label>\t\t\t\n\t\t\t<select name=\"<?php echo $this->get_field_name('weather_unit'); ?>\" id=\"<?php echo $this->get_field_id('weather_unit'); ?>\" class=\"widefat\">\n\t\t\t\t<option value=\"metric\"<?php selected( $instance['weather_unit'], 'metric' ); ?>><?php _e('Celsius', 'makakken'); ?></option>\n\t\t\t\t<option value=\"imperial\"<?php selected( $instance['weather_unit'], 'imperial' ); ?>><?php _e('Fahrenheit', 'makakken'); ?></option>\n\t\t\t</select>\n\t\t\t\n\t\t</p>\n\t<?php\n\t}", "public function form($instance){\n try {\n $this->coreWidget->renderForm($instance);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n }", "public function output_widget_control_templates()\n {\n }", "public function form($instance){\n $title = (isset($instance['title']) && !empty($instance['title'])) ? apply_filters('widget_title',$instance['title']) : __('LP Widget Title','lp_weather');\n $unit = (isset($instance['unit']) && !empty($instance['unit'])) ? $instance['unit'] : 'celsius';\n require(LP_WEATHER_PLUGIN_DIR.'views/lp-weather-widget-form.php');\n }", "function form( $instance ) {\r\n\r\n\t\t/* Set up some default widget settings. */\r\n\t\t$defaults = array( 'title' => __('DHL Search', ''), 'search'=> __('Search', ''), 'name' => __('John Doe', ''), 'searchField'=>__('s'), 'searchButton'=>__('searchsubmit'), 'sex' => 'male', 'show_sex' => true );\r\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\r\n \r\n <?php echo DHLSettings::getVal('dhl_username') == \"\" ? \"<p><em>\".DHLOutput::__(\"Inactive\").\"</em></p>\" : \"\"; ?>\r\n \r\n <!-- Widget Title: Text Input -->\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'hybrid'); ?></label>\r\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:90%;\" />\r\n\t\t</p>\r\n \r\n <p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'search' ); ?>\"><?php _e(\"Fallback Search:\"); ?></label>\r\n\t\t\t<select id=\"<?php echo $this->get_field_id( 'search' ); ?>\" name=\"<?php echo $this->get_field_name( 'search' ); ?>\" class=\"widefat\" style=\"width:90%;\">\r\n\t\t\t\t<option <?php if ( 'wordpress' == $instance['search'] ) echo 'selected=\"selected\"'; ?> value=\"wordpress\">WordPress</option>\r\n\t\t\t\t<!--<option <?php if ( 'google' == $instance['search'] ) echo 'selected=\"selected\"'; ?> value=\"google\">Google</option>-->\r\n\t\t\t\t<option <?php if ( 'none' == $instance['search'] ) echo 'selected=\"selected\"'; ?> value=\"none\">None</option>\r\n\t\t\t</select>\r\n\t\t</p>\r\n\t<?php\r\n\t}", "function siteorigin_panels_ajax_widget_form(){\n\t$request = array_map('stripslashes_deep', $_REQUEST);\n\tif( empty( $request['widget'] ) ) exit();\n\n\techo siteorigin_panels_render_form( $request['widget'], !empty($request['instance']) ? json_decode( $request['instance'], true ) : array(), $_REQUEST['raw'] );\n\texit();\n}", "function form( $instance ) {\n\t\n\t\t/* Set up some default widget settings. */\n\t\t$defaults = array(\n\t\t'title' => __('Our Work','advance'),\n\t\t'subtitle' => __('Check Out Our Work','advance'),\n\t\t'count' => '6',\n\t\t'category' => array(),\n\t\t'content_bg' => '#edf3f4',\n\t 'subtitle_textcolor'=>'#176079',\n\t\t'padtopbottom' =>'2',\n\t\t);\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n \n\t\t<!-- Posts Title Field -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'advance') ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo htmlspecialchars($instance['title'], ENT_QUOTES, \"UTF-8\"); ?>\" type=\"text\" />\n\t\t</p>\n \n <!-- Posts subtitle Field -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'subtitle' ); ?>\"><?php _e('Subtitle:', 'advance') ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'subtitle' ); ?>\" name=\"<?php echo $this->get_field_name( 'subtitle' ); ?>\" value=\"<?php echo htmlspecialchars($instance['subtitle'], ENT_QUOTES, \"UTF-8\"); ?>\" type=\"text\" />\n\t\t</p>\n \n <!-- Posts Category Field -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'category' ); ?>\"><?php _e('Categories', 'advance') ?></label>\n\t\t\t<span class=\"category_multicheck\">\n\t\t\t<?php\n\t\t\t\t$categories = get_terms(array( 'category' ), array( 'fields' => 'ids' ));\n\n foreach($categories as $cat) {\n ?>\n <label><input id=\"<?php echo $this->get_field_id( 'category' ) . $cat; ?>\" name=\"<?php echo $this->get_field_name('category'); ?>[]\" type=\"checkbox\" value=\"<?php echo $cat; ?>\" <?php if(!empty($instance['category'])) { ?><?php foreach ( $instance['category'] as $checked ) { checked( $checked, $cat, true ); } ?><?php } ?>><?php echo get_cat_name($cat); ?></label><br>\n <?php\n }\n ?>\n \t</span>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'count' ); ?>\"><?php _e('Number of Posts:', 'advance') ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'count' ); ?>\" name=\"<?php echo $this->get_field_name( 'count' ); ?>\" value=\"<?php echo $instance['count']; ?>\" type=\"text\" />\n\t\t</p>\n\n\n <!-- Text Content Background Color Field -->\n<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'content_bg' ); ?>\"><?php _e('Background Color', 'advance') ?></label>\n\t\t\t<input class=\"widefat color-picker\" id=\"<?php echo $this->get_field_id( 'content_bg' ); ?>\" name=\"<?php echo $this->get_field_name( 'content_bg' ); ?>\" value=\"<?php echo $instance['content_bg']; ?>\" type=\"text\" />\n\t\t</p>\n \n <p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'subtitle_textcolor' ); ?>\"><?php _e('Subtitle text color', 'advance') ?></label>\n\t\t\t<input class=\"widefat color-picker\" id=\"<?php echo $this->get_field_id( 'button_textcolor' ); ?>\" name=\"<?php echo $this->get_field_name( 'subtitle_textcolor' ); ?>\" value=\"<?php echo $instance['subtitle_textcolor']; ?>\" type=\"text\" />\n\t\t</p>\n \n \n \n <!-- Text Content Padding top/bottom Field -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'padtopbottom' ); ?>\"><?php _e('Top &amp; Bottom Padding', 'advance') ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'padtopbottom' ); ?>\" name=\"<?php echo $this->get_field_name( 'padtopbottom' ); ?>\" value=\"<?php echo $instance['padtopbottom']; ?>\" min=\"0\" max=\"80\" type=\"range\" />\n\t\t</p>\n \n \n \n<?php\n\t}", "public function form( $instance ) {\n\t\techo \"Na stránke sa zobrazí slučka zobrazujúca oznamy\";\n\n // outputs the options form on admin\n $instance = wp_parse_args( (array) $instance, array(\n 'cat' => '',\n ));\n $stops = $instance['cat'];\n \n global $wpdb;\n $sql = \"SELECT id,name FROM {$wpdb->prefix}announcements_categories\";\n $options = $wpdb->get_results($sql);\n ?>\n \n <select id = <?php echo $this->get_field_id('cat'); ?> name=<?php echo $this->get_field_name('cat'); ?> class=\"widefat\">\n <?php\n foreach ( $options as $key => $row ) {\n $selected = ( $stops == $row->id ) ?\n 'selected=\"selected\"' : '';\n echo '<option value =' . \"\\\"$row->id\\\" \" . $selected . '>' . $row->name . '</option>';\n }\n ?>\n </select>\n <?php\n\t}", "function form( $instance ) {\n\n\t// Set up some default widget settings\n\t$defaults = array(\n\t\t'title' => '',\n\t\t'ad' => get_template_directory_uri().\"/images/300x250.gif\",\n\t\t'link' => 'http://mythemeshop.com/',\n\t);\n\t\n\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n\t<!-- Widget Title: Text Input -->\n\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'framework') ?></label>\n\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" />\n\t</p>\n\n\t<!-- Ad image url: Text Input -->\n\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id( 'ad' ); ?>\"><?php _e('Ad image url:', 'framework') ?></label>\n\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'ad' ); ?>\" name=\"<?php echo $this->get_field_name( 'ad' ); ?>\" value=\"<?php echo $instance['ad']; ?>\" />\n\t</p>\n\t\n\t<!-- Ad link url: Text Input -->\n\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id( 'link' ); ?>\"><?php _e('Ad link url:', 'framework') ?></label>\n\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo $this->get_field_id( 'link' ); ?>\" name=\"<?php echo $this->get_field_name( 'link' ); ?>\" value=\"<?php echo $instance['link']; ?>\" />\n\t</p>\n\t\n\t<?php\n\t}", "public function FormAction()\n {\n return Controller::join_links($this->_widgetEditor->Link('field'), str_replace('\\\\', '_', $this->_widget->ClassName), '');\n }", "function form( $instance ) {\n\n\t\t/* Set up some default widget settings. */\n\t\t$defaults = array(\n\t\t\t'title' => __( 'Posts by Category', 'tecnavia' ),\n\t\t\t'$post_per_page'\t=> 5,\n\t\t\t);\n\n\t\t$instance = wp_parse_args( (array) $instance, $defaults );\n\t\t?>\n\t\t<!-- Widget Title: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\"><?php _e( 'Title:', 'tecnavia' ) ?></label>\n\t\t\t<input type=\"text\" class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\"\n\t\t\t name=\"<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>\"\n\t\t\t value=\"<?php echo esc_attr( $instance['title'] ); ?>\"/>\n\t\t</p>\n\t\t<p>\n <label for=\"<?php echo esc_attr( $this->get_field_id( '$post_per_page' ) ); ?>\"><?php _e( 'Number of posts', 'tecnavia' ) ?></label>\n <input type=\"text\" class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( '$post_per_page' ) ); ?>\"\n name=\"<?php echo esc_attr( $this->get_field_name( '$post_per_page' ) ); ?>\"\n value=\"<?php echo esc_attr( $instance['$post_per_page'] ); ?>\"/>\n </p>\n <?php\n\t}", "function form( $instance ) {\n\t\t$defaults = array( 'title' => 'Title' );\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n\t\t<!-- Widget Title: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\">Title:</label>\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:90%;\" />\n\t\t</p>\n\n\t\t<!-- Layout -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('layout'); ?>\">Display section</label>\n\t\t\t<select id=\"<?php echo $this->get_field_id('layout'); ?>\" name=\"<?php echo $this->get_field_name('layout'); ?>\" style=\"width:100%;\">\n\t\t\t\t\n\t\t\t\t<option value='small' <?php if ('small' == $instance['layout']) echo 'selected=\"selected\"'; ?>>Small</option>\n\t\t\t</select>\n\t\t</p>\n\t\t\n\t\t<!-- SHOW AND HIDE DIV -->\n\t\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id('showhide'); ?>\">SHOW AND HIDE DIV</label>\n\t\t<select id=\"<?php echo $this->get_field_id('showhide'); ?>\" name=\"<?php echo $this->get_field_name('showhide'); ?>\" style=\"width:100%;\">\n\t\t\t\t<option value='show' <?php if ('show' == $instance['showhide']) echo 'selected=\"selected\"'; ?>>SHOW</option>\n\t\t\t\t<option value='hide' <?php if ('hide' == $instance['showhide']) echo 'selected=\"selected\"'; ?>>HIDE</option>\n\t\t\n\t\t\t</select>\n\t\t</p>\n\t\t\n\n\t\t<!-- Cat/Tag -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('tagcat'); ?>\">Display Posts By Category Or Tag:</label>\n\t\t\t<select id=\"<?php echo $this->get_field_id('tagcat'); ?>\" name=\"<?php echo $this->get_field_name('tagcat'); ?>\" style=\"width:100%;\">\n\t\t\t\t<option value='category' <?php if ('category' == $instance['tagcat']) echo 'selected=\"selected\"'; ?>>Category</option>\n\t\t\t\t<option value='tag' <?php if ('tag' == $instance['tagcat']) echo 'selected=\"selected\"'; ?>>Tag</option>\n\t\t\t</select>\n\t\t</p>\n\n\t\t<!-- Enter Cat/Tag -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'enterslug' ); ?>\">Enter Category/Tag Slug Name:</label>\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'enterslug' ); ?>\" name=\"<?php echo $this->get_field_name( 'enterslug' ); ?>\" value=\"<?php echo $instance['enterslug']; ?>\" style=\"width:90%;\" />\n\t\t</p>\n\t\t<!-- Ad code -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'code' ); ?>\">Optional 300px Width Ad Code:</label>\n\t\t\t<textarea id=\"<?php echo $this->get_field_id( 'code' ); ?>\" name=\"<?php echo $this->get_field_name( 'code' ); ?>\" style=\"width:96%;\" rows=\"6\"><?php echo $instance['code']; ?></textarea>\n\t\t</p>\n\n\t<?php\n\t}", "public function form($instance)\n {\n if (isset($instance['title'])) {\n $title = $instance['title'];\n } else {\n $title = __('New title', 'wpb_widget_domain');\n }\n // Widget admin form\n?>\n <p>\n <label for=\"<?php echo $this->get_field_id('title'); ?>\"><?php _e('Title:'); ?></label>\n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('title'); ?>\" name=\"<?php echo $this->get_field_name('title'); ?>\" type=\"text\" value=\"<?php echo esc_attr($title); ?>\" />\n </p>\n<?php\n }", "public function admin_options() { ?>\n <h3><?php _e( $this->pluginTitle(), 'midtrans-woocommerce' ); ?></h3>\n <p><?php _e($this->getSettingsDescription(), 'midtrans-woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "function form( $instance ) {\n\n \t$title = esc_attr($instance['title']);\n \t$display_image = esc_attr($instance['display_image']);\n \t$num_articles = esc_attr($instance['num_articles']);\n\n \t$options = get_option('pgnyt_articles');\n \t$pgnyt_results = $options['pgnyt_results'];\n\n \trequire ('inc/widget-fields.php');\n\n }", "public function admin_options() {\n\n echo '<h3>'.__('MTN Mobile Money Settings', 'woocommerce').'</h3>';\n echo '<table class=\"form-table\">';\n\n $this->generate_settings_html();\n echo '</table>';\n }", "public function form( $instance ) {\n\t\t$fields = array(\n\t\t\t'title'\n\t\t);\n\n\t\t// Format each field into ID/Name/Value array\n\t\tforeach ( $fields as $name ) {\n\t\t\t$fields[$name] = array(\n\t\t\t\t'id' => $this->get_field_id( $name ),\n\t\t\t\t'name' => $this->get_field_name( $name ),\n\t\t\t\t'value' => null,\n\t\t\t);\n\n\t\t\tif ( isset( $instance[$name] ) ) {\n\t\t\t\t$fields[$name]['value'] = $instance[$name];\n\t\t\t}\n\t\t}\n\n\t\tif ( $fields['button_text']['value'] === null ) {\n\t\t\t$fields['button_text']['value'] = '';\n\t\t}\n\n\t\t// Display the widget in admin dashboard:\n\t\t?>\n\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr( $fields['title']['id'] ); ?>\"><?php _e( 'Title (Optional):' ); ?></label>\n\t\t\t<input class=\"widefat\" type=\"text\"\n\t\t\t id=\"<?php echo esc_attr( $fields['title']['id'] ); ?>\"\n\t\t\t name=\"<?php echo esc_attr( $fields['title']['name'] ); ?>\"\n\t\t\t value=\"<?php echo esc_attr( $fields['title']['value'] ); ?>\" />\n\t\t</p>\n\n\t\t<?php\n\t\t// Display a line about using filter tags in the ECA shortcodes.\n\t\teca_widget_filter_description();\n\t\t?>\n\n\t\t<?php\n\t}", "function form( $instance ) {\r\n\r\n\t\t/* Set up some default widget settings. */\r\n\t\t$defaults = array(\r\n 'title' => 'What Clients Says About Us'\r\n\t\t\t\t);\r\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\r\n\r\n\t\r\n <!-- Widget Title: Text Input -->\r\n\t\t<p>\r\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e('Title:', 'localization') ?></label>\r\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" />\r\n\t\t</p>\r\n\t\t<!-- Username: Text Input -->\r\n\t\t\r\n\t\t\r\n\t\t<!-- Postcount: Text Input -->\r\n\t\t\r\n\t\t\r\n\t\t<!-- Tweettext: Text Input -->\r\n\t\t\t\t\r\n\t<?php\r\n\t}", "function rp_widget_Admin() {\r\n $rp_settings = get_option(\"rp_widget_option\");\r\n\t// check if options have been updated\r\n\tif (isset($_POST['update_rp_widget'])) {\r\n\t\t$rp_settings['rp_widget_title']= strip_tags(stripslashes($_POST['rp_widget_title']));\r\n $rp_settings['rp_number'] = strip_tags(stripslashes($_POST['rp_number']));\r\n //Rev 0.0.2 - Adding Random Feature\r\n $rp_settings['rp_randomize'] = strip_tags(stripslashes($_POST['rp_randomize']));\r\n $rp_settings['rp_browse_link'] = strip_tags(stripslashes($_POST['rp_browse_link']));\r\n $rp_settings['rp_thickbox'] = strip_tags(stripslashes($_POST['rp_thickbox']));\r\n $rp_settings['rp_thickbox_path'] = strip_tags(stripslashes($_POST['rp_thickbox_path']));\r\n $rp_settings['rp_custom_css'] = strip_tags(stripslashes($_POST['rp_custom_css']));\r\n $rp_settings['rp_css'] = strip_tags(stripslashes($_POST['rp_css']));\r\n\t\tupdate_option(\"rp_widget_option\",$rp_settings);\r\n\t}\r\n\techo '<p>\r\n\t <label for=\"rp_widget_title\"><strong>Title:</strong>\r\n <input id=\"rp_widget_title\" tabindex=\"1\" name=\"rp_widget_title\" type=\"text\" size=\"15\" value=\"'.$rp_settings['rp_widget_title'].'\" />\r\n </label><br />\r\n <label for=\"rp_number\"><strong>Number of Photos:</strong>\r\n <input id=\"rp_number\" name=\"rp_number\" type=\"text\" tabindex=\"2\" size=\"3\" value=\"'.$rp_settings['rp_number'].'\" />\r\n </label><br />\r\n <label for=\"rp_randomize\"><strong>Randomize:</strong>\r\n <input type=\"checkbox\" tabindex=\"3\" name=\"rp_randomize\" ';\r\n if ($rp_settings['rp_randomize'] == 'on') echo 'checked'; \r\n echo ' />\r\n </label><br />\r\n <label for=\"rp_browse_link\"><strong>Browse Photo Link:</strong><br />\r\n <input id=\"rp_browse_link\" name=\"rp_browse_link\" type=\"text\" tabindex=\"42\" class=\"widefat\" value=\"'.$rp_settings['rp_browse_link'].'\" />\r\n </label><br />\r\n <label for=\"rp_thickbox\"><strong>Use Thickbox:</strong>\r\n <input type=\"checkbox\" tabindex=\"5\" name=\"rp_thickbox\" ';\r\n if ($rp_settings['rp_thickbox'] == 'on') echo 'checked'; \r\n echo ' />\r\n </label><br />\r\n <label for=\"rp_thickbox_path\"><strong>Wordpress Path:</strong>\r\n <input id=\"rp_thickbox_path\" name=\"rp_thickbox_path\" type=\"text\" tabindex=\"6\" size=\"15\" value=\"'.$rp_settings['rp_thickbox_path'].'\" />\r\n <br />\r\n See <a target=\"_blank\" href=\"';\r\n echo WP_PLUGIN_URL;\r\n echo '/recent-photos/readme.txt\">Readme.txt</a> for Details.\r\n <br />\r\n </label><br />\r\n <label for=\"rp_custom_css\"><strong>Use Custom CSS:</strong>\r\n <input tabindex=\"7\" type=\"checkbox\" name=\"rp_custom_css\" ';\r\n if ($rp_settings['rp_custom_css'] == 'on') echo 'checked'; \r\n echo ' />\r\n </label><br />\r\n <label for=\"rp_css\"><strong>Custom CSS:</strong><br />\r\n <textarea name=\"rp_css\" rows=\"5\" cols=\"30\" tabindex=\"8\" >';\r\necho $rp_settings['rp_css'];\r\necho '</textarea>\r\n <br />\r\n See <a target=\"_blank\" href=\"';\r\n echo WP_PLUGIN_URL;\r\n echo '/recent-photos/readme.txt\">Readme.txt</a> for Details.\r\n <br />\r\n </label><br />\r\n </p>';\r\n\techo '<input type=\"hidden\" id=\"update_rp_widget\" name=\"update_rp_widget\" value=\"1\" />';\r\n}", "public function form( $instance ) {\n\n\t\t\t/* Set up some default widget settings. */\n\t\t\t$defaults \t\t\t= array();\n\t\t\t$instance \t\t\t= wp_parse_args( (array) $instance, $defaults ); \t\t\n\t\t\t$title1\t\t\t\t= isset( $instance['title1'] ) ? strip_tags($instance['title1']) : ''; \n\t\t\t$description \t\t= isset( $instance['description'] ) ? \tstrip_tags($instance['description']) : '';\n\t\t\t$categoryid \t\t= isset( $instance['category'] ) ? $instance['category'] : 0;\n\t\t\t$select_order \t= isset( $instance['select_order'] ) ? strip_tags($instance['select_order']) : 'latest';\n\t\t\t$orderby \t\t= isset( $instance['orderby'] ) ? strip_tags($instance['orderby']) : 'ID';\n\t\t\t$order \t\t= isset( $instance['order'] ) ? strip_tags($instance['order']) : 'ASC';\n\t\t\t$number \t\t= isset( $instance['numberposts'] ) ? intval($instance['numberposts']) : 5;\n\t\t\t$item_row \t\t= isset( $instance['item_row'] ) \t? intval($instance['item_row']) : 1;\n\t\t\t$tab_active \t\t= isset( $instance['tab_active'] ) ? intval($instance['tab_active']) : 1;\n\t\t\t$columns \t\t= isset( $instance['columns'] ) ? intval($instance['columns']) : 1;\n\t\t\t$autoplay \t\t= isset( $instance['autoplay'] ) ? strip_tags($instance['autoplay']) : 'false';\n\t\t\t$interval \t\t= isset( $instance['interval'] ) ? intval($instance['interval']) : 5000;\n\t\t\t$scroll \t\t= isset( $instance['scroll'] ) ? intval($instance['scroll']) : 1;\n\t\t\t$widget_template = isset( $instance['widget_template'] ) ? strip_tags($instance['widget_template']) : 'default';\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t?>\n\n\t\t\t</p> \n\t\t\t <div style=\"background: Blue; color: white; font-weight: bold; text-align:center; padding: 3px\"> * Data Config * </div>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('title1'); ?>\"><?php _e('Title', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('title1'); ?>\" name=\"<?php echo $this->get_field_name('title1'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($title1); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('description'); ?>\"><?php _e('Description', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('description'); ?>\" name=\"<?php echo $this->get_field_name('description'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($description); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('category'); ?>\"><?php _e('Category', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<?php echo $this->category_select('category', array('allow_select_all' => true), $categoryid); ?>\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('select_order'); ?>\"><?php _e('Select Order', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<?php $allowed_key = array('latest' => 'Latest Products', 'rating' => 'Top Rating Products', 'bestsales' => 'Best Selling Products', 'featured' => 'Featured Products'); ?>\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('select_order'); ?>\"\n\t\t\t\t\tname=\"<?php echo $this->get_field_name('select_order'); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$option ='';\n\t\t\t\t\tforeach ($allowed_key as $value => $key) :\n\t\t\t\t\t\t$option .= '<option value=\"' . $value . '\" ';\n\t\t\t\t\t\tif ($value == $select_order){\n\t\t\t\t\t\t\t$option .= 'selected=\"selected\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$option .= '>'.$key.'</option>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\techo $option;\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('orderby'); ?>\"><?php _e('Orderby', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<?php $allowed_keys = array('name' => 'Name', 'author' => 'Author', 'date' => 'Date', 'title' => 'Title', 'modified' => 'Modified', 'parent' => 'Parent', 'ID' => 'ID', 'rand' =>'Rand', 'comment_count' => 'Comment Count'); ?>\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('orderby'); ?>\"\n\t\t\t\t\tname=\"<?php echo $this->get_field_name('orderby'); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$option ='';\n\t\t\t\t\tforeach ($allowed_keys as $value => $key) :\n\t\t\t\t\t\t$option .= '<option value=\"' . $value . '\" ';\n\t\t\t\t\t\tif ($value == $orderby){\n\t\t\t\t\t\t\t$option .= 'selected=\"selected\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$option .= '>'.$key.'</option>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\techo $option;\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p>\n\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('order'); ?>\"><?php _e('Order', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('order'); ?>\" name=\"<?php echo $this->get_field_name('order'); ?>\">\n\t\t\t\t\t<option value=\"DESC\" <?php if ($order=='DESC'){?> selected=\"selected\"\n\t\t\t\t\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('Descending', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\n\t\t\t\t\t<option value=\"ASC\" <?php if ($order=='ASC'){?> selected=\"selected\"\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('Ascending', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\n\t\t\t\t</select>\n\t\t\t</p>\n\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('numberposts'); ?>\"><?php _e('Number of Posts', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('numberposts'); ?>\" name=\"<?php echo $this->get_field_name('numberposts'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($number); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<?php $row_number = array( '1' => 1, '2' => 2, '3' => 3 ); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('item_row'); ?>\"><?php _e('Number row per column: ', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('item_row'); ?>\"\n\t\t\t\t\tname=\"<?php echo $this->get_field_name('item_row'); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$option ='';\n\t\t\t\t\tforeach ($row_number as $key => $value) :\n\t\t\t\t\t\t$option .= '<option value=\"' . $value . '\" ';\n\t\t\t\t\t\tif ($value == $item_row){\n\t\t\t\t\t\t\t$option .= 'selected=\"selected\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$option .= '>'.$key.'</option>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\techo $option;\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p> \n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('tab_active'); ?>\"><?php _e('Tab active: ', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('tab_active'); ?>\" name=\"<?php echo $this->get_field_name('tab_active'); ?>\" type=\"text\" \n\t\t\t\t\tvalue=\"<?php echo esc_attr($tab_active); ?>\" />\n\t\t\t</p> \n\t\t\t\n\t\t\t<?php $number = array('1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('columns'); ?>\"><?php _e('Number of Columns >1200px: ', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('columns'); ?>\"\n\t\t\t\t\tname=\"<?php echo $this->get_field_name('columns'); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$option ='';\n\t\t\t\t\tforeach ($number as $key => $value) :\n\t\t\t\t\t\t$option .= '<option value=\"' . $value . '\" ';\n\t\t\t\t\t\tif ($value == $columns){\n\t\t\t\t\t\t\t$option .= 'selected=\"selected\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$option .= '>'.$key.'</option>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\techo $option;\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p> \n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('autoplay'); ?>\"><?php _e('Auto Play', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('autoplay'); ?>\" name=\"<?php echo $this->get_field_name('autoplay'); ?>\">\n\t\t\t\t\t<option value=\"false\" <?php if ($autoplay=='false'){?> selected=\"selected\"\n\t\t\t\t\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('False', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\n\t\t\t\t\t<option value=\"true\" <?php if ($autoplay=='true'){?> selected=\"selected\"\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('True', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\n\t\t\t\t</select>\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('interval'); ?>\"><?php _e('Interval', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('interval'); ?>\" name=\"<?php echo $this->get_field_name('interval'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($interval); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('scroll'); ?>\"><?php _e('Total Items Slided', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('scroll'); ?>\" name=\"<?php echo $this->get_field_name('scroll'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($scroll); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('widget_template'); ?>\"><?php _e(\"Template\", 'sw_woocommerce')?></label>\n\t\t\t\t<br/>\n\t\t\t\t\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('widget_template'); ?>\"\tname=\"<?php echo $this->get_field_name('widget_template'); ?>\">\n\t\t\t\t\t<option value=\"default\" <?php if ($widget_template=='default'){?> selected=\"selected\"\n\t\t\t\t\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('Default', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\t\t\t\t\n\t\t\t\t</select>\n\t\t\t</p> \n\t\t<?php\n\t\t}", "public function form( $instance ) {\n\n\t\t\t/* Set up some default widget settings. */\n\t\t\t$defaults = array();\n\t\t\t$instance = wp_parse_args( (array) $instance, $defaults ); \t\t\n\t\t\t\t\t \n\t\t\t$title1 \t\t\t= isset( $instance['title1'] ) \t\t? \tstrip_tags($instance['title1']) : '';\n\t\t\t$description \t\t= isset( $instance['description'] ) \t? \tstrip_tags($instance['description']) : '';\n\t\t\t$categoryid \t\t= isset( $instance['category'] ) \t\t? $instance['category'] : null;\n\t\t\t$number \t\t= isset( $instance['numberposts'] ) \t? intval($instance['numberposts']) : 5;\n\t\t\t$orderby \t\t= isset( $instance['orderby'] ) \t? strip_tags($instance['orderby']) : 'ID';\n\t\t\t$columns \t\t= isset( $instance['columns'] ) \t? intval($instance['columns']) : 1;\n\t\t\t$autoplay \t\t= isset( $instance['autoplay'] ) \t? strip_tags($instance['autoplay']) : 'true';\n\t\t\t$interval \t\t= isset( $instance['interval'] ) \t? intval($instance['interval']) : 5000;\n\t\t\t$scroll \t\t= isset( $instance['scroll'] ) \t? intval($instance['scroll']) : 1;\n\t\t\t$widget_template \t= isset( $instance['widget_template'] ) ? strip_tags($instance['widget_template']) : 'default';\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t?>\t\t\n\t\t\t</p> \n\t\t\t <div style=\"background: Blue; color: white; font-weight: bold; text-align:center; padding: 3px\"> * Data Config * </div>\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('title1'); ?>\"><?php _e('Title', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('title1'); ?>\" name=\"<?php echo $this->get_field_name('title1'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($title1); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('description'); ?>\"><?php _e('Description', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('description'); ?>\" name=\"<?php echo $this->get_field_name('description'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($description); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<p id=\"wgd-<?php echo $this->get_field_id('category'); ?>\">\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('category'); ?>\"><?php _e('Category', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<?php echo $this->category_select('category', array('allow_select_all' => true), $categoryid); ?>\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('numberposts'); ?>\"><?php _e('Number of Posts', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('numberposts'); ?>\" name=\"<?php echo $this->get_field_name('numberposts'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($number); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t\n\t\t\t<?php $number = array('1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('columns'); ?>\"><?php _e('Number of Columns >1200px: ', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('columns'); ?>\"\n\t\t\t\t\tname=\"<?php echo $this->get_field_name('columns'); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$option ='';\n\t\t\t\t\tforeach ($number as $key => $value) :\n\t\t\t\t\t\t$option .= '<option value=\"' . $value . '\" ';\n\t\t\t\t\t\tif ($value == $columns){\n\t\t\t\t\t\t\t$option .= 'selected=\"selected\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$option .= '>'.$key.'</option>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\techo $option;\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p> \n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('autoplay'); ?>\"><?php _e('Auto Play', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('autoplay'); ?>\" name=\"<?php echo $this->get_field_name('autoplay'); ?>\">\n\t\t\t\t\t<option value=\"false\" <?php if ($autoplay=='false'){?> selected=\"selected\"\n\t\t\t\t\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('False', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\n\t\t\t\t\t<option value=\"true\" <?php if ($autoplay=='true'){?> selected=\"selected\"\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('True', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\n\t\t\t\t</select>\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('interval'); ?>\"><?php _e('Interval', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('interval'); ?>\" name=\"<?php echo $this->get_field_name('interval'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($interval); ?>\" />\n\t\t\t</p>\t\t\t\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('scroll'); ?>\"><?php _e('Total Items Slided', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('scroll'); ?>\" name=\"<?php echo $this->get_field_name('scroll'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($scroll); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('widget_template'); ?>\"><?php _e(\"Template\", 'sw_woocommerce')?></label>\n\t\t\t\t<br/>\n\t\t\t\t\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('widget_template'); ?>\"\tname=\"<?php echo $this->get_field_name('widget_template'); ?>\">\n\t\t\t\t\t<option value=\"default\" <?php if ($widget_template=='default'){?> selected=\"selected\"\n\t\t\t\t\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('Default', 'sw_woocommerce')?>\t\t\n\t\t\t\t\t</option>\t\t\t\t\t\t\t\t\n\t\t\t\t</select>\n\t\t\t</p> \n\t\t<?php\n\t\t}", "function form( $instance ) {\n\n\t\t$defaults = array( 'title' => 'Title', 'links' => 'on', 'number' => 4);\n\n\t\t$instance = wp_parse_args( (array) $instance, $defaults ); ?>\n\n\n\n\t\t<!-- Widget Title: Text Input -->\n\n\t\t<p>\n\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\">Title:</label>\n\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" value=\"<?php echo $instance['title']; ?>\" style=\"width:90%;\" />\n\n\t\t</p>\n\n\n\n\t\t<!-- Category -->\n\n\t\t<p>\n\n\t\t\t<label for=\"<?php echo $this->get_field_id('categories'); ?>\">Select category:</label>\n\n\t\t\t<select id=\"<?php echo $this->get_field_id('categories'); ?>\" name=\"<?php echo $this->get_field_name('categories'); ?>\" style=\"width:100%;\">\n\n\t\t\t\t<option value='all' <?php if ('all' == $instance['categories']) echo 'selected=\"selected\"'; ?>>All Categories</option>\n\n\t\t\t\t<?php $categories = get_categories('hide_empty=0&depth=1&type=post'); ?>\n\n\t\t\t\t<?php foreach($categories as $category) { ?>\n\n\t\t\t\t<option value='<?php echo $category->term_id; ?>' <?php if ($category->term_id == $instance['categories']) echo 'selected=\"selected\"'; ?>><?php echo $category->cat_name; ?></option>\n\n\t\t\t\t<?php } ?>\n\n\t\t\t</select>\n\n\t\t</p>\n\n\n\n\t\t<!-- Number of posts -->\n\n\t\t<p>\n\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'number' ); ?>\">Number of posts to display:</label>\n\n\t\t\t<input id=\"<?php echo $this->get_field_id( 'number' ); ?>\" name=\"<?php echo $this->get_field_name( 'number' ); ?>\" value=\"<?php echo $instance['number']; ?>\" size=\"3\" />\n\n\t\t</p>\n\n\n\n\n\n\t<?php\n\n\t}", "public function render_widget() {\n\t\t$this->get_db_values();\n\t\tif ( wponion_is_callable( $this->option( 'callback' ) ) ) {\n\t\t\techo wponion_callback( $this->option( 'callback' ), array( $this->get_db_values(), $this ) );\n\t\t}\n\t}", "protected function form()\n {\n return Admin::form(MenuTag::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->select('tag_id', 'Tag')\n ->options(\\App\\Tag::all()->pluck('name', 'id'));\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n\n $form->saved(function () {\n Cache::forget('menu-tags');\n });\n });\n }", "protected function form()\n {\n return Admin::form(StoreApply::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }", "function form( $instance ) {\n\n\t\t\t\t // instance exist? if not set defaults\n\t\tif ( $instance ) {\n\t\t\t$title = $instance['title'];\n\t\t\t$types = $instance['types'];\n\t\t\t$num = $instance['num'];\n\t\t\t$width = $instance['width'];\n\t\t\t$image_size = $instance['image_size'];\n\t\t} else {\n\t\t\t//These are our defaults\n\t\t\t$title = '';\n\t\t\t$types = 'post';\n\t\t\t$num = '5';\n\t\t\t$width = '50%';\n\t\t\t$image_size = 'thumbnail';\n\t\t}\n\t\t\n\t\t/* Set up some default widget settings. \n\t\t$defaults = array( \n\t\t\t'title' => __('Featured content', 'showshop'),\n\t\t\t'num' => 6,\n\t\t\t'width'=>'45%',\n\t\t\t'image_size' => 'thumbnail' ,\n\t\t\t'types' => 'post'\n\t\t\t);\n\t\t\t\n\t\t$instance = wp_parse_args( (array) $instance, $defaults );\n\t\t*/\n\t\t$types = explode(',', $types);\n\t\t\n\t\t//Count number of post types for select box sizing\n\t\t$custom_post_list_types = get_post_types( array( 'public' => true ), 'names' );\n\t\tforeach ($custom_post_list_types as $custom_post_list ) {\n\t\t $custom_post_list_ar[] = $custom_post_list;\n\t\t}\n\t\t$n = count($custom_post_list_ar);\n\t\tif($n > 10) { $n = 10;}\n\t\t?>\n\t\t\n\t\t\n\t\t<!-- Widget Title: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr($this->get_field_id( 'title' )); ?>\"><?php esc_html_e('Title:', 'showshop'); ?></label>\n\t\t\t<input id=\"<?php echo esc_attr($this->get_field_id( 'title' )); ?>\" name=\"<?php echo esc_attr($this->get_field_name( 'title' )); ?>\" value=\"<?php echo sanitize_text_field($title); ?>\" style=\"width:100%;\" />\n\t\t</p>\n\t\t\n\t\t<!-- Number of images: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr($this->get_field_id( 'num' )); ?>\"><?php esc_html_e('Number of images:', 'showshop'); ?></label>\n\t\t\t<input id=\"<?php echo esc_attr($this->get_field_id( 'num' )); ?>\" name=\"<?php echo esc_attr($this->get_field_name( 'num' )); ?>\" value=\"<?php echo sanitize_text_field($num); ?>\" style=\"width:100%;\" />\n\t\t</p>\n\t\t\n\t\t<!-- Post types : multislect -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr($this->get_field_id('types')); ?>\"><?php esc_html_e( 'Post type:','showshop' ); ?></label>\n\t\t\t<select name=\"<?php echo esc_attr($this->get_field_name('types')); ?>[]\" id=\"<?php echo esc_attr($this->get_field_id('types')); ?>\" class=\"widefat\" style=\"height: auto;\" size=\"<?php echo esc_attr($n) ?>\" >\n\t\t\t<?php \n\t\t\t$args = array( 'public' => true );\n\t\t\t$post_types = get_post_types( $args, 'names' );\n\t\t\tforeach ($post_types as $post_type ) { \n\t\t\t\tif( !( $post_type == 'revision' || $post_type == 'nav_menu_item' || $post_type == 'attachment' || $post_type == 'options' || $post_type == 'slogan')) {\n\t\t\t?>\n\t\t\t\t<option value=\"<?php echo esc_attr($post_type); ?>\" <?php if( in_array($post_type, $types)) { echo 'selected=\"selected\"'; } ?>><?php echo esc_html($post_type);?></option>\n\t\t\t<?php \n\t\t\t\t} //endif\n\t\t\t}// end foreach\n\t\t\t?>\n\t\t\t</select>\n\t\t</p>\n\n\t\t<!-- Image sizes : select -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr($this->get_field_id('image_size')); ?>\"><?php esc_html_e( 'Image sizes:','showshop' ); ?></label>\n\t\t\t<?php \n\t\t\t$sizes = array();\n\t\t\t$image_sizes = array();\n\t\t\t$added_sizes = get_intermediate_image_sizes();\n\t\t\t\n\t\t\tforeach( $added_sizes as $key => $value) {\n\t\t\t\t$image_sizes[$value] = $value;\n\t\t\t}\n\t\t\t?>\n\t\t\t\n\t\t\t<select id=\"<?php echo esc_attr($this->get_field_id('image_size')); ?>\" name=\"<?php echo esc_attr($this->get_field_name('image_size')); ?>\">\n\t\t\t\n\t\t\t<?php \n\t\t\tforeach($image_sizes as $key=>$value) {\n\t\t\t\techo '<option value=\"'.$key.'\" '.selected( $instance['image_size'], $key, false ).'>'.htmlspecialchars($value).'</option>';\n\t\t\t}\n\t\t\t?>\n\t\t\t</select>\n\t\t\t\n\n\t\t</p>\n\t\n\t\t<!-- Images width: Text Input -->\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr($this->get_field_id( 'width' )); ?>\"><?php esc_html_e('Image width in px or % (height is set auto):', 'showshop'); ?></label>\n\t\t\t<input id=\"<?php echo esc_attr($this->get_field_id( 'width' )); ?>\" name=\"<?php echo esc_attr($this->get_field_name( 'width' )); ?>\" value=\"<?php echo sanitize_text_field($width); ?>\" style=\"width:100%;\" />\n\t\t</p>\n\t\t\n\t<?php\n\t}", "function form($instance) {\n $instance = wp_parse_args( (array) $instance, array( 'title' => 'WP-Popular Posts Tool', 'itemsQuantity' => 5, 'catId' => 0 ) );\n $title = strip_tags($instance['title']);\n $itemsQuantity = absint($instance['itemsQuantity']);\n $catId = absint($instance['catId']);\n $displayMode = absint($instance['displayMode']);\n $disableCommentCount = absint($instance['disableCommentCount']);\n $barsLocation = absint($instance['barsLocation']);\n ?>\n \n <p><label for=\"<?php echo $this->get_field_id('title'); ?>\">\n <?php echo esc_html__('Title'); ?>: \n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('title'); ?>\" name=\"<?php echo $this->get_field_name('title'); ?>\" \n type=\"text\" value=\"<?php echo attribute_escape($title); ?>\" />\n </label></p>\n \n <p><label for=\"<?php echo $this->get_field_id('itemsQuantity'); ?>\">\n <?php echo esc_html__('Number of items to show'); ?>: \n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('itemsQuantity'); ?>\" name=\"<?php echo $this->get_field_name('itemsQuantity'); ?>\" \n type=\"text\" value=\"<?php echo attribute_escape($itemsQuantity); ?>\" />\n </label></p> \n \n <p><label for=\"<?php echo $this->get_field_id('catId'); ?>\">\n <?php echo esc_html__('Id of the cateogory or tag (leave it blank for automatic detection)'); ?>: \n <input class=\"widefat\" id=\"<?php echo $this->get_field_id('catId'); ?>\" name=\"<?php echo $this->get_field_name('catId'); ?>\" \n type=\"text\" value=\"<?php echo attribute_escape($catId); ?>\" />\n </label></p>\n \n <p><label for=\"<?php echo $this->get_field_id('displayMode'); ?>\">\n <?php echo esc_html__('Display mode'); ?>: \n <select class=\"widefat\" id=\"<?php echo $this->get_field_id('displayMode'); ?>\" name=\"<?php echo $this->get_field_name('displayMode'); ?>\" \n type=\"text\">\n <option value=\"0\" <?php if($displayMode == 0) echo 'selected'; ?>>Text Only</option>\n <option value=\"1\" <?php if($displayMode == 1) echo 'selected'; ?>>Graphic</option>\n </select>\n </label></p>\n \n <p><label for=\"<?php echo $this->get_field_id('barsLocation'); ?>\">\n <?php echo esc_html__('Bars Location (if mode = Graphic)'); ?>: \n <select class=\"widefat\" id=\"<?php echo $this->get_field_id('barsLocation'); ?>\" name=\"<?php echo $this->get_field_name('barsLocation'); ?>\" \n type=\"text\">\n <option value=\"0\" <?php if($barsLocation == 0) echo 'selected'; ?>>Left</option>\n <option value=\"1\" <?php if($barsLocation == 1) echo 'selected'; ?>>Right</option>\n </select>\n </label></p> \n \n <p><label for=\"<?php echo $this->get_field_id('disableCommentCount'); ?>\">\n <?php echo esc_html__('Disable comment count'); ?>: \n <select class=\"widefat\" id=\"<?php echo $this->get_field_id('disableCommentCount'); ?>\" name=\"<?php echo $this->get_field_name('disableCommentCount'); ?>\" \n type=\"text\">\n <option value=\"0\" <?php if($disableCommentCount == 0) echo 'selected'; ?>>No</option>\n <option value=\"1\" <?php if($disableCommentCount == 1) echo 'selected'; ?>>Yes</option>\n </select>\n </label></p> \n \n <?php\n }", "function adminOptions() {\r\n\t\t\tTrackTheBookView::render('admin-options');\r\n\t\t}", "public function admin_options() {\n\n\t\tparent::admin_options();\n\n\t\tob_start();\n\t\t?>\n\t\t// Hide service labels if admin opts to show carrier service levels\n\t\t$( '.hide_service_labels_if_checked' ).change( function() {\n\n\t\t\t\tif ( $( this ).is( ':checked' ) ) {\n\t\t\t\t\t$( this ).closest( 'tr' ).nextUntil( 'p' ).hide();\n\t\t\t\t} else {\n\t\t\t\t\t$( this ).closest( 'tr' ).nextUntil( 'p' ).show();\n\t\t\t\t}\n\t\t} ).change();\n\t\t// Hide additional handling fee field if there's no base handling fee entered\n\t\t$( 'input[name=\"woocommerce_shipwire_handling_fee\"]' ).change( function() {\n\t\t\tif ( '' === $( this ).val() ) {\n\t\t\t\t$( 'input[name=\"woocommerce_shipwire_additional_handling_fee\"]' ).closest( 'tr' ).hide();\n\t\t\t} else {\n\t\t\t\t$( 'input[name=\"woocommerce_shipwire_additional_handling_fee\"]' ).closest( 'tr' ).show();\n\t\t\t}\n\t\t} ).change();\n\n\t\t<?php\n\t\twc_enqueue_js( ob_get_clean() );\n\t}", "public function admin() {\n global $wpdb;\n $action = filter_input(INPUT_GET, 'action');\n \n echo '<div class=\"wrap\"><h2>';\n BUtils::e('Simple Membership Form Builder');\n echo '</h2>';\n // Save current user ID\n $current_user = wp_get_current_user();\n $user_id = $current_user->ID;\n $current_tab = empty($action) ? '' : $action;\n $tabs = array('' => \"Form List\", 'add' => 'New Form', 'license' => 'Product License');\n echo '<h2 class=\"nav-tab-wrapper\">';\n foreach ($tabs as $tab_key => $tab_caption) {\n $active = $current_tab == $tab_key ? 'nav-tab-active' : '';\n echo '<a class=\"nav-tab ' . $active . '\" href=\"admin.php?page=swpm-form-builder&action=' . $tab_key . '\">' . $tab_caption . '</a>';\n }\n echo '</h2>';\n switch ($action) {\n case 'add':\n $this->admin_add_new();\n break;\n case 'license':\n $this->admin_license_menu();\n break;\n case 'edit':\n default:\n $form_nav_selected_id = filter_input(INPUT_GET, 'form');\n if (empty($form_nav_selected_id) || $form_nav_selected_id == 0) {\n $this->all_forms();\n } else {\n include_once( SWPM_FORM_BUILDER_PATH . 'includes/admin-form-creator.php' );\n }\n break;\n }\n echo '</div>';\n }", "public function admin_page_display() {\n\t\t?>\n\t\t<div class=\"wrap cmb2-options-page <?php echo $this->key; ?>\">\n\t\t\t<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>\n\t\t\t<?php cmb2_metabox_form( $this->metabox_id, $this->key ); ?>\n\t\t\t\n\t\t</div>\n\t\t<?php\n\t}" ]
[ "0.7020549", "0.6941775", "0.686973", "0.686973", "0.686973", "0.6818043", "0.6783759", "0.6770649", "0.6711623", "0.67031276", "0.66955626", "0.6692557", "0.6607335", "0.6536889", "0.6533033", "0.65312326", "0.6526317", "0.65211505", "0.6498352", "0.6497084", "0.6483725", "0.64618665", "0.64528733", "0.64476293", "0.6419476", "0.64058495", "0.6399211", "0.6384181", "0.63719034", "0.63713413", "0.6368129", "0.6367091", "0.6365253", "0.63611454", "0.6350887", "0.63478786", "0.63439906", "0.63433605", "0.63423467", "0.63389593", "0.63338745", "0.63335913", "0.6325648", "0.6299157", "0.6282704", "0.6261919", "0.62545645", "0.6253922", "0.6251426", "0.6238744", "0.6229813", "0.6217899", "0.6215421", "0.6209967", "0.62057054", "0.6203159", "0.61933833", "0.6181345", "0.6175864", "0.6160681", "0.61482084", "0.6146415", "0.6139204", "0.61383975", "0.6135757", "0.6127877", "0.6119652", "0.6100738", "0.609249", "0.60920316", "0.6091571", "0.60842466", "0.60830414", "0.6082576", "0.60811484", "0.60784644", "0.6078189", "0.60776013", "0.60736495", "0.60686874", "0.606852", "0.60633093", "0.60572386", "0.6053333", "0.6051201", "0.6050181", "0.6039152", "0.6031565", "0.60306984", "0.602575", "0.60242045", "0.60205", "0.601971", "0.60171396", "0.60150766", "0.60126805", "0.60126555", "0.60126036", "0.6010863", "0.60102344" ]
0.6164758
59
Get the default settings for the widget or shortcode.
public function get_default_options() { $defaults = array(); $defaults['title'] = ''; $defaults['placeholder'] = 'Search Connections...'; return $defaults; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getDefaultWidgetSettings(){\n return array(\n 'ChatBox' => array(\n 'chatboxHeight' => 300,\n 'chatmessageHeight' => 50,\n ),\n 'NoteBox' => array(\n 'noteboxHeight' => 200,\n 'notemessageHeight' => 50,\n ),\n 'DocViewer' => array(\n 'docboxHeight' => 200,\n ),\n 'TopSites' => array(\n 'topsitesHeight' => 200,\n 'urltitleHeight' => 10,\n ),\n 'MediaBox' => array(\n 'mediaBoxHeight' => 150,\n 'hideUsers' => array(),\n ),\n 'TimeZone' => array(\n 'clockType' => 'analog'\n ),\n 'SmallCalendar' => array(\n 'justMe' => 'false'\n ),\n 'FilterControls' => array(\n 'order' => array()\n )\n );\n }", "function wp_get_widget_defaults()\n {\n }", "public static function Settings() {\r\n $settings = apply_filters( 'slp_widget_settings' , array() );\r\n return $settings[0];\r\n }", "public function getDefaultSettings();", "function rp_get_default_settings() {\n\n\t$settings = array(\n\t\t'wpdentist_item_archive_title' => __( 'WPDentist', 'wpdentist' ),\n\t\t'wpdentist_item_description' => __( 'WordPress Dentist.', 'wpdentist' )\n\t);\n\n\treturn $settings;\n}", "public function defaultSettings()\n {\n return $this->repository->get( $this->repoOptionString($this->settingsKey, $this->defaultSettingsKey), array());\n }", "public function getGeneralSettingsDefaultData()\n {\n $settings = array(\n 'enabled' => 1,\n 'pull_out' => 1,\n 'display_interval' => 1,\n 'custom_css' => '',\n 'wheel_sound' => 1,\n 'show_fireworks' => 0,\n 'pull_out_image_url' => Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'vss_spinandwin' . DS . 'gift.png'\n );\n return $settings;\n }", "protected function get_default_settings()\n {\n return [\n 'default' => [\n 'id' => '',\n 'url' => '',\n 'size' => '',\n 'name' => '',\n ],\n ];\n }", "private static function _get_default_settings()\n\t{\n\t\treturn array(\n\t\t\t'nr_api_key'\t\t\t\t\t\t=> '',\n\t\t\t'nr_apps_list'\t\t\t\t\t\t=> '', // The apps list associated with the account\n\t\t\t'nr_selected_app_servers'\t\t\t=> '', // The servers from the selected app\n\t\t\t'user_datasets'\t\t\t\t\t\t=> '', // Saved user datasets\n\t\t);\n\t}", "function bdpp_default_settings() {\n\t\n\tglobal $bdpp_options;\n\t\n\t$bdpp_options = array(\n\t\t\t\t\t'post_types'\t\t\t=> array(0 => 'post'),\n\t\t\t\t\t'trend_post_types'\t\t=> array(),\n\t\t\t\t\t'sharing_enable'\t\t=> 0,\n\t\t\t\t\t'sharing'\t\t\t\t=> array(),\n\t\t\t\t\t'sharing_lbl'\t\t\t=> esc_html__('Share this', 'blog-designer-pack'),\n\t\t\t\t\t'sharing_design'\t\t=> 'design-1',\n\t\t\t\t\t'sharing_post_types'\t=> array(),\n\t\t\t\t\t'disable_font_awsm_css'\t=> 0,\n\t\t\t\t\t'disable_owl_css'\t\t=> 0,\n\t\t\t\t\t'custom_css'\t\t\t=> '',\n\t\t\t\t);\n\n\t$default_options = apply_filters('bdpp_default_options_values', $bdpp_options );\n\n\t// Update default options\n\tupdate_option( 'bdpp_opts', $default_options );\n\t\n\t// Overwrite global variable when option is update\n\t$bdpp_options = bdpp_get_settings();\n}", "public static function get_cs_widget_options($widget_id, $default = NULL)\n {\n parent::get_settings();\n }", "function get_defaultsetting() {\n return $this->defaultsetting;\n }", "public function getDisplaySettingsDefaultData()\n {\n $settings = array(\n 'screen_size' => '320_480',\n 'display_frequency' => 1,\n 'hide_after' => 1,\n 'display_position' => 1,\n 'who_to_show' => 'all',\n 'when_to_display' => 'immediately',\n 'time_in_seconds' => 5,\n 'scroll_percent' => 10,\n 'geo_location' => 'always'\n );\n return $settings;\n }", "function getSettings() {\n\t\t$current_opts = get_option('wassup_settings');\n\t\t$default_opts = $this->defaultSettings();\n\t\t$settings = array();\n\t\tif (!empty($current_opts) && is_array($current_opts)) {\n\t\t\tforeach ($default_opts as $skey => $defaultvalue) {\n\t\t\t if (array_key_exists($skey,$current_opts)) {\n\t\t\t \t$settings[$skey] = $current_opts[$skey];\n\t\t\t } else {\n\t\t\t \t$settings[$skey] = $defaultvalue;\n\t\t\t }\n\t\t\t} //end foreach\n\t\t} else {\n\t\t\t$settings = $default_opts;\n\t\t}\n\t\treturn $settings;\n\t}", "public function get_settings() {\n\n\t\t$settings = get_option($this->option_name);\n\n\t\tif ( false === $settings && isset($this->alt_option_name) )\n\t\t\t$settings = get_option($this->alt_option_name);\n\n\t\tif ( !is_array($settings) )\n\t\t\t$settings = array();\n\n\t\tif ( !empty($settings) && !array_key_exists('_multiwidget', $settings) ) {\n\t\t\t// old format, convert if single widget\n\t\t\t$settings = wp_convert_widget_settings($this->id_base, $this->option_name, $settings);\n\t\t}\n\n\t\tunset($settings['_multiwidget'], $settings['__i__']);\n\t\treturn $settings;\n\t}", "public static function get_settings() {\n\t\treturn array_merge( SpamLyticsHelper::default_settings(), get_option( 'spamlytics', array() ) );\n\t}", "function pixgraphy_get_option_defaults_values() {\n\t\tglobal $pixgraphy_default_values;\n\t\t$pixgraphy_default_values = array(\n\t\t\t'pixgraphy_responsive'\t=> 'on',\n\t\t\t'pixgraphy_column_post'\t=>'four',\n\t\t\t'pixgraphy_border_column'\t=>'on',\n\t\t\t'pixgraphy_design_layout' => 'wide-layout',\n\t\t\t'pixgraphy_animate_css'\t=> 'on',\n\t\t\t'pixgraphy_sidebar_layout_options' => 'right',\n\t\t\t'pixgraphy_photography_layout' => 'photography_layout',\n\t\t\t'pixgraphy_search_custom_header' => 0,\n\t\t\t'pixgraphy-img-upload-footer-image' => '',\n\t\t\t'pixgraphy-footer-title'\t=> '',\n\t\t\t'pixgraphy-footer-link'\t=> '#',\n\t\t\t'pixgraphy_header_display'=> 'header_text',\n\t\t\t'pixgraphy_categories'\t=> array(),\n\t\t\t'pixgraphy_custom_css'\t=> '',\n\t\t\t'pixgraphy_scroll'\t=> 0,\n\t\t\t'pixgraphy_tag_text' => esc_html__('Read More','pixgraphy'),\n\t\t\t'pixgraphy_excerpt_length'\t=> '20',\n\t\t\t'pixgraphy_single_post_image' => 'off',\n\t\t\t'pixgraphy_reset_all' => 0,\n\t\t\t'pixgraphy_stick_menu'\t=>0,\n\t\t\t'pixgraphy_blog_post_image' => 'on',\n\t\t\t'pixgraphy_entry_format_blog' => 'excerptblog_display',\n\t\t\t'pixgraphy_search_text' => esc_html__('Search &hellip;','pixgraphy'),\n\t\t\t'pixgraphy_blog_content_layout'\t=> '',\n\t\t\t'pixgraphy_display_page_featured_image'=>0,\n\t\t\t/* Slider Settings */\n\t\t\t'pixgraphy_slider_type'\t=> 'default_slider',\n\t\t\t'pixgraphy_slider_link' =>0,\n\t\t\t'pixgraphy_enable_slider' => 'frontpage',\n\t\t\t'pixgraphy_transition_effect' => 'fade',\n\t\t\t'pixgraphy_transition_delay' => '4',\n\t\t\t'pixgraphy_transition_duration' => '1',\n\t\t\t/* Front page feature */\n\t\t\t'pixgraphy_entry_format_blog' => 'show',\n\t\t\t'pixgraphy_entry_meta_blog' => 'show-meta',\n\t\t\t/*Social Icons */\n\t\t\t'pixgraphy_top_social_icons' =>0,\n\t\t\t'pixgraphy_buttom_social_icons'\t=>0,\n\t\t\t'pixgraphy_social_facebook'=> '',\n\t\t\t'pixgraphy_social_twitter'=> '',\n\t\t\t'pixgraphy_social_pinterest'=> '',\n\t\t\t'pixgraphy_social_dribbble'=> '',\n\t\t\t'pixgraphy_social_instagram'=> '',\n\t\t\t'pixgraphy_social_flickr'=> '',\n\t\t\t'pixgraphy_social_googleplus'=> '',\n\t\t\t'pixgraphy_remove_parallax_fromheader'=>0,\n\t\t\t);\n\t\treturn apply_filters( 'pixgraphy_get_option_defaults_values', $pixgraphy_default_values );\n\t}", "function fa_get_slider_default_options(){\n\t$slider_options = require_fa_options('slider');\n\treturn $slider_options->get_defaults();\n}", "public function default_settings() : array {\n\t\treturn [\n\t\t\t'layout' => 'block',\n\t\t\t'newsletter' => '',\n\t\t\t'theme' => 'light',\n\t\t\t'type' => 'subscribe',\n\t\t];\n\t}", "private static function default_settings() {\n\t\treturn array(\n\t\t\t'module_ga' => true,\n\t\t\t'module_ip' => true,\n\t\t\t'module_log' => true,\n\t\t\t'sent_data' => false,\n\t\t\t'api_key' => '',\n\t\t\t'mark_as_approved' => true,\n\t\t);\n\t}", "private static function initialize_defaults() {\r\n\t\t\tself::$default_settings['credentials'] = array();\r\n\r\n\t\t\tself::$default_settings['has_first_question'] = 'no';\r\n\r\n\t\t\t// We want the Urtaks to appear by default, so let's append them\r\n\t\t\tself::$default_settings['placement'] = 'append';\r\n\r\n\t\t\t// We want to default post types to 'post' and 'page'\r\n\t\t\tself::$default_settings['post-types'] = array('page', 'post');\r\n\r\n\t\t\t// We want users to be able to start Urtaks by default\r\n\t\t\tself::$default_settings['user-start'] = 'yes';\r\n\r\n\t\t\t// We want Urtaks to support community moderation by default so that we get more questions and responses\r\n\t\t\tself::$default_settings['moderation'] = 'community';\r\n\r\n\t\t\t// Auto height and width\r\n\t\t\tself::$default_settings['height'] = '';\r\n\t\t\tself::$default_settings['width'] = '';\r\n\r\n\t\t\t// Counter settings\r\n\t\t\tself::$default_settings['counter-icon'] = 'yes';\r\n\t\t\tself::$default_settings['counter-responses'] = 'yes';\r\n\r\n\t\t\t// Profanity\r\n\t\t\tself::$default_settings['blacklisting'] = 'no';\r\n\t\t\tself::$default_settings['blacklist_override'] = 'no';\r\n\t\t\tself::$default_settings['blacklist_words'] = '';\r\n\t\t}", "function get_settings() {\n\n $defaults = [\n 'general' => [\n 'label' => __( 'General', 'fwp' ),\n 'fields' => [\n 'license_key' => [\n 'label' => __( 'License Key', 'fwp' ),\n 'html' => $this->get_field_html( 'license_key' )\n ],\n 'gmaps_api_key' => [\n 'label' => __( 'Google Maps API Key', 'fwp' ),\n 'html' => $this->get_field_html( 'gmaps_api_key' )\n ],\n 'separators' => [\n 'label' => __( 'Separators', 'fwp' ),\n 'html' => $this->get_field_html( 'separators' )\n ],\n 'loading_animation' => [\n 'label' => __( 'Loading Animation', 'fwp' ),\n 'html' => $this->get_field_html( 'loading_animation', 'dropdown', [\n 'choices' => [ 'fade' => __( 'Fade', 'fwp' ), '' => __( 'Spin', 'fwp' ), 'none' => __( 'None', 'fwp' ) ]\n ] )\n ],\n 'prefix' => [\n 'label' => __( 'URL Prefix', 'fwp' ),\n 'html' => $this->get_field_html( 'prefix', 'dropdown', [\n 'choices' => [ 'fwp_' => 'fwp_', '_' => '_' ]\n ] )\n ],\n 'debug_mode' => [\n 'label' => __( 'Debug Mode', 'fwp' ),\n 'html' => $this->get_field_html( 'debug_mode', 'toggle', [\n 'true_value' => 'on',\n 'false_value' => 'off'\n ] )\n ]\n ]\n ],\n 'woocommerce' => [\n 'label' => __( 'WooCommerce', 'fwp' ),\n 'fields' => [\n 'wc_enable_variations' => [\n 'label' => __( 'Support product variations?', 'fwp' ),\n 'notes' => __( 'Enable if your store uses variable products.', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_enable_variations', 'toggle' )\n ],\n 'wc_index_all' => [\n 'label' => __( 'Include all products?', 'fwp' ),\n 'notes' => __( 'Show facet choices for out-of-stock products?', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_index_all', 'toggle' )\n ]\n ]\n ],\n 'backup' => [\n 'label' => __( 'Backup', 'fwp' ),\n 'fields' => [\n 'export' => [\n 'label' => __( 'Export', 'fwp' ),\n 'html' => $this->get_field_html( 'export' )\n ],\n 'import' => [\n 'label' => __( 'Import', 'fwp' ),\n 'html' => $this->get_field_html( 'import' )\n ]\n ]\n ]\n ];\n\n if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) {\n unset( $defaults['woocommerce'] );\n }\n\n return apply_filters( 'facetwp_settings_admin', $defaults, $this );\n }", "public static function get_settings_defaults(){\r\n\t\t\r\n\t\t$defaults = array();\r\n\t\tforeach( self::init_settings() as $settings ){\r\n\t\t\tforeach( $settings as $setting ){\r\n\t\t\t\tif( isset( $setting['id'] ) && isset( $setting['default'] ) ){\r\n\t\t\t\t\t$defaults[$setting['id']] = $setting['default'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $defaults;\r\n\t\t\r\n\t}", "function MCW_get_default_options() {\n $cache_filters = array(array('all', 'true'), \n array('home', 'is_home()'),\n array('single', 'is_single()'),\n array('page', 'is_page()'),\n array('category', 'is_category()'), \n array('tag', 'is_tag()'),\n array('archive', 'is_archive()'),\n array('search', 'is_search()'));\n\n $cache_options = array('filters' => $cache_filters, \n 'use_add_html' => 'no', \n 'allow_js' => 'yes',\n 'copy_widget' => 'no',\n 'std_kind' => 'html', \n 'code_height' => 200,\n 'filter_width' => 75,\n 'wpfilter' => '',\n 'outfilter' => 'the_content',\n 'use_custag' => 'yes',\n 'use_wpfilter' => 'no',\n 'css_wrapper' => 'no'); \n\t\treturn $cache_options; \n \t}", "function get_default_block_editor_settings()\n {\n }", "public function getDefaultSettings() {\n $defaults = array();\n $fields = $this->getFields();\n foreach ($fields as $field) {\n $default = '';\n if (array_key_exists('default', $field) && $field['default']) {\n $default = $field['default'];\n }\n $defaults[$field['name']] = $default;\n }\n return $defaults;\n }", "function tc_get_default_options() {\r\n $def_options = get_option( \"tc_theme_defaults\");\r\n \r\n //Always update the default option when (OR) :\r\n // 1) they are not defined\r\n // 2) customzing => takes into account if user has set a filter or added a new customizer setting\r\n // 3) theme version not defined\r\n // 4) versions are different\r\n if ( ! $def_options || $this -> is_customizing || ! isset($def_options['ver']) || 0 != version_compare( $def_options['ver'] , CUSTOMIZR_VER ) ) {\r\n $def_options = $this -> tc_generate_default_options( $this -> tc_customizer_map( $get_default_option = 'true' ) , 'tc_theme_options' );\r\n //Adds the version\r\n $def_options['ver'] = CUSTOMIZR_VER;\r\n update_option( \"tc_theme_defaults\" , $def_options );\r\n }\r\n return apply_filters( 'tc_default_options', $def_options );\r\n }", "function wpsl_get_settings() {\n\n $settings = get_option( 'wpsl_settings' );\n\n if ( !$settings ) {\n update_option( 'wpsl_settings', wpsl_get_default_settings() );\n $settings = wpsl_get_default_settings();\n }\n\n return $settings;\n}", "static function register_default_settings() {\n\t\tself::register_setting( 'builder_access', array(\n\t\t\t'default' => 'all',\n\t\t\t'group' => __( 'Frontend', 'fl-builder' ),\n\t\t\t'label' => __( 'Builder Access', 'fl-builder' ),\n\t\t\t'description' => __( 'The selected roles will have access to the builder for editing posts, pages, and CPTs.', 'fl-builder' ),\n\t\t\t'order' => '1',\n\t\t) );\n\n\t\tself::register_setting( 'unrestricted_editing', array(\n\t\t\t'default' => 'all',\n\t\t\t'group' => __( 'Frontend', 'fl-builder' ),\n\t\t\t'label' => __( 'Unrestricted Editing', 'fl-builder' ),\n\t\t\t'description' => __( 'The selected roles will have unrestricted access to all editing features within the builder.', 'fl-builder' ),\n\t\t\t'order' => '2',\n\t\t) );\n\t}", "function wpsl_get_default_setting( $setting ) {\n\n global $wpsl_default_settings;\n\n return $wpsl_default_settings[$setting];\n}", "protected static function getDefaultSettings()\n {\n return array(\n 'prefix' => '',\n 'throw_exception' => false,\n 'connection' => null\n );\n }", "public function getSettings()\n {\n return Initiatives::getInstance()->getSettings();\n }", "public function settings($widget, $options)\n {\n\n $defaultConfigs = Az::$app->smart->widget->defaultConfig($widget);\n\n $array = [\n 'grapesWrap' => 'grapesWrap',\n 'models' => 'model',\n 'attribute' => 'attribute',\n 'datas' => 'data',\n 'ids' => 'id',\n ];\n\n $config = [];\n foreach ($options as $key => $value) {\n\n if (empty($value))\n continue;\n\n if (!ZArrayHelper::keyExists($key, $array))\n $config[$key] = ZVarDumper::ajaxValue($value);\n else\n $defaultConfigs[$array[$key]] = ZVarDumper::ajaxValue($value);\n\n }\n\n $config = $this->filterOptions($widget, $config);\n\n $defaultConfigs = $this->getModel($defaultConfigs);\n $defaultConfigs['config'] = $config;\n\n return $defaultConfigs;\n\n }", "public function get_settings() {\n\t\tif ( ! is_array( $this->_settings ) ) {\n\t\t\t$this->_settings = get_option( $this->token, array() );\n\t\t}\n\t\t\n\t\tforeach ( $this->fields as $k => $v ) {\n\t\t\tif ( ! isset( $this->_settings[$k] ) && isset( $v['default'] ) ) {\n\t\t\t\t$this->_settings[$k] = $v['default'];\n\t\t\t}\n\t\t\tif ( $v['type'] == 'checkbox' && $this->_settings[$k] != true ) {\n\t\t\t\t$this->_settings[$k] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->_settings;\n\t}", "function get_theme_setting_defaults() {\n\treturn array(\n\t\t'blog_cat_num' => 12,\n\t\t'content_archive' => 'full',\n\t\t'content_archive_limit' => 0,\n\t\t'content_archive_thumbnail' => 0,\n\t\t'posts_nav' => 'numeric',\n\t\t'site_layout' => 'content-sidebar',\n\t);\n}", "public function getDefaultSettings()\n {\n return array(\n // by separating them with ':'\n 'ldelim' => '{', // tag delimiter\n 'rdelim' => '}',\n 'extension' => '.html', // template file extension\n );\n }", "function buddyexpressdesk_settings(){\n $settings = new stdClass;\n\t$GET = new BDESK_DB;\n $GET->statement('SELECT * FROM bdesk_site LIMIT 1');\n $GET->execute();\n\t$defaults = $GET->fetch();\n\tforeach ($defaults as $name => $value) {\n\t\tif (empty($paths->$name)) {\n\t\t\t$settings->$name = $value;\n\t\t}\n\t}\n\treturn $settings;\n}", "private function get_defaults() {\n\t\treturn array(\n\t\t\t'phpbb_path' \t\t\t\t=> '',\n\t\t\t'integrateLogin' \t\t\t=> 0, \n\t\t\t'showHdrFtr' \t\t\t\t=> 'NONE',\n\t\t\t'wpSimpleHdr' \t\t\t\t=> 1,\n\t\t\t'dtdSwitch' \t\t\t\t=> 0,\n\t\t\t'phpbbCensor' \t\t\t\t=> 1,\n\t\t\t'wpPageName' \t\t\t\t=> 'page.php',\n\t\t\t'phpbbPadding' \t\t\t\t=> '6-12-6-12',\n\t\t\t'xposting' \t\t\t\t\t=> 0,\n\t\t\t'phpbbSmilies' \t\t\t\t=> 0,\n\t\t\t'avatarsync'\t\t\t\t=> 1,\n\t\t\t'integcreatewp'\t\t\t\t=> 1,\n\t\t\t'integcreatephpbb'\t\t\t=> 1,\n\t\t\t'xpostautolink' \t\t\t=> 0,\n\t\t\t'xpostspam' \t\t\t\t=> 'all',\n\t\t\t'xpostforce' \t\t\t\t=> -1,\n\t\t\t'xposttype' \t\t\t\t=> 'excerpt',\n\t\t\t'xpostprefix'\t\t\t\t=> '[BLOG] ',\n\t\t\t'cssMagic' \t\t\t\t\t=> 1,\n\t\t\t'templateVoodoo' \t\t\t=> 1,\n\t\t\t'useForumPage' \t\t\t\t=> 1\n\t\t);\n\t}", "function get_customizer_settings() {\n\tglobal $style_defaults;\n\t$styles = [];\n\t$styles[ WPM_PREFIX . 'customization_general' ] = get_option(\n\t\tWPM_PREFIX . 'customization_general',\n\t\t$style_defaults[ WPM_PREFIX . 'customization_general' ]\n\t);\n\t$styles [ WPM_PREFIX . 'mobject_style' ] = get_option(\n\t\tWPM_PREFIX . 'mobject_style',\n\t\t$style_defaults[ WPM_PREFIX . 'mobject_style' ]\n\t);\n\t$styles [ WPM_PREFIX . 'collection_style' ] = get_option(\n\t\tWPM_PREFIX . 'collection_style',\n\t\t$style_defaults[ WPM_PREFIX . 'collection_style' ]\n\t);\n\n\tforeach ( $style_defaults as $group_name => $group ) {\n\t\tforeach ( $group as $setting => $default ) {\n\t\t\tif ( ! isset( $styles[ $group_name ][ $setting ] ) ) {\n\t\t\t\t$styles[ $group_name ][ $setting ] = $style_defaults[ $group_name ][ $setting ];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $styles;\n}", "public function get_settings() {\n\t\t$settings = parent::get_settings();\n\n\t\t$settings[] = 'ogone_directlink';\n\n\t\treturn $settings;\n\t}", "public function getDefaults();", "public function get_options() {\n\t\tif ( ! isset( $this->options ) ) {\n\t\t\t$this->options = self::wp_parse_args_recursive( get_user_meta( get_current_user_id(), 'monsterinsights_user_preferences', true ), self::$default_options );\n\t\t}\n\n\t\treturn apply_filters( 'monsterinsights_dashboard_widget_options', $this->options );\n\n\t}", "public function getSettings(){\r\n\t\treturn $this->initSettings;\r\n\t}", "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 get_settings() {\n\t\t$settings = parent::get_settings();\n\n\t\t$settings[] = 'ogone_orderstandard';\n\n\t\treturn $settings;\n\t}", "function genesis_sample_theme_setting_defaults() {\n\n\tif ( function_exists( 'genesis_update_settings' ) ) {\n\n\t\tgenesis_update_settings(\n\t\t\tarray(\n\t\t\t\t'blog_cat_num' => 6,\n\t\t\t\t'content_archive' => 'full',\n\t\t\t\t'content_archive_limit' => 0,\n\t\t\t\t'content_archive_thumbnail' => 0,\n\t\t\t\t'posts_nav' => 'numeric',\n\t\t\t\t'site_layout' => 'content-sidebar',\n\t\t\t)\n\t\t);\n\n\t}\n\n\tupdate_option( 'posts_per_page', 6 );\n\n}", "public function getProfileDefault()\n {\n return $this->getConfig('packages/global_settings_default-profile');\n }", "function bb_mystique_default_settings() {\r\n\t$defaults = array(\r\n\t\t'twitter_id' => '_GautamGupta_', // your twitter id\r\n\t\t'twitter_count' => '5', // number of tweets to display\r\n\t\t'background' => '', // background image url\r\n\t\t'background_color' => '000000', // background color\r\n\t\t'color_scheme' => 'green', // green or red or blue or grey\r\n\t\t'page_width' => 'fixed', // fixed or fluid\r\n\t\t'font_style' => 0, // check the codes in bb_mystique_font_styles function\r\n\t\t'logo' => '', // logo url\r\n\t\t'logo_size' => '', //eg 500x200 where 500 = width, 200 = height\r\n\t\t'user_css' => '', // custom css\r\n\t\t/* Don't change anything below this, for now */\r\n\t\t'theme_version' => BB_MYSTIQUE_THEME_VERSION,\r\n\t\t'jquery' => 1\r\n\t\t);\r\n\r\n\t$defaults = apply_filters( 'bb_mystique_default_settings', $defaults ); // check for new default setting entries from extensions\r\n\treturn $defaults;\r\n}", "public function getSettings() {\n $scenario = \\Drupal::installProfile();\n if ($scenario === 'dfs_obio_acm') {\n $scenario = 'dfs_obio';\n }\n return \\Drupal::config('as_lift.settings.' . $scenario);\n }", "private function defaultSettings()\n {\n\t\t$default_config = array(\n 'Plugins.Keypic.SigninEnabled' => false,\n\t\t\t 'Plugins.Keypic.SignupEnabled' => true,\n\t\t\t 'Plugins.Keypic.PostEnabled' => true,\n\t\t\t 'Plugins.Keypic.CommentEnabled' => true,\n\t\t\t 'Plugins.Keypic.SigninWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.PostWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.CommentWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.SigninRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.PostRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.CommentRequestType' => 'getScript',\n\t\t );\n\t\t \n\t\tSaveToConfig($default_config);\n }", "public static function getDefaultOptions()\n {\n return self::$defaults;\n }", "public static function getDefaultOptions()\n {\n return self::$defaults;\n }", "function get_legacy_widget_block_editor_settings()\n {\n }", "function jb_option_defaults() {\n\t \t$arr = array(\n\t\t'jb_featured_cat_slug' => 'home',\n\t\t'jb_featured_content_limit' => 55,\n\t\t'jb_post_content_limit' => 40\n\t);\n\treturn $arr;\n}", "function chicago_2011_theme_get_default_settings($theme) {\n $themes = list_themes();\n //krumo($themes[$theme]->info);\n // Get the default values from the .info file.\n $defaults = !empty($themes[$theme]->info['settings']) ? $themes[$theme]->info['settings'] : array();\n\n if (!empty($defaults)) {\n // Get the theme settings saved in the database.\n $settings = theme_get_settings($theme);\n // Don't save the toggle_node_info_ variables.\n if (module_exists('node')) {\n foreach (node_get_types() as $type => $name) {\n unset($settings['toggle_node_info_' . $type]);\n }\n }\n // Save default theme settings.\n variable_set(\n str_replace('/', '_', 'theme_' . $theme . '_settings'),\n array_merge($defaults, $settings)\n );\n // If the active theme has been loaded, force refresh of Drupal internals.\n if (!empty($GLOBALS['theme_key'])) {\n theme_get_setting('', TRUE);\n }\n }\n // Return the default settings.\n return $defaults;\n}", "public static function getDefaultOptions(){\n\n\t\t$options = array(\n\t\t\tWPC_OPTIONS => array(\n\t\t\t\tWPC_OPTIONS_LANGUAGE => 'en_US',\n\t\t\t\tWPC_OPTIONS_THEME => WPC_THEME_LIGHT\n\t\t\t),\n\t\t\tWPC_OPTIONS_COMMENTS => array(\n\t\t\t\tWPC_OPTIONS_COMMENTS_NUMBER => 6,\n\t\t\t\tWPC_OPTIONS_COMMENTS_WIDTH => 480,\n\t\t\t\tWPC_OPTIONS_COMMENTS_POSITION => WPC_CUSTOM_FIELD_VALUE_POSITION_BOTTOM,\n\t\t\t\tWPC_OPTIONS_COMMENTS_ENABLED => WPC_OPTION_ENABLED,\n\t\t\t\tWPC_OPTIONS_DISPLAY_EVERYWHERE => 'on',\n\t\t\t\tWPC_OPTIONS_DISPLAY_NOWHERE => ''\n\t\t\t),\n\t\t\tWPC_OPTIONS_LIKE_BUTTON => array(\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_SEND => WPC_OPTION_ENABLED,\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_LAYOUT => WPC_LAYOUT_STANDARD,\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_WIDTH => 480,\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_FACES => WPC_OPTION_ENABLED,\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_VERB => WPC_ACTION_LIKE,\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_FONT => WPC_FONT_DEFAULT,\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_POSITION => WPC_CUSTOM_FIELD_VALUE_POSITION_TOP,\n\t\t\t\tWPC_OPTIONS_LIKE_BUTTON_ENABLED => WPC_OPTION_ENABLED,\n\t\t\t\tWPC_OPTIONS_DISPLAY_EVERYWHERE => 'on'\n\t\t\t)\n\t\t);\n\n\t\treturn $options;\n\n\t}", "abstract public function get_settings();", "private function getDefaultConfig() {\n\t\treturn array(\n\t\t\t'client_id' => '',\n\t\t\t'client_secret' => '',\n\t\t\t'base_url' => '',\n\t\t\t'default_type' => 'user',\n\t\t);\n\t}", "public static function get_gallery_defaults() {\n $gallery_defaults = array(\n 'link' => 'none',\n 'size' => 'full',\n 'columns' => '2'\n );\n $gallery_defaults[self::$data_setting_slug] = '0';\n\n return $gallery_defaults;\n }", "public function getSettings();", "protected function defaults() {\n\t\t\t$config = array(\n\t\t\t\t'version' => $this->version,\n\t\t\t\t'autoshowpt' => array(\n\t\t\t\t\t//'post'=> true\n\t\t\t\t),\n\t\t\t\t'usept' => array(\n\t\t\t\t\t'post' => true\n\t\t\t\t),\n\t\t\t\t'usetax' => array(),\n\t\t\t\t'autoshowrss' => false,\n\t\t\t\t'do_c2c' => 1,\n\t\t\t\t'do_t2t' => 0,\n\t\t\t\t'do_t2c' => 0,\n\t\t\t\t'do_k2c' => 0,\n\t\t\t\t'do_k2t' => 0,\n\t\t\t\t'do_x2x' => 1,\n\t\t\t\t'minscore' => 50,\n\t\t\t\t'maxresults' => 5,\n\t\t\t\t'cachetime' => 60,\n\t\t\t\t'filterpriority' => 10,\n\t\t\t\t'log' => false,\n\t\t\t\t'loglevel' => false,\n\t\t\t\t'storage' => 'postmeta',\n\t\t\t\t'storage_id' => 'better-related-',\n\t\t\t\t'querylimit' => 1000,\n\t\t\t\t't_querylimit' => 10000,\n\t\t\t\t'mtime' => time(),\n\t\t\t\t'relatedtitle' => sprintf(\n\t\t\t\t\t\"<strong>%s</strong>\",\n\t\t\t\t\t__( 'Related content:', 'better-related' )\n\t\t\t\t),\n\t\t\t\t'relatednone' => sprintf(\n\t\t\t\t\t\"<p>%s</p>\",\n\t\t\t\t\t__( 'No related content found.', 'better-related' )\n\t\t\t\t),\n\t\t\t\t'thanks' => 'below',\n\t\t\t\t'stylesheet' => true,\n\t\t\t\t'showdetails' => false\n\t\t\t);\n\t\t\treturn $config;\n\t\t}", "function gc_theme_setting_defaults() {\n\n\tif ( function_exists( 'genesis_update_settings' ) ) {\n\n\t\tgenesis_update_settings( array(\n\t\t\t'blog_cat_num' => 5,\n\t\t\t'content_archive' => 'excerpts',\n\t\t\t'content_archive_limit' => 0,\n\t\t\t'content_archive_thumbnail' => 1,\n\t\t\t'posts_nav' => 'numeric',\n\t\t\t'site_layout' => 'content-sidebar',\n\t\t) );\n\n\t}\n\tupdate_option( 'posts_per_page', 5 );\n\n}", "function stage_get_default($request, $pop = false)\n{\n return Settings::getDefault($request, $pop);\n}", "public function defaults()\n {\n $defaults = $this->config;\n if (!isset($defaults['width'])) {\n $defaults['width'] = $defaults['default_width'];\n }\n if (!isset($defaults['height'])) {\n $defaults['height'] = $defaults['default_height'];\n }\n return $defaults;\n }", "public static function getDefaultConfig() {\n return static::$defaultConfig;\n }", "function get_settings() {\n\t\treturn $this->settings;\n\t}", "function techfak_get_default_theme_options() {\n\t$default_theme_options = array(\n\t\t'color_scheme' => 'blau',\n\t\t'theme_layout' => 'maxwidth'\n\t);\n\n\treturn apply_filters( 'techfak_default_theme_options', $default_theme_options );\n}", "function bdpp_get_settings() {\n\t\n\t$options = get_option('bdpp_opts');\n\t\n\t$settings = (is_array($options)) ? $options : array();\n\t\n\treturn $settings;\n}", "function getDefault() {\n // to obtain the default\n // annoyingly\n $d = array();\n foreach ($this->_widgets as $w) {\n if (PEAR::isError($w)) {\n continue;\n }\n $d[$w->getBasename()] = $w->getDefault();\n }\n return $d;\n }", "private function getSettings()\n {\n return array(\n 'frontpage' => array(\n 'name' => 'Frontpage',\n 'key' => 'frontpage',\n 'type' => 'text',\n 'help' => 'Type the slug of the home page'\n ),\n\n );\n }", "function default_configuration()\r\n {\r\n return array();\r\n }", "function tb_default_options() {\n $defaults = array (\n 'banner_id' => '',\n 'banner_link' => '',\n 'city' => ''\n );\n return apply_filters( \"tb_default_options\", $defaults );\n}", "protected function get_default() {\n\t\treturn array(\n\t\t\t'ownerID' => 0,\n\t\t\t'accountID' => '',\n\t\t\t'adsenseLinked' => false,\n\t\t\t'adsConversionID' => '',\n\t\t\t'anonymizeIP' => true,\n\t\t\t'internalWebPropertyID' => '',\n\t\t\t'profileID' => '',\n\t\t\t'propertyID' => '',\n\t\t\t'trackingDisabled' => array( 'loggedinUsers' ),\n\t\t\t'useSnippet' => true,\n\t\t\t'canUseSnippet' => true,\n\t\t\t'dashboardView' => Analytics::DASHBOARD_VIEW,\n\t\t);\n\t}", "function gallery_default_shortcode_atts( $settings ) {\n\t\t$settings['galleryDefaults']['type'] = $this->get_default_gallery_type();\n\n\t\treturn $settings;\n\t}", "function defaultSettings($dsetting=\"\") {\n\t\tglobal $wpdb;\n\t\t$top10 = array(\t\"toplimit\"=>\"10\",\t//new in 1.8.3 - top stats list size\n\t\t\t\t\"topsearch\"=>\"1\",\n\t\t\t\t\"topreferrer\"=>\"1\",\n\t\t\t\t\"toprequest\"=>\"1\",\n\t\t\t\t\"topbrowser\"=>\"1\",\n\t\t\t\t\"topos\"=>\"1\",\n\t\t\t\t\"toplocale\"=>\"0\",\n\t\t\t\t\"topvisitor\"=>\"0\",\n\t\t\t\t\"toppostid\"=>\"0\",\t//new in v1.8.3 - top article by post-id\n\t\t\t\t\"topreferrer_exclude\"=>\"\",\n\t\t\t\t\"top_nospider\"=>\"0\");\t//new in v1.8.3 - exclude spiders from top stats\n\t\t$defaults = array(\n\t\t\t'wassup_active'\t\t=>\"1\",\n\t\t\t'wassup_loggedin'\t=>\"1\",\n\t\t\t'wassup_admin'\t\t=>\"1\",\n\t\t\t'wassup_spider'\t\t=>\"1\",\n\t\t\t'wassup_attack'\t\t=>\"1\",\n\t\t\t'wassup_hack'\t\t=>\"1\",\n\t\t\t'wassup_spamcheck'\t=>\"1\",\n \t\t'wassup_spam'\t\t=>\"1\",\n \t\t'wassup_refspam'\t=>\"1\",\n\t\t\t'wassup_exclude'\t=>\"\",\n\t\t\t'wassup_exclude_url'\t=>\"\",\n\t\t\t'wassup_exclude_user'\t=>\"\",\n\t\t\t'wassup_cache'\t\t=>\"1\",\n\t\t\t'wassup_chart'\t\t=>\"1\",\n\t\t\t'wassup_chart_type'\t=>\"2\",\n\t\t\t'delete_auto'\t\t=>\"never\",\n \t\t'delete_filter'\t\t=>\"\",\n\t\t\t'wassup_remind_mb'\t=>\"0\",\n\t\t\t'wassup_remind_flag'\t=>\"0\",\n\t\t\t'wassup_refresh'\t=>\"3\",\n\t\t\t'wassup_userlevel'\t=>\"8\",\n\t\t\t'wassup_screen_res'\t=>\"800\",\n\t\t\t'wassup_default_type'\t=>\"everything\",\n\t\t\t'wassup_default_spy_type'=>\"everything\",\n\t\t\t'wassup_default_limit'\t=>\"10\",\n\t\t\t'wassup_dashboard_chart'=>\"0\",\n\t\t\t'wassup_geoip_map'\t=>\"0\",\n\t\t\t'wassup_googlemaps_key'\t=>\"\",\n\t\t\t'wassup_spy_speed'\t=>\"5000\",\n\t\t\t'wassup_time_format'\t=>\"24\",\n\t\t\t'wassup_time_period'\t=>\"1\",\n\t\t\t'wassup_widget_title'\t=>\"Visitors Online\",\n\t\t\t'wassup_widget_ulclass'\t=>\"links\",\n\t\t\t'wassup_widget_loggedin'=>\"1\",\n\t\t\t'wassup_widget_comauth'\t=>\"1\",\n\t\t\t'wassup_widget_search'\t=>\"1\",\n\t\t\t'wassup_widget_searchlimit' =>\"5\",\n\t\t\t'wassup_widget_ref'\t=>\"1\",\n\t\t\t'wassup_widget_reflimit'=>\"5\",\n\t\t\t'wassup_widget_topbr'\t=>\"1\",\n\t\t\t'wassup_widget_topbrlimit'=>\"5\",\n\t\t\t'wassup_widget_topos'\t=>\"1\",\n\t\t\t'wassup_widget_toposlimit'=>\"5\",\n\t\t\t'wassup_widget_chars'\t=>\"18\",\n\t\t\t'wassup_alert_message'\t=>\"\",\n\t\t\t'wassup_uninstall'\t=>\"0\",\n\t\t\t'wassup_optimize'\t=>current_time('timestamp'),\n\t\t\t'wassup_top10'\t=>esc_attr(serialize($top10)),\n//\t\t\t\t\t\"topsearch\"=>\"1\", - moved\n//\t\t\t\t\t\"topreferrer\"=>\"1\", - moved\n//\t\t\t\t\t\"toprequest\"=>\"1\", - moved\n//\t\t\t\t\t\"topbrowser\"=>\"1\", - moved\n//\t\t\t\t\t\"topos\"=>\"1\", - moved\n//\t\t\t\t\t\"toplocale\"=>\"0\", - moved\n//\t\t\t\t\t\"topvisitor\"=>\"0\", - moved\n//\t\t\t\t\t\"topfeed\"=>\"0\", - moved\n//\t\t\t\t\t\"topcrawler\"=>\"0\", - moved\n//\t\t\t\t\t\"topreferrer_exclude\"=>\"\"))), - moved\n\t\t\t'whash' \t=>$this->get_wp_hash(),\n\t\t\t'wassup_version'=>\"\",\n\t\t\t'wassup_table' =>$wpdb->prefix . \"wassup\",\n\t\t\t'wassup_dbengine'=>$this->getMySQLsetting(\"engine\"));\n\n\t\t//never discard google maps api key with \"reset-to-default\"\n\t\tif (!empty($this->wassup_googlemaps_key)) {\n\t\t\t$defaults['wassup_googlemaps_key']= $this->wassup_googlemaps_key;\n\t\t}\n\t\t//never discard wassup_version' or 'wassup_table' with \"reset-to-default\"\n\t\tif (!empty($this->wassup_version)) {\n\t\t\t$defaults['wassup_version']= $this->wassup_version;\n\t\t}\n\t\tif (!empty($this->wassup_table)) {\n\t\t\t$defaults['wassup_table']= $this->wassup_table;\n\t\t}\n\t\t//New in 1.8.3: return a single default value when function argument given\n\t\tif (!empty($dsetting)) {\n\t\t\tif ($dsetting == \"top10\" || $dsetting == \"wassup_top10\" || $dsetting == \"top_stats\") {\n\t\t\t\treturn ($top10);\n\t\t\t} elseif (!empty($defaults[$dsetting])) {\n\t\t\t\treturn ($defaults[$dsetting]);\n\t\t\t} else {\n\t\t\t\treturn (null);\n\t\t\t}\n\t\t} else { \n\t\t\treturn($defaults);\n\t\t};\n\t}", "function get_setting($key, $default = null) {\r\n $settings = get_site_option( 'psts_settings' );\r\n $setting = isset($settings[$key]) ? $settings[$key] : $default;\r\n\t\treturn apply_filters( \"psts_setting_$key\", $setting, $default );\r\n\t}", "function get_setting() {\n return get_config(NULL, $this->name);\n }", "public static function getDefaults () {\n\t\t$configuration = array(\n\t\t\t'xtype' => 'textfield',\n\t\t\t'anchor' => '95%',\n\t\t\t'blankText' =>'fieldMandatory',\n\t\t\t'labelSeparator' => '',\n\t\t\t'selectOnFocus' => TRUE,\n\t\t);\n\t\treturn $configuration;\n\t}", "protected function getDefaults()\n {\n return $this->transbankConfig->getDefaults(\n lcfirst(Helpers::classBasename(static::class))\n ) ?? [];\n }", "public static function getSettings() {\n\n\t\tglobal $lumi_aiowps_tweaks;\n\t\tif( isset( $lumi_aiowps_tweaks['Settings'] ) ) {\n\t\t\treturn $lumi_aiowps_tweaks['Settings'];\n\t\t} else {\n\t\t\tinclude_once( __DIR__ . '/SettingsAPI.class.php' );\n\t\t\t$lumi_aiowps_tweaks['Settings'] = new SettingsAPI();\n\t\t\treturn $lumi_aiowps_tweaks['Settings'];\n\t\t}\n\n\t}", "public function get_settings()\n {\n }", "abstract public function getSettings();", "public function getDefault()\n {\n return $this->config['config']['default'] ?? null;\n }", "public function GetDefaults ();", "public function get_settings() {\n $data = array(\n 'settings' => $this->js_settings\n );\n \n return $data;\n }", "function monsterinsights_get_option( $key = '', $default = false ) {\n\tglobal $monsterinsights_settings;\n\t$value = ! empty( $monsterinsights_settings[ $key ] ) ? $monsterinsights_settings[ $key ] : $default;\n\t$value = apply_filters( 'monsterinsights_get_option', $value, $key, $default );\n\treturn apply_filters( 'monsterinsights_get_option_' . $key, $value, $key, $default );\n}", "function get_integration_settings($set_admin_defaults = FALSE) {\n\tglobal $db, $wpuAbs;\n\t\n\t$config_fields = get_db_schema();\n\t$wpSettings = array();\n\tif ($wpuAbs->ver == 'PHPBB3') {\n\t\tforeach($config_fields as $var_name => $field_name) {\n\t\t\tif ($wpuAbs->config('wpu_'.$field_name) !== FALSE) {\n\t\t\t\t$wpSettings[$var_name] = $wpuAbs->config('wpu_'.$field_name);\n\t\t\t\t//unset($GLOBALS['config']['wpu_'.$field_name]);\n\t\t\t} elseif ($set_admin_defaults) {\n\t\t\t\t$wpSettings[$var_name] = set_default($var_name);\n\t\t\t}\n\t\t}\n\t\treturn $wpSettings;\t\n\t}\n\t\n\t$sql = 'SELECT * FROM ' . WP_INT_TABLE . ' LIMIT 1';\n\tif (!$result = $db->sql_query($sql)) {\n\t\t//db error -- die\n\t\tmessage_die(GENERAL_ERROR, $lang['WP_DBErr_Retrieve'], __LINE__, __FILE__, $sql);\n\t\treturn FALSE;\n\t}\n\tif (!$db->sql_numrows($result)) {\n\t\t// table not populated yet\n\t\treturn FALSE;\n\t}\n\telse {\n\t\n\t\t$row = $db->sql_fetchrow($result);\n\t\t$fullFieldSet = get_db_schema();\n\t\t\n\t\tforeach($fullFieldSet as $var_name => $field_name) {\n\t\t\t$wpSettings[$var_name] = $row[$field_name];\n\t\t}\n\t}\n}", "protected function getWidgetConfiguration() {}", "function mustsee_theme_settings_defaults( $defaults ) {\n\n\t$defaults['twitter_url'] = '';\n\t$defaults['facebook_url'] = '';\n\t$defaults['pinterest_url'] = '';\n\t$defaults['linkedin_url'] = '';\n\t$defaults['youtube_url'] = '';\n\t$defaults['googleplus_url'] = '';\n\t$defaults['agent_address'] = '';\n\t$defaults['agent_phone'] = '';\n\n\treturn $defaults;\n}", "private function getSettings()\n\t\t{\n\t\t\tforeach($this->settings as $key => $val) {\n\t\t\t\t$this->settings[$key] = !empty(get_option($this->tag.$key)) ? get_option($this->tag.$key) : '';\n\t\t\t}\n\t\t}", "function _bellcom_collect_theme_settings() {\n $settings = array();\n\n // Contact information\n $settings['contact_information']['business_owner_name'] = theme_get_setting('business_owner_name');\n $settings['contact_information']['business_startup_year'] = theme_get_setting('business_startup_year');\n $settings['contact_information']['address'] = theme_get_setting('address');\n $settings['contact_information']['zipcode'] = theme_get_setting('zipcode');\n $settings['contact_information']['city'] = theme_get_setting('city');\n $settings['contact_information']['phone_system'] = theme_get_setting('phone_system');\n $settings['contact_information']['phone_readable'] = theme_get_setting('phone_readable');\n $settings['contact_information']['email'] = theme_get_setting('email');\n $settings['contact_information']['working_hours'] = theme_get_setting('working_hours');\n\n // Social links\n $settings['social_links']['facebook']['active'] = theme_get_setting('facebook');\n $settings['social_links']['facebook']['url'] = theme_get_setting('facebook_url');\n $settings['social_links']['facebook']['tooltip'] = t(theme_get_setting('facebook_tooltip'));\n $settings['social_links']['twitter']['active'] = theme_get_setting('twitter');\n $settings['social_links']['twitter']['url'] = theme_get_setting('twitter_url');\n $settings['social_links']['twitter']['tooltip'] = t(theme_get_setting('twitter_tooltip'));\n $settings['social_links']['googleplus']['active'] = theme_get_setting('googleplus');\n $settings['social_links']['googleplus']['url'] = theme_get_setting('googleplus_url');\n $settings['social_links']['googleplus']['tooltip'] = t(theme_get_setting('googleplus_tooltip'));\n $settings['social_links']['instagram']['active'] = theme_get_setting('instagram');\n $settings['social_links']['instagram']['url'] = theme_get_setting('instagram_url');\n $settings['social_links']['instagram']['tooltip'] = t(theme_get_setting('instagram_tooltip'));\n $settings['social_links']['linkedin']['active'] = theme_get_setting('linkedin');\n $settings['social_links']['linkedin']['url'] = theme_get_setting('linkedin_url');\n $settings['social_links']['linkedin']['tooltip'] = t(theme_get_setting('linkedin_tooltip'));\n $settings['social_links']['pinterest']['active'] = theme_get_setting('pinterest');\n $settings['social_links']['pinterest']['url'] = theme_get_setting('pinterest_url');\n $settings['social_links']['pinterest']['tooltip'] = t(theme_get_setting('pinterest_tooltip'));\n $settings['social_links']['vimeo']['active'] = theme_get_setting('vimeo');\n $settings['social_links']['vimeo']['url'] = theme_get_setting('vimeo_url');\n $settings['social_links']['vimeo']['tooltip'] = t(theme_get_setting('vimeo_tooltip'));\n $settings['social_links']['youtube']['active'] = theme_get_setting('youtube');\n $settings['social_links']['youtube']['url'] = theme_get_setting('youtube_url');\n $settings['social_links']['youtube']['tooltip'] = t(theme_get_setting('youtube_tooltip'));\n\n // Layout\n $settings['layout']['copyright'] = ($settings['contact_information']['business_startup_year'] < date('Y') AND $settings['contact_information']['business_startup_year'] !== NULL) ? $settings['contact_information']['business_startup_year'] . '-' . date('Y') : date('Y');\n $settings['layout']['footer']['show_social_links'] = theme_get_setting('footer_show_social_links');\n $settings['layout']['sidebar']['show_social_links'] = theme_get_setting('sidebar_show_social_links');\n\n return $settings;\n}", "public function get_settings() {\n return self::$settings;\n }", "public static function get_element_defaults() {\n\n\t\t\t$fusion_settings = fusion_get_fusion_settings();\n\n\t\t\treturn [\n\t\t\t\t'admin_label' => '',\n\t\t\t\t'is_nested' => '0', // Variable that simply checks if the current container is a nested one (e.g. from FAQ or blog element).\n\t\t\t\t'hide_on_mobile' => fusion_builder_default_visibility( 'string' ),\n\t\t\t\t'id' => '',\n\t\t\t\t'class' => '',\n\t\t\t\t'status' => 'published',\n\t\t\t\t'publish_date' => '',\n\t\t\t\t// Background.\n\t\t\t\t'background_color' => $fusion_settings->get( 'full_width_bg_color' ),\n\t\t\t\t'gradient_start_color' => $fusion_settings->get( 'full_width_gradient_start_color' ),\n\t\t\t\t'gradient_end_color' => $fusion_settings->get( 'full_width_gradient_end_color' ),\n\t\t\t\t'gradient_start_position' => '0',\n\t\t\t\t'gradient_end_position' => '100',\n\t\t\t\t'gradient_type' => 'linear',\n\t\t\t\t'radial_direction' => 'center',\n\t\t\t\t'linear_angle' => '180',\n\t\t\t\t'background_image' => '',\n\t\t\t\t'background_position' => 'center center',\n\t\t\t\t'background_repeat' => 'no-repeat',\n\t\t\t\t'background_parallax' => 'none',\n\t\t\t\t'parallax_speed' => '0.3',\n\t\t\t\t'background_blend_mode' => 'none',\n\t\t\t\t'opacity' => '100',\n\t\t\t\t'break_parents' => '0',\n\t\t\t\t'fade' => 'no',\n\t\t\t\t// Style.\n\t\t\t\t'hundred_percent' => 'no',\n\t\t\t\t'hundred_percent_height' => 'no',\n\t\t\t\t'hundred_percent_height_scroll' => 'no',\n\t\t\t\t'hundred_percent_height_center_content' => 'no',\n\t\t\t\t'padding_bottom' => '',\n\t\t\t\t'padding_left' => '',\n\t\t\t\t'padding_right' => '',\n\t\t\t\t'padding_top' => '',\n\t\t\t\t'border_color' => $fusion_settings->get( 'full_width_border_color' ),\n\t\t\t\t'border_size' => $fusion_settings->get( 'full_width_border_size' ),\n\t\t\t\t'border_style' => 'solid',\n\t\t\t\t'equal_height_columns' => 'no',\n\t\t\t\t'data_bg_height' => '',\n\t\t\t\t'data_bg_width' => '',\n\t\t\t\t'enable_mobile' => 'no',\n\t\t\t\t'menu_anchor' => '',\n\t\t\t\t'margin_top' => '',\n\t\t\t\t'margin_bottom' => '',\n\t\t\t\t'link_color' => $fusion_settings->get( 'link_color' ),\n\t\t\t\t'link_hover_color' => $fusion_settings->get( 'primary_color' ),\n\t\t\t\t// Video Background.\n\t\t\t\t'video_mp4' => '',\n\t\t\t\t'video_webm' => '',\n\t\t\t\t'video_ogv' => '',\n\t\t\t\t'video_loop' => 'yes',\n\t\t\t\t'video_mute' => 'yes',\n\t\t\t\t'video_preview_image' => '',\n\t\t\t\t'overlay_color' => '',\n\t\t\t\t'overlay_opacity' => '0.5',\n\t\t\t\t'video_url' => '',\n\t\t\t\t'video_loop_refinement' => '',\n\t\t\t\t'video_aspect_ratio' => '16:9',\n\t\t\t\t// Filters.\n\t\t\t\t'filter_hue' => '0',\n\t\t\t\t'filter_saturation' => '100',\n\t\t\t\t'filter_brightness' => '100',\n\t\t\t\t'filter_contrast' => '100',\n\t\t\t\t'filter_invert' => '0',\n\t\t\t\t'filter_sepia' => '0',\n\t\t\t\t'filter_opacity' => '100',\n\t\t\t\t'filter_blur' => '0',\n\t\t\t\t'filter_hue_hover' => '0',\n\t\t\t\t'filter_saturation_hover' => '100',\n\t\t\t\t'filter_brightness_hover' => '100',\n\t\t\t\t'filter_contrast_hover' => '100',\n\t\t\t\t'filter_invert_hover' => '0',\n\t\t\t\t'filter_sepia_hover' => '0',\n\t\t\t\t'filter_opacity_hover' => '100',\n\t\t\t\t'filter_blur_hover' => '0',\n\t\t\t];\n\t\t}", "public static function get_settings()\n {\n static $settings = null;\n if ($settings === null) {\n $settings = new pointsettings;\n foreach (get_object_vars($settings) as $name => $default)\n $settings->{$name} = setting::get($name, $default);\n }\n return $settings;\n }", "public static function getDefaultSettingsKeys();", "function wpsl_set_default_settings() {\n\n $settings = get_option( 'wpsl_settings' );\n\n if ( !$settings ) {\n update_option( 'wpsl_settings', wpsl_get_default_settings() );\n }\n}", "public function getSetting( $name, $default = null );", "public function getDefaultOptions() {\n return static::defaultOptions();\n }", "public function getSettings()\n {\n $typoScript = $this->configurationManager->getConfiguration(\n \\TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS,\n 'SfBanners',\n 'Pi1'\n );\n return $typoScript;\n }", "private function getDefaultConfig(){\n\t\t//Pretty simple. Multidimensional array of configuration values gets returned\n\t $defaultConfig = array();\n\t\t$defaultConfig['general'] = array('start_path'=>'.', 'disallowed'=>'php, php4, php5, phps',\n\t\t\t\t\t\t\t\t\t\t 'page_title'=>'OMFG!', 'files_label'=>'', 'folders_label'=>'');\n\t\t$defaultConfig['options'] = array('thumb_height'=>75, 'files_per_page'=>25, 'max_columns'=>3, \n\t\t\t\t\t\t\t\t\t\t 'enable_ajax'=>false, 'memory_limit'=>'256M', 'cache_thumbs'=>false, \n\t\t\t\t\t\t\t\t\t\t\t'thumbs_dir'=>'/.thumbs', 'icons_dir'=>'/.icons');\n\t\treturn $defaultConfig;\n\t}" ]
[ "0.7684482", "0.76330054", "0.7613945", "0.7569791", "0.755489", "0.75523114", "0.7374885", "0.7293563", "0.7196155", "0.71758443", "0.7170762", "0.70845675", "0.708413", "0.69428045", "0.69309956", "0.69200337", "0.69191694", "0.6916668", "0.69023955", "0.6882146", "0.68550926", "0.68329424", "0.68253934", "0.68010664", "0.6800718", "0.6800652", "0.67943007", "0.6759582", "0.6699297", "0.6696735", "0.6681623", "0.6678817", "0.6669314", "0.66087484", "0.66016775", "0.6586078", "0.6567645", "0.6516407", "0.6510456", "0.6501758", "0.6494468", "0.6488879", "0.64868885", "0.6485488", "0.64799726", "0.64613426", "0.64553374", "0.6447475", "0.6441106", "0.64292383", "0.6409993", "0.6409993", "0.6401353", "0.6399938", "0.6397193", "0.63966435", "0.6394251", "0.639298", "0.63918215", "0.6388317", "0.6381793", "0.63814086", "0.63674396", "0.6365204", "0.6357705", "0.6351317", "0.63452464", "0.6338127", "0.6320675", "0.63206476", "0.6307456", "0.63060945", "0.6293958", "0.6291879", "0.62889373", "0.6281013", "0.6279172", "0.6276997", "0.6271221", "0.62692434", "0.62663066", "0.6259964", "0.62545365", "0.62336886", "0.6229837", "0.6229513", "0.6229379", "0.6223701", "0.62174743", "0.62105525", "0.62053233", "0.6201218", "0.6196765", "0.619463", "0.61898553", "0.6188965", "0.6185911", "0.6179124", "0.6175699", "0.6171721" ]
0.6707052
28
Process options from the database or shortcode. Designed to convert options from strings or sanitize output.
public function process_options( $options ) { // Trim strings foreach( $options as $k => &$v ) { if( is_string($v) ) $v = trim( $v ); } return $options; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function processOptions()\n {\n $sShortOptions = '';\n $aLongOptions = [];\n\n foreach ($this->hOptionList as $hOption)\n {\n $sOptionValueMod = '';\n\n if (isset($hOption['value']))\n {\n if ($hOption['value'] == self::OPTION_VALUE_ALLOW)\n {\n $sOptionValueMod = '::';\n }\n elseif ($hOption['value'] == self::OPTION_VALUE_REQUIRE)\n {\n $sOptionValueMod = ':';\n }\n }\n\n if (isset($hOption['short']))\n {\n $sShortOptions .= $hOption['short'] . $sOptionValueMod;\n }\n\n if (isset($hOption['long']))\n {\n $aLongOptions[] = $hOption['long'] . $sOptionValueMod;\n }\n }\n\n $hActiveOptions = getopt($sShortOptions, $aLongOptions);\n\n if (isset($hActiveOptions['h']) || isset($hActiveOptions['help']))\n {\n $this->displayHelp();\n }\n\n return $hActiveOptions;\n }", "function handleOptions ()\n\t{\n\t\t$default_options = $this->default_options;\n\n\t\t// Get options from WP options\n\t\t$options_from_table = get_option( $this->db_options_name_core );\n\n\t\tif ( empty( $options_from_table ) ) {\n\t\t\t$options_from_table = $this->default_options; // New installation\n\t\t} else {\n\n\t\t\t// As of version 2.2 I changed the way I store the default options.\n\t\t\t// I need to upgrade the options before setting the options but we don't update the version yet.\n\t\t\tif ( ! $options_from_table['general'] ) {\n\t\t\t\t$this->upgradeDefaultOptions_2_2();\n\t\t\t\t$options_from_table = get_option( $this->db_options_name_core ); // Get the new options\n\t\t\t}\n\n\t\t\t// Update default options by getting not empty values from options table\n\t\t\tforeach ( $default_options as $section_key => $section_array ) {\n\t\t\t\tforeach ( $section_array as $name => $value ) {\n\n\t\t\t\t\tif ( isset( $options_from_table[$section_key][$name] ) && (! is_null( $options_from_table[$section_key][$name] )) ) {\n\t\t\t\t\t\tif ( is_int( $value ) ) {\n\t\t\t\t\t\t\t$default_options[$section_key][$name] = ( int ) $options_from_table[$section_key][$name];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$default_options[$section_key][$name] = $options_from_table[$section_key][$name];\n\t\t\t\t\t\t\tif ( 'associated_id' == $name ) {\n\t\t\t\t\t\t\t\tif ( 'blogavirtualh-20' == $options_from_table[$section_key][$name] )\n\t\t\t\t\t\t\t\t\t$default_options[$section_key][$name] = 'avh-amazon-20';\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\n\t\t\t// If a newer version is running do upgrades if neccesary and update the database.\n\t\t\tif ( $this->version > $options_from_table['general']['version'] ) {\n\t\t\t\t// Starting with version 2.1 I switched to a new way of storing the widget options in the database. We need to convert these.\n\t\t\t\tif ( $options_from_table['general']['version'] < '2.1' ) {\n\t\t\t\t\t$this->upgradeWidgetOptions_2_1();\n\t\t\t\t}\n\n\t\t\t\tif ( $options_from_table['general']['version'] < '2.4' ) {\n\t\t\t\t\t$this->doRemoveCacheFolder();\n\t\t\t\t}\n\t\t\t\tif ( $options_from_table['general']['version'] < '3.0' ) {\n\t\t\t\t\t$this->upgradeWidgetSettings_3_0();\n\t\t\t\t}\n\n\t\t\t\t// Write the new default options and the proper version to the database\n\t\t\t\t$default_options['general']['version'] = $this->version;\n\t\t\t\tupdate_option( $this->db_options_name_core, $default_options );\n\t\t\t}\n\t\t}\n\t\t// Set the class property for options\n\t\t$this->options = $default_options;\n\t}", "public function processOptions(array &$options)\n {\n }", "public function process_admin_options() {\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ) update_option( 'jigoshop_tgm_custom_gateway_enabled', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_enabled' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_title'] ) ) update_option( 'jigoshop_tgm_custom_gateway_title', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_title'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_title' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_description'] ) ) update_option( 'jigoshop_tgm_custom_gateway_description', \tjigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_description'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_description' );\n \t}", "function handle_options()\r\n {\r\n $options = $this->get_options();\r\n \r\n if (isset($_POST['submitted'])) {\r\n \t\t\r\n \t\t//check security\r\n \t\tcheck_admin_referer('snazzy-nonce');\r\n \t\t\r\n $options = array();\r\n \r\n $options['years'] = htmlspecialchars($_POST['years']);\r\n $options['mini'] = $_POST['mini'];\r\n $options['posts'] = $_POST['posts'];\r\n $options['pages'] = $_POST['pages'];\r\n \r\n update_option($this->db_option, $options);\r\n \r\n echo '<div class=\"updated fade\"><p>Plugin settings saved.</p></div>';\r\n }\r\n \r\n $layout = $options['layout'];\r\n $years = stripslashes($options['years']);\r\n $mini = $options['mini'] == 'on' ? 'checked' : '';\r\n $posts = $options['posts'] == 'on' ? 'checked' : '';\r\n $pages = $options['pages'] == 'on' ? 'checked' : '';\r\n \r\n // URL for form submit, equals our current page\r\n $action_url = $_SERVER['REQUEST_URI'];\r\n \r\n include('snazzy-archives-options.php');\r\n }", "function cp_update_options($options) {\r\n $toolsMessage = '';\r\n\r\n if (isset($_POST['submitted']) && $_POST['submitted'] == 'yes') {\r\n\r\n foreach ( $options as $value ) {\r\n if ( isset($_POST[$value['id']]) ) {\r\n //echo $value['id'] . '<-- value ID | ' . $_POST[$value['id']] . '<-- $_POST value ID <br/><br/>'; // FOR DEBUGGING\r\n update_option( $value['id'], appthemes_clean($_POST[$value['id']]) );\r\n } else {\r\n @delete_option( $value['id'] );\r\n }\r\n }\r\n\r\n // do a separate update for price per cats since it's not in the $options array\r\n if ( isset($_POST['catarray']) ) {\r\n foreach ( $_POST['catarray'] as $key => $value ) {\r\n // echo $key .'<-- key '. $value .'<-- value<br/>'; // FOR DEBUGGING\r\n update_option( $key, appthemes_clean($value) );\r\n }\r\n }\r\n\r\n // clean all values from the post and store them into a wordpress option as a serialized array of cat ID's\r\n if ( isset($_POST['catreqarray']) ) {\r\n foreach ( $_POST['catreqarray'] as $key => $value ) {\r\n $catreqarray[absint($value)] = '';\r\n }\r\n update_option('cp_required_categories', $catreqarray);\r\n } else if (isset($_POST['cp_required_membership_type'])){\r\n delete_option('cp_required_categories');\r\n }\r\n\r\n\t\t\tif ( get_option('cp_tools_run_expiredcheck') == 'yes' ) {\r\n\t\t\t\t\tupdate_option('cp_tools_run_expiredcheck', 'no');\r\n\t\t\t\t\tcp_check_expired_cron();\r\n\t\t\t\t\t$toolsMessage = '';\r\n\t\t\t\t\t$toolsMessage .= __('Ads Expired Check was executed.');\r\n\t\t\t}\r\n\r\n\t\t\t// flush out the cache so changes can be visible\r\n\t\t\tcp_flush_all_cache();\r\n\r\n echo '<div class=\"updated\"><p>'.__('Your settings have been saved.','appthemes'). ' ' . $toolsMessage . '</p></div>';\r\n\r\n } elseif ( isset($_POST['submitted']) && $_POST['submitted'] == 'convertToCustomPostType' ) {\r\n\t\tupdate_option('cp_tools_run_convertToCustomPostType', 'no');\r\n\t\t$toolsMessage .= cp_convert_posts2Ads();\r\n\t\techo $toolsMessage;\r\n\t}\r\n}", "function options_sanitize($options){\r\n // do checks here \r\n //debugbreak(); \r\n if($options['reset'] == 'reset'){\r\n add_settings_error('reset_settings','reset_settings',__('Settings have been reset back to default values',$this->plugin_domain),'updated');\r\n return $this->get_options(true);\r\n }\r\n $options['clickable'] = $options['clickable'] == 'yes' ? 'yes' : 'no'; \r\n $options['dofollow'] = isset($options['dofollow']) ? 'on' : 'off'; \r\n $options['newwindow'] = isset($options['newwindow']) ? 'on' : 'off'; \r\n $options['del_options'] = isset($options['del_options']) ? 'on' : 'off';\r\n $options['del_table'] = isset($options['del_table']) ? 'on' : 'off';\r\n return $options;\r\n }", "public function run()\n {\n// Options are settings\n\n if ($this->command) $this->command->info('Creating Option Settings');\n\n\n $options_array = array(\n [\n 'key' => 'Landing Title',\n 'default' => \"What is trending in Kenya.\",\n 'value_type' =>Option::TYPE_STR\n ],\n [\n 'key' => 'Landing Description',\n 'default' => \"Getting all the news that are trending in Kenya.\",\n 'value_type' =>Option::TYPE_STR\n ],\n\n [\n 'key' => 'Contact Title',\n 'default' => \"Talk to us.\",\n 'value_type' =>Option::TYPE_STR\n ],\n [\n 'key' => 'Contact Description',\n 'default' => \"Find our contact information and contact form.\",\n 'value_type' =>Option::TYPE_STR\n ],\n\n [\n 'key' => 'Footer Title',\n 'default' => \"Welcome to Inatrend Kenya\",\n 'value_type' =>Option::TYPE_STR\n ],\n\n [\n 'key' => 'Footer Description',\n 'default' => \"\n <p>\n <small>We are here to get you the latest that is trending in Kenya.</small>\n </p>\n <div class=\\\"social-list\\\">\n <a class=\\\"social-list-item\\\" href=\\\"http://twitter.com\\\">\n <span class=\\\"icon icon-twitter\\\"></span>\n </a>\n <a class=\\\"social-list-item\\\" href=\\\"http://facebook.com\\\">\n <span class=\\\"icon icon-facebook\\\"></span>\n </a>\n <a class=\\\"social-list-item\\\" href=\\\"http://linkedin.com\\\">\n <span class=\\\"icon icon-linkedin\\\"></span>\n </a>\n </div>\n \",\n 'value_type' =>Option::TYPE_LON\n ],\n\n [\n 'key' => 'Latest Post Count',\n 'default' => 4,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Trending Post Count',\n 'default' => 4,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Trending Days Limit',\n 'default' => 30,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Limit Latest Post Per Category',\n 'default' => 6,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Primary Color',\n 'default' => '#56c8f3',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Primary Text Color',\n 'default' => '#111111',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Secondary Color',\n 'default' => '#0D325B',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Secondary Text Color',\n 'default' => '#EEEEEE',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Primary Button Color',\n 'default' => '#029ACF',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Secondary Button Color',\n 'default' => '#0D325B',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Danger Button Color',\n 'default' => '#ff0000',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Maximum Rating',\n 'default' => 10,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Default Font Size',\n 'default' => 16,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n );\n\n foreach ($options_array as $option) {\n Option::create([\n 'key' => $option['key'],\n 'default' => $option['default'],\n 'value_type' =>$option['value_type']\n ]);\n }\n }", "public function options()\n\t{\n\n\t $tr = new GoogleTranslate('tr');\n\t $tr->setTarget('ru');\n\n\t $options = \\App\\Option::all();\n\t $text = '';\n\n\t foreach ($options as $option) {\n\t $text .= ' | '.$option->id.'=='.$option->title;\n\t }\n\n\t $ru = $tr->translate($text);\n\t $options2 = [];\n\t $options2 = explode(' | ', $ru);\n\t unset($options2[0]);\n\n\t foreach ($options2 as $option2) {\n\t list($id, $title) = explode('==', $option2);\n\t $option_data = $options->firstWhere('id', $id);\n\t $option_data->title = trim($title);\n\t $option_data->slug = str_slug(trim($title));\n\t $option_data->save();\n\t }\n\n\t echo 'The End!';\n\t}", "protected function prepareOptions()\n {\n $options = $this->getOptions();\n $input = [];\n\n foreach($options as $option)\n {\n $input[] = $this->option($option[0]);\n }\n\n $larapath = $this->laravel['path'];\n $lastnsdelim = strrpos($input[1], '\\\\');\n\n $this->options[$options[0][0]] = $input[0] ?: substr($input[1], 0, $lastnsdelim);\n $this->options[$options[1][0]] = substr($input[1], $lastnsdelim);\n $this->options[$options[2][0]] = $input[2] ?: ExtStr::tableize($input[1]);\n $this->options[$options[3][0]] = $input[3] ?: $this->options[$options[1][0]].'Closure';\n $this->options[$options[4][0]] = $input[4] ?: ExtStr::tableize($input[1].'Closure');\n $this->options[$options[5][0]] = $input[5] ? $input[5] : $larapath . '/models';\n $this->options[$options[6][0]] = $input[6] ? $input[6] : $larapath . '/database/migrations';\n }", "function option_handler( $option_name ) {\n\t\tglobal $wpdb;\n\t\t// Step 1 -- exclusionary rules, don't send these options to vaultpress, because they\n\t\t// either change constantly and/or are inconsequential to the blog itself and/or they\n\t\t// are specific to the VaultPress plugin process and we want to avoid recursion\n\t\t$should_ping = true;\n\t\t$ignore_names = $this->get_option_name_ignore();\n\t\tforeach( (array)$ignore_names as $val ) {\n\t\t\tif ( $val{0} == '/' ) {\n\t\t\t\tif ( preg_match( $val, $option_name ) )\n\t\t\t\t\t$should_ping = false;\n\t\t\t} else {\n\t\t\t\tif ( $val == $option_name )\n\t\t\t\t\t$should_ping = false;\n\t\t\t}\n\t\t\tif ( !$should_ping )\n\t\t\t\tbreak;\n\t\t}\n\t\tif ( $should_ping )\n\t\t\t$this->add_ping( 'db', array( 'option' => $option_name ) );\n\n\t\t// Step 2 -- If WordPress is about to kick off a some \"cron\" action, we need to\n\t\t// flush vaultpress, because the \"remote\" cron threads done via http fetch will\n\t\t// be happening completely inside the window of this thread. That thread will\n\t\t// be expecting touched and accounted for tables\n\t\tif ( $option_name == '_transient_doing_cron' )\n\t\t\t$this->do_pings();\n\n\t\treturn $option_name;\n\t}", "public function parse() {\n\t\t$strShortOpts = $this->getShortOptionsString();\n\t\t$arrLongOpts = $this->getLongOptionsArray();\n\t\t$opts = getopt(trim($strShortOpts), $arrLongOpts);\n\n\t\t// hotfix that: php css.php -a=\"Web\" -l=\"blackrockdigital\" -t=\"main\"\n\t\t// because, it have more options given as defined... result is that:\n\t\t//array(1) {\n\t\t// 'a' =>\n\t\t// array(3) {\n\t\t// [0] =>\n\t\t// string(3) \"Web\"\n\t\t// [1] =>\n\t\t// string(13) \"ckrockdigital\"\n\t\t// [2] =>\n\t\t// string(2) \"in\"\n\t\t// }\n\t\t//}\n\t\t// and should convert into ['a' => 'Web']\n\t\t$arrayKeys = (is_array($opts) ? array_keys($opts) : []);\n\t\tif (is_array($opts) && count($opts) === 1 && !empty($opts[current($arrayKeys)]) && is_array($opts['a']) && $arrayKeys[0] === 'a') {\n\t\t\t$opts = ['a' => current($opts[current($arrayKeys)])];\n\t\t}\n\n\t\tforeach ($opts as $strOptionName => $strOptionValue) {\n\t\t\t$config = $this->getConfigByKey($strOptionName);\n\n\t\t\t/**\n\t\t\t * Fallback: if the no_value option is set, this value should set to true.\n\t\t\t */\n\t\t\tif ($config->getType() === self::OPTION_TYPE_NO_VALUE) {\n\t\t\t\t$strOptionValue = true;\n\t\t\t}\n\n\t\t\t$this->givenOptions[$strOptionName] = $strOptionValue;\n\t\t}\n\n\t\tif ($this->isSetOption('help')) {\n\t\t\t$this->printHelp();\n\t\t}\n\n\t\t// validate required params\n\t\t$options = $this->getAllConfigOptions();\n\t\tforeach ($options as $key => $config) {\n\t\t\tif ($config->getType() !== self::OPTION_TYPE_REQUIRED) {\n\t\t\t\t// check there is not given options and have default values.\n\t\t\t\t$optional = $config->getDefaultValue();\n\n\t\t\t\tif (false === $this->isSetOption($key) && $optional != null) {\n\t\t\t\t\t$this->givenOptions[$key] = $optional;\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$optionValue = $this->getOptionValue($key);\n\t\t\tif (empty($optionValue)) {\n\t\t\t\t$this->printHelp('Missing required param [' . $key . '].');\n\t\t\t}\n\t\t}\n\t}", "function sanitize_option($option, $value)\n {\n }", "function propanel_siteoptions_machine($options) {\n \n $counter = 0;\n\t$menu = '';\n\t$output = '';\n\tforeach ($options as $value) {\n\t \n\t\t$counter++;\n\t\t$val = '';\n\t\t//Start Heading\n\t\t if ( $value['type'] != \"heading\" )\n\t\t {\n\t\t \t$class = ''; if(isset( $value['class'] )) { $class = $value['class']; }\n\t\t\t//$output .= '<div class=\"section section-'. $value['type'] .'\">'.\"\\n\".'<div class=\"option-inner\">'.\"\\n\";\n\t\t\t$output .= '<div class=\"section section-'.$value['type'].' '. $class .'\">'.\"\\n\";\n\t\t\t$output .= '<h4 class=\"heading\">'. $value['name'] .'</h3>'.\"\\n\";\n\t\t\t$output .= '<div class=\"option\">'.\"\\n\" . '<div class=\"controls\">'.\"\\n\";\n\n\t\t } \n\t\t //End Heading\n\t\t$select_value = ''; \n\t\tswitch ( $value['type'] ) {\n\t\t\n\t\tcase 'text':\n\t\t\t$val = $value['std'];\n\t\t\t$std = get_option($value['id']);\n\t\t\tif ( $std != \"\") { $val = $std; }\n\t\t\t$output .= '<input class=\"of-input\" name=\"'. $value['id'] .'\" id=\"'. $value['id'] .'\" type=\"'. $value['type'] .'\" value=\"'. $val .'\" />';\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase 'select':\n\n\t\t\t$output .= '<select class=\"of-input\" name=\"'. $value['id'] .'\" id=\"'. $value['id'] .'\">';\n\t\t\n\t\t\t$select_value = get_option($value['id']);\n\t\t\t \n\t\t\tforeach ($value['options'] as $option) {\n\t\t\t\t\n\t\t\t\t$selected = '';\n\t\t\t\t\n\t\t\t\t if($select_value != '') {\n\t\t\t\t\t if ( $select_value == $option) { $selected = ' selected=\"selected\"';} \n\t\t\t } else {\n\t\t\t\t\t if ( isset($value['std']) )\n\t\t\t\t\t\t if ($value['std'] == $option) { $selected = ' selected=\"selected\"'; }\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t $output .= '<option'. $selected .'>';\n\t\t\t\t $output .= $option;\n\t\t\t\t $output .= '</option>';\n\t\t\t \n\t\t\t } \n\t\t\t $output .= '</select>';\n\n\t\t\t\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t//@since 2.0 added by denzel to allow value different from label.\n\t\tcase 'select-advance':\n\n\t\t\t$output .= '<select class=\"of-input\" name=\"'. $value['id'] .'\" id=\"'. $value['id'] .'\">';\n\t\t\n\t\t\t$select_value = get_option($value['id']);\n\t\t\t \n\t\t\tforeach ($value['options'] as $key => $option) {\n\t\t\t\t\n\t\t\t\t$selected = '';\n\t\t\t\t\n\t\t\t\t if($select_value != '') {\n\t\t\t\t\t if ( $select_value == $key) { $selected = ' selected=\"selected\"';} \n\t\t\t } else {\n\t\t\t\t\t if ( isset($value['std']) )\n\t\t\t\t\t\t if ($value['std'] == $key) { $selected = ' selected=\"selected\"'; }\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t $output .= '<option value=\"'. $key .'\" '. $selected .'>';\n\t\t\t\t $output .= $option;\n\t\t\t\t $output .= '</option>';\n\t\t\t \n\t\t\t } \n\t\t\t $output .= '</select>';\n\n\t\t\t\n\t\tbreak;\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase 'fontsize':\n\t\t\n\t\t/* Font Size */\n\t\t\t$val = $default['size'];\n\t\t\tif ( $typography_stored['size'] != \"\") { $val = $typography_stored['size']; }\n\t\t\t$output .= '<select class=\"of-typography of-typography-size\" name=\"'. $value['id'].'_size\" id=\"'. $value['id'].'_size\">';\n\t\t\t\tfor ($i = 9; $i < 71; $i++){ \n\t\t\t\t\tif($val == $i){ $active = 'selected=\"selected\"'; } else { $active = ''; }\n\t\t\t\t\t$output .= '<option value=\"'. $i .'\" ' . $active . '>'. $i .'px</option>'; }\n\t\t\t$output .= '</select>';\n\t\t\n\t\t\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase \"multicheck\":\n\t\t\n\t\t\t$std = $value['std']; \n\t\t\t\n\t\t\tforeach ($value['options'] as $key => $option) {\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t$tt_key = $value['id'] . '_' . $key;\n\t\t\t$saved_std = get_option($tt_key);\n\t\t\t\t\t\n\t\t\tif(!empty($saved_std)) \n\t\t\t{ \n\t\t\t\t if($saved_std == 'true'){\n\t\t\t\t\t $checked = 'checked=\"checked\"'; \n\t\t\t\t } \n\t\t\t\t else{\n\t\t\t\t\t $checked = ''; \n\t\t\t\t } \n\t\t\t} \n\t\t\telseif( $std == $key) {\n\t\t\t $checked = 'checked=\"checked\"';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$checked = ''; }\n\t\t\t$output .= '<input type=\"checkbox\" class=\"checkbox of-input\" name=\"'. $tt_key .'\" id=\"'. $tt_key .'\" value=\"true\" '. $checked .' /><label for=\"'. $tt_key .'\">'. $option .'</label><br />';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase 'textarea':\n\t\t\t\n\t\t\t$cols = '8';\n\t\t\t$ta_value = '';\n\t\t\t\n\t\t\tif(isset($value['std'])) {\n\t\t\t\t\n\t\t\t\t$ta_value = $value['std']; \n\t\t\t\t\n\t\t\t\tif(isset($value['options'])){\n\t\t\t\t\t$ta_options = $value['options'];\n\t\t\t\t\tif(isset($ta_options['cols'])){\n\t\t\t\t\t$cols = $ta_options['cols'];\n\t\t\t\t\t} else { $cols = '8'; }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t$std = get_option($value['id']);\n\t\t\t\tif( $std != \"\") { $ta_value = stripslashes( $std ); }\n\t\t\t\t$output .= '<textarea class=\"of-input\" name=\"'. $value['id'] .'\" id=\"'. $value['id'] .'\" cols=\"'. $cols .'\" rows=\"8\">'.$ta_value.'</textarea>';\n\t\t\t\n\t\t\t\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase \"radio\":\n\t\t\t\n\t\t\t $select_value = get_option( $value['id']);\n\t\t\t\t \n\t\t\t foreach ($value['options'] as $key => $option) \n\t\t\t { \n\n\t\t\t\t $checked = '';\n\t\t\t\t if($select_value != '') {\n\t\t\t\t\t\tif ( $select_value == $key) { $checked = ' checked'; } \n\t\t\t\t } else {\n\t\t\t\t\tif ($value['std'] == $key) { $checked = ' checked'; }\n\t\t\t\t }\n\t\t\t\t$output .= '<input class=\"of-input of-radio\" type=\"radio\" name=\"'. $value['id'] .'\" value=\"'. $key .'\" '. $checked .' />' . $option .'<br />';\n\t\t\t\n\t\t\t}\n\t\t\t \n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase \"checkbox\": \n\t\t\n\t\t $std = $value['std']; \n\t\t \n\t\t $saved_std = get_option($value['id']);\n\t\t \n\t\t $checked = '';\n\t\t\t\n\t\t\tif(!empty($saved_std)) {\n\t\t\t\tif($saved_std == 'true') {\n\t\t\t\t$checked = 'checked=\"checked\"';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t $checked = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif( $std == 'true') {\n\t\t\t $checked = 'checked=\"checked\"';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$checked = '';\n\t\t\t}\n\t\t\t$output .= '<input type=\"checkbox\" class=\"checkbox of-input\" name=\"'. $value['id'] .'\" id=\"'. $value['id'] .'\" value=\"true\" '. $checked .' />';\n\n\t\tbreak;\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase \"upload\":\n\t\t\t\n\t\t\t$output .= propanel_siteoptions_uploader_function($value['id'],$value['std'],null);\n\t\t\t\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase \"upload_min\":\n\t\t\t\n\t\t\t$output .= propanel_siteoptions_uploader_function($value['id'],$value['std'],'min');\n\t\t\t\n\t\tbreak;\n\t\tcase \"color\":\n\t\t\t$val = $value['std'];\n\t\t\t$stored = get_option( $value['id'] );\n\t\t\tif ( $stored != \"\") { $val = $stored; }\n\t\t\t$output .= '<div id=\"' . $value['id'] . '_picker\" class=\"colorSelector\"><div></div></div>';\n\t\t\t$output .= '<input class=\"of-color\" name=\"'. $value['id'] .'\" id=\"'. $value['id'] .'\" type=\"text\" value=\"'. $val .'\" />';\n\t\tbreak; \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t \n\t\t\n\t\tcase \"images\":\n\t\t\t$i = 0;\n\t\t\t$select_value = get_option( $value['id']);\n\t\t\t\t \n\t\t\tforeach ($value['options'] as $key => $option) \n\t\t\t { \n\t\t\t $i++;\n\n\t\t\t\t $checked = '';\n\t\t\t\t $selected = '';\n\t\t\t\t if($select_value != '') {\n\t\t\t\t\t\tif ( $select_value == $key) { $checked = ' checked'; $selected = 'of-radio-img-selected'; } \n\t\t\t\t } else {\n\t\t\t\t\t\tif ($value['std'] == $key) { $checked = ' checked'; $selected = 'of-radio-img-selected'; }\n\t\t\t\t\t\telseif ($i == 1 && !isset($select_value)) { $checked = ' checked'; $selected = 'of-radio-img-selected'; }\n\t\t\t\t\t\telseif ($i == 1 && $value['std'] == '') { $checked = ' checked'; $selected = 'of-radio-img-selected'; }\n\t\t\t\t\t\telse { $checked = ''; }\n\t\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$output .= '<span>';\n\t\t\t\t$output .= '<input type=\"radio\" id=\"of-radio-img-' . $value['id'] . $i . '\" class=\"checkbox of-radio-img-radio\" value=\"'.$key.'\" name=\"'. $value['id'].'\" '.$checked.' />';\n\t\t\t\t$output .= '<div class=\"of-radio-img-label\">'. $key .'</div>';\n\t\t\t\t$output .= '<img src=\"'.$option.'\" alt=\"\" class=\"of-radio-img-img '. $selected .'\" onClick=\"document.getElementById(\\'of-radio-img-'. $value['id'] . $i.'\\').checked = true;\" />';\n\t\t\t\t$output .= '</span>';\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\tbreak; \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcase \"info\":\n\t\t\t$default = $value['std'];\n\t\t\t$output .= $default;\n\t\tbreak;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t \n\t\t\n\t\tcase \"heading\":\n\t\t\t\n\t\t\tif($counter >= 2){\n\t\t\t $output .= '</div>'.\"\\n\";\n\t\t\t}\n\t\t\t$jquery_click_hook = ereg_replace(\"[^A-Za-z0-9]\", \"\", strtolower($value['name']) );\n\t\t\t$jquery_click_hook = \"of-option-\" . $jquery_click_hook;\n\t\t\t$menu .= '<li><a title=\"'. $value['name'] .'\" href=\"#'. $jquery_click_hook .'\">'. $value['name'] .'</a></li>';\n\t\t\t$output .= '<div class=\"group\" id=\"'. $jquery_click_hook .'\"><h2>'.$value['name'].'</h2>'.\"\\n\";\n\t\tbreak; \n\t\t} \n\t\t\n\t\t// if TYPE is an array, formatted into smaller inputs... ie smaller values\n\t\tif ( is_array($value['type'])) {\n\t\t\tforeach($value['type'] as $array){\n\t\t\t\n\t\t\t\t\t$id = $array['id']; \n\t\t\t\t\t$std = $array['std'];\n\t\t\t\t\t$saved_std = get_option($id);\n\t\t\t\t\tif($saved_std != $std){$std = $saved_std;} \n\t\t\t\t\t$meta = $array['meta'];\n\t\t\t\t\t\n\t\t\t\t\tif($array['type'] == 'text') { // Only text at this point\n\t\t\t\t\t\t \n\t\t\t\t\t\t $output .= '<input class=\"input-text-small of-input\" name=\"'. $id .'\" id=\"'. $id .'\" type=\"text\" value=\"'. $std .'\" />'; \n\t\t\t\t\t\t $output .= '<span class=\"meta-two\">'.$meta.'</span>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\tif ( $value['type'] != \"heading\" ) { \n\t\t\tif ( $value['type'] != \"checkbox\" ) \n\t\t\t\t{ \n\t\t\t\t$output .= '<br/>';\n\t\t\t\t}\n\t\t\tif(!isset($value['desc'])){ $explain_value = ''; } else{ $explain_value = $value['desc']; } \n\t\t\t$output .= '</div><div class=\"explain\">'. $explain_value .'</div>'.\"\\n\";\n\t\t\t$output .= '<div class=\"clear\"> </div></div></div>'.\"\\n\";\n\t\t\t}\n\t \n\t}\n $output .= '</div>';\n return array($output,$menu);\n\n}", "abstract function options();", "function sanitize_options(array $options)\n {\n }", "private function handleOption() : void\n {\n switch ($this->selectedOption) {\n case QAOptionsEnum::ADD:\n $this->addQuestion();\n break;\n\n case QAOptionsEnum::VIEW:\n $this->viewQuestion();\n break;\n\n case QAOptionsEnum::SHOW_ANSWERS:\n $this->showAnswers();\n break;\n\n case QAOptionsEnum::QA_EXIT:\n $this->exit();\n break;\n }\n\n $this->showOptions($this->console);\n }", "function process_cli_options($aStageManager)\n{\n\t//by the time this function is executed, Regisseur class will have been loaded & usable.\n\treturn $aStageManager->processOptionsForCLI(Regisseur::DEFAULT_CLI_SHORT_OPTIONS . 'b');\n}", "function save_options(){\n\t\t\n\t\t$nonsavable_types=array('open', 'close','subtitle','title','documentation','block','blockclose');\n\t\n\t\t//insert the default values if the fields are empty\n\t\tforeach ($this->options as $value) {\n\t\t\tif(isset($value['id']) && get_option($value['id'])===false && isset($value['std']) && !in_array($value['type'], $nonsavable_types)){\n\t\t\t\tupdate_option( $value['id'], $value['std']);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//save the field's values if the Save action is present\n\t\tif ( $_GET['page'] == HANA_OPTIONS_PAGE ) {\n\t\t\tif ( isset($_REQUEST['action']) && 'save' == $_REQUEST['action'] ) {\n\t\t\t\t//verify the nonce\n\t\t\t\tif ( empty($_POST) || !wp_verify_nonce($_POST['hana-theme-options'],'hana-theme-update-options') )\n\t\t\t\t{\n\t\t\t\t\tprint 'Sorry, your nonce did not verify.';\n\t\t\t\t\texit;\n\t\t\t\t}else{\n\t\t\t\t\tif(!get_option(HANA_SHORTNAME.'_first_save')){\n\t\t\t\t\t\tupdate_option(HANA_SHORTNAME.'_first_save','true');\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($this->options as $value) {\n\t\t\t\t\t\tif(isset($value['id']) ) if( isset( $_REQUEST[ $value['id'] ] ) && !in_array($value['type'], $nonsavable_types)) {\n\t\t\t\t\t\t\tupdate_option( $value['id'], $_REQUEST[ $value['id'] ] );\n\t\t\t\t\t\t} elseif(!in_array($value['type'], $nonsavable_types)){\n\t\t\t\t\t\t\tdelete_option( $value['id'] );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t/* Update the values for the custom options that contain unlimited suboptions - for example when having\n\t\t\t\t\t\t * a slider with fields \"title\" and \"imageurl\", for all the entities the titles will be saved in one field,\n\t\t\t\t\t\t * separated by a separator. In this case, if the field name is slider_title and it contains some data like\n\t\t\t\t\t\t * title 1|*|title2|*|title3 (|*| is the separator), then all this data will be saved into a custom field\n\t\t\t\t\t\t * with id slider_titles.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif($value['type']=='custom'){\n\t\t\t\t\t\t\tforeach($value['fields'] as $field){\n\t\t\t\t\t\t\t\tupdate_option( $field['id'].'s', $_REQUEST[ $field['id'].'s' ] );\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\theader(\"Location: admin.php?page=\".HANA_OPTIONS_PAGE.\"&saved=true\");\n\t\t\t\t\tdie;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}", "public static function sanitize() {\n\n $new_input = self::get_options();\n $default_options = self::default_options();\n $parts = parse_url($_POST['_wp_http_referer']);\n parse_str($parts['query'], $query);\n $tab = (array_key_exists('tab', $query)) ? $query['tab'] : 'general';\n\n switch ($tab) {\n case 'general':\n default:\n $new_input['cris_org_nr'] = isset($_POST[self::option_name]['cris_org_nr']) ? sanitize_text_field($_POST[self::option_name]['cris_org_nr']) : 0;\n break;\n\n case 'layout':\n $new_input['cris_pub_order'] = isset($_POST[self::option_name]['cris_pub_order']) ? explode(\"\\n\", str_replace(\"\\r\", \"\", $_POST[self::option_name]['cris_pub_order'])) : $default_options['cris_pub_order'];\n $new_input['cris_pub_subtypes_order'] = isset($_POST[self::option_name]['cris_pub_subtypes_order']) ? explode(\"\\n\", str_replace(\"\\r\", \"\", $_POST[self::option_name]['cris_pub_subtypes_order'])) : $default_options['cris_pub_subtypes_order'];\n $new_input['cris_univis'] = in_array($_POST[self::option_name]['cris_univis'], array('person', 'cris', 'none')) ? $_POST[self::option_name]['cris_univis'] : $default_options['cris_univis'];\n $new_input['cris_bibtex'] = isset($_POST[self::option_name]['cris_bibtex']) ? 1 : 0;\n $new_input['cris_url'] = isset($_POST[self::option_name]['cris_url']) ? 1 : 0;\n $new_input['cris_doi'] = isset($_POST[self::option_name]['cris_doi']) ? 1 : 0;\n $new_input['cris_oa'] = isset($_POST[self::option_name]['cris_oa']) ? 1 : 0;\n $new_input['cris_name_order_plugin'] = (isset($_POST[self::option_name]['cris_name_order_plugin'])\n && $_POST[self::option_name]['cris_name_order_plugin'] == 'lastname-firstname') ? 'lastname-firstname' : 'firstname-lastname';\n $new_input['cris_award_order'] = isset($_POST[self::option_name]['cris_award_order']) ? explode(\"\\n\", str_replace(\"\\r\", \"\", $_POST[self::option_name]['cris_award_order'])) : $default_options['cris_award_order'];\n $new_input['cris_award_link'] = in_array($_POST[self::option_name]['cris_award_link'], array('person', 'cris', 'none')) ? $_POST[self::option_name]['cris_award_link'] : $default_options['cris_award_link'];\n $new_input['cris_fields_num_pub'] = isset($_POST[self::option_name]['cris_fields_num_pub']) ? sanitize_text_field($_POST[self::option_name]['cris_fields_num_pub']) : 0;\n\t $new_input['cris_field_link'] = in_array($_POST[self::option_name]['cris_field_link'], array('person', 'cris', 'none')) ? $_POST[self::option_name]['cris_field_link'] : $default_options['cris_field_link'];\n\t $new_input['cris_project_order'] = isset($_POST[self::option_name]['cris_project_order']) ? explode(\"\\n\", str_replace(\"\\r\", \"\", $_POST[self::option_name]['cris_project_order'])) : $default_options['cris_project_order'];\n $new_input['cris_project_link'] = in_array($_POST[self::option_name]['cris_project_link'], array('person', 'cris', 'none')) ? $_POST[self::option_name]['cris_project_link'] : $default_options['cris_project_link'];\n $new_input['cris_patent_order'] = isset($_POST[self::option_name]['cris_patent_order']) ? explode(\"\\n\", str_replace(\"\\r\", \"\", $_POST[self::option_name]['cris_patent_order'])) : $default_options['cris_patent_order'];\n $new_input['cris_patent_link'] = in_array($_POST[self::option_name]['cris_patent_link'], array('person', 'cris', 'none')) ? $_POST[self::option_name]['cris_patent_link'] : $default_options['cris_patent_link'];\n $new_input['cris_activities_order'] = isset($_POST[self::option_name]['cris_activities_order']) ? explode(\"\\n\", str_replace(\"\\r\", \"\", $_POST[self::option_name]['cris_activities_order'])) : $default_options['cris_activities_order'];\n $new_input['cris_activities_link'] = in_array($_POST[self::option_name]['cris_activities_link'], array('person', 'cris', 'none')) ? $_POST[self::option_name]['cris_activities_link'] : $default_options['cris_activities_link'];\n $new_input['cris_standardizations_order'] = isset($_POST[self::option_name]['cris_standardizations_order']) ? explode(\"\\n\", str_replace(\"\\r\", \"\", $_POST[self::option_name]['cris_standardizations_order'])) : $default_options['cris_standardizations_order'];\n $new_input['cris_standardizations_link'] = in_array($_POST[self::option_name]['cris_standardizations_link'], array('person', 'cris', 'none')) ? $_POST[self::option_name]['cris_standardizations_link'] : $default_options['cris_standardizations_link'];\n break;\n case 'sync':\n $new_input['cris_sync_check'] = isset($_POST[self::option_name]['cris_sync_check']) ? 1 : 0;\n if(is_array($_POST[self::option_name]['cris_sync_shortcode_format'])) {\n /*foreach ($_POST[self::option_name]['cris_sync_shortcode_format'] as $_check){\n foreach ($_check as $_k => $_v) {\n $new_input['cris_sync_shortcode_format'][$_k] = $_v;\n }\n }*/\n $new_input['cris_sync_shortcode_format'] = $_POST[self::option_name]['cris_sync_shortcode_format'];\n }\n break;\n }\n return $new_input;\n }", "public function transformValue($data, $options) {\n\n if(strpos($options,'forcevalue:')!==false) {\n $data = $this->extractOptionValue('forcevalue:',$options);\n //if deault is \"null\"\n if($data==\"null\") $data=null;\n } elseif(strpos($options,'defaultvalue:')!==false && !strlen($data) && !is_bool($data) ) {\n $data = $this->extractOptionValue('defaultvalue:',$options);\n //if deault is \"null\"\n if($data==\"null\") $data=null;\n }\n\n if( strpos($options,'tolowercase')!==false && strlen($data)) (is_array($data))?$data = array_map('strtolower',$data):$data = strtolower($data);\n if( strpos($options,'touppercase')!==false && strlen($data)) (is_array($data))?$data = array_map('strtoupper',$data):$data = strtoupper($data);\n if( strpos($options,'trim')!==false && strlen($data)) (is_array($data))?$data = array_map('trim',$data):$data = trim($data);\n if( strpos($options,'regex_delete:')!==false) {\n $regex = $this->extractOptionValue(\"regex_delete:\",$options);\n if(strlen($regex)) {\n if(is_array($data)) foreach ($data as &$item) $item = preg_replace(\"/$regex/\",'',$item);\n else $data = preg_replace(\"/$regex/\",'',$data);\n }\n }\n\n //Convert a string into an array\n if( strpos($options,'toarray:')!==false && !is_array($data) && is_string($data)) {\n $sep = $this->extractOptionValue('toarray:',$options);\n if(strlen($data))\n $data = explode($sep,$data);\n else $data = [];\n }\n\n //Convert an array into string\n if( strpos($options,'tostring:')!==false && is_array($data) ) {\n $sep = $this->extractOptionValue('tostring:',$options);\n if(!$sep) $sep=',';\n if(count($data))\n $data = implode($sep,$data);\n else $data = \"\";\n }\n\n return $data;\n }", "protected function get_options()\n\t{}", "function sanitize_option($option, $value) {\n\n\tswitch ( $option ) {\n\t\tcase 'admin_email' :\n\t\tcase 'new_admin_email' :\n\t\t\t$value = sanitize_email( $value );\n\t\t\tif ( ! is_email( $value ) ) {\n\t\t\t\t$value = get_option( $option ); // Resets option to stored value in the case of failed sanitization\n\t\t\t\tif ( function_exists( 'add_settings_error' ) )\n\t\t\t\t\tadd_settings_error( $option, 'invalid_admin_email', __( 'The email address entered did not appear to be a valid email address. Please enter a valid email address.' ) );\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'thumbnail_size_w':\n\t\tcase 'thumbnail_size_h':\n\t\tcase 'medium_size_w':\n\t\tcase 'medium_size_h':\n\t\tcase 'large_size_w':\n\t\tcase 'large_size_h':\n\t\tcase 'mailserver_port':\n\t\tcase 'comment_max_links':\n\t\tcase 'page_on_front':\n\t\tcase 'page_for_posts':\n\t\tcase 'rss_excerpt_length':\n\t\tcase 'default_category':\n\t\tcase 'default_email_category':\n\t\tcase 'default_link_category':\n\t\tcase 'close_comments_days_old':\n\t\tcase 'comments_per_page':\n\t\tcase 'thread_comments_depth':\n\t\tcase 'users_can_register':\n\t\tcase 'start_of_week':\n\t\t\t$value = absint( $value );\n\t\t\tbreak;\n\n\t\tcase 'posts_per_page':\n\t\tcase 'posts_per_rss':\n\t\t\t$value = (int) $value;\n\t\t\tif ( empty($value) )\n\t\t\t\t$value = 1;\n\t\t\tif ( $value < -1 )\n\t\t\t\t$value = abs($value);\n\t\t\tbreak;\n\n\t\tcase 'default_ping_status':\n\t\tcase 'default_comment_status':\n\t\t\t// Options that if not there have 0 value but need to be something like \"closed\"\n\t\t\tif ( $value == '0' || $value == '')\n\t\t\t\t$value = 'closed';\n\t\t\tbreak;\n\n\t\tcase 'blogdescription':\n\t\tcase 'blogname':\n\t\t\t$value = wp_kses_post( $value );\n\t\t\t$value = esc_html( $value );\n\t\t\tbreak;\n\n\t\tcase 'blog_charset':\n\t\t\t$value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value); // strips slashes\n\t\t\tbreak;\n\n\t\tcase 'blog_public':\n\t\t\t// This is the value if the settings checkbox is not checked on POST. Don't rely on this.\n\t\t\tif ( null === $value )\n\t\t\t\t$value = 1;\n\t\t\telse\n\t\t\t\t$value = intval( $value );\n\t\t\tbreak;\n\n\t\tcase 'date_format':\n\t\tcase 'time_format':\n\t\tcase 'mailserver_url':\n\t\tcase 'mailserver_login':\n\t\tcase 'mailserver_pass':\n\t\tcase 'upload_path':\n\t\t\t$value = strip_tags( $value );\n\t\t\t$value = wp_kses_data( $value );\n\t\t\tbreak;\n\n\t\tcase 'ping_sites':\n\t\t\t$value = explode( \"\\n\", $value );\n\t\t\t$value = array_filter( array_map( 'trim', $value ) );\n\t\t\t$value = array_filter( array_map( 'esc_url_raw', $value ) );\n\t\t\t$value = implode( \"\\n\", $value );\n\t\t\tbreak;\n\n\t\tcase 'gmt_offset':\n\t\t\t$value = preg_replace('/[^0-9:.-]/', '', $value); // strips slashes\n\t\t\tbreak;\n\n\t\tcase 'siteurl':\n\t\t\tif ( (bool)preg_match( '#http(s?)://(.+)#i', $value) ) {\n\t\t\t\t$value = esc_url_raw($value);\n\t\t\t} else {\n\t\t\t\t$value = get_option( $option ); // Resets option to stored value in the case of failed sanitization\n\t\t\t\tif ( function_exists('add_settings_error') )\n\t\t\t\t\tadd_settings_error('siteurl', 'invalid_siteurl', __('The WordPress address you entered did not appear to be a valid URL. Please enter a valid URL.'));\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'home':\n\t\t\tif ( (bool)preg_match( '#http(s?)://(.+)#i', $value) ) {\n\t\t\t\t$value = esc_url_raw($value);\n\t\t\t} else {\n\t\t\t\t$value = get_option( $option ); // Resets option to stored value in the case of failed sanitization\n\t\t\t\tif ( function_exists('add_settings_error') )\n\t\t\t\t\tadd_settings_error('home', 'invalid_home', __('The Site address you entered did not appear to be a valid URL. Please enter a valid URL.'));\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'WPLANG':\n\t\t\t$allowed = get_available_languages();\n\t\t\tif ( ! is_multisite() && defined( 'WPLANG' ) && '' !== WPLANG && 'en_US' !== WPLANG ) {\n\t\t\t\t$allowed[] = WPLANG;\n\t\t\t}\n\t\t\tif ( ! in_array( $value, $allowed ) && ! empty( $value ) ) {\n\t\t\t\t$value = get_option( $option );\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'illegal_names':\n\t\t\tif ( ! is_array( $value ) )\n\t\t\t\t$value = explode( ' ', $value );\n\n\t\t\t$value = array_values( array_filter( array_map( 'trim', $value ) ) );\n\n\t\t\tif ( ! $value )\n\t\t\t\t$value = '';\n\t\t\tbreak;\n\n\t\tcase 'limited_email_domains':\n\t\tcase 'banned_email_domains':\n\t\t\tif ( ! is_array( $value ) )\n\t\t\t\t$value = explode( \"\\n\", $value );\n\n\t\t\t$domains = array_values( array_filter( array_map( 'trim', $value ) ) );\n\t\t\t$value = array();\n\n\t\t\tforeach ( $domains as $domain ) {\n\t\t\t\tif ( ! preg_match( '/(--|\\.\\.)/', $domain ) && preg_match( '|^([a-zA-Z0-9-\\.])+$|', $domain ) )\n\t\t\t\t\t$value[] = $domain;\n\t\t\t}\n\t\t\tif ( ! $value )\n\t\t\t\t$value = '';\n\t\t\tbreak;\n\n\t\tcase 'timezone_string':\n\t\t\t$allowed_zones = timezone_identifiers_list();\n\t\t\tif ( ! in_array( $value, $allowed_zones ) && ! empty( $value ) ) {\n\t\t\t\t$value = get_option( $option ); // Resets option to stored value in the case of failed sanitization\n\t\t\t\tif ( function_exists('add_settings_error') )\n\t\t\t\t\tadd_settings_error('timezone_string', 'invalid_timezone_string', __('The timezone you have entered is not valid. Please select a valid timezone.') );\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'permalink_structure':\n\t\tcase 'category_base':\n\t\tcase 'tag_base':\n\t\t\t$value = esc_url_raw( $value );\n\t\t\t$value = str_replace( 'http://', '', $value );\n\t\t\tbreak;\n\n\t\tcase 'default_role' :\n\t\t\tif ( ! get_role( $value ) && get_role( 'subscriber' ) )\n\t\t\t\t$value = 'subscriber';\n\t\t\tbreak;\n\n\t\tcase 'moderation_keys':\n\t\tcase 'blacklist_keys':\n\t\t\t$value = explode( \"\\n\", $value );\n\t\t\t$value = array_filter( array_map( 'trim', $value ) );\n\t\t\t$value = array_unique( $value );\n\t\t\t$value = implode( \"\\n\", $value );\n\t\t\tbreak;\n\t}\n\n\t/**\n\t * Filter an option value following sanitization.\n\t *\n\t * @since 2.3.0\n\t *\n\t * @param string $value The sanitized option value.\n\t * @param string $option The option name.\n\t */\n\t$value = apply_filters( \"sanitize_option_{$option}\", $value, $option );\n\n\treturn $value;\n}", "public function handle_post_action_options() {\n\t\tIggoGrid::check_nonce( 'options' );\n\n\t\tif ( ! current_user_can( 'iggogrid_access_options_screen' ) ) {\n\t\t\twp_die( __( 'You do not have sufficient permissions to access this page.', 'default' ) );\n\t\t}\n\n\t\tif ( empty( $_POST['options'] ) || ! is_array( $_POST['options'] ) ) {\n\t\t\tIggoGrid::redirect( array( 'action' => 'options', 'message' => 'error_save' ) );\n\t\t} else {\n\t\t\t$posted_options = wp_unslash( $_POST['options'] );\n\t\t}\n\n\t\t// Valid new options that will be merged into existing ones\n\t\t$new_options = array();\n\n\t\t// Check each posted option value, and (maybe) add it to the new options\n\t\tif ( ! empty( $posted_options['admin_menu_parent_page'] ) && '-' != $posted_options['admin_menu_parent_page'] ) {\n\t\t\t$new_options['admin_menu_parent_page'] = $posted_options['admin_menu_parent_page'];\n\t\t\t// re-init parent information, as IggoGrid::redirect() URL might be wrong otherwise\n\t\t\t/** This filter is documented in classes/class-controller.php */\n\t\t\t$this->parent_page = apply_filters( 'iggogrid_admin_menu_parent_page', $posted_options['admin_menu_parent_page'] );\n\t\t\t$this->is_top_level_page = in_array( $this->parent_page, array( 'top', 'middle', 'bottom' ), true );\n\t\t}\n\t\tif ( ! empty( $posted_options['plugin_language'] ) && '-' != $posted_options['plugin_language'] ) {\n\t\t\t// only allow \"auto\" language and all values that have a translation\n\t\t\tif ( 'auto' == $posted_options['plugin_language'] || array_key_exists( $posted_options['plugin_language'], $this->get_plugin_languages() ) ) {\n\t\t\t\t$new_options['plugin_language'] = $posted_options['plugin_language'];\n\t\t\t}\n\t\t}\n\n\t\t// Custom CSS can only be saved if the user is allowed to do so\n\t\t$update_custom_css_files = false;\n\t\tif ( current_user_can( 'iggogrid_edit_options' ) ) {\n\t\t\t// Checkbox\n\t\t\t$new_options['use_custom_css'] = ( isset( $posted_options['use_custom_css'] ) && 'true' === $posted_options['use_custom_css'] );\n\n\t\t\tif ( isset( $posted_options['custom_css'] ) ) {\n\t\t\t\t$new_options['custom_css'] = $posted_options['custom_css'];\n\n\t\t\t\t$iggogrid_css = IggoGrid::load_class( 'IggoGrid_CSS', 'class-css.php', 'classes' );\n\t\t\t\t$new_options['custom_css'] = $iggogrid_css->sanitize_css( $new_options['custom_css'] ); // Sanitize and tidy up Custom CSS\n\t\t\t\t$new_options['custom_css_minified'] = $iggogrid_css->minify_css( $new_options['custom_css'] ); // Minify Custom CSS\n\n\t\t\t\t// Maybe update CSS files as well\n\t\t\t\t$custom_css_file_contents = $iggogrid_css->load_custom_css_from_file( 'normal' );\n\t\t\t\tif ( false === $custom_css_file_contents ) {\n\t\t\t\t\t$custom_css_file_contents = '';\n\t\t\t\t}\n\t\t\t\tif ( $new_options['custom_css'] !== $custom_css_file_contents ) { // don't write to file if it already has the desired content\n\t\t\t\t\t$update_custom_css_files = true;\n\t\t\t\t\t// Set to false again. As it was set here, it will be set true again, if file saving succeeds\n\t\t\t\t\t$new_options['use_custom_css_file'] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// save gathered new options (will be merged into existing ones), and flush caches of caching plugins, to make sure that the new Custom CSS is used\n\t\tif ( ! empty( $new_options ) ) {\n\t\t\tIggoGrid::$model_options->update( $new_options );\n\t\t\tIggoGrid::$model_table->_flush_caching_plugins_caches();\n\t\t}\n\n\t\tif ( $update_custom_css_files ) { // capability check is performed above\n\t\t\tIggoGrid::redirect( array( 'action' => 'options', 'item' => 'save_custom_css' ), true );\n\t\t}\n\n\t\tIggoGrid::redirect( array( 'action' => 'options', 'message' => 'success_save' ) );\n\t}", "protected abstract function prepareConstructOption($options);", "abstract function fields_options();", "public function processOptions($option, $selectionPriceList, $searchMin = true);", "function asp_parse_options() {\r\r\n foreach ( wd_asp()->o as $def_k => $o ) {\r\r\n if ( preg_match(\"/\\_def$/\", $def_k) ) {\r\r\n $ok = preg_replace(\"/\\_def$/\", '', $def_k);\r\r\n\r\r\n // Dang, I messed up this elegant solution..\r\r\n if ( $ok == \"asp_it\")\r\r\n $ok = \"asp_it_options\";\r\r\n\r\r\n wd_asp()->o[$ok] = asp_decode_params( get_option($ok, wd_asp()->o[$def_k]) );\r\r\n wd_asp()->o[$ok] = array_merge(wd_asp()->o[$def_k], wd_asp()->o[$ok]);\r\r\n }\r\r\n }\r\r\n // Long previous version compatibility\r\r\n if ( wd_asp()->o['asp_caching'] === false )\r\r\n wd_asp()->o['asp_caching'] = wd_asp()->o['asp_caching_def'];\r\r\n\r\r\n // The globals are a sitewide options\r\r\n wd_asp()->o['asp_glob'] = get_site_option('asp_glob', wd_asp()->o['asp_glob_d']);\r\r\n wd_asp()->o['asp_glob'] = array_merge(wd_asp()->o['asp_glob_d'], wd_asp()->o['asp_glob']);\r\r\n}", "public function options_init() {\n\t\t\tglobal $allowedtags;\n\t\t\t$allowedtags['p'] = array();\n\t\t\t$this->allowedtags = $allowedtags;\n\n\t\t // set options equal to defaults\n\t\t $this->_options = get_option( $this->options_group[0]['options_name'] );\n\t\t if ( false === $this->_options ) {\n\t\t\t\t$this->_options = $this->get_defaults();\n\t\t }\n\t\t if ( isset( $_GET['undo'] ) && !isset( $_GET['settings-updated'] ) && is_array( $this->get_option('previous') ) ) {\n\t\t \t$this->_options = $this->get_option('previous');\n\t\t }\n\t\t update_option( $this->options_group[0]['options_name'], $this->_options );\t\t\n\t\t \n\t\t}", "protected function _processValue($value, $options)\n\t\t{\t\t\tif (is_array($value)) return $value;\n\n\t\t\t// Any options?\n\t\t\tif (is_array($options) && count($options) == 0) return $value;\n\n\t\t\t// Find fields\n\t\t\tpreg_match_all('/%{(?<field>[a-zA-Z\\_0-9]+)}/', $value, $matches);\n\t\t\tforeach ($matches['field'] as $field) {\n\n\t\t\t\t// Model?\n\t\t\t\tif (is_array($options)) {\n\n\t\t\t\t\tif (array_key_exists($field, $options)) {\n\t\t\t\t\t\t$value = str_replace('%{' . $field . '}', $options[$field], $value);\n\t\t\t\t\t}\n\n\t\t\t\t} elseif (is_subclass_of($options, \"\\ChickenWire\\Model\")) { \n\n\t\t\t\t\tif ($options->hasAttribute($field)) {\n\t\t\t\t\t\t$value = str_replace('%{' . $field . '}', $options->$field, $value);\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Find function fields\n\t\t\tpreg_match_all('/%{(?<function>[a-zA-Z\\_]+)\\((?<field>[a-zA-Z\\_0-9]+)\\)/', $value, $matches);\t\n\t\t\tforeach ($matches['function'] as $index => $function) {\n\t\t\t\t$field = $matches['field'][$index];\n\t\t\t\tif (array_key_exists($field, $options)) {\n\t\t\t\t\t$value = str_replace('%{' . $function . '(' . $field . ')}', $function($options[$field]), $value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $value;\n\n\t\t}", "public function run()\n {\n DB::table('options')->truncate();\n\t\tOption::create(array(\n\t\t\t'name' => 'Lĩnh vực',\n\t\t));\n\t\t\n\t\tOption::create(array(\n\t\t\t'name' => 'Package',\n\t\t));\n\n\t\tOption::create(array(\n\t\t\t'name' => 'Card level',\n\t\t));\n\n\t\tOption::create(array(\n\t\t\t'name' => 'Card chops chops',\n\t\t));\n\t\t\n\t\tOption::create(array(\n\t\t\t'name' => 'Month',\n\t\t));\n }", "protected function parse(): void\n {\n $parseOptions = true;\n $this->parsed = $this->getTokens();\n \n while (null !== $token = array_shift($this->parsed)) {\n if ($parseOptions && '--' == $token) {\n $parseOptions = false;\n } elseif ($parseOptions && 0 === strpos($token, '--')) {\n $this->parseLongOption($token);\n } elseif ($parseOptions && '-' === $token[0] && '-' !== $token) {\n $this->parseShortOption($token);\n }\n }\n }", "public function normalizeOptions(&$data, $item)\n {\n $options = [];\n\n foreach (OptionObject::CONVERSION_MAP as $element) {\n $value = $item[$element['key']];\n if ($value) {\n $options[] = new OptionObject($element['code'], $value);\n }\n }\n\n $data['options'] = $options;\n }", "private function process_settings_option($type, $key, $value){\n $data = array(\n 'type' => $type,\n 'meta_key' => $key,\n 'meta_value' => $value\n );\n $this->settings_option($data);\n }", "protected function _prepareOptions()\n {\n // apply options\n if (isset($this->_deploy['set_time_limit'])) {\n // script needs time to proces huge amount of data (important)\n set_time_limit($this->_deploy['set_time_limit']);\n }\n if (isset($this->_deploy['memory_limit'])) {\n // adjust memory_limit if needed (not very important)\n ini_set('memory_limit', $this->_deploy['memory_limit']);\n }\n }", "function sanitize_settings($options)\n\t\t{\n\t\t\t// Setup array of valid options for return\n\t\t\t$valid_options = array();\n\t\t\t\n\t\t\t// Establish defaults\n\t\t\t$option_defaults = array(\n\t\t\t\t'analytics' => '',\n\t\t\t\t'google' => '',\n\t\t\t\t'pinterest' => ''\n\t\t\t);\n\t\t\t\n\t\t\t$option_types = array(\n\t\t\t\t'analytics' => 'html',\n\t\t\t\t'google' => 'text',\n\t\t\t\t'pinterest' => 'text'\n\t\t\t);\n\t\t\t\n\t\t\t// Merge pass options and the defaults\n\t\t\t$options = (array) wp_parse_args($options, $option_defaults);\n\t\t\t\n\t\t\t// Sanitize each value\n\t\t\tforeach ($option_types as $key => $type) {\n\t\t\t\t$valid_options[$key] = $this->sanitize_an_option($options[$key], $type);\n\t\t\t}\n\n\t\t\treturn $valid_options;\n\t\t}", "public function getOptionsAttribute($value)\n\t{\n\t\t// Get 'options' field value\n\t\t$value = jsonToArray($value);\n\t\t\n\t\t// Handle 'options' field value\n\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t// Get Entered values (Or Default values if the Entry doesn't exist)\n\t\t\tif ($this->method == 'getSearchForm') {\n\t\t\t\tif (!isset($value['enable_form_area_customization'])) {\n\t\t\t\t\t$value['enable_form_area_customization'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['background_image'])) {\n\t\t\t\t\t$value['background_image'] = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->method == 'getLocations') {\n\t\t\t\tif (!isset($value['show_cities'])) {\n\t\t\t\t\t$value['show_cities'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['max_items'])) {\n\t\t\t\t\t$value['max_items'] = '14';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['show_post_btn'])) {\n\t\t\t\t\t$value['show_post_btn'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['show_map'])) {\n\t\t\t\t\t$value['show_map'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['map_width'])) {\n\t\t\t\t\t$value['map_width'] = '300px';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['map_height'])) {\n\t\t\t\t\t$value['map_height'] = '300px';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->method == 'getSponsoredPosts') {\n\t\t\t\tif (!isset($value['max_items'])) {\n\t\t\t\t\t$value['max_items'] = '20';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['autoplay'])) {\n\t\t\t\t\t$value['autoplay'] = '1';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->method == 'getLatestPosts') {\n\t\t\t\tif (!isset($value['max_items'])) {\n\t\t\t\t\t$value['max_items'] = '8';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['show_view_more_btn'])) {\n\t\t\t\t\t$value['show_view_more_btn'] = '1';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->method == 'getCategories') {\n\t\t\t\tif (!isset($value['type_of_display'])) {\n\t\t\t\t\t$value['type_of_display'] = 'c_picture_icon';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['show_icon'])) {\n\t\t\t\t\t$value['show_icon'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['max_sub_cats'])) {\n\t\t\t\t\t$value['max_sub_cats'] = '3';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (isset($this->method)) {\n\t\t\t\t// Get Default values\n\t\t\t\t$value = [];\n\t\t\t\tif ($this->method == 'getSearchForm') {\n\t\t\t\t\t$value['enable_form_area_customization'] = '1';\n\t\t\t\t\t$value['background_image'] = null;\n\t\t\t\t}\n\t\t\t\tif ($this->method == 'getLocations') {\n\t\t\t\t\t$value['show_cities'] = '1';\n\t\t\t\t\t$value['max_items'] = '14';\n\t\t\t\t\t$value['show_post_btn'] = '1';\n\t\t\t\t\t$value['show_map'] = '1';\n\t\t\t\t\t$value['map_width'] = '300px';\n\t\t\t\t\t$value['map_height'] = '300px';\n\t\t\t\t}\n\t\t\t\tif ($this->method == 'getSponsoredPosts') {\n\t\t\t\t\t$value['max_items'] = '20';\n\t\t\t\t\t$value['autoplay'] = '1';\n\t\t\t\t}\n\t\t\t\tif ($this->method == 'getLatestPosts') {\n\t\t\t\t\t$value['max_items'] = '8';\n\t\t\t\t\t$value['show_view_more_btn'] = '1';\n\t\t\t\t}\n\t\t\t\tif ($this->method == 'getCategories') {\n\t\t\t\t\t$value['type_of_display'] = 'c_picture_icon';\n\t\t\t\t\t$value['show_icon'] = '0';\n\t\t\t\t\t$value['max_sub_cats'] = '3';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "public function process_admin_options() {\n\t\t$method_order = isset( $_POST['method_order'] ) ? $_POST['method_order'] : '';\n\t\t$method_priority = isset( $_POST['method_priority'] ) ? $_POST['method_priority'] : '';\n\t\t$order = array();\n\t\t$selection_priority = array();\n\n\t\tif ( is_array( $method_order ) && sizeof( $method_order ) > 0 ) {\n\t\t\t$loop = 0;\n\t\t\tforeach ( $method_order as $method_id ) {\n\t\t\t\t$order[ $method_id ] = $loop;\n\t\t\t\t$selection_priority[ $method_id ] = absint( $method_priority[ $method_id ] );\n\t\t\t\t$loop ++;\n\t\t\t}\n\t\t}\n\n\t\tupdate_option( 'woocommerce_shipping_method_selection_priority', $selection_priority );\n\t\tupdate_option( 'woocommerce_shipping_method_order', $order );\n\t}", "private function setOptions()\n\t{\n\t\t$this->site = ( isset($_POST['site']) ) ? sanitize_text_field($_POST['site']) : null;\n\t\t$this->feed_type = ( isset($_POST['type']) && $_POST['type'] !== 'search' ) ? sanitize_text_field($_POST['type']) : 'search';\n\t\t$this->post_id = ( isset($_POST['id']) ) ? sanitize_text_field($_POST['id']) : null;\n\t\t$this->feed_format = ( isset($_POST['format']) && $_POST['format'] !== 'unformatted' ) ? sanitize_text_field($_POST['format']) : 'unformatted';\n\t}", "protected static abstract function getOptions();", "public function get_stLight_options($data_options);", "protected function getOptions() {}", "protected function getOptions() {}", "protected function getOptions() {}", "function driver_clean($option = array());", "function am_options_fields() {\n\tglobal $allowedtags;\n\t$AM_Sandbox_settings = get_option( 'AM_Sandbox_options' );\n\n\t// Get the unique id\n\tif ( isset( $AM_Sandbox_settings['id'] ) ) {\n\t\t$option_name = $AM_Sandbox_settings['id'];\n\t} else {\n\t\t$option_name = 'AM_Sandbox_options';\n\t}\n\n\t$settings = get_option( $option_name );\n\t$options = AM_Sandbox_options();\n\t$counter = 0;\n\t$menu = '';\n\n\t/* Loop through all options */\n\tforeach ($options as $option) {\n\t\t\n\t\t$counter++;\n\t\t$val = '';\n\t\t$selected_value = '';\n\t\t$checked = '';\n\t\t$output = '';\n\n\t\t/* Wrap all options */\n\t\tif ( $option['type'] != 'heading' && $option['type'] != 'info' ) {\n\n\t\t\t// make IDs lowercase with no spaces\n\t\t\t$option['id'] = preg_replace('/[^a-zA-Z0-9._\\-]/', '', $option['id']);\n\t\t\t// section id\n\t\t\t$id = 'section-' . $option['id'];\n\t\t\t// section class\n\t\t\t$class = 'section ';\n\t\t\tif ( isset( $option['class'] ) ) {\n\t\t\t\t$class .= ' ' . $option['class'];\n\t\t\t}\n\n\t\t\t// Build Output\n\t\t\t$output .= '<div id=\"' . esc_attr( $id ) . '\" class=\"' . esc_attr( $class ) . '\">';\n\t\t\tif ( isset( $option['name'] ) ) {\n\t\t\t\t$output .= '<h4 class=\"heading\">' . esc_html( $option['name'] ) . '</h4>';\n\t\t\t}\n\n\t\t}\n\n\t\t/* Set Default Value */\n\t\tif ( isset( $option['default'] ) ) {\n\t\t\t$val = $option['default'];\n\t\t}\n\n\t\t// Override $val if option is saved\n\t\tif ( $option['type'] != 'heading' && $option['type'] != 'info' ) {\n\t\t\tif ( isset( $settings[($option['id'])] ) ) {\n\t\t\t\t$val = $settings[($option['id'])];\n\t\t\t\t// Strip slash of non-array options\n\t\t\t\tif ( !is_array( $val ) ) {\n\t\t\t\t\t$val = stripslashes( $val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* If there is description, save it in labels */\n\t\t$value_desc = '';\n\t\tif ( isset( $option['desc'] ) ) {\n\t\t\t$value_desc = $option['desc'];\n\t\t}\n\n\t\t/* Switch through options */\n\t\tswitch ($option['type']) {\n\t\t\t// Simple text input\n\t\t\tcase 'text':\n\t\t\t\t$output .= '<input id=\"' . esc_attr( $option['id'] ) . '\" class=\"am-input\" name=\"' . esc_attr( $option_name . '[' . $option['id'] . ']' ) . '\" type=\"text\" value=\"' . esc_attr( $val ) . '\" />';\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Password\n\t\t\tcase 'password':\n\t\t\t\t$output .= '<input id=\"' . esc_attr( $option['id'] ) . '\" class=\"am-input\" name=\"' . esc_attr( $option_name . '[' . $option['id'] . ']' ) . '\" type=\"password\" value=\"' . esc_attr( $val ) . '\" />';\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Textarea\n\t\t\tcase 'textarea':\n\t\t\t\t$rows = '8';\n\t\t\t\tif ( isset( $option['settings']['rows'] ) ) {\n\t\t\t\t\t$custom_rows = $option['settings']['rows'];\n\t\t\t\t\tif ( is_numeric( $custom_rows ) ) {\n\t\t\t\t\t\t$rows = $custom_rows;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$val = stripslashes( $val );\n\t\t\t\t$output .= '<textarea id=\"' . esc_attr( $option['id'] ) . '\" class=\"am-input\" name=\"' . esc_attr( $option_name ) . '[' . $option['id'] . ']\" rows=\"' . $rows . '\">' . esc_textarea( $val ) . '</textarea>';\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Select \n\t\t\tcase 'select':\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\n\t\t\t// Radio\n\t\t\tcase 'radio':\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\n\t\t\t// Images Selector\n\t\t\tcase 'images':\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\n\t\t\t// Checkbox\n\t\t\tcase 'checkbox':\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\n\t\t\t// Multicheck\n\t\t\tcase 'multicheck':\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\n\t\t\t// Color Picker\n\t\t\tcase 'color':\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\n\t\t\t// Uploader\n\t\t\tcase 'upload':\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\n\t\t\t// Typography\n\t\t\tcase 'typography':\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\n\t\t\t// Background\n\t\t\tcase 'background':\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\n\t\t\t// Editor\n\t\t\tcase 'editor':\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\n\t\t\t// Info\n\t\t\tcase 'info':\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\t// Close Sections\n\t\tif ( $option['type'] != 'heading' && $option['type'] != 'info' ) {\n\t\t\t$output .= '</div>';\n\t\t}\n\n\t\techo $output;\n\n\t}\n\n\techo '<pre>';\n\tprint_r($settings);\n\techo \"</pre>\";\n}", "public static function output_fields( $options ) {\n\t\t\n\t\t$title_counter = 0;\n\t\t$option_wrap_start = '';\n\t\t$option_wrap_end = '';\n\t\t$output = '';\n\n\t\tforeach ( $options as $value ) {\n\t\t\tif ( ! isset( $value['type'] ) ) continue;\n\t \t\n\t\t\t$value = self::sanitize_option_arguments( $value );\n\n\t \t// folding class\n\t \t$fold = '';\n\t \tif ( array_key_exists( 'fold', $value ) ) {\n\t\t\t\tif ( self::get_option( $value['fold'] ) ) {\n\t\t\t\t\t$fold = 'kopa_fold_'.$value['fold'].' ';\n\t\t\t\t} else {\n\t\t\t\t\t$fold = 'kopa_fold_'.$value['fold'].' kopa_hide ';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// option classes\n\t \t$class = 'kopa_section';\n\t \t$class .= ' kopa_section_' . $value['type'];\n\t \tif ( $value['class'] ) {\n\t\t \t$class .= ' ' . $value['class'];\n\t \t}\n\n\t \t// start option wrap\n\t \t$option_wrap_start = '<div id=\"kopa_section_'.esc_attr( $value['id'] ).'\" class=\"'.esc_attr( $class.' '.$fold ).'\">';\n\t \t\n\t \tif ( $value['title'] ) {\n\t\t\t\t$option_wrap_start .= '<h4 class=\"kopa_heading\">'.esc_html( $value['title'] ).'</h4>';\n\t \t}\n\n\t\t\t$option_wrap_start .= '<div class=\"kopa_option\">';\n\n\t\t\tif ( $value['desc'] ) {\n\t\t\t\t$option_wrap_start .= '<div class=\"kopa_description\">'.wpautop( $value['desc'] ).'</div>';\n\t\t\t}\n\t\t\t$option_wrap_start .= '<div class=\"kopa_controls\">';\n\t\t\t\n\t\t\t// end option wrap\n\t\t\t$option_wrap_end = '</div></div></div>';\n\n\t\t\t// get option value\n\t\t\t$option_value = self::get_option( $value['id'], null, $value );\n\n\t \tswitch ( $value['type'] ) {\n\t \t\tcase 'title':\n\t \t\t\t$value = wp_parse_args( $value, array(\n\t \t\t\t\t'icon' => ''\n\t \t\t\t) );\n\n\t \t\t\t$title_counter++;\n\n\t \t\t\tif ( $title_counter >= 2 ) {\n\t \t\t\t\t$output .= '</div>';\n\t \t\t\t}\n\n\t \t\t\t$output .= '<div class=\"kopa_tab_pane\" id=\"kopa_'.esc_attr( $value['id'] ).'\">';\n \t\t\tbreak;\n\n\t \t\tcase 'groupstart':\n\t \t\t\t$output .= '<div id=\"kopa_section_'.esc_attr( $value['id'] ).'\" class=\"kopa_section_group\">';\n\t \t\n\t\t\t \tif ( $value['title'] ) {\n\t\t\t\t\t\t$output .= '<h4 class=\"kopa_heading_group\">'.esc_html( $value['title'] ).'</h4>';\n\t\t\t \t}\n\n\t\t\t \t$output .= '<div class=\"kopa_group_content\">';\n\t\t \tbreak;\n\n\t\t\t case 'groupend':\n\t\t\t \t$output .= '</div></div>';\n\t\t \tbreak;\t\n\n\t \t\tcase 'text':\n\t case 'email':\n\t case 'number':\n\t case 'url':\n\t case 'color':\n\t case 'password':\n\t \t\t\t$default_color = '';\n\t \t\t\t$field_class = '';\n\n\t \t\t\tif ( 'color' === $value['type'] ) {\n \t\t\t\t\t$field_class = ' kopa_color';\n\n \t\t\t\t\tif ( $value['default'] ) {\n\t \t\t\t\t\t$default_color = ' data-default-color=\"' .esc_attr( $value['default'] ) . '\" ';\n \t\t\t\t\t} // end check empty option value\n\t \t\t\t} // end check color type\n\n\t \t\t\tif ( $value['type'] != 'password' ) {\n\t \t\t\t\t$value['type'] = 'text';\n\t \t\t\t}\n\n\t \t\t\t$output .= $option_wrap_start;\n\t\t\t\t\t$output .= '<input \n\t\t\t\t\t\tclass=\"'.esc_attr( $field_class ).'\" \n\t\t\t\t\t\tstyle=\"'.esc_attr( $value['css'] ).'\" \n\t\t\t\t\t\ttype=\"'.esc_attr( $value['type'] ).'\" \n\t\t\t\t\t\tname=\"'.esc_attr( $value['id'] ).'\" \n\t\t\t\t\t\tid=\"'.esc_attr( $value['id'] ).'\" \n\t\t\t\t\t\tvalue=\"'.esc_attr( $option_value ).'\"'.\n\t\t\t\t\t\t$default_color.'>';\n\t\t\t\t\t$output .= $option_wrap_end;\n \t\t\tbreak;\n\n\t \t\tcase 'textarea':\n\t \t\t\t$output .= $option_wrap_start;\n\t \t\t\t$output .= '<textarea\t \t\t\t\t\n\t \t\t\t\tstyle=\"'.esc_attr( $value['css'] ).'\" \n\t \t\t\t\tname=\"'.esc_attr( $value['id'] ).'\" \n\t \t\t\t\tid=\"'.esc_attr( $value['id'] ).'\">'.\n\t \t\t\t\tesc_textarea( $option_value ).\n\t \t\t\t\t'</textarea>';\n\t \t\t\t$output .= $option_wrap_end;\n \t\t\tbreak;\n\n\t \t\tcase 'select':\n\t \t\tcase 'multiselect':\n\t \t\t\t$output .= $option_wrap_start;\n\n\t \t\t\t$output .= '<select \n\t \t\t\t\tstyle=\"'.esc_attr( $value['css'] ).'\" \n\t \t\t\t\tname=\"'.esc_attr( $value['id'] ).( 'multiselect' === $value['type'] ? '[]' : '' ).'\" \n\t \t\t\t\tid=\"'.esc_attr( $value['id'] ).'\"'.\n\t \t\t\t\t( 'multiselect' === $value['type'] ? ' multiple=\"multiple\"' : '' ).\n\t \t\t\t\t'>';\n\n\t\t\t\t\tforeach ( $value['options'] as $key => $val ) {\n\t\t\t\t\t\t$output .= '<option value=\"'.esc_attr( $key ).'\" ';\n\t\t\t\t\t\tif ( is_array( $option_value ) ) {\n\t\t\t\t\t\t\t$output .= selected( in_array( $key, $option_value ), true, false );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$output .= selected( $key, $option_value, false );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$output .= '>'.esc_html( $val ).'</option>';\n\t\t\t\t\t}\n\n\t\t\t\t\t$output .= '</select>';\n\n\t\t\t\t\t$output .= $option_wrap_end;\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'checkbox':\n\t\t\t\t\t$value = wp_parse_args( $value, array(\n\t\t\t\t\t\t'label' => '',\n\t\t\t\t\t) );\n\n\t\t\t\t\tif ( ! isset( $value['checkboxgroup'] ) || \n\t\t\t\t\t\t ( isset( $value['checkboxgroup'] ) && 'start' == $value['checkboxgroup'] ) ) {\n\t\t\t\t\t\t$output .= $option_wrap_start;\n\t\t\t\t\t}\n\n\t\t\t\t\t$fold = '';\n\t\t\t\t\tif ( array_key_exists('folds', $value) ) {\n\t\t\t\t\t\t$fold = 'kopa_fold ';\n\t\t\t\t\t}\n\n\t\t\t\t\t$output .= '<label>';\n\t\t\t\t\t$output .= '<input \n\t\t\t\t\t\tclass=\"'.$fold.'\" \n\t \t\t\t\tstyle=\"'.esc_attr( $value['css'] ).'\" \n\t\t\t\t\t\ttype=\"'.esc_attr( $value['type'] ).'\" \n\t\t\t\t\t\tname=\"'.esc_attr( $value['id'] ) .'\" \n\t\t\t\t\t\tid=\"'.esc_attr( $value['id'] ).'\" value=\"1\"'.\n\t\t\t\t\t\t( checked( $option_value, 1, false ) ).\n\t\t\t\t\t\t'>';\n\t\t\t\t\t$output .= ' '.esc_html( $value['label'] ).'</label>';\n\t\t\t\t\t$output .= '<br>';\n\n\t\t\t\t\tif ( ! isset( $value['checkboxgroup'] ) || \n\t\t\t\t\t ( isset( $value['checkboxgroup'] ) && 'end' == $value['checkboxgroup'] ) ) {\n\t\t\t\t\t\t$output .= $option_wrap_end;\n\t\t\t\t\t} \n\t\t\t\tbreak;\n\n\t\t\t\tcase 'multicheck':\n\t\t\t\t\t$output .= $option_wrap_start;\n\n\t\t\t\t\tforeach ( $value['options'] as $key => $val ) {\n\t\t\t\t\t\t$name = $value['id'].'['.$key.']';\n\t\t\t\t\t\t$checked = isset( $option_value[ $key ] ) ? checked( $option_value[ $key ], 1, false ) : '';\n\n\t\t\t\t\t\t$output .= '<label>';\n\t\t\t\t\t\t$output .= '<input \n\t\t\t\t\t\t\tstyle=\"'.esc_attr( $value['css'] ).'\" \n\t\t\t\t\t\t\ttype=\"checkbox\" \n\t\t\t\t\t\t\tname=\"'.esc_attr( $name ).'\" \n\t\t\t\t\t\t\tid=\"'.esc_attr( $value['id'] ).'\" \n\t\t\t\t\t\t\tvalue=\"1\" '.$checked.\n\t\t\t\t\t\t\t'>';\n\t\t\t\t\t\t$output .= ' '.esc_html( $val ).'</label>';\n\t\t\t\t\t\t$output .= '<br>';\n\t\t\t\t\t}\n\n\t\t\t\t\t$output .= $option_wrap_end;\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'radio':\n\t\t\t\t\t$output .= $option_wrap_start;\n\n\t\t\t\t\tforeach ( $value['options'] as $key => $val ) {\n\t\t\t\t\t\t$output .= '<label>';\n\t\t\t\t\t\t$output .= '<input \n\t \t\t\t\t\tstyle=\"'.esc_attr( $value['css'] ).'\" \n\t\t\t\t\t\t\ttype=\"'.esc_attr( $value['type'] ).'\" \n\t\t\t\t\t\t\tname=\"'.esc_attr( $value['id'] ).'\" \n\t\t\t\t\t\t\tid=\"'.esc_attr( $value['id'].'_'.$key ).'\" \n\t\t\t\t\t\t\tvalue=\"'.esc_attr( $key ).'\" '.\n\t\t\t\t\t\t\tchecked( $key, $option_value, false ).'>';\n\t\t\t\t\t\t$output .= ' '.esc_html( $val ).'</label>';\n\t\t\t\t\t\t$output .= '<br>';\n\t\t\t\t\t}\n\n\t\t\t\t\t$output .= $option_wrap_end;\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'upload':\n\t\t\t\t\t// make sure mimes key is set\n\t\t\t\t\t$value = wp_parse_args( $value, array(\n\t\t\t\t\t\t'mimes' => '',\n\t\t\t\t\t) );\n\n\t\t\t\t\t$output .= $option_wrap_start;\n\t\t\t\t\t$output .= '<input type=\"text\" \n\t\t\t\t\t\tclass=\"kopa_upload\" \n\t\t\t\t\t\tstyle=\"'.esc_attr( $value['css'] ).'\" \n\t\t\t\t\t\tname=\"'.esc_attr( $value['id'] ).'\" \n\t\t\t\t\t\tid=\"'.esc_attr( $value['id'] ).'\" \n\t\t\t\t\t\tplaceholder=\"'.esc_attr__( 'No file chosen', kopa_get_domain() ).'\" \n\t\t\t\t\t\tvalue=\"'.esc_attr( $option_value ).'\" \n\t\t\t\t\t\tdata-type=\"'.esc_attr( $value['mimes'] ).'\">';\n\n\t\t\t\t\t// upload button\n\t\t\t\t\tif ( function_exists( 'wp_enqueue_media' ) ) {\n\t\t\t\t\t\tif ( $option_value == '' ) {\n\t\t\t\t\t\t\t$output .= '<input id=\"kopa_upload_'.esc_attr( $value['id'] ).'\" class=\"kopa_upload_button kopa_button button\" type=\"button\" value=\"'.esc_attr__( 'Upload', kopa_get_domain() ).'\">';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$output .= '<input id=\"kopa_remove_'.esc_attr( $value['id'] ).'\" class=\"kopa_remove_file kopa_button button\" type=\"button\" value=\"'.esc_attr__( 'Remove', kopa_get_domain() ).'\">';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$output .= '<p class=\"kopa_upload_notice\">' .esc_html__( 'Upgrade your version of WordPress for full media support.', kopa_get_domain() ) . '</p>';\n\t\t\t\t\t}\n\n\t\t\t\t\t// preview image\n\t\t\t\t\t$preview_class = '';\n\t\t\t\t\tif ( empty( $option_value ) ) {\n\t\t\t\t\t\t$preview_class = 'kopa_hide';\n\t\t\t\t\t}\n\n\t\t\t\t\t$output .= '<div class=\"kopa_screenshot '.esc_attr( $preview_class ).'\" id=\"'.esc_attr( $value['id'] ).'_image\">';\n\n\t\t\t\t\tif ( $option_value ) {\n\t\t\t\t\t\t$remove = '<a class=\"kopa_remove_image\">'.__( 'Remove', kopa_get_domain() ).'</a>';\n\t\t\t\t\t\t$image = preg_match( '/(^.*\\.jpg|jpeg|png|gif|ico*)/i', $option_value );\n\t\t\t\t\t\tif ( $image ) {\n\t\t\t\t\t\t\t$output .= '<img src=\"' . esc_attr( $option_value ) . '\" alt=\"\" />' . $remove;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$parts = explode( \"/\", $option_value );\n\t\t\t\t\t\t\tfor( $i = 0; $i < sizeof( $parts ); ++$i ) {\n\t\t\t\t\t\t\t\t$title = $parts[$i];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// No output preview if it's not an image.\n\t\t\t\t\t\t\t$output .= '';\n\n\t\t\t\t\t\t\t// Standard generic output if it's not an image.\n\t\t\t\t\t\t\t$title = __( 'View File', kopa_get_domain() );\n\t\t\t\t\t\t\t$output .= '<div class=\"kopa_no_image\"><span class=\"kopa_file_link\"><a href=\"' . esc_attr( $option_value ) . '\" target=\"_blank\" rel=\"external\">'.$title.'</a></span></div>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$output .= '</div>';\n\n\t\t\t\t\t$output .= $option_wrap_end;\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'select_font':\n\t\t\t\t\t$option_value = wp_parse_args( $option_value, array(\n\t\t\t\t\t\t'family' => '',\n\t\t\t\t\t\t'style' => '',\n\t\t\t\t\t\t'size' => '',\n\t\t\t\t\t\t'color' => '',\n\t\t\t\t\t) );\n\n\t\t\t\t\t$preview = isset( $value['preview'] ) ? $value['preview'] : __( 'preview text', kopa_get_domain() );\n\n\t\t\t\t\t$output .= $option_wrap_start;\n\n\t\t\t\t\t// select section\n\t\t\t\t\t// font family\n\t\t\t\t\t$output .= '<select \n\t\t\t\t\t\tclass=\"kopa_select_font\" \n\t\t\t\t\t\tid=\"'.esc_attr( $value['id'] ).'\" \n\t\t\t\t\t\tname=\"'.esc_attr( $value['id'] ).'[family]\" \n\t\t\t\t\t\tdata-main-id=\"'.esc_attr( $value['id'] ).'\">';\n\t\t\t\t\tforeach ( $value['options'] as $key => $val ) {\n\t\t\t\t\t\t// check font groups\n\t\t\t\t\t\tif ( is_array( $val ) ) {\n\t\t\t\t\t\t\tif ( isset( $value['groups'][ $key ] ) ) {\n\t\t\t\t\t\t\t\t$output .= '<optgroup label=\"'.esc_attr( $value['groups'][ $key ] ).'\">';\n\t\t\t\t\t\t\t} // end check group exists\n\t\t\t\t\t\t\tforeach ( $val as $font_val => $font_label ) {\n\t\t\t\t\t\t\t\t$output .= '<option value=\"'.esc_attr( $font_val ).'\" '.selected( $font_val, $option_value['family'], false ).'>'.$font_label.'</option>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( isset( $value['groups'][ $key ] ) ) {\n\t\t\t\t\t\t\t\t$output .= '</optgroup>';\n\t\t\t\t\t\t\t} // end check group exists\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$output .= '<option value=\"'.esc_attr( $key ).'\" '.selected( $key, $option_value['family'], false ).'>'.$val.'</option>';\n\t\t\t\t\t\t} // end check font groups\n\t\t\t\t\t}\n\t\t\t\t\t$output .= '</select>';\n\n\t\t\t\t\t// font weight / style\n\t\t\t\t\t$output .= '<select class=\"kopa_select_font_style\" id=\"'.esc_attr( $value['id'] ).'_style\" name=\"'.esc_attr( $value['id'] ).'[style]\" data-main-id=\"'.esc_attr( $value['id'] ).'\">';\n\t\t\t\t\t$output .= '<option value=\"'.esc_attr( $option_value['style'] ).'\" selected=\"selected\">'.$option_value['style'].'</option>';\n\t\t\t\t\t$output .= '</select>';\n\n\t\t\t\t\t// font size\n\t\t\t\t\t$output .= '<input type=\"text\" class=\"kopa_select_font_size\" name=\"'.esc_attr( $value['id'] ).'[size]\" data-main-id=\"'.esc_attr( $value['id'] ).'\" value=\"'.esc_attr( $option_value['size'] ).'\" placeholder=\"'.esc_attr__( 'Font size', kopa_get_domain() ).'\">';\n\n\t\t\t\t\t// font color\n\t\t\t\t\t$output .= '<input class=\"kopa_select_font_color\" name=\"'.esc_attr( $value['id'] ).'[color]\" value=\"'.esc_attr( $option_value['color'] ).'\" data-main-id=\"'.esc_attr( $value['id'] ).'\" data-default-color=\"'.esc_attr( $option_value['color'] ).'\">';\n\n\t\t\t\t\t// preview section\n\t\t\t\t\t$output .= '<p \n\t\t\t\t\t\tclass=\"kopa_google_font_preview\" \n\t\t\t\t\t\tid=\"'.esc_attr( $value['id'] ).'_preview\">'.esc_html( $preview ).'</p>';\n\t\t\t\t\t$output .= $option_wrap_end;\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'custom_font_manager':\n\t\t\t\t\t$orders = array();\n\t\t\t\t\t$custom_font_attributes = array(\n\t\t\t\t\t\t'name' => array(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'placeholder' => __( 'Enter font name', kopa_get_domain() ),\n\t\t\t\t\t\t\t'required' => false,\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'woff' => array(\n\t\t\t\t\t\t\t'type' => 'upload',\n\t\t\t\t\t\t\t'placeholder' => __( 'Upload .woff font file', kopa_get_domain() ),\n\t\t\t\t\t\t\t'mimes' => 'font/woff',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'ttf' => array(\n\t\t\t\t\t\t\t'type' => 'upload',\n\t\t\t\t\t\t\t'placeholder' => __( 'Upload .ttf font file', kopa_get_domain() ),\n\t\t\t\t\t\t\t'mimes' => 'font/truetype',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'eot' => array(\n\t\t\t\t\t\t\t'type' => 'upload',\n\t\t\t\t\t\t\t'placeholder' => __( 'Upload .eot font file', kopa_get_domain() ),\n\t\t\t\t\t\t\t'mimes' => 'font/eot',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'svg' => array(\n\t\t\t\t\t\t\t'type' => 'upload',\n\t\t\t\t\t\t\t'placeholder' => __( 'Upload .svg font file', kopa_get_domain() ),\n\t\t\t\t\t\t\t'mimes' => 'font/svg',\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\n\t\t\t\t\t$output .= $option_wrap_start;\n\n\t\t\t\t\t$output .= '<div class=\"kopa_custom_font_list\">';\n\n\t\t\t\t\tif ( $option_value && is_array( $option_value ) ) {\n\t\t\t\t\t\tforeach ( $option_value as $font_index => $font_item ) {\n\t\t\t\t\t\t\t$orders[] = $font_index;\n\n\t\t\t\t\t\t\t$output .= '<div class=\"kopa_custom_font_item\">';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// top\n\t\t\t\t\t\t\t$output .= '<div class=\"kopa_custom_font_top\">';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$output .= '<div class=\"kopa_custom_font_title_action\">';\n\t\t\t\t\t\t\t$output .= '</div>'; // kopa_custom_font_title_action\n\n\t\t\t\t\t\t\t$output .= '<div class=\"kopa_custom_font_title\">';\n\t\t\t\t\t\t\t$output .= '<strong>'.$font_item['name'].'</strong>';\n\t\t\t\t\t\t\t$output .= '</div>'; // kopa_custom_font_title\n\n\t\t\t\t\t\t\t$output .= '</div>'; // kopa_custom_font_top\n\n\t\t\t\t\t\t\t// inside\n\t\t\t\t\t\t\t$output .= '<div class=\"kopa_custom_font_inside kopa_hide\">';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach ( $custom_font_attributes as $attribute => $attribute_data ) {\n\n\t\t\t\t\t\t\t\t$attribute_classes = 'kopa_custom_font_item_' . $attribute;\n\t\t\t\t\t\t\t\tif ( 'upload' === $attribute_data['type'] ) {\n\t\t\t\t\t\t\t\t\t$attribute_classes .= ' kopa_upload';\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$attribute_required = false;\n\t\t\t\t\t\t\t\tif ( isset( $attribute_data['required'] ) && $attribute_data['required'] ) {\n\t\t\t\t\t\t\t\t\t$attribute_required = true;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$attribute_mimes = '';\n\t\t\t\t\t\t\t\tif ( isset( $attribute_data['mimes'] ) && $attribute_data['mimes'] ) {\n\t\t\t\t\t\t\t\t\t$attribute_mimes = $attribute_data['mimes'];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$output .= '<div class=\"kopa_section\"><div class=\"kopa_controls\">';\n\n\t\t\t\t\t\t\t\t$output .= '<input class=\"'.esc_attr( $attribute_classes ).'\" \n\t\t\t\t\t\t\t\t\t\ttype=\"text\" \n\t\t\t\t\t\t\t\t\t\tname=\"'.esc_attr( $value['id'].'['.$font_index.']['.$attribute.']' ).'\" \n\t\t\t\t\t\t\t\t\t\tplaceholder=\"'.esc_attr( $attribute_data['placeholder'] ).'\" '.\n\t\t\t\t\t\t\t\t\t\t($attribute_required ? 'required ' : '') .\n\t\t\t\t\t\t\t\t\t\t'value=\"'.esc_attr( $font_item[ $attribute ] ).'\" \n\t\t\t\t\t\t\t\t\t\tdata-type=\"'.esc_attr( $attribute_mimes ).'\">';\n\n\t\t\t\t\t\t\t\t// upload button\n\t\t\t\t\t\t\t\tif ( 'upload' === $attribute_data['type'] && function_exists( 'wp_enqueue_media' ) ) {\n\t\t\t\t\t\t\t\t\tif ( $font_item[ $attribute ] == '' ) {\n\t\t\t\t\t\t\t\t\t\t$output .= '<input class=\"kopa_upload_button kopa_button button\" type=\"button\" value=\"'.esc_attr__( 'Upload', kopa_get_domain() ).'\">';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$output .= '<input class=\"kopa_remove_file kopa_button button\" type=\"button\" value=\"'.esc_attr__( 'Remove', kopa_get_domain() ).'\">';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$output .= '</div></div>'; // kopa_section\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$output .= '<div class=\"kopa_custom_font_control_actions\">';\n\t\t\t\t\t\t\t$output .= '<a class=\"kopa_custom_font_remove\" href=\"#\">'.esc_html__( 'Delete', kopa_get_domain() ).'</a>';\n\t\t\t\t\t\t\t$output .= ' | ';\n\t\t\t\t\t\t\t$output .= '<a class=\"kopa_custom_font_close\" href=\"#\">'.esc_html__( 'Close', kopa_get_domain() ).'</a>';\n\t\t\t\t\t\t\t$output .= '</div>'; // kopa_custom_font_control_actions\n\t\t\t\t\t\t\t$output .= '</div>'; // kopa_custom_font_inside\n\n\t\t\t\t\t\t\t$output .= '</div>'; // kopa_custom_font_item\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$output .= '</div>'; // kopa_custom_font_list\n\n\t\t\t\t\t// get list of font orders\n\t\t\t\t\t$data_orders = '';\n\t\t\t\t\tif ( $orders ) {\n\t\t\t\t\t\t$data_orders = implode(',', $orders);\n\t\t\t\t\t}\n\n\t\t\t\t\t$output .= '<input class=\"button kopa_add_font_button\" type=\"button\" value=\"'.esc_attr__( 'Add New Font', kopa_get_domain() ).'\" data-name=\"'.esc_attr( $value['id'] ).'\" data-orders=\"'.esc_attr( $data_orders ).'\">';\n\t\t\t\t\t$output .= $option_wrap_end;\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'import':\n\t\t\t\t\t$output .= $option_wrap_start;\n\t\t\t\t\t$output .= '<input type=\"file\" name=\"kopa_import_file\" size=\"25\">';\n\t\t\t\t\t$output .= '<input type=\"submit\" class=\"button-secondary kopa_import\" name=\"kopa_backup_import\" value=\"'.esc_attr__( 'Import', kopa_get_domain() ).'\">';\n\t\t\t\t\t$output .= $option_wrap_end;\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'export':\n\t\t\t\t\t$output .= $option_wrap_start;\n\n\t\t\t\t\tforeach ( $value['options'] as $key => $val ) {\n\t\t\t\t\t\t$output .= '<label><input value=\"'.esc_attr( $key ).'\" type=\"radio\" name=\"kopa_export_type\" '.checked( $value['default'], $key, false ).'> '.esc_html( $val ).'</label><br>';\n\t\t\t\t\t}\n\n\t\t\t\t\t$output .= '<input type=\"submit\" class=\"button-secondary kopa_export\" name=\"kopa_backup_export\" value=\"'.esc_attr__( 'Download Export File', kopa_get_domain() ).'\">';\n\n\t\t\t\t\t$output .= $option_wrap_end;\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'sidebar_manager':\n\t\t\t\t\tglobal $wp_registered_sidebars;\n\n\t\t\t\t\t// hold merge data of registered sidebars may be by the theme\n\t\t\t\t\t// and registered sidebars by the sidebar manager\n\t\t\t\t\tif ( $option_value && is_array( $option_value ) ) {\n\t\t\t\t\t\t$temp_sidebars = wp_parse_args( $wp_registered_sidebars, $option_value );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$temp_sidebars = $wp_registered_sidebars;\n\t\t\t\t\t}\n\n\t\t\t\t\t$sidebar_atts = array(\n\t\t\t \t\t'name' => __( 'Name', kopa_get_domain() ),\n\t\t\t \t\t'description' => __( 'Description', kopa_get_domain() ),\n\t\t\t \t\t'before_widget' => __( 'Before Widget', kopa_get_domain() ),\n\t\t\t \t\t'after_widget' => __( 'After Widget', kopa_get_domain() ),\n\t\t\t \t\t'before_title' => __( 'Before Title', kopa_get_domain() ),\n\t\t\t \t\t'after_title' => __( 'After Title', kopa_get_domain() ),\n\t\t\t \t);\n\n\t\t\t\t\t$data_register_sidebars = 0;\n\t\t\t\t\t$data_register_sidebar_ids = '';\n\n\t\t\t\t\t// if not empty, get the number of register sidebars\n\t\t\t\t\t$data_register_sidebars = count( $temp_sidebars );\n\n\t\t\t\t\t// get register sidebar ids\n\t\t\t\t\tforeach ( $temp_sidebars as $sidebar_id => $sidebar_args ) {\n\t\t\t\t\t\t$data_register_sidebar_ids .= $sidebar_id . ',';\n\t\t\t\t\t}\n\n\t\t\t\t\t$output .= '<div id=\"kopa_section_'.esc_attr( $value['id'] ).'\" class=\"kopa_section kopa_section_'.esc_attr( $value['type'] ).'\">';\n\t\t\t\t\t\n\t\t\t\t\t// add new sidebar section\n\t\t\t\t\t$output .= '<div class=\"kopa_section_add_new_sidebar\">';\n\t\t\t\t\t$output .= '<h4 class=\"kopa_heading\">'.esc_html( $value['title'] ).'</h4>';\n\t\t\t\t\t$output .= '<div class=\"kopa_option\">';\n\t\t\t\t\t$output .= '<div class=\"kopa_description\">'.esc_html( $value['description'] ).'</div>';\n\t\t\t\t\t\t$output .= '<div class=\"kopa_controls\">';\n\t\t\t\t\t\t\t$output .= '<input type=\"text\" class=\"kopa_sidebar_add_field\" name=\"sidebar\" id=\"kopa_'.esc_attr( $value['id'] ).'_add_field\">';\n\t\t\t\t\t\t\t$output .= '<a class=\"kopa_sidebar_add_button kopa_button_inactive\" href=\"#\" data-registered-sidebars=\"'.esc_attr( $data_register_sidebars ).'\" data-register-sidebar-ids=\"'.esc_attr( $data_register_sidebar_ids ).'\" data-name=\"'.esc_attr( $value['id'] ).'\" data-container-id=\"kopa_'.esc_attr( $value['id'] ).'\">'.esc_html__( 'Add New', kopa_get_domain() ).'</a>';\n\t\t\t\t\t\t$output .= '</div>'; // kopa_controls\n\t\t\t\t\t$output .= '</div>'; // kopa_option\n\t\t\t\t\t$output .= '</div>'; // kopa_section_add_new_sidebar\n\n\t\t\t\t\t// sidebar manager\n\t\t\t\t\t$output .= '<div class=\"kopa_section_sidebars\">';\n\t\t\t\t\t$output .= '<ul id=\"kopa_'.esc_attr( $value['id'] ).'\" class=\"kopa_sidebar_sortable kopa_ui_sortable\">';\n\n\t\t\t\t\tif ( $option_value && is_array( $option_value ) ) {\n\n\t\t\t\t\t\tforeach ( $option_value as $sidebar_id => $sidebar_args ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$sidebar_value = array();\n\n\t\t\t\t\t\t\t// get current sidebar arguments\n\t\t\t\t\t\t\tforeach ( $sidebar_atts as $key => $label ) {\n\t\t\t\t\t\t\t\tif ( isset( $option_value[ $sidebar_id ][ $key ] ) ) {\n\t\t\t\t\t\t\t\t\t$sidebar_value[ $key ] = $option_value[ $sidebar_id ][ $key ];\n\t\t\t\t\t\t\t\t} elseif ( isset( $sidebar_args[ $key ] ) ) {\n\t\t\t\t\t\t\t\t\t$sidebar_value[ $key ] = $sidebar_args[ $key ];\n\t\t\t\t\t\t\t\t// } elseif( isset( $value['default_atts'][$key] ) ) {\n\t\t\t\t\t\t\t\t// \t$sidebar_value[ $key ] = $value['default_atts'][ $key ];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$sidebar_value[ $key ] = '';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$output .= '<li class=\"kopa_sidebar\">';\n\t\t\t\t\t\t\t\t$output .= '<div class=\"kopa_sidebar_header\">';\n\t\t\t\t\t\t\t\t\t$output .= '<div class=\"kopa_sidebar_title_action\"></div>';\n\t\t\t\t\t\t\t\t\t$output .= '<strong>'.esc_html( $sidebar_value['name'] ).'</strong>';\n\t\t\t\t\t\t\t\t$output .= '</div>'; // kopa_sidebar_header\n\n\t\t\t\t\t\t\t\t$output .= '<div class=\"kopa_sidebar_body\">';\n\n\t\t\t\t\t\t\t\t// checkbox folding for advanced settings\n\t\t\t\t\t\t\t\t$output .= '<label><input class=\"kopa_sidebar_advanced_settings\" type=\"checkbox\"> '.esc_html__( 'Advanced Settings', kopa_get_domain() ).'</label>';\n\n\t\t\t\t\t\t\t// print sidebar attribute fields\n\t\t\t\t\t\t\tforeach ( $sidebar_atts as $key => $label ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$id = 'kopa_'.$sidebar_id.'_'.$key;\n\t\t\t\t\t\t\t\t$name = $value['id'] . '[' . $sidebar_id . ']' . '[' . $key . ']';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$output .= '<div class=\"kopa_sidebar_'.esc_attr( $key ).'\">';\n\t\t\t\t\t\t\t\t// $output .= '<label for=\"'.esc_attr( $id ).'\">'.$label.'</label>';\n\t\t\t\t\t\t\t\t$output .= '<input type=\"text\" class=\"kopa_sidebar kopa_sidebar_attr\" name=\"'.esc_attr( $name ).'\" id=\"'.esc_attr( $id ).'\" value=\"'.esc_attr( $sidebar_value[ $key ] ).'\" placeholder=\"'.esc_attr( $label ).'\">';\n\t\t\t\t\t\t\t\t$output .= '</div>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} // end foreach sidebar_atts\n\n\t\t\t\t\t\t\t\t$output .= '<div class=\"kopa_sidebar_control_actions\">';\n\t\t\t\t\t\t\t\t\t$output .= '<a class=\"kopa_sidebar_delete_button\" href=\"#\" data-sidebar-id=\"'.esc_attr( $sidebar_id ).'\">'.esc_html__( 'Delete', kopa_get_domain() ).'</a>';\n\t\t\t\t\t\t\t\t\t$output .= ' | ';\n\t\t\t\t\t\t\t\t\t$output .= '<a class=\"kopa_sidebar_close_button\" href=\"#\">'.esc_html__( 'Close', kopa_get_domain() ).'</a>';\n\t\t\t\t\t\t\t\t\t$output .= '<span class=\"spinner\"></span>';\n\t\t\t\t\t\t\t\t$output .= '</div>'; // kopa_sidebar_control_actions\n\n\t\t\t\t\t\t\t\t$output .= '</div>'; // kopa_sidebar_body\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$output .= '</li>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t} // end foreach sidebar options\n\n\t\t\t\t\t} // end check empty sidebar settings\n\t\t\t\t\t\n\t\t\t\t\t$output .= '</ul>';\n\t\t\t\t\t$output .= '</div>';\n\n\t\t\t\t\t$output .= '</div>';\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'layout_manager':\n\t\t\t\t\t$value = wp_parse_args( $value, array(\n\t\t\t\t\t\t'layouts' => array(),\n\t\t\t\t\t) );\n\n\t\t\t\t\tglobal $wp_registered_sidebars;\n\n\t\t\t\t\t$output .= '<div id=\"kopa_section_group_'.esc_attr( $value['id'] ).'\" class=\"kopa_section_group kopa_section_group_layout\">';\n\t\t\t\t\t$output .= '<h2 class=\"kopa_heading_group\">'.esc_html( $value['title'] ).'</h2>';\n\t\t\t\t\t$output .= '<div class=\"kopa_group_content\">';\n\n\t\t\t\t\t// layout images\n\t\t\t\t\tforeach ( $value['layouts'] as $layout_id => $layout_args ) {\n\t\t\t\t\t\t$output .= '<div id=\"'.esc_attr( $value['id'] . '_' . $layout_id . '_' . 'image' ).'\" class=\"kopa_section_layout_image\">';\n\t\t\t\t\t\t$output .= '<img src=\"'.esc_attr( $layout_args['preview'] ).'\" alt=\"'.esc_attr( $layout_args['title'] ).'\">';\n\t\t\t\t\t\t$output .= '</div>';\n\t\t\t\t\t}\n\n\t\t\t\t\t// select layout section\n\t\t\t\t\t$output .= '<div id=\"kopa_section_select_layout_'.esc_attr( $value['id'] ).'\" class=\"kopa_section kopa_section_select_layout\">';\n\t\t\t\t\t$output .= '<h4 class=\"kopa_heading\">'.esc_html__( 'Select layout', kopa_get_domain() ).'</h4>';\n\t\t\t\t\t$output .= '<div class=\"kopa_option\">';\n\t\t\t\t\t$output .= '<div class=\"kopa_controls\">';\n\t\t\t\t\t$output .= '<select name=\"'.esc_attr( $value['id'] ).'[layout_id]\" id=\"select-layout-'.esc_attr( $value['id'] ).'\" data-layout-section-id=\"'.esc_attr( $value['id'] ).'\">';\n\t\t\t\t\t\n\t\t\t\t\t\tforeach ( $value['layouts'] as $layout_id => $layout_args ) {\n\t\t\t\t\t\t\t$selected_layout_id = null;\n\t\t\t\t\t\t\tif ( isset( $option_value['layout_id'] ) ) {\n\t\t\t\t\t\t\t\t$selected_layout_id = $option_value['layout_id'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$output .= '<option value=\"'.esc_attr( $layout_id ).'\" '.selected( $selected_layout_id, $layout_id, false ).'>'.esc_html( $layout_args['title'] ).'</option>';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t$output .= '</select>';\n\t\t\t\t\t$output .= '</div>'; // kopa_controls\n\t\t\t\t\t$output .= '</div>'; // kopa_option\n\t\t\t\t\t$output .= '</div>'; // kopa_section_select_layout\n\n\t\t\t\t\t// widget areas\n\t\t\t\t\tforeach ( $value['layouts'] as $layout_id => $layout_args ) {\n\n\t\t\t\t\t\t$output .= '<div id=\"'.esc_attr( $value['id'] . '_' . $layout_id ).'\" class=\"kopa_section_select_area_container\">';\n\n\t\t\t\t\t\tforeach ( $layout_args['positions'] as $position_index => $position ) {\n\n\t\t\t\t\t\t\t$output .= '<div id=\"kopa_section_select_area_'.esc_attr( $position_index . '_' . $layout_id ).'\" class=\"kopa_section kopa_section_select_area\">';\n\t\t\t\t\t\t\t$output .= '<h4 class=\"kopa_heading\">'.esc_html( $value['positions'][ $position ] ).'</h4>';\n\t\t\t\t\t\t\t$output .= '<div class=\"kopa_option\">';\n\t\t\t\t\t\t\t$output .= '<div class=\"kopa_controls\">';\n\t\t\t\t\t\t\t$output .= '<select name=\"'.esc_attr( $value['id'] ).'[sidebars]['.esc_attr( $layout_id ).']['.$position.']\">';\n\t\t\t\t\t\t\t$output .= '<option value=\"\">'.esc_html__( '&mdash;Select sidebar&mdash;', kopa_get_domain() ).'</option>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// print all registered sidebars\n\t\t\t\t\t\t\tforeach ( $wp_registered_sidebars as $sidebar_id => $sidebar_args ) {\n\n\t\t\t\t\t\t\t\t$selected_value = null;\n\t\t\t\t\t\t\t\tif ( isset( $option_value['sidebars'][ $layout_id ][ $position ] ) ) {\n\t\t\t\t\t\t\t\t\t$selected_value = $option_value['sidebars'][ $layout_id ][ $position ];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$output .= '<option value=\"'.esc_attr( $sidebar_id ).'\" '.selected( $selected_value, $sidebar_id, false ).'>'.esc_html( $sidebar_args['name'] ).'</option>';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$output .= '</select>';\n\t\t\t\t\t\t\t$output .= '</div>'; // kopa_controls\n\t\t\t\t\t\t\t$output .= '</div>'; // kopa_option\n\t\t\t\t\t\t\t$output .= '</div>'; // kopa_section_select_area\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$output .= '</div>'; // kopa_section_select_area_container\n\n\t\t\t\t\t}\n\n\t\t\t\t\t$output .= '</div>'; // kopa_group_content\n\t\t\t\t\t$output .= '</div>'; // kopa_section_group_layout\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'restore_default':\n\t\t\t\t\t$output .= $option_wrap_start;\n\n\t\t\t\t\tforeach ( $value['options'] as $key => $val ) {\n\t\t\t\t\t\t$output .= '<label><input value=\"'.esc_attr( $key ).'\" type=\"radio\" name=\"kopa_'.esc_attr( $value['type'] ).'\" '.checked( $value['default'], $key, false ).'> '.esc_html( $val ).'</label><br>';\n\t\t\t\t\t}\n\n\t\t\t\t\t$output .= '<input type=\"submit\" class=\"button-secondary kopa_reset\" name=\"kopa_reset\" value=\"'.esc_attr__( 'Restore Defaults', kopa_get_domain() ).'\">';\n\n\t\t\t\t\t$output .= $option_wrap_end;\n\t\t\t\tbreak;\n\n\t\t\t\t// Default: run an action\n\t default:\n\t \t$output .= apply_filters( 'kopa_admin_field_' . $value['type'], '', $option_wrap_start, $option_wrap_end, $value );\n\t break;\n\n\t \t} // end switch option type\n\n\t\t} // end foreach\n\n\t\tif ( $title_counter ) {\n\t\t\t$output .= '</div>';\n\t\t} // end check if have title options\n\n\t\techo '<div class=\"kopa_tab_content\">' . $output . '</div>';\n\n\t}", "abstract public function getOptions();", "function my_shortcode() {\n\n$options = get_option('foodrecipecptplugin_settings');\nreturn \"<p>Recipe Name:\" . $options['foodrecipecptplugin_text_field_0'] . \"</p>\".\"<p>Category: \" . $options['foodrecipecptplugin_text_field_1'].\"</p>\".\"<p>Ingredients: \". $options['foodrecipecptplugin_text_field_2'].\"</p>\".\"<p>Recipe Instructions: \" . $options['foodrecipecptplugin_text_field_3'] . \"</p>\";\n}", "public function sanitize_options( $options ) {\n\n $options_to_sanitize = $options;\n\n if( !is_array($options)) {\n $options_to_sanitize = array($options);\n }\n\n foreach( $options_to_sanitize as $option_slug => $option_value ) {\n $sanitize_callback = $this->get_sanitize_callback( $option_slug );\n\n // If callback is set, call it\n if ( $sanitize_callback ) {\n $options_to_sanitize[ $option_slug ] = call_user_func( $sanitize_callback, $option_value );\n continue;\n }\n }\n\n if( !is_array($options)) {\n return $options_to_sanitize[0];\n }\n\n return $options_to_sanitize;\n }", "function wp_translate_options_page() {\r\n\r\n // variables for the field and option names \r\n $opt_name = 'mt_translate_main';\r\n\t$opt_name_4 = 'mt_translate_title';\r\n $opt_name_5 = 'mt_translate_plugin_support';\r\n $hidden_field_name = 'mt_translate_submit_hidden';\r\n $data_field_name = 'mt_translate_main';\r\n\t$data_field_name_4 = 'mt_translate_title';\r\n $data_field_name_5 = 'mt_translate_plugin_support';\r\n\r\n // Read in existing option value from database\r\n $opt_val = get_option( $opt_name );\r\n\t$opt_val_4 = get_option($opt_name_4);\r\n $opt_val_5 = get_option($opt_name_5);\r\n\r\n // See if the user has posted us some information\r\n // If they did, this hidden field will be set to 'Y'\r\n if( $_POST[ $hidden_field_name ] == 'Y' ) {\r\n // Read their posted value\r\n $opt_val = $_POST[ $data_field_name ];\r\n\t\t$opt_val_4 = $_POST[$data_field_name_4];\r\n $opt_val_5 = $_POST[$data_field_name_5];\r\n\r\n // Save the posted value in the database\r\n update_option( $opt_name, $opt_val );\r\n\t\tupdate_option( $opt_name_4, $opt_val_4 );\r\n update_option( $opt_name_5, $opt_val_5 );\r\n\r\n // Put an options updated message on the screen\r\n\r\n?>\r\n<div class=\"updated\"><p><strong><?php _e('Options saved.', 'mt_trans_domain' ); ?></strong></p></div>\r\n<?php\r\n\r\n }\r\n\r\n // Now display the options editing screen\r\n\r\n echo '<div class=\"wrap\">';\r\n\r\n // header\r\n\r\n echo \"<h2>\" . __( 'WP Translate Plugin Settings', 'mt_trans_domain' ) . \"</h2>\";\r\n\n // options form\r\n \r\n\r\n $change1 = get_option(\"mt_translate_plugin_support\");\r\n\r\nif ($change1==\"Yes\" || $change1==\"\") {\r\n$change1=\"checked\";\r\n$change11=\"\";\r\n} else {\r\n$change1=\"\";\r\n$change11=\"checked\";\r\n}\r\n\r\n ?>\r\n<form name=\"form1\" method=\"post\" action=\"\">\r\n<input type=\"hidden\" name=\"<?php echo $hidden_field_name; ?>\" value=\"Y\">\r\n\r\n<p><?php _e(\"Widget Title:\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_4; ?>\" value=\"<?php echo $opt_val_4; ?>\" size=\"50\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"Support the Plugin?\", 'mt_trans_domain' ); ?> \r\n<input type=\"radio\" name=\"<?php echo $data_field_name_5; ?>\" value=\"Yes\" <?php echo $change1; ?>>Yes\r\n<input type=\"radio\" name=\"<?php echo $data_field_name_5; ?>\" value=\"No\" <?php echo $change11; ?>>No\r\n</p><hr />\r\n\r\n<p class=\"submit\">\r\n<input type=\"submit\" name=\"Submit\" value=\"<?php _e('Update Options', 'mt_trans_domain' ) ?>\" />\r\n</p><hr />\r\n\r\n</form>\r\n</div>\r\n<?php\r\n \r\n}", "function get_data_request_options()\r\n{\r\n\t//kijk wat het abstractie niveau is van de huidige opties\r\n\t$current_abstraction_level_query = 'select option_type from Requestable_data where option_name == \":current_selected_option\"';\r\n\t$current_abstraction_level = execute_sql_extract_data($current_abstraction_level_query);\r\n\t\r\n\t//haal de opties maar op uit de DB\r\n\t$requestable_data_descriptions = 'select option_name from Requestable_data where option_type = ' . $current_abstraction_level;\r\n\texecute_sql_extract_data($requestable_data_descriptions);\r\n}", "public \tfunction\tretrieveOptions() {\n\t\t\t//For each option category.\n\t\t\tforeach($this -> options as $category => $k) {\n\t\t\t\t//For each option. \n\t\t\t\tforeach ($this -> options[$category] as $key => $value) {\n\t\t\t\t\t//Set the option. \n\t\t\t\t\t$this -> options[$category][$key]\t\t=\tget_option($key);\n\t\t\t\t\t\n\t\t\t\t\t//If the option is serialized.\n\t\t\t\t\tif (is_serialized($this -> options[$category][$key])) {\n\t\t\t\t\t\t//Unserialize the option.\n\t\t\t\t\t\t$this -> options[$category][$key]\t=\t \n\t\t\t\t\t\tunserialize($this -> options[$category][$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function ci_cptr_plugin_options() {\n\t\n\tif ( !current_user_can('manage_options') )\n\t{\n\t\twp_die( __('You do not have sufficient permissions to access this page.') );\n\t}\n\t?>\n\t<div class=\"wrap\" id=\"cptr-options\">\n\t\t<!--<h2><?php echo sprintf(__('CSSIgniter Custom Post Types Relationships v%s - Settings', 'cptr'), CPTR_VERSION); ?></h2>-->\n\t\t<h2><?php echo sprintf(__('CSSIgniter Custom Post Types Relationships', 'cptr'), CPTR_VERSION); ?></h2>\n\t\t<p><?php _e(\"In this page you can define general options for the Custom Post Types Relationships plugin. All options here can be overridden manually by passing the appropriate parameters to the shortcode or the theme function. If you find yourself making changes here that don't have any effect, it's because your WordPress theme has hardcoded options for you, so check with the theme's developer.\", 'cptr'); ?></p>\n\t\t<p><?php echo sprintf(__('For complete usage instructions, please visit the <a href=\"%s\">plugin\\'s homepage</a>.', 'cptr'), 'http://www.cssigniter.com/ignite/custom-post-types-relationships/'); ?></p>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields('ci_cptr_plugin_settings'); ?>\n\t\n\t\t\t<?php\n\t\t\t\t$options = get_option(CI_CPTR_PLUGIN_OPTIONS);\n\t\t\t\t$options = ci_cptr_plugin_settings_validate($options);\n\t\t\t?>\n\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Max number of displayed related posts:', 'cptr'); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input name=\"<?php echo CI_CPTR_PLUGIN_OPTIONS; ?>[limit]\" type=\"text\" value=\"<?php echo $options['limit']; ?>\" class=\"small-text\" />\n\t\t\t\t\t\t<p><?php _e('Set to 0 for no limit.', 'cptr'); ?></p>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Show the excerpt for each post?', 'cptr'); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input name=\"<?php echo CI_CPTR_PLUGIN_OPTIONS; ?>[excerpt]\" type=\"checkbox\" value=\"1\" <?php checked($options['excerpt'], 1); ?> />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('How many words the excerpt should be?', 'cptr'); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input name=\"<?php echo CI_CPTR_PLUGIN_OPTIONS; ?>[words]\" type=\"text\" value=\"<?php echo $options['words']; ?>\" class=\"small-text\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Display the thumbnail?', 'cptr'); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input name=\"<?php echo CI_CPTR_PLUGIN_OPTIONS; ?>[thumb]\" type=\"checkbox\" value=\"1\" <?php checked($options['thumb'], 1); ?> />\n\t\t\t\t\t\t<p><?php _e('The thumbnail will be displayed after the title and before the excerpt.', 'cptr'); ?></p>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Thumbnail size', 'cptr'); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<label><?php _e('Width', 'cptr'); ?></label>\n\t\t\t\t\t\t<input name=\"<?php echo CI_CPTR_PLUGIN_OPTIONS; ?>[width]\" type=\"text\" value=\"<?php echo $options['width']; ?>\" class=\"small-text\" />\n\t\t\t\t\t\t<label><?php _e('Height', 'cptr'); ?></label>\n\t\t\t\t\t\t<input name=\"<?php echo CI_CPTR_PLUGIN_OPTIONS; ?>[height]\" type=\"text\" value=\"<?php echo $options['height']; ?>\" class=\"small-text\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><h3><?php _e('Display Options', 'cptr'); ?></h3></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Metabox title', 'cptr'); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input name=\"<?php echo CI_CPTR_PLUGIN_OPTIONS; ?>[metabox_name]\" type=\"text\" value=\"<?php echo $options['metabox_name']; ?>\" class=\"regular-text\" />\n\t\t\t\t\t\t<p><?php _e('This is the title of the metabox that the users will see while in the post edit screens.', 'cptr'); ?></p>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Allowed roles', 'cptr'); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p><?php _e('Select the roles that will have access to the plugin (i.e. can create/delete relationships).', 'cptr'); ?></p>\n\t\t\t\t\t\t<fieldset class=\"allowed-roles\">\n\t\t\t\t\t\t\t<?php cptr_checkbox_roles(CI_CPTR_PLUGIN_OPTIONS.'[allowed_roles][]', $options['allowed_roles']); ?>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Allowed post types', 'cptr'); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<p><?php _e('Select the post types that the plugin will be available to.', 'cptr'); ?></p>\n\t\t\t\t\t\t<fieldset class=\"allowed-post-types\">\n\t\t\t\t\t\t\t<?php cptr_checkbox_post_types(CI_CPTR_PLUGIN_OPTIONS.'[allowed_post_types][]', $options['allowed_post_types']); ?>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\t\t\t</table>\n\t\n\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n\t\t\t</p>\n\t\t</form>\n\t</div>\n\t\n\t<?php\n}", "public function build()\n\t{\n\t\tparent::build();\n\n\t\t$options = $this->suppliedOptions;\n\n\t\t$dataOptions = $options['options'];\n\n\t\t// Check if function\n\t\tif(\\is_callable($dataOptions)){\n\t\t\t$dataOptions = \\call_user_func($dataOptions);\n\t\t}\n\n\t\t$options['options'] = array();\n\n\t\t//iterate over the options to create the options assoc array\n\t\tforeach ($dataOptions as $val => $text)\n\t\t{\n\t\t\t$options['options'][] = array(\n\t\t\t\t'id' => is_numeric($val) && (!array_key_exists('enum_numeric_keys', $options) || $options['enum_numeric_keys'] == false) ? $text : $val,\n\t\t\t\t'text' => $text,\n\t\t\t);\n\t\t}\n\n\t\t$this->suppliedOptions = $options;\n\t}", "public function init_post_type_options() {\n\t\t// Grab the $_POST and append to it as needed\n\t\tif ( isset($_POST['data']) && ! isset($this->params['data']) ) {\n\t\t\t$this->params['data'] = $_POST['data'];\n\t\t}\n\n\t\t$post_type = $this->params['post_type'];\n\t\tif ( empty($post_type) || is_array($post_type) )\n\t\t\treturn false;\n\n\t\t$post_type_name = str_replace(array('%20',' ','-'), \"_\", $post_type);\n\t\t$prefix = '_kickpress_'.$post_type_name.'_';\n\n\t\t//$admin_options = kickpress_get_admin_options();\n\t\t$post_type_options = $this->get_post_type_options();\n\t\t$post_type_options = $this->set_post_type_options($post_type_options);\n\n\t\t$validateFirst = 0;\n\n\t\t// Set the defualt params for crud if params are null\n\t\tif ( ! isset($this->params['id']) )\n\t\t\t$post_id = 0;\n\t\telse\n\t\t\t$post_id = $this->params['id'];\n\n\t\t// Check that data is not a JSON string, a la import-comments\n\t\tif ( !empty( $this->params['data'] ) && is_array( $this->params['data'] ) ) {\n\t\t\t$custom_fields = $this->get_custom_fields();\n\t\t\tforeach ( $custom_fields as $field_name => $custom_fields ) {\n\t\t\t\t// TODO: add incoming data values to the tables array\n\t\t\t\t// Shortcut the complex data array from incoming forms and pass it into the universal params array\n\n\t\t\t\tif ( isset( $this->params['data'][$post_type][$post_id] ) ) {\n\t\t\t\t\t$formdata = $this->params['data'][$post_type][$post_id];\n\t\t\t\t\t$this->params = array_merge($formdata, $this->params);\n\t\t\t\t}\n\n\t\t\t\tif ( ! $validateFirst++ ) {\n\t\t\t\t\tif ( ! isset($this->params['categories_toolbar']) )\n\t\t\t\t\t\t$this->params['categories_toolbar'] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( isset($post_type) ) {\n\t\t\trequire_once(WP_PLUGIN_DIR.'/kickpress/kickpress-validation.php');\n\t\t\t$this->validation = new validation($this->params, $post_id);\n\t\t}\n\n\t\t$post_type = $this->params['post_type'];\n\t\t$taxonomies = get_object_taxonomies( $post_type, 'objects' );\n\n\t\tforeach ( $taxonomies as $taxonomy ) {\n\t\t\tif ( ! $taxonomy->_builtin ) {\n\t\t\t\t$this->add_view_alias( 'tax', $taxonomy->name );\n\t\t\t}\n\t\t}\n\t}", "public function prepareOptions()\r\n\t\t{\r\n\t\t\t$mysqli = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME);\r\n\t\t\t$query = 'SELECT name FROM options WHERE id_votes =\"'.$this->voteId.'\" ORDER BY id_option ASC ';\r\n\t\t\tif ($result = $mysqli->query($query))\r\n\t\t\t{\r\n\t\t\t\twhile($obj = $result->fetch_object())\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_push($this->optionList,$obj->name);\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\r\n\t\t\t}\r\n\t\t\t$mysqli->close(); \r\n\t\t}", "function optionPage() {\r\n\t\t$out = $uninstall = '';\r\n\r\n\t\t// Check write permissions\r\n\t\t$this->_checkDir();\r\n\r\n\t\t// Settings update or delete\r\n\t\tif(isset($_POST['options_update'])) { // options update\r\n\t\t\t// strip slashes array\r\n\t\t\t$_POST = $this->stripArray($_POST);\r\n\r\n\t\t\t$this->options['user_lvl'] = $_POST['vp_userlevel'];\r\n\t\t\t$this->options['show_option'] = $_POST['vp_show'];\r\n\t\t\t$this->options['class_name'] = $_POST['vp_classname'];\r\n\t\t\t$this->options['class_name_with_type'] = $_POST['vp_classwithtype'];\r\n\t\t\t$this->options['ins_shortcode'] = (isset($_POST['vp_shortcode']) && $_POST['vp_shortcode']=='1' ? '1' : '0');\r\n\t\t\t$this->updateOptions();\r\n\r\n\t\t\t$_POST = '';\r\n\t\t\t$this->note .= __('<strong>Done!</strong>', $this->textdomain_name);\r\n\r\n\t\t} elseif(isset($_POST['uninst'])) { // uninstall\r\n\t\t\t$this->deleteOptions();\r\n\t\t\tif (file_exists($this->data_dir))\r\n\t\t\t\t$this->_removeDir($this->data_dir);\r\n\t\t\t$this->note .= __('All files and folders have (probably) been deleted. Now click <strong>Plugins</strong> in the admin panel above and <b>Deactivate</b> the VideoPop plugin.', $this->textdomain_name);\r\n\t\t\t$this->note .= \"<br />\" . $this->data_dir;\r\n\t\t\t$this->error++;\r\n\t\t\t$this->initOptions();\r\n\t\t\terror_reporting(0);\r\n\t\t}\r\n\r\n\t\t// Add Options\r\n\t\t$out .= \"<div class=\\\"wrap\\\">\\n\";\r\n\t\t$out .= \"<h2>\".__('VideoPop+ Options', $this->textdomain_name).\"</h2><br />\\n\";\r\n\t\t$out .= \"<form method=\\\"post\\\" id=\\\"update_options\\\" action=\\\"\".$this->admin_action.\"\\\">\\n\";\r\n\t\t$out .= \"<table class=\\\"optiontable form-table\\\" style=\\\"margin-top:0;\\\"><tbody>\\n\";\r\n\r\n\t\t// Add User Level\r\n\t\t// Permission -- Subscriber = 0, Contributor = 1, Author = 2, Editor = 7, Administrator = 9\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td><strong>\".__('User Level', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td><select name=\\\"vp_userlevel\\\">\";\r\n\t\t$out .= \"<option value=\\\"0\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'0').\">\".__('subscriber', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"1\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'1').\">\".__('contributor', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"2\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'2').\">\".__('author', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"7\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'7').\">\".__('editor', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"9\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'9').\">\".__('administrator', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"</select>&nbsp;</td>\";\r\n\t\t$out .= \"<td>\".__('Set the user level the user needs to have (at least) to manage/upload/delete videos', $this->textdomain_name).\"</td>\\n\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t// Add Method of display\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td><strong>\".__('Method of display', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td><select name=\\\"vp_show\\\">\";\r\n\t\t$out .= \"<option value=\\\"popup\\\"\" .$this->_setOptionSelected($this->options['show_option'],'popup').\">\". __('Pop up', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"lightpop\\\"\".$this->_setOptionSelected($this->options['show_option'],'lightpop').\">\".__('LightPop', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"inline\\\"\" .$this->_setOptionSelected($this->options['show_option'],'inline').\">\". __('In line', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"none\\\"\" .$this->_setOptionSelected($this->options['show_option'],'none').\">\". __('The effect none', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"</select>&nbsp;</td>\";\r\n\t\t$out .= \"<td>\".__('Please select it from &quot;Pop up&quot;, &quot;LightPop&quot;, &quot;In line&quot;, and &quot;The effect none&quot;.', $this->textdomain_name);\r\n\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t// Add Class Name Setting\r\n\t\t$out .= \"<tr style=\\\"border-style:none;\\\">\\n\";\r\n\t\t$out .= \"<td style=\\\"border-style:none;\\\"><strong>\".__('Class name of the link tag', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td style=\\\"border-style:none;\\\"><input type=\\\"text\\\" name=\\\"vp_classname\\\" value=\\\"\".$this->options['class_name'].\"\\\"/>&nbsp;</td>\";\r\n\t\t$out .= \"<td style=\\\"border-style:none;\\\">\".__('Please set the class name of the link tag.', $this->textdomain_name).\"</td>\\n\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td></td>\";\r\n\t\t$out .= \"<td colspan=\\\"2\\\"><select name=\\\"vp_classwithtype\\\">\";\r\n\t\t$out .= \"<option value=\\\"0\\\"\".$this->_setOptionSelected($this->options['class_name_with_type'],'0').\">\".__('Without File Type', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"1\\\"\".$this->_setOptionSelected($this->options['class_name_with_type'],'1').\">\".__('With File Type', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"</select>&nbsp;</td>\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t// Insert Editor Option (Shortcode or HTML Tag?)\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td><strong>\".__('Insert Editor Option', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td colspan=\\\"2\\\"><input type=\\\"checkbox\\\" name=\\\"vp_shortcode\\\" value=\\\"1\\\" style=\\\"margin-right:0.5em;\\\" \".($this->options['ins_shortcode']=='1' ? \" checked\" : \"\").\" />\".__('Shortcode is inserted in the editor.', $this->textdomain_name).\"</td>\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\t\t$out .= \"<tr>\\n\";\r\n\r\n\t\t$out .= \"</tbody></table>\\n\";\r\n\r\n\t\t// Add Update Button\r\n\t\t$out .= \"<div style=\\\"text-align:right;margin-top:1em;\\\">\";\r\n\t\t$out .= \"<input type=\\\"submit\\\" name=\\\"options_update\\\" value=\\\"\".__('Update Options', $this->textdomain_name).\"\\\" class=\\\"button\\\" />\";\r\n\t\t$out .= \"</div>\";\r\n\t\t$out .= \"</form></div>\\n\";\r\n\r\n\t\t// Add uninstall\r\n\t\t$out .= \"<div class=\\\"wrap\\\" style=\\\"margin-top:2em;\\\">\\n\";\r\n\t\t$out .= \"<h2>\".__('Uninstall', $this->textdomain_name).\"</h2><br />\\n\";\r\n\t\t$out .= \"<p>\".__('If you want to keep your videos and the popup functionality of your links but want to get rid of the additional menus in the control panel, just deactivate the plugin.<br />For a complete uninstall including all uploaded videos use the uninstall button.', $this->textdomain_name).\"</p>\\n\";\r\n\t\t$out .= \"<div style=\\\"text-align:right;\\\">\";\r\n\t\t$out .= \"<form method=\\\"post\\\" id=\\\"uninstall\\\" action=\\\"\".$this->admin_action.\"\\\">\\n\";\r\n\t\t$out .= \"<input type=\\\"submit\\\" name=\\\"uninst\\\" value=\\\"\".__('Uninstall VideoPop+', $this->textdomain_name).\"\\\" onclick=\\\"javascript:check=confirm('\".__('You are about to delete all your settings and Videos! The links you created with VideoPop will not work after uninstall! Proceed with uninstall?', $this->textdomain_name).\"');if(check==false) return false;\\\" class=\\\"button\\\" />\\n\";\r\n\t\t$out .= \"</form>\\n\";\r\n\t\t$out .= \"</div>\\n\";\r\n\t\t$out .= \"</div>\\n\";\r\n\r\n\t\t// Output\r\n\t\techo (!empty($this->note) ? \"<div id=\\\"message\\\" class=\\\"updated fade\\\"><p>{$this->note}</p></div>\\n\" : '' ).\"\\n\";\r\n\t\techo ($this->error > 0 ? '' : $out).\"\\n\";\r\n\t}", "public function run()\n {\n DB::table('options')->truncate();\n DB::table('options')\n ->insert([\n ['option_key' => 'date_format', 'option_value' => 'F j, Y'],\n ['option_key' => 'time_format', 'option_value' => 'g:i A'],\n ['option_key' => 'logo_settings', 'option_value' => 'show_site_name'],\n ['option_key' => 'verification_email_after_registration', 'option_value' => '1'],\n ['option_key' => 'site_name', 'option_value' => 'LaraBid'],\n ['option_key' => 'site_title', 'option_value' => 'The Best Auction Website'],\n ['option_key' => 'email_address', 'option_value' => '[email protected]'],\n ['option_key' => 'default_timezone', 'option_value' => 'America/New_York'],\n ['option_key' => 'date_format_custom', 'option_value' => 'F j, Y'],\n ['option_key' => 'time_format_custom', 'option_value' => 'g:i A'],\n ['option_key' => 'currency_sign', 'option_value' => 'USD'],\n ['option_key' => 'ads_moderation', 'option_value' => 'need_moderation'],\n ['option_key' => 'ads_price_plan', 'option_value' => 'regular_ads_free_premium_paid'],\n ['option_key' => 'enable_related_ads', 'option_value' => '1'],\n ['option_key' => 'regular_ads_price', 'option_value' => NULL],\n ['option_key' => 'premium_ads_price', 'option_value' => '5'],\n ['option_key' => 'urgent_ads_price', 'option_value' => '8'],\n ['option_key' => 'number_of_urgent_ads_in_home', 'option_value' => '5'],\n ['option_key' => 'number_of_premium_ads_in_home', 'option_value' => '5'],\n ['option_key' => 'number_of_free_ads_in_home', 'option_value' => '12'],\n ['option_key' => 'ads_per_page', 'option_value' => '20'],\n ['option_key' => 'number_of_premium_ads_in_listing', 'option_value' => NULL],\n ['option_key' => 'premium_ads_max_impressions', 'option_value' => NULL],\n ['option_key' => 'number_of_last_days_premium_ads', 'option_value' => NULL],\n ['option_key' => 'enable_paypal', 'option_value' => '1'],\n ['option_key' => 'enable_stripe', 'option_value' => '1'],\n ['option_key' => 'enable_paypal_sandbox', 'option_value' => '1'],\n ['option_key' => 'paypal_receiver_email', 'option_value' => '[email protected]'],\n ['option_key' => 'stripe_test_secret_key', 'option_value' => 'sk_test_tJeAdA1KbhiYV8I8bfPmJcOL'],\n ['option_key' => 'stripe_test_publishable_key', 'option_value' => 'pk_test_P3TFmKrvT7l29Zpyy1f4pwk8'],\n ['option_key' => 'stripe_live_secret_key', 'option_value' => NULL],\n ['option_key' => 'stripe_live_publishable_key', 'option_value' => NULL],\n ['option_key' => 'default_storage', 'option_value' => 'public'],\n ['option_key' => 'amazon_key', 'option_value' => NULL],\n ['option_key' => 'amazon_secret', 'option_value' => NULL],\n ['option_key' => 'amazon_region', 'option_value' => NULL],\n ['option_key' => 'bucket', 'option_value' => NULL],\n ['option_key' => 'stripe_test_mode', 'option_value' => '1'],\n ['option_key' => 'currency_position', 'option_value' => 'left'],\n ['option_key' => 'google_map_api_key', 'option_value' => 'AIzaSyCQuDQmtiHkS7CcriyEiYXWja3ODrG4vFI'],\n ['option_key' => 'enable_google_maps', 'option_value' => '1'],\n ['option_key' => 'enable_comments', 'option_value' => '1'],\n ['option_key' => 'enable_fb_comments', 'option_value' => '1'],\n ['option_key' => 'facebook_url', 'option_value' => '#'],\n ['option_key' => 'twitter_url', 'option_value' => '#'],\n ['option_key' => 'linked_in_url', 'option_value' => '#'],\n ['option_key' => 'dribble_url', 'option_value' => '#'],\n ['option_key' => 'google_plus_url', 'option_value' => '#'],\n ['option_key' => 'youtube_url', 'option_value' => '#'],\n ['option_key' => 'countries_usage', 'option_value' => 'all_countries'],\n ['option_key' => 'enable_social_login', 'option_value' => '1'],\n ['option_key' => 'enable_facebook_login', 'option_value' => '1'],\n ['option_key' => 'fb_app_id', 'option_value' => '807346162754117'],\n ['option_key' => 'fb_app_secret', 'option_value' => '6b93030d5c4f2715aa9d02be93256fbd'],\n ['option_key' => 'google_client_id', 'option_value' => '62019812075-0sp3u7h854tp7aknl1m8q7ens0pm4im0.apps.googleusercontent.com'],\n ['option_key' => 'google_client_secret', 'option_value' => 'xK8SHn-ds4GJtVSL95ExTzw3'],\n ['option_key' => 'enable_google_login', 'option_value' => '1'],\n ['option_key' => 'enable_twitter_login', 'option_value' => '1'],\n ['option_key' => 'twitter_consumer_key', 'option_value' => 'cOiq6W7Ot8HQH1GAfGd2pGZy8'],\n ['option_key' => 'twitter_client_secret', 'option_value' => 'XItViEyIRVMrhexIqg9S9DSZQdsOHGDvQush3BAgqdm5M1ivHx'],\n ['option_key' => 'twitter_consumer_secret', 'option_value' => 'XItViEyIRVMrhexIqg9S9DSZQdsOHGDvQush3BAgqdm5M1ivHx'],\n ['option_key' => 'logo', 'option_value' => '1515332341evaib-logo.png'],\n ['option_key' => 'logo_storage', 'option_value' => 'public'],\n ['option_key' => 'enable_language_switcher', 'option_value' => '1'],\n ['option_key' => 'recaptcha_site_key', 'option_value' => '6LfSyyMUAAAAAPA6f8iIP7WB51Bw3xKipBHlvdz_'],\n ['option_key' => 'recaptcha_secret_key', 'option_value' => '6LfSyyMUAAAAAHeMy-PyshlTJcbE3sbsddOGw6gk'],\n ['option_key' => 'enable_recaptcha_login', 'option_value' => '0'],\n ['option_key' => 'enable_recaptcha_registration', 'option_value' => '0'],\n ['option_key' => 'enable_recaptcha_post_ad', 'option_value' => '0'],\n ['option_key' => 'google_map_embedded_code', 'option_value' => '<iframe src=\\\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2867.3732463742!2d-73.98604123059546!3d40.75928510320901!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89c25855b8fb3083%3A0xa0f9aef176042a5c!2sTheater+District%2C+New+York%2C+NY%2C+USA!5e0!3m2!1sen!2sbd!4v1515333304629\\\" width=\\\"600\\\" height=\\\"450\\\" frameborder=\\\"0\\\" style=\\\"border:0\\\" allowfullscreen></iframe>'],\n ['option_key' => 'footer_address', 'option_value' => 'Times Square, Manhattan, New York, NY, USA'],\n ['option_key' => 'site_phone_number', 'option_value' => '+10099234534'],\n ]);\n }", "private function _parseOptions($options) {\n\n if ( isset($options['dir']) ) {\n $this->dir = $options['dir'];\n }\n\n if ( isset($options['output'] ) ) {\n $this->output = $options['output'];\n }\n }", "function wpex_customizer_options_sanitize( $options ) {\n\t\tif ( $options ) {\n\t\t\t// Delete options if import set to -1\n\t\t\tif ( '-1' == $options['reset'] ) {\n\t\t\t\t// Get menu locations\n\t\t\t\t$locations = get_theme_mod( 'nav_menu_locations' );\n\t\t\t\t$save_menus = array();\n\t\t\t\tforeach( $locations as $key => $val ) {\n\t\t\t\t\t$save_menus[$key] = $val;\n\t\t\t\t}\n\t\t\t\t// Remove all mods\n\t\t\t\tremove_theme_mods();\n\t\t\t\t// Re-add the menus\n\t\t\t\tset_theme_mod( 'nav_menu_locations', array_map( 'absint', $save_menus ) );\n\t\t\t\t// Error messages\n\t\t\t\t$error_msg = __( 'All theme customizer settings have been reset.', 'wpex-zero' );\n\t\t\t\t$error_type = 'updated';\n\t\t\t}\n\t\t\t// Set theme mods based on json data\n\t\t\telseif( ! empty( $options['import'] ) ) {\n\t\t\t\t// Decode input data\n\t\t\t\t$theme_mods = json_decode( $options['import'], true );\n\t\t\t\t// Validate json file then set new theme options\n\t\t\t\tif ( '0' == json_last_error() ) {\n\t\t\t\t\tforeach ( $theme_mods as $theme_mod => $value ) {\n\t\t\t\t\t\tset_theme_mod( $theme_mod, $value );\n\t\t\t\t\t}\n\t\t\t\t\t$error_msg = __( 'Theme customizer settings imported successfully.', 'wpex-zero' );\n\t\t\t\t\t$error_type = 'updated';\n\t\t\t\t}\n\t\t\t\t// Display invalid json data error\n\t\t\t\telse {\n\t\t\t\t\t$error_msg = __( 'Invalid Import Data.', 'wpex-zero' );\n\t\t\t\t\t$error_type = 'error';\n\t\t\t\t}\n\t\t\t}\n\t\t\t// No json data entered\n\t\t\telse {\n\t\t\t\t$error_msg = __( 'No import data found.', 'wpex-zero' );\n\t\t\t\t$error_type = 'error';\n\t\t\t}\n\t\t\t// Make sure the settings data is reset! \n\t\t\t$options = array(\n\t\t\t\t'import'\t=> '',\n\t\t\t\t'reset'\t\t=> '',\n\t\t\t);\n\t\t}\n\t\t// Display message\n\t\tadd_settings_error(\n\t\t\t'wpex-customizer-notices',\n\t\t\tesc_attr( 'settings_updated' ),\n\t\t\t$error_msg,\n\t\t\t$error_type\n\t\t);\n\n\t\t// Return options\n\t\treturn $options;\n\t}", "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 parse_options(){\n\t\t\n\t\t//switch (explode(',',$this->options)){case title: $return[]='title: {usw}';break;} $this->parsed_options=implode(',',return);\n\t\t\n\t\t$this->parsed_options=\"chart: {\trenderTo: 'container',\tdefaultSeriesType: 'area',\t\tinverted: true},\n\t\t\t\t\ttitle: {\ttext: 'ein Beispiel'},\n\t\t\t\t\tsubtitle: {\tstyle: {position: 'absolute',right: '0px',\tbottom: '10px'\t}},\n\t\t\t\t\tlegend: {\tlayout: 'vertical',\talign: 'right',\tverticalAlign: 'top',x: -150,y: 100,floating: true,\tborderWidth: 1,\tbackgroundColor: '#FFFFFF'},\n\t\t\t\t\txAxis: {categories: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']},\n\t\t\t\t\tyAxis: {title: {text: 'x-Axentitel'},labels: {formatter: function() {return this.value;}},min: 0},\n\t\t\t\t\t\";\n\t\treturn true;\n\t}", "function parseCommandOptions(&$optionInfo)\n{\n global $optionList;\n global $argc;\n global $argv;\n $addMsg = \"\\nTry \\\"pg_stats_reporter --help\\\" for more information.\";\n\n for ($i = 1; $i < $argc; $i++) {\n\n if (strncmp($argv[$i], '--', 2) == 0) {\n $opt_array = explode(\"=\", ltrim($argv[$i], \"-\"), 2);\n switch ($opt_array[0]) {\n case \"elevel\":\n break;\n case \"help\":\n displayUsage();\n exit(0);\n case \"version\":\n displayVersion();\n exit(0);\n case \"list\":\n case \"dblist\":\n case \"size\":\n case \"index\":\n case \"onlybody\":\n case \"all\":\n case \"inline\":\n $optionInfo[$opt_array[0]] = true;\n break;\n case \"host\":\n case \"port\":\n case \"username\":\n case \"password\":\n case \"dbname\":\n case \"repositorydb\":\n case \"instid\":\n case \"beginid\":\n case \"endid\":\n case \"begindate\":\n case \"enddate\":\n case \"outputdir\":\n case \"resprefix\":\n if (count($opt_array) == 2)\n $optionInfo[$opt_array[0]] = $opt_array[1];\n else {\n if (++$i == $argc) {\n elog(ERROR, \"Option requires argument -- '%s'\" . $addMsg, $opt_array[0]);\n }\n $optionInfo[$opt_array[0]] = $argv[$i];\n }\n break;\n default:\n elog(ERROR, \"Invalid option -- '%s'\" . $addMsg, $opt_array[0]);\n }\n } else if ($argv[$i][0] == '-') {\n $opt = ltrim($argv[$i], \"-\");\n switch ($opt) {\n case \"l\":\n case \"L\":\n case \"s\":\n case \"a\":\n $optionInfo[$optionList[$opt]] = true;\n break;\n case \"R\":\n case \"i\":\n case \"b\":\n case \"e\":\n case \"B\":\n case \"E\":\n case \"O\":\n if (++$i == $argc) {\n elog(ERROR, \"Option requires argument -- '%s'\" . $addMsg, $opt);\n }\n $optionInfo[$optionList[$opt]] = $argv[$i];\n break;\n default:\n elog(ERROR, \"Invalid option -- '%s'\" . $addMsg, $opt);\n }\n } else {\n elog(ERROR, \"Unrecognized option: '%s'\" . $addMsg, $opt);\n }\n }\n checkOptionCombination($optionInfo, $addMsg);\n}", "public function flow_process_admin_options() {\r\n\r\n $hasFile = false;\r\n $nombrePlugin = basename(__DIR__);\r\n $idFileInput = \"woocommerce_\" . $this->id . \"_logo-small\";\r\n if (isset($_FILES[$idFileInput])) {\r\n $file = $_FILES[$idFileInput];\r\n $hasFile = $file['size']>0;\r\n if ($hasFile) {\r\n move_uploaded_file($file['tmp_name'], PLUGIN_DIR_flow.\"images/custom-logo-small.png\");\r\n }\r\n }\r\n\r\n $post_data = $this->get_post_data();\r\n $anyErrors = false;\r\n\r\n if(empty($post_data['woocommerce_'.$this->id.'_api_key'])){\r\n update_option('woocommerce_flow_api_key_valid', false);\r\n $anyErrors = true;\r\n }\r\n else{\r\n update_option('woocommerce_flow_api_key_valid', true);\r\n }\r\n\r\n if(empty($post_data['woocommerce_'.$this->id.'_secret_key'])){\r\n update_option('woocommerce_flow_secret_key_valid', false);\r\n $anyErrors = true;\r\n }\r\n else{\r\n update_option('woocommerce_flow_secret_key_valid', true);\r\n }\r\n\r\n if(!$anyErrors)\r\n $this->process_admin_options();\r\n\r\n return ;\r\n\r\n }", "function pu_display_setting($args)\n{\n extract( $args );\n\n $option_name = 'pu_theme_options';\n\n $options = get_option( $option_name );\n\n switch ( $type ) { \n case 'text': \n $options[$id] = stripslashes($options[$id]); \n $options[$id] = esc_attr( $options[$id]); \n echo \"<input class='regular-text$class' type='text' id='$id' name='\" . $option_name . \"[$id]' value='$options[$id]' />\"; \n echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\";\n break;\n case 'textarea': \n $options[$id] = stripslashes($options[$id]); \n //$options[$id] = esc_attr( $options[$id]);\n $options[$id] = esc_html( $options[$id]); \n\n printf(\n \twp_editor($options[$id], $id, \n \t\tarray('textarea_name' => $option_name . \"[$id]\",\n \t\t\t'style' => 'width: 200px'\n \t\t\t)) \n\t\t\t\t);\n // echo \"<textarea id='$id' name='\" . $option_name . \"[$id]' rows='10' cols='50'>\".$options[$id].\"</textarea>\"; \n // echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\"; \n break; \n }\n}", "public function custom_option_import_code() {\n\t\t$option_name = Fusion_Settings::get_option_name();\n\t\t$nonce_name = 'fusionredux_ajax_nonce' . $option_name;\n\t\tif ( ! isset( $_REQUEST['security'] ) || ! wp_verify_nonce( wp_unslash( $_REQUEST['security'] ), $nonce_name ) ) { // phpcs:ignore WordPress.Security\n\t\t\techo wp_json_encode(\n\t\t\t\t[\n\t\t\t\t\t'status' => 'failed',\n\t\t\t\t\t'action' => 'reload',\n\t\t\t\t]\n\t\t\t);\n\t\t\tdie();\n\t\t}\n\n\t\tif ( isset( $_POST['data'] ) && ! empty( $_POST['data'] ) ) {\n\t\t\t$values = [];\n\t\t\t$fusionredux = FusionReduxFrameworkInstances::get_instance( $option_name );\n\n\t\t\t$values = $fusionredux->fields;\n\t\t\t$values = wp_parse_args(\n\t\t\t\tget_option( $option_name ),\n\t\t\t\t$values\n\t\t\t);\n\n\t\t\tif ( isset( $_POST['data']['import_code'] ) && '' !== $_POST['data']['import_code'] ) {\n\t\t\t\t$import_code = stripslashes( $_POST['data']['import_code'] ); // phpcs:ignore WordPress.Security\n\t\t\t\t$values['import_code'] = $import_code;\n\t\t\t} elseif ( isset( $_POST['data']['import_link'] ) && '' !== $_POST['data']['import_link'] ) {\n\t\t\t\t$values['import_link'] = $_POST['data']['import_link']; // phpcs:ignore WordPress.Security\n\t\t\t} else {\n\t\t\t\techo wp_json_encode(\n\t\t\t\t\t[\n\t\t\t\t\t\t'status' => 'failed',\n\t\t\t\t\t\t'action' => 'reload',\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t\tif ( isset( $fusionredux->validation_ran ) ) {\n\t\t\t\tunset( $fusionredux->validation_ran );\n\t\t\t}\n\n\t\t\t$fusionredux->set_options( $fusionredux->_validate_options( $values ) );\n\n\t\t\techo wp_json_encode(\n\t\t\t\t[\n\t\t\t\t\t'status' => 'success',\n\t\t\t\t\t'action' => 'reload',\n\t\t\t\t]\n\t\t\t);\n\t\t} else {\n\t\t\techo wp_json_encode(\n\t\t\t\t[\n\t\t\t\t\t'status' => 'failed',\n\t\t\t\t\t'action' => 'reload',\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\t\tdie();\n\t}", "function pu_display_setting($args)\n{\n extract($args);\n\n $option_name = 'pu_theme_options';\n\n $options = get_option($option_name);\n\n switch ($type) {\n case 'text':\n $options[$id] = stripslashes($options[$id]);\n $options[$id] = esc_attr($options[$id]);\n echo \"<input class='regular-text$class' type='text' id='$id' name='\" . $option_name . \"[$id]' value='$options[$id]' />\";\n echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\";\n break;\n case 'textarea':\n $options[$id] = stripslashes($options[$id]);\n //$options[$id] = esc_attr( $options[$id]);\n $options[$id] = esc_html($options[$id]);\n\n printf(\n wp_editor($options[$id], $id,\n array('textarea_name' => $option_name . \"[$id]\",\n 'style' => 'width: 200px',\n ))\n );\n // echo \"<textarea id='$id' name='\" . $option_name . \"[$id]' rows='10' cols='50'>\".$options[$id].\"</textarea>\";\n // echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\";\n break;\n }\n}", "public function update_options() {\n include $this->migrations_file;\n\n // default settings to use for updating options\n $settings_defaults = array(\n 'serialized' => false,\n 'mode' => 'update',\n 'options' => '',\n );\n\n // make the migrations\n foreach ($options_to_update as $option_name => $settings) {\n $settings = wp_parse_args($settings, $defaults);\n $option = get_option($option_name);\n $new_data = array();\n $updated_data = null;\n\n // data is serialized\n if ($settings['serialized']) {\n $old_data = maybe_unserialize($option);\n $new_data = maybe_unserialize($settings['data']);\n\n // update options\n if ($data['mode'] == 'update') {\n $updated_data = serialize(wp_parse_args($new_data, $old_data));\n }\n\n // completely replace options\n else {\n $updated_data = serialize($new_data);\n }\n }\n\n // data is int/string/bool\n else {\n $updated_data = $settings['data'];\n }\n\n if ($updated_data) {\n update_option($option_name, $updated_data);\n }\n }\n\n update_option('dkomigrate_timestamp', $this->migrations_file_mtime);\n add_action('admin_notices', array($this, 'notice_migration_successful'));\n }", "function populate_options(array $options = array())\n {\n }", "function post_options()\n\t{\n\t\tglobal $auth;\n\n\t\t$this->auth_bbcode = ($auth->acl_get('u_blogbbcode')) ? true : false;\n\t\t$this->auth_smilies = ($auth->acl_get('u_blogsmilies')) ? true : false;\n\t\t$this->auth_img = ($auth->acl_get('u_blogimg')) ? true : false;\n\t\t$this->auth_url = ($auth->acl_get('u_blogurl')) ? true : false;\n\t\t$this->auth_flash = ($auth->acl_get('u_blogflash')) ? true : false;\n\n\t\tblog_plugins::plugin_do('post_options');\n\t}", "public function parse(): OptionPage;", "function form_options($options) {\n }", "function edd_incentives_render_exit_options() {\n global $post;\n\n $post_id = $post->ID;\n $meta = get_post_meta( $post_id, '_edd_incentive_meta', true );\n $text_css = ( ! isset( $meta['button_type'] ) || $meta['button_type'] == 'text' ? '' : ' style=\"display: none;\"' );\n $button_css = ( isset( $meta['button_type'] ) && $meta['button_type'] == 'button' ? '' : ' style=\"display: none;\"' );\n $image_css = ( isset( $meta['button_type'] ) && $meta['button_type'] == 'image' ? '' : ' style=\"display: none;\"' );\n\n // Button type\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_button_type\">' . __( 'Button Type', 'edd-incentives' ) . '</label></strong><br />';\n echo '<select class=\"edd-incentives-select2\" name=\"_edd_incentive_meta[button_type]\" id=\"_edd_incentive_button_type\">';\n echo '<option value=\"text\"' . ( ! isset( $meta['button_type'] ) || $meta['button_type'] == 'text' ? ' selected' : '' ) . '>' . __( 'Text Link', 'edd-incentives' ) . '</option>';\n echo '<option value=\"image\"' . ( $meta['button_type'] == 'image' ? ' selected' : '' ) . '>' . __( 'Image Link', 'edd-incentives' ) . '</option>';\n echo '<option value=\"button\"' . ( $meta['button_type'] == 'button' ? ' selected' : '' ) . '>' . __( 'Button', 'edd-incentives' ) . '</option>';\n echo '</select>';\n echo '</p>';\n\n // Button text - text\n echo '<p class=\"edd-incentives-button-type-text\"' . $text_css . '>';\n echo '<strong><label for=\"_edd_incentive_link_text\">' . __( 'Link Text', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"text\" class=\"widefat\" name=\"_edd_incentive_meta[link_text]\" id=\"_edd_incentive_link_text\" value=\"' . ( isset( $meta['link_text'] ) && $meta['link_text'] != '' ? $meta['link_text'] : '' ) . '\" />';\n echo '</p>';\n \n // Button text - button\n echo '<p class=\"edd-incentives-button-type-button\"' . $button_css . '>';\n echo '<strong><label for=\"_edd_incentive_button_text\">' . __( 'Button Text', 'edd-incentives' ) . '</label></strong><br />';\n echo '<input type=\"text\" class=\"widefat\" name=\"_edd_incentive_meta[button_text]\" id=\"_edd_incentive_button_text\" value=\"' . ( isset( $meta['button_text'] ) && $meta['button_text'] != '' ? $meta['button_text'] : '' ) . '\" />';\n echo '</p>';\n\n // Button image\n echo '<p class=\"edd-incentives-button-type-image\"' . $image_css . '>';\n echo '<strong><label for=\"_edd_incentive_button_image\">' . __( 'Button Image', 'edd-incentives' ) . '</label></strong><br />';\n if( ! isset( $meta['button_image'] ) || $meta['button_image'] == '' ) {\n echo '<input type=\"file\" name=\"_edd_incentive_button_image\" id=\"_edd_incentive_button_image\" value=\"\" size=\"25\" />';\n } else {\n echo '<img src=\"' . $meta['button_image'] . '\" style=\"width: 100%;\" />';\n echo '<a href=\"' . add_query_arg( array( 'edd-action' => 'remove_button_image' ) ) . '\" class=\"button button-secondary\">' . __( 'Remove', 'edd-incentives' ) . '</a>';\n }\n echo '</p>';\n}", "function get_additional_field_options($val){\n\t \t$OPTIONS = stripslashes($val);\n\t\t\t$OPTIONS = str_replace(', ', ',', $OPTIONS);\n\t\t\t$OPTIONS = explode(',', $OPTIONS);\n\t\t\t$output = false;\n\t\t\tforeach($OPTIONS as $option){\n\t\t\t\t$slug = str_replace(' ', '-', $option);\n\t\t\t\t$output[$slug]= $option;\n\t\t\t}\n\t\t\treturn $output;\n\t }", "function optionsframework_options() {\n\n\t// Typograpgy CSS list\n\t$typography = options_stylesheets_get_file_list(\n\t\tget_stylesheet_directory() . '/css/typography/', // $directory_path\n\t\t'css', // $filetype\n\t\tget_stylesheet_directory_uri() . '/css/typography/' // $directory_uri\n\t);\n\n\n\t// Layout CSS list\n\t$layout = options_stylesheets_get_file_list(\n\t\tget_stylesheet_directory() . '/css/layout/', // $directory_path\n\t\t'css', // $filetype\n\t\tget_stylesheet_directory_uri() . '/css/layout/' // $directory_uri\n\t);\n\t\n\t// Colors CSS list\n\t$colors = options_stylesheets_get_file_list(\n\t\tget_stylesheet_directory() . '/css/colors/', // $directory_path\n\t\t'css', // $filetype\n\t\tget_stylesheet_directory_uri() . '/css/colors/' // $directory_uri\n\t);\n\n\n\n\n\t$options = array();\n\t\t\n\n// Typography\n// typography in the Theme options\n\t\n \t$options['typography'] = array( \n\t\t\"name\" => \"Typography\",\n \t\t\"id\" => \"typography\",\n \t\t\"type\" => \"radio\",\n \t\t\"options\" => $typography );\n\n\n// Colors\n// Colors in the Theme options\n\t\n \t$options['colors'] = array( \n\t\t\"name\" => \"Colors\",\n \t\t\"id\" => \"colors\",\n \t\t\"type\" => \"radio\",\n \t\t\"options\" => $colors );\n \n\t// Color Picker\n\t\t\n $options['example_colorpicker'] = array(\n \t\"name\" => \"Colorpicker\",\n \t\"id\" => \"example_colorpicker\",\n \t\"std\" => \"#666666\",\n \t\"type\" => \"color\" );\n\n\n\n// Layout\n// Layout in the Theme options\n\t\n \t$options['layout'] = array( \n\t\t\"name\" => \"Layout CSS variants\",\n \t\t\"id\" => \"layout\",\n \t\t\"type\" => \"radio\",\n \t\t\"options\" => $layout );\n \n\n\n// site Width setting \n\t\t\n \t$options['site_width'] = array(\n \t \t\"name\" => \"Site Width\",\n \t \"id\" => \"site_width\",\n \t \"std\" => \"Default Value\",\n \t \"type\" => \"text\" );\n\n// Logo uploader\n\n\t$options['logo'] = array(\n\t\t\"name\" => \"Logo image\",\n\t\t\"desc\" => \"This creates a full size uploader that previews the image.\",\n\t\t\"id\" => \"logo\",\n\t\t\"type\" => \"upload\" );\n\t\t\n\n\treturn $options;\n}", "public function optionsCallback($strField);", "function pu_display_setting($args) {\n extract($args);\n\n $option_name = 'pu_theme_options';\n\n $options = get_option($option_name);\n\n switch ($type) {\n case 'text':\n $options[$id] = stripslashes($options[$id]);\n $options[$id] = esc_attr($options[$id]);\n echo \"<input class='regular-text$class' type='text' id='$id' name='\" . $option_name . \"[$id]' value='$options[$id]' />\";\n echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\";\n break;\n case 'textarea':\n $options[$id] = stripslashes($options[$id]);\n //$options[$id] = esc_attr( $options[$id]);\n $options[$id] = esc_html($options[$id]);\n\n printf(\n wp_editor($options[$id], $id, array('textarea_name' => $option_name . \"[$id]\",\n 'style' => 'width: 200px'\n ))\n );\n // echo \"<textarea id='$id' name='\" . $option_name . \"[$id]' rows='10' cols='50'>\".$options[$id].\"</textarea>\"; \n // echo ($desc != '') ? \"<br /><span class='description'>$desc</span>\" : \"\"; \n break;\n }\n}", "function print_custom($value){\n\t\techo $this->before_option_title.$value['name'].$this->after_option_title.'<br/><br/><br/>';\n\t\t\n\t\t$field_ids=array();\n\t\t$field_names=array();\n\t\t$is_textarea=array();\n\t\t\n\t\tforeach($value['fields'] as $field){\n\t\t\techo '<div class=\"custom-option\"><span class=\"custom-heading\">'.$field['name'].'</span>';\n\t\t\tswitch($field['type']){\n\t\t\t\tcase 'text':\n\t\t\t\t\t//print a standart text field\n\t\t\t\t\techo '<input type=\"text\" id=\"'.$field['id'].'\" name=\"'.$field['id'].'\"/>';\n\t\t\t\t\t$is_textarea[]=\"false\";\n\t\t\t\tbreak;\n\t\t\t\tcase 'upload':\n\t\t\t\t\t//print a field with an upload button\n\t\t\t\t\techo '<input class=\"option-input upload\" name=\"'.$field['id'].'\" id=\"'.$field['id'].'\" type=\"text\" />';\n\t\t\t\t\techo '<div id=\"'.$field['id'].'_button\" class=\"upload-button upload-logo\" ><a class=\"hana-button alignright\"><span>Upload</span></a></div><br/>';\n\t\t\t\t\techo '<script type=\"text/javascript\">jQuery(document).ready(function($){\n\t\t\t\t\t\t\t\thanaOptions.loadUploader(jQuery(\"div#'.$field['id'].'_button\"));\n\t\t\t\t\t\t});</script>';\n\t\t\t\t\t$preview=$field['id'];\n\t\t\t\t\t$is_textarea[]=\"false\";\n\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\t//print a textarea\n\t\t\t\t\techo '<textarea id=\"'.$field['id'].'\" name=\"'.$field['id'].'\"></textarea>';\n\t\t\t\t\t$is_textarea[]=\"true\";\n\t\t\t\tbreak;\n\t\t\t\tcase 'imageselect':\n\t\t\t\t\t//print a textarea\n\t\t\t\t\techo '<div class=\"styles-holder images-select-holder\" id=\"'.$field['id'].'_container\">';\n\t\t\t\t\techo '<input name=\"'.$field['id'].'\" id=\"'.$field['id'].'\" type=\"hidden\" /><ul>';\n\t\t\t\t\n\t\t\t\t\t$counter=0;\n\t\t\t\t\tforeach ($field['options'] as $key=>$option) {\n\t\t\t\t\t\t//$style='background-image:url('.$option.');';\n\t\t\t\t\t\techo '<li><a class=\"style-box\" title=\"'.$option.'\" href=\"\"><img src=\"'.$option.'\" /></a>'.$key.'</li>';\n\t\t\t\t\t} \n\t\t\t\t\techo '</ul></div>';\n\t\t\t\t\t$is_textarea[]=\"false\";\n\t\t\t\t\tbreak;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$saved_value=$this->get_field_value( $field['id'].'s');\n\t\t\t\n\t\t\t\n\t\t\t$saved_value=stripslashes($saved_value);\n\t\t\t//echo '<input type=\"hidden\" name=\"'.$field['id'].'s\" id=\"'.$field['id'].'s\" value=\"'.$saved_value.'\" /></div>';\n\t\t\techo '<textarea style=\"display:none;\" name=\"'.$field['id'].'s\" id=\"'.$field['id'].'s\">'.$saved_value.'</textarea></div>';\n\t\t\t$field_ids[]=$field['id'];\n\t\t\t$field_names[]=$field['name'];\n\t\t}\n\t\t\n\t\t//print the add button\n\t\techo '<a class=\"hana-button custom-option-button\" id=\"'.$value['id'].'_button\"><span>'.$value['button_text'].'</span></a>';\n\t\t\n\t\t//print the list that will contain the added items\n\t\techo '<ul id=\"'.$value['id'].'_list\" class=\"sortable\"></ul>';\n\t\t\n\t\t$idsString=implode('\",\"', $field_ids);\n\t\t$namesString=implode('\",\"', $field_names);\n\t\t$textareaString=implode(',', $is_textarea);\n\t\t\n\t\t//call the script that enables the functionality for adding custom fields\n\t\techo '<script type=\"text/javascript\">\n\t\t\tjQuery(document).ready(function($){\n\t\t\t\thanaOptions.setCustomFieldsFunc(\"'.$value['id'].'\", [\"'.$idsString.'\"], [\"'.$namesString.'\"], ['.$textareaString.'] , \"'.((isset($value['preview']))?$value['preview']:'').'\", \"'.HANA_TIMTHUMB_URL.'\");\n\t\t\t});\n\t\t</script>';\n\t\t\n\t\t$this->close_option($value);\n\t}", "function updateOption($caption,$value,$type,$db) {\r\n//\t$res=mysql_query($sql,$db);\r\n\r\n}", "function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options = \\false)\n {\n }", "public function initDefaultOptions()\n {\n $this->clear();\n\n $ddlContent = trim($this->_controlDefinition->content);\n\n if (!$ddlContent) return false;\n\n /**\n * Matching options\n */\n preg_match_all(\"/<option([^\\>]+)>([^\\<]*)/x\", $ddlContent, $matches, PREG_PATTERN_ORDER);\n\n if (isset($matches[1]) && count($matches[1]))\n {\n foreach ($matches[1] as $index => $attributesString)\n {\n $attributesList = PHP2_UI_ControlDefinition::parseAttributesString($attributesString);\n\n foreach ($attributesList as $key => &$value) $attributesList[strtolower($key)] = $value;\n\n if (isset($attributesList['value']))\n {\n $this->insertItem($attributesList['value'], trim($matches[2][$index]));\n\n if (isset($attributesList['selected']) && (strtolower($attributesList['selected']) == 'true')) $this->setSelectedIndex($attributesList['value']);\n }\n }\n }\n }", "public function get_options(){\n $this->options = [\n 'items' => get_post_meta( $this->ID, 'opt_items' ),\n 'margin' => get_post_meta( $this->ID, 'opt_margin' ),\n 'loop' => get_post_meta( $this->ID, 'opt_loop' ),\n 'nav' => get_post_meta( $this->ID, 'opt_nav' ),\n 'dots' => get_post_meta( $this->ID, 'opt_dots' ),\n 'autoplay' => get_post_meta( $this->ID, 'opt_autoplay' ),\n 'autoplaySpeed' => get_post_meta( $this->ID, 'opt_autoplaySpeed' ),\n ];\n }", "public static function sanitize_option_arguments( $option = array() ) {\n\t\t$option = wp_parse_args( $option, array(\n\t\t\t// common arguments\n\t\t\t'type' => '',\n\t\t\t'id' => '',\n\t\t\t'title' => '',\n\t\t\t'class' => '',\n\t\t\t'css' => '',\n\t\t\t'default' => '',\n\t\t\t'desc' => '',\n\t\t) );\n\n\t\t// Sanitize fields\n\t\t$allowed_tags = array(\n\t\t\t'abbr' => array( 'title' => true ),\n\t\t\t'acronym' => array( 'title' => true ),\n\t\t\t'code' => true,\n\t\t\t'em' => true,\n\t\t\t'strong' => true,\n\t\t\t'a' => array(\n\t\t\t\t'href' => true,\n\t\t\t\t'title' => true,\n\t\t\t),\n\t\t);\n\n\t\t$option['desc'] = wp_kses( $option['desc'], $allowed_tags );\n\n\t\treturn $option;\n\t}", "function theme_options_validate( $input ) {\n\tglobal $select_options, $radio_options;\n\n\t// [header]\n\t$input['gacode'] = wp_filter_nohtml_kses( $input['gacode'] );\n\n\t// [footer] Year(s) and sitename in the copyright\n\t$input['copyrightyear'] = wp_filter_nohtml_kses( $input['copyrightyear'] );\n\t$input['copyrightname'] = wp_filter_nohtml_kses( $input['copyrightname'] );\n\n\t// Our checkbox value is either 0 or 1\n\tif ( ! isset( $input['option1'] ) )\n\t\t$input['option1'] = null;\n\t$input['option1'] = ( $input['option1'] == 1 ? 1 : 0 );\n\n\t// Say our text option must be safe text with no HTML tags\n\t$input['sometext'] = wp_filter_nohtml_kses( $input['sometext'] );\n\n\t// Our select option must actually be in our array of select options\n\tif ( ! array_key_exists( $input['selectinput'], $select_options ) )\n\t\t$input['selectinput'] = null;\n\n\t// Our radio option must actually be in our array of radio options\n\tif ( ! isset( $input['radioinput'] ) )\n\t\t$input['radioinput'] = null;\n\tif ( ! array_key_exists( $input['radioinput'], $radio_options ) )\n\t\t$input['radioinput'] = null;\n\n\t// Say our textarea option must be safe text with the allowed tags for posts\n\t$input['sometextarea'] = wp_filter_post_kses( $input['sometextarea'] );\n\n\treturn $input;\n}", "public function build_option_pages()\n\t{\n\t\tif (!current_user_can(BWP_MINIFY_CAPABILITY))\n\t\t\twp_die(__('You do not have sufficient permissions to access this page.'));\n\n\t\t$page = $_GET['page'];\n\t\t$active_page = '';\n\n\t\t$original_options = $this->options;\n\t\t$bwp_option_page = new BWP_OPTION_PAGE($page, $this->site_options);\n\n\t\t// Get option from the database, general options are used for both\n\t\t// 'General Options' page and 'Manage enqueued' page\n\t\tif (BWP_MINIFY_OPTION_GENERAL == $page || BWP_MINIFY_MANAGE == $page)\n\t\t{\n\t\t\t$active_page = BWP_MINIFY_OPTION_GENERAL;\n\t\t\t$options = $bwp_option_page->get_db_options(\n\t\t\t\t$active_page,\n\t\t\t\t$bwp_option_page->get_options(array(\n\t\t\t\t\t'input_minurl',\n\t\t\t\t\t'input_minpath',\n\t\t\t\t\t'input_cache_dir',\n\t\t\t\t\t'input_doc_root',\n\t\t\t\t\t'input_maxfiles',\n\t\t\t\t\t'input_maxage',\n\t\t\t\t\t'input_custom_buster',\n\t\t\t\t\t'enable_min_js',\n\t\t\t\t\t'enable_min_css',\n\t\t\t\t\t'enable_external_origin',\n\t\t\t\t\t'enable_bloginfo',\n\t\t\t\t\t'enable_css_bubble',\n\t\t\t\t\t'enable_cache_file_lock',\n\t\t\t\t\t'enable_debug',\n\t\t\t\t\t'select_buster_type',\n\t\t\t\t\t'select_time_type',\n\t\t\t\t\t'input_ignore',\n\t\t\t\t\t'input_header',\n\t\t\t\t\t'input_direct',\n\t\t\t\t\t'input_footer',\n\t\t\t\t\t'input_oblivion',\n\t\t\t\t\t'input_style_ignore',\n\t\t\t\t\t'input_style_direct',\n\t\t\t\t\t'input_style_oblivion',\n\t\t\t\t), $this->options)\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$active_page = BWP_MINIFY_OPTION_ADVANCED;\n\t\t\t$options = $bwp_option_page->get_db_options(\n\t\t\t\t$active_page,\n\t\t\t\t$bwp_option_page->get_options(array(\n\t\t\t\t\t'enable_fly_min',\n\t\t\t\t\t'input_fly_minpath',\n\t\t\t\t\t'input_nginx_config_file',\n\t\t\t\t\t'enable_cdn',\n\t\t\t\t\t'input_cdn_host',\n\t\t\t\t\t'input_cdn_host_js',\n\t\t\t\t\t'input_cdn_host_css',\n\t\t\t\t\t'select_cdn_ssl_type'\n\t\t\t\t), $this->options)\n\t\t\t);\n\t\t}\n\n\t\tif (!empty($page))\n\t\t{\n\t\t\tif ($page == BWP_MINIFY_OPTION_GENERAL)\n\t\t\t{\n\t\t\t\t$bwp_option_page->set_current_tab(1);\n\n\t\t\t\t// add two buttons to save and flush cache or to flush cache\n\t\t\t\t// right now we only support flushing by super admin, to be\n\t\t\t\t// improved in 1.3.x\n\t\t\t\tif (!self::is_normal_admin())\n\t\t\t\t\tadd_filter('bwp_option_submit_button', array($this, 'add_flush_cache_buttons'));\n\n\t\t\t\t$form = array(\n\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t'heading',\n\t\t\t\t\t\t'checkbox',\n\t\t\t\t\t\t'checkbox',\n\t\t\t\t\t\t'checkbox',\n\t\t\t\t\t\t'checkbox',\n\t\t\t\t\t\t'input',\n\t\t\t\t\t\t'input',\n\t\t\t\t\t\t'select',\n\t\t\t\t\t\t'heading',\n\t\t\t\t\t\t'input',\n\t\t\t\t\t\t'input',\n\t\t\t\t\t\t'input',\n\t\t\t\t\t\t'checkbox',\n\t\t\t\t\t\t'checkbox',\n\t\t\t\t\t\t'checkbox'\n\t\t\t\t\t),\n\t\t\t\t\t'item_labels' => array\n\t\t\t\t\t(\n\t\t\t\t\t\t__('Plugin Functionality', $this->domain),\n\t\t\t\t\t\t__('Minify JS files automatically?', $this->domain),\n\t\t\t\t\t\t__('Minify CSS files automatically?', $this->domain),\n\t\t\t\t\t\t__('Minify <code>bloginfo()</code> stylesheets?', $this->domain),\n\t\t\t\t\t\t__('Leave external files at their original positions?', $this->domain),\n\t\t\t\t\t\t__('URL path to Minify library (relative to domain root)', $this->domain),\n\t\t\t\t\t\t__('One minify string will contain', $this->domain),\n\t\t\t\t\t\t__('For cache buster, use', $this->domain),\n\t\t\t\t\t\t__('Minify Library Settings', $this->domain),\n\t\t\t\t\t\t__('WordPress document root', $this->domain),\n\t\t\t\t\t\t__('Cache directory', $this->domain),\n\t\t\t\t\t\t__('Cache age', $this->domain),\n\t\t\t\t\t\t__('Enable bubble CSS import?', $this->domain),\n\t\t\t\t\t\t__('Enable cache file locking?', $this->domain),\n\t\t\t\t\t\t__('Enable debugging?', $this->domain)\n\t\t\t\t\t),\n\t\t\t\t\t'item_names' => array(\n\t\t\t\t\t\t'h1',\n\t\t\t\t\t\t'cb1',\n\t\t\t\t\t\t'cb3',\n\t\t\t\t\t\t'cb2',\n\t\t\t\t\t\t'ext_origin',\n\t\t\t\t\t\t'input_minpath',\n\t\t\t\t\t\t'input_maxfiles',\n\t\t\t\t\t\t'select_buster_type',\n\t\t\t\t\t\t'h2',\n\t\t\t\t\t\t'input_doc_root',\n\t\t\t\t\t\t'input_cache_dir',\n\t\t\t\t\t\t'input_maxage',\n\t\t\t\t\t\t'cb4',\n\t\t\t\t\t\t'cb5',\n\t\t\t\t\t\t'cb6'\n\t\t\t\t\t),\n\t\t\t\t\t'heading' => array(\n\t\t\t\t\t\t'h1' => '',\n\t\t\t\t\t\t'h2' => '<a name=\"minify.config.php\"></a>' . sprintf(\n\t\t\t\t\t\t\t__('<em>These options will let you control how the actual '\n\t\t\t\t\t\t\t. '<a href=\"%s\" target=\"_blank\">Minify</a> library works.</em>', $this->domain),\n\t\t\t\t\t\t\t'https://code.google.com/p/minify/'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'select' => array(\n\t\t\t\t\t\t'select_time_type' => array(\n\t\t\t\t\t\t\t__('second(s)', $this->domain) => 1,\n\t\t\t\t\t\t\t__('minute(s)', $this->domain) => 60,\n\t\t\t\t\t\t\t__('hour(s)', $this->domain) => 3600,\n\t\t\t\t\t\t\t__('day(s)', $this->domain) => 86400\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'select_buster_type' => array(\n\t\t\t\t\t\t\t__('No cache buster', $this->domain) => 'none',\n\t\t\t\t\t\t\t__('Cache folder&#8217;s last modified time', $this->domain) => 'mtime',\n\t\t\t\t\t\t\t__('Your WordPress&#8217;s current version', $this->domain) => 'wpver',\n\t\t\t\t\t\t\t__('Your theme&#8217;s current version', $this->domain) => 'tver',\n\t\t\t\t\t\t\t__('A custom number', $this->domain) => 'custom'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'checkbox' => array(\n\t\t\t\t\t\t'cb1' => array(__('you can still use <code>bwp_minify()</code> helper function if you disable this.', $this->domain) => 'enable_min_js'),\n\t\t\t\t\t\t'cb3' => array(__('you can still use <code>bwp_minify()</code> helper function if you disable this.', $this->domain) => 'enable_min_css'),\n\t\t\t\t\t\t'cb2' => array(__('enable this for themes that use <code>bloginfo()</code> to print the main stylesheet (i.e. <code>style.css</code>). If you want to minify <code>style.css</code> with the rest of your css files, you must enqueue it.', $this->domain) => 'enable_bloginfo'),\n\t\t\t\t\t\t'ext_origin' => array(__('enable this to improve compatibility with plugins/themes that print external JS/CSS files directly, for e.g. <code>Simple Google Maps Short Code</code> plugin or <code>Avada</code> theme.', $this->domain) => 'enable_external_origin'),\n\t\t\t\t\t\t'cb4' => array(sprintf(__('move all <code>@import</code> rules in CSS files to the top. More info <a href=\"%s\" target=\"_blank\">here</a>.', $this->domain), $this->get_url('min_css_bubble')) => 'enable_css_bubble'),\n\t\t\t\t\t\t'cb5' => array(__('disable this if filesystem is NFS.', $this->domain) => 'enable_cache_file_lock'),\n\t\t\t\t\t\t'cb6' => array(sprintf(__('only enable this when minification does not work as expected. More info <a href=\"%s\" target=\"_blank\">here</a>.', $this->domain), $this->get_url('min_debug')) => 'enable_debug')\n\t\t\t\t\t),\n\t\t\t\t\t'input' => array(\n\t\t\t\t\t\t'input_minpath' => array(\n\t\t\t\t\t\t\t'size' => 55,\n\t\t\t\t\t\t\t'label' => '<br />' . sprintf(\n\t\t\t\t\t\t\t\t__('Leave empty to use default value, which is <code>%s</code>.<br />'\n\t\t\t\t\t\t\t\t. 'Please read <a href=\"%s#advanced_customization\" target=\"_blank\">here</a> '\n\t\t\t\t\t\t\t\t. 'to know how to properly modify this.', $this->domain),\n\t\t\t\t\t\t\t\t$this->get_default_min_path(), $this->plugin_url)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'input_doc_root' => array(\n\t\t\t\t\t\t\t'size' => 55,\n\t\t\t\t\t\t\t'label' => '<br />' . $this->_get_input_doc_root_label()\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'input_cache_dir' => array(\n\t\t\t\t\t\t\t'size' => 55,\n\t\t\t\t\t\t\t'label' => '<br />' . sprintf(\n\t\t\t\t\t\t\t\t__('Expect a full path to a publicly accessible directory '\n\t\t\t\t\t\t\t\t. '(i.e. can be served under your document root). <br />'\n\t\t\t\t\t\t\t\t. 'Leave empty to use default value, which is <code>%s</code>.<br />'\n\t\t\t\t\t\t\t\t. 'Cache directory must be writable '\n\t\t\t\t\t\t\t\t. '(i.e. CHMOD to 755 or 777). '\n\t\t\t\t\t\t\t\t. 'More details can be found '\n\t\t\t\t\t\t\t\t. '<a href=\"%s#minify_cache_directory\" target=\"_blank\">here</a>. ', $this->domain),\n\t\t\t\t\t\t\t\t$this->get_default_cache_dir(), $this->plugin_url)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'input_maxfiles' => array(\n\t\t\t\t\t\t\t'size' => 3,\n\t\t\t\t\t\t\t'label' => __('file(s) at most.', $this->domain)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'input_maxage' => array(\n\t\t\t\t\t\t\t'size' => 5,\n\t\t\t\t\t\t\t'label' => __('&mdash;', $this->domain)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'input_custom_buster' => array(\n\t\t\t\t\t\t\t'pre' => '<em>&rarr; /min/?f=file.js&#038;ver=</em> ',\n\t\t\t\t\t\t\t'size' => 12,\n\t\t\t\t\t\t\t'label' => '.',\n\t\t\t\t\t\t\t'disabled' => ' disabled=\"disabled\"'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'textarea' => array(\n\t\t\t\t\t\t'input_symlinks' => array(\n\t\t\t\t\t\t\t'cols' => 90,\n\t\t\t\t\t\t\t'rows' => 5\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'container' => array(\n\t\t\t\t\t\t'select_buster_type' => '<em><strong>' . __('Note', $this->domain) . ':</strong> '\n\t\t\t\t\t\t\t. __('Whenever a new cache buster is used, '\n\t\t\t\t\t\t\t. 'you are telling browsers to refresh cached JS and CSS files. '\n\t\t\t\t\t\t\t. 'This is particularly useful when source files have been changed, '\n\t\t\t\t\t\t\t. 'use this feature wisely.', $this->domain) . '</em>'\n\t\t\t\t\t),\n\t\t\t\t\t'inline_fields' => array(\n\t\t\t\t\t\t'input_maxage' => array(\n\t\t\t\t\t\t\t'select_time_type' => 'select'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'select_buster_type' => array(\n\t\t\t\t\t\t\t'input_custom_buster' => 'input'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'role' => array(\n\t\t\t\t\t\t'input_minpath' => 'superadmin',\n\t\t\t\t\t\t'h2' => 'superadmin',\n\t\t\t\t\t\t'input_doc_root' => 'superadmin',\n\t\t\t\t\t\t'input_cache_dir' => 'superadmin',\n\t\t\t\t\t\t'input_maxage' => 'superadmin',\n\t\t\t\t\t\t'select_time_type' => 'superadmin',\n\t\t\t\t\t\t'cb4' => 'superadmin',\n\t\t\t\t\t\t'cb5' => 'superadmin',\n\t\t\t\t\t\t'cb6' => 'superadmin'\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// Get a subset of the option array for this form\n\t\t\t\t$form_options = array(\n\t\t\t\t\t'input_minurl',\n\t\t\t\t\t'input_minpath',\n\t\t\t\t\t'input_cache_dir',\n\t\t\t\t\t'input_doc_root',\n\t\t\t\t\t'input_maxfiles',\n\t\t\t\t\t'input_maxage',\n\t\t\t\t\t'input_custom_buster',\n\t\t\t\t\t'enable_min_js',\n\t\t\t\t\t'enable_min_css',\n\t\t\t\t\t'enable_external_origin',\n\t\t\t\t\t'enable_bloginfo',\n\t\t\t\t\t'enable_css_bubble',\n\t\t\t\t\t'enable_cache_file_lock',\n\t\t\t\t\t'enable_debug',\n\t\t\t\t\t'select_buster_type',\n\t\t\t\t\t'select_time_type',\n\t\t\t\t);\n\n\t\t\t\t// Flush the cache\n\t\t\t\tif ((isset($_POST['flush_cache']) || isset($_POST['save_flush']))\n\t\t\t\t\t&& !self::is_normal_admin()\n\t\t\t\t) {\n\t\t\t\t\tcheck_admin_referer($page);\n\n\t\t\t\t\t$deleted = $this->_flush_cache();\n\t\t\t\t\tif (0 < $deleted)\n\t\t\t\t\t\t$this->add_notice(\n\t\t\t\t\t\t\t'<strong>' . __('Notice', $this->domain) . ':</strong> '\n\t\t\t\t\t\t\t. sprintf(\n\t\t\t\t\t\t\t\t__(\"<strong>%d</strong> cached files \"\n\t\t\t\t\t\t\t\t. \"have been deleted successfully!\", $this->domain),\n\t\t\t\t\t\t\t\t$deleted\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->add_notice(\n\t\t\t\t\t\t\t'<strong>' . __('Notice', $this->domain) . ':</strong> '\n\t\t\t\t\t\t\t. __(\"Could not delete any cached files. \"\n\t\t\t\t\t\t\t. \"Please manually flush the cache directory.\", $this->domain)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t// this should also clear all saved Minify groups\n\t\t\t\t\t$this->detector->clear_logs('group');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ($page == BWP_MINIFY_OPTION_ADVANCED)\n\t\t\t{\n\t\t\t\t$bwp_option_page->set_current_tab(2);\n\n\t\t\t\t$form = array(\n\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t'heading',\n\t\t\t\t\t\t'checkbox',\n\t\t\t\t\t\t'input',\n\t\t\t\t\t\t'input',\n\t\t\t\t\t\t'heading',\n\t\t\t\t\t\t'checkbox',\n\t\t\t\t\t\t'select',\n\t\t\t\t\t\t'input',\n\t\t\t\t\t\t'input',\n\t\t\t\t\t\t'input',\n\t\t\t\t\t\t'textarea'\n\t\t\t\t\t),\n\t\t\t\t\t'item_labels' => array(\n\t\t\t\t\t\t__('Friendly Minify Urls', $this->domain),\n\t\t\t\t\t\t__('Enable friendly Minify urls', $this->domain),\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t__('Friendly Minify url path (relative to '\n\t\t\t\t\t\t\t. 'your Site/Network Address). More info <a href=\"%s#friendly_minify_urls\" '\n\t\t\t\t\t\t\t. 'target=\"_blank\">here</a>.', $this->domain),\n\t\t\t\t\t\t\t$this->plugin_url\n\t\t\t\t\t\t),\n\t\t\t\t\t\t__('Path to Nginx config file', $this->domain),\n\t\t\t\t\t\t__('Content Delivery Network (CDN)', $this->domain),\n\t\t\t\t\t\t__('Enable CDN support', $this->domain),\n\t\t\t\t\t\t__('SSL support for CDN', $this->domain),\n\t\t\t\t\t\t__('CDN hostname (primary)', $this->domain),\n\t\t\t\t\t\t__('CDN hostname for JS files', $this->domain),\n\t\t\t\t\t\t__('CDN hostname for CSS files', $this->domain),\n\t\t\t\t\t\t__('Additional HTTP headers used with CDN', $this->domain)\n\t\t\t\t\t),\n\t\t\t\t\t'item_names' => array(\n\t\t\t\t\t\t'h1',\n\t\t\t\t\t\t'cb1',\n\t\t\t\t\t\t'input_fly_minpath',\n\t\t\t\t\t\t'input_nginx_config_file',\n\t\t\t\t\t\t'h2',\n\t\t\t\t\t\t'cb2',\n\t\t\t\t\t\t'select_cdn_ssl_type',\n\t\t\t\t\t\t'input_cdn_host',\n\t\t\t\t\t\t'input_cdn_host_js',\n\t\t\t\t\t\t'input_cdn_host_css'\n\t\t\t\t\t),\n\t\t\t\t\t'heading' => array(\n\t\t\t\t\t\t'h1' => '<em>' . sprintf(\n\t\t\t\t\t\t\t__('Turn long and ugly Minify urls with '\n\t\t\t\t\t\t\t. 'query variables (such as <code>%s</code>), '\n\t\t\t\t\t\t\t. 'into more friendly ones (e.g. <code>%s</code>). '\n\t\t\t\t\t\t\t. '', $this->domain),\n\t\t\t\t\t\t\ttrailingslashit($this->min_url)\n\t\t\t\t\t\t\t. '?f=path/to/script1.js,path/to/script2.js',\n\t\t\t\t\t\t\thome_url('path/to/cache/somestring.js')\n\t\t\t\t\t\t) . '</em>',\n\t\t\t\t\t\t'h2' => '<em>' . sprintf(\n\t\t\t\t\t\t\t__('Serve minified contents '\n\t\t\t\t\t\t\t. 'using a <a href=\"%s\" target=\"_blank\">CDN</a> to improve performance.', $this->domain),\n\t\t\t\t\t\t\t$this->get_url('wikipedia_cdn'))\n\t\t\t\t\t\t\t. '</em>'\n\t\t\t\t\t),\n\t\t\t\t\t'select' => array(\n\t\t\t\t\t\t'select_fly_serve_method' => array(\n\t\t\t\t\t\t\t__('WordPress', $this->domain) => 'wp',\n\t\t\t\t\t\t\t__('Server rewrite rules', $this->domain) => 'server'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'select_cdn_ssl_type' => array(\n\t\t\t\t\t\t\t__('Do not use SSL for CDN', $this->domain) => 'off',\n\t\t\t\t\t\t\t__('Use SSL when suitable', $this->domain) => 'on',\n\t\t\t\t\t\t\t__('Use protocol-relative URL', $this->domain) => 'less'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'checkbox' => array(\n\t\t\t\t\t\t'cb1' => array(\n\t\t\t\t\t\t\t__('for CDN support it is highly recommended that you enable this feature.', $this->domain) => 'enable_fly_min'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'cb2' => array(\n\t\t\t\t\t\t\t__('please make sure that your CDN is property setup before enabling this feature.', $this->domain) => 'enable_cdn'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'input' => array(\n\t\t\t\t\t\t'input_fly_minpath' => array(\n\t\t\t\t\t\t\t'size' => 55,\n\t\t\t\t\t\t\t'label' => $this->_get_input_fly_min_path_label()\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'input_nginx_config_file' => array(\n\t\t\t\t\t\t\t'size' => 55,\n\t\t\t\t\t\t\t'label' => '<br />' . sprintf(\n\t\t\t\t\t\t\t\t__('Expect a full path to your Nginx '\n\t\t\t\t\t\t\t\t. 'configuration file (e.g. <code>%s</code>). '\n\t\t\t\t\t\t\t\t. 'If none specified or the config file '\n\t\t\t\t\t\t\t\t. 'is not writable, you will have to manually update it. '\n\t\t\t\t\t\t\t\t. 'Alternatively, if you have a config file '\n\t\t\t\t\t\t\t\t. 'at <code>%s</code>, which is used by W3 Total Cache '\n\t\t\t\t\t\t\t\t. 'plugin, you can leave this field blank and '\n\t\t\t\t\t\t\t\t. 'BWP Minify will use that config file.', $this->domain),\n\t\t\t\t\t\t\t\t'/path/to/nginx.conf', $this->get_doc_root('nginx.conf')\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'input_cdn_host' => array(\n\t\t\t\t\t\t\t'size' => 40,\n\t\t\t\t\t\t\t'label' => '<br />' . sprintf(\n\t\t\t\t\t\t\t\t__('Use either hostnames provided by your '\n\t\t\t\t\t\t\t\t. 'CDN or custom ones. Please do NOT include '\n\t\t\t\t\t\t\t\t. 'the scheme (i.e. <code>http://</code> or <code>https://</code>). '\n\t\t\t\t\t\t\t\t. 'Good examples are: <code>%s</code>, <code>%s</code>, etc.', $this->domain),\n\t\t\t\t\t\t\t\t'yourzone.yourcdn.com', 'cdn.yourdomain.com'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'input_cdn_host_js' => array(\n\t\t\t\t\t\t\t'size' => 40,\n\t\t\t\t\t\t\t'label' => '&nbsp; ' . __('used when not empty.', $this->domain)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'input_cdn_host_css' => array(\n\t\t\t\t\t\t\t'size' => 40,\n\t\t\t\t\t\t\t'label' => '&nbsp; ' . __('used when not empty.', $this->domain)\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'textarea' => array(\n\t\t\t\t\t\t'input_cdn_headers' => array(\n\t\t\t\t\t\t\t''\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'container' => array(\n\t\t\t\t\t\t'cb2' => '<p style=\"margin-left:220px;\"><em>'\n\t\t\t\t\t\t\t. __('If you\\'re looking for a CDN, I highly recommend '\n\t\t\t\t\t\t\t. '<strong>MaxCDN</strong>. They provide the most reliable CDN service '\n\t\t\t\t\t\t\t. 'for WordPress sites. Support is exceptional and '\n\t\t\t\t\t\t\t. 'you got a 30-day Money Back Guarantee, too.', $this->domain)\n\t\t\t\t\t\t\t. '</em><br />'\n\t\t\t\t\t\t\t. '<a href=\"#\" target=\"_blank\" class=\"button-secondary\" style=\"margin-top:10px;\" '\n\t\t\t\t\t\t\t. 'onclick=\"this.href=\\'' . $this->get_url('aff_maxcdn') . '\\';\">'\n\t\t\t\t\t\t\t. __('Create a MaxCDN account today and save 25%</a>', $this->domain)\n\t\t\t\t\t\t\t. '</p>'\n\t\t\t\t\t),\n\t\t\t\t\t'post' => array(\n\t\t\t\t\t),\n\t\t\t\t\t'role' => array(\n\t\t\t\t\t\t'input_fly_minpath' => 'superadmin'\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t$form_options = array();\n\t\t\t}\n\t\t\telse if ($page == BWP_MINIFY_MANAGE)\n\t\t\t{\n\t\t\t\t$bwp_option_page->set_current_tab(3);\n\n\t\t\t\tremove_action('bwp_option_action_before_form', array($this, 'show_donation'), 12);\n\n\t\t\t\t// add a secondary button to clear enqueued file lists (both)\n\t\t\t\tadd_filter('bwp_option_submit_button', array($this, 'add_clear_enqueue_button'));\n\n\t\t\t\tif (isset($_POST['clear_enqueue']))\n\t\t\t\t{\n\t\t\t\t\tcheck_admin_referer($page);\n\n\t\t\t\t\t$this->detector->clear_logs('enqueue');\n\t\t\t\t\t$this->add_notice(\n\t\t\t\t\t\t__('Enqueued file lists have been cleared successfully. '\n\t\t\t\t\t\t. 'Try refreshing this page to see updated file lists.', $this->domain)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t$form = array(\n\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t'heading',\n\t\t\t\t\t\t'heading'\n\t\t\t\t\t),\n\t\t\t\t\t'item_labels' => array (\n\t\t\t\t\t\t__('Manage enqueued JS files', $this->domain),\n\t\t\t\t\t\t__('Manage enqueued CSS files', $this->domain)\n\t\t\t\t\t),\n\t\t\t\t\t'item_names' => array(\n\t\t\t\t\t\t'h1',\n\t\t\t\t\t\t'h2'\n\t\t\t\t\t),\n\t\t\t\t\t'heading' => array(\n\t\t\t\t\t\t'h1' => '<em>' . sprintf(\n\t\t\t\t\t\t\t__('Below you can find a list of enqueued JS files '\n\t\t\t\t\t\t\t. 'detected by this plugin. Press <strong>select</strong> and '\n\t\t\t\t\t\t\t. 'then choose to perform an appropriate action on selected JS file. '\n\t\t\t\t\t\t\t. 'You can also directly type in one script handle (<strong>NOT '\n\t\t\t\t\t\t\t. 'filename/script src</strong>) per line in the input field if '\n\t\t\t\t\t\t\t. 'you want. More info <a href=\"%s#manage_enqueued_files\" target=\"_blank\">here</a>.', $this->domain),\n\t\t\t\t\t\t\t$this->plugin_url\n\t\t\t\t\t\t) . '</em>',\n\t\t\t\t\t\t'h2' => '<em>' . sprintf(\n\t\t\t\t\t\t\t__('Below you can find a list of enqueued CSS files '\n\t\t\t\t\t\t\t. 'detected by this plugin. Press <strong>select</strong> and '\n\t\t\t\t\t\t\t. 'then choose to perform an appropriate action on selected CSS file. '\n\t\t\t\t\t\t\t. 'You can also directly type in one style handle (<strong>NOT '\n\t\t\t\t\t\t\t. 'filename/style src</strong>) per line in the input field if '\n\t\t\t\t\t\t\t. 'you want. More info <a href=\"%s#manage_enqueued_files\" target=\"_blank\">here</a>.', $this->domain),\n\t\t\t\t\t\t\t$this->plugin_url\n\t\t\t\t\t\t) . '</em>'\n\t\t\t\t\t),\n\t\t\t\t\t'container' => array(\n\t\t\t\t\t\t'h1' => $this->_show_enqueued_scripts(),\n\t\t\t\t\t\t'h2' => $this->_show_enqueued_styles(),\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// Get a subset of the option array for this form\n\t\t\t\t$form_options = array(\n\t\t\t\t\t'input_ignore',\n\t\t\t\t\t'input_header',\n\t\t\t\t\t'input_direct',\n\t\t\t\t\t'input_footer',\n\t\t\t\t\t'input_oblivion',\n\t\t\t\t\t'input_style_ignore',\n\t\t\t\t\t'input_style_direct',\n\t\t\t\t\t'input_style_oblivion',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$option_formats = array(\n\t\t\t'input_maxfiles' => 'int',\n\t\t\t'input_maxage' => 'int',\n\t\t\t'select_time_type' => 'int'\n\t\t);\n\n\t\t$option_super_admin = $this->site_options;\n\n\t\t// Get option from user input\n\t\tif ((isset($_POST['submit_' . $bwp_option_page->get_form_name()])\n\t\t\t|| (isset($_POST['save_flush']) && $page == BWP_MINIFY_OPTION_GENERAL\n\t\t\t\t&& !self::is_normal_admin()))\n\t\t\t&& isset($options) && is_array($options)\n\t\t) {\n\t\t\t// basic security check\n\t\t\tcheck_admin_referer($page);\n\n\t\t\tforeach ($options as $key => &$option)\n\t\t\t{\n\t\t\t\tif ((0 < sizeof($form_options) && !in_array($key, $form_options))\n\t\t\t\t\t|| (self::is_normal_admin() && in_array($key, $option_super_admin))\n\t\t\t\t) {\n\t\t\t\t\t// field not found in options assigned to current form\n\t\t\t\t\t// OR not a super admin, and this is a super-admin only setting\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (isset($_POST[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t// make sure inputs are in expected format\n\t\t\t\t\t\t$bwp_option_page->format_field($key, $option_formats);\n\t\t\t\t\t\t$option = trim(stripslashes($_POST[$key]));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!isset($_POST[$key])\n\t\t\t\t\t\t&& !isset($form['input'][$key]['disabled'])\n\t\t\t\t\t) {\n\t\t\t\t\t\t// checkbox, exclude disabled input\n\t\t\t\t\t\t$option = '';\n\t\t\t\t\t}\n\t\t\t\t\telse if (isset($option_formats[$key])\n\t\t\t\t\t\t&& 'int' == $option_formats[$key]\n\t\t\t\t\t\t&& ('' === $_POST[$key] || 0 > $_POST[$key])\n\t\t\t\t\t) {\n\t\t\t\t\t\t// expect integer but received empty string or negative integer\n\t\t\t\t\t\t$option = $this->options_default[$key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// update per-blog options\n\t\t\tupdate_option($active_page, $options);\n\n\t\t\t// if current user is super admin, allow him to update site-only\n\t\t\t// options - this is WPMS compatible\n\t\t\tif (!self::is_normal_admin())\n\t\t\t\tupdate_site_option($active_page, $options);\n\n\t\t\t// refresh the options property to include updated options\n\t\t\t$this->options = array_merge($this->options, $options);\n\n\t\t\t// success messages when settings are saved\n\t\t\tif ($page == BWP_MINIFY_MANAGE) {\n\t\t\t\t$this->detector->auto_detect();\n\t\t\t\t$this->add_notice(\n\t\t\t\t\t__('All positions have been saved. '\n\t\t\t\t\t. 'Try refreshing this page for updated file lists.', $this->domain)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$this->add_notice(__('All options have been saved.', $this->domain));\n\t\t\t}\n\n\t\t\t// take care of some custom POST actions when form is submitted,\n\t\t\t// when multisite is active, only do this when the user is a superadmin\n\t\t\tif ($page == BWP_MINIFY_OPTION_GENERAL)\n\t\t\t{\n\t\t\t\t// other actions for the general option page\n\t\t\t\tif ($original_options['enable_min_js'] != $this->options['enable_min_js']\n\t\t\t\t\t|| $original_options['enable_min_css'] != $this->options['enable_min_css']\n\t\t\t\t) {\n\t\t\t\t\t// @since 1.3.2 changed plugin functionality, clear the log\n\t\t\t\t\t$this->detector->clear_logs();\n\t\t\t\t}\n\n\t\t\t\tif (!self::is_normal_admin())\n\t\t\t\t{\n\t\t\t\t\t// try to save the Minify config file\n\t\t\t\t\t$result = $this->create_minify_config_file();\n\t\t\t\t\tif (true === $result)\n\t\t\t\t\t{\n\t\t\t\t\t\t// config file was successfully written\n\t\t\t\t\t\t$this->add_notice(sprintf(\n\t\t\t\t\t\t\t__('Minify config file <code>%s</code> '\n\t\t\t\t\t\t\t. 'has been updated successfully.', $this->domain),\n\t\t\t\t\t\t\t$this->min_dir . 'config.php'\n\t\t\t\t\t\t));\n\t\t\t\t\t}\n\t\t\t\t\telse if ('config' === $result)\n\t\t\t\t\t{\n\t\t\t\t\t\t// config file is missing\n\t\t\t\t\t\t$this->add_error(\n\t\t\t\t\t\t\t'<strong style=\"color:red\">' . __('Error') . ':</strong> '\n\t\t\t\t\t\t\t. sprintf(\n\t\t\t\t\t\t\t\t__('Minify config file <code>config.php</code> could not be found. '\n\t\t\t\t\t\t\t\t. 'The auto-detected directory to look for the config file is <code>%s</code>. '\n\t\t\t\t\t\t\t\t. 'Please manually check if that directory actually exists '\n\t\t\t\t\t\t\t\t. 'and contains the config file.', $this->domain),\n\t\t\t\t\t\t\t\t$this->get_doc_root($this->get_min_path())\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telse if ('put' === $result)\n\t\t\t\t\t{\n\t\t\t\t\t\t// the write process failed for some reasons\n\t\t\t\t\t\t$this->add_error(sprintf(\n\t\t\t\t\t\t\t'<strong style=\"color:red\">' . __('Error') . ':</strong> '\n\t\t\t\t\t\t\t. __('There was an error writing to Minify config file <code>%s</code>. '\n\t\t\t\t\t\t\t. 'Please try again.', $this->domain),\n\t\t\t\t\t\t\t$this->min_dir . 'config.php'\n\t\t\t\t\t\t));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// config file is not writable, show the auto-generated\n\t\t\t\t\t\t// contents to admin for manual update\n\t\t\t\t\t\t$this->add_notice(sprintf(\n\t\t\t\t\t\t\t'<strong>' . __('Notice', $this->domain) . ':</strong> '\n\t\t\t\t\t\t\t. __('Minify config file <code>%s</code> '\n\t\t\t\t\t\t\t. 'is not writable. See '\n\t\t\t\t\t\t\t. '<a href=\"#minify.config.php\">below</a> '\n\t\t\t\t\t\t\t. 'for details.', $this->domain),\n\t\t\t\t\t\t\t$this->min_dir . 'config.php'\n\t\t\t\t\t\t));\n\t\t\t\t\t\t$form['container']['h2'] = $this->_show_generated_config($result);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ($page == BWP_MINIFY_OPTION_ADVANCED)\n\t\t\t{\n\t\t\t\t// friendly minify url is turned on, add rewrite rules to\n\t\t\t\t// server directory config file (e.g. `.htaccess`). This should\n\t\t\t\t// not require WordPress's pretty permalink to be turned on\n\t\t\t\tif ('yes' != $original_options['enable_fly_min']\n\t\t\t\t\t&& 'yes' == $this->options['enable_fly_min']\n\t\t\t\t) {\n\t\t\t\t\t$this->_toggle_rewrite_rules($options, $form);\n\t\t\t\t} else if ('yes' == $original_options['enable_fly_min']\n\t\t\t\t\t&& 'yes' != $this->options['enable_fly_min']\n\t\t\t\t) {\n\t\t\t\t\t// remove the rules and flush cache if this setting is\n\t\t\t\t\t// turned off, ingore all error messages for now\n\t\t\t\t\t$this->_remove_rewrite_rules();\n\t\t\t\t\t$this->_flush_cache();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($page == BWP_MINIFY_OPTION_GENERAL)\n\t\t{\n\t\t\t// take care of non-POST actions when we're on General Options page\n\t\t\t// re-generate the buster string preview whenever buster type change\n\t\t\t$options['input_custom_buster'] = $this->get_buster($options['select_buster_type']);\n\t\t\tif ('custom' == $options['select_buster_type'])\n\t\t\t\tunset($form['input']['input_custom_buster']['disabled']);\n\n\t\t\t// warns admin that the cache directory does not exist or is not writable\n\t\t\tif (!self::is_normal_admin())\n\t\t\t{\n\t\t\t\t$cache_dir = $this->get_cache_dir();\n\t\t\t\tif (!file_exists($cache_dir))\n\t\t\t\t\t$this->add_notice(\n\t\t\t\t\t\t'<strong>' . __('Warning') . ':</strong> '\n\t\t\t\t\t\t. sprintf(\n\t\t\t\t\t\t\t__(\"Cache directory <code>%s</code> does not exist \"\n\t\t\t\t\t\t\t. \"and can not be created automatically. \"\n\t\t\t\t\t\t\t. \"Please manually create the cache folder \"\n\t\t\t\t\t\t\t. \"and make sure that it is writable \"\n\t\t\t\t\t\t\t. \"for Minify to perform more efficiently.\", $this->domain),\n\t\t\t\t\t\t\t$cache_dir\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\telse if (!is_writable($cache_dir))\n\t\t\t\t\t$this->add_notice(\n\t\t\t\t\t\t'<strong>' . __('Warning') . ':</strong> '\n\t\t\t\t\t\t. sprintf(\n\t\t\t\t\t\t\t__(\"Cache directory <code>%s</code> is not writable. \"\n\t\t\t\t\t\t\t. \"Please try CHMOD your cache directory to 755. \"\n\t\t\t\t\t\t\t. \"If you still see this warning, try CHMOD to 777.\", $this->domain),\n\t\t\t\t\t\t\t$cache_dir\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\telse if ($page == BWP_MINIFY_OPTION_ADVANCED)\n\t\t{\n\t\t\t// Also remove nginx config path if not on nginx server\n\t\t\tif (!self::is_nginx() || self::is_normal_admin())\n\t\t\t\t$bwp_option_page->kill_html_fields($form, array('input_nginx_config_file'));\n\n\t\t\t// Append rewrite rules to the form when fly min is enabled, only\n\t\t\t// for superadmin\n\t\t\tif ($this->options['enable_fly_min'] == 'yes' && !self::is_normal_admin())\n\t\t\t\t$this->_append_fly_rewrite_rules_to_form($form);\n\t\t}\n\n\t\t/* // check for rewrite rules if needed, suppress error */\n\t\t/* if ('yes' == $this->options['enable_fly_min']) */\n\t\t/* \t$this->_add_rewrite_rules(); */\n\n\t\t// Assign the form and option array\n\t\t$bwp_option_page->init($form, $options, $this->form_tabs);\n\n\t\t// Build the option page\n\t\techo $bwp_option_page->generate_html_form();\n\t}", "function tb_longwave_theme_validate_header_options( $input ) {\n\n\t// Create our array for storing the validated options\n\t$output = array();\n\t\n\t// Loop through each of the incoming options\n\tforeach( $input as $key => $value ) {\n\t\t\n\t\t// Check to see if the current option has a value. If so, process it.\n\t\tif( isset( $input[$key] ) ) {\n\t\t\n\t\t\t// Strip all HTML and PHP tags and properly handle quoted strings\n\t\t\t$output[$key] = strip_tags( stripslashes( $input[ $key ] ) );\n\t\t\t\n\t\t} // end if\n\t\t\n\t} // end foreach\n\t\n\t// Return the array processing any additional functions filtered by this action\n\treturn apply_filters( 'tb_longwave_theme_validate_header_options', $output, $input );\n\n}", "public function options_load();", "function update_options() {\n\t\tif ( get_current_blog_id() !== $this->options_blog_id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tupdate_option( $this->option_name, $this->options );\n\t}", "function news_options_page() {\r\n\r\n // variables for the field and option names \r\n $opt_name = 'mt_news_header';\r\n\t$opt_name_2 = 'mt_news_color';\r\n $opt_name_3 = 'mt_news_topic';\r\n\t$opt_name_4 = 'mt_news_number';\r\n $opt_name_6 = 'mt_news_plugin_support';\n $opt_name_7 = 'mt_news_description';\n $opt_name_8 = 'mt_news_dateyes';\r\n $hidden_field_name = 'mt_quotes_submit_hidden';\r\n $data_field_name = 'mt_news_header';\r\n\t$data_field_name_2 = 'mt_news_color';\r\n $data_field_name_3 = 'mt_news_topic';\r\n\t$data_field_name_4 = 'mt_news_number';\r\n $data_field_name_6 = 'mt_news_plugin_support';\n $data_field_name_7 = 'mt_news_description';\n $data_field_name_8 = 'mt_news_dateyes';\r\n\r\n // Read in existing option value from database\r\n $opt_val = get_option( $opt_name );\r\n\t$opt_val_2 = get_option( $opt_name_2 );\r\n $opt_val_3 = get_option( $opt_name_3 );\r\n\t$opt_val_4 = get_option( $opt_name_4 );\r\n $opt_val_6 = get_option($opt_name_6);\n $opt_val_7 = get_option($opt_name_7);\n $opt_val_8 = get_option($opt_name_8);\r\n\r\n // See if the user has posted us some information\r\n // If they did, this hidden field will be set to 'Y'\r\n if( $_POST[ $hidden_field_name ] == 'Y' ) {\r\n // Read their posted value\r\n $opt_val = $_POST[ $data_field_name ];\r\n\t\t$opt_val_2 = $_POST[ $data_field_name_2 ];\r\n $opt_val_3 = $_POST[ $data_field_name_3 ];\r\n\t\t$opt_val_4 = $_POST[ $data_field_name_4 ];\r\n $opt_val_6 = $_POST[$data_field_name_6];\n $opt_val_7 = $_POST[$data_field_name_7];\n $opt_val_8 = $_POST[$data_field_name_8];\r\n\r\n // Save the posted value in the database\r\n update_option( $opt_name, $opt_val );\r\n\t\tupdate_option( $opt_name_2, $opt_val_2 );\r\n update_option( $opt_name_3, $opt_val_3 );\r\n\t\tupdate_option( $opt_name_4, $opt_val_4 );\r\n update_option( $opt_name_6, $opt_val_6 );\n update_option( $opt_name_7, $opt_val_7 ); \n update_option( $opt_name_8, $opt_val_8 ); \r\n\r\n // Put an options updated message on the screen\r\n\r\n?>\r\n<div class=\"updated\"><p><strong><?php _e('Options saved.', 'mt_trans_domain' ); ?></strong></p></div>\r\n<?php\r\n\r\n }\r\n\r\n // Now display the options editing screen\r\n\r\n echo '<div class=\"wrap\">';\r\n\r\n // header\r\n\r\n echo \"<h2>\" . __( 'News Plugin Options', 'mt_trans_domain' ) . \"</h2>\";\n\necho \"<strong>Enter [news] into your posts or pages to insert news!</strong>\";\n\r\n$blog_url_feedback=get_bloginfo('url');\r\n\r\n // options form\r\n \r\n $change4 = get_option(\"mt_news_plugin_support\");\r\n\r\nif ($change4==\"Yes\" || $change4==\"\") {\r\n$change4=\"checked\";\r\n$change41=\"\";\r\n} else {\r\n$change4=\"\";\r\n$change41=\"checked\";\r\n}\n\n $change5 = get_option(\"mt_news_description\");\r\n\r\nif ($change5==\"Yes\") {\r\n$change5=\"checked\";\r\n$change51=\"\";\r\n} else {\r\n$change5=\"\";\r\n$change51=\"checked\";\r\n}\n\n $change6 = get_option(\"mt_news_dateyes\");\r\n\r\nif ($change6==\"Yes\") {\r\n$change6=\"checked\";\r\n$change61=\"\";\r\n} else {\r\n$change6=\"\";\r\n$change61=\"checked\";\r\n}\r\n ?>\r\n\t\r\n<form name=\"form1\" method=\"post\" action=\"\">\r\n<input type=\"hidden\" name=\"<?php echo $hidden_field_name; ?>\" value=\"Y\">\r\n\r\n<p><?php _e(\"News Widget Title\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name; ?>\" value=\"<?php echo $opt_val; ?>\" size=\"50\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"News Category:\", 'mt_trans_domain' ); ?> \r\n<select name=\"<?php echo $data_field_name_3; ?>\">\r\n<option value=\"topstories\">Top News</option>\r\n<option value=\"world\">World</option>\r\n<option value=\"europe\">Europe</option>\r\n<option value=\"china\">China</option>\r\n<option value=\"india\">India</option>\r\n<option value=\"asia\">Asia</option>\r\n<option value=\"oceania\">Oceania</option>\r\n<option value=\"africa\">Africa</option>\r\n<option value=\"us\">United States</option>\r\n<option value=\"britain\">Britain</option>\r\n<option value=\"business\">Business</option>\r\n<option value=\"tech\">Technology</option>\r\n<option value=\"politics\">Politics</option>\r\n<option value=\"health\">Health</option>\r\n<option value=\"sports\">Sports</option>\r\n<option value=\"entertainment\">Entertainment</option>\r\n<option value=\"oddlyenough\">Odd News</option>\r\n</select>\r\n</p><hr />\r\n\r\n<p><?php _e(\"Number of News items\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_4; ?>\" value=\"<?php echo $opt_val_4; ?>\" size=\"3\">\r\n</p><hr />\n\n<p><?php _e(\"Show News Descriptions?\", 'mt_trans_domain' ); ?> \r\n<input type=\"radio\" name=\"<?php echo $data_field_name_7; ?>\" value=\"Yes\" <?php echo $change5; ?>>Yes\r\n<input type=\"radio\" name=\"<?php echo $data_field_name_7; ?>\" value=\"No\" <?php echo $change51; ?> >No\r\n</p><hr />\n\n<p><?php _e(\"Show Date of Publishing?\", 'mt_trans_domain' ); ?> \r\n<input type=\"radio\" name=\"<?php echo $data_field_name_8; ?>\" value=\"Yes\" <?php echo $change6; ?>>Yes\r\n<input type=\"radio\" name=\"<?php echo $data_field_name_8; ?>\" value=\"No\" <?php echo $change61; ?> >No\r\n</p><hr />\r\n\r\n<p><?php _e(\"Font Color:\", 'mt_trans_domain' ); ?> \r\n#<input size=\"7\" name=\"<?php echo $data_field_name_2; ?>\" value=\"<?php echo $opt_val_2; ?>\">\r\n(For help, go to <a href=\"http://html-color-codes.com/\">HTML Color Codes</a>).\r\n</p><hr />\r\n\r\n<p><?php _e(\"Support the Plugin?\", 'mt_trans_domain' ); ?> \r\n<input type=\"radio\" name=\"<?php echo $data_field_name_6; ?>\" value=\"Yes\" <?php echo $change4; ?>>Yes\r\n<input type=\"radio\" name=\"<?php echo $data_field_name_6; ?>\" value=\"No\" <?php echo $change41; ?> >No\r\n</p><hr />\r\n\r\n<p class=\"submit\">\r\n<input type=\"submit\" name=\"Submit\" value=\"<?php _e('Update Options', 'mt_trans_domain' ) ?>\" />\r\n</p><hr />\r\n\r\n</form>\r\n<?php\r\n}", "public function theme_options($options){\n\n\t\t$options[] = array(\n\t\t\t'name' => 'Legal Information',\n\t\t\t'desc' => '',\n\t\t\t'type' => 'info'\n\t\t);\n\t\t$options[] = array(\n\t\t\t'name' => __( 'Company Name', 'waboot' ),\n\t\t\t'desc' => __( '[wb_legal_name]', 'waboot' ),\n\t\t\t'id' => $this->name.'_company_name',\n\t\t\t'std' => '',\n\t\t\t'type' => 'text'\n\t\t);\n\t\t$options[] = array(\n\t\t\t'name' => __( 'Company Address', 'waboot' ),\n\t\t\t'desc' => __( '[wb_legal_address]', 'waboot' ),\n\t\t\t'id' => $this->name.'_address',\n\t\t\t'std' => '',\n\t\t\t'type' => 'text',\n\t\t);\n\t\t$options[] = array(\n\t\t\t'name' => __( 'Company Mail', 'waboot' ),\n\t\t\t'desc' => __( '[wb_legal_mail]', 'waboot' ),\n\t\t\t'id' => $this->name.'_mail',\n\t\t\t'std' => '',\n\t\t\t'type' => 'text'\n\t\t);\n\t\t$options[] = array(\n\t\t\t'name' => __( 'Company Telephone', 'waboot' ),\n\t\t\t'desc' => __( '[wb_legal_tel]', 'waboot' ),\n\t\t\t'id' => $this->name.'_tel',\n\t\t\t'std' => '',\n\t\t\t'type' => 'text'\n\t\t);\n\t\t$options[] = array(\n\t\t\t'name' => __( 'Domain Name', 'waboot' ),\n\t\t\t'desc' => __( '[wb_legal_siteurl]', 'waboot' ),\n\t\t\t'id' => $this->name.'_siteurl',\n\t\t\t'std' => preg_replace('/http:\\/\\//', '', get_bloginfo('url') ),\n\t\t\t'type' => 'text'\n\t\t);\n\t\t$options[] = array(\n\t\t\t'name' => __( 'Legal Representative', 'waboot' ),\n\t\t\t'desc' => __( '[wb_legal_rep]', 'waboot' ),\n\t\t\t'id' => $this->name.'_rep',\n\t\t\t'std' => '',\n\t\t\t'type' => 'text'\n\t\t);\n\n\t\treturn $options;\n\t}", "public static function getOldVersionOptions(){\n\n\t\t$options = WordpressConnect::getDefaultOptions();\n\n\t\t// general options\n\t\t$language = get_option( WPC_OPTIONS_LANGUAGE );\n\t\tif ( $language !== FALSE ){\n\t\t\t$options[ WPC_OPTIONS ][ WPC_OPTIONS_LANGUAGE ] = $language; \n\t\t\tdelete_option( WPC_OPTIONS_LANGUAGE ); \n\t\t}\n\n\t\t$app_id = get_option( WPC_OPTIONS_APP_ID );\n\t\tif ( $app_id !== FALSE ){ \n\t\t\t$options[ WPC_OPTIONS ][ WPC_OPTIONS_APP_ID ] = $app_id;\n\t\t\tdelete_option( WPC_OPTIONS_APP_ID ); \n\t\t}\n\n\t\t$app_admins = get_option( WPC_OPTIONS_APP_ADMINS );\n\t\tif ( $app_admins !== FALSE ){ \n\t\t\t$options[ WPC_OPTIONS ][ WPC_OPTIONS_APP_ADMINS ] = $app_admins;\n\t\t\tdelete_option( WPC_OPTIONS_APP_ADMINS ); \n\t\t}\n\n\t\t$image = get_option( WPC_OPTIONS_IMAGE_URL );\n\t\tif ( $image !== FALSE ){ \n\t\t\t$options[ WPC_OPTIONS ][ WPC_OPTIONS_IMAGE_URL ] = $image;\n\t\t\tdelete_option( WPC_OPTIONS_IMAGE_URL ); \n\t\t}\n\n\t\t$description = get_option( WPC_OPTIONS_DESCRIPTION );\n\t\tif ( $description !== FALSE ){\n\t\t\t$options[ WPC_OPTIONS ][ WPC_OPTIONS_DESCRIPTION ] = $description;\n\t\t\tdelete_option( WPC_OPTIONS_DESCRIPTION ); \n\t\t}\n\n\t\t// comments\n\n\t\t$comments_number = get_option( WPC_OPTIONS_COMMENTS_NUMBER );\n\t\tif ( $comments_number !== FALSE && is_int( $comments_number ) ){\n\t\t\t$options[ WPC_OPTIONS_COMMENTS ][ WPC_OPTIONS_COMMENTS_NUMBER ] = $comments_number;\n\t\t\tdelete_option( WPC_OPTIONS_COMMENTS_NUMBER );\n\t\t}\n\n\t\t$comments_width = get_option( WPC_OPTIONS_COMMENTS_WIDTH );\n\t\tif ( $comments_width !== FALSE && is_int( $comments_width ) ){\n\t\t\t$options[ WPC_OPTIONS_COMMENTS ][ WPC_OPTIONS_COMMENTS_WIDTH ] = $comments_width;\n\t\t\tdelete_option( WPC_OPTIONS_COMMENTS_WIDTH );\n\t\t}\n\n\t\t$comments_display_homepage = get_option( WPC_OPTIONS_COMMENTS_SHOW_ON_HOMEPAGE );\n\t\tif ( $comments_display_homepage !== FALSE && !empty( $comments_display_homepage ) ){\n\t\t\t$options[ WPC_OPTIONS_COMMENTS ][ WPC_OPTIONS_DISPLAY_HOMEPAGE ] = 'on';\n\t\t}\n\t\telse { $options[ WPC_OPTIONS_COMMENTS ][ WPC_OPTIONS_DISPLAY_HOMEPAGE ] = ''; }\n\t\tdelete_option( WPC_OPTIONS_COMMENTS_SHOW_ON_HOMEPAGE );\n\n\t\t$comments_display_categories = get_option( WPC_OPTIONS_COMMENTS_SHOW_ON_CATEGORIES );\n\t\tif ( $comments_display_homepage !== FALSE && !empty( $comments_display_homepage ) ){\n\t\t\t$options[ WPC_OPTIONS_COMMENTS ][ WPC_OPTIONS_DISPLAY_CATEGORIES ] = 'on';\n\t\t}\n\t\telse { $options[ WPC_OPTIONS_COMMENTS ][ WPC_OPTIONS_DISPLAY_CATEGORIES ] = ''; }\n\t\tdelete_option( WPC_OPTIONS_COMMENTS_SHOW_ON_CATEGORIES );\n\t\t\n\t\t// like button\n\n\t\t$like_layout = get_option( WPC_OPTIONS_LIKE_BUTTON_LAYOUT );\n\t\tif ( $like_layout !== FALSE ){ \n\t\t\t$options[ WPC_OPTIONS_LIKE_BUTTON ][ WPC_OPTIONS_LIKE_BUTTON_LAYOUT ] = $like_layout; \n\t\t\tdelete_option( WPC_OPTIONS_LIKE_BUTTON_LAYOUT );\n\t\t}\n\n\t\t$like_width = get_option( WPC_OPTIONS_LIKE_BUTTON_WIDTH );\n\t\tif ( $like_width !== FALSE && is_int( $like_width ) ){\n\t\t\t$options[ WPC_OPTIONS_LIKE_BUTTON ][ WPC_OPTIONS_COMMENTS_WIDTH ] = $like_width;\n\t\t\tdelete_option( WPC_OPTIONS_LIKE_BUTTON_WIDTH );\n\t\t}\n\n\t\t$like_show_faces = get_option( WPC_OPTIONS_LIKE_BUTTON_SHOW_FACES );\n\t\tif ( $like_show_faces !== FALSE && !empty( $like_show_faces ) ){\n\t\t\t$options[ WPC_OPTIONS_LIKE_BUTTON ][ WPC_OPTIONS_LIKE_BUTTON_FACES ] = WPC_OPTION_ENABLED;\n\t\t}\n\t\telse { $options[ WPC_OPTIONS_LIKE_BUTTON ][ WPC_OPTIONS_LIKE_BUTTON_FACES ] = WPC_OPTION_DISABLED; }\n\t\tdelete_option( WPC_OPTIONS_LIKE_BUTTON_SHOW_FACES );\n\t\t\n\t\t$like_verb = get_option( WPC_OPTIONS_LIKE_BUTTON_VERB );\n\t\tif ( $like_verb !== FALSE ){\n\t\t\t$options[ WPC_OPTIONS_LIKE_BUTTON ][ WPC_OPTIONS_LIKE_BUTTON_VERB ] = $like_verb;\n\t\t\tdelete_option( WPC_OPTIONS_LIKE_BUTTON_VERB );\n\t\t}\n\n\t\t$like_font = get_option( WPC_OPTIONS_LIKE_BUTTON_FONT );\n\t\tif ( $like_font !== FALSE ){\n\t\t\t$options[ WPC_OPTIONS_LIKE_BUTTON ][ WPC_OPTIONS_LIKE_BUTTON_FONT ] = $like_font;\n\t\t\tdelete_option( WPC_OPTIONS_LIKE_BUTTON_FONT );\n\t\t}\n\n\t\t$like_display_homepage = get_option( WPC_OPTIONS_LIKE_BUTTON_SHOW_ON_HOMEPAGE );\n\t\tif ( $like_display_homepage !== FALSE && !empty( $like_display_homepage ) ){\n\t\t\t$options[ WPC_OPTIONS_LIKE_BUTTON ][ WPC_OPTIONS_DISPLAY_HOMEPAGE ] = 'on';\n\t\t}\n\t\telse { $options[ WPC_OPTIONS_LIKE_BUTTON ][ WPC_OPTIONS_DISPLAY_HOMEPAGE ] = ''; }\n\t\tdelete_option( WPC_OPTIONS_LIKE_BUTTON_SHOW_ON_HOMEPAGE );\n\n\n\t\t$like_display_categories = get_option( WPC_OPTIONS_LIKE_BUTTON_SHOW_ON_CATEGORIES );\n\t\tif ( $like_display_categories !== FALSE && !empty( $like_display_categories ) ){\n\t\t\t$options[ WPC_OPTIONS_LIKE_BUTTON ][ WPC_OPTIONS_DISPLAY_CATEGORIES ] = 'on';\n\t\t}\n\t\telse { $options[ WPC_OPTIONS_LIKE_BUTTON ][ WPC_OPTIONS_DISPLAY_CATEGORIES ] = ''; }\n\t\tdelete_option( WPC_OPTIONS_LIKE_BUTTON_SHOW_ON_CATEGORIES );\n\t\t\n\t\treturn $options;\n\n\t}", "public function processData(array $data, array $options = []);", "function getOptions() ;", "function tag_options($options)\n{\n $html = \"\";\n foreach ($options as $key => $value) {\n if ($key and $value) {\n $html .= \" \".htmlspecialchars($key).\"=\\\"\".\n htmlspecialchars($value).\"\\\"\";\n }\n }\n return $html;\n}", "function update_sss_options() {\n\t$sss_options = get_option('sss_plugin_options');\n\tif(!$sss_options)\n\t\t$sss_options = array();\n\t\n\tif ($_POST['sss_set_max_width']) { \n\t\t$safe_val_max_width = intval(addslashes(strip_tags($_POST['sss_set_max_width'])));\n\t\t$sss_options['max_width'] = $safe_val_max_width;\n\t}\n\telse\n\t\t$sss_options['max_width'] = 560;\n\tif ($_POST['sss_start_showing_from']) { \n\t\t$safe_val_start_showing_from = intval(addslashes(strip_tags($_POST['sss_start_showing_from'])));\n\t\t$sss_options['start_showing_from'] = $safe_val_start_showing_from;\n\t}\n\telse\n\t\t$sss_options['start_showing_from'] = 6;\n\tif ($_POST['sss_twitter_name']) { \n\t\t$safe_val_twitter_name = addslashes(strip_tags($_POST['sss_twitter_name']));\n\t\t$sss_options['twitter_name'] = $safe_val_twitter_name;\n\t}\n\telse\n\t\t$sss_options['twitter_name'] = '';\n\tif ($_POST['sss_story_source']) { \n\t\t$safe_val_story_source = addslashes(strip_tags($_POST['sss_story_source']));\n\t\t$sss_options['story_source'] = $safe_val_story_source;\n\t}\n\telse\n\t\t$sss_options['story_source'] = get_bloginfo('name');\n\tif ($_POST['sss_show_where']) { \n\t\t$safe_val_show_where = addslashes(strip_tags($_POST['sss_show_where']));\n\t\t$sss_options['show_where'] = $safe_val_show_where;\n\t}\n\telse\n\t\t$sss_options['show_where'] = 'both';\n\t\t\n\t// button selection settings\n\tif ($buttons_arr = $_POST['sss_which_buttons']) {\n\t\t$sss_options['which_buttons'] = array();\n\t\tforeach ($buttons_arr as $btn) {\n\t\t\tarray_push($sss_options['which_buttons'], addslashes(strip_tags($btn)));\n\t\t}\n\t}\n\telse\n\t\t$sss_options['which_buttons'] = array();\n\t\n\t//excluding IDs\n\tif ($_POST['sss_exclude_ids']) { \n\t\t$safe_val_exclude_ids = addslashes(strip_tags(preg_replace('/\\s+/', '', $_POST['sss_exclude_ids'])));\n\t\t$sss_exclude_ids = array();\n\t\t$sss_exclude_ids_temp = explode(',', $safe_val_exclude_ids);\n\t\tforeach($sss_exclude_ids_temp as $single_id)\n\t\t\tif(strlen($single_id) > 0 && intval($single_id) > 0)\n\t\t\t\tarray_push($sss_exclude_ids, intval($single_id));\n\t\t$sss_options['exclude_ids'] = array_unique($sss_exclude_ids);\n\t}\n\telse\n\t\t$sss_options['exclude_ids'] = array();\n\t\n\tif (update_option('sss_plugin_options', $sss_options)) {\n\t\techo '<div id=\"message\" class=\"updated fade\">';\n\t\techo '<p>Updated!</p>';\n\t\techo '</div>';\n\t} /*else {\n\t\techo '<div id=\"message\" class=\"error fade\">';\n\t\techo '<p>Unable to update. My bad.</p>';\n\t\techo '</div>';\n\t}*/\n}", "static function optionsIns();", "public function extractOptions()\n {\n if ($this->hasMultipleItems()) {\n $items = [];\n foreach ($this->productOptions as $productOption) {\n $id = $productOption->id;\n $text = $productOption->description;\n\n $item = [];\n $item[\"Variation\"] = new \\stdClass();\n $item[\"Variation\"]->text = $text;\n $item[\"Variation\"]->value = $id;\n $items[] = $item;\n }\n $this->options = $items;\n return true;\n } else {\n return false;\n }\n }", "public function updateOptions()\r\n {\r\n if ($_SERVER['REQUEST_METHOD'] !== 'POST')\r\n return;\r\n\r\n update_option('ohs_newsletter_sendgrid_api', $_POST['ohs_newsletter_sendgrid_api']);\r\n update_option('ohs_newsletter_sendgrid_list', $_POST['ohs_newsletter_sendgrid_list']);\r\n update_option('ohs_newsletter_redirect', $_POST['ohs_newsletter_redirect']);\r\n }", "function magictoolbox_WordPress_MagicScroll_parse_option_from_string($options) {\n $opt = array();\n\n $options = explode(\";\", $options);\n array_pop($options);\n\n foreach ($options as $value) {\n $value = trim($value);\n if (!empty($value)) {\n $value = explode(\":\", $value);\n // $opt[$value[0]] = trim($value[1]);\n $k = array_shift($value);\n $v = join(\":\",$value);\n $opt[$k] = trim($v);\n }\n }\n return $opt;\n}" ]
[ "0.6706519", "0.65817887", "0.6472633", "0.63472587", "0.62183225", "0.60298663", "0.60212594", "0.5983428", "0.59431577", "0.59103775", "0.5897899", "0.5882251", "0.58587086", "0.5757232", "0.5737027", "0.5729709", "0.5728416", "0.5723819", "0.571401", "0.56825066", "0.56808865", "0.56695855", "0.56695276", "0.56689894", "0.56576174", "0.56552774", "0.5628546", "0.561592", "0.5596629", "0.55802554", "0.5565976", "0.55528176", "0.5530639", "0.55292124", "0.5499349", "0.5488318", "0.54702604", "0.5460337", "0.54596007", "0.542601", "0.5425762", "0.5400821", "0.5400821", "0.54001874", "0.53995913", "0.5374146", "0.5363785", "0.53600425", "0.5357502", "0.53426445", "0.5337585", "0.53354156", "0.53351563", "0.53319657", "0.5329468", "0.5324262", "0.5322915", "0.53222406", "0.5318714", "0.53091913", "0.5302943", "0.5300501", "0.52939147", "0.52883476", "0.5286111", "0.52841616", "0.52754223", "0.5272117", "0.5271796", "0.52512383", "0.5245626", "0.5244549", "0.52439934", "0.52368754", "0.5235336", "0.5233508", "0.5226813", "0.522404", "0.5224034", "0.5221271", "0.5192389", "0.51821125", "0.5177579", "0.5169786", "0.5163839", "0.5157833", "0.51576173", "0.5155421", "0.5154274", "0.515243", "0.51504534", "0.514838", "0.5142913", "0.5141561", "0.51395833", "0.5138312", "0.51297045", "0.5127227", "0.51235443", "0.5122472" ]
0.58310205
13
Echo the widget or shortcode contents.
public function print_control( $options, $args = null ) { $options = $this->merge_options( $options ); if( !$args ) $args = $this->get_args(); extract( $options ); echo $args['before_widget']; echo '<div id="connections-search-control-'.self::$index.'" class="wscontrol connections-search-control">'; if( !empty($options['title']) ) echo $args['before_title'].$options['title'].$args['after_title']; ?> <form role="search" method="get" class="searchform" action="<?php echo esc_attr( site_url() ); ?>"> <div> <label class="screen-reader-text" for="s">Search for:</label> <input type="hidden" name="post_type" value="connection"> <div class="textbox_wrapper"> <input name="s" type="text" value="" placeholder="<?php echo esc_attr( $placeholder ); ?>" class="ui-autocomplete-input" autocomplete="off"> </div> <input type="submit" id="searchsubmit" value="Search"> </div> </form> <?php echo '</div>'; echo $args['after_widget']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function block($atts, $content) {\n $result = '';\n foreach (self::$_currentWidgets as $widget) {\n self::$_currentWidget = $widget;\n $result .= do_shortcode($content);\n self::$_currentWidget = null;\n }\n if ($result === '') {\n return $content;\n } else {\n return $result;\n }\n }", "function radium_bbpress_widget_area_content() {\n\n echo '<div class=\"widget widget_text\"><div class=\"widget-wrap\">';\n\n echo '<div class=\"section-title\"><h4 class=\"widget-title\">';\n __( 'Forum Sidebar Widget Area', 'newsfront-bbpress' );\n echo '</h4></div>';\n\n echo '<div class=\"textwidget\"><p>';\n printf( __( 'This is the Forum Sidebar Widget Area. You can add content to this area by visiting your <a href=\"%s\">Widgets Panel</a> and adding new widgets to this area.', 'newsfront-bbpress' ), admin_url( 'widgets.php' ) );\n echo '</p></div>';\n echo '</div></div>';\n\n }", "public function Show(){\n\t\techo(\"\n\t\t<div class='$this->claseCSS'>\n\t\t<div class='WidgetTitle'><a id='TitleBlock' href='$this->masURL'><div id='TitleText'>$this->Titulo</div></a></div>\n\t\t\t$this->Contenido\n\t\t\t<div class='footer'><a href='$this->masURL'>Ver m&aacute;s...</a></div>\n\t\t</div>\n\t\t\");\n\t}", "function display( array $atts , $content = '' ){\r\n\r\n ob_start();\r\n\r\n if( $atts['title'] && ! Better_Framework::widget_manager()->get_current_sidebar() && $atts['show_title'] ){\r\n $atts['element-type'] = $this->id;\r\n echo apply_filters( 'better-framework/shortcodes/title', $atts );\r\n }\r\n\r\n $height = 65;\r\n if( $atts['show_faces'] == true ){\r\n $height += 175;\r\n }\r\n if( $atts['show_posts'] == true ){\r\n $height += 350;\r\n }\r\n\r\n ?>\r\n <div class=\"bf-shortcode bf-shortcode-likebox style-<?php echo $atts['style']; ?>\">\r\n <div class=\"the-content\">\r\n <iframe src=\"https://www.facebook.com/plugins/likebox.php?href=<?php echo urlencode( $atts['url'] ) ?>&amp;width=270&amp;height=<?php echo $height; ?>&amp;show_faces=<?php echo $atts['show_faces']; ?>&amp;colorscheme=<?php echo $atts['style']; ?>&amp;stream=<?php echo $atts['show_posts']; ?>&amp;show_border=<?php echo $atts['show_border']; ?>&amp;header=<?php echo $atts['show_header']; ?>\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:100%; height:<?php echo $height; ?>px;\" allowTransparency=\"true\"></iframe>\r\n </div>\r\n </div>\r\n <?php\r\n\r\n return ob_get_clean();\r\n }", "protected function output() {\n\t\t$content = $this->option( 'content' );\n\t\t$content_path = $this->option( 'content_path' );\n\t\t$mmarkdown = $this->option( 'markdown' );\n\n\t\tif ( ! empty( $content_path ) && file_exists( $content_path ) ) {\n\t\t\twponion_catch_output();\n\t\t\tinclude $content_path;\n\t\t\t$content = wponion_catch_output( false );\n\t\t} elseif ( ! empty( $content ) && wponion_is_callable( $content ) ) {\n\t\t\twponion_catch_output();\n\t\t\techo wponion_callback( $content );\n\t\t\t$content = wponion_catch_output( false );\n\t\t}\n\n\t\tif ( true === $mmarkdown && ! empty( $content ) ) {\n\t\t\t$content = '<div class=\"wponion-markdown-output\">' . wponion_markdown( $content ) . '</div>';\n\t\t}\n\t\treturn $this->before() . do_shortcode( $content ) . $this->after();\n\t}", "public function widget( $args, $instace) {\n ?>\n <div id=\"ads-content\">\n <?php\n $googleadsensecode = '\n <script async src=\"//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\"></script>\n <ins class=\"adsbygoogle\"\n style=\"display:inline-block;width:728px;height:90px\"\n data-ad-client=\"ca-pub-9201441298846648\"\n data-ad-slot=\"9293704818\"></ins>\n <script>\n (adsbygoogle = window.adsbygoogle || []).push({});\n </script>\n ';\n echo $googleadsensecode;\n ?>\n </div>\n\n <?\n }", "function tc_epo_show_shortcode( $atts, $content = NULL ) {\n\textract( shortcode_atts( array(\n\t\t'action' => '',\n\t), $atts ) );\n\n\tob_start();\n\tdo_action( $action );\n\n\t$content = ob_get_contents();\n\tob_end_clean();\n\n\treturn $content;\n}", "public function render_content() {\n\t\t?>\n\t\t\t<input\n\t\t\t\tid=\"_customize-input-gutenberg_widget_blocks\"\n\t\t\t\ttype=\"hidden\"\n\t\t\t\tvalue=\"<?php echo esc_attr( $this->value() ); ?>\"\n\t\t\t\t<?php $this->link(); ?>\n\t\t\t/>\n\t\t<?php\n\t\tthe_gutenberg_widgets( 'gutenberg_customizer' );\n\t}", "function display( array $atts, $content = '' ) {\n\n\t\tob_start();\n\n\t\tpublisher_set_prop( 'shortcode-better-newsticker', $atts );\n\n\t\tpublisher_get_view( 'shortcodes', 'better-newsticker' );\n\n\t\tpublisher_clear_props();\n\t\tpublisher_clear_query();\n\n\t\treturn ob_get_clean();\n\t}", "function showIssuesEtcWidget()\n{\n echo(\"<div><br /><script type=\\\"text/javascript\\\" src=\\\"http://cdn.widgetserver.com/syndication/subscriber/InsertWidget.js\\\"></script><script type=\\\"text/javascript\\\">if (WIDGETBOX) WIDGETBOX.renderWidget('a36afb7b-c4ef-4f3d-b2fe-803a940666f8');</script>\n<noscript>Get the <a href=\\\"http://www.widgetbox.com/widget/issues-etc-button\\\">Issues, Etc. Button</a> widget and many other <a href=\\\"http://www.widgetbox.com/\\\">great free widgets</a> at <a href=\\\"http://www.widgetbox.com\\\">Widgetbox</a>! Not seeing a widget? (<a href=\\\"http://support.widgetbox.com/\\\">More info</a>)</noscript></div>\");\n}", "public function run_shortcode($content)\n {\n }", "public function run()\n\t{\n\t\t$this->renderContent();\n\t\t$content=ob_get_clean();\n\t\tif($this->hideOnEmpty && trim($content)==='')\n\t\t\treturn;\n\t\techo $content;\n\t}", "function sc_sidebar_content( $attr, $content ) {\n\t$content = do_shortcode( $content );\n\n\tob_start();\n\t?>\n\t<div class=\"page-sidebar-content\">\n\t\t<?php echo( $content ); ?>\n\t</div>\n\t<?php\n\treturn ob_get_clean();\n}", "function rad_widget_content(){\n\t//show an RSS feed\n\twp_widget_rss_output( 'http://wordpress.melissacabral.com/feed/', array(\n\t\t'items' \t\t=> 7,\n\t\t'show_summary' \t=> true,\n\t\t'show_date'\t\t=> true,\n\t\t'show_author'\t=> true,\n\t) );\n}", "public function add_shortcode_content() {\n\n //turn on output buffering to capture script output\n ob_start();\n\n $this->enqueue();\n echo \"<link rel=\\\"stylesheet\\\" href=\\\"https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css\\\" />\";\n echo \"<script src=\\\"https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js\\\"></script>\";\n\n //include the specified file\n require_once(\"$this->plugin_path/frontend/arena.php\");\n\n //assign the file output to $content variable and clean buffer\n $content = ob_get_clean();\n\n //return the $content\n //return is important for the output to appear at the correct position\n return $content;\n }", "public function widget( $args, $instance ) {\n echo $args['before_widget'];\n if ( ! empty( $instance['tmiContentId'] ) ) {\n\n $content = get_post($instance['tmiContentId']);\n if($content && $content->post_status == 'publish'){\n echo apply_filters( 'the_content', $content->post_content);\n }\n }\n\n echo $args['after_widget'];\n }", "public function run() {\r\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.widgets');\r\n\t\t$contents=ob_get_contents();\r\n\t\tob_end_clean();\r\n\t\tif($this->activeDataProvider === null) {\r\n\t\t\techo $contents;\r\n\t\t} else {\r\n\t\t\tif(($this->hideOnEmpty === true) && ($this->activeDataProvider->totalItemCount == 0)) {\r\n\t\t\t\techo $contents;\r\n\t\t\t} else {\r\n\t\t\t\t$this->render('TableWidget', array(\r\n\t\t\t\t\t'activeDataProvider' => $this->activeDataProvider,\r\n\t\t\t\t\t'fields' => $this->getFields(),\r\n\t\t\t\t\t'title' => $this->title,\r\n\t\t\t\t\t'pagination' => $this->enablePagination,\r\n\t\t\t\t\t'catalog' => $this->getCatalog(),\r\n\t\t\t\t\t'htmlOptions' => $this->htmlOptions,\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function display($data) {\n\t\t\tglobal $cfct_build;\t\t\t\n\t\t\n\t\t\t$cfct_build->loaded_modules[$this->basename] = $this->pluginPath;\n\t\t\t$cfct_build->module_paths[$this->basename] = $this->pluginPath;\n\t\t\t$cfct_build->module_urls[$this->basename] = $this->pluginUrl;\n\n\t\t\t$text = do_shortcode($data[$this->get_field_id('content')]);\n\t\t\treturn $this->load_view($data, compact('text'));\t\t\t\n\t\t}", "public function run()\n {\n return \\yii\\helpers\\Html::tag($this->container, $this->content, $this->getOptions());\n }", "function html5_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "function html5_shortcode_demo( $atts, $content = null ) {\n return '<div class=\"shortcode-demo\">' . do_shortcode( $content ) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "function oet_ajax_display_featured_content_block(){\n $shortcode = oet_featured_content_block_display($_POST['attributes'], true);\n echo wpautop(stripslashes($shortcode));\n die();\n}", "function mytheme_load_widget() {\n register_widget( 'mytheme_widget_text' );\n \n // Allow to execute shortcodes on mytheme_widget_text\n add_filter('mytheme_widget_text', 'do_shortcode');\n}", "function simple_dashboard_widget()\n{\n ?>\n <h2> simple dashboard widget </h2>\n <h3> Im learning wordpress development </h3>\n<?php\n\n}", "public function __invoke()\n {\n $content\n = <<<'EOT'\n<a href=\"https://twitter.com/share\" class=\"twitter-share-button\"\n data-lang=\"en\">Tweet</a>\n<script>\n !function(d,s,id){\n var js,fjs=d.getElementsByTagName(s)[0];\n if(!d.getElementById(id)){\n js=d.createElement(s);\n js.id=id;\n js.src=\"https://platform.twitter.com/widgets.js\";\n fjs.parentNode.insertBefore(js,fjs);\n }\n }(document,\"script\",\"twitter-wjs\");\n</script>\nEOT;\n\n return $content;\n }", "function widgetControlOutput( ) {\r\n\t\t\t$options = get_option( 'ILuvWalking.com Widget' );\r\n\t\t\tif( isset( $_POST[ \"iluvwalking-com-submit\" ] ) ) {\r\n\t\t\t\t$options[ 'title' ] = strip_tags( stripslashes( $_POST[ 'iluvwalking-com-title' ] ) );\r\n\t\t\t\t$options[ 'name' ] = strip_tags( stripslashes( $_POST[ 'iluvwalking-com-name' ] ) );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tupdate_option( 'ILuvWalking.com Widget', $options );\r\n\t\t\t\r\n\t\t\t$title = attribute_escape( $options[ 'title' ] );\r\n\t\t\t$name = attribute_escape( $options[ 'name' ] );\r\n\t\t\t\r\n\t\t\tinclude ( 'views/widget-control.php' );\r\n\t\t}", "public abstract function do_shortcode( $atts, $content, $tag );", "public function render_content() { ?>\n\t\t<label>\n\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t<div class=\"customize-control-content\">\n\t\t\t\t<textarea class=\"widefat\" cols=\"45\" rows=\"5\" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>\n\t\t\t</div>\n\t\t</label>\n\t<?php }", "function add_dashboard_widget_function() {\n\t// Entering the text between the quotes\n\techo \"<p>CUSTOM HTML WIDGET HERE</p>\";\n}", "public function render_content()\n\t\t{ ?>\n\t\t\t<label>\n <span class=\"customize-control-title\"><?php echo esc_html( $this->description ); ?></span>\n <p class=\"description\">\n <span class=\"typography-size-label\"><?php echo esc_html( $this->label ); ?></span>\n <span class=\"value\"><input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"slider-input\" />\n <span class=\"px\">px</span>\n </span>\n </p>\n </label>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}", "public function render_content() {\n\t\t\t?>\n\t\t\t<label>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<span class=\"description customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t</label>\n\t\t\t<div class=\"wds-customize-text-editor\">\n\t\t\t\t<?php\n\t\t\t\t// Setttings for the editor.\n\t\t\t\t$settings = array(\n\t\t\t\t\t'textarea_name' => $this->id,\n\t\t\t\t\t'textarea_rows' => 4,\n\t\t\t\t\t'media_buttons' => true,\n\t\t\t\t);\n\n\t\t\t\t// Add the editor.\n\t\t\t\twp_editor( $this->value(), $this->id, $settings );\n\n\t\t\t\t// Only enqueue scripts once.\n\t\t\t\tif ( 0 === self::$count ) {\n\t\t\t\t\t$this->enqueue_scripts();\n\t\t\t\t}\n\n\t\t\t\t// add the footer scripts.\n\t\t\t\t$this->add_footer_scripts();\n\n\t\t\t\t// Increment count.\n\t\t\t\t++self::$count;\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "function docuemtation_dashboard_widget_function() {\n\t// Display whatever it is you want to show\n\techo 'Make sure you watch the videos in 720p resolution.<br/>\n<a href=\"http://youtu.be/vA3fXuhbmjg\" target=\"_blank\">Welcome and Workflow</a> (1:32)<br/>\n<a href=\"http://youtu.be/1EYJ2xuJOB4\" target=\"_blank\">Resize Images</a> (3:55)<br/>\n<a href=\"http://youtu.be/KVGK5FKm-Ng\" target=\"_blank\">Upload Images to Dropbox</a> (1:10)<br/>\n<a href=\"http://youtu.be/g_XfK9iLv7s\" target=\"_blank\">The Dashboard</a> (3:53)<br/>\n<a href=\"http://youtu.be/ZntfnFEocn8\" target=\"_blank\">Writing and Saving a Draft</a> (6:10)<br/>\n<a href=\"http://youtu.be/vSx0xOQms78\" target=\"_blank\">Changing Post Status</a> (0:34)<br/>\n<a href=\"http://youtu.be/GZvMRQlP-9c\" target=\"_blank\">Upload to and Crop Images on Website</a> (5:46)<br/>\n<a href=\"http://youtu.be/zrBjk92WQB4\" target=\"_blank\">Publish Cat Profile</a> (1:12)<br/>\nCreate a PDF of profile (later, I have to make a few modifications first)';\n}", "public function add_shortcode_content(){\n\n //turn on output buffering to capture script output\n ob_start();\n\n $this->enqueue_frontend();\n $this->timepicker_style();\n\n //include the specified file\n require_once(\"$this->plugin_path/page-templates/questionnaire-template.php\");\n\n //assign the file output to $content variable and clean buffer\n $content = ob_get_clean();\n //return the $content\n //return is important for the output to appear at the correct position\n return $content; \n }", "public function render_content()\n\t\t{ ?>\n\t\t\t<label><p style=\"margin-bottom:0;\">\n <span class=\"customize-control-title\" style=\"margin:0;display:inline-block;\"><?php echo esc_html( $this->label ); ?>\n </span>\n <span class=\"value\">\n <input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() );?>\" class=\"slider-input\" />\n <span class=\"px\">px</span>\n </span></p></label> <?php // WPCS: XSS ok. ?>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}", "public function dashboard_widget_content() {\n\t\t$is_authed = ( MonsterInsights()->auth->is_authed() || MonsterInsights()->auth->is_network_authed() );\n\n\t\tif ( ! $is_authed ) {\n\t\t\t$this->widget_content_no_auth();\n\t\t} else {\n\t\t\tmonsterinsights_settings_error_page( 'monsterinsights-dashboard-widget', '', '0' );\n\t\t\tmonsterinsights_settings_inline_js();\n\t\t}\n\n\t}", "public function showContents() {\n\t\techo $this -> getContents();\n\t\texit ;\n\t}", "public function html()\n {\n $random_quote = $this->randomQuote();\n $cp_path = CP_ROUTE;\n return $this->view('widget', compact('random_quote','cp_path'))->render();\n }", "function uultra_edit_widget_content()\r\n\t{\r\n\t\t$html = '';\r\n\t\t\r\n\t\t$user_id = get_current_user_id();\t\t\r\n\t\t$widget_id = $_POST[\"widget_id\"];\r\n\t\t\r\n\t\t$custom_widgets = get_option('userultra_default_user_tabs');\r\n\t\t$widget = $custom_widgets[$widget_id];\r\n\t\t\r\n\t\t$widget_text = $widget[\"title\"];\r\n\t\t$uu_type = $widget[\"type\"];\r\n\t\t$uu_editable = $widget[\"editable\"];\r\n\t\t$uu_content = $widget[\"content\"];\r\n\t\t\r\n\t\t//check if custom text has been set for this widget\t\t\r\n\t\tif($uu_editable ==1 && $uu_type == 1) //this is a text widget that can be edited by the user\r\n\t\t{\r\n\t\t\t$custom_user_options = 'uultra_custom_user_widget_content_id_' .$widget_id;\t\t\t\r\n\t\t\t//check if uses has set a custom text\r\n\t\t\t$custom_text = get_user_meta($user_id, $custom_user_options, true);\r\n\t\t\t\r\n\t\t\tif($custom_text!=\"\")\r\n\t\t\t{\r\n\t\t\t\t$uu_content = $custom_text;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$html .= $uu_content;\r\n\t\techo $html;\r\n\t\tdie();\r\n\t\t\t\r\n\t}", "public function output_markup()\n\t\t{\t\t\t\n\t\t\techo $this->markup;\n\t\t\t\n\t\t}", "public function show_contents() {\n $inputs_array = $this->container->get_inputs_array();\n \n foreach( $inputs_array as $input_name => $input_value ) {\n $contents .= $inputs_array[ $input_name ]->render();\n }\n\n return $contents;\n }", "function widget( $args, $instance ) {\n extract( $args );\n\n /* Before widget (defined by themes). */\n echo $before_widget;\n\n echo $before_title . 'thunderstorm-stream' . $after_title;\n thunderstorm_stream_box();\n\n /* After widget (defined by themes). */\n echo $after_widget;\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}", "function add_shortcode_interface() {\n\tob_start();\n?>\n\t<a href=\"#TB_inline?width=600&height=700&inlineId=select-shortcode-form\" class=\"thickbox button\" id=\"add-shortcode\" title=\"Add Shortcode\">Add Shortcode</a>\n<?php\n\techo ob_get_clean();\n}", "function scoreboard_widget() {\r\n\r\n\techo\"<div class='widget'><h2>Scoreboard</h2><img src='http://www.bollywoodjalwa.com/cricket-widget.php'></div>\";\r\n\r\n}", "function sc_container( $attr, $content='' ) {\n\t$class = isset( $attr['class'] ) ? $attr['class'] : '';\n\tob_start();\n\t?>\n\t<div class=\"container <?php echo $class; ?>\">\n\t\t<?php echo do_shortcode( $content ); ?>\n\t</div>\n\t<?php\n\treturn ob_get_clean();\n}", "function genesis_execute_php_widgets( $html ) {\n\tif ( strpos( $html, \"<\" . \"?php\" ) !==false ) {\n\tob_start();\n\teval( \"?\".\">\".$html );\n\t$html=ob_get_contents();\n\tob_end_clean();\n\t\t}\n\treturn $html;\n}", "public function group_find_main_content_action() {\n\t\techo \\do_shortcode( '[elementor-template id=\"32840\"]' );\n\t\t// echo \"hello\";\n\t}", "abstract public function widget_markup( $args, $instance );", "public function render_content(){\n\t\t$theme = wp_get_theme();\n\t\t?>\n\t\t<p>\n\t\t\t<?php\n\t\t\tprintf(\n\t\t\t\t__( \"SiteOrigin Premium adds powerful features to %s. They'll save you time and make your site more professional.\", 'vantage' ),\n\t\t\t\t$theme->get( 'Name' )\n\t\t\t);\n\t\t\t?>\n\t\t</p>\n\t\t<a\n\t\t\thref=\"<?php echo esc_url( SiteOrigin_Settings::get_premium_url( ) ) ?>\"\n\t\t\tclass=\"button-primary so-premium-upgrade\"\n\t\t\ttarget=\"_blank\">\n\t\t\t<?php esc_html_e( 'Find Out More', 'vantage' ) ?>\n\t\t</a>\n\t\t<?php\n\t}", "public function render_content() {\n?>\n\t\t\t<label>\n <p style=\"margin-bottom:0;\">\n <span class=\"customize-control-title\" style=\"margin:0;display:inline-block;\"><?php echo esc_html( $this->label ); ?></span>\n <span class=\"value\">\n <input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"slider-input\" />\n </span>\n </p>\n </label>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}", "function shortcode() {\n\n ob_start();\n\n if ( is_user_logged_in() ) {\n $this->prepare_form();\n } else {\n printf( __( \"This page is restricted. Please %s to view this page.\", 'wpuf' ), wp_loginout( '', false ) );\n }\n\n $content = ob_get_contents();\n ob_end_clean();\n\n return $content;\n }", "public function render_content() {\n\t\t\t$allowed_html = array(\n\t\t\t\t'a' => array(\n\t\t\t\t\t'href' => array(),\n\t\t\t\t\t'title' => array(),\n\t\t\t\t\t'class' => array(),\n\t\t\t\t\t'target' => array(),\n\t\t\t\t),\n\t\t\t\t'br' => array(),\n\t\t\t\t'em' => array(),\n\t\t\t\t'strong' => array(),\n\t\t\t\t'i' => array(\n\t\t\t\t\t'class' => array(),\n\t\t\t\t),\n\t\t\t);\n\t\t\t?>\n\t\t\t<div class=\"single-accordion-custom-control\">\n\t\t\t\t<div class=\"single-accordion-toggle\"><?php echo esc_html( $this->label ); ?><span class=\"accordion-icon-toggle dashicons dashicons-plus\"></span></div>\n\t\t\t\t<div class=\"single-accordion customize-control-description\">\n\t\t\t\t\t<?php\n\t\t\t\t\tif ( is_array( $this->description ) ) {\n\t\t\t\t\t\techo '<ul class=\"single-accordion-description\">';\n\t\t\t\t\t\tforeach ( $this->description as $key => $value ) {\n\t\t\t\t\t\t\techo '<li>' . esc_attr( $key ) . wp_kses( $value, $allowed_html ) . '</li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo '</ul>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo wp_kses( $this->description, $allowed_html );\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function the_builder_content( $content ) {\n\t\t\t$content = apply_filters( 'make_the_builder_content', $content );\n\t\t\t$content = str_replace( ']]>', ']]&gt;', $content );\n\t\t\techo $content;\n\t\t}", "function widget( $args, $instance ) {\n\n\t\t// Output all wrappers\n\t\techo $args['before_widget'];\n\n\t\tif ( isset( $title ) && ! empty( $title ) ) {\n\t\t\techo $args['before_title'] . $title . $args['after_title'];\n\t\t}\n\n\t\t/*\n\t\t * Widget content here\n\t\t */\n\n\t\techo $args['after_widget'];\n\n\t}", "function widget($args, $instance)\r\n {\r\n\t\t\twp_enqueue_script('stackad');\r\n\r\n echo $args['before_widget'];\r\n \r\n // Display the title if provided\r\n $title = apply_filters('widget_title', $instance['title']);\r\n if($title != '')\r\n echo $args['before_title'] . $title . $args['after_title'];\r\n \r\n try\r\n {\r\n $this->GenerateHTML(\"meta.{$instance['site_domain']}\");\r\n }\r\n catch(Exception $e)\r\n {\r\n echo '<code>' . __('Error: ', 'stackad') . $e->getMessage() . '</code>';\r\n }\r\n \r\n echo $args['after_widget'];\r\n }", "public function render_content() { ?>\n\t\t\t<label>\n <p style=\"margin-bottom:0;\">\n <span class=\"customize-control-title\" style=\"margin:0;display:inline-block;\"><?php echo esc_html( $this->label ); ?></span>\n <span class=\"value\">\n <input name=\"<?php echo esc_attr( $this->id ); ?>\" type=\"text\" <?php $this->link(); ?> value=\"<?php echo esc_attr( $this->value() ); ?>\" class=\"slider-input\" />\n <span class=\"px\">&percnt;</span>\n </span>\n </p>\n </label>\n\t\t\t<div class=\"slider\"></div>\n\t\t<?php\n\t\t}", "public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"tinymce-control\">\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<textarea id=\"<?php echo esc_attr( $this->id ); ?>\" class=\"customize-control-tinymce-editor\" <?php $this->link(); ?>><?php echo esc_attr( $this->value() ); ?></textarea>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "function display( array $atts, $content = '' ) {\n\n\t\tob_start();\n\n\t\tpublisher_set_prop( 'shortcode-bs-dribbble-atts', $atts );\n\n\t\tpublisher_get_view( 'shortcodes', 'bs-dribbble' );\n\n\t\tpublisher_clear_props();\n\n\t\treturn ob_get_clean();\n\n\t}", "public function printContent()\n {\n echo $this->content;\n }", "function do_shortcode($content, $ignore_html = \\false)\n {\n }", "function add_shortcode( $atts, $content = null, $name = null ) {\n\n\t\tif ( ! $this->validate_shortcode( $atts, $content, $name ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$options = $this->set_options( $atts );\n\n\t\tob_start();\n\t\t\n\t\t?><div id=\"<?php echo esc_attr($options['selector']); ?>\" class=\"<?php echo esc_attr($options['classes']); ?>\" <?php do_action(\"oxygen_vsb_component_attr\", $options, $this->options['tag']); ?>><iframe scrolling=\"no\" frameborder=\"no\" src=\"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/<?php echo $options[\"soundcloud_track_id\"]; ?>&amp;color=<?php echo urlencode($options[\"soundcloud_color\"]); ?>&amp;auto_play=<?php echo urlencode($options[\"soundcloud_auto_play\"]); ?>&amp;hide_related=<?php echo urlencode($options[\"soundcloud_hide_related\"]); ?>&amp;show_comments=<?php echo urlencode($options[\"soundcloud_show_comments\"]); ?>&amp;show_user=true&amp;show_reposts=false&amp;show_teaser=true&amp;visual=true\"></iframe></div><?php\n\n\t\treturn ob_get_clean();\n\t}", "public function print_shortcodes_templates() {\n\n\t\tif ( did_action( 'toolset_action_require_shortcodes_templates_done' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t?>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-gui\">\n\t\t\t<input value=\"{{{data.shortcode}}}\" class=\"toolset-shortcode-gui-shortcode-handle js-toolset-shortcode-gui-shortcode-handle\" type=\"hidden\" />\n\t\t\t<# if ( _.has( data, 'parameters' ) ) {\n\t\t\t\t_.each( data.parameters, function( parameterValue, parameterKey ) {\n\t\t\t\t\t#>\n\t\t\t\t\t<span class=\"toolset-shortcode-gui-attribute-wrapper js-toolset-shortcode-gui-attribute-wrapper js-toolset-shortcode-gui-attribute-wrapper-for-{{{parameterKey}}}\" data-attribute=\"{{{parameterKey}}}\" data-type=\"parameter\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"{{{parameterKey}}}\" value=\"{{{parameterValue}}}\" disabled=\"disabled\" />\n\t\t\t\t\t</span>\n\t\t\t\t\t<#\n\t\t\t\t});\n\t\t\t} #>\n\t\t\t<div id=\"js-toolset-shortcode-gui-dialog-tabs\" class=\"toolset-shortcode-gui-tabs js-toolset-shortcode-gui-tabs\">\n\t\t\t<# if ( _.size( data.attributes ) > 1 ) { #>\n\t\t\t\t<ul class=\"js-toolset-shortcode-gui-tabs-list\">\n\t\t\t\t\t<# _.each( data.attributes, function( attributesGroup, groupKey ) { #>\n\t\t\t\t\t\t<# if (\n\t\t\t\t\t\t\t_.has( attributesGroup, 'fields' )\n\t\t\t\t\t\t\t&& _.size( attributesGroup.fields ) > 0\n\t\t\t\t\t\t) { #>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a href=\"#{{{data.shortcode}}}-{{{groupKey}}}\">{{{attributesGroup.header}}}</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t<# }); #>\n\t\t\t\t</ul>\n\t\t\t<# } #>\n\t\t\t\t<# _.each( data.attributes, function( attributesGroup, groupKey ) { #>\n\t\t\t\t\t<# if (\n\t\t\t\t\t\t_.has( attributesGroup, 'fields' )\n\t\t\t\t\t\t&& _.size( attributesGroup.fields ) > 0\n\t\t\t\t\t) { #>\n\t\t\t\t\t<div id=\"{{{data.shortcode}}}-{{{groupKey}}}\">\n\t\t\t\t\t\t<h2>{{{attributesGroup.header}}}</h2>\n\t\t\t\t\t\t<# _.each( attributesGroup.fields, function( attributeData, attributeKey ) {\n\t\t\t\t\t\t\tif ( _.has( data.templates, 'attributeWrapper' ) ) {\n\t\t\t\t\t\t\t\tattributeData = _.extend( { shortcode: data.shortcode, attribute: attributeKey, templates: data.templates }, attributeData );\n\t\t\t\t\t\t\t\tif ( 'group' == attributeData.type ) {\n\t\t\t\t\t\t\t\t\tprint( data.templates.attributeGroupWrapper( attributeData ) );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprint( data.templates.attributeWrapper( attributeData ) );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}); #>\n\t\t\t\t\t</div>\n\t\t\t\t\t<# } #>\n\t\t\t\t<# }); #>\n\t\t\t</div>\n\t\t\t<div class=\"toolset-shortcode-gui-messages js-toolset-shortcode-gui-messages\"></div>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-wrapper\">\n\t\t\t<#\n\t\t\t\tdata = _.defaults( data, { defaultValue: '', required: false, hidden: false, placeholder: '' } );\n\t\t\t\tdata = _.defaults( data, { defaultForceValue: data.defaultValue } );\n\t\t\t#>\n\t\t\t<div class=\"toolset-shortcode-gui-attribute-wrapper js-toolset-shortcode-gui-attribute-wrapper js-toolset-shortcode-gui-attribute-wrapper-for-{{{data.attribute}}}\" data-attribute=\"{{{data.attribute}}}\" data-type=\"{{{data.type}}}\" data-default=\"{{{data.defaultValue}}}\"<# if ( data.hidden ) { #> style=\"display:none\"<# } #>>\n\t\t\t\t<# if ( _.has( data, 'label' ) ) { #>\n\t\t\t\t\t<h3>{{{data.label}}}</h3>\n\t\t\t\t<# } #>\n\t\t\t\t<# if ( _.has( data, 'pseudolabel' ) ) { #>\n\t\t\t\t\t<strong>{{{data.pseudolabel}}}</strong>\n\t\t\t\t<# } #>\n\t\t\t\t<# if (\n\t\t\t\t\t_.has( data.templates, 'attributes' )\n\t\t\t\t\t&& _.has( data.templates.attributes, data.type )\n\t\t\t\t) {\n\t\t\t\t\tprint( data.templates.attributes[ data.type ]( data ) );\n\t\t\t\t} #>\n\t\t\t\t<# if ( _.has( data, 'description' ) ) { #>\n\t\t\t\t\t<p class=\"description\">{{{data.description}}}</p>\n\t\t\t\t<# } #>\n\t\t\t</div>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-group-wrapper\">\n\t\t\t<div class=\"toolset-shortcode-gui-attribute-group js-toolset-shortcode-gui-attribute-group js-toolset-shortcode-gui-attribute-group-for-{{{data.attribute}}}\" data-type=\"group\" data-group=\"{{{data.attribute}}}\"<# if ( data.hidden ) { #> style=\"display:none\"<# } #>>\n\t\t\t\t<# if ( _.has( data, 'label' ) ) { #>\n\t\t\t\t\t<h3>{{{data.label}}}</h3>\n\t\t\t\t<# } #>\n\t\t\t\t<#\n\t\t\t\tvar columns = _.size( data.fields ),\n\t\t\t\t\tcolumnsWidth = parseInt( 100 / columns );\n\t\t\t\t#>\n\t\t\t\t<ul class=\"toolset-shortcode-gui-dialog-item-group js-toolset-shortcode-gui-dialog-item-group\">\n\t\t\t\t\t<# _.each( data.fields, function( fieldData, fieldAttribute ) { #>\n\t\t\t\t\t\t<li style=\"width:<# print( columnsWidth ); #>%;min-height:1px;float:left;\">\n\t\t\t\t\t\t\t<#\n\t\t\t\t\t\t\tfieldData = _.defaults( fieldData, { shortcode: data.shortcode, templates: data.templates } );\n\t\t\t\t\t\t\tfieldData = _.defaults( fieldData, { defaultValue: '', required: false, hidden: false, placeholder: '' } );\n\t\t\t\t\t\t\tfieldData = _.defaults( fieldData, { defaultForceValue: fieldData.defaultValue } );\n\t\t\t\t\t\t\tfieldData.attribute = fieldAttribute;\n\t\t\t\t\t\t\tprint( data.templates.attributeWrapper( fieldData ) );\n\t\t\t\t\t\t\t#>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t<# }); #>\n\t\t\t\t</ul>\n\t\t\t\t<# if ( _.has( data, 'description' ) ) { #>\n\t\t\t\t\t<p class=\"description\">{{{data.description}}}</p>\n\t\t\t\t<# } #>\n\t\t\t</div>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-information\">\n\t\t\t<div id=\"{{{data.shortcode}}}-{{{data.attribute}}}\" class=\"toolset-alert toolset-alert-info\">\n\t\t\t\t{{{data.content}}}\n\t\t\t</div>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-text\">\n\t\t\t<input id=\"{{{data.shortcode}}}-{{{data.attribute}}}\" data-type=\"text\" class=\"js-shortcode-gui-field large-text<# if ( data.required ) { #> js-toolset-shortcode-gui-required<# } #>\" value=\"{{{data.defaultForceValue}}}\" placeholder=\"{{{data.placeholder}}}\" type=\"text\">\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-radio\">\n\t\t\t<ul id=\"{{{data.shortcode}}}-{{{data.attribute}}}\">\n\t\t\t\t<# _.each( data.options, function( optionLabel, optionKey ) { #>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t<input name=\"{{{data.shortcode}}}-{{{data.attribute}}}\" value=\"{{{optionKey}}}\" class=\"js-shortcode-gui-field\" type=\"radio\"<# if ( optionKey == data.defaultForceValue ) { #> checked=\"checked\"<# } #>>\n\t\t\t\t\t\t\t{{{optionLabel}}}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</li>\n\t\t\t\t<# }); #>\n\t\t\t</ul>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-select\">\n\t\t\t<select id=\"{{{data.shortcode}}}-{{{data.attribute}}}\" class=\"js-shortcode-gui-field<# if ( data.required ) { #> js-toolset-shortcode-gui-required<# } #>\">\n\t\t\t\t<# _.each( data.options, function( optionLabel, optionKey ) { #>\n\t\t\t\t\t<option value=\"{{{optionKey}}}\"<# if ( optionKey == data.defaultForceValue ) { #> selected=\"selected\"<# } #>>\n\t\t\t\t\t\t{{{optionLabel}}}\n\t\t\t\t\t</option>\n\t\t\t\t<# }); #>\n\t\t\t</select>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-select2\">\n\t\t\t<select id=\"{{{data.shortcode}}}-{{{data.attribute}}}\" class=\"js-shortcode-gui-field js-toolset-shortcode-gui-field-select2<# if ( data.required ) { #> js-toolset-shortcode-gui-required<# } #>\">\n\t\t\t\t<#\n\t\t\t\tif ( _.has( data, 'options' ) ) {\n\t\t\t\t\t_.each( data.options, function( optionLabel, optionKey ) {\n\t\t\t\t\t#>\n\t\t\t\t\t<option value=\"{{{optionKey}}}\"<# if ( optionKey == data.defaultForceValue ) { #> selected=\"selected\"<# } #>>\n\t\t\t\t\t\t{{{optionLabel}}}\n\t\t\t\t\t</option>\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</select>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-ajaxSelect2\">\n\t\t\t<select\n\t\t\t\tid=\"{{{data.shortcode}}}-{{{data.attribute}}}\"\n\t\t\t\tclass=\"js-shortcode-gui-field js-toolset-shortcode-gui-field-ajax-select2<# if ( data.required ) { #> js-toolset-shortcode-gui-required<# } #>\"\n\t\t\t\tdata-action=\"{{{data.action}}}\"\n\t\t\t\tdata-nonce=\"{{{data.nonce}}}\"\n\t\t\t\tdata-placeholder=\"{{{data.placeholder}}}\"\n\t\t\t\t>\n\t\t\t</select>\n\t\t</script>\n\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-content\">\n\t\t\t<#\n\t\t\t\tdata = _.defaults( data, { defaultValue: '', required: false, hidden: false, placeholder: '' } );\n\t\t\t\tdata = _.defaults( data, { defaultForceValue: data.defaultValue } );\n\t\t\t#>\n\t\t\t<div class=\"toolset-shortcode-gui-attribute-wrapper js-toolset-shortcode-gui-content-wrapper\" <# if ( data.hidden ) { #> style=\"display:none\"<# } #>>\n\t\t\t\t<textarea id=\"toolset-shortcode-gui-content-{{{data.shortcode}}}\" type=\"text\" class=\"large-text js-toolset-shortcode-gui-content\">{{{data.defaultValue}}}</textarea>\n\t\t\t\t<# if ( _.has( data, 'description' ) ) { #>\n\t\t\t\t\t<p class=\"description\">{{{data.description}}}</p>\n\t\t\t\t<# } #>\n\t\t\t</div>\n\t\t</script>\n\n\t\t<?php $toolset_ajax = Toolset_Ajax::get_instance(); ?>\n\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-postSelector\">\n\t\t\t<ul id=\"{{{data.shortcode}}}-{{{data.attribute}}}\">\n\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option\">\n\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-post-id-current\">\n\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id-current\" name=\"toolset_shortcode_gui_object_id\" value=\"current\" checked=\"checked\" />\n\t\t\t\t\t\t<?php _e( 'The current post being displayed either directly or in a View loop', 'wpv-views' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\n\t\t\t<?php\n\n\t\t\tglobal $pagenow, $post;\n\t\t\t$current_post_type = null;\n\t\t\tif (\n\t\t\t\tin_array( $pagenow, array( 'post.php' ) )\n\t\t\t\t&& isset( $_GET[\"post\"] )\n\t\t\t) {\n\t\t\t\t$current_post_id = (int) $_GET[\"post\"];\n\t\t\t\t$current_post_type_slug = get_post_type( $current_post_id );\n\t\t\t\t$current_post_type = get_post_type_object( $current_post_type_slug );\n\t\t\t} elseif (\n\t\t\t\tisset( $post )\n\t\t\t\t&& ( $post instanceof WP_Post )\n\t\t\t\t&& ( ! in_array( $post->post_type, array( 'view', 'view-template', 'cred-form', 'cred-user-form', 'dd_layouts' ) ) )\n\t\t\t) {\n\t\t\t\t$current_post_type = get_post_type_object( $post->post_type );\n\t\t\t}\n\t\t\t\n\t\t\t// Current top page when displaying a View loop\n\t\t\tif (\n\t\t\t\tin_array( $pagenow, array( 'admin.php' ) )\n\t\t\t\t&& 'views-editor' === toolset_getget( 'page' )\n\t\t\t) {\n\t\t\t\t?>\n\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option\">\n\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-post-id-current_page\">\n\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id-current_page\" name=\"toolset_shortcode_gui_object_id\" value=\"$current_page\" />\n\t\t\t\t\t\t<?php echo __( 'The page where this View is shown', 'wpv-views' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\t\t\t\t<?php\n\t\t\t}\n\n\t\t\t// Poost hierarchical relations\n\t\t\tif (\n\t\t\t\tis_null( $current_post_type )\n\t\t\t\t|| (\n\t\t\t\t\tis_object( $current_post_type )\n\t\t\t\t\t&& isset( $current_post_type->hierarchical )\n\t\t\t\t\t&& $current_post_type->hierarchical\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t?>\n\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option\">\n\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-post-id-parent\">\n\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id-parent\" name=\"toolset_shortcode_gui_object_id\" value=\"$parent\" />\n\t\t\t\t\t\t<?php echo __( 'The parent of the current post in the same post type, set by WordPress hierarchical relationship', 'wpv-views' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\t\t\t\t<?php\n\t\t\t}\n\n\n\t\t\t// Types relations\n\t\t\tif ( ! apply_filters( 'toolset_is_m2m_enabled', false ) ) {\n\t\t\t\t// Legacy relationships\n\t\t\t\t$current_post_type_parents = $this->get_legacy_current_post_type_relationships( $current_post_type );\n\t\t\t\t$custom_post_types_relations = get_option( 'wpcf-custom-types', array() );\n\n\t\t\t\tif ( ! empty( $current_post_type_parents ) ) {\n\t\t\t\t\t?>\n\t\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option toolset-shortcode-gui-item-selector-has-related js-toolset-shortcode-gui-item-selector-has-related\">\n\t\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-post-id-related\">\n\t\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id-related\" name=\"toolset_shortcode_gui_object_id\" value=\"related\" />\n\t\t\t\t\t\t\t<?php echo __( 'The parent of the current post in another post type, set by a Types relationship', 'wpv-views' ); ?>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<div class=\"toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none\">\n\t\t\t\t\t\t\t<ul class=\"toolset-advanced-setting tolset-mightlong-list\" style=\"padding-top:15px;margin:5px 0 10px;\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$first = true;\n\t\t\t\t\t\t\tforeach ( $current_post_type_parents as $slug ) {\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<?php echo sprintf( '<label for=\"toolset-shortcode-gui-item-selector-post-relationship-id-%s\">', $slug ); ?>\n\t\t\t\t\t\t\t\t\t<?php echo sprintf(\n\t\t\t\t\t\t\t\t\t\t'<input type=\"radio\" name=\"related_object\" id=\"toolset-shortcode-gui-item-selector-post-relationship-id-%s\" value=\"$%s\" %s />',\n\t\t\t\t\t\t\t\t\t\tesc_attr( $slug ),\n\t\t\t\t\t\t\t\t\t\tesc_attr( $slug ),\n\t\t\t\t\t\t\t\t\t\tchecked( $first, true, false )\n\t\t\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t\t\t\t<?php echo esc_html( $custom_post_types_relations[ $slug ]['labels']['singular_name'] ); ?>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$first = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</li>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t// m2m relationships\n\t\t\t\t// Make sure m2m classes are registered in the autoloader\n\t\t\t\tdo_action( 'toolset_do_m2m_full_init' );\n\t\t\t\t$relationship_definitions_per_origin = $this->get_m2m_current_post_type_relationships_per_origin( $current_post_type );\n\t\t\t\t\n\t\t\t\t$relationship_section_title_per_cardinality = array(\n\t\t\t\t\t'one-to-one' => __( '%s (one-to-one relationship)', 'wpv-views' ),\n\t\t\t\t\t'one-to-many' => __( '%s (one-to-many relationship)', 'wpv-views' ),\n\t\t\t\t\t'many-to-many' => __( '%s (many-to-many relationship)', 'wpv-views' ),\n\t\t\t\t);\n\n\t\t\t\tif ( ! empty( $relationship_definitions_per_origin[ Toolset_Relationship_Origin_Wizard::ORIGIN_KEYWORD ] ) ) {\n\t\t\t\t\t?>\n\t\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option toolset-shortcode-gui-item-selector-has-related js-toolset-shortcode-gui-item-selector-has-related\">\n\t\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-post-id-related\">\n\t\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id-related\" name=\"toolset_shortcode_gui_object_id\" value=\"related\" />\n\t\t\t\t\t\t\t<?php echo __( 'A post related to the current post, set by a Types relationship', 'wpv-views' ); ?>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<div class=\"toolset-advanced-setting toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tforeach ( $relationship_definitions_per_origin[ Toolset_Relationship_Origin_Wizard::ORIGIN_KEYWORD ] as $relationship_definition ) {\n\t\t\t\t\t\t\t\t$cardinality = $relationship_definition->get_cardinality()->get_type();\n\t\t\t\t\t\t\t\t$relationship_selectors_factory = new Toolset_Shortcode_Attr_Item_Gui_Factory(\n\t\t\t\t\t\t\t\t\t$relationship_definition, $current_post_type, 'related_object'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$relationship_selectors = $relationship_selectors_factory->get_options();\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<div style=\"margin:5px 0 0;\">\n\t\t\t\t\t\t\t\t<h3><?php echo sprintf(\n\t\t\t\t\t\t\t\t\t$relationship_section_title_per_cardinality[ $cardinality ],\n\t\t\t\t\t\t\t\t\t$relationship_definition->get_display_name()\n\t\t\t\t\t\t\t\t); ?></h3>\n\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tforeach( $relationship_selectors as $relationship_selector_option ) {\n\t\t\t\t\t\t\t\t\techo '<li style=\"display:inline-block;width:31%;vertical-align:top;margin-right:1%;>' . $relationship_selector_option . '</li>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</li>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $relationship_definitions_per_origin[ Toolset_Relationship_Origin_Post_Reference_Field::ORIGIN_KEYWORD ] ) ) {\n\t\t\t\t\t?>\n\t\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option toolset-shortcode-gui-item-selector-has-related js-toolset-shortcode-gui-item-selector-has-related\">\n\t\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-post-id-referenced\">\n\t\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id-referenced\" name=\"toolset_shortcode_gui_object_id\" value=\"referenced\" />\n\t\t\t\t\t\t\t<?php echo __( 'A post related to the current post, set by a Types post reference field', 'wpv-views' ); ?>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<div class=\"toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none\">\n\t\t\t\t\t\t\t<ul class=\"toolset-advanced-setting toolset-mightlong-list\" style=\"padding-top:15px;margin:5px 0 10px;\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tforeach ( $relationship_definitions_per_origin[ Toolset_Relationship_Origin_Post_Reference_Field::ORIGIN_KEYWORD ] as $relationship_definition ) {\n\t\t\t\t\t\t\t\t$relationship_selectors_factory = new Toolset_Shortcode_Attr_Item_Gui_Factory(\n\t\t\t\t\t\t\t\t\t$relationship_definition, $current_post_type, 'referenced_object'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$relationship_selectors = $relationship_selectors_factory->get_options();\n\t\t\t\t\t\t\t\tforeach( $relationship_selectors as $relationship_selector_option ) {\n\t\t\t\t\t\t\t\t\techo '<li>' . $relationship_selector_option . '</li>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</li>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t?>\n\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option toolset-shortcode-gui-item-selector-has-related js-toolset-shortcode-gui-item-selector-has-related\">\n\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-post-id\">\n\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id\" name=\"toolset_shortcode_gui_object_id\" value=\"object_id\" />\n\t\t\t\t\t\t<?php _e( 'A specific post (search by title)', 'wpv-views' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t\t<div class=\"toolset-advanced-setting toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none;padding-top:10px;\">\n\t\t\t\t\t\t<select id=\"toolset-shortcode-gui-item-selector-post-id-object_id\"\n\t\t\t\t\t\t\tclass=\"js-toolset-shortcode-gui-item-selector_object_id js-toolset-shortcode-gui-field-ajax-select2\"\n\t\t\t\t\t\t\tname=\"specific_object_id\"\n\t\t\t\t\t\t\tdata-action=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_POSTS_BY_TITLE ) ); ?>\"\n\t\t\t\t\t\t\tdata-prefill=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_GET_POST_BY_ID ) ); ?>\"\n\t\t\t\t\t\t\tdata-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_POSTS_BY_TITLE ); ?>\"\n\t\t\t\t\t\t\tdata-prefill-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_GET_POST_BY_ID ); ?>\"\n\t\t\t\t\t\t\tdata-placeholder=\"<?php echo esc_attr( __( 'Search for a post by title', 'wpv-views' ) ); ?>\">\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\n <li class=\"toolset-shortcode-gui-item-selector-option toolset-shortcode-gui-item-selector-has-related js-toolset-shortcode-gui-item-selector-has-related\">\n <label for=\"toolset-shortcode-gui-item-selector-post-id-raw\">\n <input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-post-id-raw\" name=\"toolset_shortcode_gui_object_id\" value=\"object_id_raw\" />\n\t\t\t\t\t\t<?php _e( 'A specific post (set by post ID)', 'wpv-views' ); ?>\n </label>\n <div class=\"toolset-advanced-setting toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none;padding-top:10px;\">\n <input type=\"number\" placeholder=\"<?php echo esc_attr( __( 'Please enter post ID', 'wpv-views' ) ); ?>\" id=\"toolset-shortcode-gui-item-selector-post-id-object_id_raw\" class=\"regular-text js-toolset-shortcode-gui-item-selector_object_id_raw\" name=\"specific_object_id_raw\">\n </div>\n </li>\n\n </ul>\n\t\t\t<p class=\"description\">\n\t\t\t\t<?php echo sprintf(\n\t\t\t\t\t__( 'Learn about displaying content from parent and other posts in the %sdocumentation page%s.', 'wpv-views' ),\n\t\t\t\t\t'<a href=\"https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/\" target=\"_blank\">',\n\t\t\t\t\t'</a>'\n\t\t\t\t); ?>\n\t\t\t</p>\n\t\t</script>\n\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-userSelector\">\n\t\t\t<ul id=\"{{{data.shortcode}}}-{{{data.attribute}}}\">\n\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option\">\n\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-user-id-current\">\n\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-user-id-current\" name=\"toolset_shortcode_gui_object_id\" value=\"current\" checked=\"checked\" />\n\t\t\t\t\t\t<?php _e( 'The current user or the one being displayed in a View loop', 'wpv-views' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\n\t\t\t\t<li class=\"toolset-shortcode-gui-item-selector-option toolset-shortcode-gui-item-selector-has-related js-toolset-shortcode-gui-item-selector-has-related\">\n\t\t\t\t\t<label for=\"toolset-shortcode-gui-item-selector-user-id\">\n\t\t\t\t\t\t<input type=\"radio\" class=\"js-toolset-shortcode-gui-item-selector\" id=\"toolset-shortcode-gui-item-selector-user-id\" name=\"toolset_shortcode_gui_object_id\" value=\"object_id\" />\n\t\t\t\t\t\t<?php _e( 'A specific user', 'wpv-views' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t\t<div class=\"toolset-advanced-setting toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none;padding-top:10px;\">\n\t\t\t\t\t\t<select id=\"toolset-shortcode-gui-item-selector-user-id-object_id\"\n\t\t\t\t\t\t\tclass=\"js-toolset-shortcode-gui-item-selector_object_id js-toolset-shortcode-gui-field-ajax-select2\"\n\t\t\t\t\t\t\tname=\"specific_object_id\"\n\t\t\t\t\t\t\tdata-action=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_USERS ) ); ?>\"\n\t\t\t\t\t\t\tdata-prefill=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_GET_USER_BY_ID ) ); ?>\"\n\t\t\t\t\t\t\tdata-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_USERS ); ?>\"\n\t\t\t\t\t\t\tdata-prefill-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_GET_USER_BY_ID ); ?>\"\n\t\t\t\t\t\t\tdata-placeholder=\"<?php echo esc_attr( __( 'Search for a user', 'wpv-views' ) ); ?>\">\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</script>\n\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-post-selector\">\n\t\t\t<ul id=\"{{data.shortcode}}}-{{data.attribute}}}\">\n\t\t\t\t<li>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"radio\" name=\"{{{data.shortcode}}}-select-target-post\" class=\"toolset-shortcode-gui-item-selector js-toolset-shortcode-gui-item-selector\" value=\"current\" checked=\"checked\" />\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tisset( $_GET['page'] )\n\t\t\t\t\t\t\t&& in_array( $_GET['page'], array( 'views-editor', 'view-archives-editor' ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t_e( 'The current post in the loop', 'wp-cred' );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t_e( 'The current post', 'wp-cred' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\t\t\t\t<li class=\"js-toolset-shortcode-gui-item-selector-has-related\">\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"radio\" name=\"{{{data.shortcode}}}-select-target-post\" class=\"toolset-shortcode-gui-item-selector js-toolset-shortcode-gui-item-selector\" value=\"object_id\" />\n\t\t\t\t\t\t<?php _e( 'Another post', 'wp-cred' ); ?>\n\t\t\t\t\t\t<div class=\"toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none\">\n\t\t\t\t\t\t\t<select id=\"toolset-shortcode-gui-item-selector-post-id-object_id\"\n\t\t\t\t\t\t\t\tclass=\"js-toolset-shortcode-gui-item-selector_object_id js-toolset-shortcode-gui-field-ajax-select2\"\n\t\t\t\t\t\t\t\tname=\"specific_object_id\"\n\t\t\t\t\t\t\t\tdata-action=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_POSTS_BY_TITLE ) ); ?>\"\n\t\t\t\t\t\t\t\tdata-prefill=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_GET_POST_BY_ID ) ); ?>\"\n\t\t\t\t\t\t\t\tdata-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_POSTS_BY_TITLE ); ?>\"\n\t\t\t\t\t\t\t\tdata-prefill-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_GET_POST_BY_ID ); ?>\"\n\t\t\t\t\t\t\t\tdata-placeholder=\"<?php echo esc_attr( __( 'Search for a post by title', 'wpv-views' ) ); ?>\">\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</script>\n\t\t<script type=\"text/html\" id=\"tmpl-toolset-shortcode-attribute-user-selector\">\n\t\t\t<ul id=\"{{data.shortcode}}}-{{data.attribute}}}\">\n\t\t\t\t<li>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"radio\" name=\"{{{data.shortcode}}}-select-target-user\" class=\"toolset-shortcode-gui-item-selector js-toolset-shortcode-gui-item-selector\" value=\"current\" checked=\"checked\" />\n\t\t\t\t\t\t<?php _e( 'The current logged in user', 'wp-cred' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\t\t\t\t<li class=\"js-toolset-shortcode-gui-item-selector-has-related\">\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input type=\"radio\" name=\"{{{data.shortcode}}}-select-target-user\" class=\"toolset-shortcode-gui-item-selector js-toolset-shortcode-gui-item-selector\" value=\"object_id\" />\n\t\t\t\t\t\t<?php _e( 'Another user', 'wp-cred' ); ?>\n\t\t\t\t\t\t<div class=\"toolset-shortcode-gui-item-selector-is-related js-toolset-shortcode-gui-item-selector-is-related\" style=\"display:none\">\n\t\t\t\t\t\t\t<select id=\"toolset-shortcode-gui-item-selector-user-id-object_id\"\n\t\t\t\t\t\t\t\tclass=\"js-toolset-shortcode-gui-item-selector_object_id js-toolset-shortcode-gui-field-ajax-select2\"\n\t\t\t\t\t\t\t\tname=\"specific_object_id\"\n\t\t\t\t\t\t\t\tdata-action=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_USERS ) ); ?>\"\n\t\t\t\t\t\t\t\tdata-prefill=\"<?php echo esc_attr( $toolset_ajax->get_action_js_name( Toolset_Ajax::CALLBACK_GET_USER_BY_ID ) ); ?>\"\n\t\t\t\t\t\t\t\tdata-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_SELECT2_SUGGEST_USERS ); ?>\"\n\t\t\t\t\t\t\t\tdata-prefill-nonce=\"<?php echo wp_create_nonce( Toolset_Ajax::CALLBACK_GET_USER_BY_ID ); ?>\"\n\t\t\t\t\t\t\t\tdata-placeholder=\"<?php echo esc_attr( __( 'Search for a user', 'wpv-views' ) ); ?>\">\n\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</label>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</script>\n\t\t<?php\n\n\t\tdo_action( 'toolset_action_require_shortcodes_templates_done' );\n\n\t}", "function widget( $args, $instance ) {\r\n\t\textract( $args, EXTR_SKIP );\r\n\t\techo $before_widget;\r\n\t\techo '<p class=\"title\">Mt. Horeb United Methodist Church.</p>';\r\n\t\techo '<p>P: (803) 359-3495 &#124; F: (803) 359-2029</p>';\r\n\t\techo '<p>1205 Old Cherokee Rd.</p>';\r\n\t\techo '<p>Lexington, SC 29072</p>';\r\n\t\techo $after_widget;\r\n\t}", "function endcore_socialbuttons_shortcode($atts, $content = null) {\n if(is_admin()) {\n return;\n }\n\n\tob_start();\t\n\tget_template_part('parts/stuff/code', 'social');\n\t$output = ob_get_contents();\n\tob_end_clean();\n\treturn $output;\n}", "public function frontend_render()\n {\n $user_selected_language = get_user_lang();\n $widget_saved_values = $this->get_settings();\n\n $widget_title = $widget_saved_values['widget_title_' . $user_selected_language] ?? '';\n\n $output = $this->widget_before(); //render widget before content\n\n if (!empty($widget_title)) {\n $output .= '<h4 class=\"widget-title\">' . purify_html($widget_title) . '</h4>';\n }\n $output .='<div class=\"widget widget_search\">\n <form action=\"'.route('frontend.blog.search').'\" method=\"get\" class=\"search-form\">\n <div class=\"form-group\">\n <input type=\"text\" class=\"form-control\" name=\"search\" placeholder=\"'.__('Write your keyword...').'\">\n </div>\n <button class=\"submit-btn\" type=\"submit\"><i class=\"fa fa-search\"></i></button>\n </form>\n </div>';\n\n $output .= $this->widget_after(); // render widget after content\n\n return $output;\n }", "function run()\r\n {\r\n // Run parent CWidget run function.\r\n parent::run();\r\n echo '<!-- AddThis Button BEGIN -->';\r\n echo CHtml::openTag('div', $this->htmlOptions) . \"\\n\";\r\n if ($this->singleButton) {\r\n $img = CHtml::image(\"http://s7.addthis.com/static/btn/v2/lg-share-{$this->config['ui_language']}.gif\", Yii::t('addThis', 'Bookmark and Share'));\r\n echo CHtml::link($img, \"http://www.addthis.com/bookmark.php?v=300&amp;#pubid={$this->pubid}\", $this->singleButtonOptions);\r\n }\r\n\r\n // Check what services to show.\r\n if (!$this->singleButton && !empty($this->services)) {\r\n while ($item = current($this->services)) {\r\n is_array($item) ? $service = array('name' => key($this->services), 'htmlOptions' => $item) : $service = array('name' => $item, 'htmlOptions' => array());\r\n next($this->services);\r\n\r\n if ($service['name'] == 'vk_like') {\r\n if (!empty($this->vkApiId) && is_int($this->vkApiId)) {\r\n $service['htmlOptions']['id'] = 'vk_like';\r\n echo CHtml::tag('a', $service['htmlOptions'], '');\r\n }\r\n } else {\r\n $service['htmlOptions']['class'] = \"addthis_button_{$service['name']}\";\r\n echo CHtml::tag('a', $service['htmlOptions'], '');\r\n }\r\n }\r\n }\r\n echo CHtml::closeTag('div');\r\n echo '<!-- AddThis Button END -->';\r\n }", "function getContentWidget($i)\n {\n // widget is not enabled\n if (!$this->_options['content']['widget']['flag']) return false;\n \n // wrong position\n if ($this->_options['content']['widget']['after'] != $i) return false;\n echo \"<div id=\\\"content-widget\\\" class=\\\"box\\\">\\n\";\n dynamic_sidebar('content');\n echo \"</div>\";\n }", "function audio_logger_shortcode($atts = [], $content = null){\n\n ob_start();\n\n\n require_once(plugin_dir_path(__FILE__) . '/audio-logger-scripts.php');\n\n $output = ob_get_clean();\n $run_shortcodes = do_shortcode($output);\n return $run_shortcodes;\n}", "function widget($args, $instance){\n\t\t\n\t\t$output = '<div id=\"fb_like_box\" class=\"xs-invisible hidden-xs hidden-sm widget fb_like_box clearfix\"><div class=\"mmb-vmenublockheader\"><h3 class=\"t\">facebook</h3></div><div id=\"fbHolder\" class=\"mmb-blockcontent\"><p>Carregant...</p></div></div>';\n\t\techo $args['before_widget'].$output.$args['after_widget'];\n\t}", "public function shortcode() {\n\t\t\treturn \"\";\n\t\t}", "public function widget( $args, $instance ) {\n\t\techo $args['before_widget'];\n\t\techo (\"<script type=''> <!-- \n\t\t\t BannerFull_widget_before(); \n\t\t\t // </script>\");\n\t\techo('<div class=\"BannerFull-widget-container\">');\n\t\t// class item start \n\t\tif ( ! empty( $instance['title'] ) ) {\n\t\t\techo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title'];\n\t\t}\n\t\t//echo esc_html__( $instance['description'], 'text_domain' );\n\n\t \tif($instance['showSubtitle'] == 'true'){\n\t \t\techo ( $instance['description'] );\n\t \t} \n\t\t\n\n\t\t// class item end\n\t\t/* // class item start \n\t\tif ( ! empty( $instance['description'] ) ) {\n\t\t\techo $args['before_description'] . apply_filters( 'widget_title', $instance['description'] ) . $args['after_description'];\n\t\t}\n\t\techo esc_html__( $instance['description'], 'text_domain' );\n\t\t// class item end */\n\n\t\techo(\"</div>\");\n\t\techo (\"<script type=''> <!-- \n\t\t\t BannerFull_widget_after(); \n\t\t\t // </script>\");\n\t\techo $args['after_widget'];\n\n\n\t}", "function wf_template_widget($retData=false) {\n\t\tglobal $post;\n\t\t\n\t\t$error = 'Error while adding the widget, please report to <a href=\"http://blog.wanderfly.com/wordpress-plugin/\">http://blog.wanderfly.com/wordpress-plugin/</a>.';\n\t\t$widgetHTML = false;\n\t\t\n\t\tif($post) {\n\t\t\t//Get the Destination ID from the post's metas,\n\t\t\t$wf_meta = get_post_meta($post->ID, \"wf_destination\", true);\n\t\t\t\n\t\t\t//Display the wanderfly widget,\n\t\t\tif($wf_meta) {\n\t\t\t\t$wf_metas = explode(':', $wf_meta);\n\t\t\t\t$widgetHTML = wf_widget($wf_metas[0]);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//Echo the widget,\n\t\tif($widgetHTML !== false) {\n\t\t\tif($retData) { return $widgetHTML; }\n\t\t\telse { echo $widgetHTML; }\n\t\t}\n\t\t//Return the widget's HTML,\n\t\telse {\n\t\t\tif($retData) { return $widgetHTML; }\n\t\t\telse { echo $error; }\n\t\t}\n\t\t\n\t}", "public function show()\n\t{\n\t\techo $this->tags();\n\t}", "public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"toggle-switch-control\">\n\t\t\t\t<div class=\"toggle-switch\">\n\t\t\t\t\t<input type=\"checkbox\" id=\"<?php echo esc_attr( $this->id ); ?>\" name=\"<?php echo esc_attr( $this->id ); ?>\" class=\"toggle-switch-checkbox\" value=\"<?php echo esc_attr( $this->value() ); ?>\"\n\t\t\t\t\t<?php\n\t\t\t\t\t$this->link();\n\t\t\t\t\tchecked( $this->value() );\n\t\t\t\t\t?>\n\t\t\t\t\t>\n\t\t\t\t\t<label class=\"toggle-switch-label\" for=\"<?php echo esc_attr( $this->id ); ?>\">\n\t\t\t\t\t\t<span class=\"toggle-switch-inner\"></span>\n\t\t\t\t\t\t<span class=\"toggle-switch-switch\"></span>\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function widget( $args, $instance ) {\r\n\t$text\t\t = parent::get_text_display( $instance );\r\n\t$width\t\t = parent::get_width( $instance );\r\n\t$width_col_no\t = ($width === 'full') ? 12 : 6;\r\n\t$quote_from\t = $instance[ 'quote_from' ];\r\n\t$their_role\t = $instance[ 'their_role' ];\r\n\t?>\r\n\r\n\t<section id=\"<?php echo $instance[ 'section_id' ]; ?>\">\r\n\r\n\t <div class=\"col-sm-<?php echo $width_col_no; ?>\">\r\n\t\t<div class=\"spotlight spotlight--wide spotlight--blockquote\">\r\n\t\t <blockquote class=\"spotlight__inner\">\r\n\t\t\t<div>\r\n\t\t\t <?php if ( $text ) : ?>\r\n\t \t\t <p><?php echo $text; ?></p>\r\n\t\t\t <?php endif; ?>\r\n\t\t\t <footer><cite title=\"<?php echo $quote_from; ?>\"><?php echo $quote_from; ?></cite> - <?php echo $their_role; ?></footer>\r\n\t\t\t</div>\r\n\t\t </blockquote>\r\n\t\t</div>\r\n\t </div>\r\n\t</section>\r\n\r\n\t<?php\r\n }", "function render_sc_myShortcode( $context ) {\n\tob_start();\n\t?>\n<div>Some: <?=$context['disp1']?></div>\n<div>Another: <?=$context['disp2']?></div>\n<?php\n\treturn ob_get_clean();\n}", "public function widget( $args, $instance ) {\n // return;\n\n if(!$instance['instagram_user'] || !$instance['posts_number']) return;\n echo $args['before_widget'];\n \n if ( ! empty( $instance['title'] ) ) {\n echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];\n } \n\n printf('<div class=\"insta-content\" id=\"content_%s\" data-user=\"%s\" data-postsnumber=\"%s\"></div>',\n $args['widget_id'], $instance['instagram_user'], $instance['posts_number']);\n\n echo $args['after_widget'];\n}", "public function render_content() {\n\t\t\t$allowed_html = array(\n\t\t\t\t'a' => array(\n\t\t\t\t\t'href' => array(),\n\t\t\t\t\t'title' => array(),\n\t\t\t\t\t'class' => array(),\n\t\t\t\t\t'target' => array(),\n\t\t\t\t),\n\t\t\t\t'br' => array(),\n\t\t\t\t'em' => array(),\n\t\t\t\t'strong' => array(),\n\t\t\t\t'i' => array(\n\t\t\t\t\t'class' => array(),\n\t\t\t\t),\n\t\t\t\t'span' => array(\n\t\t\t\t\t'class' => array(),\n\t\t\t\t),\n\t\t\t\t'code' => array(),\n\t\t\t);\n\t\t\t?>\n\t\t\t<div class=\"simple-notice-custom-control\">\n\t\t\t\t<?php if ( ! empty( $this->label ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo wp_kses( $this->description, $allowed_html ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "function nooshin_a_text_shortcode( $atts, $content = null ) {\n //set default attributes and values\n\n return '<p>'. $content .'</p>';\n\n}", "public function toHtml()\n {\n\n return access()->content ? view('admin.widgets.quick')->render() : null;\n\n }", "public function generate_short_code_content($atts)\n {\n $short_code_atts = shortcode_atts(array(), $atts);\n\n ob_start();\n\n $this->cyl_locate_template_part('shortcode/colorYourLife.php', []);\n\n return ob_get_clean();\n }", "function display( array $atts, $content = '' ) {\n\n\t\tob_start();\n\n\t\tpublisher_set_prop( 'shortcode-bs-social-share-atts', $atts );\n\t\tpublisher_get_view( 'shortcodes', 'bs-social-share' );\n\t\tpublisher_clear_props();\n\n\t\treturn ob_get_clean();\n\n\t}", "public function execute_hook() {\n\n\t\t$hook = current_filter();\n\t\t$content = simplehooks_get_option( $hook, 'content' );\n\n\t\tif ( ! $hook || ! $content ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$shortcodes = simplehooks_get_option( $hook, 'shortcodes' );\n\t\t$php = simplehooks_get_option( $hook, 'php' );\n\n\t\t$value = $shortcodes ? do_shortcode( $content ) : $content;\n\n\t\tif ( $php ) {\n\t\t\t//phpcs:ignore\n\t\t\teval( \"?>$value \" );\n\t\t} else {\n\t\t\t//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\techo ( $value );\n\t\t}\n\n\t}", "function widgetOutput( $args ) {\r\n\t\t\textract( $args, EXTR_SKIP );\r\n\t\t\techo $before_widget;\r\n\t\t\t\r\n\t\t\t$options = get_option( 'ILuvWalking.com Widget' );\r\n\t\t\t$widgetData = $this->getWidgetOutputData( $options[ 'name' ] );\r\n\t\t\tif( false === $widgetData ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( !empty( $options[ 'title' ] ) ) {\r\n\t\t\t\techo $before_title . $options[ 'title' ] . $after_title;\r\n\t\t\t} else {\r\n\t\t\t\techo $before_title . __( 'I\\'ve Been Busy Walking' ) . $after_title;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo '<ul id=\"walker-tracker-widget-stats\">';\r\n\t\t\techo '<li><strong>' . __( 'Total Steps' ) . '</strong>' . $widgetData->total . '</li>';\r\n\t\t\techo '<li><strong>' . __( 'Average Steps/Day' ) . '</strong>' . sprintf( '%d', $widgetData->average ) . '</li>';\r\n\t\t\techo '<li><strong>' . __( 'Busiest Month' ) . ' (' . date( 'Y' ) . ')</strong>' . $widgetData->month . '</li>';\r\n\t\t\techo '<li><strong>' . __( 'Busiest Day' ) . ' (' . date( 'Y' ) . ')</strong>' . $widgetData->day . '</li>';\r\n\t\t\techo '</ul>';\r\n\t\t\techo '<img id=\"walker-tracker-widget-logo\" src=\"' . WP_PLUGIN_URL . '/' . basename( dirname( __FILE__ ) ) . '/resources/iluvwalking-widget-logo.gif' . '\" alt=\"Walking\" />';\r\n\t\t\techo '<p id=\"walker-tracker-widget-get\"><a href=\"http://iluvwalking.com/get-the-widget/\">Get this widget</a> or <a href=\"http://iluvwalking.com/add-your-steps\">log your steps</a><br /><a href=\"http://iluvwalking.com\">ILuvWalking.com</a></p>';\r\n\t\t\techo $after_widget;\r\n\t\t}", "function rqdshortcode () {\nob_start();\n?>\n\n<div class=\"rqd-container\">\n \t<?php\n\t\t$args=array('post_type'=>'quote', 'orderby'=>'rand', 'posts_per_page'=>'1');\n\n\t\t$randomquote=new WP_Query($args);\n\t\twhile ($randomquote->have_posts()) : $randomquote->the_post();\n\t\t\t$ctd_newtitle = get_the_title();\t\t\t\n\t\t\n\t\t\t?><p class=\"rqd-quote\"><?php echo \"\\\"\" . $ctd_newtitle . \"\\\"\";?></p>\n \n <?php $authorname = get_post_meta( get_the_ID(), 'author-box-text', true ); ?>\n <p class=\"rqd-author\"><?php echo \"- \" . $authorname . \" -\";?></p>\n <?php \n\t\tendwhile;\n\t\twp_reset_postdata();\n\t\t?> </div> <?php\n\t\t\n\t\t$output = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn $output;\n\t}", "protected function content($atts, $content = null) {\n\n extract(shortcode_atts(array(\n\t\t\t'id' => '',\n\t\t\t'display_social_meta' => 'on',\n\t\t\t'display_comments_count' => 'on',\n\t\t\t'display_excerpt' => 'off',\n\t\t\t'display_meta' => 'on',\n ), $atts));\n\n\n /* ================ Render Shortcodes ================ */\n\n ob_start();\n\t\t\n\t\t//Method to retrieve a single post\n\t\t$queried_post = get_post($id);\n\t\t$postID = $queried_post->ID;\n\t\t$postLink = get_permalink($postID);\n\t\t$postTitle = $queried_post->post_title;\n\t\t$postDate = mysql2date('l, F j, Y', $queried_post->post_date);\n\t\t$postAuthorID = $queried_post->post_author;\n\t\t$postAuthor = get_the_author_meta('nickname', $postAuthorID);\n\t\t//$postTags = get_the_tags($postID);\n\t\t$postCommentCount = $queried_post->comment_count;\n\t\t$postExcerpt = $queried_post->post_excerpt;\n\t\t$postContent = $queried_post->post_content;\n\t\t$postTip = get_post_meta($postID, 'pm_post_tooltip_meta_function', true);\n\t\t$postIconSaved = get_post_meta($postID, 'pm_post_icon_meta', true);\n\t\t$postIcon = $postIconSaved != '' ? $postIconSaved : 'fa fa-file';\n\t\t\n\t\t$displayExcerptOnMeta = get_theme_mod('displayExcerptOnMeta', 'on');\n\t\t\t\n ?>\n \n <?php \n\t\t\t//$img = wp_get_attachment_image_src($el_image, \"large\"); \n\t\t\t//$imgSrc = $img[0];\n\t\t?>\n\n <!-- Element Code start -->\n \n <div class=\"pm-single-post-shortcode-container\">\n\t\n <div class=\"pm_span_header pm_post_single\">\n <h4>\n \n <span><?php esc_attr_e($postTitle); ?></span>\n \n <?php if( $postTip !== '' ){ ?>\n <a class=\"<?php esc_attr_e($postIcon); ?> pm_tip\" title=\"<?php esc_attr_e($postTip); ?>\" href=\"<?php echo esc_url($postLink); ?>\"></a>\n <?php } else { ?>\n <a class=\"<?php esc_attr_e($postIcon); ?>\" href=\"<?php echo esc_url($postLink); ?>\"></a>\n <?php } ?>\n \n </h4>\n </div>\n \n <div class=\"pm-hover-item\">\n \n <div class=\"pm-hover-item-title-panel\">\n <a class=\"icon-location-arrow pm_float_right pm_panel_touch_btn\"></a>\n \n <?php if( $display_meta === 'on' ) { ?>\n <p><b><?php esc_attr_e('Posted','localization'); ?></b> <?php esc_attr_e($postDate); ?><b> <?php esc_attr_e('by','localization'); ?></b> <?php esc_attr_e($postAuthor); ?></p>\n <?php } ?>\n \n <?php if( $displayExcerptOnMeta === 'on' ){ ?>\n <p><?php echo pm_hope_string_limit_words($postExcerpt, 7); ?>...</p>\n <?php } ?>\n \n </div>\n \n <div class=\"pm-hover-item-details\">\n <div class=\"pm-hover-item-spacer\">\n \n \t<?php if( $display_excerpt === 'on' ){ ?>\n <p><?php echo pm_hope_string_limit_words($postExcerpt, 20); ?>...</p>\n <?php } ?>\n \n <a href=\"<?php echo esc_url($postLink); ?>\"><?php esc_attr_e('Read More','localization'); ?> &raquo;</a>\n \n \n <?php if($display_comments_count === 'on'){ ?>\n <div class=\"pm_post_tags\">\n <i class=\"fa fa-comment\"></i><?php echo get_comments_number(); ?> <?php esc_attr_e('comments', 'localization'); ?>\t\n </div>\n <?php } else { ?>\n <div class=\"pm_post_tags\" style=\"margin-bottom:0px;\">\n </div>\t\n <?php } ?>\n \n <?php if( $display_social_meta === 'on' ) : ?>\t\t\t\t\t\t\t\t\t\t\n \n <ul class=\"pm-post-social-icons\">\n \n <li class=\"twitter\">\n <a target=\"_blank\" href=\"http://twitter.com/home?status=<?php echo urlencode(get_the_title()); ?>\"><i class=\"fa fa-twitter\"></i></a>\n </li>\n \n <li class=\"facebook\">\n <a target=\"_blank\" href=\"http://www.facebook.com/share.php?u=<?php echo urlencode(get_the_permalink()); ?>\"><i class=\"fa fa-facebook\"></i></a>\n </li>\n \n <li class=\"linkedin\">\n <a href=\"http://www.linkedin.com/shareArticle?mini=true&amp;url=<?php echo urlencode(get_the_permalink()); ?>&amp;title=<?php echo urlencode(get_the_title()); ?>&amp;summary=<?php echo urlencode(get_the_excerpt()); ?>\" target=\"_blank\"><i class=\"fa fa-linkedin\"></i></a>\n </li>\n \n <li class=\"gplus\">\n <a href=\"https://plus.google.com/share?url=<?php echo urlencode(get_the_permalink()); ?>\" target=\"_blank\"><i class=\"fa fa-google-plus\"></i></a>\n </li>\n \n </ul>\n \n <?php endif; ?>\t\n \n </div>\n </div>\n \n <div class=\"pm-hover-item-img\">\n \t<?php echo get_the_post_thumbnail( $postID ); ?>\n </div>\n \n </div>\n \n </div>\t\n \n <!-- Element Code / END -->\n\n <?php\n\n $output = ob_get_clean();\n\n /* ================ Render Shortcodes ================ */\n\n return $output;\n\n }", "public function render_widget() {\n\t\t$this->get_db_values();\n\t\tif ( wponion_is_callable( $this->option( 'callback' ) ) ) {\n\t\t\techo wponion_callback( $this->option( 'callback' ), array( $this->get_db_values(), $this ) );\n\t\t}\n\t}", "public function show() {\n echo $this->mountElement();\n }", "function widget( $args, $instance ) {\r\n\textract( $args );\r\n\t\r\n\t$title = $instance['title'] ;\r\n\t$subtitle = $instance['subtitle'];\r\n\t$code = $instance['code'];\r\n\r\n\techo $before_widget;\r\n\techo '<div class=\"bnk-newsletter clickable\">';\r\n\techo '<span class=\"newsletter-icon mobile-hide\">&nbsp;</span>';\r\n\techo '<h3 class=\"replace inset\"><a href=\"'.$code.'\">' . $title . '</a></h3>\r\n\t\t <p class=\"subhead\">' . $subtitle . '</p></div> ';\r\n\techo $after_widget;\r\n\t}", "public function output_shortcode(){\n if(!is_user_logged_in()){\n echo '<p>Please login</p>';\n\n return false;\n }\n\n ob_start();\n\n if(!function_exists('acf_form')){ return; }\n\n //user is currently filling out the form\n if(!this->current_multistep_form_is_finished()){\n $this->output_acf_form(array('post_type' => $this->post_type));\n }\n else{\n //form has been filled entirely\n $form_complete_message = get_field('kickoff_form_complete_message', 'option');\n echo apply_filters('the_content', wp_kses_post($form_complete_message));\n }\n\n return ob_get_clean();\n }", "function display_content(){\n echo '<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <title>Articles page</title>\n <link rel=\"stylesheet\" href=\"../styles/styles.css\">\n </head>\n <body>\n \n <!--Simulates an arbitrary service page-->\n <p class=\"booking\">\n Form to create a new article\n </p>\n </body>\n </html>\n';\n\n}", "public function render_widget() {\n\n return Widget::render($this->settings);\n\n }", "public static function widget() {\n require_once( 'includes/widget.php' );\n }", "function content() {\n echo \"<div class='container'>{$this->params['body']}\n <p style='background-color: #95a5a6; padding: 10px; text-align: center; margin-top: 10px; border-top-left-radius: 2px; border-top-right-radius: 2px;'><a href='http://{$_SERVER['SERVER_NAME']}/mailmaid/subscriber/unsubscribe/{$this->params['email']}/{$this->params['emailId']}' style='font-family: Arial; color: #333;'>Click here to unsubscribe from our updates</a></p>\n </div>\";\n }", "function add_shortcode( $atts, $content, $name ) {\n\n\t\tif ( ! $this->validate_shortcode( $atts, $content, $name ) ) {\n return '';\n }\n\n\t\t$options = $this->set_options( $atts );\n\n\t\tob_start();\n\n\t\t?><div id=\"<?php echo esc_attr($options['selector']); ?>\" class=\"<?php if(isset($options['classes'])) echo esc_attr($options['classes']); ?>\" <?php do_action(\"oxygen_vsb_component_attr\", $options, $this->options['tag']); ?>><?php echo do_shortcode( $content ); ?></div><?php\n\n\t\treturn ob_get_clean();\n\t}", "public function output( $atts, $content = null ) {\n\t\t\tob_start();\n\t\t\tinclude( vcex_get_shortcode_template( 'vcex_shortcode' ) );\n\t\t\treturn ob_get_clean();\n\t\t}", "public function content( $instance ) {\n\t\t// Set so we can access from other class functions.\n\t\t$this->title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );\n\n\t\tcomments_template();\n\t}", "public static function nicepageWidget($atts, $content) {\n $content = htmlspecialchars_decode($content);\n $props = json_decode($content, true);\n if (!$props) {\n return '';\n }\n\n ob_start();\n $type = _arr($props, 'type', 'text');\n $data = self::$data[$type];\n $class = $data[0];\n $args = _arr($data, 2, array());\n foreach ($data[1] as $args_key => $source_key) {\n if (is_string($source_key)) {\n $args[$args_key] = _arr($props, $source_key);\n } else if (is_array($source_key)) {\n $args[$args_key] = _arr($props, $source_key[0], $source_key[1]);\n }\n }\n the_widget($class, $args);\n return ob_get_clean();\n }", "public function widget( $args, $instance ) {\n\n if(!empty($instance['title'])){\n echo $args['before_title'] . \n apply_filters('widget_title', $instance['title']) . \n $args['after_title'];\n }\n\n echo esc_html__('Hello, Worl', 'gaw_text_domain');\n\n // whatever i want after wedgit </div> etc\n // outputs the content of the widget\n }", "public function widget( $args, $instance ) {\n\t\t// outputs the content of the widget\n\t\t$widget_id = $args['widget_id'];\n\t\t$widget_title = get_field('widget_title', \"widget_\" . $widget_id);\n\t\t$widget_paragraph = get_field('widget_paragraph', \"widget_\" . $widget_id);\n\t\t$widget_background_image = get_field('widget_background_image', \"widget_\" . $widget_id);\n\t\t$widget_side_image = get_field('widget_side_image', \"widget_\" . $widget_id);\n\t\t$widget_link = get_field('widget_link', \"widget_\" . $widget_id);\n\t\t$widget_link_cta = get_field('widget_link_cta', \"widget_\" . $widget_id);\n\t\tif (empty($widget_link_cta)) {\n\t\t\t$widget_link_cta = get_the_title($widget_link->ID);\n\t\t}\n\n\t\t?>\n\n\t\t<section class=\"section section-inverted section-medium-padding css-animate on-hover hover\">\n\n\t\t\t<?php if (!empty($widget_background_image)): ?>\n\t\t\t\t<div class=\"section-background enhance-img\" style=\"background-image: url(<?php echo $widget_background_image['url'] ?>);\">\n\t\t\t\t</div>\n\t\t\t<?php endif; ?>\n\n\t\t\t<div class=\"container on-top-relative\">\n\t\t\t\t<div class=\"row\">\n\n\t\t\t\t\t<div class=\"col-sm-6\">\n\t\t\t\t\t\t<div class=\"animatable move-up\">\n\t\t\t\t\t\t\t<h3 class=\"section-title\" style=\"margin-top: 80px;\">\n\t\t\t\t\t\t\t\t<?php _e( $widget_title, 'html5blank' ) ?>\n\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t\t<p class=\"section-paragraph\" style=\"margin-bottom: 20px;\">\n\t\t\t\t\t\t\t\t<?php _e( $widget_paragraph, 'html5blank' ) ?>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"animatable fade-in-up\">\n\t\t\t\t\t\t\t<?php if (!empty($widget_link)): ?>\n\n\t\t\t\t\t\t\t\t<a href=\"<?php echo get_permalink($widget_link->ID); ?>\" class=\"btn btn-primary btn-outlined\">\n\t\t\t\t\t\t\t\t\t<?php echo $widget_link_cta; ?>\n\t\t\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<?php if (!empty($widget_side_image)): ?>\n\t\t\t\t\t\t<div class=\"col-sm-6 text-center\">\n\t\t\t\t\t\t\t<img src=\"<?php echo $widget_side_image['url']; ?>\" height=\"250\" alt=\"<?php $widget_side_image['alt']; ?>\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</div>\n\n\t\t\t</div>\n\n\t\t</section>\n\n\t\t<?php\n\t}", "function pexeto_show_pane( $atts, $content = null ) {\r\n\t\treturn '<div>'.do_shortcode( $content ).'</div>';\r\n\t}" ]
[ "0.6989379", "0.69404423", "0.6893241", "0.6838916", "0.6825074", "0.6710391", "0.6684971", "0.6658175", "0.66478413", "0.66009283", "0.6573295", "0.6531404", "0.6525872", "0.65217125", "0.65156746", "0.65090835", "0.6495832", "0.64941007", "0.64887124", "0.6487133", "0.6465972", "0.6455712", "0.64549035", "0.6431079", "0.64146256", "0.6403794", "0.63992363", "0.63916224", "0.6381139", "0.63760555", "0.63739145", "0.6365918", "0.63555205", "0.63520557", "0.6344586", "0.63377386", "0.6322345", "0.631033", "0.63039577", "0.6296705", "0.62963265", "0.6288506", "0.62718177", "0.6269089", "0.6266702", "0.62633306", "0.6260785", "0.6254655", "0.6254426", "0.6252783", "0.6249667", "0.6243227", "0.624127", "0.6229904", "0.62242144", "0.6222964", "0.6218967", "0.62145376", "0.62131923", "0.620137", "0.6193277", "0.6188016", "0.61777663", "0.61713254", "0.61668724", "0.6157073", "0.6155929", "0.6151677", "0.6144526", "0.6139479", "0.61253774", "0.6124648", "0.61228704", "0.6121495", "0.6115824", "0.61069465", "0.61042583", "0.6097866", "0.6093763", "0.6084662", "0.6074623", "0.6074611", "0.6073388", "0.60708696", "0.6064957", "0.60579085", "0.60570854", "0.60530365", "0.60511637", "0.60466146", "0.604206", "0.6040769", "0.60345936", "0.6032386", "0.60272413", "0.6025667", "0.60211366", "0.60187864", "0.60179687", "0.60151523", "0.6011956" ]
0.0
-1
Retorna a URL atual
function url_current() { return url(@$_GET['GET_VARS']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_url();", "public function getURL();", "public function getURL();", "public function getURL ();", "public abstract function getURL();", "function get_url()\n {\n }", "public function url();", "public function url();", "public function url();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "function getUrl();", "abstract public function getUrl();", "public function url(): string;", "protected function getUrl(){\n\n\t\t//retornando a url aonde o usuario está\n\t\treturn parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n\n\t}", "public function getUrl(): string;", "public function getUrl(): string;", "public function getUrl(): string;", "public function ___httpUrl() {\n\t\t$page = $this->pagefiles->getPage();\n\t\t$url = substr($page->httpUrl(), 0, -1 * strlen($page->url())); \n\t\treturn $url . $this->url(); \n\t}", "public function get_url()\n {\n }", "static function obtenerUrlActual() {\n $url = Util::crearUrl($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n return $url;\n }", "public static function getThisUrl() {}", "protected function url()\n\t{\n\t\treturn Phpfox::getLib('url');\t\n\t}", "public function url()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse\n\t\t{\n\t\t\t$url = $this->generateString();\n\t\t\treturn htmlentities( $url );\n\t\t}\n\t}", "abstract public function get_url_update();", "public function get_url(): string\n {\n return $this->get_url_internal();\n }", "function getURL()\r\n\t{\r\n\t\treturn \"http://www.iai.com\";\r\n\t}", "function get_final_url($xid){\n\t$base_url = 'http://www.swarthmore.edu/';\n\t$url = $base_url . $xid; \n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_AUTOREFERER, 1);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\tcurl_setopt($ch, CURLOPT_MAXREDIRS, 5);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\tcurl_exec ($ch);\n\treturn str_replace($base_url, '', curl_getinfo($ch, CURLINFO_EFFECTIVE_URL));\n}", "public function getUrl() {\n\t\t$this->getRublon()->log(__METHOD__);\n\t\treturn $this->getRublon()->getAPIDomain() .\n\t\t\tself::URL_PATH_CODE .\n\t\t\turlencode($this->getUrlParamsString());\n\t}", "public function\n\tGetURL():\n\t?String {\n\n\t\treturn sprintf(\n\t\t\t'%s://%s%s%s',\n\t\t\t$this->GetProtocol(),\n\t\t\t$this->GetFullDomain(),\n\t\t\t(($this->GetPath() === '/index')?\n\t\t\t\t('/'):\n\t\t\t\t($this->GetPath())\n\t\t\t),\n\t\t\t((count($this->Query) >= 1)?\n\t\t\t\t($this->QueryCooker($this->Query)):\n\t\t\t\t(''))\n\t\t);\n\t}", "private function _getURL()\n {\n\n $url = $this->_ect . '?';\n foreach ($this as $name => $var) {\n if ($name == 'ect') {\n continue;\n }\n $url .= \"$name=$var&\";\n }\n\n $this->url = $url;\n\n return $this->url;\n }", "protected function getUrl() {\n\t\treturn $this->getQueryParam ( self::URL_PARAM );\n\t}", "public function getUrl() {\n return $this->get(self::URL);\n }", "public function getUrl() {\r\n\t}", "public function url(){\n $protocol = \"http://\";\n if ( !empty( $_SERVER['HTTPS'] ) ) {\n $protocol = \"https://\";\n }\n $url = $protocol . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n return $url;\n }", "public function getUrl()\n {\n return $this->createUrl();\n }", "public function getURL(): string\n {\n return $this->http->getURL();\n }", "function _url($path){\n echo getFullUrl($path);\n}", "public function get_url () {\r\n\t\treturn $this->url;\r\n\t}", "public function getUrl() {\r\n\r\n // removing GET parameters from URL.\r\n return strtolower(rtrim(explode('?', $_SERVER['REQUEST_URI'], 2)[0], '/'));\r\n \r\n }", "function url()\n\t{\n\t\t$id\t\t= $this->attribute('id');\n\t\t$page\t= $this->pyrocache->model('pages_m', 'get', array($id));\n\n\t\treturn site_url($page ? $page->uri : '');\n\t}", "public function getURL()\n\t{\n $url = $this->_internal_request->get_normalized_http_url();\n \n if ( $this->getMethod() == KHttpRequest::GET ) \n {\n $url = $this->_internal_request->to_url();\n }\n \n\t\treturn $url;\n\t}", "public function makeUrlFromRequest()\n {\n $id = __Request::get('id', null);\n $resolvedVO = $this->createResolvedVO($id);\n return $resolvedVO->url;\n }", "public function getUrl() {\n $url = $this->request->get_normalized_http_url() . '?';\n $url .= http_build_query($this->request->get_parameters(), '', '&');\n\n return $url;\n }", "abstract public function getRawRequestUrl();", "function get_url($withProtocol=true)\n{\n return Request::GetUrl($withProtocol);\n}", "public function getURI();", "public function to_url()\n {\n $post_data = $this->to_postdata();\n $out = $this->get_http_url();\n if ($post_data) {\n $out .= '?'.$post_data;\n }\n\n return $out;\n }", "public function getURL() {\n\t\treturn $this->urlStub() .'/' . $this->publicContainer .'/' . $this->getId();\n\t}", "function url ($link) {\r\n\treturn $link;\r\n}", "function getFullUrl() {\n /*** check for https ***/ /*** return the full address ***/\n return 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n }", "public function url()\r\n {\r\n return $this->get_base_url() . http_build_query($this->get_query_params());\r\n }", "public function generate_url()\n {\n }", "abstract public function get_url_read();", "public function url() \n\t{\n\t\treturn static::protocol().'://'.static::host().$this->server('REQUEST_URI', '/' );\n\t}", "public function getUrl()\n {\n return trim(implode('/', $this->path), '/').$this->getParams();\n }", "private function getUrl() {\n $queryArr = array();\n\n $uri = filter_input(INPUT_SERVER, 'REQUEST_URI');\n\n //get uri as a array\n $uriArr = parse_url($uri);\n\n //get query parameter string\n $queryStr = isset($uriArr['query']) ? $uriArr['query'] : '';\n\n //get query parameters as a array\n parse_str($queryStr, $queryArr);\n\n //remove 'page' parameter if it is set\n if (isset($queryArr['page'])) {\n unset($queryArr['page']);\n }\n\n //rebuild the uri and return \n $returnUri = $uriArr['path'] . '?' . http_build_query($queryArr);\n\n return $returnUri;\n }", "public function getUri();", "public function getUri();", "public function getUri();", "public function getUri();", "public function getUrl() {\n\t\treturn $this->rawUrl;\n\t}", "public function get_url() {\n\t\treturn $this->url;\n\t}", "public function get_url() {\n\t\treturn $this->url;\n\t}", "public function url()\n {\n return $this->factory->getUrl($this->handle);\n }", "function get_url()\n {\n return $_SERVER['REQUEST_URI'];\n }", "function getUrl() {\n\t\t$url = @( $_SERVER[\"HTTPS\"] != 'on' ) ? 'http://'.$_SERVER[\"SERVER_NAME\"] : 'https://'.$_SERVER[\"SERVER_NAME\"];\n\t\t$url .= ( $_SERVER[\"SERVER_PORT\"] !== 80 ) ? \":\".$_SERVER[\"SERVER_PORT\"] : \"\";\n\t\t$url .= $_SERVER[\"REQUEST_URI\"];\n\t\treturn $url;\n\t}", "function formatCurrentUrl() ;", "public function getUrl() {\n\t\t$url = $this->getBaseUrl().$this->getBasePath().$this->getOperation();\n\t\t$params = http_build_query($this->getUrlParameters());\n\t\tif ($params) {\n\t\t\t$url .= '?'.$params;\n\t\t}\n\t\treturn $url;\n\t}", "public function href();", "public function url()\n\t{\n\t\treturn ($this->secure() ? 'https' : 'http') . '//' . $this->domainName() . $this->uri();\n\t}", "public function getUrl(){\n return $this->server->getUrl() . \"/\" . $this->name;\n \n }", "public function url(){\r\n\t\treturn $this->_url;\r\n\t}", "public function getUrl(): string\n {\n return ($this->prefix ?? '') . $this->uri;\n }", "public function getOfficialLink();", "abstract public function getUri();", "protected function getUrl() {\r\n\t\treturn $this->url;\r\n\t}", "public function url(): string\n {\n return strtok($this->getUri(), '?');\n }", "protected function get_url()\n {\n return $this->base_url + $this->api_version; \n }", "public function getRemoteUrl();", "public function RedirectURL(){\n //echo Director::baseURL();exit(); \n return urlencode(Director::baseURL().$this->request->getURL(true));\n }", "public function url()\n\t{\n\t\t\n\t\t$lang = Config::get('app.locale');\n\t\t$route_prefix = ($lang == \"ar\" ? \"ar/\" : \"\");\t\t\n\t\treturn Url::to($route_prefix .'page/' .$this->link);\n\t}", "function dameURL(){\n\t$url=\"http://\".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n\treturn $url;\n}", "public static function url(): string\n\t{\n\t\treturn static::$url;\n\t}", "public static function requestedURL()\n\t{\n\t\t$url = new SMURL;\n\t\t\n\t\t// set scheme\n\t\t$scheme = ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ) ? 'https' : 'http';\n\t\t$url->setScheme( $scheme );\n\t\t\n\t\t// set host\n\t\t$url->setHost( $_SERVER['HTTP_HOST'] );\n\t\t\n\t\t// set path and query\n\t\tif( isset( $_SERVER['REQUEST_URI'] ) )\n\t\t{\n\t\t\tpreg_match( '/\\/([^\\?]*)(?:\\?(.*))?$/', $_SERVER['REQUEST_URI'], $match );\n\t\t\t$url->setPath( $match[1] );\n\t\t\t$url->setQueryString( $match[2] );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url->setPath( $_SERVER['SCRIPT_NAME'] );\n\t\t\t$url->setQueryString( $_SERVER['QUERY_STRING'] );\n\t\t}\n\n\t\t// set port\n\t\t$url->setPort( $_SERVER['SERVER_PORT'] );\n\t\t\n\t\treturn $url;\n\t}", "function readURL()\n\t{\n\t\t\t $pageURL = 'http';\n\t\t\t if (isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] == \"on\") $pageURL .= \"s\";\n\t\t\t $pageURL .= \"://\";\n\t\t\t if (isset($_SERVER[\"SERVER_PORT\"]) && $_SERVER[\"SERVER_PORT\"] != \"80\") {\n\t\t\t $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n\t\t\t } else {\n\t\t\t $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n\t\t\t }\n\t\t\t \n\t\treturn $pageURL;\n\t}", "function url_request(): string\n{\n return url_site() . input_server('REQUEST_URI');\n}", "protected function getUrl()\n {\n return str_replace('?' . $_SERVER['QUERY_STRING'], '', $_SERVER['REQUEST_URI']);\n }", "public function getUrl()\r\n {\r\n if (isset($_GET['url'])) {\r\n\r\n // remove the ending slash\r\n $url = rtrim($_GET['url'], '/');\r\n\r\n // removing any none url characters\r\n $url = filter_var($url, FILTER_SANITIZE_URL);\r\n\r\n // get url characters as an array using explode function\r\n $url = explode('/',$url);\r\n\r\n return $url;\r\n }\r\n }", "public static function generateURL()\n {\n return $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];\n }", "function get_url()\n{\n $url = 'http://'.$_SERVER['SERVER_NAME'].'/space';\n return $url;\n}", "function ruta($url){\n\t$host = $_SERVER['HTTP_HOST'];\n\t$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\');\n\t$extra = $url;\n\n\t$tipo = 'http';\n\tif (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {\n \t$tipo = 'https';\n\t}\n\n\treturn $tipo . \"://\" . $host . $uri . \"/\" . $url; \n}", "function jc_url() {\n\n}", "public function to_url() {\n $post_data = $this->to_postdata();\n $out = $this->get_normalized_http_url();\n if ($post_data) {\n $out .= '?'.$post_data;\n }\n return $out;\n }", "public function url()\n {\n return explode('?' ,$this->uri)[0];\n }" ]
[ "0.8240176", "0.817322", "0.817322", "0.8163205", "0.79802907", "0.78844243", "0.7787111", "0.7787111", "0.7787111", "0.7783755", "0.7783755", "0.7783755", "0.7783755", "0.7783755", "0.7783755", "0.7783755", "0.7783755", "0.77419126", "0.772215", "0.75589645", "0.75440997", "0.75144136", "0.75144136", "0.75144136", "0.7500408", "0.7467835", "0.7459644", "0.731155", "0.7255564", "0.7177459", "0.7158777", "0.71573913", "0.7154953", "0.7148033", "0.71421003", "0.7124637", "0.711957", "0.7114336", "0.71080345", "0.7105784", "0.7104082", "0.7102668", "0.70987487", "0.70903665", "0.7083298", "0.7081848", "0.70782125", "0.70781916", "0.70653033", "0.7058795", "0.70379376", "0.7036831", "0.70281595", "0.70216745", "0.70193565", "0.7014053", "0.7011696", "0.7008792", "0.7003802", "0.6999471", "0.69926643", "0.69878983", "0.6986985", "0.69832283", "0.69832283", "0.69832283", "0.69832283", "0.69818527", "0.6976785", "0.6976785", "0.6976605", "0.69662184", "0.6961282", "0.6960728", "0.694958", "0.69477946", "0.6946982", "0.6924426", "0.69201875", "0.69155186", "0.6905782", "0.6900746", "0.6900363", "0.6899972", "0.6895123", "0.6888946", "0.6886743", "0.68853086", "0.6881201", "0.687624", "0.6870229", "0.68565136", "0.68547696", "0.6854015", "0.6849064", "0.6846742", "0.68387663", "0.68312013", "0.6830932", "0.68283236", "0.68269974" ]
0.0
-1
Verifica se o parametro pode ser um controlador ou uma action
function url_parse_controllerAction(&$value) { if (!$value) { return false; } else { return preg_match('/^[a-z][a-z\_0-9]{1,30}$/i', (string)$value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function formularioEnviado(&$params)\r\n {\r\n return isset($params['action']) && $params['action'] == $this->formId;\r\n }", "public function isAction()\n {\n $args = func_get_args();\n foreach ($args as $arg)\n {\n // Check if action is set and exists\n if ($_POST['action'] == $arg || $_GET['action'] == $arg)\n {\n // quit here\n return true;\n }\n }\n\n return false;\n }", "public function Validar_Acceso ($controlador =\"\", $modelo = \"\") {\r\n\t\tif($controlador == \"login\")\r\n\t\t\treturn true;\r\n\t\treturn isset($_SESSION['__token']);\r\n\t}", "function valid_action() {\n # of pages that are about that page (i.e. not admin\n # or recent changes)\n global $ACT;\n if($ACT == 'show') { return true; }\n if($ACT == 'edit') { return true; }\n if($ACT == 'revisions') { return true; }\n return false;\n }", "private function checkFieldAction($postParams): bool\n {\n if (in_array($postParams['action'], ['allow', 'deny'])) {\n return true;\n }\n return false;\n }", "public function requireAction()\n {\n $args = func_get_args();\n foreach ($args as $arg)\n {\n // Check if action is set and exists\n if ($_POST['action'] == $arg || $_GET['action'] == $arg)\n {\n // quit here\n return;\n }\n }\n\n $this->sendJsonResponse(false, 'Invalid Action!');\n die;\n }", "public function authorize()\n {\n return Auth::user()->data_confirmacao != null;\n }", "private function isControllerAction()\n {\n return is_string($this->attributes[self::ACTION]);\n }", "public function isEditAction() {}", "protected function beforeAction($action)\n\t{\t\n\t\t$controller =strtolower($this->getId());\n\t\t$action=strtolower($this->getAction()->getId());\n\t\t// Akses untuk kontroller site di bebeaskan untuk Guest ataupun yang lainnya\n\t\t\n\t\tif(Yii::app()->user->isGuest && $action!='login'){\t\t\n\t\t\t$this->redirect(array('site/login'));\n\t\t}else if($controller!='site' && $action!='index'){\n\t\t\tif(!Yii::app()->user->isBoleh($controller,$action)){\n\t\t\t\t$this->redirect(array('site/index'));\n\t\t\t\t//echo 'User tidak ditermina';\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "function isAllowedAction($action) {\n\t\t\treturn true;\n\t\t}", "public function hasPermission($action = \"\");", "public function actioncheckPlanMot()\n\t{\n\t $valores=OperaCodep::getEp();\n $codigobarco=$valores['barco'];\n $codofi=$valores['ofic'];\n //var_dump($codigobarco);var_dump($codofi);die();\n if(!is_null($codigobarco)){\n $model=new OperaPlanes('search_por_mot');\n\t\t$model->unsetAttributes(); // clear any default values\n\t\tif(isset($_GET['OperaPlanes']))\n\t\t\t$model->attributes=$_GET['OperaPlanes'];\n\n\t\t$this->render('admin_por_mot',array(\n\t\t\t'model'=>$model,'codep'=>$codigobarco,'codof'=>$codofi\n\t\t));\n }else{\n $this->render('reject',array(\n\t\t\t'model'=>$model,\n\t\t)); \n }\n \n\t}", "public function beforeAction($event)\n {\n $action = $event->id;\n if (isset($this->actions[$action])) {\n $verbs = $this->actions[$action];\n } elseif (isset($this->actions['*'])) {\n $verbs = $this->actions['*'];\n } else {\n return $event->isValid;\n }\n $verb = Yii::$app->getRequest()->getMethod();\n \n $allowed = array_map('strtoupper', $verbs);\n \n if (!in_array($verb, $allowed)) {\n \n $this->setHeader(400);\n echo json_encode(array('status'=>0,'error_code'=>400,'message'=>'Method not allowed'),JSON_PRETTY_PRINT);\n exit;\n \n } \n \n return true; \n }", "function controle() {\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $this->setViewParam('tituloPagina', 'Controle de Permissões');\n $this->render('permissao/controle');\n } else {\n $this->redirect('/');\n }\n }", "function isActionAllowed($controller_id = null, $action_id = null, $event_id = null, $model_id = null, $group_id = null)\n {\n\t\t$actionAllowed = parent::isActionAllowed($controller_id, $action_id, $event_id, $model_id, $group_id);\n\n\t\t$hikeStatus = EventNames::model()->getStatusHike($event_id);\n\t\t$rolPlayer = DeelnemersEvent::model()->getRolOfPlayer($event_id, Yii::app()->user->id);\n\t\treturn $actionAllowed;\n\t}", "public function has_valid_action(): bool {\n\t\treturn is_string( $this->get_action() )\n\t\t&& \\mb_strlen( $this->get_action() ) > 0;\n\t}", "public function isAuthorized($user)\n{\n if (in_array($this->request->action,['postjob','apply','posted','applied','getjob'])) {\n return true;\n }\n // The owner of an job can edit and delete it\n if (in_array($this->request->action, ['edit', 'delete'])) {\n $jobId = (int)$this->request->params['pass'][0];\n if ($this->Jobs->isOwnedBy($jobId, $user['id'])) {\n return true;\n }\n }\n\n return parent::isAuthorized($user);\n}", "function can_process()\n{\n global $controller, $Mode;\n if ( strlen( $_POST[ 'reported_by' ] ) > 0 )\n {\n return\n (!is_empty( $_POST[ 'gate_code' ], 'Superior Response' )) &&\n (!is_empty( $_POST[ 'superior_confirmed' ], 'Superior Confirmation' )) &&\n (!is_empty( $_POST[ 'superior_comments' ], 'Superior Comments' ))\n ;\n }\n else\n {\n return\n (!is_empty( $_POST[ 'gate_code' ], 'Employee Response' )) &&\n (!is_empty( $_POST[ 'employee_confirmed' ], 'Employee Confirmation' )) &&\n (!is_empty( $_POST[ 'employee_comments' ], 'Employee Comments' ))\n ;\n }\n}", "public function beforeAction($action)\n {\n // which are triggered on the [[EVENT_BEFORE_ACTION]] event, e.g. PageCache or AccessControl\n $this->tahun = Yii::$app->params['tahun'];\n $this->pemda_id = Yii::$app->params['pemda_id'];\n \n // return var_dump($action->id);\n if($action->id !== 'view'){\n if(Yii::$app->user->identity->username !== 'admin'){\n Yii::$app->session->setFlash('warning', \"You didn't have access.\");\n return $this->redirect(['/survaiawal']);\n }\n }\n \n if (!parent::beforeAction($action)) {\n return false;\n }\n \n // other custom code here\n \n return true; // or false to not run the action\n }", "protected function isAllowed() {\n\t\treturn $this->allowedActions == array('*') ||\n\t\t\t\tin_array($this->_request->params['action'], array_map('strtolower', $this->allowedActions));\n\t}", "public function is_editing() {\n\n\t\tif ( 'edit' !== Param::get( 'action' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn Param::get( 'redirection', false, FILTER_VALIDATE_INT );\n\t}", "public function beforeAction()\n\t{\n\t\tif(Yii::app()->user->isGuest)\n\t\t\tthrow new CHttpException(404, Yii::t('UsersModule.core', 'Ошибка доступа.'));\n\t\treturn true;\n\t}", "public function check_security( $action = - 1, $query_arg = 'security' ) {\r\n\t\tif ( - 1 == $action ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$adminurl = strtolower( admin_url() );\r\n\t\t$referer = strtolower( wp_get_referer() );\r\n\t\t$result = isset( $_REQUEST[ $query_arg ] ) ? wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST[ $query_arg ] ) ), $action ) : false;\r\n\t\tif ( ! $result && ! ( - 1 == $action && 0 === strpos( $referer, $adminurl ) ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "public function authorize()\n {\n return PerfilPermissao::AcessoAction('CONTAS');\n }", "function controle() {\n if (Sessao::getUsuario()->getEntidadeDepartamento()->getAdministrador() === 1 || Sessao::getPermissaoUsuario($this->ID_PERMISSAO)) {\n $this->setViewParam('tituloPagina', 'Log de Erros');\n $this->render('erro/controle');\n } else {\n $this->redirect('/');\n }\n }", "public function loginCheckAction()\n {\n }", "public function authorize()\n {\n $usuario = Auth::User();\n //se ele e master\n if($usuario->tipo_usuario_id!=8){\n return false; \n }\n return true;\n }", "protected function _checkIsForcedFormKeyAction()\n {\n return in_array($this->getRequest()->getActionName(), $this->_forcedFormKeyActions);\n }", "function droit_ajout_agenda_ressource()\r\n{\r\n\tif($_SESSION[\"espace\"][\"droit_acces\"]==2 || ($_SESSION[\"user\"][\"id_utilisateur\"]>0 && option_module(\"ajout_agenda_ressource_admin\")!=true))\r\n\t\treturn true;\r\n}", "public function loginCheckAction()\n {\n\n }", "public function acceptLoginAction() {\n\t\treturn FALSE;\n\t}", "function isAuthorized($aro, $controller, $action = null)\n\t{\n\t\t//if the user is an admin -> allow\n\t\tif( !empty($this->admins) &&\n\t\t\t ((in_array($aro[$this->userModel][$this->role], $this->admins)\n\t\t\t \t|| in_array($aro[$this->userModel][$this->username], $this->admins)\n\t\t\t\t|| in_array($aro[$this->userModel]['id'], $this->admins))))\n\t\t{\n\t\t\t$this->admin = true;\n\t\t\treturn true;\n\t\t}\n\n\t\t// if the key doesnt exist - allow access\n\t\tif (is_array($this->access) && array_key_exists($action, $this->access))\n\t\t{\n\t\t\tif(!empty($aro[$this->userModel][$this->role]))\n\t\t\t{\n\t\t\t\tif (in_array($aro[$this->userModel][$this->role], $this->access[$action]))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//be sure to check if the user doesnt have the same username as the admin group\n\t\t\telseif($aro[$this->userModel][$this->username])\n\t\t\t{\n\t\t\t\tif (in_array($aro[$this->userModel][$this->username], $this->access[$action]))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($aro[$this->userModel]['id'])\n\t\t\t{\n\t\t\t\tif (in_array($aro[$this->userModel]['id'], $this->access[$action]))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// if the action is an admin action and the user isnt an admin and the permissions for the action werent\n\t\t// defined\n\t\tif(strpos($action, Configure::read('Routing.admin')) === 0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn\ttrue;\n\t}", "private function checkActionIdParam()\n {\n $id = $this->getRequest()->getParam('id');\n\n IF($id === NULL || is_numeric($id) === FALSE || $this->dbAction->find($id)->count() === 0) {\n throw new Admin_Model_Acl_Exception('Invalid or no Id Parameter given');\n }\n\n RETURN (int) $id;\n }", "public function canExecute($action, $user){\n return $user != null && (Security::is_dairy($user) || $user->is_veterinary());\n }", "public function validateController($usuario)\n {\n if (!isset($usuario->rol->id)) {\n return false;\n }\n\n // Validar acceso permitido por Roles\n $rol = $usuario->rol->id_rol;\n if ( $rol != self::ADMINISTRADOR && $rol != self::AUXILIAR && $rol != self::CONSULTOR ) {\n return false;\n }\n\n return true;\n }", "function hasAction()\n {\n return !is_null($this->_action);\n }", "private function checkControllerIdParam()\n {\n $id = $this->getRequest()->getParam('control');\n\n IF($id === NULL || is_numeric($id) === FALSE || $this->dbController->find($id)->count() === 0) {\n throw new Admin_Model_Acl_Exception('Invalid or no Id Parameter given');\n }\n\n RETURN (int) $id;\n }", "public function isAllowed($arrParam = null){\n\t\t$ns = new Zend_Session_Namespace('info');\n\t\t$nsInfo = $ns->getIterator();\n\t\t$privilege = $arrParam['module'] . '_' . $arrParam['controller'] . '_' . $arrParam['action']; \n\t\t$flagAccess = false;\n\t\t\n\t\tif($this->_acl->isAllowed($this->_role, null, $privilege)){\n\t\t\t$flagAccess = true;\n\t\t}\n\t\t\n\t\treturn $flagAccess;\n\t\t\n\t}", "protected function checkActionPermission($action) {\n if (!$this->form_name) {\n return false; //weirdness. should just stop whatever is happening\n }\n if (!parent::checkActionPermission($action)) {\n return false;\n }\n $task = \"person_can_\" . $action . \"_child_form_\" . $this->form_name ;\n return $this->hasPermission(\"task($task)\");\n }", "private function dontPerformAction($request)\n {\n return is_null(self::getSecurityToken()) || !$request->getVar('id') || !$request->getVar('type') ||\n !$request->getVar('s') || $request->getVar('s') != self::getSecurityToken();\n }", "public function verPuestos(){\n\t\t/* Esto se usa si la consulta se hace por post normal y no por angular \n\t\t$post_data = $this->input->post(NULL, TRUE);\n\t\tif($post_data!=null){\t\t\n\t\t\texit(var_export($post_data));\n\t\t}*/\n\t\t$acceso = $this->m_general->validarRol($this->router->class.'_puestos', 'list');\n\t\tif($acceso){\n\t\t\t$this->data['title'] = 'Colaboradores - Puestos';\n\t\t\t$this->load->view($this->vista_master, $this->data);\n\t\t}else{\n\t\t\tredirect('/acceso-denegado', 'refresh');\n\t\t}\n\t}", "public function authorize()\n {\n return PerfilPermissao::AcessoAction('PARCEIROS');\n }", "public function validAction($class, $method) {\n if($this->accesos=='*'){\n return true;\n }\n $valid = explode(\",\", $this->accesos);\n foreach ($valid as $v) {\n $v = trim($v);\n if (strtolower($GLOBALS[\"access\"][$v][1]) == $class && strtolower($GLOBALS[\"access\"][$v][2]) == $method) {\n return false;\n }\n }\n return false;\n }", "function ingresoController(){\n\t\tif ( empty($_POST['usuariolg']) || empty($_POST['passlg'])) {\n\t\t\t//echo \"Varibles vacias\";\n\t\t}else{\n\t\t\t\n\t\t\t$respuesta = (new AdminModel) -> ingresoM($_POST['usuariolg'], $_POST['passlg']);\n\t\t\tif (strtolower($respuesta[\"usuario\"]) == strtolower($_POST['usuariolg']) && $respuesta[\"password\"] == $_POST['passlg']) {\t\n\t\t\t\techo \"<span class=''>Salió</span>\";\n\t\t\t\tif($_SESSION['usuario']){\n\t\t\t\t\techo '<br>';\n\t\t\t\t\tif (empty($_GET['Tid'])) {\n\t\t\t\t\t\theader('Location: ?');\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\theader('Location: ?action=cartelera&Tid='.$_GET['Tid']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\techo \"<span class='noti'>Verifique sus datos<br> \".$respuesta['usuario'].\"</span>\";\n\t\t\t\t\t}\n\t\t\t}\t\n\t}", "public function beforeAction($action)\n {\n $userId = Yii::$app->session->get('userId');\n $userType = Yii::$app->session->get('userType');\n if(!isset($userId) || $userType != 'manager')\n {\n $this->redirect(array('/login'));\n }\n\n return true;\n }", "public function isPost();", "public function checkAccess($action, $model = null, $params = []): bool\n {\n return true;\n }", "public function _addOrEdit() {\n\t\tif($this->getRequest()->getParam('id')) { return true; } else { return false; }\n\t}", "public function testIsActionName(): void\n {\n foreach (['delete', 'edit', 'index', 'view'] as $action) {\n $this->assertFalse($this->Request->is($action));\n }\n\n $this->assertTrue($this->Request->is('add'));\n $this->assertTrue($this->Request->is(['add', 'edit']));\n $this->assertFalse($this->Request->is(['delete', 'edit']));\n }", "private function isCancelDelete($action)\r\n {\r\n $arrActionDel = array();\r\n $arrActionDel[] = \"delete\";\r\n $arrActionDel[] = \"incassodelete\";\r\n $arrActionDel[] = \"incassopredeclined\";\r\n $arrActionDel[] = \"incassostorno\";\r\n if (in_array(strtolower($action),$arrActionDel))\r\n {\r\n return true;\r\n }\r\n return false;\r\n }", "protected function validateAction() {\n\t\tif (isset($_POST['Action']) || isset($_POST['action'])) {\n\t\t\tif (isset($_POST['Action'])) {\n\t\t\t\t$action = htmlspecialchars($_POST['Action']);\n\t\t\t} else {\n\t\t\t\t$action = htmlspecialchars($_POST['action']);\n\t\t\t}\t\n\t\t\treturn strtolower($action);\n\t\t\t\n\t\t} else if (isset($_GET['Action']) || isset($_GET['action'])) {\n\t\t\tif (isset($_GET['Action'])) {\n\t\t\t\t$action = htmlspecialchars($_GET['Action']);\t\n\t\t\t} else {\n\t\t\t\t$action = htmlspecialchars($_GET['action']);\n\t\t\t}\n\t\t\treturn strtolower($action);\n\t\t\t\n\t\t} else {\n\t\t\tif (headers_sent()) {\n\t\t\t\treturn $this->getDefaultActionAfterHeaders();\n\t\t\t} else {\n\t\t\t\theader(\"Location: \".$this->getDefaultAction());\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t}", "private function _validate_user() {\n\t\treturn (current_user_can(\"edit_posts\") && current_user_can(\"edit_pages\") && !empty($this->buttons));\n\t}", "function onAction_agent_trojan()\n {\n $bAskPasscode = true;\n $code = false;\n\n $this->set('ask_passcode', false);\n\n if (isset($_POST['passcode']))\n {\n $code = $_POST['passcode'];\n }\n else if (isset($_GET['passcode']))\n {\n $code = $_GET['passcode'];\n }\n\n if ($code === PASSCODE_TROJAN)\n {\n $bAskPasscode = false;\n }\n\n if ($bAskPasscode === true)\n {\n // no passcode set or wrong, so must ask user\n $this->m_bRender = true;\n $this->set('ask_passcode', true);\n }\n else\n {\n // do some actions...\n\n // finally... redirect to main page\n $this->redirect('/');\n }\n }", "public function isAuthorized($user=null){\n\t\tif($user['role']=='user'){\n\t\t\tif(in_array($this->action,array('add','index','view'))){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->Session->setFlash('No puede acceder, NO TIENES PERMISOS!', 'default', array('class'=>'alert alert-danger'));\n\t\t\t\t$this->redirect(array('controller' =>'produccions','action'=>'index'));\n\n\t\t\t\t}\n\t\t\t}\n\t\tif($user['role']=='view'){\n\t\t\tif(in_array($this->action,array('index','view'))){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->Session->setFlash('No puede acceder, NO TIENES PERMISOS!', 'default', array('class'=>'alert alert-danger'));\n\t\t\t\t$this->redirect(array('controller' =>'produccions','action'=>'index'));\n\n\t\t\t\t}\n\t\t\t}\n\t\treturn parent::isAuthorized($user);\n\t}", "function _validate_uso_controladorModulos($idModulo, $idPermiso = null, $rolSessName) {\n $CI =& get_instance();\n if(!isset($_COOKIE[$CI->config->item('sess_cookie_name')])) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n $idPersona = $CI->session->userdata('nid_persona');\n $idRol = $CI->session->userdata($rolSessName);\n if($idPersona == null || $idRol == null) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n $CI->load->model('../m_utils', 'utiles');\n //VALIDAR QUE EL ROL TENGA EL PERMISO\n if($idPermiso != null) {\n if($CI->utiles->checkIfRolHasPermiso($idRol, $idModulo, $idPermiso) == false) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n }\n //VALIDAR QUE EL USUARIO TENGA EL ROL\n if($CI->utiles->checkIfUserHasRol($idPersona, $idRol) == false && $idRol != ID_ROL_FAMILIA) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n }", "private static function action_allowed( $action ) {\n\t\tif ( in_array( $action, self::allowed_actions() ) ) {\n\t\t\t$class = route::action_class( $action );\n\t\t\tif ( self::check_interface( $class ) && self::check_parent_class( $class ) ) {\n\t\t\t\treturn true;\n\n\t\t\t}\n\n\t\t}\n\n\t}", "public function validateCustomerAttributeActions()\n {\n $actionName = $this->getActionName();\n $attributeId = $this->_request->getParam('attribute_id');\n $websiteId = $this->_request->getParam('website');\n if (in_array($actionName, [self::ACTION_NEW, self::ACTION_DELETE])\n || in_array($actionName, [self::ACTION_EDIT, self::ACTION_SAVE])\n && !$attributeId\n || $websiteId\n && !$this->_role->hasWebsiteAccess($websiteId, true)\n ) {\n $this->_forward();\n return false;\n }\n return true;\n }", "public function authorize()\n {\n if(!isset($this->action)){\n return false;\n }\n\n if($this->action === \"add\"){\n return Auth::guard('api')->check();\n }else if($this->action === \"update\" || $this->action === \"delete\"){\n if(empty($this->income) || Helper::getStringType($this->income) !== \"integer\"){\n return false;\n }\n\n // not existing or deleted\n if(empty((new Income)->income($this->income))){\n return false;\n }\n\n return Income::canModify(Auth::guard('api')->id(), $this->income) && Auth::guard('api')->check();\n }\n\n return false;\n }", "public function authorize()//AQUI QUE VALIDA USUÀRIO\r\n {\r\n return true;\r\n }", "public function validateAction(){\n if($this->_request->getParam('type') == 'themes') {\n if (in_array(utf8_encode(( $this->_request->getParam('value') )), $_SESSION['theme_name']))\n echo 1;\n else\n echo 0;\n }\n elseif($this->_request->getParam('type') == 'category'){\n $cat_themes_id = explode(\",\",$this->_request->getParam('cat_themes_id'));\n for($i=0;$i<count($cat_themes_id);$i++) {\n $key = utf8_encode(($this->_request->getParam('value'))) . \"###\" . $cat_themes_id[$i];\n if (in_array($key, $_SESSION['category_name_and_themes_id'])) {\n echo 1;break;\n }\n else\n echo 0;\n }\n }\n elseif($this->_request->getParam('type') == 'tokens'){\n $tokens_category_id = explode(\",\",$this->_request->getParam('tokens_category_id'));\n for($i=0;$i<count($tokens_category_id);$i++) {\n $key = utf8_encode(($this->_request->getParam('value') )) . \"###\" . $tokens_category_id[$i] . \"###\" . $this->_request->getParam('tokens_themes_id');\n if (in_array($key, $_SESSION['token_name_category_id_themes_id'])){\n echo 1;break;\n }\n else\n echo 0;\n }\n }\n exit;\n }", "public function authorize()\n {\t//para ver si el usuario tiene acceso a este metodo\n //return false;\n return true;\n }", "public function cadastroNovo($params) {\n $query = $this->db->execute(\"SELECT * FROM cargo\");\n // Atribui os valores da conulta para passagem para a view\n $this->cargosUsuarios = $query;\n \n $this->page = 'login/cadastrar';\n \n if (isset($_POST[\"nome\"]) && isset($_POST[\"login\"]) && isset($_POST[\"senha\"])) {\n $nome = $_POST[\"nome\"];\n $login = $_POST[\"login\"];\n $senha = MD5($_POST[\"senha\"]);\n $email = $_POST[\"email\"];\n $cargo = $_POST[\"cargo\"];\n $status = $_POST[\"status\"];\n\n if (isset($_POST[\"submit\"])) {\n $resultado = $this->db->execute(\"INSERT user (nome_user, login_user, email_user, cargo_user, senha_user, status_user) values (?, ?, ?, ?, ?, ?);\", [\n 'values' => [\n $nome,\n $login,\n $email,\n $cargo,\n $senha,\n $status,\n ],\n 'types' => [\n 's',\n 's',\n 's',\n 'i',\n 's',\n 'i',\n ],\n ]);\n header('Location: /login/cadastrado');\n } else {\n echo \"<script language='javascript' type='text/javascript'>alert('Preencha pelo menos um dos campos!');window.location.href='login.html'</script>\";\n } \n }\n }", "function shouldredirecttofilter() {\n if (!$this->has_filters()) {\n return false;\n }\n\n if ($data = data_submitted()) {\n //a forum submit action happened, so render the report\n return false;\n }\n\n if (!empty($_GET)) {\n //determine how many URL parameters were passed in\n $array_get = (array)$_GET;\n $num_elements = count($array_get);\n\n if (isset($array_get['report'])) {\n //don't count the report shortname\n $num_elements--;\n }\n\n if ($num_elements > 0) {\n //a non-innocuous URL parameter was passed in,\n //so render the report\n return false;\n }\n }\n\n return true;\n }", "protected function auth( $action = 'login' , $data = Null )\n\t{\n\n\t}", "function check_required_param($param = array(),$method){\n //set up method\n if (strtolower($method) == \"post\"){\n $r = $_POST;\n }else if (strtolower($method) == \"get\"){\n $r = $_GET;\n }\n //check of required param\n foreach ($param as $par){\n if (!isset($r[$par]) || empty($r[$par])){\n return false;\n break;\n }\n }\n return true;\n}", "private function checkOwner() {\r\n if (!$this->model->isOwner()) {\r\n $this->api->redirect('contact/home?message=Cannot Be Accessed');\r\n }\r\n }", "public function canActOnTarget($action,$target) {\n // owner of target -> always yes, except for verification\n // all other situatons -> check role action targets\n // - matching globals -> yes\n // - specifics\n // + gets messy\n // - otherwise -> no\n\n if (is_string($action)) {\n global $ACTIONS;\n $action = $ACTIONS[$action];\n }\n\n // system admin -> always yes\n if ($this->flag_is_system_admin) {\n return true;\n }\n\n// util_prePrintR($action);\n// util_prePrintR($target);\n\n // owner of target -> always yes, except for verification\n if ($target->user_id == $this->user_id) {\n if ($action->name != 'verify') { return true; }\n }\n\n\n // view & list is controlled by flags on the object rather than explicit permissions / access records\n if (($action->name == 'view') || ($action->name == 'list')) {\n if (array_key_exists('flag_active',$target->fieldValues)) {\n if ($target->flag_active) {\n return true;\n }\n } elseif (array_key_exists('flag_workflow_published',$target->fieldValues)) {\n if (($target->flag_workflow_published) && (($target->flag_workflow_validated))) {\n return true;\n }\n }\n }\n\n // all other situatons -> check role action targets\n $this->cacheRoleActionTargets();\n\n // - matching globals -> yes\n $target_global_type = Role_Action_Target::getGlobalTargetTypeForObject($target);\n if (in_array($target_global_type,array_keys($this->cached_role_action_targets_hash_by_target_type_by_id))) {\n foreach ($this->cached_role_action_targets_hash_by_target_type_by_id[$target_global_type] as $glob_rat) {\n if ($glob_rat->action_id == $action->action_id) {\n return true;\n }\n }\n }\n\n// util_prePrintR($this->cached_role_action_targets_hash_by_target_type_by_id);\n\n // - specifics\n // + gets messy\n\n // if the allowed target types do not contain the specific type of the target in question, then no need to go further\n\n // get a list of all the specific ids to check. This gets a bit messy as we have to climb or include a hierarchy depending on what exactly the target is\n\n// util_prePrintR($target);\n\n $ids_to_check = array();\n\n $target_class = get_class($target);\n switch ($target_class) {\n case 'Authoritative_Plant':\n $ids_to_check = array($target->authoritative_plant_id);\n break;\n case 'Authoritative_Plant_Extra':\n // can act on this if can act on the plant\n return $this->canActOnTarget($action,$target->getAuthoritativePlant());\n break;\n case 'Metadata_Structure':\n // can edit this if can edit itself or any parent\n $ids_to_check = Db_Linked::arrayOfAttrValues($target->getLineage(),'metadata_structure_id');\n break;\n case 'Metadata_Term_Set':\n // can edit if can edit any structure that uses this term set\n $structures = Metadata_Structure::getAllFromDb(['metadata_term_set_id'=>$target->metadata_term_set_id],$this->dbConnection);\n $ids_to_check = array();\n foreach ($structures as $s) {\n $ids_to_check = array_merge($ids_to_check,Db_Linked::arrayOfAttrValues($s->getLineage(),'metadata_structure_id'));\n }\n break;\n case 'Metadata_Term_Value':\n // can edit if can edit any structure that uses the term set for which this is a value\n return $this->canActOnTarget($action,Metadata_Term_Set::getOneFromDb(['metadata_term_set_id'=>$target->metadata_term_set_id],$this->dbConnection));\n break;\n case 'Metadata_Reference':\n // can edit if can edit anything to which this refers\n return $this->canActOnTarget($action,$target->getReferrent());\n break;\n case 'Notebook':\n $ids_to_check = array($target->notebook_id);\n break;\n case 'Notebook_Page':\n // can act on if can act on the notebook that contains this page\n return $this->canActOnTarget($action,$target->getNotebook());\n break;\n case 'Notebook_Page_Field':\n // can act on if can act on the notebook that contains the notebook page that this page field\n return $this->canActOnTarget($action,$target->getNotebookPage()->getNotebook());\n break;\n case 'Specimen':\n $ids_to_check = array($target->specimen_id);\n break;\n case 'Specimen_Image':\n // can act on if can act on the specimen\n return $this->canActOnTarget($action,$target->getSpecimen());\n break;\n default:\n break;\n }\n\n// util_prePrintR($ids_to_check);\n// util_prePrintR($this->cached_role_action_targets_hash_by_target_type_by_id);\n\n $target_specific_type = Role_Action_Target::getSpecificTargetTypeForObject($target);\n if (! in_array($target_specific_type,array_keys($this->cached_role_action_targets_hash_by_target_type_by_id))) {\n return false;\n }\n\n foreach ($this->cached_role_action_targets_hash_by_target_type_by_id[$target_specific_type] as $spec_rat) {\n if (($spec_rat->action_id == $action->action_id) && (in_array($spec_rat->target_id,$ids_to_check))) {\n if ($action->name == 'view') {\n $actual_target = $spec_rat->getTargets()[0];\n if (array_key_exists('flag_workflow_published',$actual_target->fieldValues)) {\n return $actual_target->flag_workflow_published && $actual_target->flag_workflow_validated;\n }\n }\n return true;\n }\n }\n\n return false;\n }", "public function isActionAllowed($section, $reference, $action = NULL) ;", "public function authorize()\n {\n /* \n AQUI PODRIA REALIZAR ALGÚN TIPO DE VALIDACIÓN INDICANDO SI EL USUARIO TIENE\n PERMISOS PARA CREAR EL RECURSO, EN ESTE CASO SOLO DEVUELVO EL true PARA INDICAR\n QUE CUALQUIER USUARIO PUEDE CREAR EL RECURSO\n */\n return true;\n }", "public function beforeFilter(){\n\t\tparent::beforeFilter();\n// debug('test');\n\t\tif (isset($this->Auth)) {\n\t\t\t$this->Auth->allow('process');\n\t\t}\n\t\tif (isset($this->Security) && $this->action == 'process') {\n\t\t $this->Security->validatePost = false;\n\t\t}\n\t}", "public function isRequest();", "function tieneAcceso($menu)\n{\n $ci = get_instance();\n $controlador = $ci->uri->segment(1);\n //$metodo = $ci->uri->segment(2);\n\n // Verificamos si la se esta accediento a un metodo de un controlador de\n // vista para compara con los slug registrados\n// if ($metodo != '') {\n// $funcion = $controlador ;\n// } else {\n $funcion = $controlador;\n// }\n\n if ($funcion === 'inicio') { // Si es inicio el controlador inicio con el metodo de cambio (que es metodo que llama a plantilla)\n return true;\n } else {\n if (in_array($funcion, $menu)) {\n return true;\n } else {\n return false;\n }\n }\n}", "protected function isControllerAction()\n {\n return is_string($this->action['uses']);\n }", "protected function isControllerAction()\n {\n return is_string($this->action['uses']);\n }", "public function __checkAuthentication($user, $action) {\n $action = $this->action;\n $authFlag = false;\n $role = $this->UserAuth->user(\"user_role\");\n switch ($role) {\n case 1001:\n if (in_array($action, $this->superadminActions)) {\n $authFlag = true;\n $action = 'index';\n }\n break;\n case 1002:\n if (in_array($action, $this->adminActions)) {\n $authFlag = true;\n $action = 'index';\n }\n break;\n case 1003:\n if (in_array($action, $this->instituteAdminActions)) {\n $authFlag = true;\n $action = 'index';\n }\n break;\n case 1004:\n if (in_array($action, $this->branchActions)) {\n $authFlag = true;\n $action = 'index';\n }\n break;\n case 1005:\n if (in_array($action, $this->teacherActions)) {\n $authFlag = true;\n $action = 'index';\n }\n break;\n case 1006:\n if (in_array($action, $this->accountantActions)) {\n $authFlag = true;\n $action = 'index';\n }\n break;\n case 1007:\n if (in_array($action, $this->parentActions)) {\n $authFlag = true;\n $action = 'index';\n }\n break; \n default:\n if (in_array($action, $this->guestActions)) {\n $authFlag = true;\n $action = 'index';\n }\n break;\n }\n\n if (!$authFlag) {\n $this->_setFlashMsgs(__('You are not authorized for this action'), 'danger');\n $this->redirect($this->UserAuth->redirect());\n return false;\n } else {\n return true;\n }\n return self::isAuthorized($user);\n }", "public function isActionRequest()\n\t{\n\t\t$this->_checkRequestType();\n\t\treturn $this->_isActionRequest;\n\t}", "function is_allowed($arg1,$arg2,$arg3 = \"DEFAULT\"){\n\t\tif ($arg3 == \"DEFAULT\") {\n\t\t\treturn $this->is_allowed_2($arg1,$arg2,$this->login_identifier);\n\t\t} else {\n\t\t\treturn $this->is_allowed_2($arg1,$arg2,$arg3);\n\t\t}\n\t}", "public function authorize()\n { \n if($this->user()->hasRole(['unidadeEnsino', 'articulador', 'superadministrador']))\n {\n return true;\n }else {\n $this->error = 'Desculpe, voce nao possui permissão para adicionar espaços';\n return false;\n }\n }", "function formConnexion() {\n\t\tif (isset($_SESSION['id'])) {\n\t\t\theader(\"Location: ?module=accueil\");\n\t\t\texit();\n\t\t}\n\t\telse\n\t\t\t$this -> vue -> afficheConnexion('');\n\t}", "private function checkControllerIdParam()\n {\n $id = $this->getRequest()->getParam('id');\n\n IF($id === NULL || is_numeric($id) === FALSE || $this->dbCtrl->find($id)->count() === 0) {\n throw new Admin_Model_Acl_Exception('Invalid or no Id Parameter given');\n }\n\n RETURN (int) $id;\n }", "protected function _checkToken(KCommandContext $context)\n {\n //Check the token\n if($context->caller->isDispatched())\n { \n $method = KRequest::method();\n \n //Only check the token for PUT, DELETE and POST requests (AND if the view is not 'ipn')\n if(($method != KHttpRequest::GET) && ($method != KHttpRequest::OPTIONS) && (KRequest::get('get.view', 'string') != 'ipn')) \n { \n if( KRequest::token() !== JUtility::getToken()) { \n return false;\n }\n }\n }\n \n return true;\n }", "public function authorize()\n {\n /*\n * Ovde mozete vrsiti proveru da li vas user ima dozvolu\n * za kreiranje Bloga, i vrsiti bilo kakvu dodatnu proveru u zavisnosti od\n * biznis logike\n * (pr. mozda user mora da ima min 18 godina da bi submitovao blog)\n *\n * Posto nemam nikakvu logiku za to, samo vracam true\n */\n return true;\n }", "function is_protected_ajax_action()\n {\n }", "public function action(): ?string\n {\n $action = $this->parameters()[2] ?? null;\n\n return in_array($action, Belich::getAllowedActions())\n ? $action\n : null;\n }", "public function user_is_allowed()\n {\n //check if the record exist\n if (! $this->record) {\n $this->build_error('These record does not exist or it may not belong to you',404);\n }\n\n //check if the user is the owner of the entry\n if(!isOwner($this->record)) {\n $this->build_error('you are not the owner of this task');\n }\n\n //check if the incomming entries type is Array\n if (!is_array($this->request->entries)) {\n $this->build_error('Please the entries must be an Array');\n }\n }", "function procCtrl($ar){\n $ok = true;\n \n $p = new XParam($ar, array());\n \n // dtff !empty = date valide = écran edition\n // age si < 18 => champs complémentaire\n $dtnaiss = $this->xset->desc['dtnaiss']->post_edit($p->get('dtnaiss'));\n $diff = date_diff(new DateTime(date('Y-m-d')), new DateTime($dtnaiss->raw));\n if ($diff->y < 18){\n foreach($this->eplmodule->modcustomer->parentMandFields as $fn){\n $v = trim($p->get($fn));\n if (empty($v)){\n $ok = false;\n }\n }\n if (!$ok){\n $_REQUEST['message'] .= \"Pour un mineur renseigner les champs 'Responsable légal'\";\n }\n }\n if ($ok && $ar['_typecontrol'] == 'insert'){\n $wtpcard = trim($p->get('wtpcard'));\n if (empty($wtpcard)){\n $ok = false;\n $_REQUEST['message'] = 'Merci de renseigner le numéro de carte'; \n } else {\n list($okcard, $messcard) = $this->checkNewWTPCard($wtpcard);\n if (!$okcard){\n $ok = false;\n $_REQUEST['message'] .= $messcard;\n }\n }\n }\n// $_REQUEST['message'] .= 'TESTS';\n// $ok = false;\n$this->erreurCtrl = !$ok;\n return $ok;\n\n }", "public function completeresetAction() {\n if ($this->request->isPost()) {\n //Get the info\n $verify = $this->request->getPost('verify-key');\n $email = $this->request->getPost('verify-email');\n $password1 = $this->request->getPost('password1');\n $password2 = $this->request->getPost('password2');\n \n //Check to make sure all field conditions are met\n if(!filter_var($email, FILTER_VALIDATE_EMAIL)) { //email check\n $this->flash->error(\"This is not an email :(\");\n return $this->forward('session/verifyreset/'.$verify);\n }\n if($password1 != $password2 || !$password1) { //password check\n $this->flash->error(\"Passwords are not the same.\");\n return $this->forward('session/verifyreset/'.$verify);\n } \n if(!$verify) { //verify empty check\n $this->flash->error(\"Careful, no funny stuff. The Brown University Beekeeping Society is always watching ;)\");\n return $this->forward('session/verifyreset/'.$verify);\n }\n //Find a user with the appropriate things. \n $user = Users::findFirst(\n array( //emails are unique so its fine\n \"(email = :email: AND verify=:verify:)\",\n 'bind' => array('email' => addslashes($email), 'verify' => addslashes($verify))\n )\n );\n if(!$user) {\n $this->flash->error(\"Reset password failed: Invalid email or link. Try again or contact support.\");\n return $this->forward('session/tryreset');\n } else if ((time() - $user->verify_timer) > 600) {\n $this->flash->error(\"Reset password failed: Expired.\");\n return $this->forward('session/tryreset');\n } else {\n if(!$user->setPassword($password1)) {\n $this->flash->error('Fatal Hashing Error. Contact a dev.');\n return $this->forward('session/completereset');\n }\n if ($user->save() == false) {\n foreach ($user->getMessages() as $message) {\n $this->flash->error((string) $message);\n }\n $this->flash->error('Wow, that broke. Couldn\\'t save the password');\n } else {\n $this->flash->success('Success! Please log in.');\n } \n }\n \n }\n return $this->forward('session/index');\n }", "public function check($action = '')\n {\n $action_field = explode('.', trim($action,\"' \"));\n $_action = $action_field[0] ?? null;\n $_field = $action_field[1] ?? null;\n\n $permissions = $this->permissions();\n $_permission = false;\n\n\n if($_action)\n {\n //$_permission = !isset($permissions[$_action]) ?: !!$permissions[$_action];\n\n $_permissions = $permissions[$_action] ?? null;\n $_permission = ($_permissions) ? !!$_permissions : $_permission;\n\n if($_field && is_array($_permissions))\n {\n $_permission = (isset($_permissions[$_field])) ? !!$_permissions[$_field] : false;//$_permission;\n }\n }\n\n return $_permission;\n }", "public function is_accessible_controller() {\r\n\t\tinclude_once 'menu_aksi.php';\r\n\t\t$menu_aksi = new menu_aksi($this->Command);\r\n\t\tif($menu_aksi->getByController(true) != 0) {\r\n\t\t\tinclude_once 'menu_function_aksi.php';\r\n\t\t\t$menu_function_aksi = new menu_function_aksi($this->Command);\r\n\t\t\tif($menu_function_aksi->getByName(true) != 0) {\r\n\t\t\t\t$this->model = new permission();\r\n\t\t\t\t$this->model->set_select_full_prefix('select * from permission p,user u');\r\n\t\t\t\t$this->model->set_select_full_suffix('p.ROLE = u.ROLE and p.MENU = (select id_menu from menu where controller=\\'' . $this->Command->getControllerName() . '\\') and u.USERNAME=\\'' . $this->Command->getUserLogged()->get_username() . '\\' and menu_function=(select id_menu_function from menu_function where nama_menu_function=\"' . $this->Command->getFunction() . '\" limit 1)');\r\n\t\t\t\treturn ($this->svc->select_count($this->model) > 0) ? true : false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "private function voltarIndexAction () {\n // Grava em sessão as preferências do usuário para essa grid\n $sessao = new Orcamento_Business_Sessao ();\n $url = $sessao->retornaOrdemFiltro($this->_controle);\n\n if ($url) {\n // Redireciona para a url salva em sessão\n $this->_redirect($url);\n } else {\n // Redireciona para a url combinada entre modulo/controle/index\n $this->_redirect($this->_modulo . '/' . $this->_controle);\n }\n }", "function isAuthorized($type = null, $object = null, $user = null)\n {\n $valid = parent::isAuthorized($type, $object, $user);\n \n if(!$valid && $type == 'actions' && $this->user($this->parentModel))\n {\n // get the groups from the Session, and set the proper Aro path\n $otherRoles = $this->user($this->parentModel);\n $valid = $this->Acl->check(array($this->parentModel => array('id' => $otherRoles)), $this->action()); \n\t\t} \n return $valid;\n }", "public function pesquisarAction() {\r\n \r\n }", "function isContactMode() {\n\n if (isset($_GET['cont'])) {\n return true;\n } else {\n return false;\n }\n\n}", "public function authorize() {\n\t\t$this->competitor = $this->route('competitor');\n\t\treturn $this->user()->can('update', $this->competitor);\n\t}", "function Validate($action)\n\t{\n\t\t$fields = array(\n\t\t\t'username' => '/\\w{3}/',\n\t\t\t'password' => '/[^\\s]{3}/',\n\t\t\t);\n\t\t// A blank password during a save means they are not updating the password.\n\t\tif ($action == 'save' && empty($this->password)) {\n\t\t\t$fields['password'] = '//';\n\t\t}\n\t\tforeach ($fields as $field=>$pattern) {\n\t\t\tif (!preg_match($pattern, $this->$field)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "function cc_check_perm($data) {\n global $xoopsUser, $xoopsModule;\n $uid = is_object($xoopsUser)?$xoopsUser->getVar('uid'):0;\n\n $pass = isset($_GET['p'])?$_GET['p']:\"\";\n if ($pass) {\n\t$_SESSION['onepass'] = $pass;\n } else {\n\t$pass = (empty($_SESSION['onepass'])?\"\":$_SESSION['onepass']);\n }\n if (!empty($data['onepass']) && $data['onepass']==$pass) return true;\n\n $mid = is_object($xoopsModule)?$xoopsModule->getVar('mid'):0;\n if ($uid && $xoopsUser->isAdmin($mid)) return true;\n $cgrp = $data['cgroup'];\n if ($cgrp && $uid && in_array($cgrp, $xoopsUser->getGroups())) return true;\n if ($uid && ($data['uid']==$uid || $data['touid'] == $uid)) return true;\n return false;\n}", "public function authorize()\n {\n return true; //CUANDO GENERAMOS UN request TENEMOS QUE ESPECIFICAR QUE ESTA AUTORIZADFO PONIENDO TRUE\n }", "public function accessControl($key = NULL) {\n // get the controller and action\n if (!$this->_request) {\n $this->_request = Zend_Controller_Front::getInstance()->getRequest();\n $this->_controller = $this->_request->getControllerName();\n $this->_action = $this->_request->getActionName();\n }\n \n // get the user role from the view\n if (!empty($this->view->user) && !empty($this->view->user->role_id)) {\n $role_id = (int) $this->view->user->role_id;\n } else {\n $role_id = Users::ROLE_GUEST;\n }\n \n // iterate down the restrictions chain for access\n if (isset($this->_restrictions[$role_id])) {\n if (isset($this->_restrictions[$role_id][APPLICATION_ENV])) {\n if (isset($this->_restrictions[$role_id][APPLICATION_ENV][$this->_controller])) {\n // check if disallowed controller access\n if ($this->_restrictions[$role_id][APPLICATION_ENV][$this->_controller] === '*') {\n return false;\n }\n // check if disallowed action access\n if (isset($this->_restrictions[$role_id][APPLICATION_ENV][$this->_controller][$this->_action])) {\n // check for level of action disallow\n if ($this->_restrictions[$role_id][APPLICATION_ENV][$this->_controller][$this->_action] === '*') {\n return false;\n }\n // check if disallowed key access\n if ($key !== NULL) {\n if (isset($this->_restrictions[$role_id][APPLICATION_ENV][$this->_controller][$this->_action][$key])) {\n return false;\n }\n }\n }\n }\n }\n }\n \n // unknown role id\n else {\n return false;\n }\n \n // all checks passed, they must be good\n return true;\n \n }", "private function _verifyAction($controllerName, $action, $config){\n \tif (array_key_exists('rest', $config) && \n \t\t\tarray_key_exists($controllerName, $config['rest']) &&\n \t\t\tarray_key_exists($this->method, $config['rest'][$controllerName]) &&\n \t\t\t$config['rest'][$controllerName][$this->method]==strtolower($action)\n \t\t\t) {\n\t\t\treturn $config['rest'][$controllerName][$this->method];\n \t}\n \treturn false;\n }", "public function authorize()\n {\n // パラメータのIDからで削除対象のリプライを取得\n $post = Post::find($this->route(\"id\"));\n // if ($reply == null) return false;\n\n return $post && $this->user()->id == $post->user_id ? true : false;\n }" ]
[ "0.64699596", "0.6367404", "0.6282951", "0.6119962", "0.599542", "0.598975", "0.5808571", "0.5792009", "0.57783", "0.573892", "0.57306397", "0.5699707", "0.5695547", "0.5682496", "0.5681204", "0.5613009", "0.55857974", "0.55597484", "0.5527531", "0.5503605", "0.5503064", "0.54950327", "0.54735625", "0.54689914", "0.5464644", "0.5464567", "0.5444268", "0.5431988", "0.54283404", "0.5421512", "0.5406807", "0.5397918", "0.53866374", "0.53812355", "0.536654", "0.53631306", "0.5313819", "0.5308834", "0.5308775", "0.53064203", "0.5297198", "0.52946925", "0.52907795", "0.52884024", "0.5284009", "0.52799696", "0.5278436", "0.52773035", "0.5275743", "0.5264776", "0.5258166", "0.52541673", "0.52452457", "0.52443355", "0.5241386", "0.5231538", "0.5230815", "0.52276325", "0.52267486", "0.52266216", "0.52256334", "0.5225444", "0.5222923", "0.52180773", "0.5213078", "0.5207309", "0.5199722", "0.51971567", "0.51934457", "0.5191204", "0.5187386", "0.51872563", "0.518715", "0.5184766", "0.5184766", "0.5182995", "0.51783633", "0.5176483", "0.5176031", "0.51666564", "0.5156189", "0.5154541", "0.5153837", "0.51523715", "0.51511896", "0.51508886", "0.51472753", "0.5146132", "0.5142451", "0.51397103", "0.51348484", "0.5134032", "0.51334506", "0.5132957", "0.5132511", "0.5127717", "0.5126872", "0.5126651", "0.51243675", "0.5124081", "0.51216435" ]
0.0
-1
Codifica uma array para url
function url_encode(array $values) { return http_build_query($values); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_url(): array\n {\n // get the full url as an array\n $url['raw'] = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n $url['array'] = explode(\"/\", $url['raw']);\n\n // shift the array to remove the first useless array key and remove blank values\n array_shift($url['array']);\n $url['array'] = array_filter($url['array']);\n\n // return the url array\n return $url['array'];\n }", "public function getUrlAsArray(): array\n {\n return \\explode('/', $this->url);\n }", "static public function getUrlArray()\n {\n \tstatic $url_array = NULL;\n \tif( is_null( $url_array ) ) {\n\t\t\t$url_array = explode( '/', ltrim( parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ), '/' ) );\n\t\t\tforeach( $url_array as &$url_part ) {\n\t\t\t\t$url_part = ( $url_part !== \"\" ) ? strtolower( $url_part ) : \"index\";\n\t\t\t}\n\t\t}\n\t\treturn $url_array;\n }", "public function implodeArrayForUrlDataProvider() {}", "private function processURLtoArray($url) {\n #If the request isn't set then no url parameters have been used\n if (is_null($url)) {\n $this->exceptionWithResponseCode(400,$this->genericExceptionMessages[\"URLFormat\"]);\n }\n\n #Split the request into seperate parts, with the slash as a seperator\n #Note that apache will collapse multiple /'s into a single /)\n $requestArray = explode(\"/\",$url);\n\n #We should probably ignore trailing slashes, which will generate an empty array element\n #Using strlen so that '0' is not removed\n $requestArray = array_filter($requestArray, 'strlen');\n\n #The request url should have either 4 or 5 elements\n if(!in_array(count($requestArray),array(4,5))){\n $this->exceptionWithResponseCode(400,\n \"Request URL has the wrong number of elements. \" . $this->genericExceptionMessages[\"URLFormat\"]\n );\n }\n\n return $requestArray;\n }", "public function parseUrl()\n { #Explode para transformar em array, seprando por /, rtrim para retirar os espaços vazios, filter_ sanitize_url fucao do php para retirar caractres ilegais \n return explode(\"/\",rtrim($_GET['url']),FILTER_SANITIZE_URL);\n }", "public function explodeUrl2ArrayDataProvider() {}", "public function testUrlArray(): void\n {\n $expected = [\n 'controller' => 'Bookmarks',\n 'action' => 'view',\n 'plugin' => false,\n 'prefix' => false,\n ];\n $this->assertSame($expected, urlArray('Bookmarks::view'));\n\n $expected = [\n 'controller' => 'Bookmarks',\n 'action' => 'view',\n 'prefix' => 'Admin',\n 'plugin' => false,\n ];\n $this->assertSame($expected, urlArray('Admin/Bookmarks::view'));\n\n $expected = [\n 'controller' => 'Articles',\n 'action' => 'view',\n 'plugin' => 'Vendor/Cms',\n 'prefix' => 'Management/Admin',\n 3,\n '?' => ['query' => 'string'],\n ];\n $params = [3, '?' => ['query' => 'string']];\n $this->assertSame($expected, urlArray('Vendor/Cms.Management/Admin/Articles::view', $params));\n }", "public function getUrls(): array;", "public function getUrls(): array;", "private function parseUrl()\n {\n try\n {\n if(isset($_GET[Constants::GET_ARRAY_URL]))\n {\n $url = $_GET[Constants::GET_ARRAY_URL];\n\n //Remove the Additional Slashes and Separate the url\n return explode('/',filter_var(rtrim($url,'/')), FILTER_SANITIZE_URL);\n }\n }\n catch (Exception $e)\n {\n return null;\n }\n }", "public function getUriArray(){\n\t\t$this->prepareRuta();\n\t\treturn $this->uriArray;\n\t}", "private function url($lst) {\n\n return explode(\",\", $lst);\n\n }", "function _a2ua($name,$array){\n $urlarray = array();\n foreach((array) $array as $key => $val){\n $urlarray[$name.'['.$key.']'] = $val;\n }\n return $urlarray;\n }", "private function __parseUrl()\n {\n if (isset($_GET['url'])) {\n return explode('/', filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL));\n }\n return [];\n }", "public function getUriList();", "protected function urlToArray(&$item)\n {\n $parse_url = parse_url($item['url']);\n\n if ($parse_url) {\n $path = $parse_url['path'];\n $params = [];\n\n # Set Url\n $item['url'] = [$path];\n\n if (!empty($parse_url['query'])) {\n $query = $parse_url['query'];\n $queries = explode('&', $query);\n\n foreach ($queries as $key => $value) {\n $split_equal = explode('=', $value);\n $params += [$split_equal[0] => $split_equal[1]];\n }\n\n $item['url'] += $params;\n }\n }\n }", "protected function array2url($arr){\n if (!is_array($arr)){\n return false;\n }\n $query = '';\n foreach($arr as $key => $value){\n $query .= $key . \"=\" . $value . \"&\";\n }\n return $query;\n }", "public function toArray(): array\n {\n return [\n 'url' => $this->url\n ];\n }", "private function _parseUrl() {\n if (($url = Utility\\Input::get(\"url\"))) {\n\n // Trim, sanitise and return a exploded URL string.\n return(explode(\"/\", filter_var(rtrim($url, \"/\"), FILTER_SANITIZE_URL)));\n }\n return [];\n }", "public function urlarray($string = '') {\n $a = explode('/', strtolower($string));\n $array = array();\n $key = '';\n foreach($a as $k => $v){\n if($k % 2 == 0){\n $key = $v;\n } else {\n $array[$key] = $v;\n }\n }\n return $array;\n }", "private function getUrlValues($url): array {\n $data = [];\n $splittedUrl = explode('/', $url);\n $splittedServerUrl = explode('/', $_SERVER['REQUEST_URI']);\n if(sizeof($splittedUrl) === sizeof($splittedServerUrl)) {\n for($i = 0; $i < sizeof($splittedUrl); $i++) {\n if($splittedUrl[$i] === $splittedServerUrl[$i]) {\n continue;\n } else {\n if($splittedUrl[$i][0] === '{' && $splittedUrl[$i][strlen($splittedUrl[$i]) - 1] === '}') {\n $data[substr($splittedUrl[$i], 1, strlen($splittedUrl[$i]) - 2)] = $splittedServerUrl[$i];\n }\n }\n }\n }\n return $data;\n }", "private function getUrls() {\n\t\t// reassign the array because of a php bug (solved later with php 5.2.x @see: http://bugs.php.net/39449)\n\t\t$arr = $this->formData;\n\n\t\t// build bas URL for replacement variables\n\t\t$protocol\t= 'http'\n . ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ? 's' : '' )\n . '://';\n\t\t$url\t\t= $_SERVER['HTTP_HOST'] . dirname( $_SERVER['PHP_SELF'] ) . '/';\n $url = str_replace( '//', '/', $url ); // some server add 2 /\n $url = $protocol . $url . 'index.php?route=payment/directebanking/';\n\n\t\tif( $this->_param['successUrlStd'] ) {\n\t\t\t$arr['user_variable_0'] = $url . 'success'\n\t\t\t. '&transaction=-TRANSACTION-&security_criteria=-SECURITY_CRITERIA-'\n\t\t\t. '&order_id=-USER_VARIABLE_3-&pid=-PROJECT_ID-';\n\t\t}else{\n\t\t\tif( $this->_param['successUrl'] ) {\n\t\t\t\t$arr['user_variable_0'] = $this->_param['successUrl'];\n\t\t\t}\n\t\t}\n\n\t\tif( $this->_param['cancelUrlStd'] ) {\n\t\t\t$arr['user_variable_1'] = $url . 'cancel'\n\t\t\t. '&transaction=-TRANSACTION-&order_id=-USER_VARIABLE_3-&pid=-PROJECT_ID-';\n\t\t}else{\n\t\t\tif( $this->_param['cancelUrl'] ) {\n\t\t\t\t$arr['user_variable_1'] = $this->_param['cancelUrl'];\n\t\t\t}\n\t\t}\n\n\t\t// and reassign again\n\t\t$this->formData = $arr;\n\n\t\tunset( $arr );\n\t}", "public function getArrayLinkUrls($data = null)\n {\n $array_data = explode(',', $data);\n $array_link_urls = [];\n foreach ($array_data as $val) {\n $array_link_urls[] = array(\n 'link_url' => $val\n );\n }\n \n return $array_link_urls;\n }", "private function getUrl() {\n $parameters = array();\n $url = parse_url($_SERVER['REQUEST_URI']);\n foreach (explode(\"/\", $url['path']) as $p)\n if ($p != '')\n $parameters[] = $p;\n\n return $parameters;\n }", "private function _url($par = array()) {\n\t\t$get = $_GET;\n\t\t\n\t\tforeach ((array) $par AS $key => $val) { //overide value\n\t\t\tif ($key == 'path') //if path, encode\n\t\t\t\t$get['path'] = \\Crypt::encrypt($val);\n\t\t\telse\n\t\t\t\t$get[$key] = $val;\n\t\t}\n\t\t\n\t\t$url = '//';\n\t\t\n\t\t$url .= $this->_sanitize(g($_SERVER, 'HTTP_HOST').'/'.strtok(g($_SERVER, 'REQUEST_URI'), '?'));\n\t\t\n\t\treturn $url.'?'.http_build_query($get);\n\t}", "private function _getUrl()\n {\n // Explode url to the array Variabels (url)\n $url = isset($_GET['url']) ? $_GET['url'] : null;;\n $url = rtrim($url, '/');\n $url = filter_var($url,FILTER_SANITIZE_URL);\n $this->_url = explode('/', $url);\n }", "function uri_to_array($index=0){\n\t\t\tif(is_array($this->path)){\n\t\t\t\treturn array_slice($this->path,$index);\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function parseURL($url){\r\n //Explodeo la url para convertirla en un array\r\n $urlExploded = explode('/' ,$_GET['action']);\r\n //Creo un nuevo array y en la posición 'action' le asigno la acción recibida\r\n $arrayReturn[ConfigApp::$ACTION] = $urlExploded[0];\r\n //Si esta seteado, llama al metodo array_slice(), lo que hace este metodo es crear un arrego a partir de una posición dada, en este caso desde la posición 1\r\n $arrayReturn[ConfigApp::$PARAMS] = isset($urlExploded[1]) ? array_slice($urlExploded, 1) : null;\r\n\r\n return $arrayReturn;\r\n }", "private function splitUrl() {\n\n if (isset($_GET['url'])) {\n\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n $this->url_controller = isset($url[0]) ? $url[0] : null;\n $this->url_action = isset($url[1]) ? $url[1] : null;\n\n unset($url[0], $url[1]);\n\n $this->url_params = array_values($url);\n\n // para debugging, descomente estas lineas si tiene problemas con la URL\n //echo 'Controller: ' . $this->url_controller . '<br>';\n //echo 'Action: ' . $this->url_action . '<br>';\n //echo 'Parameters: ' . print_r($this->url_params, true) . '<br>';\n }\n }", "private function addUrlData($url, array $data) {\n // Do nothing, if there is no url data\n if (empty($data)) {\n return $url;\n }\n\n if (strpos($url, '?') !== false) {\n throw new \\InvalidArgumentException();\n }\n\n $parts[] = trim($url, '/');\n foreach ($data as $key => $value) {\n if ($value) {\n $parts[] = urlencode($key) .'/' . urlencode($value);\n } else {\n $parts[] = urlencode($key);\n }\n }\n return implode('/', $parts);\n }", "protected function getUrl() {\n\n\t\t\t$parsedUrls = [\n\t\t\t\t\"&parsedUrl=\". rawurlencode(static::AjaxUrl. \"?value=\". static::ValueValid),\n\t\t\t\t\"&parsedUrl=\". rawurlencode(static::AjaxUrl. \"?value=\". static::ValueInvalid),\n\t\t\t\t\"&parsedUrl=\". rawurlencode(static::AjaxUrl. \"?value=\". static::ValueInit),\n\t\t\t];\n\n\t\t\treturn $parsedUrls;\n\t\t}", "function read(){\n if($this->url != \"\"){\n if($this->url[strlen($this->url)-1] == \"/\") {\n $this->url = substr($this->url, 0,(strlen($this->url)-1));\n }\n $this->url_arr = explode(\"/\", $this->url);\n } else {\n $this->url_arr[0] = \"\";\n }\n \n return $this->url_arr;\n }", "function buildURLArray ($filterarray) {\r\n global $urlfilter;\r\n global $i;\r\n // Iterate through each filter in the array\r\n foreach($filterarray as $itemfilter) {\r\n // Iterate through each key in the filter\r\n foreach ($itemfilter as $key =>$value) {\r\n if(is_array($value)) {\r\n foreach($value as $j => $content) { // Index the key for each value\r\n $urlfilter .= \"&itemFilter($i).$key($j)=$content\";\r\n }\r\n }\r\n else {\r\n if($value != \"\") {\r\n $urlfilter .= \"&itemFilter($i).$key=$value\";\r\n }\r\n }\r\n }\r\n $i++;\r\n }\r\n return \"$urlfilter\";\r\n }", "private function prepareRuta(){\n\t\t$this->uriArray = array_slice(explode('/',$this->uri), $this->webPathNumber,3);\n\t}", "public function getUrl(){\n $urls = [];\n $url_rules = [];\n //Получаем массив URL из таблицы Sef\n $pages = PagesHelper::select(Yii::$app->params['pages'],[],[['attr_name' => 'is_active', 'operand'=> '=', 'value'=> '1'],\n ['attr_name' => 'show_sitemap', 'operand'=> '=', 'value'=> '1']]);\n\n //'shini_legko/all_sizes/R-<radius:\\d+>' => 'shini/radius',//все товары с выбраным радиусом\n $SQL = 'SELECT radius FROM tyres_radius WHERE is_passenger = 1';\n $tyres_radius = Yii::$app->db->createCommand($SQL)->queryColumn();\n foreach ($tyres_radius AS $tr){\n $tr = str_replace('.00','',(string)$tr);\n $url_rules[] = Url::to(['shini/radius', 'radius'=>$tr]);\n }\n unset($tyres_radius);\n\n //'shini_legko/all_sizes/R-<radius:\\d+>/<width:\\d+>-<profile:\\d+>' =>\n // 'shini/size',//все товары с выбраным размером\n $SQL = 'SELECT size_width, size_profile, radius\n FROM tyres_sizes \n JOIN tyres_radius ON tyres_radius.id = tyres_sizes.id_radius\n WHERE tyres_radius.is_passenger = 1';\n $tyres_sizes = Yii::$app->db->createCommand($SQL)->queryAll();\n foreach ($tyres_sizes AS $ts){\n $url_rules[] = Url::to(['shini/size',\n 'radius'=>str_replace('.00','',(string)$ts['radius']),\n 'width'=>$ts['size_width'],\n 'profile'=>str_replace('.00','',(string)$ts['size_profile'])]);\n }\n unset($tyres_sizes);\n\n //'shini_legko/producers/<alias:\\S+>' => 'shini/producer',//все шины одного производителя\n //'shini_gruz/producers/<alias:\\S+>' => 'shini/gruz_producer',//все шины одного производителя\n $SQL = 'SELECT alias, is_truck, is_passenger FROM tyres_vendors';\n $tyres_vendors = Yii::$app->db->createCommand($SQL)->queryAll();\n foreach ($tyres_vendors AS $tyres_vendor){\n if($tyres_vendor['is_passenger'])\n $url_rules[] =\n Url::to(['shini/producer',\n 'alias'=>$tyres_vendor['alias']]);\n if($tyres_vendor['is_truck'])\n $url_rules[] =\n Url::to(['shini/gruz_producer',\n 'alias'=>$tyres_vendor['alias']]);\n\n }\n unset($tyres_vendors);\n\n //'shini_legko/producers/<vendor:\\S+>/<model:\\S+>' => 'shini/model_tyre',//модель шины\n //'shini_gruz/producers/<vendor:\\S+>/<model:\\S+>' => 'shini/gruz_model_tyre',//модель шины\n $SQL = 'SELECT type, tyres_models.alias, tyres_vendors.alias AS vendor_alias FROM tyres_models\n JOIN tyres_vendors ON tyres_vendors.id_vendor = tyres_models.id_vendor';\n $tyres_models = Yii::$app->db->createCommand($SQL)->queryAll();\n foreach ($tyres_models AS $tyres_model){\n if($tyres_model['type'] < 6)\n $url_rules[] =\n Url::to(['shini/model_tyre',\n 'vendor'=>$tyres_model['vendor_alias'],\n 'model'=>$tyres_model['alias']]);\n else\n $url_rules[] =\n Url::to(['shini/gruz_model_tyre',\n 'vendor'=>$tyres_model['vendor_alias'],\n 'model'=>$tyres_model['alias']]);\n }\n unset($tyres_models);\n\n //'shini_legko/producers/<vendor:\\S+>/<model:\\S+>/<id:\\d+>' => 'shini/tyre',//шина\n //'shini_gruz/producers/<vendor:\\S+>/<model:\\S+>/<id:\\d+>' => 'shini/gruz_tyre',//шина\n $SQL = 'SELECT type, tyres_models.alias AS model_alias, tyres_vendors.alias AS vendor_alias, id_size \n FROM tyres_model_sizes\n JOIN tyres_models ON tyres_models.id_model = tyres_model_sizes.id_model\n JOIN tyres_vendors ON tyres_vendors.id_vendor = tyres_models.id_vendor\n WHERE tyres_model_sizes.price > 0';\n $tyres_model_sizes = Yii::$app->db->createCommand($SQL)->queryAll();\n foreach ($tyres_model_sizes AS $tyres_model_size){\n if($tyres_model_size['type'] < 6)\n $url_rules[] =\n Url::to(['shini/tyre',\n 'vendor'=>$tyres_model_size['vendor_alias'],\n 'model'=>$tyres_model_size['model_alias'],\n 'id'=>$tyres_model_size['id_size']]);\n else\n $url_rules[] =\n Url::to(['shini/gruz_tyre',\n 'vendor'=>$tyres_model_size['vendor_alias'],\n 'model'=>$tyres_model_size['model_alias'],\n 'id'=>$tyres_model_size['id_size']]);\n }\n unset($tyres_model_sizes);\n\n //'shini_legko/vendors_auto/<alias:\\S+>' => 'shini/vendor_auto', //все модели текущей марки авто\n //'wheels/vendors_auto/<alias:\\S+>'=> 'wheels/vendor_auto', //все модели текущей марки авто\n $SQL = 'SELECT alias FROM vehicles_vendors';\n $vehicles_vendors = Yii::$app->db->createCommand($SQL)->queryColumn();\n foreach ($vehicles_vendors AS $vehicles_vendor){\n $url_rules[] =\n Url::to(['shini/vendor_auto',\n 'alias'=>$vehicles_vendor,]);\n $url_rules[] =\n Url::to(['wheels/vendor_auto',\n 'alias'=>$vehicles_vendor,]);\n }\n unset($vehicles_vendors);\n\n //'wheels/R-<radius:\\d+>' => 'wheels/radius',//все товары с выбраным радиусом\n $SQL = 'SELECT radius FROM wheels_radius WHERE is_passenger = 1';\n $wheels_radius = Yii::$app->db->createCommand($SQL)->queryColumn();\n foreach ($wheels_radius AS $wr){\n $url_rules[] = Url::to(['wheels/radius', 'radius'=>$wr]);\n }\n unset($wheels_radius);\n\n //'wheels/producers/<alias:\\S+>' => 'wheels/producer',//все диски одного производителя\n //'wheels_gruz/producers/<alias:\\S+>' => 'wheels/gruz_producer',//все диски одного производителя\n $SQL = 'SELECT alias, is_truck, is_passenger FROM wheels_vendors';\n $wheels_vendors = Yii::$app->db->createCommand($SQL)->queryAll();\n foreach ($wheels_vendors AS $wheels_vendor){\n if($wheels_vendor['is_passenger'])\n $url_rules[] =\n Url::to(['wheels/producer',\n 'alias'=>$wheels_vendor['alias']]);\n if($wheels_vendor['is_truck'])\n $url_rules[] =\n Url::to(['wheels/gruz_producer',\n 'alias'=>$wheels_vendor['alias']]);\n }\n unset($wheels_vendors);\n\n //'wheels/producers/<vendor:\\S+>/<model:\\S+>' => 'wheels/model_wheel',//модель диска\n //'wheels_gruz/producers/<vendor:\\S+>/<model:\\S+>' => 'wheels/gruz_model_wheel',//модель диска\n $SQL = 'SELECT type, wheels_models.model_alias, wheels_vendors.alias AS vendor_alias FROM wheels_models\n JOIN wheels_vendors ON wheels_vendors.id_vendor = wheels_models.id_vendor';\n $wheels_models = Yii::$app->db->createCommand($SQL)->queryAll();\n foreach ($wheels_models AS $wheels_model){\n if($wheels_model['type'] != 2)\n $url_rules[] =\n Url::to(['wheels/model_wheel',\n 'vendor'=>$wheels_model['vendor_alias'],\n 'model'=>$wheels_model['model_alias']]);\n else\n $url_rules[] =\n Url::to(['wheels/gruz_model_wheel',\n 'vendor'=>$wheels_model['vendor_alias'],\n 'model'=>$wheels_model['model_alias']]);\n }\n unset($wheels_models);\n\n //'wheels/producers/<vendor:\\S+>/<model:\\S+>/<id:\\d+>' => 'wheels/wheel',//диск\n //'wheels_gruz/producers/<vendor:\\S+>/<model:\\S+>/<id:\\d+>' => 'wheels/gruz_wheel',//диск\n $SQL = 'SELECT type, wheels_models.model_alias, wheels_vendors.alias AS vendor_alias, id_size \n FROM wheels_model_sizes\n JOIN wheels_models ON wheels_models.id_model = wheels_model_sizes.id_model\n JOIN wheels_vendors ON wheels_vendors.id_vendor = wheels_models.id_vendor\n WHERE wheels_model_sizes.price > 0';\n $wheels_model_sizes = Yii::$app->db->createCommand($SQL)->queryAll();\n foreach ($wheels_model_sizes AS $wheels_model_size){\n if($wheels_model_size['type'] != 2)\n $url_rules[] =\n Url::to(['wheels/wheel',\n 'vendor'=>$wheels_model_size['vendor_alias'],\n 'model'=>$wheels_model_size['model_alias'],\n 'id'=>$wheels_model_size['id_size']]);\n else\n $url_rules[] =\n Url::to(['wheels/gruz_wheel',\n 'vendor'=>$wheels_model_size['vendor_alias'],\n 'model'=>$wheels_model_size['model_alias'],\n 'id'=>$wheels_model_size['id_size']]);\n }\n unset($wheels_model_sizes);\n\n //'news/<alias:\\S+>' => 'news/new'\n $SQL = 'SELECT alias FROM news WHERE is_active = 1';\n $news = Yii::$app->db->createCommand($SQL)->queryColumn();\n foreach ($news AS $new){\n $url_rules[] = Url::to(['news/new','alias'=>$new,]);\n }\n unset($news);\n\n $url_rules = array_merge($url_rules, $this->getChildPages($pages,0));\n //Формируем двумерный массив. createUrl преобразует ссылки в правильный вид.\n //Добавляем элемент массива 'daily' для указания периода обновления контента\n // foreach ($url_rules as $url_rule){\n // $urls[] = array($url_rule,'daily');\n // }\n return $url_rules;\n }", "public function url();", "public function url();", "public function url();", "public function getUriVars(): array;", "public function parseUrl(){\n\n if(isset($_GET['url'])){\n //echo $_GET['url'];\n\n return $url = explode('/',filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL));\n }\n }", "private function formarUrl(array $data)\n {\n $url = \"https://free.currconv.com/api/v7/convert?q=CURRENCY&compact=ultra&apiKey={$this->params->get('api_key_currency')}\";\n\n if (isset($data['from']) && isset($data['to'])) {\n $from = strtoupper(trim($data['from'])); // quitamos espacios y pasamos a mayusculas\n $to = strtoupper(trim($data['to'])); // quitamos espacios y pasamos a mayusculas\n $from_to = \"{$from}_{$to}\"; // se concatena from y to\n $url = str_replace(\"CURRENCY\", $from_to, $url); // reemplazamos CURRENCY en url\n return (object)[\n 'url' => $url,\n 'from_to' => $from_to,\n 'from' => $from,\n 'to' => $to\n ];\n }\n }", "public function splitUrl() {\n if (isset($_GET['url'])) {\n\n // split URL\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_STRING);\n $url = explode('/', $url);\n\n // parse custom urls\n $url = $this->parseRoutes($url);\n\n if ($this->app->language->enabled) {\n // set lang key\n $this->lang_key = isset($url[0]) ? $url[0] : null;\n // set controller\n $this->url_controller = isset($url[1]) ? $url[1] : null;\n // and action\n $this->url_action = isset($url[2]) ? $url[2] : null;\n\n // store URL parts\n $this->url_parts = array_values($url);\n\n // remove controller and action from URL parts\n unset($url[0], $url[1], $url[2]);\n } else {\n // set controller\n $this->url_controller = isset($url[0]) ? $url[0] : null;\n // and action\n $this->url_action = isset($url[1]) ? $url[1] : null;\n\n // store URL parts\n $this->url_parts = array_values($url);\n\n // remove controller and action from URL parts\n unset($url[0], $url[1]);\n }\n\n // store action params\n $this->action_params = array_values($url);\n\n }\n }", "private function getSiteURLArray($supportedLangsArray) {\r\n\r\n $siteURLArray = array();\r\n\r\n foreach (ConfigSettings::$supportedLangsArray as $lang) {\r\n\r\n $siteURLArray[$lang] = getLocalizedCanonicalURL($lang);\r\n\r\n }\r\n\r\n return $siteURLArray;\r\n\r\n }", "function generateUrlString($post_array) {\n\tforeach ($post_array as $key => &$val) {\n\t\tif (is_array($val)) {\n\t \t$val = json_encode($val);\n\t }\n\t $post_params[] = $key.\"=\".urlencode($val);\n\t}\n\t$urlString = implode('&', $post_params);\n\treturn $urlString;\n}", "function urlQueryToArray($url) {\n $params = array();\n $query = explode('&', parse_url($url, PHP_URL_QUERY));\n foreach($query as $tok) {\n list($var, $val) = explode('=', $tok);\n $params[$var] = urldecode($val);\n }\n return $params;\n }", "private function from_urls($from_urls) {\n if (is_array($from_urls)) {\n $this->from_urls = $from_urls;\n }\n return $this->from_urls;\n }", "public function parseUrl()\n\t\t{\n\t\t\tif(isset($_GET['url']))\n\t\t\t{\n\t\t\t\t// explode(separator, string, limit);\n\t\t\t\treturn $url = explode('/', filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL));\n\t\t\t}\n\t\t}", "public function provideUrls()\n {\n return array(\n array('/'),\n array('/login'),\n array('/contact/1'),\n array('/contact/add'),\n array('/contact/1/edit'),\n array('/adresse/1/add'),\n array('/adresse/1/edit'),\n array('/validate/[email protected]')\n );\n }", "public function createUrlArgs()\n {\n $args = [];\n \n $args['id'] = $this['id'];\n \n if (property_exists($this, 'slug')) {\n $args['slug'] = $this['slug'];\n }\n \n return $args;\n }", "function urls($data)\r\n{\r\n $result = array();\r\n if (is_array($data)) {\r\n if (isset($data['href']))\r\n $result[] = $data['href']; else\r\n foreach ($data as $d)\r\n if (is_array($d))\r\n $result[] = $d['href']; else\r\n $result[] = $d;\r\n } else $result[] = $data;\r\n\r\n // Make URLs full\r\n $result2 = array();\r\n global $last_url, $last_base;\r\n $last_domain = substr($last_url, 0, strpos($last_url, '/', 10));\r\n if ($p = strpos($last_url,'?'))\r\n $last_php = substr($last_url,0,$p);\r\n else $last_php = $last_url;\r\n\r\n foreach ($result as $url) {\r\n $url = trim($url);\r\n if (!$url)\r\n continue;\r\n $url = str_replace('./','',$url);\r\n if (substr($url,0,2)=='//') $url = 'http:'.$url;\r\n if (strpos($url, '://') === false)\r\n if ($url[0] == '/')\r\n $url = $last_domain . $url;\r\n elseif ($url[0] == '?') $url = $last_php . $url;\r\n else $url = $last_base . $url;\r\n // Check for right donor\r\n //if (strpos(domain($url),$GLOBALS['instruction']['host'])===false) continue;\r\n $result2[] = $url;\r\n }\r\n $r = $result2;\r\n\r\n if (DEV)\r\n xlogc('urls', $r, $data);\r\n\r\n return $r;\r\n}", "public function parseURL()\n {\n if (isset($_GET['url'])) {\n $url = rtrim($_GET['url'], '/'); //menghapus tanda / di akhir url\n $url = filter_var($url, FILTER_SANITIZE_URL);//memfilter url dari karakter aneh (hack)\n $url = explode('/', $url); //memecah url yang diinput dengan delimiter / dan menjadikannya array\n return $url;\n }\n }", "private static function generateUrlPrams(){\n\t\t$url = [] ;\n\t\tif ( isset($_GET['urlFromHtaccess']) ){\n\t\t\t$url = explode('/' , trim($_GET['urlFromHtaccess']) );\n\t\t}\n\t\tself::$url = $url ;\n\t}", "function buildURLArray($filterarray)\n {\n global $urlfilter;\n global $i;\n // Iterate through each filter in the array\n foreach ($filterarray as $itemfilter) {\n // Iterate through each key in the filter\n foreach ($itemfilter as $key => $value) {\n if (is_array($value)) {\n foreach ($value as $j => $content) { // Index the key for each value\n $urlfilter .= \"&itemFilter($i).$key($j)=$content\";\n }\n } else {\n if ($value != \"\") {\n $urlfilter .= \"&itemFilter($i).$key=$value\";\n }\n }\n }\n $i++;\n }\n return \"$urlfilter\";\n }", "function queryStringToArray($string) {\n $url = explode('&', $string);\n /* Request variable to store all parameters */\n $request = array();\n foreach ($url as $value) {\n $new = explode('=', $value);\n $request[$new[0]] = $new[1];\n }\n return $request;\n}", "public function prep_url_array($array,$unset = 0){\n for($i = 0; $i < $unset; $i++){\n unset($array[$i]);\n }\n return implode($array, '/');\n }", "public function obtenerURLData(){\n\t\t$urldata = (isset($_GET['page'])) ? $_GET['page'] : '' ;\n\t\tself::$urlPath = $urldata;\n\t\tif($urldata == ''){\n\t\t\tself::$urlBits[] = 'home';\n\t\t\tself::$urlPath = 'home';\n\t\t}else{\n\t\t\t$data = explode('/', $urldata);\n\t\t\twhile (!empty($data) && strlen(reset($data)) === 0){\n\t\t \tarray_shift( $data );\n\t\t }\n\t\t while (!empty($data) && strlen(end($data )) === 0){\n\t\t array_pop($data);\n\t\t }\n\t\t\tself::$urlBits = $this->array_trim( $data );\n\t\t}\n\t}", "public function processUrl(){\n\t\t\n\t\tif (isset($_GET['url'])) {\n\t\t\treturn $url = explode('/',filter_var(rtrim($_GET['url'],'/'),FILTER_SANITIZE_URL));//what we're doing here is attempting to filter the url to make it clean and easy to use in our case we're going to explode the url into an array.\n\t\t}\n\n\n\t}", "public function generateUrls()\n {\n $url_array[self::FORWARD_KEY] = $this->getForwardRoom();\n $url_array[self::LEFT_KEY] = $this->getLeftRoom();\n $url_array[self::RIGHT_KEY] = $this->getRightRoom();\n $url_array[self::BACK_KEY] = $this->getBackRoom();\n $url_array[self::CURRENT_KEY] = $this->getCurrentRoom();\n\n return $url_array;\n }", "public function list(){\n\n $urls = Urls::all();\n \n $capturas = array();\n foreach($urls as $key=>$val){\n $status = $this->status_url($val['url']);\n $conteudo = $this->content_url($val['url']);\n /* bem simples. salva os dados no banco */\n $capturas[] = array('conteudo' => $conteudo, 'status' => $status, 'url_id' => $val['id']);\n }\n\n $this->salvar($capturas);\n }", "public function getUrls()\r\n {\r\n }", "public static function getUrlParameters(): array\n {\n $parameterString = isset($_SERVER['PATH_INFO']) ?\n // If not using an apache server (ie. VSCode PHP Server), need to use PATH_INFO and remove leading slash\n ltrim($_SERVER['PATH_INFO'], '/') :\n // Otherwise, use a QUERY_STRING passed on by an .htaccess rewrite rule\n $_SERVER['QUERY_STRING'];\n\n return explode('/', self::sanitize($parameterString));\n }", "public function testSetURLFromArray()\n {\n $url = 'http://example.com/';\n $this->assertEquals(\n $url,\n self::getProperty(\\Twitter\\Intents\\Tweet::fromArray(array( 'url' => $url )), 'url'),\n 'Failed to set URL from array'\n );\n }", "public static function parseUrl()\n {\n $route = trim($_SERVER['QUERY_STRING'], '/');\n $params = explode('/', $route);\n $params = array_slice($params, 2);\n\n return [$route, $params];\n }", "private function checkUrlKey(array $data) : array\n {\n if (\n isset($data[CategoryInterface::URL_KEY]) &&\n empty($data[CategoryInterface::URL_KEY]) &&\n isset($data[CategoryInterface::TITLE]) &&\n $data[CategoryInterface::TITLE]\n ) {\n $data[CategoryInterface::URL_KEY] = urlencode(strtolower(str_replace([' '], ['-'], $data[CategoryInterface::TITLE])));\n }\n\n return $data;\n }", "function parseURLMAP($url_maps){\n\t$url_maps = explode(\",\", $url_maps);\n\n\t$links = array();\n\n\tforeach($url_maps as $url_map){\n\t\t$link = array();\n\n\t\tif(preg_match(\"/\\bsig=([^&]+)/s\", $url_map, $match)){\n\t\t\t$link['sig'] = urldecode($match[1]);\n\t\t}\n\n\t\tif(preg_match(\"/\\bs=([^&]+)/s\", $url_map, $match)){\n\t\t\t$link['s'] = urldecode($match[1]);\n\t\t}\n\n\t\tif(preg_match(\"/\\bitag=([^&]+)/s\", $url_map, $match)){\n\t\t\t$link['itag'] = urldecode($match[1]);\n\t\t}\n\n\t\tif(preg_match(\"/\\burl=([^&]+)/s\", $url_map, $match)){\n\t\t\t$link['url'] = urldecode($match[1]);\n\t\t}\n\n\t\tif(preg_match(\"/\\bquality=([^&]+)/s\", $url_map, $match)){\n\t\t\t$link['quality'] = urldecode($match[1]);\n\t\t}\n\n\t\tif(preg_match(\"/\\btype=([^&]+)/s\", $url_map, $match)){\n\t\t\t$link['type'] = urldecode($match[1]);\n\t\t}\n\n\t\tif(isset($link['url'])){\n\t\t\t$links[] = $link;\n\t\t}\n\t}\n\n\treturn $links;\n}", "function convertStringUrl($string){\n\n $wasteValue = [3];\n $url = parse_url($string);\n\n $scheme = $url['scheme'];\n $host = $url['host'];\n $path = $url['path'];\n\n $query = explode('&', $url['query']);\n\n $params = getFilteredArrayFromString($query, $wasteValue);\n\n //sort params by value\n asort($params);\n\n //add path parameter from input link to array\n $params['url'] = $path;\n\n //form get params as a string\n $paramsString = http_build_query($params);\n\n //form a valid url as a string\n $result = $scheme . '://' . $host . '/?' . $paramsString;\n\n return $result;\n\n}", "public function urlArguments()\n {\n return [\n 'id' => $this->id,\n ];\n }", "private function splitUrl()\n {\n if (isset($_GET['url'])) {\n // split URL\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n $this->url_controller = isset($url[0]) ? $url[0] : null;\n $this->url_action = isset($url[1]) ? $url[1] : null;\n\n unset($url[0], $url[1]);\n\n\n $this->url_params = array_values($url);\n // ::DEBUGGING\n // echo 'Controller: ' . $this->url_controller . '<br>';\n // echo 'Action: ' . $this->url_action . '<br>';\n // echo 'Parameters: ' . print_r($this->url_params, true) . '<br>';\n // echo 'Parameters POST: ' . print_r($_POST, true) . '<br>';\n }\n }", "public function retrive() {\n $result = Url::all();\n\n $items = Array();\n $workArr = Array();\n\n foreach ($result as $row) {\n $workArr[] = $row['page_url'];\n $workArr[] = $row['link_url'];\n $workArr[] = $row['link_name'];\n $workArr[] = $row['created_at']->toDateTimeString();\n\n $items[] = $workArr;\n unset($workArr);\n }\n return json_encode($items);\n }", "public function getURLData()\r\n\t{\r\n\t\t$urldata = (isset($_GET['page'])) ? $_GET['page'] : '' ;\r\n\t\tself::$urlPath = $urldata;\r\n\t\tif( $urldata == '' )\r\n\t\t{\r\n\t\t\tself::$urlBits[] = 'home';\r\n\t\t\tself::$urlPath = 'home';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$data = explode( '/', $urldata );\r\n\t\t\twhile ( !empty( $data ) && strlen( reset( $data ) ) === 0 ) \r\n\t\t\t{\r\n\t\t \tarray_shift( $data );\r\n\t\t }\r\n\t\t while ( !empty( $data ) && strlen( end( $data ) ) === 0) \r\n\t\t {\r\n\t\t array_pop($data);\r\n\t\t }\r\n\t\t\tself::$urlBits = $this->array_trim( $data );\r\n\t\t}\r\n\t}", "public function testArrayUrlWithHost(): void\n {\n $this->get([\n 'controller' => 'Posts',\n 'action' => 'hostData',\n '_host' => 'app.example.org',\n '_https' => true,\n ]);\n $this->assertResponseOk();\n $this->assertResponseContains('\"isSsl\":true');\n $this->assertResponseContains('\"host\":\"app.example.org\"');\n }", "public function getUrlVariants($urls)\n {\n $output = array();\n\n foreach ($urls as $url) {\n $output[] = $url;\n\n // HTTPS Equiv\n if (strstr($url, \"http://\") && !in_array(str_replace(\"http://\", \"https://\", $url), $output)) {\n $output[] = str_replace(\"http://\", \"https://\", $url);\n }\n\n // HTTP Equiv\n if (strstr($url, \"https://\") && !in_array(str_replace(\"https://\", \"http://\", $url), $output)) {\n $output[] = str_replace(\"http://\", \"https://\", $url);\n }\n }\n\n $this->extend(\"onAfterGetUrlVariants\", $output);\n\n return $output;\n }", "protected function _convert(array $array, $type)\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'convert path markers to url',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n $update = '';\n\n if ($array) {\n $path = $this->_checkPath();\n\n switch ($type) {\n case'path':\n $update = '';\n break;\n\n case'full':\n $update = $path[0];\n\n if ($this->_lang) {\n if ($this->_options['rewrite']) {\n $update .= $this->_lang . '/';\n } else {\n $update .= '?core_lang=' . $this->_lang . $this->_separator();\n }\n } else {\n if (!$this->_options['rewrite']) {\n $update .= '?';\n }\n }\n break;\n\n case'rel':\n $update = $path[1];\n\n if (!$this->_options['rewrite']) {\n $update .= '?';\n }\n break;\n }\n\n foreach ($array[0] as $link) {\n $path = str_replace(\n array(\n '{;'.$type.';',\n ';}'\n ),\n '',\n $link\n );\n $path = explode('/', $path);\n $pages = array();\n $params = array();\n\n foreach ($path as $value) {\n $bool = preg_match(\n '#[' . $this->_options['var_rewrite_sep'] . ']{1}#',\n $value\n );\n\n if ($bool) {\n $params[] = $value;\n } elseif ($value) {\n $pages[] = $value;\n }\n }\n\n if ((bool)$this->_options['rewrite']) {\n $final = self::convertToRewriteUrl($params, $pages);\n } else {\n $final = self::convertToClassicUrl(\n $params,\n $pages,\n $this->_separator()\n );\n }\n\n if ($update) {\n $final = $update . $final;\n }\n\n $this->DISPLAY = str_replace($link, $final, $this->DISPLAY);\n }\n }\n }", "private static function setArray() {\n\tself::$requests = explode(\"/\", self::$uri);\n if(self::$requests[0] == 'api') {\n array_shift(self::$requests);\n self::$api = True;\n }\n }", "public function GetUrl(array $url_array = array(), array $alt_url_array = array(), array $add = array(), array $del = array(), array $options = array())\n {\n $default_options = array(\n\t\t\t\t\t\t\t\t\"clear\" => false,\n\t\t\t\t\t\t\t\t\"use_alt_url\" => true,\n\t\t\t\t\t\t\t\t\"dell_all\" => false,\n\t\t\t\t\t\t\t\t\"separator\" => '&amp;',\n \"use_current_url\" => 0,\n \"alt_ext\" => '.html',\n );\n $options = array_merge($default_options, $options);\n \n if ($options['use_current_url']) \n {\n $url_array = $this->CurrentURL();\n }\n\n if ($options['dell_all'])\n {\n $url_array = array();\n }\n else\n {\n $url_array = @array_diff_key($url_array, @array_flip($del));\n }\n \n if ($options['use_alt_url'] && $this->use_alt_url && $alt_url_array)\n {\n $url_array = @array_merge($url_array, $alt_url_array);\n }\n \t\n $url_array = @array_merge($url_array, $add);\n\n if ($options['clear'] && $url_array)\n {\n foreach ($url_array as $key=>$value)\n {\n if (!$value/* && !in_array($key, $url_array)*/)\n unset($url_array[$key]);\n }\n }\n\n if ($options['use_alt_url'] && $this->use_alt_url)\n {\n return $this->GetAltUrl($url_array, $options);\n }\n else\n {\n return $this->GetNormalUrl($url_array, $options);\n }\n }", "public function getLinks()\n {\n $url = Yii::$app->getRequest()->getAbsoluteUrl();\n // change $url_cut_point if you have more prefix in the url of restful api\n $url_cut_point = 5;\n $url_slice = array_slice(preg_split(\"#[?/]#\", $url), 0, $url_cut_point);\n $link = implode('/', $url_slice).'/'.$this->id;\n\n return [ Link::REL_SELF => $link ];\n }", "public function createUrlArgs()\n {\n return [\n 'id' => $this->getId()\n ];\n }", "function build_url($name, $array = array())\n {\n $i = 0;\n $i = $this->_search_by_key($this->routes, self::NAME, $name);\n \n if($i === FALSE)\n {\n log_message('ERROR', 'Try to create undefined url with name: '.$name);\n return $this->config->site_url();\n }\n\n $rule = $this->routes[$i];\n \n if(is_null($array)){\n return $rule[self::URL];\n }\n\n //v1.5 ������������ ��������\n if(preg_match_all(\"#\\[([\\w_]+)\\]#\", $rule[self::URL], $mas)){\n $l = count($mas[1]);\n \n for($i = 0; $i < $l; $i++){\n $j = $this->_search_by_key($this->routes, self::NAME, $mas[1][$i]);\n if($j !== FALSE){\n $parent_rule = $this->routes[$j];\n $rule[self::URL] = str_replace('[' . $mas[1][$i] . ']', $parent_rule[self::URL], $rule[self::URL]);\n }\n }\n }\n \n\t\t//AG EDIT\n\t\t$rule_array = explode('/', $rule[self::URL]);\n\t\tforeach($rule_array as $key => $ms)\n\t\t{\n\t\t\tif($ms == '') unset($rule_array[$key]);\n\t\t\tif(($pos = strpos($ms, ':')) !== FALSE)\n\t\t\t{\n\t\t\t\t$u_key = substr($ms, $pos+1);\n\t\t\t\tif(isset($array[$u_key]) && $array[$u_key] !== FALSE)\n\t\t\t\t{\n\t\t\t\t\t$rule_array[$key] = str_replace(':'.$u_key , $array[$u_key] , $ms);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tunset($rule_array[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$rule[self::URL] = '';\n\t\tif(count($rule_array)>0)\n\t\t{\n\t\t\tforeach($rule_array as $ms)\n\t\t\t{\n\t\t\t\t$rule[self::URL] .= $ms.'/';\n\t\t\t}\n\t\t\t$rule[self::URL] = substr($rule[self::URL], 0, -1);\n\t\t}\n\t\t/*\n foreach($array as $k => $v)\n {\n $rule[self::URL] = str_replace(':'.$k . '/', $v . '/', $rule[self::URL]);\n }\n */\n //����������� ���������� �������, ����� �������� ���������� �� ������������� ������.\n /*if(preg_match(\"@:\\w+$@\", $rule[self::URL])){\n foreach($array as $k => $v){\n $rule[self::URL] = str_replace(':'.$k, $v, $rule[self::URL]);\n }\n }*/\n return $this->config->site_url($rule[self::URL]);\n }", "private function makeDataFromUrl(){\n if (empty($_GET)){\n Route::$controller='home';\n return true;\n }\n $routs= explode('/',strip_tags($_GET['route']));\n $result=array();\n foreach ($routs as $k=>$v){\n switch ($k){\n case 0:\n $result['controller']=$v;\n $result['method']='index';\n Route::$controller=$v;\n Route::$method='index';\n break;\n default: $result['data'][]=$v;\n }\n }\n if (!empty($result['data']))\n Route::$data=$result['data'];\n return true;\n }", "public function createUrlArgs()\n {\n $args = array('ot' => $this['_objectType']);\n \n $args['id'] = $this['id'];\n \n if (isset($this['slug'])) {\n $args['slug'] = $this['slug'];\n }\n \n return $args;\n }", "private function splitUrl()\n {\n if (isset($_GET['url'])) {\n\n // split URL\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n \n // Put URL parts into according properties\n // By the way, the syntax here is just a short form of if/else, called \"Ternary Operators\"\n // @see http://davidwalsh.name/php-shorthand-if-else-ternary-operators\n $this->url_controller = (isset($url[0]) ? $url[0] : null);\n $this->url_action = (isset($url[1]) ? $url[1] : null);\n $this->url_parameter_1 = (isset($url[2]) ? $url[2] : null);\n $this->url_parameter_2 = (isset($url[3]) ? $url[3] : null);\n $this->url_parameter_3 = (isset($url[4]) ? $url[4] : null);\n\n // for debugging. uncomment this if you have problems with the URL\n # echo 'Controller: ' . $this->url_controller . '<br />';\n # echo 'Action: ' . $this->url_action . '<br />';\n # echo 'Parameter 1: ' . $this->url_parameter_1 . '<br />';\n # echo 'Parameter 2: ' . $this->url_parameter_2 . '<br />';\n # echo 'Parameter 3: ' . $this->url_parameter_3 . '<br />';\n }\n }", "public function provider_url()\n\t{\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'foo/bar',\n\t\t\t\tarray(),\n\t\t\t\t'http',\n\t\t\t\tTRUE,\n\t\t\t\t'http://localhost/kohana/foo/bar'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'foo',\n\t\t\t\tarray('action' => 'bar'),\n\t\t\t\t'http',\n\t\t\t\tTRUE,\n\t\t\t\t'http://localhost/kohana/foo/bar'\n\t\t\t),\n\t\t);\n\t}", "function convArrayForSanitizing($src, &$array)\n{\n $array = array();\n foreach ($src as $key => $val) {\n if (key_exists($key, $_GET)) {\n array_push($array, sprintf(\"%s=%s\", $key, $val));\n }\n }\n}", "public function getUrls(): ?array {\n $val = $this->getBackingStore()->get('urls');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, 'string');\n /** @var array<string>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'urls'\");\n }", "public function setUrls(?array $value): void {\n $this->getBackingStore()->set('urls', $value);\n }", "public static function explodeURL($url = '')\n\t{\n\t\t$request_uri = Phetiche_server::REQUEST_URI();\n\t\t$parsed_url = [];\n\n\t\t$query_position = strpos($request_uri, '?');\n\t\t$url = ($url) ? $url : (($query_position) ? substr($request_uri, 0, $query_position) : $request_uri);\n\t\t$part = preg_split('/\\//', $url, -1, PREG_SPLIT_NO_EMPTY); // Deprecate this, as this techniques does not provide $_SERVER[REDIRECT_QUERY_STRING]\n\n\t\t/**\n\t\t * Get all GET parameters and put them into the object to be processed.\n\t\t * Only do this for GET parameters since others, such as POST or PUT, could get\n\t\t * messed up.\n\t\t */\n\t\t$part = Phetiche_request::readInput($part, true);\n\n\t\t$parsed_url['response_format'] = 'application/json';\n\n\t\t/**\n\t\t * This can (and will) be overwritten if the type is specified in the requesting URI.\n\t\t * If * is accepted, JSON will still be used as the default.\n\t\t */\n\t\t$accept_header = Phetiche_request::getHeader('Accept');\n\t\tif (strpos($accept_header, ',') !== false) {\n\t\t\t$first_response = substr($accept_header, 0, strpos($accept_header, ','));\n\t\t\t$parsed_url['response_format'] = $first_response;\n\t\t}\n\n\t\tforeach($part as $key => $url) {\n\n\t\t\t/**\n\t\t\t * Get the response type\n\t\t\t * Only process actual strings.\n\t\t\t */\n\t\t\tif (is_string($url) && preg_match('/(javascript|json|txt|html|xml)/i', $url, $matches)) {\n\n\t\t\t\t// Set the proper response format.\n\t\t\t\tswitch (strtolower($matches[0])) {\n\t\t\t\t\tcase 'javascript':\t$parsed_url['response_format'] = 'application/javascript'; break;\n\t\t\t\t\tcase 'json':\t\t$parsed_url['response_format'] = 'application/json'; break;\n\t\t\t\t\tcase 'txt':\t\t\t$parsed_url['response_format'] = 'text/plain'; break;\n\t\t\t\t\tcase 'html':\t\t$parsed_url['response_format'] = 'text/html'; break;\n\t\t\t\t\tcase 'xml':\t\t\t$parsed_url['response_format'] = 'application/xml'; break;\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif (!isset($parsed_url[self::$url_components[0]]) && strpos($url, ':') === false && !is_numeric($url)) {\n\t\t\t\t\t$parsed_url[self::$url_components[0]] = $url;\n\t\t\t\t} else if (!isset($parsed_url[self::$url_components[1]]) && strpos($url, ':') === false && !is_numeric($url)) {\n\t\t\t\t\t$parsed_url[self::$url_components[1]] = $url;\n\t\t\t\t} else {\n\t\t\t\t\t$parsed_url[$key] = $url;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * In RESTful applications we may want to rely on the fact\n\t\t\t\t * that just a number is provided in any given URI, to be able to\n\t\t\t\t * use this ID, check for it here and create the \"request_id\" element.\n\t\t\t\t * The first number (int) found will be used as the request_id.\n\t\t\t\t */\n\t\t\t\tif (is_numeric($url) && !isset($parsed_url['request_id'])) {\n\t\t\t\t\t$parsed_url['request_id'] = $url;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $parsed_url;\n\t}", "public static function get_arr_urls($string) {\n\t$string = (string) $string;\n\t$expr = SmartValidator::regex_stringvalidation_expression('url', 'partial');\n\t$regex = $expr.'iu'; // insensitive, with /u modifier for unicode strings\n\t$arr = array();\n\tpreg_match_all($regex, $string, $arr);\n\treturn (array) $arr[0];\n}", "function url($array = false, $keep=false, $validate = true, $SiteUrlOnEmptyParamSet = false, $getAliases = true) {\n if(is_string($array) && !is_numeric($array) && strtolower(substr($array, 0, 4)) == 'www.') return 'http://'.$array;\n\n $pass = array();\n if($array == false) $array = array();\n if(!is_array($array)) $array = array('id' => $array);\n if($keep === true) {\n $keep = $_GET->keys();\n }\n elseif($keep !== false && !is_array($keep)) $keep = array($keep);\n if(!is_array($keep)) $keep = array();\n foreach($_REQUEST as $g => $v) {\n if(!in_array($g, $keep)) continue;\n elseif(is_array($v)) {\n foreach($v as $a => $b) {\n if(!empty($b)) $pass[$g][$a] = $b;\n }\n }\n else $pass[$g] = $v;\n }\n $parts = array_merge($pass,$array);\n $validParts = array();\n foreach($parts as $key => $val) {\n if($key == '#') continue;\n if(!$validate || ($_REQUEST->validate($key, $val) || $_GET->validate($key, $val))) {\n $validParts[$key] = $val;\n }\n }\n $url = '';\n //FIXME: Config\n // Short-URL\n if(true && isset($validParts['id'])) {\n global $Controller;\n if(is_numeric($validParts['id']) && $getAliases) {\n if($obj = $Controller->get($validParts['id'], OVERRIDE))\n if($alias = $obj->alias) $validParts['id'] = $alias;\n } elseif(is_object($validParts['id'])) {\n if($alias = $validParts['id']->alias) $validParts['id'] = $alias;\n else $validParts['id'] = $validParts['id']->ID;\n }\n $url = '/'.($validParts['id'] != 'frontpage'?$validParts['id']:'');\n unset($validParts['id']);\n }\n $query = http_build_query($validParts,'','&amp;');\n if(!empty($query)) $url .= '?'.$query;\n if(isset($array['#'])) $url.='#'.$array['#'];\n if((!empty($url) || $SiteUrlOnEmptyParamSet) && $SiteUrlOnEmptyParamSet != -1) {\n global $SITE;\n $url = $SITE->URL.$url;\n }\n return $url;\n}", "public static function provideUris(): array\n {\n return [\n 'default' => [\n 'http://domain.com',\n 'http://domain.com',\n ],\n\n 'without scheme' => [\n 'domain.com/path',\n 'domain.com/path',\n ],\n\n 'with port' => [\n 'domain.com:8080/path',\n 'domain.com:8080/path',\n ],\n\n 'with query' => [\n 'https://domain.com:8081/path?key=value',\n 'https://domain.com:8081/path?key=value',\n ],\n\n 'with fragment' => [\n 'https://domain.com:8081/path?key=value#some',\n 'https://domain.com:8081/path?key=value#some',\n ],\n\n 'with username' => [\n 'https://[email protected]/ping',\n 'https://[email protected]/ping',\n ],\n\n 'with password' => [\n 'https://user:[email protected]/ping',\n 'https://user:***@domain.com/ping',\n ],\n ];\n }", "public function getParamsForUrl()\n {\n return array(\n 'restaurant_slug' => $this->getRestaurant()->getSlug(),\n 'locality_slug' => $this->getRestaurant()->getLocality()->getSlug(),\n 'country_slug' => $this->getRestaurant()->getCountry()->getSlug(),\n 'dish_slug' => $this->getSlug()\n );\n }", "abstract public function getAuthUrlComponents();", "public static function Zf_URLSanitize() {\n\n /**\n * IF A URL HAS BEEN SET, GET IT FOR SANITIZATION\n */\n $zf_url = isset($_GET['url']) ? $_GET['url'] : null;\n\n\n /**\n * REMOVE THE LAST FORWARD SLASH \"/\" FROM THE URL\n */\n $zf_url = rtrim($zf_url, '/');\n\n\n /**\n * FILTER THE URL TO ONLY REMAIN WITH CLEAN URL\n */\n $zf_url = filter_var($zf_url, FILTER_SANITIZE_URL);\n\n\n /**\n * SPLIT THE URL, WITH \"/\" AS THE DELIMITER WHILE RETURNING EACH PART INTO\n * AN ARRAY\n */\n $zf_url = explode('/', $zf_url);\n\n //print_r($zf_url); echo \"<br><br>\"; //This is strictly for debugging purposes.\n\n\n /**\n * RETURNS AN ARRAY OF THE URL PARTS.\n */\n return $zf_url;\n }", "public function url()\n {\n if (empty($this->parameters)) {\n return $this->url;\n }\n $total = array();\n foreach ($this->parameters as $k => $v) {\n if (is_array($v)) {\n foreach ($v as $va) {\n $total[] = HttpClient::urlencodeRFC3986($k).\"[]=\".HttpClient::urlencodeRFC3986($va);\n }\n } else {\n $total[] = HttpClient::urlencodeRFC3986($k).\"=\".HttpClient::urlencodeRFC3986($v);\n }\n }\n $out = implode(\"&\", $total);\n\n return $this->url.'?'.$out;\n }", "function array_toquerystring ($args) {\r\n if (!is_array($args)) {\r\n return false;\r\n }\r\n $out = '';\r\n foreach($args as $name => $value)\r\n {\r\n if(is_array($value))\r\n {\r\n foreach($value as $key => $val) {\r\n $out .= $name.'['.$key.']'.'=';\r\n $out .= $val.'&';\r\n\r\n }\r\n }else{\r\n $out .= $name.'=';\r\n $out .= $value.'&';\r\n }\r\n }\r\n return substr($out,0,-1); //trim the last & }\r\n}", "final public static function getParams()\n {\n $param = self::getUrl();\n\n $y=0;while($y <= 2){\n unset($param[$y]);\n $y++;\n }\n\n foreach($param as $t ){\n $p[] = array($t);\n }\n\n $r=0;\n while($r <= count($p)){\n\n $par[$p[$r][0]] = $p[$r + 1][0];\n\n $r += 2;\n }\n\n return array_filter($par);\n }", "public function get_url_list() {\n\t\t$home_no_www = str_replace( '://www.', '://', get_option( 'home' ) );\n\t\t$home_yes_www = str_replace( '://', '://www.', $home_no_www );\n\n\t\t// Build the search links.\n\t\t$search = array(\n\t\t\tstr_replace( 'https://', 'http://', $home_yes_www ),\n\t\t\tstr_replace( 'https://', 'http://', $home_no_www ),\n\t\t\t\"src='http://\",\n\t\t\t'src=\"http://',\n\t\t);\n\n\t\treturn array(\n\t\t\t'search' => $search, // The search links.\n\t\t\t'replace' => str_replace( 'http://', 'https://', $search ), // The replace links.\n\t\t);\n\t}", "public function _getData(): array\n {\n $result = [\n 'url' => $this->getUrl(),\n ];\n\n return parent::normalizeData($result);\n }", "public function getUrlData()\n\t{\n\t\t$b = $this->getCommentableBehavior();\n\t\tif ($urlFunc = $b->commentableUrl) {\n\t\t\t$commentable = @$this->items[0];\n\t\t\t$data = $urlFunc($commentable);\n\t\t} else {\n\t\t\t$route = Yii::app()->controller->id.'/'.Yii::app()->controller->action->id;\n\t\t\t$data = array_merge(array($route), $_GET);\n\t\t}\n\t\t$data['#'] = 'c'.$this->id;\n\t\treturn $data;\n\t}", "private function convertUrlQuery($query) {\n/* print_r();\nexit; */\n $query = ($query);\n /* echo htmlspecialchars_decode($query);\n echo '<br/>'; */\n $queryParts = explode('&', htmlspecialchars_decode($query));\n /* print_r($queryParts);\n exit;*/\n $params = array();\n foreach ($queryParts as $param)\t{\n\n $item = explode('=', $param);\n $params[$item[0]] = $item[1];\n }\n return $params;\n\n }" ]
[ "0.6914393", "0.68709517", "0.68453765", "0.66904", "0.65742713", "0.65562344", "0.6518827", "0.6498332", "0.6495646", "0.6495646", "0.64417416", "0.6427727", "0.63796175", "0.6244922", "0.61912006", "0.61799914", "0.6172142", "0.6137278", "0.6105381", "0.6094867", "0.6037537", "0.6012009", "0.6012007", "0.5994875", "0.5968673", "0.5950008", "0.5886964", "0.58555853", "0.5843586", "0.58222413", "0.5800031", "0.57888883", "0.5785799", "0.5751648", "0.5748784", "0.5740645", "0.57232916", "0.57232916", "0.57232916", "0.5721051", "0.5708288", "0.5699703", "0.5687355", "0.5685329", "0.5683961", "0.56795347", "0.56633115", "0.566199", "0.56575954", "0.5656889", "0.5655768", "0.5648647", "0.5640737", "0.5633204", "0.56193626", "0.5619206", "0.55965996", "0.55964875", "0.55922467", "0.5584985", "0.5580598", "0.55805117", "0.5576668", "0.5573246", "0.55667895", "0.556036", "0.5540395", "0.5539123", "0.5536704", "0.5525692", "0.5522506", "0.5493567", "0.54895556", "0.5486615", "0.54844373", "0.5482028", "0.5481397", "0.5465251", "0.544959", "0.5449354", "0.54454327", "0.54300374", "0.5422723", "0.5421203", "0.54151195", "0.54100055", "0.5395952", "0.5394788", "0.53895754", "0.53853697", "0.53688365", "0.5368392", "0.5367653", "0.5364295", "0.53575593", "0.53556454", "0.5352725", "0.5351422", "0.53393614", "0.5335044" ]
0.57907575
31
Decodifca um string de valor e retorna um array
function url_decode($str) { parse_str($str, $output); return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getValueAsArray()\n {\n if(strpos($this->value, '|') > 1){\n $values = array_filter(explode(\"|\", $this->value));\n } else {\n $values = [$this->value];\n }\n return $values;\n }", "function vcex_string_to_array( $value = array() ) {\n\n\tif ( empty( $value ) && is_array( $value ) ) {\n\t\treturn null;\n\t}\n\n\tif ( ! empty( $value ) && is_array( $value ) ) {\n\t\treturn $value;\n\t}\n\n\t$items = preg_split( '/\\,[\\s]*/', $value );\n\n\tforeach ( $items as $item ) {\n\t\tif ( strlen( $item ) > 0 ) {\n\t\t\t$array[] = $item;\n\t\t}\n\t}\n\n\treturn $array;\n\n}", "public function asArray() : array\n {\n return str_split($this->string);\n }", "public function __invoke(string $value) : array\n {\n if ($value !== '') {\n return $this->parseRawValue($value);\n }\n return [];\n }", "public function stringtoarray($stringa,$delimitatore=','){\n\t\treturn explode($delimitatore,$stringa);\n\t}", "public function stringToArray(string $string): array;", "public function readArrayOfString()\n {\n return $this->arrayWalk($this->readArray(), function(&$value)\n {\n $value = (string) $value;\n });\n }", "function str_to_array($str,$key){\n\t\t//remove the . from last line\n\t\t$str = trim($str,'.');\n\t\treturn explode($key,$str);\n\t}", "public function getStringArray() {\n // explicit type cast just to be sure\n return (array) $this->stringArray;\n }", "private function getDataItem(string $part): array\n {\n $item = explode('=', $part, 2);\n $item = array_map('rawurldecode', $item);\n $item += [null, null];\n\n return $item;\n }", "function makearray($mstrg) {\n\t\t// check if values are separated by comma ','.\n\t if ($this->havecomma($mstrg)) {\n\t \t$marr = explode(\",,\", $mstrg);\n\t }\n\t\treturn $marr;\n\t}", "public function getAsArray();", "function splitvalues($str)\n{\n\t$arr=array();\n\tif($str==\"\")\n\t{\n\t\t$arr[] = \"\";\n\t\treturn $arr;\n\t}\n\t$start=0;\n\t$i=0;\n\t$inquot=false;\n\twhile($i<=strlen($str))\n\t{\n\t\tif($i<strlen($str) && substr($str,$i,1)=='\"')\n\t\t\t$inquot=!$inquot;\n\t\telse if($i==strlen($str) || !$inquot && substr($str,$i,1)==',')\n\t\t{\n\t\t\t$val=substr($str,$start,$i-$start);\n\t\t\t$start=$i+1;\n\t\t\tif(strlen($val) && substr($val,0,1)=='\"')\n\t\t\t{\n\t\t\t\t$val=substr($val,1,strlen($val)-2);\n\t\t\t\t$val=str_replace('\"\"','\"',$val);\n\t\t\t}\n\t\t\t\n\t\t\tif( $val !== FALSE )\n\t\t\t$arr[]=$val;\n\t\t}\n\t\t$i++;\n\t}\n\treturn $arr;\n}", "private function multi_byte_string_to_array()\n {\n $this->strings = array_values(\n array_filter(\n preg_split(\"//u\",$this->string),\n \"strlen\"\n )\n );\n }", "function deCadenaToArrayOpcionesCarrito( $string ){\n\t\t$options = array();\n\t\t$temp = explode('{',$string);\n\t\tfor( $i=1 ; $i<count($temp); $i++ ){\n\t\t\t$k = explode('}',$temp[$i]);\n\t\t\t$options[(int)$temp[$i]] = end($k);\n\t\t}\n\t\treturn $options;\n\t}", "function stringtoarray($string) {\r\n\t/**\r\n\t * Probamos que sea un array sin comprimir\r\n\t */\r\n\tif (is_string($string)) {\r\n\t\tif (strstr($string, 'array')) {\r\n\t\t\teval(\"\\$arrayAux = $string;\");\r\n\t\t\treturn $arrayAux;\r\n\t\t}\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "public static function getArray($str)\n\t{\n\t\t//Get rid of blank spaces\n\t\t$str = str_replace(\" \", \"\", $str);\n\t\t\n\t\treturn explode(\",\",$str);\t\t\n\t}", "public static function getStringArray()\n {\n return trim(fgets(STDIN));\n }", "function string_to_array($array)\n{\n $arr = explode(',', $array);\n foreach($arr as $item)\n $result[$item] = $item;\n\n return $result;\n}", "public function getCleanFileAsArray()\n {\n return GeneralUtility::trimExplode(',', $this->getCleanFile(), 1);\n }", "function ussd_string_to_array($ussd_string){\n return explode(\"*\",$ussd_string);\n}", "protected function unserializeValue($value)\n\t{\n\t\tif ($value[0] == '{' || $value[0] == '[') {\n\t\t\treturn (array)json_decode($value, true);\n\t\t} elseif (in_array(substr($value, 0, 2), ['O:', 'a:'])) {\n\t\t\treturn (array)unserialize($value);\n\t\t} elseif (is_numeric($value)) {\n\t\t\treturn (array)$value;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t}", "private function parseRawValue(string $value) : array\n {\n $tokens = $this->splitRawValue($value);\n return $this->parseTokensIntoParts(new NoRewindIterator(new ArrayIterator($tokens)));\n }", "public function getValues()\n\t{\n\t\t$params = array();\n\n\t\tforeach($this->values as $value)\n\t\t{\n\t\t\tswitch($value[self::TYPE])\n\t\t\t{\n\t\t\t\tcase self::TYPE_RAW:\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::TYPE_IN:\n\n\t\t\t\t\t$params+= $value[self::VALUE];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase self::TYPE_SCALAR:\n\t\t\t\tdefault:\n\n\t\t\t\t\t$params[] = $value[self::VALUE];\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $params;\n\t}", "public function fromString(string $string): array;", "public static function toArray($string)\n\t{\n if(is_array($string))\n {\n return $string;\n }\n\n if (empty($string))\n {\n return null;\n }\n\n $timer = dmDebug::timer(\"dmString::toArray\");\n\n $array = array();\n\n // JQUERY STYLE - css expression\n self::retrieveCssFromString($string, $array);\n\n // DMS STYLE - string opt in name\n self::retrieveOptFromString($string, $array);\n\n $timer->addTime();\n\n return $array;\n\t}", "public function _parse_to_array($in) {\n\t\t$string = str_replace(' ', '', trim($in));\n\t\t\n\t\tif ( ! empty($string)) {\n\t\t\treturn (array) explode('|', $string);\n\t\t}\n\t\telse {\n\t\t\treturn array();\n\t\t}\n\t}", "public function getToArrayValues()\r\n\t\t{\r\n\t\t\t$obj = \t$this->getObject();\r\n\t\t\t$arrayValues = array();\r\n\t\t\tforeach ($obj as $key => $value) {\r\n\t\t\t\t$arrayValues[\":\".strtoupper($key)] = $value;\r\n\t\t\t}\r\n\t\t\treturn $arrayValues;\r\n\t\t}", "function toArray($str)\n\t{\n\t\t$tmpItemArr = array_filter(explode('-dlm-',$str));\n\t\tforeach ($tmpItemArr as &$value) {\n \t\t$ItemArr = explode('-spl-', $value);\n\t\t\t$arr[$ItemArr[0]]['id'] = &$ItemArr[0]; // Item ID\n\t\t\t$arr[$ItemArr[0]]['qty'] = &$ItemArr[1]; // Item Quantity\n\t\t\t$arr[$ItemArr[0]]['cp'] = &$ItemArr[2]; // Item custom price\n\t\t\t$arr[$ItemArr[0]]['order'] = &$ItemArr[3]; // Item order\n\t\t}\n\t\treturn $arr;\n\t}", "public function valoracionToArray(){\n\t\t\t$this->arrayValor = array(\n\t\t\t\t\"user\"=> $this->user,\n\t\t\t\t\"object\"=> $this->object,\n\t\t\t\t\"valor\"=>$this->valor\n\t\t\t\t);\n\t\t}", "public function key_value_from_string( $text = '' ) {\n\t\tpreg_match( '/([^:]+)(;[^:]+)?[:]([\\w\\W]*)/', $text, $matches );\n\n\t\tif ( 0 == count( $matches ) )\n\t\t\treturn false;\n\n\t\treturn array( $matches[1], $matches[3] );\n\t}", "public function getValues(): array;", "public function getValues(): array;", "private function returnArrayElement($line) {\n\t//--\n\tif(strlen($line) <= 1) {\n\t\treturn array(array()); // weird ...\n\t} //end if\n\t//--\n\t$array = array();\n\t$value = trim(substr($line, 1));\n\t$value = $this->_toType($value);\n\t$array[] = $value;\n\t//--\n\treturn $array;\n\t//--\n}", "public function getAsArray() {\n if($this->xmldb->xml) {\n $vals = array();\n $nodeList = $this->xmldb->xml->documentElement->childNodes;\n foreach ($nodeList as $node) {\n if (is_a($node, \"DOMElement\")) {\n #extract the child text value from each node\n $vals[] = $node->firstChild->nodeValue;\n }\n }\n \n return $vals;\n }\n }", "function convert_basic_array($string, $delimitor, $separator)\n{\n\t$the_array = array();\n\t$row = explode($delimitor, $string);\n\tforeach($row AS $item)\n\t{\n\t\t$the_value = htmlentities(trim(strstr($item, $separator), $separator));\n\t\t\n\t\t$check_array = explode('**',$the_value);\n\t\tif(in_array('drillevent', $check_array))\n\t\t{\n\t\t\t$check_array[array_search('drillevent',$check_array)] = 'drillevent=';\n\t\t\t$the_value = implode('**', $check_array);\n\t\t}\n\t\t\n\t\tif($the_value == '_')\n\t\t{\n\t\t\t$the_value = '';\n\t\t}\n\t\t\n\t\t$the_array[strstr($item, $separator, TRUE)] = $the_value;\n\t}\n\t\n\treturn $the_array;\n}", "public function getValuesFromCampo($teste_campo)\n {\n $arrResultado = $this->get();\n $valores = array();\n\n if (is_array($arrResultado)) {\n foreach ($arrResultado as $resultado_id => $resultado_v) {\n foreach ($resultado_v as $campo => $valor) {\n if ($campo == $teste_campo) {\n $valores[ ] = $valor;\n }\n }\n }\n }\n\n return $valores;\n }", "private function parse_cookie( $value ) {\n\n\t\tif( !$value || $value == 'null' )\n\t\t\treturn array();\n\n\t\tif( $array = json_decode( stripslashes( $value ), true ) ) // strip slashes and return array\n\t\t\treturn $array;\n\n\t\treturn array();\n\t}", "public function values() : array;", "public function values_as_array() {\n $Data = array();\n foreach ($this->__fields() as $field) {\n $v = $this->$field->cleaned_value();\n if ($v instanceof Newforms_File_Object) continue;\n $Data[$field] = $v;\n }\n return $Data;\n }", "public function createArray($str) {\n\t\t$str = substr($str, 0, -1);\n\t\treturn explode(',', $str);\n\t}", "public function toArray() {\r\n return preg_split(\"/\\r?\\n/\", $this->contents);\r\n }", "function var2array($var,$needle=false)\n{\n\tif (empty($var)) return false;\n\tif (!is_array($var))\n\t{\n\t\t$var=$needle?explode($needle,$var):array($var);\n\t}\n\treturn $var;\n}", "public function getAsArray(): array\n {\n return \\GuzzleHttp\\json_decode(\\GuzzleHttp\\json_encode($this->values), true);\n }", "public function getValues()\n {\n $values = array();\n\n foreach($this->elements as $key => $value)\n {\n if(mb_substr($key, -12) === 'confirmation') continue;\n\n $values[$key] = $value;\n }\n\n return $values;\n }", "public function transfArray($valuepost) {\n\t\t$total = 0;\n\t\tforeach ( $valuepost as $value ) {\n\t\t\t$arr [$total] = $this->validStringForm ( $value );\n\t\t\t$total ++;\n\t\t}\n\t\treturn $arr;\n\t}", "private static function strToArray($nvp)\r\n\t {\r\n\t\t $temp_array = array();\r\n\t\t $nvp = explode('&' , trim($nvp , '&'));\r\n\t\t foreach($nvp as $value)\r\n\t\t {\r\n if (empty($value)) continue;\r\n\t\t\t $temp_array2 = explode('=' , $value);\r\n\t\t\t if (empty($temp_array2[1])) continue;\r\n\t\t\t $temp_array[$temp_array2[0]] = $temp_array2[1];\r\n\t\t }\r\n\t\t return $temp_array;\r\n\t }", "public function getParts() {\n\n if (is_null($this->value)) {\n return array();\n }\n\n $delimiter = $this->getDelimiter();\n\n // split by any $delimiter which is NOT prefixed by a slash.\n // Note that this is not a a perfect solution. If a value is prefixed\n // by two slashes, it should actually be split anyway.\n //\n // Hopefully we can fix this better in a future version, where we can\n // break compatibility a bit.\n $compoundValues = preg_split(\"/(?<!\\\\\\)$delimiter/\", $this->value);\n\n // remove slashes from any semicolon and comma left escaped in the single values\n $compoundValues = array_map(\n function($val) {\n return strtr($val, array('\\,' => ',', '\\;' => ';'));\n }, $compoundValues);\n\n return $compoundValues;\n\n }", "private function _get_result($data)\n\t{\n\t\t$ret = array();\n\t\t\n\t\t$lines = explode(\"\\n\", $data);\n\t\tif ($lines)\n\t\t{\n\t\t\tforeach ($lines as $line)\n\t\t\t{\n\t\t\t\t$x = trim($line);\n\t\t\t\tif (strlen($x) == 0) continue;\n\t\n\t\t\t\t$value = strstr($x, \" \");\n\t\t\t\t$name = \"\";\n\t\t\t\tif ($value === FALSE)\n\t\t\t\t{\n\t\t\t\t\t$name = $x;\n\t\t\t\t\t$value = \"\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$name = substr($x, 0, strlen($x) - strlen($value));\n\t\t\t\t\t$value = trim($value);\n\t\t\t\t}\n\t\t\t\t$ret[$name] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ret;\n\t}", "function tratar_cep($string){\n\n $rst = explode(',', $string);\n $arr = array();\n \n if(count($rst) < 5){\n # Sem complemento\n $arr['LOGRADOURO' ] = $rst[0];\n $arr['NUMERO' ] = $rst[1];\n $arr['COMPLEMENTO'] = NULL;\n $arr['BAIRRO' ] = $rst[2];\n $arr['CEP' ] = $rst[3];\n }else{\n # Com complemento\n $arr['LOGRADOURO' ] = $rst[0];\n $arr['NUMERO' ] = $rst[1];\n $arr['COMPLEMENTO'] = $rst[2];\n $arr['BAIRRO' ] = $rst[3];\n $arr['CEP' ] = $rst[4];\n }\n \n return $arr;\n}", "public function ToArray()\n {\n $result = array();\n $option = $this->TopMost();\n while ($option)\n {\n $result[$option->GetValue()] = $option->GetText();\n $option = $this->NextOf($option);\n }\n return $result;\n \n }", "public function wt_parse_refund_items_field($value) {\n $refund_item = array();\n if(isset($value) && !empty($value)){\n $refund_item = explode(';', $value);\n }\n return $refund_item;\n }", "public function getValueArrayFromIndexString($data, $path) {\n $temp = $data;\n foreach(explode(\":\", $path) as $ndx) {\n $temp = isset($temp[$ndx]) ? $temp[$ndx] : null;\n }\n return $temp;\n }", "function getFormattedDataArray($str) {\n $replaced_str = str_replace(\"\\,\", \"&888;\", $str);\n $data_array = explode(\"\\n\", $replaced_str);\n array_pop($data_array);\n return $data_array;\n }", "protected static function clean_array() {\n\t\treturn array( '<', '>', '&', \"'\", '\"' );\n\t}", "protected function processFrom(string $string): array\n {\n return \\json_decode($string, true);\n }", "private static function string_to_array($jobs = '')\n\t{\n\t\t$array = explode (\"\\r\\n\", trim($jobs));\n\t\tforeach ($array as $key => $item)\n\t\t{\n\t\t\tif($item == '')\n\t\t\t{\n\t\t\t\tunset($array[$key]);\n\t\t\t}\n\t\t}\n\t\treturn $array;\n\t}", "function getArrayFromList($string) {\n\t\t$i = 0;\n\t\t#remove all leading and trailing spaces\n\t\t$string = trim($string);\n\t\t#find the first ocurrence of a comma\n\t\t$pos = strpos($string, \",\");\n\t\twhile(!($pos === false)) {\n\t\t\t#set the new starting position\n\t\t\t$firstpos = $pos + 1;\n\t\t\t#if the string is in the second position, set the first array value\n\t\t\t$lastpos = $pos;\n\t\t\t$array[$i] = substr($string, 0, $lastpos);\t\t\n\t\t\t#reduce the string to start from the new starting position. $firstpos\n\t\t\t$string = substr($string, $firstpos);\t\t\n\t\t\t$string = trim($string);\n\t\t\t#locate the first occurence of a comma in the string\n\t\t\t$pos = strpos($string, \",\");\n\t\t\t$i++;\n\t\n\t\t}\n\t\t$array[$i] = $string;\n\t\treturn $array;\n\t}", "public function convertExtraToArray( $string ) {\n\t\tif( !$string )\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t$_temp = array();\n\t\t\n\t\tif( $string == '#show_roles#' )\n\t\t{\n\t\t\t$roles = Yii::app()->authManager->getRoles();\n\t\t\tif( count($roles) )\n\t\t\t{\n\t\t\t\tforeach( $roles as $role )\n\t\t\t\t{\n\t\t\t\t\t$_temp[ $role->name ] = $role->name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$exploded = explode(\"\\n\", $string);\n\n\t\t\tif( count($exploded) )\n\t\t\t{\n\t\t\t\tforeach( $exploded as $explode )\n\t\t\t\t{\n\t\t\t\t\tlist($key, $value) = explode('=', $explode);\n\t\t\t\t\t$_temp[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\treturn $_temp;\n\t}", "protected static function parseInlineValues($string)\n {\n $values = array();\n $value = '';\n $string = str_replace(array('\\\\', \"''\"), array('\\\\\\\\', \"\\\\'\"), $string);\n $strLen = strlen($string);\n $cursor = 0;\n while ($cursor < $strLen) {\n switch ($string[$cursor]) {\n case '\\\\':\n $value .= $string[$cursor + 1];\n $cursor++;\n break;\n case ',':\n $values[] = $value;\n $value = '';\n break;\n case \"'\":\n if (empty($value)) {\n $value = $string[$cursor + 1];\n $cursor++;\n }\n break;\n default:\n $value .= $string[$cursor];\n }\n $cursor++;\n }\n\n if (!empty($value)) {\n $values[] = $value;\n }\n\n return $values;\n }", "public function values(): ?array\n {\n $parameters = [];\n foreach ($this->data['fields'] as $index => $input) {\n $parameters[$index] = FILTER_SANITIZE_SPECIAL_CHARS;\n }\n return filter_input_array(INPUT_POST, $parameters);\n }", "function _scsv_to_array( string $string, bool $to_json = false ) {\n\t\treturn IMFORZA_Utils::scsv_to_array( $string, $to_json );\n\t}", "public static function decode( $value ) {\n\t\tif ( ! is_array( $value ) ) {\n\t\t\t$value = explode( ' ', $value );\n\t\t}\n\n\t\t$decoded_val = array();\n\t\tforeach ( $value as $_value ) {\n\t\t\tpreg_match( '/([-0-9]*)(.*)/', $_value, $matches );\n\t\t\t$cur_val = 0;\n\t\t\tif ( ! empty( $matches[1] ) ) {\n\t\t\t\t$cur_val = $matches[1];\n\t\t\t}\n\t\t\t$cur_units = '';\n\t\t\tif ( ! empty( $matches[2] ) ) {\n\t\t\t\t$cur_units = $matches[2];\n\t\t\t}\n\t\t\t$decoded_val[] = array(\n\t\t\t\t'val' => $cur_val,\n\t\t\t\t'units' => $cur_units,\n\t\t\t);\n\t\t}\n\n\t\treturn $decoded_val;\n\t}", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "function fusion_string_to_array( $string ) {\n\n\t// If already an array, return early.\n\tif ( is_array( $string ) ) {\n\t\treturn $string;\n\t}\n\n\t$string = stripslashes( $string );\n\n\tif ( empty( $string ) ) {\n\t\treturn false;\n\t}\n\n\t$result = [];\n\t$pairs = explode( '&', $string );\n\n\tforeach ( $pairs as $key => $pair ) {\n\t\t// Use the original parse_str() on each element.\n\t\tparse_str( $pair, $params );\n\n\t\t$k = key( $params );\n\n\t\tif ( ! isset( $result[ $k ] ) ) {\n\t\t\t$result += $params;\n\t\t} else {\n\t\t\t$result[ $k ] = fusion_array_merge_recursive( $result[ $k ], $params[ $k ] );\n\t\t}\n\t}\n\n\treturn $result;\n}", "public function getStringValues(Context\\Context $context):array {\n return parent::getStringValues($context);\n }", "function arrayLetras($texto){\n $texto = strtolower($texto); \n return str_split($texto);\n}", "public function getValues()\n {\n return $this->getVal('value', []);\n }", "function getArray() {\n\treturn array('Red', 'Green', 'Blue');\n}", "private static function getArrayForTuple( $tuple ) {\n\t\treturn explode( Enum::VALUE_LABEL_SEPARATOR, $tuple );\n\t}", "public function unserializeValue($value)\n {\n if (is_numeric($value)) {\n return [$this->fixQty($value)];\n }\n if (is_string($value) && !empty($value)) {\n return unserialize($value);\n }\n return [];\n }", "public function getNonStrings()\n {\n return array(\n array(11),\n array(-3),\n array(3.14),\n array(true),\n array(false),\n array(null),\n array(array()),\n array(new \\stdClass())\n );\n }", "public function getNonStrings()\n {\n return array(\n array(11),\n array(-3),\n array(3.14),\n array(true),\n array(false),\n array(null),\n array(array()),\n array(new \\stdClass())\n );\n }", "public function queryToArray()\n {\n $array = [];\n parse_str($this->query, $array);\n\n return $array;\n }", "function ObtenerCOMANDOS_EJECUCION() {\r\n\t$lista = array();\r\n\r\n\t$listaPares = split(\"&\",COMANDOS_EJECUCION);\r\n\tforeach ($listaPares as $parEjecucion) {\r\n\t\tlist($desc,$path) = split(\"=\",$parEjecucion);\r\n\t\t$lista[$desc]=$path;\r\n\t}\r\n\r\n\treturn $lista;\r\n}", "public function getParts()\n {\n if (is_null($this->value)) {\n return [];\n } elseif (is_array($this->value)) {\n return $this->value;\n } else {\n return [$this->value];\n }\n }", "function cera_grimlock_to_array( $args ) {\n\tif ( ! empty( $args ) && ( is_string( $args ) || is_array( $args ) ) ) {\n\t\tif ( is_string( $args ) ) {\n\t\t\t$args = preg_split( '#\\s+#', $args );\n\t\t}\n\t\treturn array_map( 'esc_attr', $args );\n\t}\n\treturn array();\n}", "public function transform($valueAsString)\n {\n if (empty($valueAsString)) {\n return [];\n }\n return unserialize($valueAsString);\n }", "public function get_valor() {\n\t\t\n\t\t$dato = self::get_dato();\n\t\t/*\n\t\t$separator = ' , ';\n\t\tif($this->modo=='list') $separator = '<br>';\n\n\t\tif (is_array($valor)) {\n\t\t\t# return \"Not string value\";\n\t\t\t$string \t= '';\n\t\t\t$n \t\t\t= count($valor);\n\t\t\tforeach ($valor as $key => $value) {\n\n\t\t\t\tif(is_array($value)) $value = print_r($value,true);\n\t\t\t\t$string .= \"$key : $value\".$separator;\n\t\t\t}\n\t\t\t$string = substr($string, 0,-4);\n\t\t\treturn $string;\n\n\t\t}else{\n\t\t\t\n\t\t\treturn $valor;\n\t\t}\n\t\t*/\n\t\tif(isset($dato['counter'])) {\n\t\t\t$valor = $this->tipo.'-'.$dato['counter'];\n\t\t}else{\n\t\t\t$valor = $this->tipo;\n\t\t}\n\n\t\treturn $valor;\n\t}", "function to_array() {\r\n\t\t$out = array();\r\n\t\t\r\n\t\tforeach($this->input as $item) {\r\n\t\t\t$out[$item['name']] = $item['value'];\r\n\t\t}\r\n\t\t\r\n\t\treturn $out;\r\n\t}", "public function parse_array($value)\n\t{\n\t\tif ($value==null)\n\t\t\treturn array();\n\t\t\n\t\tif (is_array($value))\n\t\t\treturn $value;\n\t\t\t\n\t\t$value=trim($value,'{}');\n\t\t$result=explode(',',$value);\n\t\t\n\t\tfor($i=0; $i<count($result); $i++)\n\t\t\tif ($result[$i]=='NULL')\n\t\t\t\t$result[$i]=null;\n\t\t\t\t\n\t\treturn $result;\n\t}", "public function getArray($prop) {\n\n\t\t\t// Get property\n\t\t\t$val = $this->get($prop);\n\n\t\t\t// Parse as a string\n\t\t\tif (is_array($val)) {\n\t\t\t\treturn $val;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t}", "public function parse(string $string): array;", "function strToArray(&$string, &$array){\r\n $array = explode(\"\\n\", $string);\r\n }", "public function getDataprotArray() {\n\t\t$arr = array();\n\t\t$ds = $this->getDataprotXML();\n\t\tif (strlen($ds) > 1) {\n\t\t\t$arr = GeneralUtility::xml2array($ds);\n\t\t}\n\n\t\treturn $arr;\n\t}", "abstract public static function getValues(): array;", "public function getValues(): array\n {\n $enumeration = $this->enumeration;\n $values = [];\n foreach ($this->getOrdinals() as $ord) {\n $values[] = $enumeration::byOrdinal($ord)->getValue();\n }\n return $values;\n }", "function StrToArray($Qstr)\r\n\t{\r\n\t$finalArr=array();\r\n\t\t\r\n\t\t$qryArr=split(\"&\",$Qstr);\r\n\t\t\r\n\t\t\tif(!empty($Qstr))\r\n\t\t\t{\r\n\t\t\t\r\n\t\t\t\tforeach($qryArr as $item)\r\n\t\t\t\t{\r\n\t\t\t\t\t$Qarr=split(\"=\",$item);\r\n\t\t\t\t\tif(count($Qarr)==2)\r\n\t\t\t\t\t$finalArr[$Qarr[0]]=$Qarr[1];\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn $finalArr;\r\n\t\t\t}\r\n\t}", "private static function parseArray($val)\n {\n $result = array();\n $openBrackets = 0;\n $openString = false;\n $openCurlyBraces = 0;\n $openLString = false;\n $buffer = '';\n\n $strLen = strlen($val);\n for($i = 0; $i < $strLen; $i++)\n {\n if($val[$i] == '[' && !$openString && !$openLString)\n {\n $openBrackets++;\n\n if($openBrackets == 1)\n {\n // Skip first and last brackets.\n continue;\n }\n }\n elseif($val[$i] == ']' && !$openString && !$openLString)\n {\n $openBrackets--;\n\n if($openBrackets == 0)\n {\n // Allow terminating commas before the closing bracket\n if(trim($buffer) != '')\n {\n $result[] = self::parseValue( trim($buffer) );\n }\n\n if (!self::checkDataType($result))\n {\n throw new Exception('Data types cannot be mixed in an array: ' . $buffer);\n }\n // Skip first and last brackets. We're finish.\n return $result;\n }\n }\n elseif($val[$i] == '\"' && $val[$i - 1] != \"\\\\\" && !$openLString)\n {\n $openString = !$openString;\n }\n elseif($val[$i] == \"'\" && !$openString) {\n $openLString = !$openLString;\n }\n elseif($val[$i] == \"{\" && !$openString && !$openLString) {\n $openCurlyBraces++;\n }\n elseif($val[$i] == \"}\" && !$openString && !$openLString) {\n $openCurlyBraces--;\n }\n \n if( ($val[$i] == ',' || $val[$i] == '}') && !$openString && !$openLString && $openBrackets == 1 && $openCurlyBraces == 0)\n {\n if ($val[$i] == '}') {\n $buffer .= $val[$i];\n }\n\n $buffer = trim($buffer);\n if (!empty($buffer)) {\n $result[] = self::parseValue($buffer);\n\n if (!self::checkDataType($result))\n {\n throw new Exception('Data types cannot be mixed in an array: ' . $buffer);\n }\n }\n $buffer = '';\n }\n else\n {\n $buffer .= $val[$i];\n }\n }\n\n // If we're here, something went wrong.\n throw new Exception('Wrong array definition: ' . $val);\n }", "public function getCheckedValues()\r\n {\r\n if (is_null($this->_values)) {\r\n $data = $this->getConfigData();\r\n //var_dump($data); exit(1);\r\n //var_dump(isset($data['payment/culqi/checkbox'])); exit(1);\r\n if (isset($data[self::CONFIG_PATH])) {\r\n $data = $data[self::CONFIG_PATH];\r\n } else {\r\n $data = '';\r\n }\r\n $this->_values = explode(',', $data);\r\n }\r\n\r\n //var_dump($this->_values); exit(1);\r\n return $this->_values;\r\n }", "function convertEnumToArray($enum)\n{\n\t$enum = str_replace(\"(\", \"\", $enum);\n\t$enum = str_replace(\")\", \"\", $enum);\n\t$enum = str_replace(\"'\", \"\", $enum);\n\t$arr = explode(\",\", $enum);\n\treturn $arr;\n}", "public function getQueryAsArray()\n {\n $query = [];\n if ($this->query) {\n parse_str($this->query, $query);\n }\n\n return $query;\n }", "function parse_response_array($string) {\n $response_string_array = explode(\"&\", $string);\n\n $proper_array = array();\n\n foreach ($response_string_array as $value) {\n list($key, $val) = explode(\"=\", $value);\n\n $val = urldecode($val);\n\n $proper_array[\"$key\"] = $val;\n }\n unset($key);\n unset($val);\n\n return $proper_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 }", "function SelectValuesUnidadMedicoArray($db_conx, $uid) {\r\n $data = array();\r\n $sql = \"SELECT uni_codigo, uni_descrip FROM vunidadmedico WHERE med_codigo = $uid\";\r\n $query = mysqli_query($db_conx, $sql);\r\n\r\n $n_filas = $query->num_rows;\r\n $c = 0;\r\n while ($row = mysqli_fetch_array($query)) { \r\n $data[$c] = $row[0] . \"*\" . $row[1];\r\n $c++;\r\n }\r\n return $data;\r\n}", "private function splitQueryValue($value): array\r\n {\r\n $data = explode('=', $value, 2);\r\n\r\n if (!isset($data[1])) {\r\n $data[] = null;\r\n }\r\n\r\n return $data;\r\n }" ]
[ "0.7490449", "0.71725625", "0.6906776", "0.66448903", "0.6279648", "0.62537414", "0.61861944", "0.6182857", "0.6074942", "0.60589015", "0.60567045", "0.60436594", "0.60358083", "0.60349977", "0.6022964", "0.60065985", "0.59971297", "0.59648573", "0.59562325", "0.5927846", "0.5910273", "0.59004307", "0.5891072", "0.587758", "0.5863578", "0.5853901", "0.5850541", "0.58358705", "0.58344406", "0.5820393", "0.5812186", "0.58047485", "0.58047485", "0.5800311", "0.5795958", "0.5794328", "0.5785641", "0.5781524", "0.5770545", "0.5767189", "0.57622516", "0.57500666", "0.57491165", "0.5744726", "0.57367855", "0.5729745", "0.57219815", "0.57212955", "0.5720416", "0.5717448", "0.5716779", "0.57108355", "0.5697578", "0.5696343", "0.5674489", "0.56555545", "0.56463957", "0.5643988", "0.5631373", "0.56306237", "0.56242216", "0.5622118", "0.56199634", "0.5616969", "0.5616969", "0.5616969", "0.5616969", "0.5616969", "0.5616969", "0.5606515", "0.5601187", "0.55986774", "0.5590711", "0.55832165", "0.5582676", "0.556599", "0.5557523", "0.5557523", "0.55563986", "0.55467325", "0.5542949", "0.5518573", "0.5515321", "0.5507749", "0.55031466", "0.5496932", "0.5495637", "0.5489276", "0.54886115", "0.54817027", "0.5480981", "0.54807055", "0.54791206", "0.5472407", "0.5472399", "0.54648507", "0.5463369", "0.5457081", "0.5454176", "0.5452955", "0.54494256" ]
0.0
-1
Retorna a url base
function base_url() { return APP::getBaseUrl(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_base_url() {\n $fin_string = '';\n $parts = explode('/', $this->request_uri);\n if (count($parts) > 2) {\n $subparts = array_slice($parts, 2);\n foreach ($subparts as $p)\n $fin_string .= $p . '/';\n return substr($fin_string, 0, -1);\n }\n return $fin_string;\n }", "public function base_url()\n\t{\n\t\treturn URL::base();\n\t}", "public function getBaseUrl();", "public function getBaseUrl();", "public function getBaseUrl();", "public function getBaseUrl();", "public function getBaseUrl();", "public function get_base_url()\r\n\t\t{\r\n\t\t\t$url = \"http\";\r\n \t\t\tif ( isset( $_SERVER[ 'HTTPS' ] ) && $_SERVER[ 'HTTPS' ] == \"on\" ) $url .= \"s\";\r\n\t\t\t$url .= \"://\";\r\n \t\t\tif ( $_SERVER[ 'SERVER_PORT' ] != \"80\" )\r\n\t\t\t\t$url .= $_SERVER[ 'SERVER_NAME' ]. \":\" . $_SERVER[ 'SERVER_PORT' ] . $_SERVER[ 'REQUEST_URI' ];\r\n\t\t\telse\r\n\t\t\t\t$url .= $_SERVER[ 'SERVER_NAME' ] . \"/\";\r\n\t\t\t\r\n\t\t\treturn $url . self::HOME_DIR;\r\n\t\t}", "private static function base_url($path=NULL)\n {\n\t\tglobal $url;\n $fullurl=$url.$path;\n return $fullurl;\n\t}", "function base_url(){\n $url = BASE_URL;\n return $url;\n }", "private static function getUrlBase() {\n\t\tif(!isset(self::$usrBbase)) {\n\t\t\tself::$urlBase =\n\t\t\t\tself::getScheme()\n\t\t\t\t. '://'\n\t\t\t\t. self::getHost()\n\t\t\t\t. ((self::getPort() == 80 || self::getPort() == 443)\n\t\t\t\t\t? ''\n\t\t\t\t\t: ':'.self::getPort())\n\t\t\t\t. self::getBasePath();\n\t\t}\n\t\treturn self::$urlBase;\n\t}", "protected function urlBase()\n {\n return \"/bibs/{$this->bib->mms_id}/representations/{$this->representation_id}\";\n }", "private function buildBaseUrl()\n {\n return $this->scheme() . $this->host;\n }", "protected static function baseurl($path=NULL)\n {\n\t\t$res=self::base_url($path);\n\t\treturn $res;\n }", "public function getBaseUrl() {}", "public function base_url() {\n\t\t$protocol = ( ! empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? 'https' : 'http';\n\t\t$host = $_SERVER['HTTP_HOST'];\n\t\t$script = dirname($_SERVER['SCRIPT_NAME']);\n\t\treturn $protocol . '://' . $host . $script . '/';\n\t}", "function base_url(){\n return BASE_URL;\n }", "public function base_url()\n {\n if (isset($_SERVER['HTTP_HOST']) && preg_match('/^((\\[[0-9a-f:]+\\])|(\\d{1,3}(\\.\\d{1,3}){3})|[a-z0-9\\-\\.]+)(:\\d+)?$/i', $_SERVER['HTTP_HOST']))\n {\n $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? \"https://\" : \"http://\";\n $baseurl = $protocol.$_SERVER['HTTP_HOST'].substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], basename($_SERVER['SCRIPT_FILENAME'])));\n }\n else\n {\n $baseurl = 'http://localhost/';\n }\n\n return $baseurl;\n }", "function base_url($url = NULL){\n\t\tif ($url != NULL)\n\t\t{\n\t\t\t$baseurl = 'http://localhost/pkl/'.$url;\n\t\t}\n\t\telse\t\n\t\t{\n\t\t\t$baseurl = 'http://localhost/pkl/';\n\t\t}\n\t\t\n\t\treturn $baseurl;\n\t}", "public function getBaseUri() {}", "public function getBaseUri() {}", "private function urlWrapper() {\n return $this->baseURL;\n }", "public function getBaseUri(): string;", "protected function determineBaseUrl() {}", "function return_base_URL(){\n\t$current_url = \"http://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\n\t$current_url = explode('/', $current_url);\n\tunset($current_url[count($current_url) - 1]);\n\t$current_url = implode('/', $current_url);\n\n\treturn $current_url . '/';\n}", "public function getBaseUrl() {\r\n\t\treturn home_url();\r\n\t}", "function base_url($uri=null){\n\t$base_url = 'http://localhost/KoperasiSimpanPinjam/';\n\tif($uri == null){\n\t\treturn $base_url;\n\t}else{\n\t\treturn $base_url.$uri;\n\t}\n}", "function get_base_url($protocol=true)\n{\n return Request::GetBaseUrl($protocol);\n}", "private function getBaseUrl() : string\n {\n return preg_replace(\"/(?<=\\/api\\/v\\d)(.*)/\", '', $this->request->getFullUrl());\n }", "function get_base_url() {\n return $this->base_url;\n }", "private function getBaseURL() {\n $pageURL = 'http';\n if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') {\n $pageURL .= 's';\n }\n $pageURL .= '://';\n if ($_SERVER['SERVER_PORT'] !== '80') {\n $pageURL .= $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];\n } else {\n $pageURL .= $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n }\n $splitted = explode('?', $pageURL);\n if (substr($splitted[0], -1) === '/') {\n return $splitted[0];\n }\n\n return $splitted[0] . '/';\n }", "public function getBaseUrl() : string\n {\n return $this->base;\n }", "protected static function generate_base_url()\n\t{\n\t\t$base_url = parent::generate_base_url();\n\t\treturn str_replace('htdocs/novius-os/', '', $base_url);\n\t}", "function getBaseUrl()\n{\n $doc_root_folders = utf8_explode(\"/\", $_SERVER['DOCUMENT_ROOT']);\n $cwd__folders = utf8_explode(\"/\", getcwd());\n //the difference between those is the path from doc root to the folder where\n //all files for this URI reside\n $path_from_doc_root = implode(\"/\", array_diff($cwd__folders, $doc_root_folders));\n return $_SERVER['HTTP_HOST'].'/'.$path_from_doc_root;\n}", "function base_url() {\n return Micro::get(Config::class)->get('app.base_url');\n }", "function getBaseUrl() {\n if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')\n $link = \"https\";\n else\n $link = \"http\";\n\n // Here append the common URL characters.\n $link .= \"://\";\n\n // Append the host(domain name, ip) to the URL.\n $link .= $_SERVER['HTTP_HOST'];\n\n // Append the requested resource location to the URL\n $link .= $_SERVER['REQUEST_URI'];\n\n // Print the link\n echo substr($link, 0, strrpos($link, '/') + 1);\n}", "function get_base_url()\n{\n $url = explode('/',$_SERVER['REQUEST_URI']);\n $segmentOne = isset($url[0]) ? $url[0] : '';\n $segmentTwo = isset($url[1]) ? $url[1] : '';\n $url = 'http://localhost/' . ($segmentOne ? $segmentOne . '/' : '') . ($segmentTwo ? $segmentTwo : '') . '/';\n return $url;\n}", "public function getRealUrlAliasBase(): string;", "public function getBaseUrl() {\n return self::_getBaseUrl($this->user->getId(), $this->game->getId());\n }", "protected function base()\n {\n return $this->use_production\n ? self::PRODUCTION_URI\n : self::DEVELOPMENT_URI;\n }", "protected function urlBase()\n {\n return sprintf('/users/%s', rawurlencode($this->id));\n }", "protected function get_url()\n {\n return $this->base_url + $this->api_version; \n }", "public static function baseurl() {\n return stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://' . $_SERVER['HTTP_HOST'] . \"/Gym/\";\n }", "function Twiloop_url_base()\n{\n $url_base = '';\n $url_base = strrpos($_SERVER['PHP_SELF'], '/', -4)+1;\n $url_base = substr($_SERVER['PHP_SELF'], 0, $url_base);\n $url_base = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$url_base;\n return $url_base;\n}", "public function GetBaseUrl()\n {\n // @TODO Server Object\n $protocol = ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] === 'on' || $_SERVER['HTTPS'] == 1)) ? \"https\" : \"http\") . '://';\n $host = $_SERVER['HTTP_HOST'];\n\n // use port if non default\n $port =\n isset($parts['port']) &&\n (($protocol === 'http://' && $parts['port'] !== 80) ||\n ($protocol === 'https://' && $parts['port'] !== 443))\n ? ':' . $parts['port'] : '';\n\n // rebuild\n return $protocol . $host . $port;\n }", "private function getBaseUrl(): string\n {\n return $this->agentUrl . self::OPA_API_VER . \"/\";\n }", "public static function getBaseURL(){\n return self::$baseURL;\n }", "public function getBaseURL()\n\t{\n\t\treturn $this->base_url;\n\t}", "public function getBaseUrl ()\n {\n return $this->base_url;\n }", "function GetMainBaseFromURL()\n{\n\t$url = (!empty($_SERVER['HTTPS'])) ? \"https://\".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : \"http://\".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];\n\n\t$chars = preg_split('//', $url, -1, PREG_SPLIT_NO_EMPTY);\n\t$slash = 3; // 3rd slash\n\t$i = 0;\n\tforeach($chars as $key => $char)\n\t{\n\t\tif($char == '/')\n\t\t{\n\t\t $j = $i++;\n\t\t}\n\t\n\t\tif($i == 3)\n\t\t{\n\t\t $pos = $key; break;\n\t\t}\n\t}\n\tif($_REQUEST['CFSystem']['url_friendly'])\n\t{\n\t\t$url = (!empty($_SERVER['HTTPS'])) ? \"https://\".$_SERVER['SERVER_NAME']: \"http://\".$_SERVER['SERVER_NAME'];\n\t\t$main_base = rtrim($url.'/'.basename($_REQUEST['CFSystem']['baseurl']),'/');\n\t}\n\telse\n\t{\n\t\t$main_base = substr($url, 0, $pos);\n\t}\n\treturn $main_base.'/';\t\n}", "public static function get_baseurl()\n {\n }", "public function getBaseUrl()\n\t\t{\n\t\t\treturn $this->base_url;\n\t\t}", "public function getBaseUrl() {\n if ($pos = strpos ( $this->url, '?' )) {\n return substr ( $this->url, 0, $pos );\n }\n return $this->url;\n }", "function getBaseUrl(){\n return $_SERVER['SERVER_NAME'];\n}", "public function getBaseUrl(){\n $uri = self::getCurrentUri();\n $url = self::getCurrentPage();\n\n if ($uri !== '/') {\n $url = trim(str_replace($uri, '', $url), '/');\n }\n\n return self::addBackSlash($url);\n }", "function base_url($param = []) {\n\n\n $base_url = 'https://rplsmpku.000webhostapp.com/';\n $result = (!$param) ? $base_url : $base_url . $param;\n\n return $result;\n}", "function baseUrl(){\n if(isset($_SERVER['HTTPS'])){\n $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != \"off\") ? \"https\" : \"http\";\n }\n else{\n $protocol = 'http';\n }\n return $protocol . \"://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n}", "static function obtenerUrlActual() {\n $url = Util::crearUrl($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n return $url;\n }", "protected function getBaseUrl()\n {\n return self::BASE_URL;\n }", "private function base_uri( $localizable = TRUE ) {\r\n\t\treturn implode ( '/', array (\r\n\t\t\t\t$this->host,\r\n\t\t\t\tself::API_VERSION \r\n\t\t) );\r\n\t}", "public function getBaseUrl($parts = \"\") {\n\t\treturn UrlHelper::getBaseUrl($parts);\n\t}", "public function getBaseURL() {\n $url = $_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://';\n \n $url .= $_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']);\n \n return $url;\n }", "public function getBaseURL(){\n\t\tif($this->htaccess){\n\t\t\treturn \"/\";\n\t\t}\n\t\treturn \"\";\n\t}", "function base_url() {\r\necho \"<base href=\" . get_site_url() . \">\";\r\n}", "public function url()\r\n {\r\n return $this->get_base_url() . http_build_query($this->get_query_params());\r\n }", "public static function getBaseUrl()\n\t{\n\t\tlist($host, $address, $port, $ssl) = MHTTPD::getServerInfo();\n\t\t$url = $ssl ? 'https://' : 'http://';\n\t\t$url .= $host.':'.$port;\n\t\treturn $url;\n\t}", "protected function getBaseUrl(): string\n {\n return \"\";\n }", "function baseUrl(){\n return sprintf(\n \"%s://%s\",\n isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http',\n $_SERVER['SERVER_NAME']\n );\n }", "public function get_url();", "public static function getBaseUri()\n {\n $server = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];\n return rtrim(self::getProtocol() . '://' . $server, '/');\n }", "function get_base()\n\t{\n\t\t$site_url = get_site_option('siteurl');\n\t\t$base = trim(preg_replace('#https?://[^/]+#ui', '', $site_url), '/');\n\n\t\t// @since 1.3.0 - guess min dir to check for any dir that we have to\n\t\t// remove from the base\n\t\t$this->_guess_min_dir();\n\n\t\t$this->base = !empty($this->remove_from_base)\n\t\t\t? preg_replace('#^' . $this->remove_from_base . '/?#ui', '', $base, 1)\n\t\t\t: $base;\n\t}", "public function getBaseUrl()\n {\n return $this->base_url;\n }", "public function getBaseUrl()\n {\n return $this->base_url;\n }", "public static function getBaseUrl() {\n return substr($_SERVER[\"REQUEST_URI\"], 0, strrpos($_SERVER[\"REQUEST_URI\"], \"/\") + 1);\n }", "public function getBaseUrl()\n {\n $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';\n return sprintf(\"%s://%s\", $protocol, $_SERVER['SERVER_NAME']);\n }", "public static function getCurrentBaseUrl() : string {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__);\n\n\t\t$current_page_url = 'http';\n\n\t\tif (@$_SERVER['HTTPS'] === 'on') { $current_page_url .= 's';\n\t\t}\n\t\t$current_page_url .= '://';\n\n\t\tif (isset($_SERVER['SERVER_PORT']) && isset($_SERVER['HTTP_HOST']) && $_SERVER['SERVER_PORT'] != '80') {\n\t\t\t$current_page_url .= $_SERVER['HTTP_HOST'] . ':' . $_SERVER['SERVER_PORT'];\n\t\t} else if(isset($_SERVER['HTTP_HOST'])) {\n\t\t\t$current_page_url .= $_SERVER['HTTP_HOST'];\n\t\t} else {\n\t\t\t$current_page_url .= 'http://localhost/';\n\t\t}\t\n\n\t\tself::_notify(get_class() . '::' . __FUNCTION__, $current_page_url);\n\t\t$current_page_url = self::_applyFilter(get_class(), __FUNCTION__, $current_page_url, array('event' => 'return'));\n\n\t\treturn $current_page_url;\n\t}", "public function determineBaseUrl()\n {\n // why this works at all :)\n return dirname($_SERVER['SCRIPT_NAME']);\n }", "function get_base_url() {\n $protocol = strtolower(substr($_SERVER[\"SERVER_PROTOCOL\"], 0, 5)) == 'https://' ? 'https://' : 'http://';\n\n /* returns /myproject/index.php */\n $path = $_SERVER['PHP_SELF'];\n /*\n * returns an array with:\n * Array (\n * [dirname] => /myproject/\n * [basename] => index.php\n * [extension] => php\n * [filename] => index\n * )\n */\n $path_parts = pathinfo($path);\n $directory = $path_parts['dirname'];\n /*\n * If we are visiting a page off the base URL, the dirname would just be a \"/\",\n * If it is, we would want to remove this\n */\n $directory = ($directory == \"/\") ? \"\" : $directory;\n\n /* Returns localhost OR mysite.com */\n $host = $_SERVER['HTTP_HOST'];\n\n /*\n * Returns:\n * http://localhost/mysite\n * OR\n * https://mysite.com\n */\n return $protocol . $host . $directory;\n}", "public function get_base_uri()\r\n\t{\r\n\t\tif($this->base_uri != null)\r\n\t\t\treturn $this->base_uri;\r\n\t\t\r\n\t\treturn htmlentities(dirname($_SERVER['PHP_SELF']), ENT_QUOTES | ENT_IGNORE, \"UTF-8\") . '/';\r\n\t}", "public static function base(): string\n\t{\n\t\treturn sprintf(\n\t\t\t'%s://%s/%s',\n\t\t\tisset($_SERVER['SERVER_PROTOCOL']) && strpos($_SERVER['SERVER_PROTOCOL'], 'HTTPS') !== false ? 'https' : 'http',\n\t\t\t$_SERVER['SERVER_NAME'] ?? 'apache',\n\t\t\tself::PUBLIC_PATH\n\t\t);\n\t}", "function getBaseUrl()\n{\n $port = ':' . $_SERVER['SERVER_PORT'];\n if (($_SERVER['REQUEST_SCHEME']=='http' && $_SERVER['SERVER_PORT']=='80')\n || ($_SERVER['REQUEST_SCHEME']=='https' && $_SERVER['SERVER_PORT']=='443')\n ) {\n $port = '';\n }\n $path = $_SERVER['SCRIPT_NAME'];\n if (strrpos($path,'index.php')==strlen($path)-9) {\n $path = substr($path,0,-9);\n }\n $baseUrl = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['SERVER_NAME'] . $port . $path;\n return $baseUrl;\n}", "public static function base()\n {\n\n static $base = false;\n\n if ($base === false) {\n\n $base = Config::get('monstra.base_url');\n\n // Try to autodetect base url if its not configured\n if ($base === '' && isset($_SERVER['HTTP_HOST'])) {\n\n $protocol = Request::isSecure() ? 'https' : 'http';\n\n $script = $_SERVER['SCRIPT_NAME'];\n\n $base = rtrim($protocol . '://' . $_SERVER['HTTP_HOST'] . str_replace(basename($script), '', $script), '/');\n }\n\n // Add index.php?\n !Config::get('monstra.clean_urls') && $base .= '/index.php';\n }\n\n return $base;\n }", "public static function getBaseUrl()\n {\n $baseUrl = url('/');\n return $baseUrl;\n }", "public function base_url($uri = '')\n\t{\n\t\treturn $this->slash_item('base_url').ltrim($this->_uri_string($uri),'/');\n\t}", "public abstract function getURL();", "public function getBaseUrl()\n {\n return $this->detectBaseUrl();\n }", "function getBaseUrl() {\n\t$baseUrl = ($_SERVER['HTTP_HOST'] == 'development.grafikchaos.com') ? '/catchcod/' : '/';\n\treturn $baseUrl;\n}", "function base_path($uri = '', $protocol = NULL)\n\t{\n\t\treturn get_instance()->config->base_path($uri, $protocol);\n\t}", "public function baseUri()\n {\n return $this->baseUri;\n }", "abstract public function getRawRequestUrl();", "function base_url($url = '') {\n return Url::make($url);\n}", "public function getBaseUrl()\n {\n foreach($this->requestData as $key => $data)\n {\n $this->baseUrl = $this->baseUrl . '&' . $key . '=' . $data;\n }\n\n return $this->baseUrl;\n }", "public static function getBaseUrl()\n {\n $protocol = isset($_SERVER['HTTPS']) ? 'https' : 'http';\n $url = $protocol . '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];\n\n // cut at last '/' (we dont want to see index.php)\n return substr($url, 0, strrpos($url, '/'));\n }", "public function base_url(){\n return $this->plugin_url() . 'base/';\n }", "public function baseUrl($parts = \"\") {\n return UrlHelper::getBaseUrl($parts);\n }", "public static function baseURI($mnt)\n{\nreturn 'phk://'.$mnt.'/';\n}", "public function getBaseUrl()\n {\n return $this->getScheme() . $this->getBasicAuth() . $this->getHost() . \":\" . $this->getPort() . $this->getEndpoint();\n }", "public function getURL ();", "public function getBaseUri()\n {\n //return self::BASE_INT_URI\n return self::BASE_URI;\n }", "function getFullUrl() {\n /*** check for https ***/ /*** return the full address ***/\n return 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n }", "function get_base_url_api($protocol=true)\n{\n return Request::GetBaseUrlAPI($protocol);\n}" ]
[ "0.81908953", "0.80446887", "0.79829895", "0.79829895", "0.79829895", "0.79829895", "0.79829895", "0.79544437", "0.78841686", "0.78817815", "0.78567487", "0.7849191", "0.784056", "0.7815903", "0.7795432", "0.776637", "0.7757067", "0.7738066", "0.7721652", "0.77162194", "0.77147275", "0.7708559", "0.7701516", "0.7682738", "0.76386136", "0.7631852", "0.7624458", "0.76018673", "0.7596647", "0.7595693", "0.7561727", "0.75596863", "0.75399846", "0.7531404", "0.7529814", "0.7524023", "0.75234336", "0.7519096", "0.7495903", "0.74823916", "0.7457224", "0.74489033", "0.73998964", "0.73926777", "0.73902696", "0.73869175", "0.7379538", "0.73795235", "0.7370866", "0.7370544", "0.73690414", "0.7363636", "0.73565567", "0.7347827", "0.7342077", "0.73418933", "0.7333958", "0.73298025", "0.73144436", "0.7312883", "0.7305727", "0.730479", "0.7303569", "0.7290464", "0.7287669", "0.7278138", "0.7276022", "0.7268084", "0.72665805", "0.7252598", "0.7246705", "0.7243048", "0.7243048", "0.7223317", "0.72193897", "0.720971", "0.7203746", "0.7201456", "0.7199188", "0.7188634", "0.71883214", "0.7186007", "0.7185293", "0.71716535", "0.7162538", "0.7160195", "0.7157946", "0.7152785", "0.7145477", "0.7132674", "0.71266776", "0.71260697", "0.7123288", "0.7123285", "0.7120443", "0.7119232", "0.7111184", "0.7107019", "0.71061957", "0.7105545", "0.7102618" ]
0.0
-1
Retrieves a list of models based on the current search/filter conditions. Typical usecase: Initialize the model fields with values from filter form. Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields. Pass data provider to CGridView, CListView or any similar widget.
public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $criteria=new CDbCriteria; $criteria->compare('componente_id',$this->componente_id); $criteria->compare('tipo_dato',$this->tipo_dato,true); $criteria->compare('descripcion',$this->descripcion,true); $criteria->compare('cruce_automatico',$this->cruce_automatico,true); $criteria->compare('sw_obligatorio',$this->sw_obligatorio,true); $criteria->compare('orden',$this->orden); $criteria->compare('sw_puntaje',$this->sw_puntaje,true); $criteria->compare('sw_estado',$this->sw_estado,true); $criteria->compare('todos_obligatorios',$this->todos_obligatorios,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object_type_id);\n\t\t$criteria->compare('data_type_id',$this->data_type_id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('client_ip',$this->client_ip,true);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_origin',$this->url_origin,true);\n\t\t$criteria->compare('device',$this->device,true);\n\t\t$criteria->compare('country_name',$this->country_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('regionName',$this->regionName,true);\n\t\t$criteria->compare('cityName',$this->cityName,true);\n\t\t$criteria->compare('browser',$this->browser,true);\n\t\t$criteria->compare('os',$this->os,true);\n\t\t\t// se agrego el filtro por el usuario actual\n\t\t$idUsuario=Yii::app()->user->getId();\n\t\t$model = Listings::model()->finbyAttributes(array('user_id'=>$idUsuario));\n\t\tif($model->id!=\"\"){\n\t\t\t$criteria->compare('object_id',$model->id);\t\n\t\t}else{\n\t\t\t$criteria->compare('object_id',\"Null\");\t\n\t\t}\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('model_id',$this->model_id,true);\n $criteria->compare('color',$this->color,true);\n $criteria->compare('is_in_pare',$this->is_in_pare);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('generator_id',$this->generator_id,true);\n\t\t$criteria->compare('serial_number',$this->serial_number,true);\n\t\t$criteria->compare('model_number',$this->model_number,true);\n\t\t$criteria->compare('manufacturer_name',$this->manufacturer_name,true);\n\t\t$criteria->compare('manufacture_date',$this->manufacture_date,true);\n\t\t$criteria->compare('supplier_name',$this->supplier_name,true);\n\t\t$criteria->compare('date_of_purchase',$this->date_of_purchase,true);\n\t\t$criteria->compare('date_of_first_use',$this->date_of_first_use,true);\n\t\t$criteria->compare('kva_capacity',$this->kva_capacity);\n\t\t$criteria->compare('current_run_hours',$this->current_run_hours);\n\t\t$criteria->compare('last_serviced_date',$this->last_serviced_date,true);\n\t\t$criteria->compare('engine_make',$this->engine_make,true);\n\t\t$criteria->compare('engine_model',$this->engine_model,true);\n\t\t$criteria->compare('fuel_tank_capacity',$this->fuel_tank_capacity);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('idmodel',$this->idmodel);\n\t\t$criteria->compare('usuario_anterior',$this->usuario_anterior);\n\t\t$criteria->compare('usuario_nuevo',$this->usuario_nuevo);\n\t\t$criteria->compare('estado_anterior',$this->estado_anterior,true);\n\t\t$criteria->compare('estado_nuevo',$this->estado_nuevo,true);\n\t\t$criteria->compare('fecha',$this->fecha,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('brand',$this->brand,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('width',$this->width);\n\t\t$criteria->compare('height',$this->height);\n\t\t$criteria->compare('goods_thumb',$this->goods_thumb,true);\n\t\t$criteria->compare('goods_img',$this->goods_img,true);\n\t\t$criteria->compare('model_search',$this->model_search,true);\n\t\t$criteria->compare('brand_search',$this->brand_search,true);\n\t\t$criteria->compare('brand2',$this->brand2,true);\n\t\t$criteria->compare('brand2_search',$this->brand2_search,true);\n\t\t$criteria->compare('brand3',$this->brand3,true);\n\t\t$criteria->compare('brand3_search',$this->brand3_search,true);\n\t\t$criteria->compare('brand4',$this->brand4,true);\n\t\t$criteria->compare('brand4_search',$this->brand4_search,true);\n\t\t$criteria->compare('model2',$this->model2,true);\n\t\t$criteria->compare('model2_search',$this->model2_search,true);\n\t\t$criteria->compare('model3',$this->model3,true);\n\t\t$criteria->compare('model3_search',$this->model3_search,true);\n\t\t$criteria->compare('model4',$this->model4,true);\n\t\t$criteria->compare('model4_search',$this->model4_search,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('car',$this->car,true);\n\t\t$criteria->compare('source_id',$this->source_id,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('client_type_id',$this->client_type_id,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('other',$this->other,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('UserID',$this->UserID);\n\t\t$criteria->compare('ProviderID',$this->ProviderID);\n\t\t$criteria->compare('Date',$this->Date,true);\n\t\t$criteria->compare('RawID',$this->RawID);\n\t\t$criteria->compare('Document',$this->Document,true);\n\t\t$criteria->compare('State',$this->State,true);\n\t\t$criteria->compare('Temperature',$this->Temperature,true);\n\t\t$criteria->compare('Conditions',$this->Conditions,true);\n\t\t$criteria->compare('Expiration',$this->Expiration,true);\n\t\t$criteria->compare('Comments',$this->Comments,true);\n\t\t$criteria->compare('Quantity',$this->Quantity,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n \t'pageSize'=>Yii::app()->params['defaultPageSize'], \n ),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t// $criteria->compare('text',$this->text,true);\n\t\t// $criteria->compare('record',$this->record,true);\n\t\t$criteria->compare('user',$this->user,true);\n\t\t$criteria->compare('createdBy',$this->createdBy,true);\n\t\t$criteria->compare('viewed',$this->viewed);\n\t\t$criteria->compare('createDate',$this->createDate,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('comparison',$this->comparison,true);\n\t\t// $criteria->compare('value',$this->value,true);\n\t\t$criteria->compare('modelType',$this->modelType,true);\n\t\t$criteria->compare('modelId',$this->modelId,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('Currency_ID',$this->Currency_ID);\n\t\t$criteria->compare('CurrencyNo',$this->CurrencyNo,true);\n\t\t$criteria->compare('ExchangeVND',$this->ExchangeVND,true);\n\t\t$criteria->compare('AppliedDate',$this->AppliedDate,true);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('firm',$this->firm,true);\n\t\t$criteria->compare('change_date',$this->change_date,true);\n\t\t$criteria->compare('item_id',$this->item_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('availability',$this->availability,true);\n\t\t$criteria->compare('price',$this->price,true);\n\t\t$criteria->compare('bonus',$this->bonus,true);\n\t\t$criteria->compare('shipping_cost',$this->shipping_cost,true);\n\t\t$criteria->compare('product_page',$this->product_page,true);\n\t\t$criteria->compare('sourse_page',$this->sourse_page,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('column_id',$this->column_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('condition',$this->condition,true);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('industry',$this->industry,true);\n\t\t$criteria->compare('industry_sub',$this->industry_sub,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('province',$this->province,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('contact_name',$this->contact_name,true);\n\t\t$criteria->compare('contact_tel',$this->contact_tel,true);\n\t\t$criteria->compare('ip',$this->ip,true);\n\t\t$criteria->compare('source',$this->source,true);\n $criteria->compare('status',$this->status);\n\t\t$criteria->compare('update_time',$this->update_time);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('notes',$this->notes);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('university',$this->university,true);\n\t\t$criteria->compare('major',$this->major,true);\n\t\t$criteria->compare('gpa',$this->gpa,true);\n\t\t$criteria->compare('appl_term',$this->appl_term);\n\t\t$criteria->compare('toefl',$this->toefl);\n\t\t$criteria->compare('gre',$this->gre);\n\t\t$criteria->compare('appl_major',$this->appl_major,true);\n\t\t$criteria->compare('appl_degree',$this->appl_degree,true);\n\t\t$criteria->compare('appl_country',$this->appl_country,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new \\CDbCriteria;\n\n\t\tforeach (array_keys($this->defineAttributes()) as $name)\n\t\t{\n\t\t\t$criteria->compare($name, $this->$name);\n\t\t}\n\n\t\treturn new \\CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('goods_code',$this->goods_code,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('brand_id',$this->brand_id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('kind',$this->kind,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('size',$this->size,true);\n\t\t$criteria->compare('material',$this->material,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('purchase_price',$this->purchase_price,true);\n\t\t$criteria->compare('selling_price',$this->selling_price,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('meta_title',$this->meta_title,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ContractsDetailID',$this->ContractsDetailID,true);\n\t\t$criteria->compare('ContractID',$this->ContractID,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\t\t$criteria->compare('CustomerID',$this->CustomerID,true);\n\t\t$criteria->compare('Share',$this->Share);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria = $this->criteriaSearch();\r\n\t\t$criteria->limit = 10;\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria' => $criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('organizationName',$this->organizationName,true);\n\t\t$criteria->compare('contactNo',$this->contactNo,true);\n\t\t$criteria->compare('partnerType',$this->partnerType);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('emailId',$this->emailId,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('firstName',$this->firstName,true);\n\t\t$criteria->compare('lastName',$this->lastName,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_ID,$this->{Globals::FLD_NAME_ACTIVITY_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_TASK_ID,$this->{Globals::FLD_NAME_TASK_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_BY_USER_ID,$this->{Globals::FLD_NAME_BY_USER_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_TYPE,$this->{Globals::FLD_NAME_ACTIVITY_TYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_SUBTYPE,$this->{Globals::FLD_NAME_ACTIVITY_SUBTYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_COMMENTS,$this->{Globals::FLD_NAME_COMMENTS},true);\n\t\t$criteria->compare(Globals::FLD_NAME_CREATED_AT,$this->{Globals::FLD_NAME_CREATED_AT},true);\n\t\t$criteria->compare(Globals::FLD_NAME_SOURCE_APP,$this->{Globals::FLD_NAME_SOURCE_APP},true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('manufacturers_image',$this->manufacturers_image,true);\n\t\t$criteria->compare('date_added',$this->date_added);\n\t\t$criteria->compare('last_modified',$this->last_modified);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_clicked',$this->url_clicked);\n\t\t$criteria->compare('date_last_click',$this->date_last_click);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('date',$this->date);\n\t\t$criteria->compare('del',$this->del);\n\t\t$criteria->compare('action_id',$this->action_id);\n\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('catalog',$this->catalog,true);\n\t\t$criteria->compare('is_new',$this->is_new);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('case',$this->case);\n\t\t$criteria->compare('basis_doc',$this->basis_doc);\n\t\t$criteria->compare('calc_group',$this->calc_group);\n\t\t$criteria->compare('time',$this->time,true);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('competition',$this->competition);\n\t\t$criteria->compare('partner',$this->partner);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('website',$this->website,true);\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('data_attributes_fields',$this->data_attributes_fields,true);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('created',$this->created,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('skill_id',$this->skill_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('account_id',$this->account_id);\n\t\t$criteria->compare('field_name',$this->field_name);\n\t\t$criteria->compare('content',$this->content);\n\t\t$criteria->compare('old_data',$this->old_data,true);\n\t\t$criteria->compare('new_data',$this->new_data,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_updated',$this->date_updated,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('company_id',$this->company_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('validator',$this->validator,true);\n\t\t$criteria->compare('position',$this->position);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n $criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('display_name',$this->display_name,true);\n $criteria->compare('actionPrice',$this->actionPrice);\n\t\t$criteria->compare('translit',$this->translit,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('display_description',$this->display_description,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\t\t$criteria->compare('editing',$this->editing);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array(\n 'pageSize' => 15,\n ),\n\t\t));\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('BrandID', $this->BrandID);\n $criteria->compare('BrandName', $this->BrandName, true);\n $criteria->compare('Pinyin', $this->Pinyin, true);\n $criteria->compare('Remarks', $this->Remarks, true);\n $criteria->compare('OrganID', $this->OrganID);\n $criteria->compare('UserID', $this->UserID);\n $criteria->compare('CreateTime', $this->CreateTime);\n $criteria->compare('UpdateTime', $this->UpdateTime);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('printable_name', $this->printable_name, true);\n\t\t$criteria->compare('iso3', $this->iso3, true);\n\t\t$criteria->compare('numcode', $this->numcode);\n\t\t$criteria->compare('is_default', $this->is_default);\n\t\t$criteria->compare('is_highlight', $this->is_highlight);\n\t\t$criteria->compare('is_active', $this->is_active);\n\t\t$criteria->compare('date_added', $this->date_added);\n\t\t$criteria->compare('date_modified', $this->date_modified);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('real_name',$this->real_name,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('zip_code',$this->zip_code,true);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('city_id',$this->city_id);\n\t\t$criteria->compare('district_id',$this->district_id);\n\t\t$criteria->compare('district_address',$this->district_address,true);\n\t\t$criteria->compare('street_address',$this->street_address,true);\n\t\t$criteria->compare('is_default',$this->is_default);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('update_time',$this->update_time);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('EMCE_ID',$this->EMCE_ID);\n\t\t$criteria->compare('MOOR_ID',$this->MOOR_ID);\n\t\t$criteria->compare('EVCR_ID',$this->EVCR_ID);\n\t\t$criteria->compare('EVES_ID',$this->EVES_ID);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('customerName',$this->customerName,true);\n\t\t$criteria->compare('agencyHead',$this->agencyHead,true);\n\t\t$criteria->compare('region_id',$this->region_id);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('municipalityCity_id',$this->municipalityCity_id);\n\t\t$criteria->compare('barangay_id',$this->barangay_id);\n\t\t$criteria->compare('houseNumber',$this->houseNumber,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('nature_id',$this->nature_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('created_by',$this->created_by);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('update_time',$this->update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->name,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('state',$this->address,true);\n\t\t$criteria->compare('country',$this->address,true);\n\t\t$criteria->compare('contact_number',$this->contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('is_deleted',$this->is_deleted);\n\t\t$criteria->compare('deleted_by',$this->deleted_by,true);\n\t\t$criteria->compare('created_at',$this->created_at,true);\n\t\t$criteria->compare('updated_at',$this->updated_at,true);\n\t\tif(YII::app()->user->getState(\"role\") == \"admin\") {\n\t\t\t$criteria->condition = 'is_deleted = 0';\n\t\t}\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('professional_status_id',$this->professional_status);\n\t\t$criteria->compare('birthday',$this->birthday);\n\t\t$criteria->compare('location',$this->location);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('memo',$this->memo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\r\n\t{\r\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\r\n\r\r\n\t\t$criteria=new CDbCriteria;\r\r\n\r\r\n\t\t$criteria->compare('id',$this->id);\r\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\r\n\t\t$criteria->compare('adds',$this->adds);\r\r\n\t\t$criteria->compare('edits',$this->edits);\r\r\n\t\t$criteria->compare('deletes',$this->deletes);\r\r\n\t\t$criteria->compare('view',$this->view);\r\r\n\t\t$criteria->compare('lists',$this->lists);\r\r\n\t\t$criteria->compare('searches',$this->searches);\r\r\n\t\t$criteria->compare('prints',$this->prints);\r\r\n\r\r\n\t\treturn new CActiveDataProvider($this, array(\r\r\n\t\t\t'criteria'=>$criteria,\r\r\n\t\t));\r\r\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('applyId',$this->applyId);\n\t\t$criteria->compare('stuId',$this->stuId);\n\t\t$criteria->compare('stuName',$this->stuName,true);\n\t\t$criteria->compare('specification',$this->specification,true);\n\t\t$criteria->compare('assetName',$this->assetName,true);\n\t\t$criteria->compare('applyTime',$this->applyTime,true);\n\t\t$criteria->compare('loanTime',$this->loanTime,true);\n\t\t$criteria->compare('returnTime',$this->returnTime,true);\n\t\t$criteria->compare('RFID',$this->RFID,true);\n\t\t$criteria->compare('stuTelNum',$this->stuTelNum,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('itemcode', $this->itemcode, true);\n $criteria->compare('product_id', $this->product_id, true);\n $criteria->compare('delete_flag', $this->delete_flag);\n $criteria->compare('status', $this->status);\n $criteria->compare('expire', $this->expire, true);\n $criteria->compare('date_input', $this->date_input, true);\n $criteria->compare('d_update', $this->d_update, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('verid',$this->verid);\n\t\t$criteria->compare('appversion',$this->appversion,true);\n\t\t$criteria->compare('appfeatures',$this->appfeatures,true);\n\t\t$criteria->compare('createtime',$this->createtime,true);\n\t\t$criteria->compare('baseNum',$this->baseNum);\n\t\t$criteria->compare('slave1Num',$this->slave1Num);\n\t\t$criteria->compare('packagename',$this->packagename,true);\n\t\t$criteria->compare('ostype',$this->ostype);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('client_id',$this->client_id,true);\n\t\t$criteria->compare('extension',$this->extension,true);\n\t\t$criteria->compare('rel_type',$this->rel_type,true);\n\t\t$criteria->compare('rel_id',$this->rel_id,true);\n\t\t$criteria->compare('meta_key',$this->meta_key,true);\n\t\t$criteria->compare('meta_value',$this->meta_value,true);\n\t\t$criteria->compare('date_entry',$this->date_entry,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('column_id',$this->column_id,true);\n\t\t$criteria->compare('research_title',$this->research_title,true);\n\t\t$criteria->compare('research_url',$this->research_url,true);\n\t\t$criteria->compare('column_type',$this->column_type);\n\t\t$criteria->compare('filiale_id',$this->filiale_id,true);\n\t\t$criteria->compare('area_name',$this->area_name,true);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('trigger_config',$this->trigger_config);\n\t\t$criteria->compare('status',$this->status);\n $criteria->compare('terminal_type',$this->terminal_type);\n\t\t$criteria->compare('start_time',$this->start_time,true);\n\t\t$criteria->compare('end_time',$this->end_time,true);\n\t\t$criteria->compare('explain',$this->explain,true);\n\t\t$criteria->compare('_delete',$this->_delete);\n\t\t$criteria->compare('_create_time',$this->_create_time,true);\n\t\t$criteria->compare('_update_time',$this->_update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function backendSearch()\n {\n $criteria = new CDbCriteria();\n\n return new CActiveDataProvider(\n __CLASS__,\n array(\n 'criteria' => $criteria,\n )\n );\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('birthday',$this->birthday,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('is_get_news',$this->is_get_news);\n\t\t$criteria->compare('user_id',$this->user_id);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('tbl_customer_supplier', $this->tbl_customer_supplier, true);\n $criteria->compare('id_customer', $this->id_customer, true);\n $criteria->compare('id_supplier', $this->id_supplier, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('date_add', $this->date_add, true);\n $criteria->compare('date_upd', $this->date_upd, true);\n $criteria->compare('active', $this->active);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('order_id',$this->order_id);\n\t\t$criteria->compare('device_id',$this->device_id,true);\n\t\t$criteria->compare('money',$this->money,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('add_time',$this->add_time);\n\t\t$criteria->compare('recharge_type',$this->recharge_type);\n\t\t$criteria->compare('channel',$this->channel,true);\n\t\t$criteria->compare('version_name',$this->version_name,true);\n\t\t$criteria->compare('pay_channel',$this->pay_channel);\n\t\t$criteria->compare('chanel_bid',$this->chanel_bid);\n\t\t$criteria->compare('chanel_sid',$this->chanel_sid);\n\t\t$criteria->compare('versionid',$this->versionid);\n\t\t$criteria->compare('chanel_web',$this->chanel_web);\n\t\t$criteria->compare('dem_num',$this->dem_num);\n\t\t$criteria->compare('last_watching',$this->last_watching,true);\n\t\t$criteria->compare('pay_type',$this->pay_type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n {\r\n // @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n $criteria = new CDbCriteria;\r\n\r\n $criteria->compare('id', $this->id);\r\n $criteria->compare('country_id', $this->country_id);\r\n $criteria->compare('user_id', $this->user_id);\r\n $criteria->compare('vat', $this->vat);\r\n $criteria->compare('manager_coef', $this->manager_coef);\r\n $criteria->compare('curator_coef', $this->curator_coef);\r\n $criteria->compare('admin_coef', $this->admin_coef);\r\n $criteria->compare('status', $this->status);\r\n\r\n return new CActiveDataProvider($this, array(\r\n 'criteria' => $criteria,\r\n ));\r\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('purchase_price',$this->purchase_price);\n\t\t$criteria->compare('sell_price',$this->sell_price);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('measurement',$this->measurement,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\t\t$criteria->compare('date_out',$this->date_out,true);\n\t\t$criteria->compare('date_in',$this->date_in,true);\n\t\t$criteria->compare('firma_id',$this->firma_id,true);\n\t\t$criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('instock',$this->instock);\n\t\t$criteria->compare('user_id',$this->user_id);\n $criteria->compare('warning_amount',$this->warning_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('fname',$this->fname,true);\n\t\t$criteria->compare('mname',$this->mname,true);\n\t\t$criteria->compare('lname',$this->lname,true);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('date_of_birth',$this->date_of_birth,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('landline',$this->landline,true);\n\t\t$criteria->compare('em_contact_name',$this->em_contact_name,true);\n\t\t$criteria->compare('em_contact_relation',$this->em_contact_relation,true);\n\t\t$criteria->compare('em_contact_number',$this->em_contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('created_date',$this->created_date,true);\n\n return new CActiveDataProvider( $this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => Yii::app()->user->getState( 'pageSize', Yii::app()->params[ 'defaultPageSize' ] ),\n ),\n ) );\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t\n\t\t$criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->compare('COMPETITOR_ID',$this->COMPETITOR_ID);\n\t\t$criteria->compare('WSDC_NO',$this->WSDC_NO);\n\t\t$criteria->compare('FIRST_NAME',$this->FIRST_NAME,true);\n\t\t$criteria->compare('LAST_NAME',$this->LAST_NAME,true);\n\t\t$criteria->compare('COMPETITOR_LEVEL',$this->COMPETITOR_LEVEL);\n\t\t$criteria->compare('REMOVED',$this->REMOVED);\n\t\t$criteria->compare('ADDRESS',$this->ADDRESS,true);\n\t\t$criteria->compare('CITY',$this->CITY,true);\n\t\t$criteria->compare('STATE',$this->STATE,true);\n\t\t$criteria->compare('POSTCODE',$this->POSTCODE);\n\t\t$criteria->compare('COUNTRY',$this->COUNTRY,true);\n\t\t$criteria->compare('PHONE',$this->PHONE,true);\n\t\t$criteria->compare('MOBILE',$this->MOBILE,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('LEADER',$this->LEADER);\n\t\t$criteria->compare('REGISTERED',$this->REGISTERED);\n\t\t$criteria->compare('BIB_STATUS',$this->BIB_STATUS);\n\t\t$criteria->compare('BIB_NUMBER',$this->BIB_NUMBER);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sys_name',$this->sys_name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$parameters = array('limit'=>ceil(Profile::getResultsPerPage()));\n\t\t$criteria->scopes = array('findAll'=>array($parameters));\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('itemId',$this->itemId);\n\t\t$criteria->compare('changedBy',$this->changedBy,true);\n\t\t$criteria->compare('recordName',$this->recordName,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\t\t$criteria->compare('oldValue',$this->oldValue,true);\n\t\t$criteria->compare('newValue',$this->newValue,true);\n\t\t$criteria->compare('diff',$this->diff,true);\n\t\t$criteria->compare('timestamp',$this->timestamp);\n\n\t\treturn new SmartActiveDataProvider(get_class($this), array(\n\t\t\t'sort'=>array(\n\t\t\t\t'defaultOrder'=>'timestamp DESC',\n\t\t\t),\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>Profile::getResultsPerPage(),\n\t\t\t),\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('CustomerId',$this->CustomerId,true);\n\t\t$criteria->compare('AddressId',$this->AddressId,true);\n\t\t$criteria->compare('CustomerStatusId',$this->CustomerStatusId,true);\n\t\t$criteria->compare('DateMasterId',$this->DateMasterId,true);\n\t\t$criteria->compare('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('CustomerPhoto',$this->CustomerPhoto,true);\n\t\t$criteria->compare('CustomerCode',$this->CustomerCode);\n\t\t$criteria->compare('Telephone',$this->Telephone,true);\n\t\t$criteria->compare('Mobile',$this->Mobile,true);\n\t\t$criteria->compare('EmailId',$this->EmailId,true);\n\t\t$criteria->compare('Status',$this->Status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('company_id', $this->company_id);\n\t\t$criteria->compare('productId', $this->productId);\n\t\t$criteria->compare('upTo', $this->upTo);\n\t\t$criteria->compare('fixPrice', $this->fixPrice);\n\t\t$criteria->compare('isActive', $this->isActive);\n\t\t$criteria->order = 'company_id';\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('city_id',$this->city_id);\n\t\t$criteria->compare('locality',$this->locality,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\n\t\t$criteria->compare('mem_type',$this->mem_type);\r\n\t\t$criteria->compare('business_type',$this->business_type);\r\n\t\t$criteria->compare('product_name',$this->product_name,true);\r\n\t\t$criteria->compare('panit',$this->panit,true);\r\n\t\t$criteria->compare('sex',$this->sex);\r\n\t\t$criteria->compare('tname',$this->tname);\r\n\t\t$criteria->compare('ftname',$this->ftname,true);\r\n\t\t$criteria->compare('ltname',$this->ltname,true);\r\n\t\t$criteria->compare('etname',$this->etname);\r\n\t\t$criteria->compare('fename',$this->fename,true);\r\n\t\t$criteria->compare('lename',$this->lename,true);\r\n\t\t$criteria->compare('birth',$this->birth,true);\r\n\t\t$criteria->compare('email',$this->email,true);\r\n\t\t$criteria->compare('facebook',$this->facebook,true);\r\n\t\t$criteria->compare('twitter',$this->twitter,true);\r\n\t\t$criteria->compare('address',$this->address,true);\r\n\t\t$criteria->compare('province',$this->province);\r\n\t\t$criteria->compare('prefecture',$this->prefecture);\r\n\t\t$criteria->compare('district',$this->district);\r\n\t\t$criteria->compare('postcode',$this->postcode,true);\r\n\t\t$criteria->compare('tel',$this->tel,true);\r\n\t\t$criteria->compare('mobile',$this->mobile,true);\r\n\t\t$criteria->compare('fax',$this->fax,true);\r\n\t\t$criteria->compare('high_education',$this->high_education);\r\n\t\t$criteria->compare('career',$this->career);\r\n\t\t$criteria->compare('skill_com',$this->skill_com);\r\n\t\t$criteria->compare('receive_news',$this->receive_news,true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('table_id',$this->table_id);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('cou_id',$this->cou_id);\n\t\t$criteria->compare('thm_id',$this->thm_id);\n\t\t$criteria->compare('cou_nom',$this->cou_nom,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n// $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n// $criteria->compare('alias', $this->alias, true);\n// $criteria->compare('module', $this->module, true);\n $criteria->compare('crud', $this->crud, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('idempleo',$this->idempleo);\n\t\t$criteria->compare('administrativo',$this->administrativo,true);\n\t\t$criteria->compare('comercial',$this->comercial,true);\n\t\t$criteria->compare('artes',$this->artes,true);\n\t\t$criteria->compare('informatica',$this->informatica,true);\n\t\t$criteria->compare('salud',$this->salud,true);\n\t\t$criteria->compare('marketing',$this->marketing,true);\n\t\t$criteria->compare('servicio_domestico',$this->servicio_domestico,true);\n\t\t$criteria->compare('construccion',$this->construccion,true);\n\t\t$criteria->compare('agricultura',$this->agricultura,true);\n\t\t$criteria->compare('ganaderia',$this->ganaderia,true);\n\t\t$criteria->compare('telecomunicaciones',$this->telecomunicaciones,true);\n\t\t$criteria->compare('atencion_cliente',$this->atencion_cliente,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID_VALOR',$this->ID_VALOR);\n\t\t$criteria->compare('ID_UBICACION',$this->ID_UBICACION);\n\t\t$criteria->compare('ID_VISITA',$this->ID_VISITA);\n\t\t$criteria->compare('VALOR',$this->VALOR);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t\n\t\t$criteria->compare('id_aspecto',$this->id_aspecto,true);\n\t\t$criteria->compare('tbl_Programa_id_programa',$this->tbl_Programa_id_programa,true);\n\t\t$criteria->compare('tbl_Factor_id_factor',$this->tbl_Factor_id_factor);\n\t\t$criteria->compare('tbl_caracteristica_id_caracteristica',$this->tbl_caracteristica_id_caracteristica,true);\n\t\t$criteria->compare('num_aspecto',$this->num_aspecto,true);\n\t\t$criteria->compare('aspecto',$this->aspecto,true);\n\t\t$criteria->compare('instrumento',$this->instrumento,true);\n\t\t$criteria->compare('fuente',$this->fuente,true);\n\t\t$criteria->compare('documento',$this->documento,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('Observaciones',$this->Observaciones,true);\n\t\t$criteria->compare('cumple',$this->cumple,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('website_url',$this->website_url,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('user_name',$this->user_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('created_datetime',$this->created_datetime,true);\n\t\t$criteria->compare('icon_src',$this->icon_src,true);\n\t\t$criteria->compare('show_r18',$this->show_r18);\n\t\t$criteria->compare('show_bl',$this->show_bl);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('creationDate',$this->creationDate,true);\n\t\t$criteria->compare('year',$this->year);\n\t\t$criteria->compare('term',$this->term,true);\n\t\t$criteria->compare('activated',$this->activated);\n\t\t$criteria->compare('startingDate',$this->startingDate,true);\n\t\t$criteria->compare('activation_userId',$this->activation_userId);\n\t\t$criteria->compare('parent_catalogId',$this->parent_catalogId);\n $criteria->compare('isProspective', $this->isProspective);\n $criteria->compare('creatorId', $this->creatorId);\n $criteria->compare('isProposed', $this->isProposed);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('location',$this->location);\n\t\t$criteria->compare('theripiest',$this->theripiest);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('dob',$this->dob,true);\n\t\t$criteria->compare('inurancecompany',$this->inurancecompany,true);\n\t\t$criteria->compare('injurydate',$this->injurydate,true);\n\t\t$criteria->compare('therapy_start_date',$this->therapy_start_date,true);\n\t\t$criteria->compare('ASIA',$this->ASIA,true);\n\t\t$criteria->compare('injury',$this->injury,true);\n\t\t$criteria->compare('medication',$this->medication,true);\n\t\t$criteria->compare('notes',$this->notes,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search () {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('formId', $this->formId, true);\n\t\t$criteria->compare('data', $this->data, true);\n\t\t$criteria->compare('ctime', $this->ctime);\n\t\t$criteria->compare('mtime', $this->mtime);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t 'criteria' => $criteria,\n\t\t ));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('imputetype_id',$this->imputetype_id);\n\t\t$criteria->compare('project_id',$this->project_id);\n\n\t\treturn new ActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('category_id',$this->category_id);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('price_z',$this->price_z);\n\t\t$criteria->compare('price_s',$this->price_s);\n\t\t$criteria->compare('price_m',$this->price_m);\n\t\t$criteria->compare('dependence',$this->dependence,true);\n\t\t$criteria->compare('barcode',$this->barcode,true);\n\t\t$criteria->compare('unit',$this->unit,true);\n\t\t$criteria->compare('minimal_amount',$this->minimal_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array('pageSize' => 100),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('image',$this->image,true);\n\t\t$criteria->compare('manager',$this->manager);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('realname',$this->realname,true);\n\t\t$criteria->compare('identity',$this->identity,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('bussiness_license',$this->bussiness_license,true);\n\t\t$criteria->compare('bankcode',$this->bankcode,true);\n\t\t$criteria->compare('banktype',$this->banktype,true);\n\t\t$criteria->compare('is_open',$this->is_open,true);\n\t\t$criteria->compare('introduction',$this->introduction,true);\n\t\t$criteria->compare('images_str',$this->images_str,true);\n\t\t$criteria->compare('gmt_created',$this->gmt_created,true);\n\t\t$criteria->compare('gmt_modified',$this->gmt_modified,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('id_user',$this->id_user);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email_admin',$this->email_admin,true);\n\t\t$criteria->compare('password_api',$this->password_api,true);\n\t\t$criteria->compare('url_result_api',$this->url_result_api,true);\n\t\t$criteria->compare('id_currency_2',$this->id_currency_2);\n\t\t$criteria->compare('id_currency_1',$this->id_currency_1,true);\n\t\t$criteria->compare('is_test_mode',$this->is_test_mode);\n\t\t$criteria->compare('is_commission_shop',$this->is_commission_shop);\n\t\t$criteria->compare('commission',$this->commission);\n\t\t$criteria->compare('is_enable',$this->is_enable);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('mod_date',$this->mod_date,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID,true);\n\t\t$criteria->compare('userID',$this->userID,true);\n\t\t$criteria->compare('mtID',$this->mtID,true);\n\t\t$criteria->compare('fxType',$this->fxType);\n\t\t$criteria->compare('leverage',$this->leverage);\n\t\t$criteria->compare('amount',$this->amount,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t/*\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('percent_discount',$this->percent_discount,true);\n\t\t$criteria->compare('taxable',$this->taxable);\n\t\t$criteria->compare('id_user_created',$this->id_user_created);\n\t\t$criteria->compare('id_user_modified',$this->id_user_modified);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_modified',$this->date_modified,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t*/\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('surname',$this->surname,true);\n\t\t$criteria->compare('comany_name',$this->comany_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('uuid',$this->uuid,true);\n\t\t$criteria->compare('is_admin',$this->is_admin);\n\t\t$criteria->compare('paid_period_start',$this->paid_period_start,true);\n\t\t$criteria->compare('ftp_pass',$this->ftp_pass,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('HISTORY',$this->HISTORY,true);\n\t\t$criteria->compare('WELCOME_MESSAGE',$this->WELCOME_MESSAGE,true);\n\t\t$criteria->compare('LOCATION',$this->LOCATION,true);\n\t\t$criteria->compare('PHONES',$this->PHONES,true);\n\t\t$criteria->compare('FAX',$this->FAX,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('MISSION',$this->MISSION,true);\n\t\t$criteria->compare('VISION',$this->VISION,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('price',$this->price,true);\n\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('breed',$this->breed,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('date_birthday',$this->date_birthday,true);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('tattoo',$this->tattoo,true);\n\t\t$criteria->compare('sire',$this->sire,true);\n\t\t$criteria->compare('dame',$this->dame,true);\n\t\t$criteria->compare('owner_type',$this->owner_type,true);\n\t\t$criteria->compare('honors',$this->honors,true);\n\t\t$criteria->compare('photo_preview',$this->photo_preview,true);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('pet_status',$this->pet_status,true);\n\t\t$criteria->compare('about',$this->about,true);\n\t\t$criteria->compare('uid',$this->uid);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('veterinary',$this->veterinary,true);\n\t\t$criteria->compare('vaccinations',$this->vaccinations,true);\n\t\t$criteria->compare('show_class',$this->show_class,true);\n\t\t$criteria->compare('certificate',$this->certificate,true);\n $criteria->compare('neutered_spayed',$this->certificate,true);\n \n\n $criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('city',$this->city,true);\n\n \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('company_id', Yii::app()->user->company_id);\n $criteria->compare('zone_id', $this->zone_id, true);\n $criteria->compare('low_qty_threshold', $this->low_qty_threshold);\n $criteria->compare('high_qty_threshold', $this->high_qty_threshold);\n $criteria->compare('created_date', $this->created_date, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('updated_date', $this->updated_date, true);\n $criteria->compare('updated_by', $this->updated_by, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('orgName',$this->orgName,true);\n\t\t$criteria->compare('noEmp',$this->noEmp);\n\t\t$criteria->compare('phone',$this->phone);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('addr1',$this->addr1,true);\n\t\t$criteria->compare('addr2',$this->addr2,true);\n\t\t$criteria->compare('state',$this->state,true);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('orgType',$this->orgType,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('fax',$this->fax);\n\t\t$criteria->compare('orgId',$this->orgId,true);\n\t\t$criteria->compare('validity',$this->validity);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n $criteria->with=array('c','b');\n\t\t$criteria->compare('pid',$this->pid,true);\n\t\t$criteria->compare('t.cid',$this->cid,true);\n\t\t$criteria->compare('t.bid',$this->bid,true);\n\n $criteria->compare('c.classify_name',$this->classify,true);\n\t\t$criteria->compare('b.brand_name',$this->brand,true);\n \n $criteria->addCondition('model LIKE :i and model REGEXP :j');\n $criteria->params[':i'] = \"%\".$this->index_search.\"%\";\n $criteria->params[':j'] = \"^\".$this->index_search;\n\n \n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('package',$this->package,true);\n\t\t$criteria->compare('RoHS',$this->RoHS,true);\n\t\t$criteria->compare('datecode',$this->datecode,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('direction',$this->direction,true);\n $criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('sortorder',$this->sortorder,true);\n\t\t$criteria->compare('fullname',$this->fullname,true);\n\t\t$criteria->compare('shortname',$this->shortname,true);\n\t\t$criteria->compare('idnumber',$this->idnumber,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('summaryformat',$this->summaryformat);\n\t\t$criteria->compare('format',$this->format,true);\n\t\t$criteria->compare('showgrades',$this->showgrades);\n\t\t$criteria->compare('sectioncache',$this->sectioncache,true);\n\t\t$criteria->compare('modinfo',$this->modinfo,true);\n\t\t$criteria->compare('newsitems',$this->newsitems);\n\t\t$criteria->compare('startdate',$this->startdate,true);\n\t\t$criteria->compare('marker',$this->marker,true);\n\t\t$criteria->compare('maxbytes',$this->maxbytes,true);\n\t\t$criteria->compare('legacyfiles',$this->legacyfiles);\n\t\t$criteria->compare('showreports',$this->showreports);\n\t\t$criteria->compare('visible',$this->visible);\n\t\t$criteria->compare('visibleold',$this->visibleold);\n\t\t$criteria->compare('groupmode',$this->groupmode);\n\t\t$criteria->compare('groupmodeforce',$this->groupmodeforce);\n\t\t$criteria->compare('defaultgroupingid',$this->defaultgroupingid,true);\n\t\t$criteria->compare('lang',$this->lang,true);\n\t\t$criteria->compare('theme',$this->theme,true);\n\t\t$criteria->compare('timecreated',$this->timecreated,true);\n\t\t$criteria->compare('timemodified',$this->timemodified,true);\n\t\t$criteria->compare('requested',$this->requested);\n\t\t$criteria->compare('enablecompletion',$this->enablecompletion);\n\t\t$criteria->compare('completionnotify',$this->completionnotify);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('zipcode',$this->zipcode,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('role',$this->role,true);\n\t\t$criteria->compare('active',$this->active);\n\t\t$criteria->compare('camaras',$this->camaras);\n\t\t$criteria->compare('freidoras',$this->freidoras);\n\t\t$criteria->compare('cebos',$this->cebos);\n\t\t$criteria->compare('trampas',$this->trampas);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('attribute',$this->attribute,true);\n\t\t$criteria->compare('displayName',$this->displayName,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('value_type',$this->value_type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('cod_venda',$this->cod_venda,true);\n\t\t$criteria->compare('filial_cod_filial',$this->filial_cod_filial,true);\n\t\t$criteria->compare('funcionario_cod_funcionario',$this->funcionario_cod_funcionario,true);\n\t\t$criteria->compare('cliente_cod_cliente',$this->cliente_cod_cliente,true);\n\t\t$criteria->compare('data_2',$this->data_2,true);\n\t\t$criteria->compare('valor_total',$this->valor_total);\n\t\t$criteria->compare('forma_pagamento',$this->forma_pagamento,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('state', $this->state);\n $criteria->compare('type','0');\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('sex', $this->sex);\n $criteria->compare('mobile', $this->mobile, true);\n $criteria->compare('idcard', $this->idcard, true);\n $criteria->compare('password', $this->password, true);\n $criteria->compare('place_ids', $this->place_ids, true);\n $criteria->compare('depart_id', $this->depart_id);\n $criteria->compare('bank', $this->bank, true);\n $criteria->compare('bank_card', $this->bank_card, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('education', $this->education, true);\n $criteria->compare('created', $this->created);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->buscar,'OR');\n\t\t$criteria->compare('fecha',$this->buscar,true,'OR');\n\t\t$criteria->compare('fechaUpdate',$this->buscar,true,'OR');\n\t\t$criteria->compare('idProfesional',$this->buscar,'OR');\n\t\t$criteria->compare('importe',$this->buscar,'OR');\n\t\t$criteria->compare('idObraSocial',$this->buscar,'OR');\n\t\t$criteria->compare('estado',$this->buscar,true,'OR');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('codop',$this->codop,true);\n\t\t$criteria->compare('codcatval',$this->codcatval,true);\n\t\t$criteria->compare('cuentadebe',$this->cuentadebe,true);\n\t\t$criteria->compare('cuentahaber',$this->cuentahaber,true);\n\t\t$criteria->compare('desop',$this->desop,true);\n\t\t$criteria->compare('descat',$this->descat,true);\n\t\t$criteria->compare('debe',$this->debe,true);\n\t\t$criteria->compare('haber',$this->haber,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array('pagesize'=>100),\n\t\t));\n\t}" ]
[ "0.7212646", "0.7136024", "0.70933706", "0.7093113", "0.69846046", "0.69604707", "0.69481945", "0.69420165", "0.69337475", "0.6924065", "0.69110894", "0.69029695", "0.68983483", "0.6897775", "0.6892544", "0.6882542", "0.6880248", "0.68738663", "0.6849395", "0.6848976", "0.6835021", "0.6826429", "0.68153846", "0.68071353", "0.6804119", "0.67973655", "0.67965937", "0.67958015", "0.6795615", "0.6793925", "0.6790211", "0.67854524", "0.6785193", "0.6784183", "0.67806154", "0.6778495", "0.6777439", "0.6776678", "0.6776307", "0.6775609", "0.6775609", "0.6775609", "0.6775609", "0.6775609", "0.6775609", "0.6775609", "0.6775609", "0.67729664", "0.6768814", "0.6767436", "0.6766098", "0.6762363", "0.6762199", "0.6761053", "0.67603993", "0.67600876", "0.67587113", "0.67538935", "0.67528695", "0.67520636", "0.6747887", "0.6747579", "0.6746115", "0.67456204", "0.6744872", "0.6744774", "0.6744671", "0.6743801", "0.67434025", "0.67420316", "0.6740797", "0.6740326", "0.6739247", "0.67369187", "0.6736679", "0.67343915", "0.67321134", "0.67313653", "0.6725215", "0.6723444", "0.67229563", "0.6721933", "0.67129296", "0.6712657", "0.67108434", "0.67091316", "0.6706584", "0.6706038", "0.6705222", "0.67039245", "0.6702423", "0.6699911", "0.6698295", "0.6696625", "0.66953385", "0.66952217", "0.66936946", "0.6693138", "0.66924226", "0.6691166" ]
0.6780748
34
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.75738657", "0.7528801", "0.72715706", "0.72700775", "0.7261814", "0.72142005", "0.7213739", "0.7131908", "0.7128803", "0.7128803", "0.7102692", "0.7102692", "0.7102435", "0.70747095", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216", "0.7064216" ]
0.0
-1
Auto generated seed file
public function run() { \DB::table('user_grade')->delete(); \DB::table('user_grade')->insert(array ( 0 => array ( 'id' => 1, 'name' => '主管', 'created_at' => '2019-12-21 10:27:49', 'updated_at' => '2019-12-21 10:27:49', ), 1 => array ( 'id' => 2, 'name' => '普通员工', 'created_at' => '2019-12-21 10:28:05', 'updated_at' => '2019-12-21 10:28:05', ), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function main() {\n\n $fs = new Filesystem();\n\n $fs->touch($this->getTargetFile());\n\n $seedProperties = Yaml::parse(file_get_contents($this->getSeedFile()));\n $generatedProperties = [];\n\n $generatedProperties['label'] = $seedProperties['project_label'];\n $generatedProperties['machineName'] = $seedProperties['project_name'];\n $generatedProperties['group'] = $seedProperties['project_group'];\n $generatedProperties['basePath'] = '${current.basePath}';\n $generatedProperties['type'] = $seedProperties['project_type'];\n $generatedProperties['repository']['main'] = $seedProperties['project_git_repository'];\n $generatedProperties['php'] = $seedProperties['project_php_version'];\n\n // Add platform information.\n if (isset($generatedProperties['platform'])) {\n $generatedProperties['platform'] = $seedProperties['platform'];\n }\n\n $fs->dumpFile($this->getTargetFile(), Yaml::dump($generatedProperties, 5, 2));\n }", "public function seed();", "protected function seed()\n {\n }", "public function seed() {\n }", "public function run()\n {\n $faker= \\Faker\\Factory::create();\n for ($i=0; $i < 20; $i++)\n {\n \tHuongDanVien::create([\n \t\t'tenhdv'=> $faker->name,\n \t\t'phai'=> $faker->word,\n \t\t'diachi'=> $faker->word,\n \t\t'sdt'=> $faker->number_format(0122000000),\n \t\t]);\n }\n }", "public function actionGenerate()\n {\n \\bariew\\yii2Tools\\tests\\FixtureManager::init();\n }", "public function seedDatabase(): void\n {\n echo \"Running seeds\";\n\n // Folder where all the seeds are.\n $folder = __DIR__ . '/../seeds/';\n\n // Scan all files/folders inside database.\n $files = \\scandir($folder);\n\n $seeders = [];\n foreach ($files as $key => $file) {\n\n // All files that don't start with a dot.\n if ($file[0] !== '.') {\n\n // Load the file.\n require_once $folder . $file;\n\n // We have to call the migrations after because\n // some seeds are dependant from other seeds.\n $seeders[] = explode('.', $file)[0];\n }\n }\n\n // Run all seeds.\n foreach ($seeders as $seeder) {\n (new $seeder)->run();\n }\n }", "public function run()\n {\n \t$faker = Faker\\Factory::create();; \n foreach (range(1, 55) as $key => $value) {\n \tApp\\Student::create([\n \t\t 'name' => $faker->name,\n 'father_name' => $faker->name('male'),\n 'mother_name' => $faker->name('female'),\n 'phone_number' => $faker->phoneNumber,\n 'home_number' => $faker->phoneNumber,\n 'email' => $faker->unique()->safeEmail,\n 'gender' => 'male',\n 'roll_number' => $faker->randomNumber(),\n 'reg_number' => $faker->randomNumber(),\n 'department_id' => $faker->randomNumber(1),\n 'shift' => 'second',\n 'semester' => 'eight',\n 'present_address' => $faker->address,\n 'permanent_address' => $faker->address,\n \t]);\n }\n }", "protected static function seed()\n {\n foreach (self::fetch('database/seeds', false) as $file) {\n Bus::need($file);\n }\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create('ms_MY');\n ini_set('memory_limit', '50G');\n \\Eloquent::reguard();\n $this->command->info('User Seed');\n\n for ($i = 0; $i < 5; $i++) {\n $name = $faker->name;\n $temp = explode(' ', trim($name));\n $nickname = $temp[0];\n\n\n $user = \\App\\User::updateOrCreate([\n 'email' => $nickname. '@dell.com',\n ], [\n 'name' => $name,\n 'password' => bcrypt('secret'),\n 'role' => 'participant',\n 'isLead' => 0,\n 'totalPoints' => rand(1,100),\n ]);\n \n }\n\n $name = $faker->name;\n $temp = explode(' ', trim($name));\n $nickname = $temp[0];\n\n\n $user = \\App\\User::updateOrCreate([\n 'email' => $nickname. '@dell.com',\n ], [\n 'name' => $name,\n 'password' => bcrypt('secret'),\n 'role' => 'participant',\n 'isLead' => 1,\n 'totalPoints' => rand(1,100),\n ]);\n\n $name = $faker->name;\n $temp = explode(' ', trim($name));\n $nickname = $temp[0];\n\n\n $user = \\App\\User::updateOrCreate([\n 'email' => $nickname. '@dell.com',\n ], [\n 'name' => $name,\n 'password' => bcrypt('secret'),\n 'role' => 'program manager',\n 'isLead' => 0,\n 'totalPoints' => 0,\n ]);\n \n }", "public function getSeed();", "public function run()\n {\n //Cmd: php artisan db:seed --class=\"UsersTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n for( $i=0; $i<10; $i++ ){\n\n App\\User::create([\n\t\t\t\t\"name\" => $faker->name(),\n\t\t\t\t\"name_mei\" => $faker->name(),\n\t\t\t\t\"kana_sei\" => $faker->word(),\n\t\t\t\t\"kana_mei\" => $faker->word(),\n\t\t\t\t\"email\" => $faker->safeEmail(),\n\t\t\t\t\"password\" => $faker->password(),\n\t\t\t\t\"phone\" => $faker->word(),\n\t\t\t\t\"address\" => $faker->address(),\n\t\t\t\t\"birthday\" => $faker->date().\" \".$faker->time(),\n\t\t\t\t\"language\" => $faker->languageCode(),\n\t\t\t\t\"licence\" => $faker->word(),\n\t\t\t\t\"school\" => $faker->word(),\n\t\t\t\t\"school_dept\" => $faker->word(),\n\t\t\t\t\"school_subject\" => $faker->word(),\n\t\t\t\t\"gender\" => $faker->word(),\n\t\t\t\t\"salary\" => $faker->randomDigit(),\n\t\t\t\t\"image_url\" => $faker->uuid(),\n\t\t\t\t\"back_image_url\" => $faker->uuid(),\n\t\t\t\t\"remember_token\" => $faker->sha1(),\n\t\t\t\t\"user_role_id\" => $faker->randomDigit(),\n\t\t\t\t\"created_at\" => $faker->dateTime(\"now\"),\n\t\t\t\t\"updated_at\" => $faker->dateTime(\"now\")\n\n ]);\n }\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[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 $faker = Faker\\Factory::create();\n $title = $faker->sentence(rand(3,6));\n Article::create([\n 'title'=>$title,\n 'slug'=>Str::slug($title,'-'),\n 'description'=>$faker->text(rand(100,300)),\n 'content'=>$faker->realText(rand(1000,2000))\n ]);\n }", "public function seed()\n\t{\n\t\t$this->createDataType();\n\t\t$this->createDataRowForColumns();\n\t}", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n $limit = 100;\n\n for ($i = 0; $i < $limit; $i++){\n \t\\App\\Models\\Member::create([\n 'code' => $faker->name,\n 'name' => $faker->name,\n 'sns_link' => $faker->name,\n 'is_block' => $faker->numberBetween(0, 1),\n 'phone' => $faker->name,\n 'amount' => $faker->numberBetween(1000, 9000),\n //{{SEEDER_NOT_DELETE_THIS_LINE}}\n\t\t\t]);\n\t\t}\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n $kelamin = \"laki-laki\";\n foreach (range(1, 100) as $i) {\n \tKajian::create([\n \t\t'waktu'\t\t\t\t=> $faker->dateTimeThisCentury($max = 'now', $timezone = date_default_timezone_get()), \n\n \t\t'tema'\t\t\t\t=> $faker->sentence($nbWords = 6, $variableNbWords = true), \n \t\t'pemateri'\t\t\t=> $faker->name($gender = null|'male'|'female'), \n \t\t'alamat'\t\t\t=> $faker->streetAddress, \n \t\t'deskripsi'\t\t\t=> $faker->paragraph($nbSentences = 3, $variableNbSentences = true), \n \t\t'jenis_peserta'\t\t=> $kelamin, \n \t\t'latitude'\t\t\t=> $faker->latitude, \n \t\t'longitude'\t\t\t=> $faker->longitude,\n 'isRutin' => $faker->boolean\n \t]);\n }\n }", "public function run()\n {\n Model::unguard();\n foreach (glob(__DIR__ . '/seeds/*.php') as $filename) {\n require_once($filename);\n }\n // $this->call(UserTableSeeder::class);\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n// $this->call('CustomerTableSeeder');\n $this->call('PhotoTableSeeder');\n// $this->call('ProductTableSeeder');\n// $this->call('StaffTableSeeder');\n// $this->call('PasswordResetsTableSeeder');\n// $this->call('UsersTableSeeder');\n $this->call('CustomersTableSeeder');\n $this->call('EmployeesTableSeeder');\n $this->call('InventoryTransactionTypesTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrderDetailsStatusTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('InvoicesTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrdersStatusTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n\n $this->call('OrdersTaxStatusTableSeeder');\n $this->call('PrivilegesTableSeeder');\n $this->call('EmployeePrivilegesTableSeeder');\n $this->call('ProductsTableSeeder');\n $this->call('InventoryTransactionsTableSeeder');\n $this->call('PurchaseOrderDetailsTableSeeder');\n\n $this->call('PurchaseOrderStatusTableSeeder');\n $this->call('PurchaseOrdersTableSeeder');\n $this->call('SalesReportsTableSeeder');\n $this->call('ShippersTableSeeder');\n $this->call('StringsTableSeeder');\n $this->call('SuppliersTableSeeder');\n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Model::reguard();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n /* Curso::factory(8)->create(); */\n /* $this->call(CidepartamentoSeeder::class);\n $this->call(CategoriaSeeder::class);\n $this->call(GeneroSeeder::class); */\n\n /* $this->call(UserSeeder::class); */\n\n\n /* Estudiante::factory(20)->create(); */\n\n /* Profesore::factory(12)->create(); */\n\n\n /* $this->call(EstudianteSeeder::class); */\n /* $this->call(CursoSeeder::class); */\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n for ($i = 100; $i < 120; $i++) {\n university::insert([\n 'name' => $faker->name(),\n 'code' => $i,\n 'contact' => '1234567' . $i,\n 'address' => 'Bhavnagar',\n 'user_id' => 2\n ]);\n\n }\n }", "public function run(): void\n {\n $faker = Factory::create();\n \\App\\User::query()->insert($this->gen($faker));\n }", "public function run()\n {\n $faker = Faker::create();\n\n Umrah::Create([\n 'user_id' => User::all()->random()->id,\n 'deceased_id' => Deceased::all()->random()->id,\n 'umrah_status_id' => UmrahStatus::all()->random()->id,\n ]);\n }", "function migrate_seed(){\n\n // Pull in Seed Service Provider\n // Loop in the contents of the file specified in the Service provider\n // Run Insert query.\n\n $seedFiles = require BASEPATH.\"/migration/SeedServiceProvider.php\";\n\n //Loop the files\n foreach ( $seedFiles as $file ){\n\n $seeds = require BASEPATH . \"/migration/seed/{$file}.php\";\n\n //Loop In table for insertion\n foreach( $seeds as $table_name => $data ){\n\n insert( $table_name, $data );\n\n }\n\n }\n\n}", "public function run()\n {\n // App\\UserRentCompactDisc::delete();\n (new Faker\\Generator)->seed(100);\n factory(App\\UserRentCompactDisc::class, 30)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n //echo $faker->word();die();\n //var_dump($faker);die();\n\n for($i=0; $i<100; $i++) \n {\n Maker::create\n ([\n 'name' => $faker->unique()->company(),\n 'phone' => $faker->phoneNumber()\n ]);\n }\n }", "public function run()\n {\n\n $faker =Faker\\Factory::create();\n foreach (range(1,10) as $index) {\n Member::create([\n 'memberNo' => $faker->text(5),\n 'name' => $faker->text($min=5,$max=10),\n 'email' => $faker->email(),\n 'lastConnect' => $faker->dateTime()\n ]);\n }\n }", "public function run()\n\t{\n\n $faker=Faker::create();\n\n for($i = 0; $i < 20; $i++)\n {\n \n \n \n $id= \\DB::table('users')->insertGetId(array(\n 'name' => $faker->firstName,\n 'email' => $faker->unique()->email,\n 'password' => \\Hash::make('bebe'),\n 'type' => $faker->randomElement(['member','admin']),\n \n\n\t\t\t));\n\n\n\n }\n\t\n\t}", "public function run()\n {\n //\\App\\Models\\User::factory(400)->create();\n //\\App\\Models\\Ship::factory(10000)->create();\n //\\App\\Models\\City::factory(1000)->create();\n //\\App\\Models\\Offer::factory(2000)->create();\n\n /* $this->call([\n CountrySeeder::class,\n ]);*/\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n $faker = Faker::create();\n DB::table('userroles')->insert([\n 'role_name' => 'Subper Admin',\n 'role_status' => 1,\n 'read' => $faker->paragraph(2),\n 'write' => $faker->paragraph(2),\n 'country_nationality' => $faker->paragraph(2)\n ]);\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class,15)->create();\n\n\n $regcouncils = fopen('C:\\practocsv\\regcouncil.csv', 'r');\n $degrees = fopen('C:\\practocsv\\degree.csv', 'r');\n $cities = fopen('C:\\practocsv\\city.csv', 'r');\n $specializations = fopen('C:\\practocsv\\specialization.csv', 'r');\n $colleges = fopen('C:\\practocsv\\college.csv', 'r');\n\n $categories = fopen('C:\\practocsv\\category.csv', 'r');\n $subcategories = fopen('C:\\practocsv\\subcategory.csv', 'r');\n $manufacturers = fopen('C:\\practocsv\\manufacture.csv', 'r');\n $ingredients = fopen('C:\\practocsv\\ingredients.csv', 'r');\n $products = fopen('C:\\practocsv\\product.csv', 'r');\n\n $faker = \\Faker\\Factory::create();\n\n $regcouncil_id = 0;\n $city_id = 0;\n $degree_id = 0;\n $specialization_id = 0;\n $college_id = 0;\n\n Type::create([\n 'name'=>'video'\n ]);\n Type::create([\n 'name'=>'chat'\n ]);\n $type = Type::create([\n 'name'=>'clinic'\n ]);\n\n while(($reg = fgetcsv($regcouncils)) !== FALSE){\n $regcouncil = Regcouncil::create([\n 'name'=>$reg[0]\n ]);\n $regcouncil_id = $regcouncil->id;\n }\n\n while(($deg = fgetcsv($degrees)) !== FALSE){\n $degree = Degree::create([\n 'name'=>$deg[0]\n ]);\n $degree_id = $degree->id;\n }\n\n while(($cit = fgetcsv($cities)) !== FALSE){\n $city = City::create([\n 'name'=>$cit[0]\n ]);\n $city_id = $city->id;\n }\n\n while(($reg = fgetcsv($specializations)) !== FALSE){\n $speciality = Speciality::create([\n 'name'=>$reg[0]\n ]);\n $specialization_id = $speciality->id;\n }\n\n while(($clg = fgetcsv($colleges)) !== FALSE){\n $college = College::create([\n 'name'=>$clg[0]\n ]);\n $college_id = $college->id;\n }\n\n for($i=0 ; $i<50 ; $i++){\n $doctor = Doctor::create([\n 'fullname' => $faker->name,\n 'description' => $faker->sentence(rand(5,6)),\n 'fees' => rand(1000,10000),\n 'phone_no' => rand(1000000000,9999999999),\n 'password' => '$2y$10$ckpf//racepEDB9TGR2ZLu3JkVrPKUlaXorZIiWF4eZf87O83lPX2',\n 'email'=> $faker->unique()->safeEmail,\n 'city_id' => rand(1,$city_id),\n 'address' => $faker->sentence(rand(5,6)),\n 'gender' => 'male',\n 'country_code' => '+91',\n 'years_of_exp' => rand(5,20),\n 'slot_duration' => 15,\n 'speciality_id' => rand(1,$specialization_id),\n 'reg_no' => rand(1,200000),\n 'regcouncil_id' => rand(1,$regcouncil_id),\n 'degree_id' => rand(1,$degree_id),\n 'college_id' => rand(1,$college_id),\n 'establishment_name' => $faker->word,\n 'establishment_address' => $faker->sentence(rand(5,6)),\n 'establishment_city_id' => rand(1,$city_id),\n 'establishment_pincode' => rand(1000,999999),\n ]);\n\n $user = User::create([\n 'name' => $doctor->fullname,\n 'email' => $doctor->email,\n 'email_verified_at' => now(),\n 'password' => '$2y$10$ckpf//racepEDB9TGR2ZLu3JkVrPKUlaXorZIiWF4eZf87O83lPX2' , // password\n 'gender'=> $doctor->gender,\n 'role'=>'doctor',\n 'age'=>rand(20,50),\n 'phone_no'=> $doctor->phone_no,\n 'remember_token' => Str::random(10),\n 'doctor_id'=>$doctor->id\n ]);\n $doctor->type()->attach(rand(1,$type->id));\n }\n\n while(($cat = fgetcsv($categories)) !== FALSE){\n $category = Category::create([\n 'name'=>$cat[0]\n ]);\n $category_id = $category->id;\n }\n\n while(($subcat = fgetcsv($subcategories)) !== FALSE){\n $subcategory = Subcategory::create([\n 'name'=>$subcat[0],\n 'category_id'=>rand(1,$category_id),\n ]);\n $subcategory_id = $subcategory->id;\n }\n\n // $i=1;\n // while($i<15){\n // $i++;\n // $manufacturer = Manufacturer::create([\n // 'name'=>$faker->name,\n // 'user_id'=>$i\n // ]);\n // $manufacture_id = $manufacturer->id;\n // }\n\n\n $manufacturer = Manufacturer::create([\n 'name'=>\"John Doe\",\n 'user_id'=>1,\n \n ]);\n\n $manufacture_id = 1;\n\n\n // while(($ing = fgetcsv($ingredients)) !== FALSE){\n // $ingredient = Ingredient::create([\n // 'name'=>$ing[0]\n // ]);\n // $ingredient_id = $ingredient->id;\n // }\n\n while(($pro = fgetcsv($products)) !== FALSE){\n $product = Product::create([\n 'name'=>$pro[0],\n 'price'=>rand(100,1000),\n 'size'=>\"200 ml\",\n 'quantity'=>rand(20,50),\n 'category_id'=>rand(1,$category_id),\n 'subcategory_id'=>rand(1,$subcategory_id),\n 'description'=>$faker->sentence(rand(3,4)),\n 'how_to_use'=>$faker->sentence(rand(2,3)),\n 'benefits'=>$faker->sentence(rand(2,3)),\n 'highlights'=>$faker->sentence(rand(1,2)),\n 'manufacturer_id'=>rand(1,$manufacture_id),\n 'prescription_required'=>rand(0,1),\n ]);\n $product_id = $product->id;\n }\n\n $products = fopen('C:\\practocsv\\product.csv', 'r');\n while(($pro = fgetcsv($products)) !== FALSE){\n $product = Product::create([\n 'name'=>$pro[0],\n 'price'=>rand(100,1000),\n 'size'=>\"200 ml\",\n 'quantity'=>rand(20,50),\n 'category_id'=>rand(1,$category_id),\n 'subcategory_id'=>rand(1,$subcategory_id),\n 'description'=>$faker->sentence(rand(3,4)),\n 'how_to_use'=>$faker->sentence(rand(2,3)),\n 'benefits'=>$faker->sentence(rand(2,3)),\n 'highlights'=>$faker->sentence(rand(1,2)),\n 'manufacturer_id'=>rand(1,$manufacture_id),\n 'prescription_required'=>rand(0,1),\n ]);\n $product_id = $product->id;\n }\n\n Notification_type::create([\n 'name' => 'appointment-made',\n 'message' => 'You have Received a new appointment!'\n ]);\n\n Notification_type::create([\n 'name' => 'appointment-accepted',\n 'message' => 'Your appointment is confirmed!'\n ]);\n\n Notification_type::create([\n 'name' => 'appointment-rejected',\n 'message' => 'Sorry, your appointment is rejected'\n ]);\n\n Notification_type::create([\n 'name' => 'feedback',\n 'message' => 'you have received a new feedback'\n ]);\n\n Notification_type::create([\n 'name' => 'report',\n 'message' => 'Your report has been generated'\n ]);\n\n Notification_type::create([\n 'name' => 'manufacturer-request',\n 'message' => 'you have a new manufacturer registration'\n ]);\n\n Notification_type::create([\n 'name' => 'product-request',\n 'message' => 'you have a new product request'\n ]);\n\n Notification_type::create([\n 'name' => 'product-accept',\n 'message' => 'Your product is now approved'\n ]);\n\n Notification_type::create([\n 'name' => 'prescription',\n 'message' => 'You have received a prescription'\n ]);\n\n\n fclose($specializations);\n fclose($cities);\n fclose($degrees);\n fclose($regcouncils);\n fclose($colleges);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(Tipo_DocumentoSeeder::class);\n\n $this->call(RolSeeder::class);\n\n $this->call(GeneroSeeder::class);\n\n $this->call(MaterialSeeder::class);\n\n $this->call(CategoriaSeeder::class);\n\n $this->call(ClasificacionSeeder::class);\n\n $this->call(UsuarioSeeder::class);\n\n $this->call(TallaSeeder::class);\n\n $this->call(ProductoSeeder::class);\n\n $this->call(ContactoSeeder::class);\n\n\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n $data = [];\n for ($i = 0; $i < 100; $i++) {\n $data[] = [\n 'email' => $faker->email,\n 'password' => password_hash($faker->password, PASSWORD_DEFAULT),\n 'name' => $faker->name,\n 'is_verified' => $faker->boolean(),\n\n 'phone' => $faker->optional(0.9)->phoneNumber,\n 'photo_url' => $faker->imageUrl(),\n 'hobbies' => $faker->words(3, true),\n 'passion' => $faker->optional()->words(1, true),\n 'fav_quote' => $faker->optional()->sentence(6, true),\n 'fav_quote_author' => $faker->optional()->name,\n\n 'whatsapp' => $faker->optional(0.9)->phoneNumber,\n 'facebook' => $faker->optional(0.7)->userName,\n 'twitter' => $faker->optional(0.5)->userName,\n 'linkedin' => $faker->optional(0.3)->url,\n 'instagram' => $faker->optional(0.6)->userName,\n 'snapchat' => $faker->optional(0.5)->userName,\n 'website' => $faker->optional(0.4)->url,\n 'blog' => $faker->optional(0.4)->url,\n\n 'created_at' => $faker->dateTimeBetween(\"-2 years\", \"-1 year\")->format('Y-m-d H:i:s'),\n 'updated_at' => rand(0, 2) ? $faker->dateTimeThisYear->format('Y-m-d H:i:s') : null,\n ];\n }\n\n $this->insert('classmates', $data);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create('zh_TW');\n\n foreach (range(1, 100) as $index) {\n $updatedAt = now()->subDays(rand(0, 500));\n User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make($faker->password),\n 'phone' => $faker->phoneNumber,\n 'description' => $faker->realText(rand(10, 100)),\n 'sex' => ($index % 2 == 0) ? '男' : '女',\n 'address' => $faker->address,\n 'birth' => now()->subDays(rand(5840, 36500)),\n 'created_at' => $updatedAt->subDays(rand(1, 3000)),\n 'updated_at' => $updatedAt,\n ]);\n }\n\n }", "public function run()\n {\n _Log::system(_Log::$INFO, 'seeding educations');\n $ed1 = new Education(['name'=>'TK']);$ed1->save();\n $ed2 = new Education(['name'=>'SD']);$ed2->save();\n $ed3 = new Education(['name'=>'SMP']);$ed3->save();\n $ed4 = new Education(['name'=>'SMU']);$ed4->save();\n $ed5 = new Education(['name'=>'Diploma']);$ed5->save();\n $ed6 = new Education(['name'=>'Sarjana']);$ed6->save();\n $ed7 = new Education(['name'=>'Magister']);$ed7->save();\n $ed8 = new Education(['name'=>'Doktor']);$ed8->save();\n $ed9 = new Education(['name'=>'Tidak Ada']);$ed9->save();\n _Log::system(_Log::$SUCCESS, 'seeding educations success');\n }", "public function run()\n {\n $faker = $this->fakerFactory->create();\n\n for ($i = 0; $i < 10; $i++) {\n $this->database->table(\"authors\")->insert([\n \"name\" => $faker->unique()->name,\n \"created_at\" => $faker->dateTimeThisYear,\n \"updated_at\" => $faker->dateTimeThisYear\n ]);\n }\n\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n // $faker = \\Faker\\Factory::create();\n // Assessment::create([\n // 'teacher_id' => rand(0, 10),\n // 'pupil_id' => rand(0, 10),\n // 'test_id' => rand(0, 10),\n // 'assessment_no' => rand(0, 120),\n // 'assessment_date' => $faker->date,\n // ]);\n factory(App\\Models\\Assessment::class, 10)->create();\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n\n for($i = 0; $i < 1000; $i++) {\n App\\TestData::create([\n 'username' => $faker->userName,\n 'name' => $faker->name,\n \n ]);\n }\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // Let's make sure everyone has the same password and\n // let's hash it before the loop, or else our seeder\n // will be too slow.\n $password = Hash::make('password');\n\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n\n // And now let's generate a few dozen users for our app:\n for ($i = 0; $i < 10; $i++) {\n User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => $password,\n 'country' => $faker->country,\n 'gender' => 'male',\n 'number' => $faker->phoneNumber,\n 'username' => $faker->userName,\n 'birth_date' => $faker->date($format = 'Y-m-d' , $max = 'now'),\n 'institution_type' => $faker->word,\n 'institution_name' => $faker->company,\n 'department' => $faker->domainword,\n 'faculty' => $faker->colorName,\n 'education_level' => $faker->numberBetween($min = 100 , $max = 700),\n\n ]);\n }\n }", "public function run()\n {\n $this->seedUsers();\n $this->seedAdmins();\n $this->seedMeals();\n\n $this->seedOrder();\n $this->seedOrderlist();\n\n $this->seedReload();\n }", "public function run()\r\n {\r\n $this->seed('MnaraTableSeeder');\r\n\r\n }", "public function run()\n {\n\n $faker = Faker::create();\n foreach(range(1,100)as$index){\n\n \n DB::table('usuarios')->insert([\n 'nombre' => $faker->name(5),\n 'equipo' => $faker->state(4),\n 'nacionalidad'=> $faker->country(4)\n ]);}\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //$this->call(RolesAndPermissionsSeeder::class);\n //$this->call(CMSTableSeeder::class);\n //$this->call(IncidentTypesSeeder::class);\n //$this->call(RegistrarsSeeder::class);\n\n /*\n factory(App\\Incident::class, 50)->create();\n\n factory(\\App\\Inquiry::class, 10)\n ->create()\n ->each(function ($inq){\n $inq->incidents()->attach(\\App\\Incident::inRandomOrder()->take(random_int(1,5))->get());\n });\n */\n //$this->call(InquiryStatusSeeder::class);\n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[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 $this->seedRegularUsers();\n $this->seedAdminUser();\n }", "public function generate() {}", "public function generate() {}", "public function generate() {}", "public function generate() {}", "public function generate() {}", "public function generate() {}", "public function generate() {}", "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,100) as $index) {\n \\DB::table('modulos')->insert([\n 'descricao' => $faker->words(3,true),\n 'ativo' => $faker->boolean\n ]);\n }\n }", "public function run()\n {\n Site::factory(config('seeder.site_count'))\n ->has(Distribution::factory(2))\n ->has(SitedStock::factory(config('seeder.sitedstock_count')))\n ->create();\n \n DB::table('sites')->insert([\n 'radar_name'=>'DWSR-2501C',\n 'image'=>'027ce6f5bc035a08d207f0de97b23965.png',\n 'station_id'=>'Banjarmasin'\n ]);\n DB::table('sites')->insert([\n 'radar_name'=>'DWSR-3501C',\n 'image'=>'027ce6f5bc035a08d207f0de97b23965.png',\n 'station_id'=>'Cengkareng'\n ]);\n }", "public function run()\n {\n \t// php artisan db:seed --class=Chuckbe\\\\ChuckcmsTemplateFrankfurt\\\\seeds\\\\ChuckcmsTemplateFrankfurtTableSeeder\n $fonts = [];\n $fonts['raw'] = 'Roboto:100,300,400,400italic,700|Patua+One:100,300,400,400italic,700|Lato:400,400italic,700,700italic,900|Roboto:100,300,400,400italic,500,700,700italic|Montserrat:100,300,400,400italic,500,700,700italic';\n \n $css = [];\n $css['global']['href'] = 'chuckbe/chuckcms-template-frankfurt/css/global.css';\n $css['global']['asset'] = 'true';\n\n $css['structure']['href'] = 'chuckbe/chuckcms-template-frankfurt/css/structure.css';\n $css['structure']['asset'] = 'true';\n\n $css['frankfurt']['href'] = 'chuckbe/chuckcms-template-frankfurt/css/frankfurt.css';\n $css['frankfurt']['asset'] = 'true';\n\n $css['custom']['href'] = 'chuckbe/chuckcms-template-frankfurt/css/custom.css';\n $css['custom']['asset'] = 'true';\n \n $js = []; \n $js['jquery']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/jquery-2.1.4.min.js';\n $js['jquery']['asset'] = 'true';\n\n $js['mfnmenu']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/mfn.menu.js';\n $js['mfnmenu']['asset'] = 'true';\n\n $js['jqueryplugins']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/jquery.plugins.js';\n $js['jqueryplugins']['asset'] = 'true';\n\n $js['jqueryjplayer']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/jquery.jplayer.min.js';\n $js['jqueryjplayer']['asset'] = 'true';\n\n $js['animations']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/animations/animations.js';\n $js['animations']['asset'] = 'true';\n\n $js['translate3d']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/translate3d.js';\n $js['translate3d']['asset'] = 'true';\n\n $js['scripts']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/scripts.js';\n $js['scripts']['asset'] = 'true';\n\n $js['email']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/email.js';\n $js['email']['asset'] = 'true';\n\n $json = [];\n\n // create template\n Template::updateOrCreate(\n ['slug' => 'chuckcms-template-frankfurt'],\n ['name' => 'ChuckCMS Template Frankfurt',\n 'hintpath' => 'chuckcms-template-frankfurt',\n 'path' => 'chuckbe/chuckcms-template-frankfurt',\n 'type' => 'default',\n 'version' => '0.1',\n 'author' => 'Karel Brijs ([email protected])',\n 'fonts' => $fonts,\n 'css' => $css,\n 'js' => $js,\n 'json' => $json,\n 'active' => 1]\n );\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n foreach (range(1,50) as $index) {\n $data = [\n 'id' => $faker->id,\n 'txt_protocolo' => $faker->unique()->txt_protocolo,\n ];\n Protocolo::create($data);\n }\n }", "public function run()\n {\n // *****Data Using Manually*********\n // $student = [\n // [\n // 'name'=>'Jogi',\n // 'lastname'=>'Singh',\n // ],\n // [\n // 'name'=>'Jonty',\n // 'lastname'=>'Singh',\n // ],\n // [\n // 'name'=>'Harsh',\n // 'lastname'=>'Srivastav',\n // ],\n \n // ];\n\n // foreach ($student as $key => $value) {\n // Student::create($value);\n // }\n // *******End Data Manually*************\n // *****************Data Dump Using Faker*******************\n $faker = Faker::create();\n foreach (range(1,100) as $key => $value) {\n Student::create(\n [\n 'name'=>$faker->name,\n 'lastname'=>$faker->lastname\n ]\n );\n }\n\n }", "public function run()\n\n {\n\n DB::table('user')->insert([\n 'name'=> 'Admin',\n 'phonenumber'=>'01694844753',\n 'password'=>hash('ripemd160','123456'),\n 'avatar'=>'/img/unknowavatar.png',\n ]);\n $faker = Faker\\Factory::create();\n\n for($i=0; $i<5; $i++){\n \n DB::table('user')->insert([\n 'name'=> $faker->name,\n 'phonenumber'=>$faker->phoneNumber,\n 'password'=> Str::random(10),\n 'avatar'=>$faker->image,\n ]);\n \n }\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n// $this->seedTestForms($faker);\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n \n //لازم المودل يكون عامل \n //has Facroty عشان اقدر استعملو \n //لتنفيذ الفاكتوري\n // Category::factory(19)->create();\n\n Product::factory(199)->create();\n //Tag::factory(15)->create();\n\n //هنا بستدعي السيدر عشان انفذو\n // $this->call(CategoriesTableSeeder::class);\n\n /*\n Category::factory(10)\n ->has(Category::factory(5)\n ->has(Product::factory(15),'products')\n ,'children')\n ->create();\n*/\n\n }", "public function run()\n {\n factory(\\App\\Models\\Discusse::class,config('other.seeder_count'))->create([\n 'is_better' => 0\n ]);\n factory(\\App\\Models\\Discusse::class,config('other.seeder_count'))->create([\n 'is_better' => 1\n ]);\n }", "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,50) as $index) {\n DB::table('empleado')->insert([\n 'dni' => $faker->numberBetween(20000000, 43000000),\n 'apellidonombre' => $faker->firstName(). \" \" . $faker->lastName(),\n 'idempleadocapataz' => rand(1, 50),\n 'especialidad' => $faker->jobTitle(),\n ]);\n }\n }", "public function run()\n {\n $count = Regency::count();\n if($count == 0) {\n return $this->command->alert(\n 'Seed Error !! Silahkan Seed Regency Terlebih Dahulu'\n );\n }\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n District::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n $data = array_map('str_getcsv', file(base_path().\"/storage/districts.csv\"));\n foreach ($data as $x) {\n $prov = new District();\n $prov->id = $x[0];\n $prov->regency_id = $x[1];\n $prov->name = $x[2];\n $prov->save();\n }\n }", "public function run()\n {\n $faker=Faker::create();\n foreach (range(1,20) as $i){\n DB::table('personas')->insert([\t \n 'nombre' => $faker->name(),\n 'apellido' => $faker->lastName(),\n 'correo' => $faker->email(),\n 'edad'=>$faker->randomNumber(2),\n ]);\n }\n // factory(personas::class, 99)->create();\n }", "public function run()\n {\n //\n $faker = Faker::create();\n\n for ($i = 0; $i < 100; $i++) {\n $data = [\n 'pelanggan' => $faker->name,\n 'alamat' => $faker->address,\n 'telp' => $faker->phoneNumber,\n ];\n\n Pelanggan::create($data);\n }\n }", "public function run()\n {\n DB::table('users')->delete();\n $json = File::get(\"database/seederfile/users.json\");\n $data = json_decode($json);\n foreach($data as $obj)\n { User::create(array(\n \t'id' => $obj -> id,\n \t'role_id' => $obj -> role_id,\n \t'username' => $obj -> username,\n \t'name' => $obj -> name,\n \t'email' => $obj -> email,\n #'password' => Hash::make('admin1')]);\n \t'password' => Hash::make($obj -> password),\n\t\t\t'remember_token' => $obj -> remember_token,\n \t'created_at' => $obj -> created_at,\n\t\t\t'updated_at' => $obj -> updated_at\n ));\n\t\t}\n }", "public function run()\n {\n //\n// factory(\\App\\Bill::class,10)->create();\n \\App\\Helpers\\FactoryHelper::force_seed(\\App\\Bill::class,4);\n }", "public function run()\n {\n\t\t// Let's truncate our existing records to start from scratch.\n File::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n File::create([\n 'name' => $faker->name,\n\t\t\t\t'user_id' => User::first()->id,\n ]);\n }\n }", "public function run()\n {\n // Create my personal user\n $email = env('ADMIN_USER_EMAIL', false);\n $password = env('ADMIN_USER_PASSWORD', false);\n if (!$email || !$password) {\n throw new \\Exception('You must set admin credentials in .env before seeding');\n }\n $jakob = factory(App\\User::class)->create([\n 'name' => 'Jakob Buis',\n 'email' => $email,\n 'password' => bcrypt($password),\n ]);\n\n // Create the frontend as password-grant client\n $client = (new \\Laravel\\Passport\\Client)->forceFill([\n 'user_id' => $jakob->id,\n 'name' => 'librorum-frontend',\n 'secret' => str_random(40),\n 'redirect' => env('APP_URL'),\n 'personal_access_client' => false,\n 'password_client' => true,\n 'revoked' => false,\n ]);\n $client->save();\n\n // Create the content\n $tags = factory(\\App\\Tag::class, 5)->create(['user_id' => $jakob->id]);\n\n // Create 5 notebooks, each with 3 pages\n // each linked to 2 randomly selected tags\n $notebooks = factory(\\App\\Notebook::class, 5)->create(['user_id' => $jakob->id]);\n $notebooks->each(function($notebook) use ($tags) {\n\n $pages = factory(\\App\\Page::class, 3)->create([\n 'notebook_id' => $notebook->id,\n ]);\n\n $pages->each(function($page) use ($tags) {\n $page->tags()->attach($tags->random(2));\n });\n });\n }", "public function run()\n {\n $faker = Faker\\Factory::create('en_US');\n\n foreach(range(1, 10) as $index) {\n Institute::create([\n 'inst_profile_guid' => $faker->uuid,\n 'user_id' => rand(1, 20),\n 'institute_code' => $faker->postcode,\n 'institute_name' => $faker->company,\n 'institute_description' => $faker->sentence,\n 'contact' => $faker->phoneNumber,\n 'address' => $faker->address,\n 'city' => $faker->city,\n 'postal_code' => $faker->postcode,\n 'country' => $faker->country\n ]);\n }\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('App\\Meet');\n\n for($i = 1; $i <= 20; $i ++){\n \tDB::table('meets')->insert([\n \t\t'user_id' => $faker->numberBetween($min = 1, $max = 20),\n \t\t'title' => $faker->sentence(),\n \t\t'meet_date' => $faker->dateTimeThisYear($max = 'now', $timezone = date_default_timezone_get()),\n \t\t'location' => $faker->streetName,\n \t\t'lat' => $faker->latitude($min = -90, $max = 90),\n \t\t'lng' => $faker->longitude($min = -180, $max = 180),\n \t\t'description' => implode($faker->paragraphs(5)),\n \t\t'deleted' => 0,\n \t\t'updated_at' => \\Carbon\\Carbon::now(),\n \t\t'created_at' => \\Carbon\\Carbon::now(),\n \t\t]);\n }\n\n\n }", "public function run()\n {\n Model::unguard();\n\n $this->call(AttributesSeeder::class);\n\n File::factory()->count(10)->create();\n\n // Get all the attributes attaching up to 3 random attributes to each file\n $attributes = Attribute::all();\n\n // Populate the pivot table\n File::all()->each(function ($file) use ($attributes) {\n $file->attributes()->attach(\n $attributes->random(rand(1, 5))->pluck('id')->toArray(),\n [\n 'order' => rand(1, 5)\n ]\n );\n });\n\n Model::reguard();\n }", "public function run()\n {\n // DB::table('users')->truncate(); //elimina la bd cada vez que realizo el seed\n\n \n\n \n\n\n factory(App\\User::class,10)->create();\n\n factory(App\\User::class)->create([\n 'name' =>'Administrador',\n 'email' =>'[email protected]',\n 'role' =>'admin',\n 'password'=>bcrypt('secret')\n\n ]);\n\n\n factory(App\\hotel::class,1)->create();\n \n \n\n }", "public function run()\n {\n //$this->call(SectionSeeder::class);\n $this->call(AdminSeeder::class);\n //$this->call(ClientSeeder::class);\n \n \n\n\n\n //DB::table('users')->insert([\n // 'name' => 'Harry Han',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // 'contractorLastname' => 'Han',\n // 'contractorCompany' => 'test-company' ,\n // 'contractorContactNumber' => '0600000000',\n // 'contractorStatus' => 'active'\n //]);\n }", "public function run()\n {\n $seeds = [\n [\n 'id'=>1,\n 'user_id'=>'1',\n 'firstname'=>'Jonas',\n 'lastname'=>'Jonaitis',\n 'position'=>'Administratorius',\n 'email'=>'[email protected]',\n 'phone'=>'Nėra',\n 'birthday'=>'2017-04-05',\n 'photo'=>'150x150.png',\n ],\n ];\n\n foreach ($seeds as $seed) {\n \\App\\Profile::create($seed);\n }\n }", "public function run()\n {\n \t$faker = Factory::create();\n \tfor ($i=0; $i <99 ; $i++) { \n \t\tKontak::create([\n \t\t\t'nama'=>$faker->name,\n \t\t\t'email'=>$faker->email,\n \t\t\t'foto'=>$faker->text\n \t\t]);\n \t}\n }", "public function run()\n\t{\n\n $faker = \\Faker\\Factory::create();\n\n // Let's make sure everyone has the same password and \n // let's hash it before the loop, or else our seeder \n // will be too slow.\n $password = Hash::make('aa2016aa');\n\n User::create([\n 'type' => '1',\n 'fname' => 'artiom',\n 'lname' => 'live',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n\n User::create([\n 'type' => '0',\n 'fname' => 'artiom',\n 'lname' => 'demo',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n }", "public function run()\n {\n // Admin Acount Seeding\n $add = new User;\n $add->name = 'karim';\n $add->email= '[email protected]';\n $add->password = Hash::make(123456);\n $add->phone = '01126878406';\n $add->prefix = 'karim';\n $add->level = 'admin';\n $add->save();\n\n //Language Seeding\n $language = new Languages;\n $language->language = \"English\";\n $language->prefix = \"en\";\n $language->direction = \"ltr\";\n $language->save();\n\n //Setting Seeding\n $appSetting = new Setting;\n $appSetting->sitename = \"Cure2Us\";\n $appSetting->email = \"[email protected]\";\n $appSetting->save();\n }", "public function run()\n {\n //\n \t$fake = \\Faker\\Factory::create();\n \\DB::table('users')->insert([\n 'name' => 'Nguyễn Văn Hiệp',\n 'email' => '[email protected]',\n 'is_admin' => '1',\n 'password'=> bcrypt('12345678')\n ]);\n for ($i=0; $i < 20; $i++) {\n \\DB::table('users')->insert([\n 'name' => $fake->name,\n 'email' => $fake->email,\n 'password'=> bcrypt('12345678')\n ]);\n }\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++)\n {\n $gender = array_rand(['Men', 'Women'], 1);\n\n User::create([\n 'id' => ($i + 1),\n 'first_name' => $faker->firstName($gender == 0 ? 'male' : 'female'),\n 'last_name' => $faker->lastName,\n 'sex' => ($gender == 0 ? 'Men' : 'Women'),\n 'birthday' => $faker->date('Y-m-d', 'now'),\n 'email' => $faker->email,\n 'address' => $faker->address,\n 'telephone' => rand(1111111111,9999999999)\n ]);\n }\n }", "public function run()\n {\n $faker = Faker\\Factory::create('fr_FR');\n\n for($i=0; $i<5; $i++){\n\n $data = [\n [\n 'pseudo' => $faker->userName,\n 'email' => $faker->unique()->email,\n 'firstname' => $faker->firstName,\n 'lastname' => $faker->lastName,\n 'password' => $faker->password,\n 'birthday' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'nbateam_id' => 1,\n ]\n ];\n User::insert($data);\n\n }\n }", "public function run()\n {\n $this->call(\\Database\\Seeders\\GroupByRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\SingleIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\MultiIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\JoinFiveTablesSeeder::class);\n\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// // 試しに一回流す\n// $data = $this->makeData(0, 'userFactory', 1);\n// DB::table('users')->insert($data);\n// $data = $this->makeData(0, 'userDetailFactory', 1);\n// DB::table('user_details')->insert($data);\n//\n// // $this->call(UsersTableSeeder::class);\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userFactory', 2500);\n// DB::table('users')->insert($data);\n// }\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userDetailFactory', 2500);\n// DB::table('user_details')->insert($data);\n// }\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n foreach (range(1, 20) as $value) {\n User::create([\n 'name' => $faker->text('20'),\n 'email' => $faker->email,\n 'dob'=> $faker->date(),\n 'password' => bcrypt('anhvit12'),\n ]);\n\n }\n }", "public function run()\n {\n if (!File::exists(public_path('uploads/faker/heritage'))) {\n File::makeDirectory(public_path('uploads/faker/heritage'), 777, true);\n }\n $faker = Faker\\Factory::create();\n for ($i = 0; $i < 16; $i++) {\n $data = [\n 'title' => $faker->sentence(),\n 'description' => theExcerpt($faker->paragraph, 255),\n 'content' => $faker->text(2000),\n 'thumbnail' => 'uploads/faker/heritage/' . $faker->image(public_path('uploads/faker/heritage'), 420, 236, null, false),\n 'cover' => 'uploads/faker/heritage/' . $faker->image(public_path('uploads/faker/heritage'), 1170, 150, null, false),\n 'province_id' => rand(1, 63),\n 'area_id' => rand(63, 70),\n 'user_id' => rand(1, 10),\n 'lang' => 'en',\n 'parent_id' => 0,\n 'status' => STATUS_ACTIVATED\n ];\n \\App\\IZee\\Heritages\\Heritage::create($data);\n }\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n $gender = $faker->randomElement(['L', 'P']);\n $religion = $faker->randomElement(['Kristen', 'Islam', 'Budha']);\n\n for ($i=0; $i < 20; $i++) { \n DB::table('siswa')->insert([\n 'nama_depan' => $faker->firstName,\n 'nama_belakang' => $faker->lastName,\n 'jenis_kelamin' => $gender,\n 'agama' => $religion,\n 'alamat' => $faker->address\n ]);\n }\n }", "public function run()\n {\n $faker = Faker::create();\n\n foreach(range(1, 10) as $index)\n {\n User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'username' => $faker->userName,\n 'password' => $faker->password,\n 'location' => $faker->text,\n 'profile_picture' => $faker->imageUrl($width = 550, $height = 550)\n ]);\n }\n }", "public function run()\n {\n $faker = Faker::create();\n $samples_temp = [];\n\n for($i = 0; $i < 100; $i++)\n {\n $samples_temp[] = [\n 'nombre' => $faker->name,\n 'email'=> $faker->email\n\n ];\n }\n Correo::insert($samples_temp);\n\n\n }", "public function run()\n {\n $faker = $faker = Faker\\Factory::create();\n foreach (range(1,250) as $index) {\n DB::table('employee')->insert([\n 'employee_first_name' => $faker->name,\n 'employee_last_name' => $faker->name,\n 'employee_ref_number' => 00000,\n 'employee_phone_number' => rand(0,5),\n 'employee_address' => $faker->name,\n 'employee_address_two' => $faker->name,\n 'employee_country' => $faker->name,\n 'employee_state' => $faker->state,\n 'employee_city' => $faker->city,\n 'employee_email' => $faker->email,\n 'employee_pin_code' => rand(0,5),\n 'employee_reference' => $faker->name,\n 'employee_unique_identy' => $faker->name,\n ]);\n }\n }", "public function run()\n {\n $facker = app(Faker\\Generator::class);\n\n $avatars = [\n 'https://avatars3.githubusercontent.com/u/41312704?s=460&v=4',\n 'https://cdn.learnku.com/uploads/avatars/24327_1530087651.jpeg!/both/200x200',\n ];\n\n $users = factory(User::class)\n ->times(10)\n ->make()\n ->each(function ($user, $index) use ($facker, $avatars) {\n $user->avatar = $facker->randomElement($avatars);\n });\n $user_array = $users->makeVisible(['password', 'remember_token'])->toArray();\n User::insert($user_array);\n\n $user = User::find(1);\n $user->name = '十步';\n $user->email = '[email protected]';\n $user->avatar = 'https://avatars3.githubusercontent.com/u/41312704?s=460&v=4';\n $user->save();\n\n // 初始化用户角色,将1号用户设置为站长\n $user->assignRole('Founder');\n $user = User::find(2);\n $user->assignRole('Maintainer');\n }", "public function run()\n {\n User::create ( [\n 'username' => 'anh.tuan',\n 'first_name' => 'Tuan',\n 'last_name' => 'Nguyen',\n 'email' => '[email protected]',\n 'is_admin' => 1,\n 'password' => bcrypt('123456')\n ]);\n\n for ($i = 0; $i < 10; $i++)\n {\n $faker = Faker::create();\n User::create ( [\n 'username' => $faker->userName,\n 'first_name' => $faker->firstName,\n 'last_name' => $faker->lastName ,\n 'email' => $faker->email,\n 'is_admin' => 0,\n 'password' => bcrypt('123456')\n ]);\n }\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n for($i =0; $i<20; $i++){\n \\App\\Organisation::create([\n 'name' => $faker->company,\n 'business_type_id' => $faker->numberBetween(1, 3),\n 'logo'=>$faker->imageUrl($width = 200, $height = 200, 'abstract',true),\n 'address' => $faker->address,\n 'email' => $faker->companyEmail,\n 'mobile' => $faker->numberBetween(263772000000,263779999999),\n 'telephone'=>$faker->numberBetween(240291,29999)\n ]);\n }\n }", "public function run()\n {\n User::create([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n ]);\n\n User::create([\n 'name' => 'Leonardo',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789')\n ]);\n\n // seed sin model\n /* DB::table('users')->insert([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]); */\n }", "public function run()\n {\n $faker = Faker::create();\n\n for($i = 0; $i < 50; $i++){\n $uid = DB::table('users')->select('id')->inRandomOrder()->first();\n $student = new Student([\n 'first_name' => $faker->firstName,\n 'last_name' => $faker->lastName,\n 'teacher_id' => $uid->id,\n 'code' => $faker->bothify('**********')\n ]);\n\n $student->save();\n }\n }", "public function run()\n {\n $faker = Faker::create();\n $preUach = PreUach::all();\n $samples_temp = [];\n\n foreach ($preUach as $item)\n {\n\n\n $samples_temp[] = [\n 'postulante' => $item->postulante,\n 'persona_matricula'=> $faker->lastName.' '. $faker->firstName,\n 'fecha_matricula'=>$faker->dateTimeBetween($startDate = '-5 months', $endDate = 'now')\n ]; \t\n }\n\n Declaracion::insert($samples_temp);\n \n }" ]
[ "0.741271", "0.72163844", "0.71867263", "0.7150963", "0.7011614", "0.6992453", "0.6889081", "0.6877449", "0.68096465", "0.679051", "0.67819595", "0.6763185", "0.6725394", "0.67226577", "0.67199546", "0.67100257", "0.6709864", "0.67040205", "0.6703833", "0.66986066", "0.66848785", "0.66676813", "0.6664289", "0.66619146", "0.6658433", "0.6657409", "0.66464853", "0.66320693", "0.6631319", "0.66305304", "0.66290253", "0.66284007", "0.6624839", "0.6623553", "0.6619334", "0.6618539", "0.6608564", "0.65820485", "0.65815806", "0.65786946", "0.65776837", "0.65724593", "0.65712655", "0.6568998", "0.6564165", "0.65635526", "0.65632516", "0.6561539", "0.65603864", "0.6557867", "0.6557867", "0.6557841", "0.6557841", "0.6557841", "0.6557841", "0.6557841", "0.6556947", "0.6555183", "0.6549153", "0.65489244", "0.654778", "0.6542256", "0.6541639", "0.6536023", "0.65329695", "0.6532951", "0.6532415", "0.65314263", "0.65287995", "0.6528459", "0.65275294", "0.6521118", "0.6521097", "0.6520966", "0.6520696", "0.65203667", "0.6519488", "0.6513222", "0.651225", "0.6512065", "0.6511974", "0.6510938", "0.6509229", "0.6507844", "0.65072274", "0.6500883", "0.65005153", "0.64961535", "0.6495031", "0.6491838", "0.6490735", "0.6488336", "0.64861405", "0.6485924", "0.6479967", "0.6479224", "0.6478154", "0.6477599", "0.6476717", "0.64762294", "0.64754003" ]
0.0
-1
Gets the public 'sylius.fixture.example_factory.promotion' shared service.
public static function do($container, $lazyLoad = true) { include_once \dirname(__DIR__, 4).'/vendor/sylius/sylius/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ExampleFactoryInterface.php'; include_once \dirname(__DIR__, 4).'/vendor/sylius/sylius/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AbstractExampleFactory.php'; include_once \dirname(__DIR__, 4).'/vendor/sylius/sylius/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php'; return $container->services['sylius.fixture.example_factory.promotion'] = new \Sylius\Bundle\CoreBundle\Fixture\Factory\PromotionExampleFactory(($container->services['sylius.factory.promotion'] ?? ($container->services['sylius.factory.promotion'] = new \Sylius\Component\Resource\Factory\Factory('App\\Entity\\Promotion\\Promotion'))), ($container->services['sylius.fixture.example_factory.promotion_rule'] ?? $container->load('getSylius_Fixture_ExampleFactory_PromotionRuleService')), ($container->services['sylius.fixture.example_factory.promotion_action'] ?? $container->load('getSylius_Fixture_ExampleFactory_PromotionActionService')), ($container->services['sylius.repository.channel'] ?? $container->getSylius_Repository_ChannelService()), ($container->services['Sylius\\Component\\Promotion\\Factory\\PromotionCouponFactoryInterface'] ?? $container->load('getPromotionCouponFactoryInterfaceService'))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPromotion(){\n return $this->promotion;\n }", "public function promotion()\n {\n return $this->hasOne('App\\Entities\\Promotion', 'id_promotion', 'id_promotion');\n }", "public function getPromotion(): ?PromotionInterface\n {\n }", "function get_plugin_instance() {\n\tglobal $prodigy_commerce_plugin;\n\treturn $prodigy_commerce_plugin;\n}", "public function setPromotion($promotion){\n $this->promotion = $promotion;\n return $this;\n }", "public function __construct(EntityTypeManagerInterface $entity_type_manager) {\n $this->promotionStorage = $entity_type_manager->getStorage('commerce_promotion');\n }", "public function setPromotion($promotion)\n {\n $this->promotion = $promotion;\n }", "public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}", "public function getByID($promotion_id)\n {\n return $this->promotionsRepo->getPromotionByID($promotion_id);\n }", "public static function getActivePromotion() {\n\t\t$db = Denkmal_Db::get();\n\t\t$id = $db->fetchOne('SELECT id\n\t\t\t\t\t\t\t\tFROM promotion p\n\t\t\t\t\t\t\t\tWHERE p.active=1\n\t\t\t\t\t\t\t\tLIMIT 1');\n\t\tif ($id) {\n\t\t\treturn new Promotion ($id);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getManager(): Gutenberg\n {\n return $this->manager;\n }", "public function testComAdobeCqCommerceImplPromotionPromotionManagerImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.commerce.impl.promotion.PromotionManagerImpl';\n\n $crawler = $client->request('POST', $path);\n }", "public function executePromotion(){\n if($this->isGotPromotion()){\n return $this->promotion->getPromotionPrice(); \n }\n }", "public function getService ()\n {\n if (null === $this->_service) {\n $this->setService('Default_Service_Spirit');\n }\n return $this->_service;\n }", "function YITH_WCMBS_Products_Manager() {\n return YITH_WCMBS_Products_Manager::get_instance();\n}", "public static function do($container, $lazyLoad = true)\n {\n include_once \\dirname(__DIR__, 4).'/vendor/sylius/sylius/src/Sylius/Component/Promotion/Processor/PromotionProcessorInterface.php';\n include_once \\dirname(__DIR__, 4).'/vendor/sylius/sylius/src/Sylius/Component/Promotion/Processor/PromotionProcessor.php';\n\n return $container->services['sylius.promotion_processor'] = new \\Sylius\\Component\\Promotion\\Processor\\PromotionProcessor(($container->services['sylius.active_promotions_provider'] ?? $container->load('getSylius_ActivePromotionsProviderService')), ($container->services['sylius.promotion_eligibility_checker'] ?? $container->load('getSylius_PromotionEligibilityCheckerService')), ($container->services['sylius.promotion_applicator'] ?? $container->load('getSylius_PromotionApplicatorService')));\n }", "public function service()\n {\n return $this->service;\n }", "public function testComDayCqSearchpromoteImplSearchPromoteServiceImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.searchpromote.impl.SearchPromoteServiceImpl';\n\n $crawler = $client->request('POST', $path);\n }", "public function getConfirmingService()\n {\n if (!$this->confirmingService) {\n $this->setConfirmingService(new ConfirmingService($this));\n }\n\n return $this->confirmingService;\n }", "public function getSlideService(){\n if(null === $this->slideService)\n $this->slideService = $this->getServiceLocator()->get('slide_service');\n return $this->slideService;\n }", "public function service()\r\n {\r\n return $this->service;\r\n }", "private function getServicePostLike()\n {\n return $this->container->get('app_service_post_like');\n }", "public function getPromotions()\n\t{\t\n\n\t\t$promotion = new promotion;\t\n\n\t\t$promotions = $promotion->getAllPromotions();\n\t\n\t\treturn response($promotions);\n\t}", "public function userPromotion() {\n return $this->belongsTo(UserPromotion::class, 'promotion_id');\n }", "public function getAddOnManagerService() {\n\t\treturn $this->get('sly-service-addon-manager');\n\t}", "function getService() {\n return $this->service;\n }", "public function setPromotion(PromotionInterface $promotion)\n {\n $this->promotion = $promotion;\n }", "public function service() {\n return $this->service;\n }", "public function getServiceInstance() {\n return $this->hasOne(ServiceInstance::className(), [\"id\" => \"service_instance_id\"]);\n }", "public function getItemService() {\n if (!$this->itemService) {\n $this->itemService = $this->getServiceLocator()->get('bidsite_item_service');\n }\n return $this->itemService;\n }", "public function getSharedManager();", "protected function dataPolicyConsentManager() {\n if (!$this->dataPolicyConsentManager) {\n $this->dataPolicyConsentManager = \\Drupal::service('data_policy.manager');\n }\n return $this->dataPolicyConsentManager;\n }", "public function getPerfilService()\n {\n return $this->perfilService = new PerfilService();\n }", "public function getEntityTypeManagerMock(){\n $manager = $this->prophet->prophesize('Drupal\\Core\\Entity\\EntityTypeManagerInterface');\n $storage = $this->getStorageMock()->reveal();\n try {\n $manager->getStorage(Argument::type('string'))->willReturn($storage);\n } catch (InvalidPluginDefinitionException $e) {\n } catch (PluginNotFoundException $e) {\n }\n return $manager;\n }", "protected function getStofDoctrineExtensions_Uploadable_ManagerService()\n {\n $a = new \\Gedmo\\Uploadable\\UploadableListener(new \\Stof\\DoctrineExtensionsBundle\\Uploadable\\MimeTypeGuesserAdapter());\n $a->setAnnotationReader($this->get('annotation_reader'));\n $a->setDefaultFileInfoClass('Stof\\\\DoctrineExtensionsBundle\\\\Uploadable\\\\UploadedFileInfo');\n\n return $this->services['stof_doctrine_extensions.uploadable.manager'] = new \\Stof\\DoctrineExtensionsBundle\\Uploadable\\UploadableManager($a, 'Stof\\\\DoctrineExtensionsBundle\\\\Uploadable\\\\UploadedFileInfo');\n }", "public function hasPromotion()\n {\n if($this->promotion instanceof PromotionInterface){\n return true;\n }\n return false;\n }", "public function getCustomizationService();", "public function setPromotionAdapter(\\core\\IPromotionAdapter $promotion)\n {\n $this->promotion = $promotion;\n $this->has_promotion = true;\n }", "function analogue()\n {\n return Manager::getInstance();\n }", "public function getById($id = null)\n {\n if ($id == null || $id == '') {\n throw new InvalidArgumentException('Promo tidak ditemukan');\n }\n $promo = $this->promo->find($id);\n if (!$promo) {\n throw new InvalidArgumentException('Promo tidak ditemukan');\n }\n return $promo;\n }", "public function promotional();", "public function getVendorPackageService() {\n\t\treturn $this->get('sly-service-package-vendor');\n\t}", "public function provides()\n {\n return ['shppcart_service'];\n }", "public function getTaxon(): SyliusTaxonInterface;", "public function getService()\n {\n return $this->_service;\n }", "public function getService()\n\t{\n\t\treturn $this->service;\n\t}", "public function remove_promo()\n {\n $cart = $this->getService()->getSessionCart();\n\n return $this->getService()->removePromo($cart);\n }", "protected function getService()\n {\n return $this->service;\n }", "protected function getService()\n {\n return $this->service;\n }", "protected function getTranslation_Dumper_MoService()\n {\n return $this->services['translation.dumper.mo'] = new \\Symfony\\Component\\Translation\\Dumper\\MoFileDumper();\n }", "protected function getNotification_Type_QuoteService()\n {\n $instance = new \\phpbb\\notification\\type\\quote(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php', 'phpbb_user_notifications');\n\n $instance->set_user_loader(${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'});\n $instance->set_config(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'});\n $instance->set_utils(${($_ = isset($this->services['text_formatter.s9e.utils']) ? $this->services['text_formatter.s9e.utils'] : ($this->services['text_formatter.s9e.utils'] = new \\phpbb\\textformatter\\s9e\\utils())) && false ?: '_'});\n\n return $instance;\n }", "public function getImagineService()\n {\n return $this->imagine;\n }", "public function getService()\n\t{\n\t\treturn $this->_service;\n\t}", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getService()\n {\n return $this->service;\n }", "public function getServiceProvider();", "public function getStorageService();", "public function getAddOnPackageService() {\n\t\treturn $this->get('sly-service-package-addon');\n\t}", "public function getPromotioncode()\n {\n return $this->promotioncode;\n }", "public function getSalesrep()\n {\n return Mage::registry('fvets_salesrep');\n }", "public function getService()\n {\n return null;\n }", "public function getService() {\n return $this->service;\n }", "protected function service()\n {\n return new Service();\n }", "public function provides()\n {\n return array('shopify');\n }", "public function actionGetpromotion()\n {\n $sku = false;\n $productdata = \"add sku on url like ?sku=product_sku\";\n if (isset($_GET['sku'])) {\n $sku = $_GET['sku'];\n }\n $merchant_id = '323';\n //$config = Data::getConfiguration($merchant_id);\n $walmartHelper = new Walmartapi('899c9675-6302-43f2-9420-e8f55b176671', 'MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJf0uSx+vD19j4ROQnXj+3nSnwIsSnoRB5VAhDuaiLLDWKQvFbwWB4cAaZNX9fgdyT5KEuiW5QpXNV6ui8B6Ex/lgdlaXaaANnEd8FPjcct4WuGM3JaurUyQj24b7S1eCAPwoJqPyJPjpCQ5OYGgGvi4mHFmawq4rOhgsVT9upIdAgMBAAECgYAxGWob7nd0hvWwknj3Dsta+atXUGhgONBycX5IpA43dNdXdb9YHuYfwQpcCbf4i+dSsSya6ubnCHa+OTf+4XL8A4DnQojj3sfXx6B/N8k4eNHZ8wpbDQAceA+gdw2n466iKfW76cdXiL+2DUhS6qNtvaQ72r5/2KBRgidr7NR7AQJBANdXMA7oOjZ0lOPJCQsSn9nzQqYJMSqN1EvpFMlNX63VnUDlj1kV1MbWbo+sN9AZylrtjcg0YcZenI3bHCvF1QkCQQC0pb5u81zqKOCV7leboWp1LUTmMYWJNeO26lT8knhGN42O2W/+qXI5cJbY3USN32xxX4gK/MtKUBuhZ7Ow+M11AkAUkoLH2c296BNVU55mjWfyFXhXjmdBDn2qpuDSfm7Wl6LHUWcJdrl2KYQ0e5p1ahFX8HvsFX0Fy4IfV0BwuhypAkBQbqvHwtvP9rtohmLDjK9V1P4kcFBAs5ncS6Hjg2PB/+IrhGz1OoT9RkAj9wEbGiuynxJ3se7h+6ER0JaVaXIxAkBNi7N5cfePcyPfXS89NpTtByi+Yg4QQthv9RvCM/TH6yLpMWBWprRq6ufAMl4NHrFXWZRsA7wUqMYHj8+vB18I', '7b2c8dab-c79c-4cee-97fb-0ac399e17ade');\n if ($sku) {\n $productdata = $walmartHelper->getRequest('v3/promo/sku/CE-0000-0149');\n }\n print_r($productdata);\n die;\n }", "protected function getTranslation_Dumper_PoService()\n {\n return $this->services['translation.dumper.po'] = new \\Symfony\\Component\\Translation\\Dumper\\PoFileDumper();\n }", "public function getIdPromocion()\n {\n return $this->id_promocion;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('PsStore');\n }", "public function getPromotionCode()\n {\n return $this->promotionCode;\n }", "function getPromo()\n {\n return 3.50;\n }", "protected function getRequestStorageFactory() {\n return \\Drupal::service('vipps_recurring_payments:request_storage_factory');\n }", "public function getPromotionAmount()\r\n\t{\r\n\t\treturn $this->root->getAttribute('mtpromo');\r\n\t}", "public function getStorageService()\n {\n $class = $this->app['config']->get('shoppingcart.storage','session');\n\n switch ($class)\n {\n case 'session':\n return 'session';\n break;\n case 'database':\n return 'database';\n break;\n default:\n return 'session';\n break;\n }\n }", "protected function getResolver()\n {\n return $this->container->get('sylius.cart_resolver');\n }", "protected function getNotification_Type_PmService()\n {\n $instance = new \\phpbb\\notification\\type\\pm(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php', 'phpbb_user_notifications');\n\n $instance->set_user_loader(${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'});\n $instance->set_config(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'});\n\n return $instance;\n }", "public function setPromotion(?PromotionInterface $promotion): void\n {\n }", "abstract protected function getService();", "protected function resourceService(){\n return new $this->resourceService;\n }", "public function serviceMeta()\n {\n return $this->belongsTo(ServiceMeta::class);\n }", "public function getPreset() : ServiceInterface;", "public function getShopResource()\n {\n return $this->shop_resource;\n }", "protected function getProductVariantProcessor()\n {\n return $this->productVariantProcessor;\n }", "protected function getIntentionManager()\n {\n return $this->get('intention.execution_manager');\n }", "function getPromotion($id) {\n $xml = simplexml_load_file(__DIR__ . '/../public/promotions.xml');\n\n $xml->registerXPathNamespace('p', 'http://wgcard.xml.hslu.ch/promotions');\n\n return xpathOnlyOne(\n $xml,\n '/p:promotions/p:promotion[@id=' . $id . ']',\n $id . ' has been found multible times in the promtions xml file'\n );\n}", "public function getPromoted()\n {\n return $this->promoted;\n }", "public static function instance() {\n\t\treturn tribe( 'events-aggregator.service' );\n\t}", "public function promotions()\n {\n return $this->hasMany(Promotion::class);\n }", "public function model()\n {\n return ShopManager::class;\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('ServicioPago');\n }", "public function provides()\n {\n return ['survey-manager'];\n }", "protected function getVictoireMedia_Menu_AdaptorService()\n {\n return $this->services['victoire_media.menu.adaptor'] = new \\Victoire\\Bundle\\MediaBundle\\Helper\\Menu\\MediaMenuAdaptor($this->get('doctrine.orm.default_entity_manager'));\n }", "protected function getTranslation_Loader_PoService()\n {\n return $this->services['translation.loader.po'] = new \\Symfony\\Component\\Translation\\Loader\\PoFileLoader();\n }", "public function getServiceManager()\n {\n return $this->sm;\n }", "public function getPromoByPickup($pickupId)\n {\n $promo = $this->promo->whereHas('pickup', function($q) use ($pickupId) {\n $q->where('id', $pickupId);\n })->first();\n return $promo;\n }", "protected function getRequestService()\n {\n return new PokemonRequestService();\n }" ]
[ "0.61514467", "0.5831082", "0.5515848", "0.5411555", "0.53881216", "0.53106576", "0.5265303", "0.526135", "0.5240805", "0.521459", "0.5184827", "0.5162455", "0.51281744", "0.51206094", "0.51196444", "0.51121396", "0.50970787", "0.504605", "0.5021754", "0.4994827", "0.49930647", "0.49745193", "0.495972", "0.49539557", "0.4950204", "0.4948342", "0.49467793", "0.49422902", "0.49312177", "0.4919203", "0.48878404", "0.48791435", "0.4868578", "0.48678675", "0.4863507", "0.48515013", "0.48481005", "0.4841383", "0.4829158", "0.48180076", "0.4808349", "0.48014325", "0.4799257", "0.47980535", "0.47895518", "0.47880834", "0.4784399", "0.47833887", "0.47833887", "0.47829616", "0.47768843", "0.47721085", "0.4766715", "0.47615632", "0.47615632", "0.47615632", "0.47615632", "0.47615632", "0.47615632", "0.47615632", "0.47588515", "0.4752231", "0.47432157", "0.47426933", "0.47338733", "0.4731591", "0.47263128", "0.47258085", "0.4716442", "0.4707965", "0.47056937", "0.46970108", "0.4682477", "0.4666243", "0.46602076", "0.46488363", "0.46481156", "0.4647369", "0.46377316", "0.46240047", "0.46224323", "0.4621136", "0.46173388", "0.46163946", "0.4613288", "0.460752", "0.46074823", "0.45977506", "0.45905682", "0.45885625", "0.45864195", "0.45793065", "0.45771515", "0.45712617", "0.4555617", "0.45538765", "0.4553068", "0.4552774", "0.45501938", "0.45473683" ]
0.552077
2
Get the requested action
function get_action() { global $argv; return strtolower(trim($argv['1'])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getAction() {\n\t return self::getPathParams()['action'];\n\t}", "public function get_action() {\n\t\t$action\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= (isset($_GET['action']))? preg_replace('@[^a-zA-Z0-9_]@', '', $_GET['action']) : $this->conf('default_action');\n\t\t\n\t\t# Return the Action\n\t\treturn $action;\n\t}", "private function get_action() {\n\t\treturn $this->action;\n\t}", "private function get_action() {\n\t\treturn $this->action;\n\t}", "private function get_action() {\n\t\treturn $this->action;\n\t}", "public function getCurrentAction() {\n\t\treturn $this->request->get('action','undefined');\n\t}", "public function get_action() {\r\n\t\treturn $this->action;\r\n\t}", "public function getAction()\n\t{\n\t\treturn $this->_action;\n\t}", "public function getAction()\n\t{\n\t\treturn $this->action;\n\t}", "public function getAction()\n\t{\n\t\treturn $this->action;\n\t}", "public function getAction() {\n\t\treturn $this->action;\n\t}", "public function getAction()\n {\n return $this->m_action;\n }", "public function getAction()\n {\n return $this->_action;\n }", "public function getAction()\n {\n return $this->_action;\n }", "private static function getAction() {\n $action = \"index\";\n if (isset($_GET['action']) && trim($_GET['action']) != \"\") $action = $_GET['action'];\n return $action;\n }", "function getAction () {return $this->getFieldValue ('action');}", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->joUrl['ACTION'];\n }", "public function action()\n {\n return $this->reqaction;\n }", "public function getAction()\n\t{\n\t\t$action = strtolower($this->getParam(self::ACTION_PARAM));\n\t\tif ($action === '' or ! preg_match('/^[a-z0-9_-]+$/', $action)) {\n\t\t\treturn Controller::DEFAULT_ACTION;\n\t\t}\n\n\t\treturn $action;\n\t}", "public function get_action()\n {\n return $this->_action;\n }", "public function getAction() {\n return $this->action;\n }", "public function getAction() {\n return $this->action;\n }", "public function getAction() {\n return $this->action;\n }", "public function getAction() {\n return $this->action;\n }", "public function getAction() {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function get_action() {\n return $this->_action;\n }", "public function getAction()\n {\n return $this->sAction;\n }", "public function getAction() {\n \n return $this->action;\n \n }", "public function action() {\n return $this->action;\n }", "protected function getAction(): string\n\t{\n\t\treturn $this->getActionInput() ?: $this->getDefaultAction($this->getNameInput());\n\t}", "public function getAction(): string\n {\n return $this->action;\n }", "public function getAction(): string\n {\n return $this->action;\n }", "function getAction() {\r\n\t\t\r\n\t\treturn $this->mAction;\r\n\t}", "public function action()\n {\n if (!$this->action) {\n return null;\n }\n return $this->action->getValue();\n }", "public function getAction(){\r\n return $this->sAction;\r\n }", "public function getActionName(){\n\t\tif ( !isset($_GET['action'])){\n\t\t\treturn 'defaultAction';\n\t\t}\n\t\telse{\n\t\t\treturn $_GET['action'];\n\t\t}\n\t}", "public function getAction()\n {\n $match = $this->_getMatch();\n return $match[1];\n }", "function getAction()\n {\n if (isset($_GET['_px_action'])) {\n return $_GET['_px_action'];\n }\n return $_SERVER['QUERY_STRING'];\n }", "protected function getAction()\n {\n return self::ACTION_TYPE;\n }", "public function getAction()\n\t{\n\t\t\n\t\t$parsed = (array)$this->getAsArray();\n\t\t\n\t\tforeach(array('getPrefix', 'getController') as $method)\n\t\t{\n\t\t\tif( $this->{$method}() )\n\t\t\t{\n\t\t\t\tarray_shift($parsed);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( empty($parsed) )\n\t\t{\n\t\t\t$action = $this->default_action;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$action = $parsed[0];\n\t\t}\n\t\t\n\t\t$prefix = $this->getPrefix();\n\t\t\n\t\tif( $prefix )\n\t\t{\n\t\t\t$action = $prefix . '_' . $action;\n\t\t}\n\t\t\n\t\treturn $action;\n\t\t\n\t}", "public function action(){\n return $this->action;\n }", "public function action()\n {\n return $this->getAttribute('action');\n }", "public function getAction()\n {\n if (is_null($this->_action)) {\n $action = $this->getConfiguration()\n ->get('router.action', 'index');\n if (isset($this->_params['action'])) {\n $action = $this->_params['action'];\n }\n $this->_action = $action;\n }\n return $this->_action;\n }", "public function getAction() : string{\n return $this->action;\n }", "public function get_action() {\n $this->process($this->urls);\n \n if (!empty($this->actionPath)) {\n return $this->actionPath;\n }\n return false;\n }", "public static function method()\n\t{\n\t\treturn self::$router->getAction();\n\t}", "public function getRequestAction()\n {\n return $this->requestAction;\n }", "public function getAction() {\n return $this->_actionData;\n }", "public function Action()\n {\n return $this->action;\n }", "public function get_action() {\r\n\t\treturn esc_url_raw( $this->action ? $this->action : wp_unslash( $_SERVER['REQUEST_URI'] ) );\r\n\t}", "public function action()\n {\n return isset($this->action) ? $this->action : false;\n }", "public function action()\n {\n return $this->action ?: self::ACTION_CAPTURE;\n }", "public function getActionName() {\n\t\treturn $this->action;\n\t}", "function _get_action()\n {\n $retval = preg_quote($this->object->param('action'), '/');\n $retval = strtolower(preg_replace(\"/[^\\\\w]/\", '_', $retval));\n return preg_replace(\"/_{2,}/\", \"_\", $retval) . '_action';\n }", "public function getActionName() {\n\n\t\treturn $this->_action;\n\t}", "public function get_action(): ?string {\n\t\treturn $this->action;\n\t}", "protected function getAction() {}", "public function getAction(): ?string\n {\n return $this->action;\n }", "public function getActionName()\n {\n return $this->_action;\n }", "public function action(): ?string\n {\n $action = $this->parameters()[2] ?? null;\n\n return in_array($action, Belich::getAllowedActions())\n ? $action\n : null;\n }", "public static function get_action() {\n\t\t$user_id = get_current_user_id();\n\t\treturn wpcom_vip_cache_get( \"action_${user_id}\", self::CACHE_GROUP );\n\t}", "public function GetControllerAction () {\n\t\treturn $this->controller . ':' . $this->action;\n\t}", "abstract public function getControllerAction();", "public function getAction()\n {\n $value = $this->get(self::ACTION);\n return $value === null ? (integer)$value : $value;\n }", "public function getAction(): string;", "public function getAction(): string;", "static function get_action_parameter()\r\n {\r\n return self :: PARAM_ACTION;\r\n }", "public function getActionMethod()\n {\n return array_last(explode('@', $this->getActionName()));\n }", "private function getActionName()\n {\n return strtolower($this->_request->getActionName());\n }", "public function getAction();", "public function getAction();", "public function getAction();", "public function getAction();", "public function getAction();", "public function getAction();", "public function getAction();", "public function getAction(): Action {\n return Di::get(Action::class);\n }", "public function get_action() {\n\t\treturn $this->action ? $this->action : 'import';\n\t}", "public function getAction() {}", "public function getAction() {}", "public function getAction() {}", "public function getAction() {}", "public function getActionName()\n {\n return $this->__get(\"action_name\");\n }", "public function getAction($key = null)\n {\n return $this->action;\n }" ]
[ "0.8887953", "0.8509654", "0.84715", "0.84715", "0.84715", "0.8429708", "0.83711696", "0.8359151", "0.83496696", "0.83496696", "0.8343897", "0.83345306", "0.8328094", "0.8328094", "0.83126295", "0.8293938", "0.8289833", "0.8289833", "0.8289833", "0.8289833", "0.8289833", "0.8289833", "0.8289833", "0.8289833", "0.8289833", "0.8289833", "0.8289833", "0.8289833", "0.8289833", "0.8289833", "0.8289833", "0.82833856", "0.8275936", "0.82667774", "0.82509524", "0.8240852", "0.8240852", "0.8240852", "0.8240852", "0.8240852", "0.8237256", "0.82354224", "0.8217157", "0.8214301", "0.81633395", "0.81487197", "0.8135647", "0.8135647", "0.81184417", "0.8025934", "0.7995258", "0.7992059", "0.7986472", "0.7979051", "0.7971077", "0.7960994", "0.7959723", "0.7938822", "0.7928715", "0.7908331", "0.78797525", "0.77587926", "0.77365273", "0.76743", "0.76617897", "0.76561755", "0.7654398", "0.7642549", "0.7634724", "0.7631091", "0.76238286", "0.7620937", "0.76202387", "0.7603184", "0.7583235", "0.755663", "0.75209534", "0.7519691", "0.7509186", "0.74760705", "0.744954", "0.744954", "0.7441677", "0.7407991", "0.7388686", "0.73842025", "0.73842025", "0.73842025", "0.73842025", "0.73842025", "0.73842025", "0.73842025", "0.738157", "0.7370226", "0.73615384", "0.73615384", "0.73615384", "0.73615384", "0.7355117", "0.7343324" ]
0.74459606
82
Get a channel variable
function get_var($value) { global $agi; $r = $agi->get_variable( $value ); if ($r['result'] == 1) { $result = $r['data']; return trim($result); } return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetVar($channel, $variable, $actionId);", "public function getChannel();", "public function getChannel()\n {\n $value = $this->get(self::channel);\n return $value === null ? (integer)$value : $value;\n }", "function ts3client_getChannelVariableAsString($serverConnectionHandlerID, $channelID, $flag, &$result) {}", "public function getChannel()\n {\n \treturn $this->_channel;\n }", "public function getChannel()\n {\n return $this->getData(self::CHANNEL);\n }", "public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }", "public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }", "public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }", "public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }", "public function getChannel()\n {\n return $this->channel;\n }", "public function getChannel()\n {\n return $this->channel;\n }", "public function getChannel(): string\n {\n return $this->channel;\n }", "public function getChannel(): string\n {\n return $this->channel;\n }", "public function getChannel(): string\n {\n return $this->channel;\n }", "public function getChannel()\n\t{\n\t\treturn $this->channel;\n\t}", "public function getChannel(): Channel\n {\n return $this->channel;\n }", "public function getChannel()\n {\n return $this->Channel;\n }", "public function getChannel()\n {\n return $this->Channel;\n }", "function ts3client_getChannelVariableAsInt($serverConnectionHandlerID, $channelID, $flag, &$result) {}", "public function getChannel() {\n return $this->channel;\n }", "public function getChannel(): string {\n\t\t\treturn $this->channel;\n\t\t}", "public function getChannel()\n {\n return $this->channel instanceof ChannelResourceIdentifierBuilder ? $this->channel->build() : $this->channel;\n }", "function channelInfo()\n\t{\n\t\treturn $this->_channel;\n\t}", "public function getEntity() { return $this->channel; }", "public function getChannel()\n {\n if (is_null($this->channel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->channel = ChannelResourceIdentifierModel::of($data);\n }\n\n return $this->channel;\n }", "public function getChannel()\n {\n if (! $this->channel) {\n $this->set();\n }\n\n return $this->channel;\n }", "public function getChannelId()\n {\n return $this->channel_id;\n }", "abstract public function getChannel($additionalInformation);", "private function _getRequestChannel() {\n $td = Request::get('token_data');\n if(isset($td['type']) && $td['type'] == 'channel') {\n return Channel::where('id', $td['channel_id'])->first();\n } else {\n if(!Request::input('channel')) {\n return Response::json([\n 'error' => 'invalid_input',\n 'error_description' => 'No channel specified'\n ], 400);\n }\n\n $uid = Request::input('channel');\n $channel = Channel::where('user_id', Auth::user()->id)->where('uid', $uid)->first();\n if(!$channel)\n return Response::json([\n 'error' => 'not_found',\n 'error_description' => 'Channel not found'\n ], 404);\n else\n return $channel;\n }\n }", "public function getChannel()\n {\n return $this->_access->getChannel();\n }", "function ts3client_setChannelVariableAsString($serverConnectionHandlerID, $channelID, $flag, $value) {}", "public function getChannel()\n {\n return $this->getNodeText('/p:package/p:channel');\n }", "public static function getChannel($channel)\r\n\t{\r\n\t\tif(empty(self::$channels[strtolower($channel)]))\r\n\t\t{\r\n\t\t\t$channel_obj = trim($channel, '#');\r\n\t\t\tself::$channels[strtolower($channel)] = new $channel_obj(strtolower($channel));\r\n\t\t}\r\n\t\t\r\n\t\treturn self::$channels[strtolower($channel)];\r\n\t}", "private function getChannelId() {\n $event = $this->getEvent();\n\n if (isset($event['channel'])) {\n return $event['channel'];\n }\n\n return $event['channel_id'];\n }", "public function getChannel(): ?Channel\n {\n return $this->channel;\n }", "public function channel()\n\t{\n\t\treturn $this->xml->channel;\n\t}", "public function current()\n {\n return $this->channels[$this->key()];\n }", "public static function getChannel()\n {\n $config = Yaml::parseFile(__DIR__.'/../../config.yaml');\n return (isset($config[\"log\"][\"channel\"])) ? $config[\"log\"][\"channel\"] : \"Amarki\";\n }", "public function getById($id){\n\t\t$Channel = \\Channel::find($id); \n\t\treturn $Channel;\n\t}", "function ts3client_getChannelVariableAsUInt64($serverConnectionHandlerID, $channelID, $flag, &$result) {}", "public function getChannelType(): string;", "public function getChannel($identifier)\n {\n $query = Channel::with('category', 'display');\n\n if( is_numeric( $identifier ) ) {\n $query->where('id', $identifier);\n }\n else {\n $query->where('sef_name', $identifier);\n }\n\n return $query->first();\n }", "public function getChannelById($id);", "private static function getChannel(){\n\t\t\tif(!self::$_activeChannel){\n\t\t\t\tif(self::tryConnection(1)){\n\t\t\t\t\tlist(self::$_activeQueue, ,) = self::$_activeChannel->queue_declare(\"\",false,false,true,false);\n\t\t\t\t}\n\n\t\t\t\tself::$_callbacks = array();\n\t\t\t}\n\n\t\t\treturn self::$_activeChannel;\n\t\t}", "public function getChannelId(): Snowflake\n {\n return $this->channel_id;\n }", "public function getChannelHeader()\n {\n return $this->channel_header;\n }", "public function getChannelByName($username);", "public function getChannel($storeId = null);", "public function getChannel()\n {\n if (null === $this->channel) {\n $this->channel = new Channel\\ChannelResource(\n $this->resource->getFirstResource('channel')\n );\n }\n\n return $this->channel;\n }", "function ts3client_setChannelVariableAsInt($serverConnectionHandlerID, $channelID, $flag, $value) {}", "public function getColorChannel($channel) {\n return $this->getColorLib()->setColor($this->getSafeType(), $this->getSafeColor())->getChannel($channel);\n }", "public function getEntityChannel($entity)\n {\n\n if (is_object($entity))\n $entity = $entity->getTable();\n\n $label = SParserString::subToCamelCase($entity);\n\n $orm = $this->getOrm();\n $channel = $orm->getByKey('WbfsysAnnouncementChannel', 'entity_'.$entity );\n\n // wenn es den channel nicht gibt wird der automatisch angelegt\n if (!$channel) {\n $channel->name = SParserString::subToCamelCase($label);\n $channel->access_key = $entity;\n $channel->description = \"Message Channel for Entity \".$label;\n\n $orm->save($channel);\n }\n\n return $channel;\n\n }", "function readChannel () {\n $output = shell_exec(\"\n curl -X GET \\\n 'https://api.go-tellm.com/api/v3/posts/channel?channel=\" . CHANNEL . \"' \\\n -H 'Accept: */*' \\\n -H 'Accept-Encoding: gzip, deflate' \\\n -H 'Authorization: Bearer \" . API_KEY . \"' \\\n -H 'Cache-Control: no-cache' \\\n -H 'Connection: keep-alive' \\\n -H 'Host: api.go-tellm.com' \\\n -H 'cache-control: no-cache'\n \");\n}", "public function getChannel()\n {\n return $this->getComposerJson()->extra->magento_connect->channel;\n }", "public function offsetGet($offset)\n {\n return $this->channels[$offset];\n }", "public function getChannelCode()\n {\n return $this->data['fields']['channel_code'];\n }", "public function channel($channel);", "public function SetVar($channel, $variable, $value);", "public function getDistributionChannel()\n {\n if (is_null($this->distributionChannel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_DISTRIBUTION_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->distributionChannel = ChannelKeyReferenceModel::of($data);\n }\n\n return $this->distributionChannel;\n }", "public function getDistributionChannel()\n {\n if (is_null($this->distributionChannel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_DISTRIBUTION_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->distributionChannel = ChannelResourceIdentifierModel::of($data);\n }\n\n return $this->distributionChannel;\n }", "public function get_variable() {\n\t\treturn $this->variable;\n\t}", "protected function _get_channel_title() {\n\t\t// Lookup the channel title from the database\n\t\t$channel_id = $this->EE->input->get('channel_id');\n\t\t$channel = $this->EE->db->select('channel_title')->where('channel_id', $channel_id)\n\t\t\t\t\t\t\t\t->get('channels')->row();\n\t\t\n\t\t// Return it!\n\t\treturn $channel->channel_title;\n\t}", "public function getDistributionChannel()\n {\n return $this->distributionChannel instanceof ChannelReferenceBuilder ? $this->distributionChannel->build() : $this->distributionChannel;\n }", "public function getDeliveryChannel() {\n return $this->params[\"original\"][\"delivery_channel\"];\n }", "public function channel() {\n if(is_null($this->channel)) {\n $this->channel = new Channel($this->connect()->connect([]));\n }\n \n return $this->channel;\n }", "function channel(): Channel\n {\n return new Channel();\n }", "public function getDestinationChannel();", "function get_channel_id_pref($id)\r\n\t{\r\n\t\t//cache?\r\n\t\tif (isset($this->cache['channel_ids'][$id]))\r\n\t\t{\r\n\t\t\treturn $this->cache['channel_ids'][$id];\r\n\t\t}\r\n\r\n\t\t$channel_data = $this->get_channel_ids();\r\n\r\n\t\tif ( isset($channel_data[$id]) )\r\n\t\t{\r\n\t\t\t$this->cache['channel_ids'][$id] = $channel_data[$id];\r\n\t\t\treturn $this->cache['channel_ids'][$id];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn array();\r\n\t\t}\r\n\t}", "function get_channel_entry()\n\t{\n\t\t// get variables\n\t\t$vars = $this->_get_vars('get', array('entry_id'));\n\t\t\n\t\t// start hook\n\t\t$vars = $this->_hook('get_channel_entry_start', $vars);\n\n\t\t// load channel data library\n\t\t$this->_load_library('channel_data');\n\n\t\t$data = $this->EE->channel_data_lib->get_channel_entry($vars['entry_id'])->result();\n\t\t\n\t\t// expand file fields\n\t\tif (count($data)) \n\t\t{\n\t\t\t$channel_id = $data[0]->channel_id;\n\t\t\t$data = $this->_expand_file_fields($channel_id, $data);\n\t\t}\n\n\t\t// end hook\n\t\t$data = $this->_hook('get_channel_entry_end', $data);\n\n\t\t$this->response($data);\n\t}", "public function getSubchannelId()\n {\n return $this->subchannelId;\n }", "public function getNotificationChannel($channel)\n {\n $channel_id = NotificationChannel::where('name', $channel)->first()->id;\n\n return UserNotificationChannel::where('user_id', Auth::id())->where('channel_id', $channel_id)->first();\n }", "public function get_channels()\n {\n }", "function get_setting($meta_key, $channel = \"all\")\n {\n $setting = new \\Modules\\Admin\\Entities\\Setting();\n return $setting->get_setting_value($meta_key, $channel);\n }", "public function getName()\n {\n return 'sample.channel';\n }", "public function getSalesChannel()\n {\n return $this->_fields['SalesChannel']['FieldValue'];\n }", "function get_channel_id($entry_id)\n\t{\t\n\t\t$this->EE->db->select('channel_id');\n\t\t$this->EE->db->where('entry_id', $entry_id);\n\t\t$query = $this->EE->db->get('channel_titles');\n\t\t$row = $query->row();\n\t\t\n\t\treturn ($row ? $row->channel_id : '');\n\t}", "public function get($variable);", "public static function adminChannel()\n\t{\n\t\tif ( ! $current = static::$adminChannel)\n\t\t{\n\t\t\t$channels = \\App::make('krustr.channels');\n\t\t\t$slug = \\Input::get('channel', \\Request::segment(3));\n\t\t\t$current = $channels->find($slug);\n\t\t}\n\n\t\treturn $current;\n\t}", "public function get(string $variableName);", "public function getChannelByIdentifier($identifier)\n {\n $query = Channel::with('subChannel.category', 'parent', 'category', 'display', 'subChannel.display');\n\n # if an integer was passed through then grab the channel by its ID\n if( is_numeric($identifier) ) {\n $query->where('id', $identifier);\n }\n # then grab the channel by its sef_name field\n else {\n $query->where('sef_name', $identifier);\n }\n\n $result = $query->active()->get()->first();\n\n # if we didn't find anything then say so.\n if( ! $result) {\n return false;\n }\n\n # if there is a parent element and that parent channel is inactive then return \n # nothing as the top level channel has been turned off\n if( isset($result->parent->id) && ! $result->parent->is_active ) {\n return false;\n }\n\n # finally, return an array representation of the channel\n return $result->toArray();\n }", "public function channel()\n {\n }", "public function getStructure()\n\t{\n\t\treturn $this->Channel;\n\t}", "public function getSupplyChannel()\n {\n if (is_null($this->supplyChannel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_SUPPLY_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->supplyChannel = ChannelKeyReferenceModel::of($data);\n }\n\n return $this->supplyChannel;\n }", "public function getUserChannel($user)\n {\n\n $orm = $this->getOrm();\n $channel = $orm->getByKey('WbfsysAnnouncementChannel', 'user_'.$user->getId() );\n\n // wenn es den channel nicht gibt wird der automatisch angelegt\n if (!$channel) {\n $channel = $orm->newEntity('WbfsysAnnouncementChannel');\n\n $channel->name = 'User '.$user->getId();\n $channel->access_key = 'user_'.$user->getId();\n $channel->description = \"Message Channel for user \".$user->getFullName();\n\n $orm->save($channel);\n\n // ok nun muss er noch subscribed werden\n $channelSubscription = $orm->newEntity('WbfsysAnnouncementChannel');\n $channelSubscription->id_user = $user->getId();\n $channelSubscription->id_channel = $channel;\n\n $orm->save($channelSubscription);\n\n }\n\n return $channel;\n\n }", "function ts3client_getParentChannelOfChannel($serverConnectionHandlerID, $channelID, &$result) {}", "public function channel()\n {\n return $this->belongsTo('App\\Models\\Channel');\n }", "function ts3client_setChannelVariableAsUInt64($serverConnectionHandlerID, $channelID, $flag, $value) {}", "public function generateChannel(){\n\t\t$tempArray = array();\n\t\tpreg_match('/\\+(.*?)@/', $this->recipient, $tempArray);\n\t\t$this->channel = $tempArray[1];\n\t}", "public function channel()\n {\n return $this->belongsTo('App\\Channel');\n }", "public function getSupplyChannel()\n {\n if (is_null($this->supplyChannel)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_SUPPLY_CHANNEL);\n if (is_null($data)) {\n return null;\n }\n\n $this->supplyChannel = ChannelResourceIdentifierModel::of($data);\n }\n\n return $this->supplyChannel;\n }", "public function getVariable(): string\n {\n return $this->variable;\n }", "protected function channel()\n {\n return $this->app->bound('env') ? $this->app->environment() : 'production';\n }", "public static function find($id)\n {\n return Channel::find($id);\n }", "public function channel($channel)\n {\n return $this->setChannel($channel);\n }", "function get_valid_channel($chan) {\r\n\t\tif (!$chan) return null;\r\n\t\tif (mb_check_encoding($chan, 'ASCII')) {\r\n\t\t\treturn $chan;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public function channel()\n {\n return $this->belongsTo(\"App\\Channel\");\n }", "public function getAllChannels()\n {\n return $this->_channel;\n }", "public function getFulfillmentChannel()\n {\n return $this->_fields['FulfillmentChannel']['FieldValue'];\n }", "public function channel(){\n\n return $this->belongsTo('App\\Channel');\n }", "#[CustomOpenApi\\Operation(id: 'channelShow', tags: [Tags::Channel, Tags::V1])]\n #[OpenApi\\Parameters(factory: DefaultHeaderParameters::class)]\n #[CustomOpenApi\\Response(resource: ChannelResource::class, statusCode: 200)]\n public function show(Channel $channel): ChannelResource\n {\n return new ChannelResource($channel);\n }" ]
[ "0.7428846", "0.72802985", "0.71348524", "0.7086765", "0.7054384", "0.6938012", "0.6843093", "0.684271", "0.684271", "0.684271", "0.67071253", "0.67071253", "0.6703935", "0.6703935", "0.6703935", "0.66645753", "0.66456264", "0.66388136", "0.66388136", "0.66324604", "0.6622942", "0.6575725", "0.6524124", "0.6507858", "0.64033127", "0.63999015", "0.6330642", "0.63170534", "0.62758636", "0.62588674", "0.62342215", "0.618244", "0.6152448", "0.6126218", "0.6111269", "0.6109817", "0.6051063", "0.6038929", "0.6002703", "0.5995911", "0.5985473", "0.5975271", "0.59571093", "0.5942831", "0.59360313", "0.58886594", "0.58789194", "0.5872368", "0.5845658", "0.5766244", "0.57605505", "0.5740269", "0.57193506", "0.57123977", "0.5709465", "0.57019633", "0.5701236", "0.5699587", "0.5693311", "0.56930006", "0.56572634", "0.56566715", "0.5642215", "0.5611458", "0.5600994", "0.5595792", "0.55853397", "0.55646676", "0.5557778", "0.5536687", "0.55123734", "0.5479196", "0.5473567", "0.54563785", "0.5454221", "0.54505706", "0.5448841", "0.5444741", "0.54358286", "0.542942", "0.5423634", "0.5418812", "0.5418219", "0.5411289", "0.540462", "0.5398215", "0.5349272", "0.5339278", "0.53334016", "0.5318169", "0.5310467", "0.53055257", "0.5276947", "0.5275078", "0.5270347", "0.5255424", "0.5241744", "0.5236999", "0.52342737", "0.52253973", "0.52246183" ]
0.0
-1
Display a listing of the resource. ABA
public function index(Request $request) { $titulo = "Localidades"; //Vamos al indice y creamos una paginación de 4 elementos y con ruta localidades $paises = Paises::getPaisesFromPaisIdToList(0, true); $provincias = Array(); $localidades = Localidades::getLocalidades($request, config("opciones.paginacion")); return view("localidades.index", compact('localidades', 'provincias', 'paises', 'titulo')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listing();", "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 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 }", "function index() {\n\t\t$this->show_list();\n\t}", "function _resource_list($resource){\n\t_resource_list_offset($resource, '1', '20');\n}", "public function actionList() {\n $this->_getList();\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\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 }", "function listing() {\r\n\r\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function 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 actionRestList() {\n\t $this->doRestList();\n\t}", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function detailAction() {\n\n //GET THE LIST ITEM\n $this->view->listDetail = Engine_Api::_()->getItem('list_listing',(int) $this->_getParam('id'));\n }", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function listAction() {}", "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\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 show(Resource $resource)\n {\n //\n }", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "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 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 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}", "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 listAction() {\n\n\t}", "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 //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function listView(): void\n {\n $this->_data = $this->_entity->fetch();\n if (!$this->special) {\n $newData = $this->_builder->submitCreate();\n if ($newData) {\n array_push($this->_data, $newData);\n }\n }\n require VF . \"{$this->route}/list.php\";\n require VF . \"{$this->route}/create.php\";\n }", "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 printlist(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t$this->title = 'Media list';\t\t\r\n\t\treturn $this->renderWith(array('Media_printresults','Print'));\r\n\t}", "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 listdataAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('%');\n }", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function displayListAction() {\n $params = t3lib_div::_GET('libconnect');\n $cObject = t3lib_div::makeInstance('tslib_cObj');\n\n //get PageID\n $Pid = intval($GLOBALS['TSFE']->id);\n \n //include CSS\n $this->decideIncludeCSS();\n\n if ((!empty($params['subject'])) || (!empty($params['notation']))) {//choosed subject after start point\n $config['detailPid'] = $this->settings['flexform']['detailPid'];\n\n $options['index'] = $params['index'];\n $options['sc'] = $params['sc'];\n $options['lc'] = $params['lc'];\n $options['notation'] = $params['notation'];\n $options['colors'] = $params['colors'];\n\n //it´s for there is not NULL in the request or there will be a problem\n if(!isset($params['subject'])){\n $params['subject'] = \"\";\n }\n $liste = $this->ezbRepository->loadList(\n $params['subject'], \n $options,\n $config\n );\n\n $listURL = $cObject->getTypolink_URL( $Pid );\n\n $formParameter = array(\n 'libconnect[subject]' => $params['subject'],\n 'libconnect[index]' => $params['index'],\n 'libconnect[sc]' => $params['sc'],\n 'libconnect[lc]' => $params['lc'],\n 'libconnect[notation]' => $params['notation']\n );\n\n //variables for template\n $this->view->assign('journals', $liste);\n $this->view->assign('listUrl', $listURL);\n $this->view->assign('colors', $params['colors']);\n $this->view->assign('formParameter', $formParameter);\n\n } else if (!empty($params['search'])) {//search results\n $config['detailPid'] = $this->settings['flexform']['detailPid'];\n\n $journals = array();\n \n if(empty($params['search']['selected_colors'])){\n $params['search']['selected_colors'] = array(\n 1 => 1,\n 2 => 2,\n 4 => 4,\n 6 => 6\n );\n }\n \n $journals = $this->ezbRepository->loadSearch($params['search'], $journals['colors'], $config); \n\n if(!empty($params['search']['selected_colors'])){\n //damit selected_colors nicht in verstekten Formularfeldern auftauchen\n unset($params['search']['selected_colors']);\n }\n\n //change view\n $controllerContext = $this->buildControllerContext();\n $controllerContext->getRequest()->setControllerActionName('displaySearch');\n $this->view->setControllerContext($controllerContext);\n\n //variables for template\n $this->view->assign('journals', $journals);\n $this->view->assign('listUrl', $listURL);\n $this->view->assign('colors', $params['colors']);\n $this->view->assign('formParameter', $params['search']);\n } else {//start point\n $liste = $this->ezbRepository->loadOverview();\n\n //change view\n $controllerContext = $this->buildControllerContext();\n $controllerContext->getRequest()->setControllerActionName('displayOverview');\n $this->view->setControllerContext($controllerContext);\n\n //variables for template\n $this->view->assign('list', $liste);\n }\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 renderListContent() {}", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function listagemAction()\n\t{\n\t\n\t}", "public function indexAction() {\n\n\t\t//GET NAVIGATION\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('list_admin_main', array(), 'list_admin_main_viewlist');\n\n\t\t//MAKE FORM\n $this->view->formFilter = $formFilter = new List_Form_Admin_Manage_Filter();\n\n\t\t//GET PAGE NUMBER\n $page = $this->_getParam('page', 1);\n\n\t\t//GET USER TABLE NAME\n $tableUserName = Engine_Api::_()->getItemTable('user')->info('name');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = $tableCategory = Engine_Api::_()->getDbtable('categories', 'list');\n\n\t\t//GET LISTING TABLE\n $tableListing = Engine_Api::_()->getDbtable('listings', 'list');\n $listingTableName = $tableListing->info('name');\n\n\t\t//MAKE QUERY\n $select = $tableListing->select()\n ->setIntegrityCheck(false)\n ->from($listingTableName)\n ->joinLeft($tableUserName, \"$listingTableName.owner_id = $tableUserName.user_id\", 'username');\n\n $values = array();\n\n if ($formFilter->isValid($this->_getAllParams())) {\n $values = $formFilter->getValues();\n }\n foreach ($values as $key => $value) {\n\n if (null == $value) {\n unset($values[$key]);\n }\n }\n\n // searching\n $this->view->owner = '';\n $this->view->title = '';\n $this->view->sponsored = '';\n $this->view->approved = '';\n $this->view->featured = '';\n $this->view->status = '';\n $this->view->listingbrowse = '';\n $this->view->category_id = '';\n $this->view->subcategory_id = '';\n $this->view->subsubcategory_id = '';\n\n if (isset($_POST['search'])) {\n\n if (!empty($_POST['owner'])) {\n $this->view->owner = $_POST['owner'];\n $select->where($tableUserName . '.username LIKE ?', '%' . $_POST['owner'] . '%');\n }\n\n if (!empty($_POST['title'])) {\n $this->view->title = $_POST['title'];\n $select->where($listingTableName . '.title LIKE ?', '%' . $_POST['title'] . '%');\n }\n\n if (!empty($_POST['sponsored'])) {\n $this->view->sponsored = $_POST['sponsored'];\n $_POST['sponsored']--;\n\n $select->where($listingTableName . '.sponsored = ? ', $_POST['sponsored']);\n }\n\n if (!empty($_POST['approved'])) {\n $this->view->approved = $_POST['approved'];\n $_POST['approved']--;\n $select->where($listingTableName . '.approved = ? ', $_POST['approved']);\n }\n\n if (!empty($_POST['featured'])) {\n $this->view->featured = $_POST['featured'];\n $_POST['featured']--;\n $select->where($listingTableName . '.featured = ? ', $_POST['featured']);\n }\n\n if (!empty($_POST['status'])) {\n $this->view->status = $_POST['status'];\n $_POST['status']--;\n $select->where($listingTableName . '.closed = ? ', $_POST['status']);\n }\n\n if (!empty($_POST['listingbrowse'])) {\n $this->view->listingbrowse = $_POST['listingbrowse'];\n $_POST['listingbrowse']--;\n if ($_POST['listingbrowse'] == 0) {\n $select->order($listingTableName . '.view_count DESC');\n } else {\n $select->order($listingTableName . '.creation_date DESC');\n }\n }\n\n if (!empty($_POST['category_id']) && empty($_POST['subcategory_id']) && empty($_POST['subsubcategory_id'])) {\n $this->view->category_id = $_POST['category_id'];\n $select->where($listingTableName . '.category_id = ? ', $_POST['category_id']);\n } \n\t\t\telseif (!empty($_POST['category_id']) && !empty($_POST['subcategory_id']) && empty($_POST['subsubcategory_id'])) {\n $this->view->category_id = $_POST['category_id'];\n $this->view->subcategory_id = $_POST['subcategory_id'];\n $this->view->subcategory_name = $tableCategory->getCategory($this->view->subcategory_id)->category_name;\n \n $select->where($listingTableName . '.category_id = ? ', $_POST['category_id'])\n ->where($listingTableName . '.subcategory_id = ? ', $_POST['subcategory_id']);\n }\n\t\t\telseif(!empty($_POST['category_id']) && !empty($_POST['subcategory_id']) && !empty($_POST['subsubcategory_id'])) {\n $this->view->category_id = $_POST['category_id'];\n $this->view->subcategory_id = $_POST['subcategory_id'];\n $this->view->subsubcategory_id = $_POST['subsubcategory_id'];\n $this->view->subcategory_name = $tableCategory->getCategory($this->view->subcategory_id)->category_name;\n $this->view->subsubcategory_name = $tableCategory->getCategory($this->view->subsubcategory_id)->category_name;\n \n $select->where($listingTableName . '.category_id = ? ', $_POST['category_id'])\n ->where($listingTableName . '.subcategory_id = ? ', $_POST['subcategory_id'])\n\t\t\t\t\t\t->where($listingTableName . '.subsubcategory_id = ? ', $_POST['subsubcategory_id']);\n\t\t\t}\n\t\t\t\n }\n\n $values = array_merge(array(\n 'order' => 'listing_id',\n 'order_direction' => 'DESC',\n ), $values);\n\n $this->view->assign($values);\n\n $select->order((!empty($values['order']) ? $values['order'] : 'listing_id' ) . ' ' . (!empty($values['order_direction']) ? $values['order_direction'] : 'DESC' ));\n\n //MAKE PAGINATOR\n $this->view->paginator = Zend_Paginator::factory($select);\n $this->view->paginator->setItemCountPerPage(40);\n $this->view->paginator = $this->view->paginator->setCurrentPageNumber($page);\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function show(Resource $resource)\n {\n // not available for now\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function listRegionAction()\n {\n // init toolbar controls here, because we need to show the panel.\n $this->initToolbarControls();\n $region = $this->createListInnerRegion($_REQUEST);\n $this->assign('listInnerRegion', $region);\n\n // please note that we will get all items in list region since we don't have constraint\n $collection = $this->getCollection();\n\n $this->assignCRUDVars([\n // so here is the number of total items\n 'NumberOfTotalItems' => $collection->queryCount(),\n ]);\n\n // If reactApp (CRUDListApp) is defined, render a template to initialize the React App\n if ($this->reactListApp) {\n return $this->render($this->findTemplatePath('react/list.html'), [\n 'ReactElementId' => uniqid($this->reactListApp),\n 'ReactAppName' => $this->reactListApp,\n 'ReactAppConfig' => $this->buildReactListAppConfig(),\n ]);\n }\n return $this->render($this->findTemplatePath('list.html'), []);\n }", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function listAction()\n {\n // some logic\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $ressources = $em->getRepository('AppBundle:Ressource')->findAll();\n\n return $this->render('ressource/index.html.twig', array(\n 'ressources' => $ressources,\n ));\n }", "public function 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 listAction() {\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n $photo_id = (int) $this->_getParam('photo_id');\n\n // CHECK AUTHENTICATION\n // CHECK AUTHENTICATION\n if (Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n $sitereview = $subject = Engine_Api::_()->core()->getSubject('sitereview_listing');\n } else if (Engine_Api::_()->core()->hasSubject('sitereview_photo')) {\n $photo = $subject = Engine_Api::_()->core()->getSubject('sitereview_photo');\n $listing_id = $photo->listing_id;\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n }\n $bodyResponse = $tempResponse = array();\n $listing_singular_uc = ucfirst($this->_listingType->title_singular);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, \"edit_listtype_$sitereview->listingtype_id\");\n $listingtype_id = $this->_listingType->listingtype_id;\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n $photoCount = Engine_Api::_()->getItem('sitereviewpaidlisting_package', $sitereview->package_id)->photo_count;\n $paginator = $sitereview->getSingletonAlbum()->getCollectiblesPaginator();\n\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $allowed_upload_photo = $allowed_upload_photo;\n if (empty($photoCount))\n $allowed_upload_photo = $allowed_upload_photo;\n elseif ($photoCount <= $paginator->getTotalItemCount())\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = $allowed_upload_photo;\n\n //GET ALBUM\n $album = $sitereview->getSingletonAlbum();\n\n\n /* RETURN THE LIST OF IMAGES, IF FOLLOWED THE FOLLOWING CASES: \n * - IF THERE ARE GET METHOD AVAILABLE.\n * - iF THERE ARE NO $_FILES AVAILABLE.\n */\n if (empty($_FILES) && $this->getRequest()->isGet()) {\n $requestLimit = $this->getRequestParam(\"limit\", 10);\n $page = $requestPage = $this->getRequestParam(\"page\", 1);\n\n //GET PAGINATOR\n $album = $sitereview->getSingletonAlbum();\n $paginator = $album->getCollectiblesPaginator();\n\n $bodyResponse[' totalPhotoCount'] = $totalItemCount = $bodyResponse['totalItemCount'] = $paginator->getTotalItemCount();\n $paginator->setItemCountPerPage($requestLimit);\n $paginator->setCurrentPageNumber($requestPage);\n // Check the Page Number for pass photo_id.\n if (!empty($photo_id)) {\n for ($page = 1; $page <= ceil($totalItemCount / $requestLimit); $page++) {\n $paginator->setCurrentPageNumber($page);\n $tmpGetPhotoIds = array();\n foreach ($paginator as $photo) {\n $tmpGetPhotoIds[] = $photo->photo_id;\n }\n if (in_array($photo_id, $tmpGetPhotoIds)) {\n $bodyResponse['page'] = $page;\n break;\n }\n }\n }\n\n if ($totalItemCount > 0) {\n foreach ($paginator as $photo) {\n $tempImages = $photo->toArray();\n\n // Add images\n $getContentImages = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($photo);\n $tempImages = array_merge($tempImages, $getContentImages);\n\n $tempImages['user_title'] = $photo->getOwner()->getTitle();\n $tempImages['likes_count'] = $photo->likes()->getLikeCount();\n $tempImages['is_like'] = ($photo->likes()->isLike($viewer)) ? 1 : 0;\n \n //Sitereaction Plugin work start here\n if (Engine_Api::_()->getApi('Siteapi_Feed', 'advancedactivity')->isSitereactionPluginLive()) {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitereaction') && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereaction.reaction.active', 1)) {\n $popularity = Engine_Api::_()->getApi('core', 'sitereaction')->getLikesReactionPopularity($photo);\n $feedReactionIcons = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getLikesReactionIcons($popularity, 1);\n $tempImages['reactions']['feed_reactions'] =$tempImages['feed_reactions'] = $feedReactionIcons;\n\n if (isset($viewer_id) && !empty($viewer_id)) {\n $myReaction = $photo->likes()->getLike($viewer);\n if (isset($myReaction) && !empty($myReaction) && isset($myReaction->reaction) && !empty($myReaction->reaction)) {\n $myReactionIcon = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getIcons($myReaction->reaction, 1);\n $tempImages['reactions']['my_feed_reaction'] =$tempImages['my_feed_reaction'] = $myReactionIcon;\n }\n }\n }\n }\n //Sitereaction Plugin work end here\n if (!empty($viewer) && ($tempMenu = $this->getRequestParam('menu', 1)) && !empty($tempMenu)) {\n $menu = array();\n\n if ($photo->user_id == $viewer_id) {\n $menu[] = array(\n 'label' => $this->translate('Edit'),\n 'name' => 'edit',\n 'url' => 'listings/photo/edit/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Delete'),\n 'name' => 'delete',\n 'url' => 'listings/photo/delete/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n }\n $menu[] = array(\n 'label' => $this->translate('Share'),\n 'name' => 'share',\n 'url' => 'activity/index/share',\n 'urlParams' => array(\n \"type\" => $photo->getType(),\n \"id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Report'),\n 'name' => 'report',\n 'url' => 'report/create/subject/' . $photo->getGuid()\n );\n\n $menu[] = array(\n 'label' => $this->translate('Make Profile Photo'),\n 'name' => 'make_profile_photo',\n 'url' => 'members/edit/external-photo',\n 'urlParams' => array(\n \"photo\" => $photo->getGuid()\n )\n );\n\n $tempImages['menu'] = $menu;\n }\n\n if (isset($tempImages) && !empty($tempImages))\n $bodyResponse['images'][] = $tempImages;\n }\n }\n $bodyResponse['canUpload'] = $allowed_upload_photo;\n $this->respondWithSuccess($bodyResponse, true);\n } else if (isset($_FILES) && $this->getRequest()->isPost()) { // UPLOAD IMAGES TO RESPECTIVE EVENT\n if (empty($viewer_id) || empty($allowed_upload_photo))\n $this->respondWithError('unauthorized');\n $tablePhoto = Engine_Api::_()->getDbtable('photos', 'sitereview');\n $db = $tablePhoto->getAdapter();\n $db->beginTransaction();\n\n try {\n $viewer = Engine_Api::_()->user()->getViewer();\n $album = $sitereview->getSingletonAlbum();\n $rows = $tablePhoto->fetchRow($tablePhoto->select()->from($tablePhoto->info('name'), 'order')->order('order DESC')->limit(1));\n $order = 0;\n if (!empty($rows)) {\n $order = $rows->order + 1;\n }\n $params = array(\n 'collection_id' => $album->getIdentity(),\n 'album_id' => $album->getIdentity(),\n 'listing_id' => $sitereview->getIdentity(),\n 'user_id' => $viewer->getIdentity(),\n 'order' => $order\n );\n $photoCount = count($_FILES);\n if (isset($_FILES['photo']) && $photoCount == 1) {\n $photo_id = Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $_FILES['photo'])->photo_id;\n if (!$sitereview->photo_id) {\n $sitereview->photo_id = $photo_id;\n $sitereview->save();\n }\n } else if (!empty($_FILES) && $photoCount > 1) {\n foreach ($_FILES as $photo) {\n Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $photo);\n }\n }\n\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n }\n }\n }", "public function carrouselListAction()\n {\n $listFilter = new Llv_Services_Cms_Filter_Carrousel();\n// $listFilter->online = true;\n $listFilter->includeDeleted = false;\n $this->view->assign('list', Llv_Context_Cms::getInstance()->carrouselGetList($listFilter));\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "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\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function show(ResourceManagement $resourcesManagement)\n {\n //\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 // 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 Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function liste()\n {\n $discs = $this->LoadModel('Disc');\n $discDetail = $discs->info_record();\n $this->render('liste', [\n 'discs' => $discDetail\n ]);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Images 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}", "public function show_list()\n {\n $this->output('Workstatus/v_workstatus_ajax');\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 {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n //\n $persona=Persona::paginate(10);\n return PersonaResource::collection($persona);\n }", "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 showAllActionGet() : object\n {\n $title = \"Movie database | oophp\";\n\n $this->app->db->connect();\n $sql = \"SELECT * FROM movie;\";\n $res = $this->app->db->executeFetchAll($sql);\n\n $this->app->page->add(\"movie/show-all\", [\n \"res\" => $res,\n ]);\n\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }", "public function listAll()\n\t{\n\t\t$data['auditorias'] = $this->relatorio_model->listaAuditorias(1);\n\n\t\t$data['ncs'] = $this->relatorio_model->listaNCs(1);\n\n\t\t$data['acs'] = $this->relatorio_model->listaACs(1);\n\n\t\t$data['main_content'] = 'relatorio/relatorio_view';\n\t\t\n\t\t// Envia todas as informações para tela //\n\t\t$this->parser->parse('template', $data);\n\t}", "function listContent()\n {\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\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(){\n\n\t}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n return $this->setNoRender();\n }\n\n //GET SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject('sitereview_listing');\n Engine_Api::_()->sitereview()->setListingTypeInRegistry($sitereview->listingtype_id);\n $sitereviewPhotoCarousel = Zend_Registry::isRegistered('sitereviewPhotoCarousel') ? Zend_Registry::get('sitereviewPhotoCarousel') : null;\n $this->view->listingType = $listingType = Zend_Registry::get('listingtypeArray' . $sitereview->listingtype_id);\n $this->view->listingtype_id = $sitereview->listingtype_id;\n $this->view->album = $album = $sitereview->getSingletonAlbum();\n $this->view->photo_paginator = $photo_paginator = $album->getCollectiblesPaginator();\n $this->view->total_images = $photo_paginator->getTotalItemCount();\n $minMum = $this->_getParam('minMum', 0);\n \n if (empty($this->view->total_images) || $this->view->total_images < $minMum || empty($sitereviewPhotoCarousel)) {\n return $this->setNoRender();\n }\n \n $this->view->itemCount = $itemCount = $this->_getParam('itemCount', 3);\n $this->view->includeInWidget = $this->_getParam('includeInWidget', null);\n $photo_paginator->setItemCountPerPage(100);\n \n if ($this->view->includeInWidget) {\n $this->getElement()->removeDecorator('Title');\n $this->getElement()->removeDecorator('Container');\n }\n }", "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 $this->user->recipeLists()->get(['title', 'id']);\n }", "function list()\n {\n if($this->checkAccess('permission.list') == 1)\n {\n $this->loadAccessRestricted();\n }\n else\n { \n \n $data['permissionRecords'] = $this->permission_model->permissionListing();\n \n $this->global['pageTitle'] = 'School : Permission Listing';\n \n $this->loadViews(\"permission/list\", $this->global, $data, NULL);\n }\n }", "function item_listing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $ret = array(\n 'content' => '',\n 'status' => 'fail'\n );\n if (!empty($_POST)) {\n $id = $_POST['id'];\n $searchData = $_POST['searchData'];\n $searchData['kind'] = 1;\n $searchData['login_user'] = $this->login_id;\n\n switch ($id) {\n case 1:\n $header = array(\"序号\", \"账号\", \"姓名\", \"角色\", \"新增时间\", \"操作\");\n $cols = 6;\n\n $contentList = $this->user_model->getItems($searchData);\n $footer = (count($contentList) == 0 || !isset($contentList)) ? $footer = \"没有数据.\" : '';\n break;\n }\n\n // end get\n $ret['header'] = $this->output_header($header);\n $ret['content'] = $this->output_content($contentList, $id);\n $ret['footer'] = $this->output_footer($footer, $cols);\n $ret['status'] = 'success';\n }\n echo json_encode($ret);\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 index() {\n\t\t$data = $this->load_module_info ();\n\t\t\n\t\t$this->layout->display_admin ( $this->folder . $this->module . \"-list\", $data );\n\t}", "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 return ProductResource::collection(Product::paginate(15));\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$params = $this->getInput(array('status'));\n\t\tif ($params['status']) $search['status'] = $params['status'];\n\t\t\n\t\tlist($total, $result) = Activity_Service_ShareQq::getList($page, $this->perpage, $search);\n\t\t\n\t\t$this->assign('result', $result);\n\t\t$this->assign('total', $total);\n\t\t$this->assign('search', $search);\n\t\t$this->cookieParams();\n\t\t$url = $this->actions['listUrl'] .'/?'. http_build_query($params) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $this->perpage, $url));\n\t}", "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 listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function indexAction() {\n\t\t$viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n\t\tif(empty($viewer_id)) {\n\t\t\treturn $this->setNoRender();\n }\n\n\t\t//DONT RENDER IF SUBJECT IS NOT SET\n if (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n\n\t\t//GET LIST SUBJECT\n\t\t$subject = Engine_Api::_()->core()->getSubject();\n\t\t$this->view->resource_type = $resource_type = $subject->getType(); \n\t\t$this->view->resource_id = $resource_id = $subject->getIdentity();\n\t\t$seaocoreLike = Engine_Api::_()->getApi('like', 'seaocore');\n $this->view->paginator = $paginator = $seaocoreLike->peopleLike($resource_type, $resource_id);\n\n // Set item count per page and current page number\n $this->view->paginator = $paginator->setItemCountPerPage(10)->setCurrentPageNumber($this->_getParam('page', 1));\n $this->_childCount = $paginator->getTotalItemCount();\n\n if($paginator->getTotalItemCount() <= 0 ) \n return $this->setNoRender();\n\n\t}", "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\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "public function indexAction() {\n\t\t$this->_model->where_clause(NULL);\n\n\t\tif(!isset($this->params['page'])) {\n\t\t\tself::$params['page'] = 1;\n\t\t} \n\n\t\t$this->_view->data['info'] = $this->_model->getPage($this->params['page'], $this->config->pagination_limit);\n\t\t$this->_view->data['total_items'] = $this->_model->getCount();\n\t\t$this->addModuleTemplate($this->module, 'index');\n\n\t}", "public function indexAction()\n {\n\n $manager = $this->container->get('app_manager_listkdo');\n $data = array(\n 'manager' => $manager,\n 'dir' => 'AppBundle:ListKdo',\n 'show' => 'appbundle_listkdo_show',\n 'edit' => 'appbundle_listkdo_edit'\n );\n\n return $this->gridList($data);\n }", "public function listAction()\n {\t\t\n $this->_helper->viewRenderer->setNoRender(true);\n\n $params = $this->_request->getPost(); \n\t\t$data = $this->_model->getList($params);\n\t\tdie(json_encode($data));\n }" ]
[ "0.74885225", "0.7397914", "0.72208273", "0.72022533", "0.7049639", "0.7005272", "0.69774437", "0.6973213", "0.6930951", "0.69288224", "0.6927145", "0.69098985", "0.68969554", "0.685392", "0.68146104", "0.68001586", "0.6759699", "0.67443204", "0.67428577", "0.67415184", "0.67396665", "0.67358524", "0.6728808", "0.66775894", "0.66697747", "0.66600484", "0.6637348", "0.6625197", "0.661431", "0.660541", "0.6604585", "0.6589857", "0.6574669", "0.65541196", "0.65520304", "0.655123", "0.6536945", "0.65134144", "0.65129924", "0.6505937", "0.6497516", "0.6495799", "0.64853317", "0.6472389", "0.64634734", "0.6458974", "0.64555544", "0.64539176", "0.6449946", "0.6447953", "0.6446431", "0.6438799", "0.64377123", "0.64293754", "0.6428426", "0.64248806", "0.64244366", "0.6422181", "0.6414585", "0.6409304", "0.6399591", "0.6397366", "0.6393369", "0.63918763", "0.6391799", "0.63845843", "0.638362", "0.6380283", "0.6351697", "0.6351579", "0.6350972", "0.6348925", "0.63448733", "0.63398725", "0.63398725", "0.63398725", "0.63373506", "0.6333453", "0.6332193", "0.6328348", "0.6327234", "0.63265866", "0.6324881", "0.6324722", "0.632198", "0.6320366", "0.6316965", "0.6311636", "0.6310592", "0.6306373", "0.6306088", "0.6302205", "0.63007486", "0.6296407", "0.629574", "0.62927985", "0.6290054", "0.6284867", "0.6281899", "0.6280681", "0.6279444" ]
0.0
-1
Show the form for creating a new resource.
public function create() { $titulo = "Nueva localidad"; $localidad = new Localidades(); $paises = Paises::getPaisesFromPaisIdToList(); $provincias = Array(); return view('localidades.nuevo', compact('localidad', 'provincias', 'paises', 'titulo')); }
{ "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
Show the form for editing the specified resource.
public function edit($id) { //Título Vista $titulo = "Modificar Localidad"; $localidad = Localidades::find($id); if ($localidad == null) { return Redirect('localidades')->with('mensaje', 'No se encuentra la localidad seleccionada.'); } $paises = Paises::getPaisFromProvinciaIdToList($localidad->provincia_id); $provincias = []; return view('localidades.modificar', compact( 'localidad', 'paises', 'provincias', 'titulo')); }
{ "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(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\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(form $form)\n {\n //\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\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 return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "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) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\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 editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", "0.68129057", "0.68083996", "0.68082106", "0.6803853", "0.67966306", "0.6794222", "0.6794222", "0.6789979", "0.67861426", "0.678112", "0.677748", "0.67702436", "0.67625374", "0.6748088", "0.67475355", "0.67475355", "0.67446774", "0.6742005", "0.67374676", "0.6727497", "0.6714345", "0.6696231", "0.6693851", "0.6689907", "0.6689746", "0.6687102", "0.66870165", "0.6684574", "0.6670877", "0.66705006", "0.6667089", "0.6667089", "0.6663205", "0.66626745", "0.66603845", "0.66593564", "0.66560745", "0.66545844", "0.66447026", "0.6633528", "0.66319114", "0.66298395", "0.66298395", "0.6622365", "0.6621021", "0.66170275", "0.661664", "0.6612467", "0.66107714", "0.6608453", "0.65979743", "0.659645", "0.6596389", "0.6592672", "0.6591205", "0.6588125", "0.6582166", "0.6581656", "0.65811247", "0.65785724", "0.65782833", "0.6576397", "0.6570971", "0.6569483", "0.6568432", "0.656811", "0.6563493", "0.6563493", "0.65622604", "0.65602434", "0.65585065", "0.6557997", "0.65574414", "0.6556701", "0.65565753", "0.6556226", "0.6556107", "0.6549118", "0.65485924", "0.65463555" ]
0.0
-1
Update the specified resource in storage.
public function update($id, ValidateRulesLocalidades $request) { $localidad = Localidades::find($id); if ($localidad == null) { return Redirect('localidades')->with('mensaje', 'No se encuentra la localidad seleccionada.'); } $localidad->localidad = strtoupper($request->get('localidad')); $localidad->provincia_id = $request->get('provincia'); if (\Auth::user()->roles->peso >= config('opciones.roles.administrador')) { $localidad->activo = $request->get('activo'); } try { $localidad->save(); } catch (\Exception $e) { switch ($e->getCode()) { default: return redirect() ->route('localidades.index')->with('mensaje', 'Modificar localidad error ' . $e->getCode()); } } return redirect() ->route('localidades.index') ->with('mensaje', 'La localidad ' . $localidad->localidad . ' ha sido modificada satisfactoriamente.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $localidad = Localidades::find($id); if ($localidad == null) { return Redirect('localidades')->with('mensaje', 'No se encuentra la localidad seleccionada.'); } try { $localidad->delete(); } catch (\Exception $e) { switch ($e->getCode()) { case 23000: return redirect() ->route('localidades.index') ->with('mensaje', 'La localidad ' . $localidad->localidad . ' no se puede eliminar al tener comunidades asociadas.'); break; default: return redirect() ->route('localidades.index') ->with('mensaje', 'Eliminar localidad error ' . $e->getCode()); } } return redirect() ->route('localidades.index') ->with('mensaje', 'La localidad ' . $localidad->localidad . ' ha sido eliminada correctamente.'); }
{ "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
find'n replace Mycpts & Mycpt (as cpt). Remember to preseve case include in functions.php add custom meta to cpt_mycpt_box_content & cpt_mycpt_meta_box_save functions
function cpt_mycpt_box() { add_meta_box( 'cpt_mycpt_box', __( 'Mycpt', '' ), 'cpt_mycpt_box_content', 'mycpt', 'side', 'high' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpsl_convert_cpt() {\n \n if ( !current_user_can( 'manage_options' ) )\n die( '-1' );\n check_ajax_referer( 'wpsl-cpt-fix' );\n\n // Start the cpt coversion.\n wpsl_cpt_conversion();\n\n exit();\n}", "public function cws_register_cpt() {\n\n\t\tforeach ( $this->cpts as $key => $value ) {\n\n\t\t\tregister_post_type( $key, $value );\n\n\t\t}\n\n\t}", "public static function cpt_meta_box_markup( $object, $item ) {\n\t\t$info = self::build_cpt_info( $item );\n\t\t$meta_key = $info[\"meta_key\"];\n\t\t$nonce_key = $info[\"nonce_key\"];\n\t\t$cpt_type = $info[\"cpt_type\"];\n\t\t$cpt_form_field = $info[\"cpt_form_field\"] . \"[]\";\n\t\t$current_ids = self::get_by_type_and_page( $item, $object->ID );\n\t\t//$current_ids = get_post_meta($object->ID, $meta_key, true);\n\t\t$all_items = self::get_all( $item );\n\n\t\twp_nonce_field( basename( __FILE__ ), $nonce_key );\n\t\techo \"<div class='evo_cpt_list'>\";\n\t\tself::log_obect( $current_ids );\n\t\tif ( $current_ids ) {\n\t\t\tforeach ( $current_ids as $id ) {\n\t\t\t\techo sprintf( \"<div class=\\\"current_cpts\\\">%s<input type=\\\"hidden\\\" name=\\\"{$cpt_form_field}\\\" value=\\\"%s\\\" /><div class=\\\"evo_remove\\\"></div></div>\\n\", $all_items[ $id ]->post_title, $id );\n\t\t\t}\n\n\t\t}\n\t\techo \"</div>\";\n\t\techo '<div class=\"evo_select_callout\">';\n\t\techo \"<select name='evo_new_{$item}_id'>\";\n\t\techo \"<option value='select'>Select a {$info[\"cpt_text\"]}</option>\";\n\t\tif ( $all_items ) {\n\t\t\tforeach ( $all_items as $item ) {\n\t\t\t\techo sprintf( \"<option value=\\\"%s\\\">%s</option>\", $item->ID, $item->post_title );\n\t\t\t}\n\t\t}\n\n\t\techo '</select>';\n\t\techo \"<div data-field-name='{$cpt_form_field}' class='evo_add_cpt'></div>\";\n\t\techo '</div>';\n\t}", "function elijah_customize_cpt_content( $content ) {\n\tif( ! is_archive() && ! is_author() && !is_search() ) {\n\t\tif ($GLOBALS['post']->post_type == 'research_goal') {\n\t\t\tob_start();\n\t\t\tinclude( elijah_templates_dir . 'research-goal-content.php' );\n\t\t\t$content = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t} elseif( $GLOBALS['post']->post_type == 'research_tip') {\n\t\t\tob_start();\n\t\t\tinclude( elijah_templates_dir . 'research-tip-content.php' );\n\t\t\t$content = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t}\n\t}\n\treturn $content;\n}", "function customize_meta_boxes()\n{\n // These remove meta boxes from POSTS\n //remove_post_type_support(\"post\",\"excerpt\"); //Remove Excerpt Support\n //remove_post_type_support(\"post\",\"author\"); //Remove Author Support\n //remove_post_type_support(\"post\",\"revisions\"); //Remove Revision Support\n //remove_post_type_support(\"post\",\"comments\"); //Remove Comments Support\n //remove_post_type_support(\"post\",\"trackbacks\"); //Remove trackbacks Support\n //remove_post_type_support(\"post\",\"editor\"); //Remove Editor Support\n //remove_post_type_support(\"post\",\"custom-fields\"); //Remove custom-fields Support\n //remove_post_type_support(\"post\",\"title\"); //Remove Title Support\n\n\n // These remove meta boxes from PAGES\n //remove_post_type_support(\"page\",\"revisions\"); //Remove Revision Support\n //remove_post_type_support(\"page\",\"comments\"); //Remove Comments Support\n //remove_post_type_support(\"page\",\"author\"); //Remove Author Support\n //remove_post_type_support(\"page\",\"trackbacks\"); //Remove trackbacks Support\n //remove_post_type_support(\"page\",\"custom-fields\"); //Remove custom-fields Support\n\n}", "function setting_admin_include_cpt() {\n\t$options = get_option('nrelate_admin_options');\n\t\n\t$selected = isset( $options['admin_include_post_types'] ) ? $options['admin_include_post_types'] : array( 'post' );\n\t\n\t$post_types = get_post_types( \n\t\tarray(\n\t\t\t'public'=>true, \n\t\t\t//'publicly_queryable'=>true,\n\t\t\t//'capability_type'=> array('post','page'),\n\t\t\t'show_ui'=>true\n\t\t), 'object' \n\t);\n\t\n\techo \"<div id='nrelate-include-cpts' class='cptdiv'><ul id='posttypeschecklist' class='list:posttypes categorychecklist form-no-clear'>\";\n\t\n\tforeach ( $post_types as $id => $post_type ) {\n\t\t$checked = in_array( $id, $selected ) ? \"checked='checked'\" : \"\";\n\t\techo \"<li id='post-type-{$id}'><label class='selectit'><input type='checkbox' value='{$id}' name='nrelate_admin_options[admin_include_post_types][]' {$checked} id='in-post-type-{$id}' /> {$post_type->name}</label></li>\";\n\t}\n\t\n\techo '</ul></div>';\n\n\n$javascript_cpt = <<< JAVA_SCRIPT\njQuery(document).ready(function(){\n\tvar nrel_include_cpts_changed = false;\n\t\n\tjQuery('#nrelate-include-cpts :checkbox').change(function(){\n\t\tvar me= jQuery(this);\n\t\tif (!nrel_include_cpts_changed) {\n\t\t\tif (confirm(\"Any changes to this section will require a site reindex. Are you sure you want to continue?\\u000AIf Yes, press OK, SAVE CHANGES and press the REINDEX button (Reindexing may take a while, please be patient).\"))\n\t\t\t{\n\t\t\t\tnrel_include_cpts_changed = true;\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\tme.attr('checked', !me.is(':checked'));\n\t\t\t}\n\t\t}\n\t});\t\t\t\t\t\t\t\t\n});\nJAVA_SCRIPT;\n\n\techo \"<script type='text/javascript'>{$javascript_cpt}</script>\";\n}", "function _sp_custom_meta_boxes() {\n\t$post_id = ( isset( $_GET['post'] ) ) ? $_GET['post'] : ( isset( $_POST['post_ID'] ) ? $_POST['post_ID'] : '');\n\n\t$template_file = get_post_meta( $post_id, '_wp_page_template', TRUE );\n\n\t/////////////////////////////////////////////////////\n\t// portfolio sort position\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'portfolio-sort-position',\n\t\t__( 'Sort Position', 'sp-theme' ),\n\t\t'_sp_custom_box_portfolio_sort_position',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// slider carousel shortcode\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'carousel-shortcode',\n\t\t__( 'Carousel Shortcode', 'sp-theme' ),\n\t\t'_sp_custom_box_carousel_shortcode',\n\t\t'sp-slider',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// wpautop post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_post',\n\t\t__( 'Auto Content Formating', 'sp-theme' ),\n\t\t'_sp_custom_box_wpautop',\n\t\t'post',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// wpautop page\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_page',\n\t\t__( 'Auto Content Formating', 'sp-theme' ), \n\t\t'_sp_custom_box_wpautop',\n\t\t'page',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// wpatup portfolio\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_auto_formatting_portfolio',\n\t\t__( 'Auto Content Formating', 'sp-theme' ), \n\t\t'_sp_custom_box_wpautop',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout page\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\n\t\tadd_meta_box(\n\t\t\t'sp_page_layout',\n\t\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t\t'_sp_custom_box_layout',\n\t\t\t'page',\n\t\t\t'side',\n\t\t\t'low'\n\t\t);\t\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_post_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'post',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout portfolio\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_portfolio_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'sp-portfolio',\n\t\t'side',\n\t\t'low'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// custom page layout product\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_product_layout',\n\t\t__( 'Custom Sidebar Layout', 'sp-theme' ), \n\t\t'_sp_custom_box_layout',\n\t\t'product',\n\t\t'side',\n\t\t'low'\n\t);\n\n\t// check if SEO enabled\n\tif ( sp_get_option( 'seo_enable', 'is', 'on' ) || ! sp_get_option( 'seo_enable', 'isset' ) ) {\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo post\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'post'\n\t\t);\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo page\n\t\t/////////////////////////////////////////////////////\n\t\t// don't show on maintenance page\n\t\tif ( $template_file !== 'maintenance-page.php' ) {\n\t\t\tadd_meta_box(\n\t\t\t\t'sp_seo_settings',\n\t\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t\t'page'\n\t\t\t);\n\t\t}\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo woo product\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'product'\n\t\t);\n\n\t\t/////////////////////////////////////////////////////\n\t\t// seo portfolio\n\t\t/////////////////////////////////////////////////////\n\t\tadd_meta_box(\n\t\t\t'sp_seo_settings',\n\t\t\t__( 'Seo Settings', 'sp-theme' ),\n\t\t\t'_sp_custom_box_seo_settings',\n\t\t\t'sp-portfolio'\n\t\t);\n\t}\n\t\n\t/////////////////////////////////////////////////////\n\t// testimonial submitter\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_testimonial_submitter',\n\t\t__( 'Testimonial Submitter', 'sp-theme' ),\n\t\t'_sp_custom_box_testimonial_settings',\n\t\t'sp-testimonial',\n\t\t'side',\n\t\t'core'\n\t); \n\n\t/////////////////////////////////////////////////////\n\t// advanced page options\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\t\n\t\tadd_meta_box(\n\t\t\t'sp_advanced_page_options',\n\t\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t\t'_sp_custom_box_advanced_page_options',\n\t\t\t'page'\n\t\t);\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// advanced post options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_post_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'post'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// advanced portfolio options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_portfolio_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'sp-portfolio'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// advanced woo product options\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_advanced_woo_product_options',\n\t\t__( 'Advanced Options', 'sp-theme' ),\n\t\t'_sp_custom_box_advanced_page_options',\n\t\t'product'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// contact form shortcode\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-shortcode',\n\t\t__( 'Contact Form Shortcode', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_shortcode',\n\t\t'sp-contact-form',\n\t\t'side',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// contact form general settings\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-settings',\n\t\t__( 'Contact Form Settings', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_settings',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t);\n\t\n\t/////////////////////////////////////////////////////\n\t// contact form content\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-content',\n\t\t__( 'Contact Form Content', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_content',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t); \n\n\t/////////////////////////////////////////////////////\n\t// contact form messages\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'contact-form-messages',\n\t\t__( 'Contact Form Messages', 'sp-theme' ),\n\t\t'_sp_custom_box_contact_form_messages',\n\t\t'sp-contact-form',\n\t\t'normal',\n\t\t'high'\n\t);\n\n\t/////////////////////////////////////////////////////\n\t// page builder page\n\t/////////////////////////////////////////////////////\n\t// don't show on maintenance page\n\tif ( $template_file !== 'maintenance-page.php' ) {\t\n\t\tadd_meta_box(\n\t\t\t'page-builder',\n\t\t\t__( 'Page Builder', 'sp-theme' ),\n\t\t\t'_sp_custom_box_page_builder',\n\t\t\t'page',\n\t\t\t'normal',\n\t\t\t'high'\n\t\t);\n\t}\n\n\t/////////////////////////////////////////////////////\n\t// alternate product image on hover\n\t/////////////////////////////////////////////////////\n\t/*\n\tadd_meta_box(\n\t\t'sp_alternate_product_image',\n\t\t__( 'Alternate Product Image', 'sp-theme' ),\n\t\t'_sp_custom_box_alternate_product_image',\n\t\t'product',\n\t\t'side',\n\t\t'low' \n\t);\n\t*/\n\n\t/////////////////////////////////////////////////////\n\t// custom product tabs\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_custom_product_tabs',\n\t\t__( 'Product Tabs Option', 'sp-theme' ),\n\t\t'_sp_custom_product_tabs',\n\t\t'product',\n\t\t'normal',\n\t\t'low' \n\t);\n\n\t/////////////////////////////////////////////////////\n\t// featured video post\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_featured_video',\n\t\t__( 'Featured Video', 'sp-theme' ), \n\t\t'_sp_custom_box_featured_video',\n\t\t'post',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\t/////////////////////////////////////////////////////\n\t// faq sort order\n\t/////////////////////////////////////////////////////\n\tadd_meta_box(\n\t\t'sp_faq_order',\n\t\t__( 'Sort Order', 'sp-theme' ), \n\t\t'_sp_custom_box_faq_order',\n\t\t'sp-faq',\n\t\t'side',\n\t\t'low'\n\t);\t\n\n\treturn true;\n}", "function dupeoff_add_custom_box() {\n\tadd_meta_box( \n\t'dupeoff',\n\t__( 'DupeOff - Plagiarism and Duplicate Content Report', 'dupeoff_textdomain' ),\n\t'dupeoff_inner_custom_box',\n\t'post' \n\t);\n\tadd_meta_box( \n\t'dupeoff',\n\t__( 'DupeOff - Plagiarism and Duplicate Content Report', 'dupeoff_textdomain' ),\n\t'dupeoff_inner_custom_box',\n\t'page' \n\t);\n}", "function meetup_cpt_cb() {\n\n //https://developer.wordpress.org/reference/functions/get_post_type_labels/\n\n\n $mov_labels = array(\n 'name' => __('Movies'),\n 'singular_name' => __('Previous Movie'),\n 'add_new' => __('Add New Movie'),\n 'add_new_item' => __('Add New Movie'),\n 'edit_item' => __('Edit this Movie'),\n 'new_item' => __('New Movie'),\n 'view_item' => __('View Movies'),\n 'search_items' => __('Search Previous Movies'),\n 'not_found' => __('Na na na'),\n 'not_found_in_trash' => __('Nothing in the trash ladies and gentlemen!')\n );\n\n //https://developer.wordpress.org/reference/functions/register_post_type/\n $mov_args = array(\n 'labels' => $mov_labels,\n 'description' => 'Give this description some love',\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'query_var' => true,\n 'menu_icon' => 'dashicons-video-alt2',\n 'capability_type' => 'post',\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'best-movie-reviews', 'with_front' => true ),\n 'hierarchical' => false, //i want this to behave like a post\n 'menu_position' => null,\n //'show_in_rest' => true, //GUT\n 'supports' => array('title','editor', 'excerpt', 'thumbnail', 'author', 'custom-fields') //Core features include 'title', 'editor', 'comments', 'revisions', 'trackbacks', 'author', 'excerpt', 'page-attributes', 'thumbnail', '', and 'post-formats'.\n );\n \n //create my custom post type\n\n\n register_post_type('movies', $mov_args);\n\n flush_rewrite_rules();\n\n\n }", "function property_cpt() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Propiedades', 'Post Type General Name', 'inversionisto' ),\n\t\t'singular_name' => _x( 'Propiedad', 'Post Type Singular Name', 'inversionisto' ),\n\t\t'menu_name' => __( 'Propiedades', 'inversionisto' ),\n\t\t'name_admin_bar' => __( 'Propiedad', 'inversionisto' ),\n\t\t'archives' => __( 'Item Archives', 'inversionisto' ),\n\t\t'attributes' => __( 'Item Attributes', 'inversionisto' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'inversionisto' ),\n\t\t'all_items' => __( 'Todas', 'inversionisto' ),\n\t\t'add_new_item' => __( 'Add New Item', 'inversionisto' ),\n\t\t'add_new' => __( 'Nueva Propiedad', 'inversionisto' ),\n\t\t'new_item' => __( 'New Item', 'inversionisto' ),\n\t\t'edit_item' => __( 'Edit Item', 'inversionisto' ),\n\t\t'update_item' => __( 'Update Item', 'inversionisto' ),\n\t\t'view_item' => __( 'View Item', 'inversionisto' ),\n\t\t'view_items' => __( 'View Items', 'inversionisto' ),\n\t\t'search_items' => __( 'Search Item', 'inversionisto' ),\n\t\t'not_found' => __( 'Not found', 'inversionisto' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'inversionisto' ),\n\t\t'featured_image' => __( 'Imagen destacada', 'inversionisto' ),\n\t\t'set_featured_image' => __( 'Usar como imagen destacada', 'inversionisto' ),\n\t\t'remove_featured_image' => __( 'Remover imagen destacada', 'inversionisto' ),\n\t\t'use_featured_image' => __( 'Usar como imagen destacada', 'inversionisto' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'inversionisto' ),\n\t\t'uploaded_to_this_item' => __( 'Subido a esta propiedad', 'inversionisto' ),\n\t\t'items_list' => __( 'Items list', 'inversionisto' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'inversionisto' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'inversionisto' ),\n\t);\n\t$rewrite = array(\n\t\t'slug' => 'propiedad',\n\t\t'with_front' => true,\n\t\t'pages' => true,\n\t\t'feeds' => true,\n\t);\n\t$args = array(\n\t\t'label' => __( 'Propiedad', 'inversionisto' ),\n\t\t'description' => __( 'Post Type Description', 'inversionisto' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'thumbnail' ),\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-admin-home',\n\t\t'show_in_admin_bar' => false,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => 'propiedades',\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'rewrite' => $rewrite,\n\t\t'capability_type' => 'post',\n\t\t'show_in_rest' => true,\n\t);\n\tregister_post_type( 'property', $args );\n\n}", "function sld_rm_post_custom_fields() {\n\t// pages\n\tremove_meta_box( 'postcustom' , 'page' , 'normal' );\n\tremove_meta_box( 'commentstatusdiv' , 'page' , 'normal' );\n\tremove_meta_box( 'commentsdiv' , 'page' , 'normal' );\n\tremove_meta_box( 'authordiv' , 'page' , 'normal' );\n\n\t// posts\n\tremove_meta_box( 'postcustom' , 'post' , 'normal' );\n\tremove_meta_box( 'postexcerpt' , 'post' , 'normal' );\n\tremove_meta_box( 'trackbacksdiv' , 'post' , 'normal' );\n}", "public function move_meta_box() {\n\n\t\tglobal $wp_taxonomies;\n\n\t\t$post_types = $wp_taxonomies['cahnrs-category']->object_type;\n\n\t\tforeach( $post_types as $post_type ) {\n\t\t\t\\remove_meta_box( 'cahnrs-categorydiv', $post_type, 'side' );\n\t\t\t\\add_meta_box( 'cahnrs-categorydiv', 'Content Settings', array( $this, 'cahnrs_page_settings_interface' ), $post_type, 'normal', 'high' );\n\t\t}\n\n\t}", "function nl_add_custom_to_yoast( $content ) {\n\t\tglobal $post;\n\t\t$pid = $post->ID;\n\t\t\n\t\t$custom = get_post_custom($pid);\n\t\tunset($custom['_yoast_wpseo_focuskw']); // Don't count the keyword in the Yoast field!\n\n\t\tforeach( $custom as $key => $value ) {\n\t\t\tif( substr( $key, 0, 1 ) != '_' && substr( $value[0], -1) != '}' && !is_array($value[0]) && !empty($value[0])) {\n\t\t\t $custom_content .= $value[0] . ' ';\n\t\t\t}\n\t\t}\n\n\t\t$content = $content . ' ' . $custom_content;\n\t\treturn $content;\n\n\t\tremove_filter('wpseo_pre_analysis_post_content', 'tbx_add_custom_to_yoast'); // don't let WP execute this twice\n\t}", "function add_custom_meta_box() { \nglobal $post, $post_type;\n\n\t// specific template\n\t//if('page-templatename.php' == get_post_meta($post->ID, '_wp_page_template', true)) {\n \tadd_meta_box( \n \t'custom_meta_box', // $id \n\t\t\t'More Stuff!', // $title \n\t\t\t'show_custom_meta_box', // $callback \n\t\t\t'post', // $page \n\t\t\t'normal', // $context \n\t\t\t'high'\n\t\t); // $priority \n\t//}\n\t\n\t//specific post-type\n\t/*if('custom post type' == $post_type) {\n \tadd_meta_box( \n \t'custom_meta_box', // $id \n\t\t\t'Options', // $title \n\t\t\t'show_custom_meta_box', // $callback \n\t\t\t'custom post type', // $page \n\t\t\t'normal', // $context \n\t\t\t'high'\n\t\t); // $priority \n\t}*/\n}", "function single_product_content_replace() {\n\tthe_content();\n}", "function tt_register_cpt($single, $plural = '') {\n if (empty($plural)) {\n $plural = $single.'s';\n }\n register_post_type(\n strtolower($single),\n array(\n 'label' => $plural,\n 'labels' => array(\n 'add_new_item' => \"Add New $single\",\n 'edit_item' => \"Edit $single\",\n 'new_item' => \"New $single\",\n 'view_item' => \"View $single\",\n 'search_items' => \"Search $plural\",\n 'not_found' => \"No $plural found\",\n 'not_found_in_trash' => \"No $plural found in Trash\",\n ),\n 'public' => true,\n 'has_archive' => true,\n 'supports' => array(\n 'title',\n 'editor',\n 'thumbnail',\n 'custom-fields',\n 'excerpt',\n ),\n 'taxonomies' => array('category'),\n )\n );\n}", "function remove_default_custom_fields( $type, $context, $post ) {\n foreach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n foreach ( $this->postTypes as $postType ) {\n remove_meta_box( 'postcustom', $postType, $context );\n }\n }\n }", "function volpress_cpt_add_box() {\n\tadd_meta_box('volpress_section_1', 'Tasks', 'volpress_inner_custom_box', 'volpress', 'normal', 'default', array('section'=>1));\n\tadd_meta_box('volpress_section_2', 'Date', 'volpress_inner_custom_box', 'volpress', 'side', 'high', array('section'=>2));\n\t//add_meta_box('volpress_sectionid', 'My Post Section Title', 'volpress_inner_custom_box', 'volpress');\n}", "function add_custom_content_fields_meta_box( $posttypes , $custom_field_set , $custom_field_item )\n\t{\n\t\t\n\t\t/* assign current slider item */\n\t\tif( $custom_field_set == 'sliders' ) \n\t\t\t\n\t\t\t$this->slider_field_item = $custom_field_item != '' ? $custom_field_item : 'base';\n\t\t\n\t\t\n\t\tadd_action('add_meta_boxes', function() use( $posttypes, $custom_field_set , $custom_field_item ) {\n\t\t\t\t\n\t\t\t$custom_field_item_info = include( get_template_directory().'/module/'.$custom_field_set.'/'.$custom_field_item.'/config.details.php' );\n\n\t\t\tforeach ($posttypes as $key => $posttype_section ) {\n\t\t\t\t\n\t\t\t\tadd_meta_box('custom_post_type_section_'.$posttype_section . '-' . $custom_field_item , $custom_field_item_info['title'], function() use( $custom_field_set , $custom_field_item ){\n\n\t\t\t\t\t\t$custom_fields = $this->get_fields( $custom_field_set , $custom_field_item );\n\t\t\t\t\t\t$data['type'] = $custom_field_item;\n\t\t\t\t\t\t$data['dir'] = array('module',$custom_field_set , $custom_field_item , 'admin' ,'views');\n\t\t\t\t\t\t$data['view'] = $custom_field_item;\n\t\t\t\t\t\t$data['customfields'] = $custom_fields;\n\t\t\t\t\t\t\n\t\t\t\t\t\tload_view( $data );\n\n\t\t\t\t}, $posttype_section );\n\n\t\t\t}\n\n\t\t});\n\n\t\t$this->save_post( $custom_field_set , $custom_field_item );\n\t}", "public function remove_post_custom_fields() {\n\n\t\tremove_meta_box('postcustom' , 'post' , 'normal');\n\n\t}", "function create_service_cpt() {\n\n\t\n\t$args = array(\n\t\t'label' => __( 'Service', 'basic' ),\n\t\t'description' => __( 'Custom post type ', 'basic' ),\n\t\t'labels' => $labels,\n\t\t'menu_icon' => 'dashicons-buddicons-topics',\n\t\t'supports' => array('title', 'editor', 'thumbnail', 'author', 'comments', 'post-formats'),\n\t\t// 'taxonomies' => array('category', 'post_tag'),\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'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'hierarchical' => false,\n\t\t'exclude_from_search' => false,\n\t\t'show_in_rest' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\tregister_post_type( 'service', $args );\n\n}", "function plugin_cpt_register() {\n\n\t\t\t$labels = array(\n\t\t\t\t'name' => _x( 'Plugins', 'plugins', 'wp3sixty-extra' ),\n\t\t\t\t'singular_name' => _x( 'Plugin', 'plugin', 'wp3sixty-extra' ),\n\t\t\t\t'menu_name' => __( 'Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'name_admin_bar' => __( 'Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'archives' => __( 'Plugin Archives', 'wp3sixty-extra' ),\n\t\t\t\t'parent_item_colon' => __( 'Parent Plugin:', 'wp3sixty-extra' ),\n\t\t\t\t'all_items' => __( 'All Plugins', 'wp3sixty-extra' ),\n\t\t\t\t'add_new_item' => __( 'Add New Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'add_new' => __( 'Add New', 'wp3sixty-extra' ),\n\t\t\t\t'new_item' => __( 'New Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'edit_item' => __( 'Edit Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'update_item' => __( 'Update Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'view_item' => __( 'View Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'search_items' => __( 'Search Plugin', 'wp3sixty-extra' ),\n\t\t\t\t'not_found' => __( 'Not found', 'wp3sixty-extra' ),\n\t\t\t\t'not_found_in_trash' => __( 'Not found in Trash', 'wp3sixty-extra' ),\n\t\t\t\t'featured_image' => __( 'Featured Image', 'wp3sixty-extra' ),\n\t\t\t\t'set_featured_image' => __( 'Set featured image', 'wp3sixty-extra' ),\n\t\t\t\t'remove_featured_image' => __( 'Remove featured image', 'wp3sixty-extra' ),\n\t\t\t\t'use_featured_image' => __( 'Use as featured image', 'wp3sixty-extra' ),\n\t\t\t\t'insert_into_item' => __( 'Insert into plugin', 'wp3sixty-extra' ),\n\t\t\t\t'uploaded_to_this_item' => __( 'Uploaded to this plugin', 'wp3sixty-extra' ),\n\t\t\t\t'items_list' => __( 'Items plugin', 'wp3sixty-extra' ),\n\t\t\t\t'items_list_navigation' => __( 'Plugin list navigation', 'wp3sixty-extra' ),\n\t\t\t\t'filter_items_list' => __( 'Filter plugins list', 'wp3sixty-extra' ),\n\t\t\t);\n\t\t\t$args = array(\n\t\t\t\t'label' => __( 'plugin', 'wp3sixty-extra' ),\n\t\t\t\t'description' => __( 'plugin cpt', 'wp3sixty-extra' ),\n\t\t\t\t'labels' => $labels,\n\t\t\t\t'supports' => array(\n\t\t\t\t\t'title',\n\t\t\t\t\t'editor',\n\t\t\t\t\t'excerpt',\n\t\t\t\t\t'author',\n\t\t\t\t\t'thumbnail',\n\t\t\t\t\t'comments',\n\t\t\t\t\t'revisions',\n\t\t\t\t\t'custom-fields',\n\t\t\t\t\t'post-formats',\n\t\t\t\t),\n\t\t\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'public' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_menu' => true,\n\t\t\t\t'menu_position' => 5,\n\t\t\t\t'menu_icon' => 'dashicons-hammer',\n\t\t\t\t'show_in_admin_bar' => true,\n\t\t\t\t'show_in_nav_menus' => true,\n\t\t\t\t'can_export' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'capability_type' => 'page',\n\t\t\t);\n\t\t\tregister_post_type( 'plugin', $args );\n\n\t\t}", "function wtfdivi099_add_meta_boxes() {\r\n\tforeach(get_post_types() as $pt) {\r\n\t\tif (post_type_supports($pt, 'editor') and function_exists('et_single_settings_meta_box')) {\r\n\t\t\tadd_meta_box('et_settings_meta_box', __('Divi Custom Post Settings', 'Divi'), 'et_single_settings_meta_box', $pt, 'side', 'high');\r\n\t\t}\r\n\t} \r\n}", "function clix_uppe_add_meta_box() {\r\n\tif( function_exists('add_meta_box') ) {\r\n\t\tadd_meta_box( 'clix_uppe_meta_box', 'Clix Category Exclusion', 'clix_uppe_meta_box', post, 'side' );\r\n \t}\r\n}", "function ot_after_save($options) {\r\n\t\t$clones = $options;\r\n\t\t$used_shortcodes = array();\r\n\t\t$global_css = '';\r\n\t\tforeach($options as $key => $val){\r\n\t\t\tif($key == 'archives_footer_cta_content'){\r\n\r\n\t\t\t\t$replacements = array();\r\n\t\t\t\t$css = $this->cactus_parse_inlinecss($val, $used_shortcodes, $replacements);\r\n\r\n\t\t\t\tif($css != ''){\r\n\r\n\t\t\t\t\t$new_val = $val;\r\n\t\t\t\t\tforeach($replacements as $replace){\r\n\t\t\t\t\t\t$new_val = str_replace($replace[0], $replace[1], $new_val);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$global_css .= ';' . $css;\r\n\t\t\t\t\t$clones[$key] = $new_val;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(startsWith($global_css,';')){\r\n\t\t\t$global_css = substr($global_css,1);\r\n\t\t}\r\n\r\n\t\t$shortcodes = get_option('ct_shortcodes_used_in_ot');\r\n\t\tif(!isset($shortcodes) || !is_array($shortcodes)){\r\n\t\t\tadd_option('ct_shortcodes_used_in_ot', array());\r\n\t\t}\r\n\r\n\t\t$shortcodes = $used_shortcodes;\r\n\t\tupdate_option('ct_shortcodes_used_in_ot', $shortcodes);\r\n\r\n\r\n\t\t// update global custom CSS in theme options, to be called in every pages\r\n\t\t$global_custom_css = get_option('ct_ot_custom_css');\r\n\t\tif(!isset($global_custom_css) || !is_array($global_custom_css)){\r\n\t\t\tadd_option('ct_ot_custom_css', '');\r\n\t\t}\r\n\r\n\t\t$global_custom_css = $global_css;\r\n\t\tupdate_option('ct_ot_custom_css', $global_custom_css);\r\n\r\n\t\tupdate_option(ot_options_id(), $clones);\r\n\r\n\t}", "function kp_project_features_meta_box( $meta_boxes )\n{\n $meta_boxes[] = array(\n 'title' => __( 'Project Features', 'kappe' ),\n 'post_types' => 'portfolio',\n 'fields' => array(\n array(\n 'id' => 'feature',\n 'name' => __( 'Feature', 'kappe' ),\n 'type' => 'text',\n 'clone' => true,\n 'sort_clone' => true\n )\n ),\n );\n return $meta_boxes;\n}", "function wp_arch_cpts() {\n /**\n * Registers a new post type\n * @uses $wp_post_types Inserts new post type object into the list\n *\n * @param string Post type key, must not exceed 20 characters\n * @param array|string See optional args description above.\n * @return object|WP_Error the registered post type object, or an error object\n */\n register_post_type( 'wp_arch_testimonial',\n array(\n 'labels' => array(\n 'name' => _x('Testimonials', 'post type general name'),\n 'singular_name' => _x('Testimonial', 'post type singular name'),\n 'add_new' => _x('Add New', 'testimonial'),\n 'add_new_item' => __('Add New Testimonial'),\n 'edit_item' => __('Edit Testimonial'),\n 'new_item' => __('New Testimonial'),\n 'view_item' => __('View Testimonial'),\n 'search_items' => __('Search Testimonial'),\n 'not_found' => __('No testimonials found'),\n 'not_found_in_trash' => __('No testimonials found in Trash'),\n 'parent_item_colon' => ''\n ),\n 'public' => true,\n 'description' => 'Our Testimonials',\n 'exclude_from_search' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'testimonials'),\n 'hierarchical' => true,\n 'supports' => array(\n 'title',\n 'editor'\n ),\n )\n );\n}", "function bfa_ata_old_custom_box() {\r\n\r\n echo '<div class=\"dbx-b-ox-wrapper\">' . \"\\n\";\r\n echo '<fieldset id=\"bfa_ata_fieldsetid\" class=\"dbx-box\">' . \"\\n\";\r\n echo '<div class=\"dbx-h-andle-wrapper\"><h3 class=\"dbx-handle\">' . \r\n __( 'Body copy title', 'atahualpa' ) . \"</h3></div>\"; \r\n \r\n echo '<div class=\"dbx-c-ontent-wrapper\"><div class=\"dbx-content\">';\r\n\r\n // output editing form\r\n\r\n bfa_ata_inner_custom_box();\r\n\r\n // end wrapper\r\n\r\n echo \"</div></div></fieldset></div>\\n\";\r\n}", "function remove_my_post_metaboxes() {\n remove_meta_box( 'formatdiv','post','normal' ); // Format Div\n remove_meta_box( 'postcustom','post','normal' ); // Custom Fields\n remove_meta_box( 'trackbacksdiv','post','normal' ); // Trackback and Pingback\n remove_meta_box( 'postexcerpt','post','normal' ); // Custom Excerpt\n remove_meta_box( 'slugdiv','post','normal' ); // Custom Slug\n}", "function tcf_init() {\n require_once( 'library/custom-post-type.php' );\n\n // launching operation cleanup\n add_action( 'init', 'tcf_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', 'tcf_rss_version' );\n // remove pesky injected css for recent comments widget\n add_filter( 'wp_head', 'remove_wp_widget_recent_comments_style', 1 );\n // clean up comment styles in the head\n add_action( 'wp_head', 'remove_recent_comments_style', 1 );\n // clean up gallery output in wp\n add_filter( 'gallery_style', 'tcf_gallery_style' );\n\n // enqueue base scripts and styles\n add_action( 'wp_enqueue_scripts', 'tcf_scripts_and_styles', 800 );\n add_action( 'wp_enqueue_scripts', 'template_scripts_and_styles', 999 );\n // ie conditional wrapper\n\n // launching this stuff after theme setup\n tcf_theme_support();\n\n // adding sidebars to Wordpress (these are created in functions.php)\n add_action( 'widgets_init', 'tcf_register_sidebars' );\n\n // cleaning up random code around images\n add_filter( 'the_content', 'filter_ptags_on_images' );\n // cleaning up excerpt\n add_filter( 'excerpt_more', 'tcf_excerpt_more' );\n\n}", "function workshop_cpt_init() {\n $labels = array(\n 'name' => _x( 'Workshops', 'Post type general name', 'workshop' ),\n 'singular_name' => _x( 'Workshop', 'Post type singular name', 'workshop' ),\n 'menu_name' => _x( 'Workshops', 'Admin Menu text', 'workshop' ),\n 'name_admin_bar' => _x( 'Workshop', 'Add New on Toolbar', 'workshop' ),\n 'add_new' => __( 'Add New', 'workshop' ),\n 'add_new_item' => __( 'Add New Workshop', 'workshop' ),\n 'new_item' => __( 'New Workshop', 'workshop' ),\n 'edit_item' => __( 'Edit Workshop', 'workshop' ),\n 'view_item' => __( 'View Workshop', 'workshop' ),\n 'all_items' => __( 'All Workshops', 'workshop' ),\n 'search_items' => __( 'Search Workshops', 'workshop' ),\n 'parent_item_colon' => __( 'Parent Workshops:', 'workshop' ),\n 'not_found' => __( 'No Workshops found.', 'workshop' ),\n 'not_found_in_trash' => __( 'No Workshops found in Trash.', 'workshop' ),\n 'featured_image' => _x( 'Workshop Image', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', 'workshop' ),\n 'set_featured_image' => _x( 'Set Workshop image', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', 'workshop' ),\n 'remove_featured_image' => _x( 'Remove Workshop image', 'Overrides the “Remove featured image” phrase for this post type. Added in 4.3', 'workshop' ),\n 'use_featured_image' => _x( 'Use as Workshop image', 'Overrides the “Use as featured image” phrase for this post type. Added in 4.3', 'workshop' ),\n 'archives' => _x( 'Workshop archives', 'The post type archive label used in nav menus. Default “Post Archives”. Added in 4.4', 'workshop' ),\n 'insert_into_item' => _x( 'Insert into Workshop', 'Overrides the “Insert into post”/”Insert into page” phrase (used when inserting media into a post). Added in 4.4', 'workshop' ),\n 'uploaded_to_this_item' => _x( 'Uploaded to this Workshop', 'Overrides the “Uploaded to this post”/”Uploaded to this page” phrase (used when viewing media attached to a post). Added in 4.4', 'workshop' ),\n 'filter_items_list' => _x( 'Filter Workshops list', 'Screen reader text for the filter links heading on the post type listing screen. Default “Filter posts list”/”Filter pages list”. Added in 4.4', 'workshop' ),\n 'items_list_navigation' => _x( 'Workshops list navigation', 'Screen reader text for the pagination heading on the post type listing screen. Default “Posts list navigation”/”Pages list navigation”. Added in 4.4', 'workshop' ),\n 'items_list' => _x( 'Workshops list', 'Screen reader text for the items list heading on the post type listing screen. Default “Posts list”/”Pages list”. Added in 4.4', 'workshop' ),\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => false,\n 'publicly_queryable' => false,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'workshops' ),\n 'capability_type' => 'workshop',\n 'has_archive' => true,\n 'hierarchical' => false,\n 'show_in_rest' => true,\n 'rest_base' => 'workshops',\n 'menu_position' => null,\n 'menu_icon' => 'dashicons-welcome-learn-more',\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail' ),\n 'taxonomies' => array( 'chapter' ),\n 'map_meta_cap' => true,\n );\n\n register_post_type( 'workshop', $args );\n}", "function create_easyvideo_cpt() {\n\n $labels = array(\n 'name' => _x( 'Easy Videos', 'Post Type General Name', 'easycoupons' ),\n 'singular_name' => _x( 'Easy Video', 'Post Type Singular Name', 'easycoupons' ),\n 'menu_name' => _x( 'Easy Videos', 'AdminLoader Menu text', 'easycoupons' ),\n 'name_admin_bar' => _x( 'Easy Video', 'Add New on Toolbar', 'easycoupons' ),\n 'archives' => __( 'Easy Video Archives', 'easycoupons' ),\n 'attributes' => __( 'Easy Video Attributes', 'easycoupons' ),\n 'parent_item_colon' => __( 'Parent Easy Video:', 'easycoupons' ),\n 'all_items' => __( 'All Easy Videos', 'easycoupons' ),\n 'add_new_item' => __( 'Add New Easy Video', 'easycoupons' ),\n 'add_new' => __( 'Add New', 'easycoupons' ),\n 'new_item' => __( 'New Easy Video', 'easycoupons' ),\n 'edit_item' => __( 'Edit Easy Video', 'easycoupons' ),\n 'update_item' => __( 'Update Easy Video', 'easycoupons' ),\n 'view_item' => __( 'View Easy Video', 'easycoupons' ),\n 'view_items' => __( 'View Easy Videos', 'easycoupons' ),\n 'search_items' => __( 'Search Easy Video', 'easycoupons' ),\n 'not_found' => __( 'Not found', 'easycoupons' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'easycoupons' ),\n 'featured_image' => __( 'Featured Image', 'easycoupons' ),\n 'set_featured_image' => __( 'Set featured image', 'easycoupons' ),\n 'remove_featured_image' => __( 'Remove featured image', 'easycoupons' ),\n 'use_featured_image' => __( 'Use as featured image', 'easycoupons' ),\n 'insert_into_item' => __( 'Insert into Easy Video', 'easycoupons' ),\n 'uploaded_to_this_item' => __( 'Uploaded to this Easy Video', 'easycoupons' ),\n 'items_list' => __( 'Easy Videos list', 'easycoupons' ),\n 'items_list_navigation' => __( 'Easy Videos list navigation', 'easycoupons' ),\n 'filter_items_list' => __( 'Filter Easy Videos list', 'easycoupons' ),\n );\n $args = array(\n 'label' => __( 'Easy Video', 'easycoupons' ),\n 'description' => __( '', 'easycoupons' ),\n 'labels' => $labels,\n 'menu_icon' => 'dashicons-video-alt3',\n 'supports' => array('title','thumbnail'),\n 'taxonomies' => array(),\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 100,\n 'show_in_admin_bar' => false,\n 'show_in_nav_menus' => false,\n 'can_export' => true,\n 'has_archive' => false,\n 'hierarchical' => false,\n 'exclude_from_search' => true,\n 'show_in_rest' => false,\n 'publicly_queryable' => false,\n 'capability_type' => 'post',\n );\n\n register_post_type( 'easy-video', $args );\n\n }", "function bfa_ata_add_custom_box() {\r\n\r\n if( function_exists( 'add_meta_box' )) {\r\n add_meta_box( 'bfa_ata_sectionid', __( 'Atahualpa Post Options', 'atahualpa' ), \r\n 'bfa_ata_inner_custom_box', 'post', 'normal', 'high' );\r\n add_meta_box( 'bfa_ata_sectionid', __( 'Atahualpa Page Options', 'atahualpa' ), \r\n 'bfa_ata_inner_custom_box', 'page', 'normal', 'high' );\r\n } else {\r\n add_action('dbx_post_advanced', 'bfa_ata_old_custom_box' );\r\n add_action('dbx_page_advanced', 'bfa_ata_old_custom_box' );\r\n }\r\n}", "function cptui_register_my_cpts() {\n\n\t/**\n\t * Post Type: Testimonios.\n\t */\n\n\t$labels = array(\n\t\t\"name\" => __( \"Testimonios\", \"\" ),\n\t\t\"singular_name\" => __( \"Testimonio\", \"\" ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( \"Testimonios\", \"\" ),\n\t\t\"labels\" => $labels,\n\t\t\"description\" => \"Incluir testimonios..\",\n\t\t\"public\" => true,\n\t\t\"publicly_queryable\" => true,\n\t\t\"show_ui\" => true,\n\t\t\"delete_with_user\" => false,\n\t\t\"show_in_rest\" => true,\n\t\t\"rest_base\" => \"\",\n\t\t\"rest_controller_class\" => \"WP_REST_Posts_Controller\",\n\t\t\"has_archive\" => false,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"exclude_from_search\" => false,\n\t\t\"capability_type\" => \"post\",\n\t\t\"map_meta_cap\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"rewrite\" => array( \"slug\" => \"testimonios\", \"with_front\" => true ),\n\t\t\"query_var\" => true,\n\t\t\"supports\" => array( \"title\", \"editor\", \"thumbnail\" ),\n\t);\n\n\tregister_post_type( \"testimonios\", $args );\n\n\t/**\n\t * Post Type: Sliders.\n\t */\n\n\t$labels = array(\n\t\t\"name\" => __( \"Sliders\", \"\" ),\n\t\t\"singular_name\" => __( \"Slider\", \"\" ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( \"Sliders\", \"\" ),\n\t\t\"labels\" => $labels,\n\t\t\"description\" => \"\",\n\t\t\"public\" => true,\n\t\t\"publicly_queryable\" => true,\n\t\t\"show_ui\" => true,\n\t\t\"delete_with_user\" => false,\n\t\t\"show_in_rest\" => true,\n\t\t\"rest_base\" => \"\",\n\t\t\"rest_controller_class\" => \"WP_REST_Posts_Controller\",\n\t\t\"has_archive\" => false,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"exclude_from_search\" => false,\n\t\t\"capability_type\" => \"post\",\n\t\t\"map_meta_cap\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"rewrite\" => array( \"slug\" => \"slider\", \"with_front\" => true ),\n\t\t\"query_var\" => true,\n\t\t\"supports\" => array( \"title\", \"thumbnail\" ),\n\t);\n\n\tregister_post_type( \"slider\", $args );\n}", "public function jsComposerEditPage() {\n $pt_array = $this->composer->getPostTypes();\n foreach ($pt_array as $pt) {\n add_meta_box( 'wpb_visual_composer', __('Swift Page Builder', \"js_composer\"), Array($this->composer->getLayout(), 'output'), $pt, 'normal', 'high');\n }\n }", "function emc_the_cpt_description(){\r\n\r\n\t$desc = get_page_by_path( 'description', OBJECT, 'emc_content_focus' );\r\n\t$html = apply_filters( 'the_content', $desc->post_content );\r\n\techo $html;\r\n\r\n}", "function add_custom_fields_meta_box( $posttypes , $custom_field_set , $custom_field_item )\n\t{\n\t\tif( $custom_field_set == 'sliders' ) \n\t\t\t$this->slider_field_item = $custom_field_item != '' ? $custom_field_item : 'base';\n\t\t\t\n\t\t\tadd_action('add_meta_boxes', function() use( $posttypes, $custom_field_set , $custom_field_item ) {\n\t\t\t\t\t\n\t\t\t\t$custom_field_item_info = include( get_template_directory().'/module/'.$custom_field_set.'/'.$custom_field_item.'/config.details.php' );\n\n\t\t\t\tforeach ($posttypes as $key => $posttype_section ) {\n\t\t\t\t\t\n\t\t\t\t\tadd_meta_box('custom_post_type_section_'.$posttype_section . '-' . $custom_field_item , $custom_field_item_info['title'], function() use( $custom_field_set , $custom_field_item ){\n\n\t\t\t\t\t\t\t$custom_fields = $this->get_fields( $custom_field_set , $custom_field_item );\n\t\t\t\t\t\t\t$data['type'] = $custom_field_item;\n\t\t\t\t\t\t\t$data['dir'] = array('module',$custom_field_set , $custom_field_item , 'admin' ,'views');\n\t\t\t\t\t\t\t$data['view'] = $custom_field_item;\n\t\t\t\t\t\t\t$data['customfields'] = $custom_fields;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tload_view( $data );\n\n\t\t\t\t\t}, $posttype_section );\n\n\t\t\t\t}\n\t\t});\n\n\t\t$this->save_post( $custom_field_set , $custom_field_item );\n\t}", "function save_meta_box_custompost( $post_id ) {\n if ( defined( 'DOING_AUTOSAVE') && DOING_AUTOSAVE ) return;\n if ( $parent_id = wp_is_post_revision( $post_id ) ) {\n $post_id = $parent_id;\n }\n $fields = ['published_date'];\n foreach ( $fields as $field ) {\n if ( array_key_exists( $field, $_POST ) ) {\n update_post_meta( $post_id, $field, sanitize_text_field( $_POST[$field] ) );\n }\n }\n }", "function remove_postcustom() {\n\tremove_meta_box( 'postcustom', null, 'normal' );\n}", "function custom_post_Contentp() {\r\n\tregister_post_type( 'contentp',\r\n\t\tarray('labels' => array(\r\n\t\t\t'name' => __('Teacher Education Presentations', 'emc'),\r\n\t\t\t'singular_name' => __('Teacher Education Presentation', 'emc'),\r\n\t\t\t'all_items' => __('All Teacher Education Presentations', 'emc'),\r\n\t\t\t'add_new' => __('Add New', 'emc'),\r\n\t\t\t'add_new_item' => __('Add New Teacher Education Presentation', 'emc'),\r\n\t\t\t'edit' => __( 'Edit', 'emc' ),\r\n\t\t\t'edit_item' => __('Edit Teacher Education Presentation', 'emc'),\r\n\t\t\t'new_item' => __('New Teacher Education Presentation', 'emc'),\r\n\t\t\t'view_item' => __('View Teacher Education Presentation', 'emc'),\r\n\t\t\t'search_items' => __('Search Teacher Education Presentations', 'emc'),\r\n\t\t\t'not_found' => __('Nothing found in the Database.', 'emc'),\r\n\t\t\t'not_found_in_trash' => __('Nothing found in Trash', 'emc'),\r\n\t\t\t'parent_item_colon' => ''\r\n\t\t\t),\r\n\t\t\t'description' => __( 'This is the example Teacher Education Presentation', 'emc' ),\r\n\t\t\t'public' => true,\r\n\t\t\t'publicly_queryable' => true,\r\n\t\t\t'exclude_from_search' => false,\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'menu_position' => 5,\r\n\t\t\t'menu_icon' => get_stylesheet_directory_uri() . '/img/emc.png',\r\n\t\t\t'rewrite'\t=> array( 'slug' => 'teacher-education-presentations', 'with_front' => false ),\r\n\t\t\t'has_archive' => 'teacher-education-presentations',\r\n\t\t\t'capability_type' => 'post',\r\n\t\t\t'hierarchical' => true,\r\n\t\t\t'supports' => array( 'title', 'category', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'sticky')\r\n\t \t)\r\n\t);\r\n\t//register_taxonomy_for_object_type('category', 'reasearch');\r\n\t//register_taxonomy_for_object_type('post_tag', 'reasearch');\r\n}", "function cds_problem_single_meta() {\r\n $prefix = 'cds_problem_single_';\r\n \r\n $preview = new_cmb2_box( array(\r\n 'id' => $prefix.'preview',\r\n 'title' => __( 'Problem Card', 'cmb2' ),\r\n 'object_types' => array('cds_problem_single'),\r\n 'context' => 'normal',\r\n 'show_names' => true\r\n ));\r\n \r\n $preview->add_field(array(\r\n 'id' => $prefix . 'excerpt',\r\n 'name' => __( 'Problem Excerpt', 'cmb2' ),\r\n\t'desc' => __( 'A brief description of the problem', 'cmb2' ),\r\n 'type' => 'textarea_small',\r\n ));\r\n $preview->add_field( array(\r\n 'name' => __( 'Sponsors' ),\r\n 'id' => $prefix.'sponsors',\r\n\t'desc' \t\t => __( 'Click the Search Icon to search Sponsors. List the WordPress IDs, separated by commas, in order for first to last.', 'cmb2' ),\r\n 'type' => 'post_search_text',\r\n 'post_type' => 'cds_sponsor_single',\r\n 'select_behavior' => 'add', // Will replace any selection with selection from modal. Default is 'add'\r\n ));\r\n $preview->add_field(array(\r\n 'id' => $prefix . 'git_link',\r\n 'name' => __( 'Git Repo URL', 'cmb2' ),\r\n\t'desc' => __( 'Optional (leave any optional field blank to hide that field.) Ex: http://www.github.org', 'cmb2' ),\r\n 'type' => 'text_url',\r\n ));\r\n $preview->add_field(array(\r\n 'id' => $prefix . 'form_link',\r\n 'name' => __( 'Get Involved URL', 'cmb2' ),\r\n\t'desc' => __( 'Optional. Ex: http://www.google.com', 'cmb2' ),\r\n 'type' => 'text_url',\r\n ));\r\n $preview->add_field(array(\r\n 'id' => $prefix . 'twitter_excerpt',\r\n 'name' => __( 'Twitter Excerpt', 'cmb2' ),\r\n\t'desc' => __( 'Optional. Pre-populates the tweet. Ex: I support Simplifying the Capitol Flag Program!', 'cmb2' ),\r\n 'type' => 'text',\r\n ));\r\n $preview->add_field(array(\r\n 'id' => $prefix . 'twitter_hashtag',\r\n 'name' => __( 'Twitter Hashtag', 'cmb2' ),\r\n\t'desc' => __( 'Optional, comma separated. Do not use #. Ex: cds,congress', 'cmb2' ),\r\n 'type' => 'text',\r\n ));\r\n }", "function my_remove_post_type_support()\n{\n\tremove_post_type_support('page', 'editor');\n\tremove_post_type_support('post', 'editor');\n\tremove_post_type_support('companies', 'editor');\n\tremove_post_type_support('group_of_companies', 'editor');\n}", "function cactus_savepost_parse_shortcode_custom_css($post_id){\r\n\t\t$post = get_post( $post_id );\r\n\r\n\t\t$content = $post->post_content;\r\n\r\n\t\t$used_shortcodes = array();\r\n\t\t$replacements = array();\r\n\t\t$css = $this->cactus_parse_inlinecss($content, $used_shortcodes, $replacements);\r\n\r\n\t\tif ( empty( $css ) ) {\r\n\t\t\tdelete_post_meta( $post_id, '_cactus_shortcodes_custom_css' );\r\n\t\t} else {\r\n\t\t\tupdate_post_meta( $post_id, '_cactus_shortcodes_custom_css', $css );\r\n\t\t}\r\n\r\n\t\tif (count($used_shortcodes) > 0){\r\n\t\t\tupdate_post_meta( $post_id, '_cactus_shortcodes', $used_shortcodes );\r\n\t\t} else {\r\n\t\t\tdelete_post_meta( $post_id, '_cactus_shortcodes' );\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tforeach($replacements as $replace){\r\n\t\t\t$content = str_replace($replace[0], $replace[1], $content);\r\n\t\t}\r\n\t\t\r\n\t\t// to prevent losing data\r\n\t\tif($content != '')\r\n\t\t\t$post->post_content = $content;\r\n\r\n\t\t// unhook this function so it doesn't loop infinitely\r\n\t\tremove_action('save_post', array($this,'cactus_savepost_parse_shortcode_custom_css'));\r\n\r\n\t\t// update the post, which calls save_post again\r\n\t\twp_update_post( $post );\r\n\r\n\t\t// re-hook this function\r\n\t\tadd_action('save_post', array($this,'cactus_savepost_parse_shortcode_custom_css'));\r\n\t}", "function ptthemes_meta_box_content() {\n\tglobal $post, $pt_metaboxes;\n\t$output = '';\n\t$output .= '<div class=\"pt_metaboxes_table\">' . \"\\n\";\n\tforeach ( $pt_metaboxes as $pt_id => $pt_metabox ) {\n\t\tif ( $pt_metabox['type'] == 'text' or $pt_metabox['type'] == 'select' or $pt_metabox['type'] == 'checkbox' or $pt_metabox['type'] == 'textarea' ) {\n\t\t\t$pt_metaboxvalue = get_post_meta( $post->ID,$pt_metabox['name'],true );\n\t\t}\n\t\tif ( $pt_metaboxvalue == '' || ! isset( $pt_metaboxvalue ) ) {\n\t\t\t$pt_metaboxvalue = $pt_metabox['default'];\n\t\t}\n\t\tif ( $pt_metabox['type'] == 'text' ) {\n\n\t\t\t\t\t\t$output .= \"\\t\" . '<div>';\n\t\t\t$output .= \"\\t\\t\" . '<br/><p><strong><label for=\"' . $pt_id . '\">' . $pt_metabox['label'] . '</label></strong></p>' . \"\\n\";\n\t\t\t$output .= \"\\t\\t\" . '<p><input size=\"100\" class=\"pt_input_text\" type=\"' . $pt_metabox['type'] . '\" value=\"' . $pt_metaboxvalue . '\" name=\"ptthemes_' . $pt_metabox['name'] . '\" id=\"' . $pt_id . '\"/></p>' . \"\\n\";\n\t\t\t$output .= \"\\t\\t\" . '<p><span style=\"font-size:11px\">' . $pt_metabox['desc'] . '</span></p>' . \"\\n\";\n\t\t\t$output .= \"\\t\" . '</div>' . \"\\n\";\n\n\t\t} elseif ( $pt_metabox['type'] == 'textarea' ) {\n\n\t\t\t\t\t\t$output .= \"\\t\" . '<div>';\n\t\t\t$output .= \"\\t\\t\" . '<br/><p><strong><label for=\"' . $pt_id . '\">' . $pt_metabox['label'] . '</label></strong></p>' . \"\\n\";\n\t\t\t$output .= \"\\t\\t\" . '<p><textarea rows=\"5\" cols=\"98\" class=\"pt_input_textarea\" name=\"ptthemes_' . $pt_metabox['name'] . '\" id=\"' . $pt_id . '\">' . $pt_metaboxvalue . '</textarea></p>' . \"\\n\";\n\t\t\t$output .= \"\\t\\t\" . '<p><span style=\"font-size:11px\">' . $pt_metabox['desc'] . '</span></p>' . \"\\n\";\n\t\t\t$output .= \"\\t\" . '</div>' . \"\\n\";\n\n\t\t} elseif ( $pt_metabox['type'] == 'select' ) {\n\n\t\t\t\t\t\t\t\t\t\t$output .= \"\\t\" . '<div>';\n\t\t\t$output .= \"\\t\\t\" . '<br/><p><strong><label for=\"' . $pt_id . '\">' . $pt_metabox['label'] . '</label></strong></p>' . \"\\n\";\n\t\t\t$output .= \"\\t\\t\" . '<p><select class=\"pt_input_select\" id=\"' . $pt_id . '\" name=\"ptthemes_' . $pt_metabox['name'] . '\"></p>' . \"\\n\";\n\t\t\t$output .= '<option>Select a Upload</option>';\n\n\t\t\t\t\t\t\t$array = $pt_metabox['options'];\n\n\t\t\tif ( $array ) {\n\t\t\t\tforeach ( $array as $id => $option ) {\n\t\t\t\t\t$selected = '';\n\t\t\t\t\tif ( $pt_metabox['default'] == $option ) {$selected = 'selected=\"selected\"';}\n\t\t\t\t\tif ( $pt_metaboxvalue == $option ) {$selected = 'selected=\"selected\"';}\n\t\t\t\t\t$output .= '<option value=\"' . $option . '\" ' . $selected . '>' . $option . '</option>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\t\t\t\t$output .= '</select><p><span style=\"font-size:11px\">' . $pt_metabox['desc'] . '</span></p>' . \"\\n\";\n\t\t\t$output .= \"\\t\" . '</div>' . \"\\n\";\n\t\t} elseif ( $pt_metabox['type'] == 'checkbox' ) {\n\t\t\tif ( $pt_metaboxvalue == 'on' ) { $checked = 'checked=\"checked\"';\n\t\t\t} else { $checked = '';}\n\n\t\t\t\t$output .= \"\\t\" . '<div>';\n\t\t\t$output .= \"\\t\\t\" . '<br/><p><strong><label for=\"' . $pt_id . '\">' . $pt_metabox['label'] . '</label></strong></p>' . \"\\n\";\n\t\t\t$output .= \"\\t\\t\" . '<p><input type=\"checkbox\" ' . $checked . ' class=\"pt_input_checkbox\" id=\"' . $pt_id . '\" name=\"ptthemes_' . $pt_metabox['name'] . '\" /></p>' . \"\\n\";\n\t\t\t$output .= \"\\t\\t\" . '<p><span style=\"font-size:11px\">' . $pt_metabox['desc'] . '</span></p>' . \"\\n\";\n\t\t\t$output .= \"\\t\" . '</div>' . \"\\n\";\n\n\t\t}// End if().\n\t}// End foreach().\n\n\t\t$output .= '</div>' . \"\\n\\n\";\n\techo $output;\n}", "function tc_child_metabox() {\n\n // Start with an underscore to hide fields from custom fields list\n $prefix = '_tcm_';\n\n /**\n * Initiate the metabox\n */\n $cmb = new_cmb2_box( array(\n 'id' => 'tour_priority_set',\n 'title' => __( 'Priority Set', 'tcevents' ),\n 'object_types' => array( 'event', ), // Post type\n 'context' => 'side',\n 'priority' => 'high',\n 'show_names' => true, // Show field names on the left\n 'cmb_styles' => false, // false to disable the CMB stylesheet\n //'closed' => true, // Keep the metabox closed by default\n ) );\n\n // Select Post type whether its an event or tour or movie\n $cmb->add_field( [\n 'desc' => __('Check if this goes on top!', 'tcevents'),\n 'id' => $prefix . 'priority_pack',\n 'type' => 'checkbox',\n ] );\n\n}", "function ppc_add_custom_metaboxes(){\n add_meta_box('my_meta_box_id','Post Submission Actions','ppc_post_submission','ppclps','normal','high');\n}", "function post_custom_meta_box($post)\n {\n }", "function gf_testimonials_cpt() {\n\nregister_post_type( 'testimonials',\n array(\n 'labels' => array(\n 'name' => __( 'Testimonials' ),\n 'singular_name' => __( 'Testimonial' ),\t\t\n\t\t'add_new' => _x( 'Add New', 'Testimonial' ),\n\t\t'add_new_item' => __( 'Add New Testimonial' ),\n\t\t'edit_item' => __( 'Edit Testimonial' ),\n\t\t'new_item' => __( 'New Testimonial' ),\n\t\t'view_item' => __( 'View Testimonials' ),\n\t\t'search_items' => __( 'Search Testimonials' ),\n\t\t'not_found' => __( 'No Testimonials found' ),\n\t\t'not_found_in_trash' => __( 'Testimonials found in Trash' ),\n\t\t'parent_item_colon' => ''\n\t\t\n ),\n 'public' => true,\n\t 'supports' => array('title', 'editor', 'thumbnail'),\n\t 'menu_icon' => GF_TESTIMONIALS_PLUGIN_URL .'assets/images/icon-testimonials.png',\n\t 'query_var' => true,\n\t 'rewrite' => array( 'slug' => 'testimonials' ),\n )\n );\n}", "function assignCustomProperties($action) {\r\n\r\n\t\t$database = $this->_db;\r\n\t\t$cid = JRequest::getVar('cid', 0, '', 'array');\r\n\t\t$ce = $this->_content_element;\r\n\t\t$ref_table = $ce->table;\r\n\r\n\t\t// retrieve cp_fields id\r\n\t\tforeach ($cid as $content_id) {\r\n\r\n\t\t\tif ($action == 'delete' || $action == 'replace') {\r\n\t\t\t\t// clean previous properties\r\n\t\t\t\t$query = \"delete FROM #__custom_properties\r\n\t\t\t\t\tWHERE content_id = '$content_id' AND ref_table = '$ref_table' \";\r\n\r\n\t\t\t\t$database->setQuery($query);\r\n\t\t\t\t$database->query();\r\n\t\t\t}\r\n\r\n\t\t\tif ($action == \"add\" || $action == \"replace\") {\r\n\t\t\t\tforeach ($_POST as $key => $field_values) {\r\n\t\t\t\t\tif (strpos($key, 'cp_') === 0) {\r\n\t\t\t\t\t\t$field_name = $database->getEscaped(substr($key, 3));\r\n\t\t\t\t\t\tforeach ($field_values as $field_value) {\r\n\t\t\t\t\t\t\t$field_value = $database->getEscaped($field_value);\r\n\r\n\t\t\t\t\t\t\t$query = \"\r\n\t\t\t\t REPLACE INTO #__custom_properties (ref_table, content_id,field_id,value_id)\r\n\t\t\t\t SELECT '$ref_table','$content_id',f.id AS field, v.id AS value\r\n\t\t\t\t FROM #__custom_properties_fields f\r\n\t\t\t\t INNER JOIN #__custom_properties_values v\r\n\t\t\t\t ON(f.id = v.field_id)\r\n\t\t\t\t WHERE f.name = '$field_name'\r\n\t\t\t\t AND v.name = '$field_value' \";\r\n\r\n\t\t\t\t\t\t\t$database->setQuery($query);\r\n\t\t\t\t\t\t\t$database->query();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "function register_cpt_Testimonial() {\n\n $labels = array(\n 'name' => _x( 'Testimonials', 'Testimonial' ),\n 'singular_name' => _x( 'Testimonial', 'Testimonial' ),\n 'add_new' => _x( 'Add New', 'Testimonial' ),\n 'add_new_item' => _x( 'Add New Testimonial', 'Testimonial' ),\n 'edit_item' => _x( 'Edit Testimonial', 'Testimonial' ),\n 'new_item' => _x( 'New Testimonial', 'Testimonial' ),\n 'view_item' => _x( 'View Testimonial', 'Testimonial' ),\n 'search_items' => _x( 'Search Testimonials', 'Testimonial' ),\n 'not_found' => _x( 'No Testimonials found', 'Testimonial' ),\n 'not_found_in_trash' => _x( 'No Testimonials found in Trash', 'Testimonial' ),\n 'parent_item_colon' => _x( 'Parent Testimonial:', 'Testimonial' ),\n 'menu_name' => _x( 'Testimonials', 'Testimonial' ),\n );\n\n $args = array(\n 'labels' => $labels,\n 'hierarchical' => true,\n 'description' => 'Customer Testimonials',\n 'supports' => array( 'title'),\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-editor-quote',\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( 'Testimonial', $args );\n}", "function save_meta_box( $post_id ) {\r\r\n global $post, $key;\r\r\n \r\r\n if ( 'page' == $_POST['post_type'] )\r\r\n\t\t$meta_boxes = array_merge(vulcan_page_meta_boxes());\r\r\n\telseif ( 'portfolio' == $_POST['post_type'] )\r\r\n\t\t$meta_boxes = array_merge(vulcan_portfolio_meta_boxes());\r\r\n\telseif ( 'slideshow' == $_POST['post_type'] )\r\r\n\t\t$meta_boxes = array_merge(vulcan_slideshow_meta_boxes());\t\t\r\r\n\telseif ( 'post' == $_POST['post_type'] )\r\r\n\t\t$meta_boxes = array_merge(vulcan_post_meta_boxes());\r\r\n \r\r\n if (is_array($meta_boxes )) {\r\r\n foreach( $meta_boxes as $meta_box ) {\r\r\n $data[ $meta_box[ 'name' ] ] = $_POST[ $meta_box[ 'name' ] ];\r\r\n }\r\r\n }\r\r\n \r\r\n if ( !wp_verify_nonce( $_POST[ $key . '_wpnonce' ], plugin_basename(__FILE__) ) )\r\r\n return $post_id;\r\r\n \r\r\n if ( 'page' == $_POST['post_type'] && !current_user_can( 'edit_page', $post_id ) )\r\r\n \treturn $post_id;\r\r\n \t\r\r\n elseif ( 'portfolio' == $_POST['post_type'] && !current_user_can( 'edit_post', $post_id ) )\r\r\n \treturn $post_id;\r\r\n \r\r\n elseif ( 'slideshow' == $_POST['post_type'] && !current_user_can( 'edit_post', $post_id ) )\r\r\n \treturn $post_id; \t\r\r\n \r\r\n elseif ( 'post' == $_POST['post_type'] && !current_user_can( 'edit_post', $post_id ) )\r\r\n \treturn $post_id;\r\r\n \r\r\n update_post_meta( $post_id, $key, $data );\r\r\n}", "function TS_VCSC_Testimonials_Codestar() {\r\n\t\tglobal $pagenow;\t\t\r\n\t\t$screen \t\t\t\t\t\t\t\t= TS_VCSC_GetCurrentPostType();\r\n\t\t$prefixA \t\t\t\t\t\t\t\t= 'ts_vcsc_testimonial_basic_';\r\n\t\t\r\n\t\t// Migration of Old Metadata for Existing Posts\r\n\t\tif (($screen == 'ts_testimonials') && ($pagenow == 'post.php')) {\r\n\t\t\t$metaOld\t\t\t\t\t\t= array('ts_vcsc_testimonial_basic_author', 'ts_vcsc_testimonial_basic_position');\r\n\t\t\t$metaSwitch\t\t\t\t\t\t= array();\r\n\t\t\t$metaGallery\t\t\t\t\t= array();\r\n\t\t\t$metaImage\t\t\t\t\t\t= array();\r\n\t\t\tif (function_exists('TS_VCSC_Codestar_Migrate_Routine')){\r\n\t\t\t\tTS_VCSC_Codestar_Migrate_Routine(get_the_ID(), 'ts_testimonials', $metaOld, $metaSwitch, $metaGallery, $metaImage, 'ts_vcsc_testimonial_basic', 0, 'ts_vcsc_testimonial_migrated', false, false, false);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Configure Metabox - Testimonials\r\n\t\tif (($screen == 'ts_testimonials') && ($pagenow == 'post-new.php' || $pagenow == 'post.php')) {\r\n\r\n if (class_exists('CSF')) { \r\n \r\n $prefix_page_opts = 'ts_vcsc_custompost_migrated';\r\n \r\n CSF::createMetabox($prefix_page_opts, array(\r\n 'title' => 'Testimonial Migration',\r\n 'post_type' => 'ts_testimonials',\r\n 'theme' => 'dark',\r\n 'priority' => 'default',\r\n 'context' => 'side',\r\n 'show_restore' => false,\r\n )); \r\n CSF::createSection($prefix_page_opts, array(\r\n 'title' => 'Testimonial Migration',\r\n 'icon' => 'fa fa-check-square-o',\r\n 'fields' => array(\r\n array(\r\n 'id'\t\t => 'ts_vcsc_testimonial_migrated',\r\n 'type' \t => 'inputhidden',\r\n 'title'\t\t => 'Migration Success:',\r\n 'default' \t => 'true',\r\n ),\r\n )\r\n ));\r\n \r\n $prefix_page_opts = 'ts_vcsc_testimonial_basic';\r\n\r\n CSF::createMetabox($prefix_page_opts, array(\r\n 'title' => 'Testimonial Information',\r\n 'post_type' => 'ts_testimonials',\r\n 'theme' => 'dark',\r\n 'priority' => 'high',\r\n 'context' => 'normal',\r\n 'show_restore' => false,\r\n ));\r\n CSF::createSection($prefix_page_opts, array(\r\n 'title' => 'Testimonial Information',\r\n 'icon' => 'fa fa-quote-right',\r\n 'fields' => array(\r\n array(\r\n 'type' \t => 'subheading',\r\n 'content' \t => 'Add some additional information for the testimonial or quote, such as the name of the author.',\r\n ),\r\n array(\r\n 'id' \t => $prefixA . 'author',\r\n 'type' \t => 'text',\r\n 'title' \t => 'Author Name:',\r\n 'help' \t\t => 'Enter the name of the person this tesimonial or quote is attributed to.',\r\n ),\r\n array(\r\n 'id' \t => $prefixA . 'position',\r\n 'type' \t => 'text',\r\n 'title' \t => 'Note:',\r\n 'help' \t\t => 'Enter a note (i.e. company, position, etc.) about the person this tesimonial or quote is attributed to.',\r\n ),\r\n )\r\n ));\r\n } \r\n\t\t}\r\n\t}", "function wck_add_metabox() {\r\n\t\t\r\n\t\tglobal $pb_wck_pages_hooknames;\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' ){\r\n\t\t\tif( $this->args['post_id'] == '' && $this->args['page_template'] == '' ){\r\n\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), $this->args['post_type'], $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']) );\r\n\t\t\t\t/* add class to meta box */\r\n\t\t\t\tadd_filter( \"postbox_classes_\".$this->args['post_type'].\"_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\r\n\t\t\t}\r\n\t\t\telse{\t\t\t\t\r\n\t\t\t\tif( !empty( $_GET['post'] ) )\r\n\t\t\t\t\t$post_id = filter_var( $_GET['post'], FILTER_SANITIZE_NUMBER_INT );\r\n\t\t\t\telse if( !empty( $_POST['post_ID'] ) )\r\n\t\t\t\t\t$post_id = filter_var( $_POST['post_ID'], FILTER_SANITIZE_NUMBER_INT );\r\n\t\t\t\telse \r\n\t\t\t\t\t$post_id = '';\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\tif( $this->args['post_id'] != '' && $this->args['page_template'] != '' ){\r\n\t\t\t\t\t$template_file = get_post_meta($post_id,'_wp_page_template',TRUE);\t\t\t\t\r\n\t\t\t\t\tif( $this->args['post_id'] == $post_id && $template_file == $this->args['page_template'] )\r\n\t\t\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), 'page', $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array'] ) );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t/* add class to meta box */\r\n\t\t\t\t\tadd_filter( \"postbox_classes_page_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\t\tif( $this->args['post_id'] != '' ){\r\n\t\t\t\t\t\tif( $this->args['post_id'] == $post_id ){\r\n\t\t\t\t\t\t\t$post_type = get_post_type( $post_id );\r\n\t\t\t\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), $post_type, $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array'] ) );\r\n\t\t\t\t\t\t\t/* add class to meta box */\r\n\t\t\t\t\t\t\tadd_filter( \"postbox_classes_\".$post_type.\"_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\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\tif( $this->args['page_template'] != '' ){\r\n\t\t\t\t\t\t$template_file = get_post_meta($post_id,'_wp_page_template',TRUE);\t\r\n\t\t\t\t\t\tif ( $template_file == $this->args['page_template'] ){\r\n\t\t\t\t\t\t\tadd_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array( &$this, 'wck_content' ), 'page', $this->args['mb_context'], 'high', array( 'meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']) );\r\n\t\t\t\t\t\t\t/* add class to meta box */\r\n\t\t\t\t\t\t\tadd_filter( \"postbox_classes_page_\".$this->args['metabox_id'], array( &$this, 'wck_add_metabox_classes' ) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\telse if( $this->args['context'] == 'option' ){\r\n if( !empty( $pb_wck_pages_hooknames[$this->args['post_type']] ) ) {\r\n add_meta_box($this->args['metabox_id'], $this->args['metabox_title'], array(&$this, 'wck_content'), $pb_wck_pages_hooknames[$this->args['post_type']], $this->args['mb_context'], 'high', array('meta_name' => $this->args['meta_name'], 'meta_array' => $this->args['meta_array']));\r\n /* add class to meta box */\r\n add_filter(\"postbox_classes_\" . $pb_wck_pages_hooknames[$this->args['post_type']] . \"_\" . $this->args['metabox_id'], array(&$this, 'wck_add_metabox_classes'));\r\n }\r\n\t\t}\r\n\t}", "function cinerama_edge_remove_default_custom_fields() {\n\t\tforeach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n\t\t\tforeach ( apply_filters( 'cinerama_edge_filter_meta_box_post_types_remove', array( 'post', 'page' ) ) as $postType ) {\n\t\t\t\tremove_meta_box( 'postcustom', $postType, $context );\n\t\t\t}\n\t\t}\n\t}", "function toolbox_portfolio_meta_boxes_setup() {\n /* Add meta boxes on the 'add_meta_boxes' hook. */\n add_action( 'add_meta_boxes', 'toolbox_add_portfolio_meta_box' );\n\n /* Save post meta on the 'save_post' hook. */\n add_action( 'save_post', 'toolbox_portfolio_save_info', 10, 2 );\n}", "function add_cpt_to_loop( $query ) {\n if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {\n \n // Get all your post types\n $post_types = get_post_types();\n \n $query->set( 'post_type', $post_types );\n return $query;\n }\n }", "function display_fzproject_meta_box($item)\n{\n $source = esc_html(get_post_meta($item->ID, 'source', true));\n $content = get_post_meta($item->ID, 'about', true);\n\n?>\n\n<div style=\"float:left; width:50%;\">\n\n\n<div class=\"url postbox\" style=\"float:left; width:100%;\">\n <h3>Isotope item URL</h3>\n <div class=\"inside\">\n <h4>This will be used for linking Isotope items with post or outside adress</h4>\n <font style=\"font-size:11px;\">(Where to redirect, when you click Isotope item)</font>\n <input id=\"fzproject_source\" onchange=\"preview('srcpreview');\" type=\"text\" size=\"80\" name=\"fzproject_source\" value=\"<?php\n echo $source; ?>\" />\n </div>\n</div>\n\n\n<div style=\"clear:both;\"></div>\n<div class=\"thumb\" style=\"float:left; width:100%;\"></div>\n<div style=\"clear:both;\"></div>\n<div class=\"cat\" style=\"float:left; width:100%;\"></div>\n<div style=\"clear:both;\"></div>\n\n</div>\n\n\n<div style=\"float:left; width:50%;\">\n\n<div class=\"postbox\" style=\"float:left; width:100%;\">\n <h3>About project</h3>\n <div class=\"inside\">\n<div class=\"about\" style=\"float:left; width:100%;\">\n<?php wp_editor( $content, 'fzproject_about' ); ?>\n\n</div>\n </div>\n</div>\n\n</div>\n\n\n<div class=\"postbox\" style=\"float:left; width:100%;\">\n <h3>Content</h3>\n <div class=\"inside\">\n <div class=\"editor\"></div>\n </div>\n</div>\n<div style=\"clear:both;\"></div>\n\n\t<?php\n}", "function construction_realestate_posttype_cs_custom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'construction-realestate-posttype' ), 'construction_realestate_posttype_cs_meta_callback' , 'agents');\n}", "public function testimonial_cpt ()\n\t{\n\t\t$labels = array(\n\t\t\t'name' => 'Testimonials',\n\t\t\t'singular_name' => 'Testimonial'\n\t\t);\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'has_archive' => false,\n\t\t\t'menu_icon' => 'dashicons-testimonial',\n\t\t\t'exclude_from_search' => true,\n\t\t\t'publicly_queryable' => false,\n\t\t\t'supports' => array( 'title', 'editor' ),\n 'show_in_rest' => true\n\t\t);\n\t\tregister_post_type ( 'testimonial', $args );\n\t}", "function TS_VCSC_Testimonials_RemoveExternalMetaboxes() { \r\n\t\tglobal $pagenow;\r\n\t\t$screen = TS_VCSC_GetCurrentPostType();\r\n\t\tif ($screen=='ts_testimonials') {\r\n\t\t\tif ($pagenow=='post-new.php' || $pagenow=='post.php') {\r\n\t\t\t\tremove_meta_box('eg-meta-box', 'ts_testimonials', 'normal'); \r\n\t\t\t\tremove_meta_box('mymetabox_revslider_0', 'ts_testimonials', 'normal'); \r\n\t\t\t} \r\n\t\t} \r\n\t}", "function remove_extra_meta_boxes() {\n\tremove_meta_box( 'postcustom' , 'post' , 'normal' ); // custom fields for posts.\n\tremove_meta_box( 'revisionsdiv' , 'post' , 'normal' ); // custom fields for posts.\n\tremove_meta_box( 'postcustom' , 'page' , 'normal' ); // custom fields for pages.\n\tremove_meta_box( 'commentsdiv' , 'page' , 'normal' ); // recent comments for pages.\n\tremove_meta_box( 'tagsdiv-post_tag' , 'page' , 'side' ); // page tags.\n\tremove_meta_box( 'trackbacksdiv' , 'post' , 'normal' ); // post trackbacks.\n\tremove_meta_box( 'trackbacksdiv' , 'page' , 'normal' ); // page trackbacks.\n\tremove_meta_box( 'slugdiv', 'post', 'normal' ); // post slug.\n\tremove_meta_box( 'slugdiv', 'page', 'normal' ); // page slug.\n}", "function custom_bcn_template_tag($replacements, $type, $id)\n{\n if (in_array('post-products', $type)) {\n $short_title = get_field('short_title', $id);\n $replacements['%short_title%'] = ($short_title) ? $short_title : $replacements['%htitle%'];\n } else {\n $replacements['%short_title%'] = $replacements['%htitle%'];\n }\n return $replacements;\n}", "function edd_incentives_add_meta_boxes() {\n add_meta_box( 'edd-incentive-preview', __( 'Preview', 'edd-incentives' ), 'edd_incentives_render_preview', 'incentive', 'side', 'default' );\n add_meta_box( 'edd-incentive-options', __( 'Options', 'edd-incentives' ), 'edd_incentives_render_options', 'incentive', 'side', 'default' );\n add_meta_box( 'edd-incentive-exit-options', __( 'Exit Button', 'edd-incentives' ), 'edd_incentives_render_exit_options', 'incentive', 'side', 'default' );\n add_meta_box( 'edd-incentive-conditions', __( 'Conditions For Display', 'edd-incentives' ), 'edd_incentives_render_conditions', 'incentive', 'normal', 'default' );\n\n // Render the pseudo-metabox for the template tags\n add_action( 'edit_form_after_title', 'edd_incentives_render_template_tags' );\n}", "function meta_box_position() {\n\t$post_types = get_custom_post_types();\n\t// Comment the next 2 lines to exclude Page and Post.\n\t$post_types['post'] = 'post';\n\tforeach ( $post_types as $post_type ) {\n\t\tremove_meta_box( 'postimagediv', $post_type, 'side' );\n\t\tadd_meta_box('postimagediv', __('Feature Image'), 'post_thumbnail_meta_box', $post_type, 'acf_after_title', 'high');\n\t}\n}", "function wordcomat_custom_meta() {\n add_meta_box( 'wordcomat_meta', __( 'Wordcomat', 'wordcomat' ), 'wordcomat_meta_callback', array('post','page') );\n}", "function metawrap_content_div( $content ){\n global $post;\n if($post->post_type == 'post') {\n $custom_fields = get_post_custom();\n $premetacontent = '<div class=\"meta-tags-content\"><div class=\"well\"><ul>';\n $postmetacontent = '';\n if ($custom_fields[\"workout_date\"][0] || $custom_fields[\"qic\"][0] || $custom_fields[\"the_pax\"][0]) {\n if ($custom_fields[\"qic\"][0]) {\n $premetacontent = $premetacontent . '<li><strong>QIC:</strong> <span class=\"qic\">' . $custom_fields[\"qic\"][0] . ' </span></li>';\n }\n if ($custom_fields[\"workout_date\"][0]) {\n $premetacontent = $premetacontent . '<li><strong>When:</strong> <span class=\"workout_date\">' . $custom_fields[\"workout_date\"][0] . ' </span></li>';\n }\n if ($custom_fields[\"the_pax\"][0]) {\n $premetacontent = $premetacontent . '<li><strong>Pax:</strong> ' . $custom_fields[\"the_pax\"][0] . ' </li>';\n }\n }\n $premetacontent = $premetacontent . get_the_tag_list('<li><strong>Pax:</strong> <span class=\"the_pax\">', ', ', ' </span></li> ');\n $premetacontent = $premetacontent . format_categories();\n $premetacontent = $premetacontent . '</ul></div>';\n $postmetacontent = $postmetacontent . tclaps_snippet() . '</div>';\n $postmetacontent = $postmetacontent . '<div style=\"display:none\" id=\"jv_tests\">' . get_stylesheet_directory_uri() . '/styles/style.css' . '</div>';\n $content = $premetacontent . $content . $postmetacontent;\n }\n return $content;\n}", "public static function remove_default_custom_fields( $type, $context, $post ) \n\t{\n\t\t$content_types_array = self::_get_active_content_types();\n\t\tforeach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n\t\t\tforeach ( $content_types_array as $content_type )\n\t\t\t{\n\t\t\t\tremove_meta_box( 'postcustom', $content_type, $context );\n\t\t\t}\n\t\t}\n\t}", "function register_custom_metabox_custompost()\n { \n add_meta_box(\"custom-post\",\"publish date for news\",\"custompost_display_callback\",\"custompost\",\n \"normal\",\"high\");\n }", "function myplugin_add_custom_box() {\n\t\t add_meta_box( \n\t\t 'myplugin_sectionid',\n\t\t __( 'My Post Section Title', 'myplugin_textdomain' ),\n\t\t 'myplugin_inner_custom_box',\n\t\t 'wpflexslider' \n\t\t );\n\t\t add_meta_box(\n\t\t 'myplugin_sectionid',\n\t\t __( 'My Post Section Title', 'myplugin_textdomain' ), \n\t\t 'myplugin_inner_custom_box',\n\t\t 'page'\n\t\t );\n\t\t add_meta_box('wpt_events_location', 'Event Location', 'wpt_events_location', 'events', 'side', 'default');\n\t\t}", "function ecademy_add_cpt_support() {\n\n //if exists, assign to $cpt_support var\n $cpt_support = get_option( 'elementor_cpt_support' );\n\n //check if option DOESN'T exist in db\n if ( ! $cpt_support ) {\n $cpt_support = [ 'page', 'post', 'header', 'footer' ]; //create array of our default supported post types\n update_option( 'elementor_cpt_support', $cpt_support ); //write it to the database\n }\n //if it DOES exist, but header is NOT defined\n elseif ( !in_array( 'header', $cpt_support ) ) {\n $cpt_support[] = 'header'; //append to array\n update_option( 'elementor_cpt_support', $cpt_support ); //update database\n }\n //if it DOES exist, but footer is NOT defined\n elseif ( !in_array( 'footer', $cpt_support ) ) {\n $cpt_support[] = 'footer'; //append to array\n update_option( 'elementor_cpt_support', $cpt_support ); //update database\n\t}\n}", "function fzproject_meta_box()\n{\n add_meta_box('fzproject_meta_box', 'New portfolio item', 'display_fzproject_meta_box', 'fzproject_post', 'normal', 'high');\n}", "function move_registration_meta_boxes(){\n\t// change featured image box title for 'coz_registry' post type move 'Registration' meta boxes to side in coz_registry post type\n \tremove_meta_box( 'postimagediv', 'coz_registry', 'side' );\n add_meta_box('postimagediv', 'Upload a picture of the Cozmeena Shawl and/or recipient (OPTIONAL)', 'post_thumbnail_meta_box', 'coz_registry', 'side','high');\n\t// Remove \"Revisions\" meta box\n\tremove_meta_box( 'revisionsdiv', 'coz_registry', 'side' );\n}", "function workshop_attendee_cpt_init() {\n $labels = array(\n 'singular' => __( 'Attendee', 'workshop' ),\n 'plural' => __( 'Attendees', 'workshop' ),\n 'all_items' => __( 'All Attendees', 'workshop' ),\n 'add_new_item' => __( 'Add New Attendee', 'workshop' ),\n 'edit_item' => __( 'Edit Attendee', 'workshop' ),\n 'new_item' => __( 'New Attendee', 'workshop' ),\n 'view_item' => __( 'View Attendee', 'workshop' ),\n 'search_items' => __( 'Search Attendees', 'workshop' ),\n 'not_found' => __( 'No Attendees found', 'workshop' ),\n 'not_found_in_trash'=> __( 'No Attendees found in Trash', 'workshop' ),\n 'update_item' => __( 'Update Attendee', 'workshop' ),\n 'metabox_about' => __( 'About Attendee', 'workshop' ),\n );\n\n // Register a post type to store our Attendees that aren't WP users\n $args = array(\n // 'label' => $labels['singular'],\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => false,\n 'exclude_from_search' => true,\n 'show_in_menu' => false,\n 'supports' => array( 'thumbnail' ),\n 'taxonomies' => array( 'chapter' ), // $attendee_taxonomy\n 'rewrite' => false,\n 'query_var' => false,\n );\n register_post_type( 'attendee', $args );\n}", "function clicks_register_my_cpt_process() {\n\n // Post Type: Process.\n\n $labels = array(\n \"name\" => __( \"Process\", \"custom-post-type\" ),\n \"singular_name\" => __( \"Process\", \"custom-post-type\" ),\n );\n\n $args = array(\n \"label\" => __( \"Process\", \"custom-post-type\" ),\n \"labels\" => $labels,\n \"description\" => \"\",\n \"public\" => true,\n \"publicly_queryable\" => true,\n \"show_ui\" => true,\n \"delete_with_user\" => false,\n \"show_in_rest\" => false,\n \"rest_base\" => \"\",\n \"rest_controller_class\" => \"WP_REST_Posts_Controller\",\n \"has_archive\" => false,\n \"show_in_menu\" => true,\n \"show_in_nav_menus\" => true,\n \"exclude_from_search\" => false,\n \"capability_type\" => \"post\",\n \"map_meta_cap\" => true,\n \"hierarchical\" => false,\n \"rewrite\" => array( \"slug\" => \"process\", \"with_front\" => true ),\n \"query_var\" => true,\n \"menu_position\" => 21,\n \"supports\" => array( \"title\", \"editor\", \"thumbnail\" ),\n \"taxonomies\" => array( \"category\" ),\n );\n\n register_post_type( \"process\", $args );\n}", "function press_post_type() {\n\n// Set UI labels for Custom Post Type\n\t$labels = array(\n\t\t'name' => _x( 'Press', 'Post Type General Name'),\n\t\t'singular_name' => _x( 'Press', 'Post Type Singular Name'),\n\t\t'menu_name' => __( 'Press'),\n\t\t'all_items' => __( 'All Press'),\n\t\t'view_item' => __( 'View Press'),\n\t\t'add_new_item' => __( 'Add New Press'),\n\t\t'add_new' => __( 'Add New'),\n\t\t'edit_item' => __( 'Edit Press'),\n\t\t'update_item' => __( 'Update Press')\n\n\t\t\n\t);\n\t\n// Set other options for Custom Post Type\n\t\n\t$args = array(\n\t\t'label' => __( 'press'),\n\t\t'labels' => $labels,\n\t\t// Features this CPT supports in Post Editor\n\t\t'supports' => array( 'title', 'editor', 'thumbnail'),\n \n\t\t/* A hierarchical CPT is like Pages and can have\n\t\t* Parent and child items. A non-hierarchical CPT\n\t\t* is like Posts.\n\t\t*/\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' => false,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 5,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n 'rewrite' => array(\"slug\" => \"press\"),\n 'register_meta_box_cb' => 'add_press_metaboxes' // function hooking up metaboxes\n\t);\n\t\n\t// Registering your Custom Post Type\n\tregister_post_type( 'press', $args );\n\n}", "function post_excerpt_meta_box($post)\n {\n }", "public function register_cpt_blocks() {\n /* Include CPT creation file */\n //include_once( ILIO_BLOCKS_INCLUDES_DIR . '/blockss.post-type.php' );\n }", "function clicks_register_my_cpt_testimonial() {\n\n\t// Post Type: Testimonials.\n\n\t$labels = array(\n\t\t\"name\" => __( \"Testimonials\", \"custom-post-type\" ),\n\t\t\"singular_name\" => __( \"Testimonial\", \"custom-post-type\" ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( \"Testimonials\", \"custom-post-type-ui\" ),\n\t\t\"labels\" => $labels,\n\t\t\"description\" => \"\",\n\t\t\"public\" => true,\n\t\t\"publicly_queryable\" => true,\n\t\t\"show_ui\" => true,\n\t\t\"delete_with_user\" => false,\n\t\t\"show_in_rest\" => false,\n\t\t\"rest_base\" => \"\",\n\t\t\"rest_controller_class\" => \"WP_REST_Posts_Controller\",\n\t\t\"has_archive\" => false,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"exclude_from_search\" => false,\n\t\t\"capability_type\" => \"post\",\n\t\t\"map_meta_cap\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"rewrite\" => array( \"slug\" => \"testimonial\", \"with_front\" => true ),\n\t\t\"query_var\" => true,\n\t\t\"menu_position\" => 21,\n\t\t\"supports\" => array( \"title\", \"revisions\", \"author\", \"page-attributes\" ),\n\t\t\"taxonomies\" => array( \"category\" ),\n\t);\n\n\tregister_post_type( \"testimonial\", $args );\n}", "function editdel_content($content) {\n global $post;\n\t\n $content = str_replace('<div class=\"cmsms_shortcode_edit_column\">Edit</div>', '', $content);\n $content = str_replace('<div class=\"cmsms_shortcode_edit_box\">Edit</div>', '', $content);\n $content = str_replace('<div class=\"cmsms_shortcode_edit_tab\">Edit</div>', '', $content);\n $content = str_replace('<div class=\"cmsms_shortcode_edit_price\">Edit</div>', '', $content);\n\t\n return $content;\n}", "function ywig_youth_clubs_cpt() {\n\t$labels = array(\n\t\t'name' => 'Youth Clubs',\n\t\t'singular_name' => 'Youth Club',\n\t\t'plural_name' => 'Youth Clubs',\n\t\t'add_new' => 'Add Youth Club',\n\t\t'all_items' => 'All Youth Clubs',\n\t\t'edit_item' => 'Edit Youth Club',\n\t\t'view_item' => 'View Youth Club',\n\t\t'search_item' => 'Search Youth Clubs',\n\t\t'not_found' => 'No Youth Clubs Found',\n\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'public' => true,\n\t\t'has_archive' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => true,\n\t\t'capability_type' => 'post',\n\t\t'show_in_rest' => true,\n\t\t'hierarchical' => true,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'thumbnail',\n\t\t\t'revisions',\n\t\t),\n\t\t'menu_position' => 5,\n\t\t'exclude_from_search' => false,\n\t);\n\n\tregister_post_type( 'youthclub', $args );\n}", "function add_post_meta_box( ) {\n\t\t\tadd_meta_box('Course-Information', __( 'Course Information', $this->plugin_domain), array($this, 'setup_meta_english'), 'public-courses', 'normal', 'high');\n\t\t\tadd_meta_box('Arabic-Translations', __( 'Arabic Translations', $this->plugin_domain), array($this, 'setup_meta_translation'), 'public-courses', 'normal', 'high');\n\t\t\tadd_meta_box('Course-Dates', __( 'Course Dates', $this->plugin_domain), array($this, 'setup_meta_dates'), 'public-courses', 'normal', 'high');\n\t\t}", "private function replacePostContent()\n\t\t{\n\t\t\t//use wpdb\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t//Préparation de la requête\n\t\t\t$postContentSql = $wpdb->prepare(\n\t\t\t\t\"\n\t\t\t\tUPDATE $wpdb->posts \n\t\t\t\tSET post_content = replace(\n\t\t\t\t\tpost_content, \n\t\t\t\t\t%s, \n\t\t\t\t\t%s\n\t\t\t\t) \n\t\t\t\t\",\n\t\t\t\t$this->settings['oldurl_value'],\n\t\t\t\t$this->settings['newurl_value']\n\t\t\t);\n\n\t\t\t//Requête\n\t\t\t$postContentRequete = $wpdb->query($postContentSql,OBJECT);\n\n\t\t\t//Erreur\n\t\t\tif($postContentRequete === false){\n\t\t\t\tdo_action('DFWPNotice',__('Posts content replace error',$this->settings['textdomain']),true);\n\t\t\t}\n\n\t\t\t//Tout est bon\n\t\t\telse{\n\t\t\t\tdo_action('DFWPNotice',sprintf(__('%d replacements in posts content',$this->settings['textdomain']),$postContentRequete),false);\n\t\t\t}\n\t\t}", "function me_theme_jetpack_portfolio_cpt() {\n\tadd_theme_support( 'jetpack-portfolio' );\n}", "function add_press_metaboxes() {\n\tadd_meta_box('wpt_press_link', 'Relevant link', 'wpt_press_link', 'press', 'normal', 'default');\n\tadd_meta_box('wpt_press_date', 'Publication date', 'wpt_press_date', 'press', 'normal', 'default');\n\tadd_meta_box('wpt_press_type', 'Publication type', 'wpt_press_type', 'press', 'side', 'default');\n \n}", "public function init_cpt_registration() {\r\n\r\n\t\tarray_walk( $this->config['post_types'], array( $this, 'register_custom_post_types' ) );\r\n\r\n\t}", "function ccwts_metabox_ticketsale_save( $post_id )\n{\n //if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n \n // if our nonce isn't there, or we can't verify it, bail\n //if( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n \n // if our current user can't edit this post, bail\n //if( !current_user_can( 'edit_post' ) ) return;\n \n // now we can actually save the data\n /*$allowed = array( \n 'a' => array( // on allow a tags\n 'href' => array() // and those anchors can only have href attribute\n )\n );*/\n \n // Make sure your data is set before trying to save it\n if(basename( get_page_template() ) == 'page-biglietteria-2017.php' || basename( get_page_template() ) == 'page-biglietteria-2017-hotel.php' )\n {\n \n if( isset( $_POST['ccwts_ticketsale_id'] ) && intval($_POST['ccwts_ticketsale_id']) > 0)\n ccwts_field('ticketsale_id', $_POST['ccwts_ticketsale_id']);\n\n if(basename( get_page_template() ) == 'page-biglietteria-2017-hotel.php' ){\n if( isset( $_POST['ccwts_parkhotel_ticket_id'] ) && intval($_POST['ccwts_parkhotel_ticket_id']) > 0)\n ccwts_field('parkhotel_ticket_id', $_POST['ccwts_parkhotel_ticket_id']);\n }\n\n }\n //update_post_meta( $post_id, 'my_meta_box_text', wp_kses( $_POST['my_meta_box_text'], $allowed ) );\n \n //if( isset( $_POST['my_meta_box_select'] ) )\n //update_post_meta( $post_id, 'my_meta_box_select', esc_attr( $_POST['my_meta_box_select'] ) );\n \n // This is purely my personal preference for saving check-boxes\n //$chk = isset( $_POST['my_meta_box_check'] ) && $_POST['my_meta_box_select'] ? 'on' : 'off';\n //update_post_meta( $post_id, 'my_meta_box_check', $chk );\n}", "function klippe_core_include_custom_post_types_meta_boxes() {\n\t\tif ( klippe_core_theme_installed() ) {\n\t\t\tforeach ( glob( MIKADO_CORE_CPT_PATH . '/*/admin/meta-boxes/*.php' ) as $meta_boxes_map ) {\n\t\t\t\tinclude_once $meta_boxes_map;\n\t\t\t}\n\t\t}\n\t}", "function pexeto_load_meta_boxes(){\n\t$portf_taxonomies=get_terms('portfolio_category', array('hierarchical'=>true, 'hide_empty'=>0));\n\t$portf_categories=array(array('id'=>'-1', 'name'=>'All Portfolio Categories'));\n\n\tforeach($portf_taxonomies as $taxonomy){\n\t\t$portf_categories[]=array(\"name\"=>$taxonomy->name, \"id\"=>$taxonomy->term_id);\n\t}\n\t$loader_portf_categories=array_merge(array(array('id'=>'hide','name'=>'Hide'), (array('id'=>'disabled','name'=>'Show:'))), $portf_categories);\n\n\t//load the post categeories\n\t$categories=get_categories('hide_empty=0');\n\t$pexeto_categories=array(array('id'=>'-1', 'name'=>'All Categories'));\n\tfor($i=0; $i<sizeof($categories); $i++){\n\t\t$pexeto_categories[]=array('id'=>$categories[$i]->cat_ID, 'name'=>$categories[$i]->cat_name);\n\t}\n\t\n\tglobal $pexeto_data, $new_meta_boxes, $new_meta_portfolio_boxes, $new_meta_post_boxes;\n\t\n\t$sliders=pexeto_get_created_sliders();\n\n\t/* ------------------------------------------------------------------------*\n\t * META BOXES FOR THE PAGES\n\t * ------------------------------------------------------------------------*/\n\n\t//the meta data for pages\n\t$new_meta_boxes =\n\tarray(\n\n\tarray(\n\t\t\"title\" => '<div class=\"ui-icon ui-icon-wrench\"></div>General Page Settings',\n\t\t\"type\" => \"heading\"),\n\n\tarray(\n\t\t\"title\" => \"Header\",\n\t\t\"name\" => \"slider\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => $sliders,\n\t\t\"std\" => 'none'\n\t\t),\n\n\t\tarray(\n\t\t\"title\" => \"Page Layout\",\n\t\t\"name\" => \"layout\",\n\t\t\"type\" => \"imageradio\",\n\t\t\"options\" => array(array(\"img\"=>PEXETO_IMAGES_URL.'layout-right-sidebar.png', \"id\"=>\"right\", \"title\"=>\"Right Sidebar Layout\"),\n\t\tarray(\"img\"=>PEXETO_IMAGES_URL.'layout-left-sidebar.png', \"id\"=>\"left\", \"title\"=>\"Left Sidebar Layout\"),\n\t\tarray(\"img\"=>PEXETO_IMAGES_URL.'layout-full-width.png', \"id\"=>\"full\", \"title\"=>\"Full Width Layout\")),\n\t\t\"std\" => 'right',\n\t\t\"description\" => 'Available for Default, Featured Posts and Contact page templates'\n\t\t),\n\n\t\tarray(\n\t\t\"name\" => \"sidebar\",\n\t\t\"title\" => \"Sidebar\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => $pexeto_data->pexeto_sidebars,\n\t\t\"description\" => 'You can select a sidebar for this page between the default one and another one that\n\t\tyou have created. If you would like to use another sidebar, rather than the default one, you can\n\t\tcreate a new sidebar in \"'.PEXETO_THEMENAME.' Options->Sidebars\" section and after that you will be able to select the\n\t\tsidebar here.'),\n\t\t\n\t\tarray(\n\t\t\"name\" => \"show_title\",\n\t\t\"title\" => \"Display Page Title\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array(array(\"name\"=>\"Use Global Settings\", \"id\"=>\"global\"),\n\t\tarray(\"name\"=>\"Display\", \"id\"=>\"on\"),\n\t\tarray(\"name\"=>\"Hide\", \"id\"=>\"off\")),\n\t\t\"std\" => 'global',\n\t\t\"description\" => 'Whether to display the page title or not - if \"Use Global Settings\" selected, the global setting selected in the\n\t\t'.PEXETO_THEMENAME.' Options &raquo; General &raquo; \"Display page title on pages\" field will be used.'),\n\t\t\n\t\tarray(\n\t\t\"title\" => \"Custom full width background image\",\n\t\t\"name\" => \"full_bg\",\n\t\t\"std\" => \"\",\n\t\t\"type\" => \"upload\",\n\t\t\"description\" => 'You can globally set a full width background image in the '.PEXETO_THEMENAME.' Options &raquo; Style Settings &raquo; \n\t\tGeneral section. In this field you can set a custom background image that will be displayed for this page only.'\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"title\" => '<div class=\"ui-icon ui-icon-wrench\"></div>Featured Page Template Settings',\n\t\t\"type\" => \"heading\"),\n\t\t\n\t\t\tarray(\n\t\t\"name\" => \"featured_category\",\n\t\t\"title\" => \"Display blog posts from category\",\n\t\t\"type\" => \"select\",\n\t\t\"none\" => true,\n\t\t\"options\" => $pexeto_categories,\n\t\t\"std\" => '-1'\n\t\t\t),\n\t\t\t\n\t\t\tarray(\n\t\t\"title\" => \"Number of posts to display\",\n\t\t\"name\" => \"featured_post_number\",\n\t\t\"std\" => \"5\",\n\t\t\"type\" => \"text\"\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"title\" => '<div class=\"ui-icon ui-icon-image\"></div>Portfolio Settings - available only for Portfolio/Gallery page templates',\n\t\t\"type\" => \"heading\"),\n\n\t\tarray(\n\t\t\"name\" => \"post_category\",\n\t\t\"title\" => \"Display portfolio items from categories\",\n\t\t\"type\" => \"select\",\n\t\t\"none\" => true,\n\t\t\"options\" => $portf_categories,\n\t\t\"std\" => '-1',\n\t\t\"description\" => 'If \"All Categories\" selected, all the Portfolio items will be displayed. If another category is selected, only the Portfolio items that belong\n\t\tto this category or this category\\'s subcategories will be displayed. By selecting different categories, you can create multiple portfolio/gallery\n\t\tpages with different items displayed.'),\n\n\t\tarray(\n\t\t\"name\" => \"order\",\n\t\t\"title\" => \"Portfolio item order\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array(array(\"name\"=>\"By Date\", \"id\"=>\"date\"),\n\t\tarray(\"name\"=>\"By Custom Order\", \"id\"=>\"custom\")),\n\t\t\"std\" => 'date',\n\t\t\"description\" => 'If you select \"By Date\" the last created item will be displayed first. If you select by \"By Custom Order\"\n\t\tyou will have to set the order field of each of the items - the items with the smaller order number will be displayed first.'),\n\n\n\t\tarray(\n\t\t\"name\" => \"show_filter\",\n\t\t\"title\" => \"Show portfolio category filter\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array(array(\"name\"=>\"Show\", \"id\"=>\"true\"),\n\t\tarray(\"name\"=>\"Hide\", \"id\"=>\"false\")),\n\t\t\"std\" => 'true',\n\t\t\"description\" => 'If \"Show\" selected, a category filter will be displayed above the portfolio items'),\n\n\t\tarray(\n\t\t\"name\" => \"show_info\",\n\t\t\"title\" => \"Show item info\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array( array(\"name\"=>\"Hide\", \"id\"=>\"false\"),\n\t\tarray(\"name\"=>\"Show\", \"id\"=>\"true\")),\n\t\t\"std\" => 'true',\n\t\t\"description\" => 'If \"Show\" selected, the portfolio item title and category will be displayed below the image (only for the Grid Gallery template)'\n\t\t),\n\n\n\t\tarray(\n\t\t\"title\" => \"Number of portfolio items to show per load/page\",\n\t\t\"name\" => \"post_number\",\n\t\t\"std\" => \"10\",\n\t\t\"type\" => \"text\"\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"name\" => \"image_width\",\n\t\t\"title\" => \"Image width\",\n\t\t\"type\" => \"text\",\n\t\t\"std\" => '290',\n\t\t\"description\" => 'The image width in the grid gallery. The image width is always static and the height is determined by the image ratio (only for the Grid Gallery template)'\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"name\" => \"desaturate\",\n\t\t\"title\" => \"Black/white image effect\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array( array(\"name\"=>\"OFF\", \"id\"=>\"false\"),array(\"name\"=>\"ON\", \"id\"=>\"true\")),\n\t\t\"std\" => 'false',\n\t\t\"description\" => 'If this option is enabled, the images will be automatically converted to black/white (desaturated) and they will be colored on hover (only for the Grid Gallery template).'\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"name\" => \"show_back_btn_end\",\n\t\t\"title\" => 'Show a \"Back to gallery\" button in the end of the image slider',\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array( array(\"name\"=>\"Hide\", \"id\"=>\"false\"),\n\t\tarray(\"name\"=>\"Show\", \"id\"=>\"true\")),\n\t\t\"std\" => 'false',\n\t\t\"description\" => 'If \"Show\" selected, a \"Back to gallery\" button will be appended to the last image of the image slider (only for the Grid Gallery template)'\n\t\t),\n\n\t\tarray(\n\t\t\"name\" => \"partial_loading\",\n\t\t\"title\" => 'Partial image loading in horizontal slider',\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array( array(\"name\"=>\"Disabled\", \"id\"=>\"false\"),\n\t\tarray(\"name\"=>\"Enabled\", \"id\"=>\"true\")),\n\t\t\"std\" => 'false',\n\t\t\"description\" => 'If \"Enabled\" selected, the slider will not wait for all the images to be loaded in order to get displayed. Before the slider is displayed it will load the amount of images you set in the \"Number of images to load before displaying the slider\" field below and after that the rest of the images will be displayed dynamically - as soon as the image gets loaded it will be displayed on the slider (only for the Grid Gallery template)'\n\t\t),\n\n\t\tarray(\n\t\t\"name\" => \"img_num_before_load\",\n\t\t\"title\" => \"Number of images to load before displaying the slider\",\n\t\t\"type\" => \"text\",\n\t\t\"std\" => '3',\n\t\t\"description\" => 'If partial image loaing is enabled above, this would be the number of images to load before displaying the horizontal slider. (only for the Grid Gallery template)'\n\t\t)\n\t\t\n\t\t);\n\n\n\n\t\t/* ------------------------------------------------------------------------*\n\t\t * META BOXES FOR THE PORTFOLIO POSTS\n\t\t * ------------------------------------------------------------------------*/\n\n\t\t$new_meta_portfolio_boxes =\n\t\tarray(\n\n\t\tarray(\n\t\t\"title\" => \"Preview Image URL\",\n\t\t\"name\" => \"preview\",\n\t\t\"std\" => \"\",\n\t\t\"type\" => \"upload\",\n\t\t\"description\" => 'Main preview image. If the \"Custom Thumbnail URL\" field below is empty, the thumbnail image\n\t\twill be automatically generated by the image set in this field.'\n\t\t),\n\n\t\tarray(\n\t\t\"title\" => \"Custom Thumbnail URL (optional)\",\n\t\t\"name\" => \"thumbnail\",\n\t\t\"std\" => \"\",\n\t\t\"type\" => \"upload\",\n\t\t\"description\" => 'By default the theme will generate automatically the thumbnail image for the item from\n\t\tthe bigger perview image, set in the \"Preview Image URL\" field below. However, if you prefer to manually set\n\t\tthis thumbnail image, you have to set its URL in this field.'\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"title\" => '<div class=\"ui-icon ui-icon-image\"></div>Grid Gallery items settings only',\n\t\t\"type\" => \"heading\"),\n\t\t\n\t\tarray(\n\t\t\"title\" => \"When clicked on the image open:\",\n\t\t\"name\" => \"action\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array(array(\"name\"=>\"Preview image in lightbox\", \"id\"=>\"lightbox\"),\n\t\tarray(\"name\"=>\"The content of the item as slider\", \"id\"=>\"permalink\"),\n\t\tarray(\"name\"=>\"The content of the item on new page\", \"id\"=>\"permalink_new\"),\n\t\tarray(\"name\"=>\"Play Video\", \"id\"=>\"video\"),\n\t\tarray(\"name\"=>\"Custom link\", \"id\"=>\"custom\"),\n\t\tarray(\"name\"=>\"Do Nothing\", \"id\"=>\"nothing\")),\n\t\t\"std\" => \"lightbox\",\n\t\t\"description\" => \"Select the action to be performed after clicking on the portfolio item.\"\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"title\" => \"Custom Link/Video URL\",\n\t\t\"name\" => \"custom\",\n\t\t\"std\" => \"\",\n\t\t\"type\" => \"text\",\n\t\t\"description\" => 'If \"Play Video\" selected above, you can insert a video URL here. If \"Custom link\" selected above, \n\t\tyou can insert the custom URL'\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"title\" => \"Item Description\",\n\t\t\"name\" => \"description\",\n\t\t\"std\" => \"\",\n\t\t\"type\" => \"textarea\",\n\t\t\"description\" => 'If \"Preview image in lightbox\" or \"Play Video\" has been selected in the clicking\n\t\taction field above, you can insert a description in this field that will be displayed below the image/video in lightbox.'\n\t\t),\n\t\t\n\t\tarray(\n\t\t\"name\" => \"show_content\",\n\t\t\"title\" => \"Show portfolio content on slider preview section\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array(array(\"name\"=>\"Show\", \"id\"=>\"show\"),\n\t\tarray(\"name\"=>\"Hide\", \"id\"=>\"hide\")),\n\t\t\"std\" => 'show',\n\t\t\"description\" => 'If \"Show\" selected, a section containing the portfolio title, category, content and a \"Back to gallery\" button will be\n\t\tprepended to the image slider when the preview is opened in the Grid Gallery template.'),\n\t\t\n\t\t\tarray(\n\t\t\"title\" => '<div class=\"ui-icon ui-icon-image\"></div>Showcase and single page items settings',\n\t\t\"type\" => \"heading\"),\n\t\t\n\t\tarray(\n\t\t\"title\" => \"Crop image from\",\n\t\t\"name\" => \"crop\",\n\t\t\"type\" => \"imageradio\",\n\t\t\"options\" => array(array(\"img\"=>PEXETO_IMAGES_URL.'crop-c.png', \"id\"=>\"c\", \"title\"=>\"Center\"),\n\t\tarray(\"img\"=>PEXETO_IMAGES_URL.'crop-t.png', \"id\"=>\"t\", \"title\"=>\"Top\"),\n\t\tarray(\"img\"=>PEXETO_IMAGES_URL.'crop-b.png', \"id\"=>\"b\", \"title\"=>\"Bottom\"),\n\t\tarray(\"img\"=>PEXETO_IMAGES_URL.'crop-l.png', \"id\"=>\"l\", \"title\"=>\"Left\"),\n\t\tarray(\"img\"=>PEXETO_IMAGES_URL.'crop-r.png', \"id\"=>\"r\", \"title\"=>\"Right\")\n\t\t),\n\t\t\"std\" => \"c\",\n\t\t\"description\" => 'This option is available when the thumbnail will be automatically generated from the preview image (when the \"Thumbnail URL\" field above is empty)- you can see above how the cropping settings will affect both portrait and landscape oriented images.\n\t\t(available for Showcase page template only)'\n\t\t),\n\n\t\t\tarray(\n\t\t\"name\" => \"show_title\",\n\t\t\"title\" => \"Show portfolio title on preview page\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array(array(\"name\"=>\"Show\", \"id\"=>\"show\"),\n\t\tarray(\"name\"=>\"Hide\", \"id\"=>\"hide\")),\n\t\t\"std\" => 'show',\n\t\t\"description\" => 'If \"Show\" selected, the portfolio title will be displayed on the single portfolio page and on the\n\t\tPortfolio Showcase template.'),\n\t\t\n\t\tarray(\n\t\t\"name\" => \"show_preview\",\n\t\t\"title\" => \"Show preview image on preview page\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => array(array(\"name\"=>\"Show\", \"id\"=>\"show\"),\n\t\tarray(\"name\"=>\"Hide\", \"id\"=>\"hide\")),\n\t\t\"std\" => 'show',\n\t\t\"description\" => 'If \"Show\" selected, the preview image will be displayed on the single portfolio page and on the\n\t\tPortfolio Showcase template.')\n\t\t\n);\n\t\t\n\t\t\n}", "static function metabox_at_post_edit_page(){\n\t\t \tadd_meta_box('matebox-to-handle-keywords', 'Affiliate Keywords', array(get_class(), 'metabox_to_deal_keywords'), 'product', 'advanced', 'high');\t \t\n\t\t }", "function base_custom_post_type( $name, $singular_name, $menu_name, $parent_item_colon, $all_items, $view_item, $add_new_item, $add_new, $edit_item, $update_item, $search_items, $not_found, $not_found_in_trash,$description) {\n $labels = array(\n 'name' => _x( $name, 'Post Type General Name', 'base' ),\n 'singular_name' => _x( $singular_name, 'Post Type Singular Name', 'base' ),\n 'menu_name' => __( $menu_name, 'base' ),\n 'parent_item_colon' => __( $parent_item_colon, 'base' ),\n 'all_items' => __( $all_items, 'base' ),\n 'view_item' => __( $view_item, 'base' ),\n 'add_new_item' => __( $add_new_item, 'base' ),\n 'add_new' => __( $add_new, 'base' ),\n 'edit_item' => __( $edit_item, 'base' ),\n 'update_item' => __( $update_item, 'base' ),\n 'search_items' => __( $search_items, 'base' ),\n 'not_found' => __( $not_found, 'base' ),\n 'not_found_in_trash' => __( $not_found_in_trash, 'base' )\n );\n \n// Set other options for Custom Post Type\n \n $args = array(\n 'label' => __( strtolower( $singular_name ) , 'base' ),\n 'description' => __( $description, 'base' ),\n 'labels' => $labels,\n // Features this CPT supports in Post Editor\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields','page-attributes' ),\n // You can associate this CPT with a taxonomy or custom taxonomy. \n 'taxonomies' => array( 'genres' ),\n /* A hierarchical CPT is like Pages and can have\n * Parent and child items. A non-hierarchical CPT\n * is like Posts.\n */ \n 'hierarchical' => true,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page'\n );\n \n // Registering your Custom Post Type\n register_post_type( strtolower($menu_name), $args );\n \n}", "function vw_hospital_cs_custom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'vw-hospital' ), 'vw_hospital_cs_meta_callback' , 'doctors','normal', 'high' ); \n\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 display_cpt_form( $post_type, $title=false, $cpt=false )\n{\n\tglobal $form_post_type;\n\n\t$secondary = false;\n\tif ( ! $cpt ) {\n\t\t$cpt = eman_post_types($post_type);\n\t\t$secondary = true;\n\t}\n\n\t$form_post_type = $post_type;\n\n\tob_start();\n?>\n\t<?php if ( $title ) : ?><h2><?php echo $title; ?></h2><?php endif; ?>\n\n\t<?php if ( ! $secondary && 'em_invoice' != get_post_type() ) : ?>\n\t\t<a class=\"copy-previous-form btn btn-default\" href=\"<?php echo esc_url( add_query_arg( ['autofill' => '1', 'n' => wp_create_nonce('emanAutofillForm')], remove_query_arg('company') ) ); ?>\">\n\t\t\t<span class=\"fa fa-copy\" aria-hidden=\"true\"></span>\n\t\t\tAutofill from last entry\n\t\t</a>\n\t<?php endif; ?>\n\n\t<form id=\"post\" class=\"acf-form form-archive form-<?php echo $post_type; ?>\" method=\"post\"<?php if ( ! empty($GLOBALS['autofill_id']) ) { echo ' data-ap=\"' . $GLOBALS['autofill_id'] . '\"'; } ?>>\n<?php\n\t\tif ( $cpt['form'] || $cpt['title_label'] ) :\n\t\t\t$field_groups = array();\n\t\t\t// Add company field for turner\n\t\t\t#if ( 'settings' == $cpt['type'] && HAS_ROLE_TURNER && in_array($post_type, $emanager_sub_settings_cpts) ) $field_groups[] = 'acf_post-company';\n\t\t\t// Set up the settings field groups specific to post type\n\t\t\tif ( ! is_array($cpt['form']) ) {\n\t\t\t\t$cpt['form'] = array($cpt['form']);\n\t\t\t}\n\n\t\t\t$cpt['form'] = acf_limit_field_groups( $cpt['form'] );\n\t\t\t// Add title if that is in settings\n\t\t\tif ( ! empty($cpt['title_label']) ) {\n\t\t\t\t$field_groups[] = 'acf_post-title-content';\n\t\t\t}\n\t\t\t// Merge them\n\t\t\t$field_groups = array_merge($field_groups, $cpt['form']);\n\t\n\t\t\tif ( function_exists('acf_form') ) {\n\t\t\t\tacf_form( array(\n\t\t\t\t\t'post_id' => 'new_post',\n\t\t\t\t\t'field_groups' => $field_groups,\n\t\t\t\t\t'submit_value' => 'Submit',\n\t\t\t\t\t'form' => false\n\t\t\t\t) );\n\t\t\t}\n\t\tendif;\n?>\n\t\t<div class=\"field field-submit clearfix\">\n\t\t\t<button class=\"btn btn-primary<?php echo ( ! $secondary ? ' btn-lg' : ''); ?>\">Save</button>\n\t\t</div>\n\t</form>\n<?php\n\t// ACF is outputing this stupid commented html and it screws everything up in the modals\n\treturn str_replace( '<!-- <div id=\"poststuff\"> -->', '', ob_get_clean() );\n}", "function remove_yoast_meta_boxes() {\n\t$post_types = array(\n\t\t'ucf_resource_link',\n\t\t'ucf_section'\n\t);\n\tforeach ( $post_types as $post_type ) {\n\t\tremove_meta_box( 'wpseo_meta', $post_type, 'normal' );\n\t}\n}", "function add_secpage_meta_box() {\n global $post;\n\n if(!empty($post)) {\n $pageTemplate = get_post_meta($post->ID, '_wp_page_template', true);\n //if($pageTemplate == 'template-secondary.php' || $pageTemplate == 'template-reservations.php' || $pageTemplate == 'template-events.php' || $pageTemplate == 'template-live-music.php' || $pageTemplate == 'page.php') {\n if($pageTemplate != 'template-homepage.php') {\n add_meta_box(\n \t\t'secpage_meta_box', // $id\n \t\t'Secondary Page Template Fields', // $title\n \t\t'show_secpage_meta_box', // $callback\n \t\t'page', // $screen\n \t\t'normal', // $context\n \t\t'high' // $priority\n \t);\n }\n }\n}", "function pg_add_custom_box() {\r\n\tif( function_exists( 'add_meta_box' )) {\r\n\t\tadd_meta_box( 'pg_custom_box_1', __( 'Edit Photocrati Galleries / Albums', 'photocrati' ), 'pg_inner_custom_box_1', 'page', 'normal', 'high' );\r\n\t\tadd_meta_box( 'pg_custom_box_2', __( 'Edit Photocrati Galleries / Albums', 'photocrati' ), 'pg_inner_custom_box_1', 'post', 'normal', 'high' );\r\n\t}\r\n}", "function gndt_register_cpt_publishing() {\n register_post_type('gndt_research',\n array(\n 'labels' => array(\n 'name' => __('Research', 'textdomain'),\n 'singular_name' => __('Research', 'textdomain'),\n ),\n 'public' => true,\n 'has_archive' => true,\n\t\t \t\t'show_in_rest' => true,\n 'supports' => ['editor'], /* allow gutenberg editor for this post type */\n 'capability_type' => 'gndt_researchposttype',\n\t\t\t \t'capabilities' => array(\n\t\t\t\t\t 'publish_posts' => 'gndt_publish_researchposttypes',\n\t\t\t\t\t 'edit_posts' => 'gndt_edit_researchposttypes',\n\t\t\t\t\t 'edit_others_posts' => 'gndt_edit_others_researchposttypes',\n\t\t\t\t\t 'read_private_posts' => 'gndt_read_private_researchposttypes',\n\t\t\t\t\t 'edit_post' => 'gndt_edit_researchposttype',\n\t\t\t\t\t 'delete_post' => 'gndt_delete_researchposttype',\n\t\t\t\t\t 'read_post' => 'gndt_read_researchposttype',\n\t\t\t\t ),\n )\n );\n\n\tadd_post_type_support( 'gndt_research', 'author' ); //add author support to custom post type \n}", "function mt_testimonials_custom_meta_boxes() {\r\n \r\n /**\r\n * Create a custom meta boxes array that we pass to \r\n * the OptionTree Meta Box API Class.\r\n */\r\n \r\n $mt_testimonial_meta_box = array(\r\n 'id' => 'mt_testimonial_meta_box',\r\n 'title' => __('Item Customization', 'match'),\r\n 'desc' => '',\r\n 'pages' => array( 'mt_testimonials' ),\r\n 'context' => 'normal',\r\n 'priority' => 'high',\r\n 'fields' => array(\r\n \t array(\r\n 'label' => __('Client Name', 'match'),\r\n 'id' => 'mt_testimonial_client_name',\r\n 'type' => 'text',\r\n 'desc' => __('Add testimonial client name', 'match'),\r\n 'std' => 'John Doe',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => '' \r\n ),\r\n\t \r\n\t array(\r\n 'label' => __('Client Company', 'match'),\r\n 'id' => 'mt_testimonial_client_company',\r\n 'type' => 'text',\r\n 'desc' => __('Add testimonial client company', 'match'),\r\n 'std' => 'Company Name',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => '' \r\n ),\r\n\t \r\n\t array(\r\n 'label' => __('Client Small Image', 'match'),\r\n 'id' => 'mt_testimonial_client_img',\r\n 'type' => 'upload',\r\n 'desc' => __('Add testimonial client small image. Make sure is 70x70px.', 'match'),\r\n 'std' => '',\r\n 'rows' => '',\r\n 'post_type' => '',\r\n 'taxonomy' => '',\r\n 'class' => '' \r\n )\r\n\t \t \r\n \t)\r\n );\r\n \r\n /**\r\n * Register our meta boxes using the \r\n * ot_register_meta_box() function.\r\n */\r\n ot_register_meta_box( $mt_testimonial_meta_box );\r\n\r\n}", "function types_rename_build_in_post_types() {\n global $wp_post_types;\n $custom_types = get_option( WPCF_OPTION_NAME_CUSTOM_TYPES, array() );\n\n if ( !empty( $custom_types ) ) {\n foreach ( $custom_types as $post_type => $data ) {\n // only for build_in\n if (\n isset( $data['_builtin'] )\n && $data['_builtin']\n && isset( $data['slug'] )\n && isset( $data['labels']['name'] )\n ) {\n // check if slug (post/page) exists\n if( isset( $wp_post_types[$data['slug']] ) ) {\n // refer $l to post labels\n $l = &$wp_post_types[$data['slug']]->labels;\n\n // change name\n $l->name = isset( $data['labels']['name'] ) ? $data['labels']['name'] : $l->name;\n\n // change singular name\n $l->singular_name = isset( $data['labels']['singular_name'] ) ? $data['labels']['singular_name'] : $l->singular_name;\n\n // change labels\n $l->add_new_item = 'Add New';\n $l->add_new = 'Add New ' . $l->singular_name;\n $l->edit_item = 'Edit ' . $l->singular_name;\n $l->new_item = 'New ' . $l->name ;\n $l->view_item = 'View ' . $l->name;\n $l->search_items = 'Search '. $l->name;\n $l->not_found = 'No ' . $l->name . ' found';\n $l->not_found_in_trash = 'No ' . $l->name . ' found in Trash';\n $l->parent_item_colon = 'Parent '. $l->name;\n $l->all_items = 'All ' . $l->name;\n $l->menu_name = $l->name;\n $l->name_admin_bar = $l->name;\n\n }\n }\n }\n }\n}", "public function prepend_location_meta_to_content($content){\n\t\t\t\n\t\tglobal $post, $post_type;\n\t\t\n\t\t//display meta only on our locations (and if its a single location)\n\t\tif($post_type == 'wp_locations' && is_singular('wp_locations')){\n\t\t\t\n\t\t\t//collect variables\n\t\t\t$wp_location_id = $post->ID;\n $wp_team = get_post_meta($post->ID , 'wp_team', true); \n $wp_team_size = get_post_meta($post->ID , 'wp_team_size', true); \n $wp_team_role = get_post_meta($post->ID , 'wp_team_role', true);\n\t\t $wp_used_tech = get_post_meta($post->ID , 'wp_used_tech', true); \n $wp_date = get_post_meta($post->ID , 'wp_date', true); \n $wp_project = get_post_meta($post->ID , 'wp_project', true);\n $wp_code = get_post_meta($post->ID , 'wp_code', true);\n $wp_github = get_post_meta($post->ID , 'wp_github', true);\n $wp_facebook = get_post_meta($post->ID , 'wp_facebook', true);\n $wp_linkedin = get_post_meta($post->ID , 'wp_linkedin', true);\n $wp_contact = get_post_meta($post->ID , 'wp_contact', true);\n\t\t\t\n\t\t\t//display\n\t\t\t$html = '';\n $html .= $content;\n\t\n\t\t\t$html .= '<section class=\"meta-data\">';\n\t\t\t\n\t\t\t//hook for outputting additional meta data (at the start of the form)\n\t\t\tdo_action('wp_location_meta_data_output_start',$wp_location_id);\n\t\t\t\n\t\t\t$html .= '<p>';\n\t\t\n\t\t\tif(!empty($wp_team)){\n\t\t\t\t$html .= '<b>Gewerkt in team: </b>' . $wp_team . '</br>';\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($wp_team_size)){\n\t\t\t\t$html .= '<b>Teamgrootte: </b>' . $wp_team_size . '</br>';\n\t\t\t}\n\t\t\n\t\t\tif(!empty($wp_team_role)){\n\t\t\t\t$html .= '<b>Mijn rol binnen het team: </b>' . $wp_team_role . '</br>';\n\t\t\t}\n \n if(!empty($wp_used_tech)){\n\t\t\t\t$html .= '<b>Gebruikte technieken: </b>' . $wp_used_tech . '</br>';\n\t\t\t}\n \n if(!empty($wp_date)){\n\t\t\t\t$html .= '<b>Datum realisatie: </b>' . $wp_date . '</br>';\n\t\t\t}\n \n if(!empty($wp_project)){\n\t\t\t\t$html .= '<b>Link naar het project/opdracht: </b><a href=\"' . $wp_project . '\">' . $wp_project . '</a></br>';\n\t\t\t}\n \n if(!empty($wp_code)){\n\t\t\t\t$html .= '<b>Link naar de code: </b><a href=\"' . $wp_code . '\">' . $wp_code . '</a></br>';\n\t\t\t}\n \n if(!empty($wp_github)){\n\t\t\t\t$html .= '<button type=\"button\" class=\"icon_link\"><a href=\"' . $wp_github . '\"><i class=\"fab fa-github\"></i></a></button>';\n\t\t\t}\n \n if(!empty($wp_facebook)){\n\t\t\t\t$html .= '<button type=\"button\" class=\"icon_link\"><a href=\"' . $wp_facebook . '\"><i class=\"fab fa-facebook-square\"></i></a></button>';\n\t\t\t}\n \n if(!empty($wp_linkedin)){\n\t\t\t\t$html .= '<button type=\"button\" class=\"icon_link\"><a href=\"' . $wp_linkedin . '\"><i class=\"fab fa-linkedin\"></i></a></button><br>';\n\t\t\t}\n \n if(!empty($wp_contact)){\n\t\t\t\t$html .= '<button type=\"button\" class=\"contact\"><a href=\"' . $wp_contact . '\">Neem contact op met mij</a></button><br>';\n\t\t\t}\n \n\t\t\t$html .= '</p>';\n\n\t\t\t//hook for outputting additional meta data (at the end of the form)\n\t\t\tdo_action('wp_location_meta_data_output_end',$wp_location_id);\n\t\t\t\n\t\t\t$html .= '</section>';\n\t\t\t\n\t\t\t\n\t\t\treturn $html;\t\n\t\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\treturn $content;\n\t\t}\n\n\t}" ]
[ "0.6074978", "0.5969558", "0.59518605", "0.5937615", "0.587778", "0.5822619", "0.5804349", "0.577158", "0.5770772", "0.5748372", "0.574136", "0.5718629", "0.56830835", "0.56570554", "0.5640189", "0.56377155", "0.56230205", "0.5621331", "0.56184965", "0.5618175", "0.56172454", "0.56165165", "0.56126416", "0.5607948", "0.5602411", "0.5599293", "0.557682", "0.5575006", "0.5570402", "0.55670416", "0.55320644", "0.55294824", "0.5529278", "0.55244464", "0.55181164", "0.55076784", "0.5505224", "0.54928654", "0.5481997", "0.548165", "0.5453434", "0.5448264", "0.5447298", "0.5443138", "0.5435879", "0.5430692", "0.54277164", "0.54262555", "0.54180217", "0.541173", "0.54078275", "0.54068303", "0.5404663", "0.5401019", "0.5389868", "0.53878313", "0.5387459", "0.5382313", "0.53814673", "0.5380647", "0.5378201", "0.53770477", "0.5368765", "0.5359797", "0.53591985", "0.5356202", "0.53556573", "0.5355382", "0.5354303", "0.5353099", "0.5344477", "0.53320307", "0.5328857", "0.5322815", "0.5320467", "0.53107595", "0.53100044", "0.5308255", "0.5302054", "0.52977645", "0.52936035", "0.52900046", "0.52862763", "0.52700245", "0.5269987", "0.5269338", "0.5269292", "0.52692497", "0.52673864", "0.5262066", "0.52612793", "0.52587193", "0.52582765", "0.5257483", "0.52568257", "0.5252884", "0.52451044", "0.524508", "0.5244057", "0.52432233" ]
0.6151654
0
Finds cheapest flight between two cities
public function findCheapest(string $city1, string $city2): array { $airport1 = $this->airportRepository->findByCity($city1); abort_if(is_null($airport1), 404, 'Airport in the city ' . $city1 . ' does not exist.'); $airport2 = $this->airportRepository->findByCity($city2); abort_if(is_null($airport2), 404, 'Airport in the city ' . $city2 . ' does not exist.'); if (Cache::has('routes')) { $routes = Cache::get('routes'); } else { $routes = $this->routeRepository->findAll(); } $graph = $this->dijkstraGraph->createGraph($routes, 'source_id', 'destination_id', 'price'); $cheapestPath = $this->dijkstraGraph->shortestPath($airport1['id'], $airport2['id']); $airports = $this->airportRepository->findByIds($cheapestPath); $cheapestRoute = []; $price = 0; foreach ($cheapestPath as $key => $element) { $airport = $airports[$element]; if ($key === array_key_first($cheapestPath)) { $cheapestRoute['start'] = $this->getRouteInformation($airport); $price += $graph[$cheapestPath[$key]][$cheapestPath[$key + 1]]; } elseif ($key === array_key_last($cheapestPath)) { $cheapestRoute['end'] = $this->getRouteInformation($airport); } else { $cheapestRoute['through'][] = $this->getRouteInformation($airport); $price += $graph[$cheapestPath[$key]][$cheapestPath[$key + 1]]; } } $cheapestRoute['price'] = $price; return $cheapestRoute; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findMinPrice() : array {\n $minPriceFlight = null;\n foreach (range(0, $this->flexibility) as $index) {\n $fromDate = $this->incrementDate($this->startingDate, $index);\n $returnDate = $this->incrementDate($fromDate, $this->duration);\n foreach ($this->destinations as $destination) {\n $searchMinPrice = $this->flightFinder->getLowestPrice($this->startingAirport, $destination, $fromDate, $returnDate);\n $this->flights[] = compact('searchMinPrice', 'destination', 'fromDate', 'returnDate');\n if ($this->isPriceLower($minPriceFlight, $searchMinPrice)) {\n $minPriceFlight = compact('searchMinPrice', 'destination', 'fromDate', 'returnDate');\n }\n }\n }\n\n return $minPriceFlight;\n }", "function getDepartamentalRoute($originCity, $destinyCity)\n {\n }", "function jeanisRoute($citys, $roads) {\n // 需要投递的城市\n $deliverMap = [];\n $k = count($citys);\n foreach ($citys as $city) {\n $deliverMap[$city] = true;\n }\n \n // road转成connectMap\n $connectMap = [];\n foreach ($roads as $item) {\n $connectMap[$item[0]][$item[1]] = $connectMap[$item[1]][$item[0]] = $item[2];\n }\n \n // 以第一个节点作为根\n $root = 1;\n \n // 其所有子节点中待投递城市的数量\n $subDeliveryCountArr = [];\n \n // 所有走过的边的距离之和\n $result = 0;\n \n // 最长距离\n $globalMaxDis = 0;\n \n processDis($subDeliveryCountArr, $connectMap, $deliverMap, $result, $globalMaxDis, $root, 0, $k);\n\n \n return 2 * $result - $globalMaxDis;\n}", "public function testfindCheapestRoute()\n {\n $travelRoute = new TravelRoute();\n\n $this->assertEquals([\n 'route' => 'GRU,BRC,SCL',\n 'price' => 15\n ], $travelRoute->findCheapestRoute('GRU', 'SCL'));\n }", "public function shortestTransitDaysAndCheapest()\n {\n $products = $this->p();\n usort($products, [$this, 'sortByTransitDaysThenCheapest']);\n return $products[0];\n }", "public function findCity($cityOne, $cityTwo='', $cityThree='', \n $purpose, $temperature, $longitude, $latitude, $tripDistance) {\n # set object variables\n $this->purposeForTravel = $purpose;\n $this->preferredTemp = $temperature;\n $this->cityOne = $cityOne; \n $this->cityTwo = $cityTwo; \n $this->cityThree = $cityThree; \n $this->longitude = $longitude;\n $this->latitude = $latitude; \n $this->tripDistance = $tripDistance; \n if(isset($cityTwo))\n $this->citiesInputed++; \n if(isset($cityThree))\n $this->citiesInputed++; \n\t\t\n #calculate all city scores\n $this->perfectCity(); \n if ($this->purposeForTravel == 'Close Trip')\n $this->calcDistScores();\n $this->calcTempScores(); \n $this->calcTraitScores(); \n $this->calcTotalScores(); \n $this->weightScore(); \n \n # set chosen city variables\n if ($this->chosenCity != 'no city found') {\n $this->setCoordinates($this->chosenCity);\n $this->setTraits($this->chosenCity);\n $this->setTemperature($this->chosenCity); \n }\n }", "function getNationalRoute($originCity, $destinyCity)\n {\n }", "public function getCheapestFlights($flightsArray)\n {\n $cheapestArray = [];\n foreach ($flightsArray as $index => $items) {\n foreach ($items as $item) {\n if ($item->price === min(array_column($items, 'price'))) {\n $cheapestArray[$index] = ['price' => $item->price, 'booking_token' => $item->booking_token];\n }\n }\n }\n ksort($cheapestArray);\n return $cheapestArray;\n }", "function getMinDistance($student, $tutor)\n{\n\t$minDistance = MAX_DISTANCE;\n\tforeach ($student as &$studentLoc) {\n\t\t//print \"$studentLoc<br>\";\n\t\tforeach ($tutor as &$tutorLoc){\n\t\t\t$distance = get_distance($studentLoc,$tutorLoc);\n\t\t\t//print \"$distance $tutorLoc<br>\";\n\t\t\tif($distance < $minDistance)\n\t\t\t\t$minDistance = $distance;\n\t\t}\n\t}\n\treturn $minDistance;\n}", "protected function getJcDecauxNearestStation($latitude, $longitude, $city)\n {\n $nearestStation = new BikeStation($this->availableCities[$city[0]['contract_name']]['commercial_name']);\n $nearestDistance = -1;\n $nearestPos = [];\n $currentNearestStation = null;\n\n foreach ($city as $bikePlace) {\n if ($bikePlace['status'] !== 'OPEN' || !($bikePlace['available_bikes'] > 0)) {\n continue;\n }\n\n $currentDistance = $this\n ->distanceCalculator\n ->distance($latitude, $longitude, $bikePlace['position']['lat'], $bikePlace['position']['lng'], 'K')\n ;\n\n if ($currentDistance < $nearestDistance || $nearestDistance === -1) {\n $nearestDistance = $currentDistance;\n $nearestPos = $bikePlace['position'];\n $currentNearestStation = $bikePlace;\n }\n }\n\n $nearestStation->setName($currentNearestStation['name']);\n $nearestStation->setAvailableBikes(intval($currentNearestStation['available_bikes']));\n $nearestStation->setAvailableBikeStands(intval($currentNearestStation['available_bike_stands']));\n $nearestStation->setDistance($nearestDistance);\n $nearestStation->setPosition($nearestPos);\n $nearestStation->setNumber(intval($currentNearestStation['number']));\n $epoch = substr($currentNearestStation['last_update'], 0, -3);\n $nearestStation->setLastUpdate(new DateTime(\"@$epoch\"));\n\n return $nearestStation;\n }", "public function makeOneRequest($oldest_flight)\n {\n\n\n\t\t$em = $this->getDoctrine()->getManager();\n\n\t\t$all_flights = $this->getDoctrine()->getRepository('FlyingMainBundle:Flights');\n\n\t\t$oldest_date = $oldest_flight->getDate();\n\n\t\t//adicionar 3 dias a data desse voo, ja que o request da ryanair, da a data mais 3 dias para tras e para a frente\n\t\t$today_date = date(\"Y-m-d\");\n\n\t\t// so faz o request se a data de last updated for mais antiga que o numero de dias definidos nos parametros\n\t\t$min_update_days = $this->container->getParameter('min_update_days');\n\t\t$update_date_only = date('Y-m-d', strtotime($today_date. ' - '.$min_update_days.' days'));\n\t\t\n\t\tif ($oldest_flight->getLastUpdated() > $update_date_only ) return;\n\n\t\t$request_date = date('Y-m-d', strtotime($oldest_date. ' + 3 days'));\n\n\t\t$request_origin = $oldest_flight->getOrigin();\n\t\t$request_destination = $oldest_flight->getDestination();\n\n\t\t$request_date_formated = str_replace(\"-\",\"/\",$request_date);\n\n\t\t$url = 'https://www.bookryanair.com/SkySales/Search.aspx';\n\t\t$data = array('__EVENTTARGET' => 'SearchInput$ButtonSubmit',\n \t 'SearchInput$IsFlexible' => 'on',\n \t 'SearchInput$TripType' => 'OneWay',\n\t 'SearchInput$Orig' => $request_origin,\n\t 'SearchInput$Dest' => $request_destination,\n\t 'SearchInput$DeptDate' => $request_date_formated,\n\t 'SearchInput$RetDate' => $request_date_formated,\n\t 'SearchInput$PaxTypeADT' => \"1\");\n\n\t\t$options = array(\n\t\t 'http' => array(\n\t\t 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n\t\t 'method' => 'POST',\n\t\t 'content' => http_build_query($data),\n\t\t ),\n\t\t);\n\t\t$context = stream_context_create($options);\n\t\t$result = file_get_contents($url, false, $context);\n\n\t\tpreg_match('/FR\\.flightData\\s=\\s(.*?)\\;/',$result, $flightData);\n\t\tpreg_match('/FR\\.booking\\s=\\s(.*?)\\;/',$result, $booking);\n\t\t\n\t\t$flightData=json_decode($flightData[1],true);\n\t\n\t\tif ($flightData==null) { // pode ainda nao haver voo. marca como visto na DB\n\t\t\t$one_flight_to_update->setFlightNumber('NA');\n\t\t\t$one_flight_to_update->setLastUpdated($today_date);\n\t\t\treturn;\n\t\t}\n\t\t$booking=json_decode($booking[1],true); // daqui so interessa a moeda usada\n\t\t$currency = $booking['Info']['Curr'];\n\n\t\t//actualiza ja este voo como visto, porque pode dar origem a erros. Se a oldest date for igual a hoje, simplesmente nao vai actualizar este voo\n\t\t$oldest_flight->setLastUpdated($today_date);\n\n\t\tforeach ($flightData[$request_origin.$request_destination] as $one_day) {\n\n \t\t$this_day_date = $one_day[0];\n\n \t\t$flights_to_update = $all_flights->findBy(array('origin' => $request_origin, 'destination' => $request_destination, 'date' => $this_day_date)); \n\n \t\t$one_day_info= $one_day[1]; // aqui posso saber se o voo nao existe\n \t\t\n \t\t// considera-os como inexistentes ate prova em contrario\n\t\t\tforeach ($flights_to_update as $one_flight_to_update) {\n \t\t\t\t$one_flight_to_update->setFlightNumber('NA');\n\t\t\t\t\t$one_flight_to_update->setLastUpdated($today_date);\n \t\t\t}\n\n\t\t\t$one_day_info_count = count($one_day_info); // numero de voos nesse dia\n \t\t\n\t\t\tforeach($one_day_info as $one_flight ) { // percorre os voos nesse dia\n\t\t\t\t$flight_number = $one_flight[2];\n\t\t\t\t$times_dates = $one_flight[3];\n\n\t\t\t\t$departure_info = $times_dates[0];\n\t\t\t\t$arrival_info = $times_dates[1];\n\t\t\t\t\n\t\t\t\t$departure_date = $departure_info[0];\n\t\t\t\t$departure_time = $departure_info[1];\n\n\t\t\t\t$arrival_time = $arrival_info[1];\n\t\t\t\t\n\t\t\t\t$price_info = $one_flight[4]['ADT'][1];\n\n\t\t\t\tif (isset($price_info['Tax'])) $price_tax = $price_info['Tax'];\n\t\t\t\telse $price_tax=0;\n\n\t\t\t\t$price = $price_info['FarePrice'] + $price_tax;\n\n\t\t\t\tif ($currency!='EUR') { // faz a conversao para euro\n\t\t\t\t\t$currencies = $this->getDoctrine()->getRepository('FlyingMainBundle:Currencies');\n\t\t\t\t\t$currencies = $currencies->findOneBy(array('code' => $currency)); \n\t\t\t\t\t$price = $price/($currencies->getRate());\n\t\t\t\t}\n\n\t\t\t\t// ve se este voo existe na DB\n\t\t\t\t$search_flight_to_update = $all_flights->findOneBy(array('origin' => $request_origin, 'destination' => $request_destination, 'date' => $departure_date, 'departure' => $departure_time));\n\n\t\t\t\tif ($search_flight_to_update!='') { // existe na DB, por isso vai actualizar\n\t\t\t\t\t$search_flight_to_update->setFlightNumber($flight_number);\n\t\t\t\t\t$search_flight_to_update->setLastUpdated($today_date);\n\t\t\t\t\t$search_flight_to_update->setPrice($price);\n\t\t\t\t}\n\t\t\t\telse { // nao existe na DB por isso cria um novo\n\t\t\t\t\t$one_flight = new Flights();\n\t\t\t\t $one_flight->setOrigin($request_origin);\n\t\t\t\t $one_flight->setDestination($request_destination);\n\t\t\t\t\t$one_flight->setDate($departure_date);\n\t\t\t\t\t$one_flight->setFlightNumber($flight_number);\n\t\t\t\t\t$one_flight->setDeparture($departure_time);\n\t\t\t\t\t$one_flight->setArrival($arrival_time);\n\t\t\t\t\t$one_flight->setLastUpdated($today_date);\n\t\t\t\t\t$one_flight->setPrice($price);\n\t\t\t\t\t$one_flight->setActive(true);\n\t\t\t\t\t$em->persist($one_flight);\n\t\t\t\t}\n\t\t\t}\n \t}\n\n\t\t$em->flush();\n\n }", "function get_flight_from_ws($airline, $depcode, $descode, $depdate, $retdate, $direction=1, $format='json'){\n\t\n\t$airline = strtoupper(trim($airline));\n\t$depcode = strtoupper(trim($depcode));\n\t$descode = strtoupper(trim($descode));\n\t$depdate = str_replace('/','-',$depdate);\n\t$retdate = isset($retdate) && !empty($retdate) ? str_replace('/','-',$retdate) : $depdate; \n\t$api_key = '70cd2199f6dc871824ea9fed45170af354ffe9e6';\n \n $timeout = 30;\n \n\tif ($airline == 'VN' || $airline == 'QH') {\n $urls = array(\n // 'http://fs2.vietjet.net',\n 'http://fs3.vietjet.net',\n 'http://fs4.vietjet.net',\n 'http://fs5.vietjet.net',\n 'http://fs6.vietjet.net',\n 'http://fs7.vietjet.net',\n 'http://fs8.vietjet.net',\n 'http://fs9.vietjet.net',\n 'http://fs10.vietjet.net',\n 'http://fs11.vietjet.net',\n 'http://fs12.vietjet.net',\n 'http://fs13.vietjet.net',\n 'http://fs14.vietjet.net',\n 'http://fs15.vietjet.net',\n 'http://fs16.vietjet.net',\n 'http://fs17.vietjet.net',\n 'http://fs18.vietjet.net',\n 'http://fs19.vietjet.net',\n 'http://fs20.vietjet.net',\n 'http://fs21.vietjet.net',\n 'http://fs22.vietjet.net',\n 'http://fs23.vietjet.net',\n 'http://fs24.vietjet.net',\n 'http://fs25.vietjet.net',\n 'http://fs26.vietjet.net',\n 'http://fs27.vietjet.net',\n 'http://fs28.vietjet.net',\n 'http://fs29.vietjet.net',\n 'http://fs30.vietjet.net',\n );\n } else if ($airline == 'VJ' || $airline == 'BL'){\n $timeout = 35;\n $urls = array(\n 'http://fs2.vietjet.net',\n );\n }\n\n shuffle($urls);\n $url = $urls[array_rand($urls)];\n\t$url .= '/index.php/apiv1/api/flight_search/format/'.$format;\n\t$url .= '/airline/'.$airline.'/depcode/'.$depcode.'/descode/'.$descode.'/departdate/'.$depdate.'/returndate/'.$retdate.'/direction/'.$direction;\n\n\t$curl_handle = curl_init();\n\tcurl_setopt($curl_handle, CURLOPT_URL, $url);\n\tcurl_setopt($curl_handle, CURLOPT_ENCODING, 'gzip');\n\tcurl_setopt($curl_handle, CURLOPT_TIMEOUT, $timeout);\n curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, $timeout);\n\tcurl_setopt($curl_handle, CURLOPT_HTTPHEADER, array('X-API-KEY: '.$api_key));\n\tcurl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);\n $buffer = curl_exec($curl_handle);\n\n curl_close($curl_handle);\n $result = json_decode($buffer, true);\n\n\treturn $result;\n}", "function find_min_vertex($v1,$vertices,$distance_table){\n $min = INF;\n $min_i = 0;\n\n foreach($vertices as $v2){\n $d = distance_lookup($v1,$v2,$distance_table);\n if($d < $min){\n $min = $d;\n $min_i = $v2;\n }\n }\n return array($min_i,$min);\n\n}", "function caluculDistance($line,$nameStart,$nameEnd,$cat){\n\n\n if ( ! (($stationStart= getStationDB($nameStart,$line)) && ($stationEnd= getStationDB($nameEnd,$line)))) return \"stations do not exist\";\n //check direction\n\n if ($stationStart->getDist()< $stationEnd->getDist()) $keyword='ASC' ;\n else $keyword='DESC';\n\n\n $array =calculDistanceDB($stationStart,$stationEnd,$keyword,$cat);\n return $array;\n}", "public function get_flights($vars=array()) {\n\n if(!empty($vars))\n { \n $origin_city = (isset($vars['origin_city']) && ($vars['origin_city']!=\"\")) ? $vars['origin_city'] : \"\";\n $destination_city = (isset($vars['destination_city']) && ($vars['destination_city']!=\"\")) ? $vars['destination_city'] : \"\";\n $trip_type = (isset($vars['trip_type']) && ($vars['trip_type']!=\"\")) ? $vars['trip_type'] : 1;\n $departure_date = (isset($vars['departure_date']) && ($vars['departure_date']!=\"\")) ? $vars['departure_date'] : \"\";//date(\"Y-m-d\");\n $return_date = (isset($vars['return_date']) && ($vars['return_date']!=\"\")) ? $vars['return_date'] : \"\";//date(\"Y-m-d\",strtotime(\"+1 day\"));\n $persons = (isset($vars['persons']) && ($vars['persons']!=\"\")) ? $vars['persons'] : 1;\n \n $filters_flight = (isset($vars['filters_flight']) && ($vars['filters_flight']!=\"\")) ? $vars['filters_flight'] : \"\";\n $condition = \"\";\n if($filters_flight != \"\")\n {\n $condition .= \"arrivalLocation IN ($filters_flight) AND (Capacity > '0')\"; //This is to search for flight heading in cities that matched the filter result \n }else\n {\n //prepare condition\n if($trip_type == 2)\n { //return trip\n if(($origin_city == \"\") || ($destination_city == \"\") || ($departure_date == \"\") || ($return_date == \"\") )\n {\n return false;\n }\n $condition = \"( ( ( (DepartureAirport LIKE '%$origin_city%' AND ArrivalLocation LIKE '%$destination_city%') AND (DepartureDate = '$departure_date' ) ) \n OR ( (DepartureAirport LIKE '%$destination_city%' AND ArrivalLocation LIKE '%$origin_city%') AND (DepartureDate = '$return_date' ) ) )\n AND (Capacity >= '$persons') )\"; \n }else\n { //One way trip\n \n if(($origin_city == \"\") || ($destination_city == \"\") || ($departure_date == \"\") )\n {\n return false;\n }\n $condition = \"( ( (DepartureAirport LIKE '%$origin_city%' AND ArrivalLocation LIKE '%$destination_city%') AND (DepartureDate = '$departure_date' ) ) \n AND (Capacity >= '$persons') )\"; \n }\n }\n }else\n {\n $condition = \" 1='1' \"; \n }\n //echo $condition;\n $this->db->select('*');\n $this->db->from('flight');\n $this->db->where($condition);\n $this->db->order_by('Price', \"asc\");\n $query = $this->db->get();\n \n if ($query->num_rows() > 0) {\n return $query->result();\n } else {\n return false;\n }\n}", "function _casetravel($previousloc_X, $previousloc_Z, $previousaisle_X, $previousaisle_Z, $currentaisle_X, $currentaisle_Z, $FIRSTLOC_X, $FIRSTLOC_Z) {\n\n $outeraisle = abs($previousloc_X - $previousaisle_X) + abs($previousloc_Z - $previousaisle_Z); //previous last location to previous parking spot\n $outeraisle += abs($previousaisle_X - $currentaisle_X) + abs($previousaisle_Z - $currentaisle_Z); //previous parking spot to current parking spot\n $outeraisle += abs($currentaisle_X - $FIRSTLOC_X) + abs($currentaisle_Z - $FIRSTLOC_Z);\n\n return $outeraisle;\n}", "public function testFindLargestZipCodeAmongstCity(){\n\n // TODO définir le pipeline\n $pipeline = [];\n\n $result = $this->zips->aggregate($pipeline);\n $this->assertEquals('CHICAGO', $result->toArray()[0]['city']);\n }", "public function getFareByStates($origin, $destination)\n {\n $sql = \"SELECT fares.*, pm.origin, pm.destination, d.park AS destination_name, o.park AS origin_name, d_s.state_name AS destination_state, o_s.state_name AS origin_state\n FROM fares\n INNER JOIN park_map AS pm ON fares.park_map_id = pm.id\n INNER JOIN travel_park_map ON travel_park_map.park_map_id = pm.id\n INNER JOIN parks AS d ON pm.destination = d.id\n INNER JOIN parks AS o ON pm.origin = o.id\n INNER JOIN states AS o_s ON o.state_id = o_s.id\n INNER JOIN states AS d_s ON d.state_id = d_s.id\n WHERE o_s.id = :origin_state AND d_s.id = :destination_state\";\n\n if (self::$db->query($sql, array('origin_state' => $origin, 'destination_state' => $destination))) {\n return self::$db->fetch('obj');\n }\n }", "function getNearbyStations($startPoint,$endPoint){\n\n try {\n $startStations = OrderedStation::getStationsFromCoord($startPoint);\n $endStations = OrderedStation::getStationsFromCoord($endPoint);\n }catch (Exception $e){\n throw new Exception($e->getMessage());\n }\n //this type validation should probably be in a different function\n try {\n $finalStations = Station::ReduceStationPairings($startStations, $endStations);\n }catch (Exception $e){\n throw new Exception(\"Given coordinates refer to stations on different highways. \".$e->getMessage());\n }\n return $finalStations;\n\n }", "function find($from, $to, $date) {\n $flights = array();\n \n $date = '2009-05-29'; // hard coded to match the flight data\n \n $date = date('Y-m-j', strtotime($date));\n \n foreach ($this->flights as $flight) {\n if ($flight['dairport'] == $from['code'] && $flight['aairport'] == $to['code'] && $flight['ddate'] == $date) {\n $flight['dairport'] = $this->airports->lookup($flight['dairport']);\n $flight['aairport'] = $this->airports->lookup($flight['aairport']);\n $flights[] = $flight;\n }\n }\n \n uasort($flights, array($this, 'sort'));\n return $flights;\n }", "function find_closest_stations ($lat, $lng, $stations, $num, $recalc = FALSE) {\r\n\tstatic $R = 6371;\r\n\tstatic $distances = array();\r\n\t$closest = -1;\r\n\treset($distances);\r\n\t//if (count(array_diff($stations_cache,$stations)) > 0) {\r\n\t//\t$stations_cache = $stations;\r\n\t// \t$recalc = TRUE;\r\n\t//}\r\n\tif (count($distances) == 0 || $recalc) {\r\n\t\t$station_ids = array_keys( $stations );\r\n\t\tfor ( $i = 0 ; $i < count( $station_ids ) ; $i++ ) {\r\n\t\t\tif ( !isset( $stations[$station_ids[$i]] ) ) { continue; }\r\n\t\t\t// check for a duplicate station using an alternate ID, e.g. 999999XXXXX or XXXXXX99999\r\n\t\t\tif ( isset( $stations[$station_ids[$i]] ) && $stations[$station_ids[$i]]['usafid'] != '999999' && $stations[$station_ids[$i]]['wban'] != '99999' ) {\r\n\t\t\t\t$i_usafid_only = $stations[$station_ids[$i]]['usafid'] . '99999';\r\n\t\t\t\tif ( isset( $stations[$i_usafid_only] ) ) {\r\n\t\t\t\t\tunset( $stations[$i_usafid_only] );\r\n\t\t\t\t\tif ( isset( $distances[$i_usafid_only] ) ) {\r\n\t\t\t\t\t\tunset( $distances[$i_usafid_only] );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$i_wban_only = '999999' . $stations[$station_ids[$i]]['wban'];\r\n\t\t\t\tif ( isset( $stations[$i_wban_only] ) ) {\r\n\t\t\t\t\tunset( $stations[$i_wban_only] );\r\n\t\t\t\t\tif ( isset( $distances[$i_wban_only] ) ) {\r\n\t\t\t\t\t\tunset( $distances[$i_wban_only] );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$mlat = $stations[$station_ids[$i]]['lat'];\r\n\t\t\t$mlng = $stations[$station_ids[$i]]['lng'];\r\n\t\t\t$dLat = rad($mlat - $lat);\r\n\t\t\t$dLng = rad($mlng - $lng);\r\n\t\t\t$a = sin($dLat/2) * sin($dLat/2) +\r\n\t\t\t\tcos(rad($lat)) * cos(rad($lat)) * sin($dLng/2) * sin($dLng/2);\r\n\t\t\t$c = 2 * atan2(sqrt($a), sqrt(1-$a));\r\n\t\t\t$d = $R * $c;\r\n\t\t\t/* If the distance calculation results in is_nan($d), do not add it to the distances array. \r\n\t\t\tThese values will always be pushed to the top of the array, resulting in a poor \r\n\t\t\t\"closest station\" calculation. */\r\n\t\t\tif (!is_nan($d)) {\r\n\t\t\t\t$distances[$station_ids[$i]] = $d;\r\n\t\t\t}\r\n\t\t}\r\n\t\tasort($distances);\r\n\t} else {\r\n\t\tunset($distances[key($distances)]);\r\n\t}\r\n\treturn array_slice($distances,0,$num,TRUE);\r\n}", "function find_minimum($entities) {\r\n \r\n\tglobal $userconnection_distance;\r\n $keys = array_keys ($entities);\r\n $minid = $entities[$keys[0]];\r\n $mindist = $userconnection_distance[$minid];\r\n foreach ($keys as $key) {\r\n $tentity = $entities[$key];\r\n if ($userconnection_distance[$tentity] < $mindist) {\r\n $mindist = $userconnection_distance[$tentity];\r\n $minid = $tentity;\r\n }\r\n }\r\n return $minid;\r\n}", "function getCarParkLoc($from_lat, $from_lon){\n // find the closest node_id to ($from_lat, $from_lon) on a way\n global $mysqli;\n $offset = 0.1;\n $sql = \"SELECT node_id, lat, lon, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_car_parkings\n ORDER BY x ASC LIMIT 1\";\n $arr = array();\n $result = $mysqli->query($sql);\n while($result && $row = $result->fetch_assoc()){\n $arr[] = array($row['lat'],$row['lon']);\n }\n return $arr[0];\n}", "private function getStartLocation()\n {\n for ($counter = 0; $counter < count($this->boardingCards); $counter++) {\n\n $from = $this->boardingCards[$counter]->getFrom();\n /*\n * The start location is a place we depart from but never arrived\n */\n if (!array_key_exists($from, $this->toIndex)) {\n return $from;\n }\n }\n return null;\n }", "public function getMinimumStops()\n {\n $this->stops = 0;\n for ($i = 0; $i < self::MAX_STOPS; $i++) {\n $this->stops++;\n $this->handleStop();\n if ($this->driversKnowAllGossips()) {\n return $this->stops;\n }\n $this->nextStop();\n }\n return self::MINIMUM_NEVER;\n }", "function find_carpool_match($lat1,$lon1){\n\t\tglobal $connection;\n $query = \"SELECT *, \n\t\t\t\t( 3959 * acos( cos( radians('$lat1') ) * \n\t\t\t\t cos( radians( Lat ) ) * \n\t\t\t\t cos( radians( Lng ) - \n\t\t\t\t radians('$lon1') ) + \n\t\t\t\t sin( radians('$lat1') ) * \n\t\t\t\t sin( radians( Lat ) ) ) ) \n\t\t\t\t AS distance FROM employees WHERE NeedCarpool=1 HAVING distance < 5 ORDER BY distance ASC LIMIT 0, 10\";\n\n\t\t$result = mysqli_query($connection,$query);\n confirm_query($result);\n if($result)\n return $result;\n else\n return null; \n \n }", "function findPOILonelyPlanet($name, $lat, $lon) {\n global $lonelyplanetup, $lonelyplanetapi;\n\n $bbox = buildBBox($lat, $lon, 100);\n $q = \"http://$lonelyplanetup@$lonelyplanetapi/bounding_boxes/\";\n $q .= $bbox[3].','.$bbox[1].','.$bbox[2].','.$bbox[0].'/pois';\n // $q = \"/Users/rajsingh/workspace/openpoidb/application/lonelyplanet/example_bbox_faneuil_res.xml\";\n // echo \"lp url: $q\";\n $xml = simplexml_load_file($q);\n \n if ( empty($xml->poi) ) {\n return NULL;\n }\n\n $comp = new StringMatch;\n $matches = array();\n foreach ($xml->poi as $lppoi) {\n $n = (string)$lppoi->name;\n\n $lscore = $comp->fstrcmp($name, strlen($name), $n, strlen($n), 0.5);\n // echo \"score for $n is: $lscore\\n\";\n if ( $lscore > 0.5 ) {\n $m = new MatchCandidate($lppoi->id);\n $m->labels = array($n => $lscore);\n\n $blon = floatval($lppoi->{'digital-longitude'});\n $blat = floatval($lppoi->{'digital-latitude'});\n $dist = ddDistance($lat, $lon, $blat, $blon);\n $m->dist = $dist;\n\n $m->computeScore(500);\n $matches[] = $m;\n }\n }\n\n // get best match\n $highscore = 0.0;\n $bm = null;\n foreach ($matches as $m) {\n if ( $m->score > $highscore ) {\n $highscore = $m->score;\n $bm = $m;\n }\n // echo \"id: $m->geouuid\\tdistance: $m->dist\\tscore: $m->score\\n\";\n // foreach($m->labels as $l => $s) {\n // echo \"label: $l\\tscore: $s\\n\";\n // }\n }\n \n if ( !empty($bm) ) \n return (string)$bm->geouuid;\n else \n return NULL;\n}", "public function short_route($routes){\r\n $min_route = NULL;\r\n $min_cost = NULL;\r\n\r\n foreach($routes as $route){\r\n $cost = $this->get_cost_route($route);\r\n if(!isset($min_cost) || $cost < $min_cost){\r\n $min_route = $route;\r\n $min_cost = $cost;\r\n }\r\n }\r\n\r\n return array('route' => $min_route, 'cost' => $min_cost);\r\n\r\n }", "function _getClosestLocation($activity_name, $db_connection) {\n\t\t// given an activity name, find average location of registered users registered to that activity, \n\t\t// then return closest building to that location\n\t\t// step 1: gather all users and their coordinates registered to activity passed\n\t\t$users = array();\n\t\t$stmt = $db_connection->stmt_init();\n\t\tif ($stmt->prepare('SELECT user_name, user_x, user_y\n\t\t\t\t\t\t\tFROM registeredTo \n\t\t\t\t\t\t\tNATURAL JOIN\n\t\t\t\t\t\t\tUsers\n\t\t\t\t\t\t\tWHERE activity_name=?')) {\n\t\t\t$stmt->bind_param('s', $activity_name);\n\t\t\t$stmt->execute();\n\t\t\t$stmt->bind_result($user_name, $user_x, $user_y);\n\t\t\twhile ($stmt->fetch()) {\n\t\t\t\t$users[] = array(\"user_name\" => $user_name, 'x' => $user_x, 'y' => $user_y);\n\t\t\t}\n\t\t}\n\t\t$stmt->close();\n\t\t/*\n\t\tforeach ($users as $user_name => $coords) {\n\t\t\techo \"$user_name : \" . $coords['x'] . \" \" . $coords['y'] . '<br>'; \n\t\t}\n\t\t*/\n\n\t\t// step 2: gather all buildings and their coordinates where activity can take place\n\t\t$buildings = array();\n\t\t$stmt = $db_connection->stmt_init();\n\t\tif ($stmt->prepare('SELECT building_name, building_x, building_y\n\t\t\t\t\t\t\tFROM ActivityLocations \n\t\t\t\t\t\t\tNATURAL JOIN\n\t\t\t\t\t\t\tBuildings\n\t\t\t\t\t\t\tWHERE activity_name=?')) {\n\t\t\t$stmt->bind_param('s', $activity_name);\n\t\t\t$stmt->execute();\n\t\t\t$stmt->bind_result($building_name, $building_x, $building_y);\n\t\t\twhile ($stmt->fetch()) {\n\t\t\t\t$buildings[] = array(\"building_name\" => $building_name, 'x' => $building_x, 'y' => $building_y);\n\t\t\t}\n\t\t}\n\n\n\t\t// STEP 3: get middle x and middle y\n\t\t$middleX = getMedian($users, 'x');\n\t\t$middleY = getMedian($users, 'y');\n\n\t\t$closest_building = getClosest($buildings, $middleX, $middleY);\n\t\treturn array(\"activity_name\" => $activity_name, \"registered_users\" => $users, \"closest_building\" => $closest_building);\n\t}", "public static function getDestinationNeedCities($cityURL, $stateCode) {\n\t\tglobal $wpdb;\n\t\t\n\t\treturn $wpdb->get_results($wpdb->prepare(\"SELECT q.ID, `Requestee`, `Leaving`, `LeavingTimeZone`, `Occupants`, `FromCity`, `FromState`, `FromLatitude`, `FromLongitude`, `City` AS `ToCity`, `State` AS `ToState`, `Latitude` AS `ToLatitude`, `Longitude` AS `ToLongitude` FROM (SELECT ffi_ta_need.ID, `Requestee`, `Leaving`, `LeavingTimeZone`, `MalesPresent` + `FemalesPresent` + 1 AS `Occupants`, `City` AS `FromCity`, `State` AS `FromState`, `Latitude` AS `FromLatitude`, `Longitude` AS `FromLongitude`, `ToCity` FROM `ffi_ta_need` LEFT JOIN `ffi_ta_cities` ON ffi_ta_need.FromCity = ffi_ta_cities.ID LEFT JOIN (SELECT wp_usermeta.user_id AS `ID`, CONCAT(wp_usermeta.meta_value, ' ', last.meta_value) AS `Requestee` FROM `wp_usermeta` LEFT JOIN (SELECT `meta_value`, `user_id` FROM `wp_usermeta` WHERE `meta_key` = 'last_name') AS `last` ON wp_usermeta.user_id = last.user_id WHERE `meta_key` = 'first_name') AS `users` ON ffi_ta_need.Person = users.ID WHERE REPLACE(LOWER(ffi_ta_cities.City), ' ', '-') = %s AND ffi_ta_cities.State = %s AND (ffi_ta_need.Leaving > NOW() AND ffi_ta_need.Fulfilled = 0) OR (ffi_ta_need.Leaving <= NOW() AND ffi_ta_need.EndDate > NOW() AND ffi_ta_need.Fulfilled = 0) ORDER BY `Leaving` ASC) `q` LEFT JOIN `ffi_ta_cities` ON q.ToCity = ffi_ta_cities.ID ORDER BY `ToCity` ASC, `ToState` ASC, `Leaving` ASC\", $cityURL, $stateCode));\n\t}", "public function nextClientVisit()\n {\n $today = Carbon::now();\n $visit = SitePlanner::where('from', '>=', $today->format('Y-m-d'))->where('site_id', $this->site_id)->where('task_id', 524)->orderBy('from')->first();\n\n return $visit;\n //return ($visit) ? $visit->from : null;\n }", "function getLatLong($address, $city, $postalCode) {\n $combinedAddress = $address . \", \" . $postalCode . \" \" . $city;\n\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\" . urlencode($combinedAddress) . \"&key=\" . Config::GOOGLE_API_KEY;\n $context = stream_context_create();\n $result = file_get_contents($url, false, $context);\n\n if (isset($result)) {\n $parsedResult = json_decode($result, true);\n\n if (isset($parsedResult[\"results\"])) {\n $results = $parsedResult[\"results\"];\n $firstLocation = $results[0];\n return $firstLocation[\"geometry\"][\"location\"];\n } else {\n echo($result);\n }\n } else {\n echo \"HELP\";\n }\n}", "function findClosest($res, $curLat, $curLon) {\n // REMEMBER TO CHANGE CURLAT1 to CURLAT and CURLON1 to CURLON\n // originLan, originLon, destLan, destLon\n\n $absLoc = abs($curLat) + abs($curLon);\n\n\n // name, absLoc, latitude, longitude, rating, clean, purchase, bidet, squat, tpStash, soap\n while ($row = $res->fetch_assoc()) {\n $dbAbsLoc[] =floatval($row['absLoc']);\n }\n\n // locate the nearest absLoc point\n $i = 0;\n do {\n $tempLoc = abs($absLoc - $dbAbsLoc[$i]); \n $i++;\n } while ($i < count($dbAbsLoc) && $tempLoc > (abs($absLoc - $dbAbsLoc[$i])));\n $tempLoc = $dbAbsLoc[$i-1];\n requestClosest($tempLoc, $curLat, $curLon);\n}", "abstract public function city();", "public function getCity();", "function get_flight_inter_from_ws($depcode, $arvcode, $outbound_date, $inbound_date, $adult, $child, $infant, $triptype='ROUND_TRIP', $format='json'){\n\t\n\t$outbound_date = str_replace('/','-',$outbound_date);\n\t$inbound_date = isset($inbound_date) && !empty($inbound_date) ? str_replace('/','-',$inbound_date) : $outbound_date;\n\t$api_key = '70cd2199f6dc871824ea9fed45170af354ffe9e6';\n\t$supplier = 'hnh';\n\t\n\t$url = 'http://api.vemaybaynamphuong.com/index.php/apiv1/api/flight_search_inter/format/'.$format;\n\t$url .= '/supplier/'.$supplier;\n\t$url .= '/depcode/'.$depcode;\n\t$url .= '/arvcode/'.$arvcode;\n\t$url .= '/outbound_date/'.$outbound_date;\n\t$url .= '/inbound_date/'.$inbound_date;\n\t$url .= '/adult/'.$adult;\n\tif($child > 0){\n\t\t$url .= '/child/'.$child;\n\t}\n\tif($infant > 0){\n\t\t$url .= '/infant/'.$infant;\n\t}\n\t$url .= '/triptype/'.$triptype;\n\t\n\t$curl_handle = curl_init();\n\tcurl_setopt($curl_handle, CURLOPT_URL, $url);\n\tcurl_setopt($curl_handle, CURLOPT_TIMEOUT, 30);\n curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 30);\n\tcurl_setopt($curl_handle, CURLOPT_HTTPHEADER, array('X-API-KEY: '.$api_key));\n\tcurl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);\n\t\n\t$buffer = curl_exec($curl_handle);\n\tcurl_close($curl_handle);\n\t$result = json_decode($buffer, true);\n\treturn $result;\n}", "function get_location( $args = array() ) {\n\t$throttle_geonames = $throttle_ip2location = $location = false;\n\n\t// For a country request, no lat/long are returned.\n\tif ( isset( $args['country'] ) ) {\n\t\t$location = array(\n\t\t\t'country' => $args['country'],\n\t\t);\n\t}\n\n\t// Coordinates provided\n\tif (\n\t\t! $location && (\n\t\t\t! empty( $args['latitude'] ) && is_numeric( $args['latitude'] ) &&\n\t\t\t! empty( $args['longitude'] ) && is_numeric( $args['longitude'] )\n\t\t)\n\t) {\n\t\t$location = array(\n\t\t\t'description' => false,\n\t\t\t'latitude' => $args['latitude'],\n\t\t\t'longitude' => $args['longitude'],\n\t\t);\n\t}\n\n\t// City was provided by the user:\n\tif ( ! $location && isset( $args['location_name'] ) ) {\n\t\t$throttle_geonames = mt_rand( 1, 100 ) <= THROTTLE_GEONAMES;\n\n\t\tif ( $throttle_geonames ) {\n\t\t\treturn 'temp-request-throttled';\n\t\t}\n\n\t\t$country_code = get_country_code_from_locale( $args['locale'] ?? '' );\n\t\t$guess = guess_location_from_city( $args['location_name'], $args['timezone'] ?? '', $country_code );\n\n\t\t$country_types = array(\n\t\t\t// See http://download.geonames.org/export/dump/featureCodes_en.txt\n\n\t\t\t'A.PCL', // political entity\n\t\t\t'A.PCLD', // dependent political entity\n\t\t\t'A.PCLF', // freely associated state\n\t\t\t'A.PCLH', // historical political entity\ta former political entity\n\t\t\t'A.PCLI', // independent political entity\n\t\t\t'A.PCLIX', // section of independent political entity\n\t\t\t'A.PCLS', // semi-independent political entity\n\t\t\t'A.PRSH', // parish an ecclesiastical district\n\t\t\t'A.TERR', // territory\n\t\t\t'A.ZN', // zone\n\t\t);\n\n\t\tif ( $guess && in_array( $guess->type, $country_types, true ) ) {\n\t\t\t$location = array(\n\t\t\t\t'country' => $guess->country,\n\t\t\t\t'description' => $guess->name,\n\t\t\t);\n\t\t} elseif ( $guess ) {\n\t\t\t$location = array(\n\t\t\t\t'description' => $guess->name,\n\t\t\t\t'latitude' => $guess->latitude,\n\t\t\t\t'longitude' => $guess->longitude,\n\t\t\t\t'country' => $guess->country,\n\t\t\t);\n\t\t} else {\n\t\t\t$guess = guess_location_from_country( $args['location_name'] );\n\n\t\t\tif ( $guess ) {\n\t\t\t\t$location = array(\n\t\t\t\t\t'country' => $guess['country_short'],\n\t\t\t\t\t'description' => $guess['country_long'],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( ! $location ) {\n\t\tif ( isset( $args['location_name'] ) || isset( $args['ip'] ) || ! empty( $args['latitude'] ) || ! empty( $args['longitude'] ) ) {\n\t\t\t// If any of these are specified, and no localitity was guessed based on the above checks, bail with no location.\n\t\t\t$location = false;\n\t\t} else {\n\t\t\t// No specific location details.\n\t\t\t$location = array();\n\t\t}\n\t}\n\n\t// IP:\n\tif ( ! $location && isset( $args['ip'] ) && ! isset( $args['location_name'] ) ) {\n\t\t$throttle_ip2location = mt_rand( 1, 100 ) <= THROTTLE_IP2LOCATION;\n\n\t\tif ( $throttle_ip2location ) {\n\t\t\treturn 'temp-request-throttled';\n\t\t}\n\n\t\t$guess = guess_location_from_ip( $args['ip'] );\n\n\t\tif ( $guess ) {\n\t\t\t$location = array(\n\t\t\t\t'description' => $guess->ip_city,\n\t\t\t\t'latitude' => $guess->ip_latitude,\n\t\t\t\t'longitude' => $guess->ip_longitude,\n\t\t\t\t'country' => $guess->country_short,\n\n\t\t\t\t/*\n\t\t\t\t * ip2location's EULA forbids exposing the derived location publicly, so flag the\n\t\t\t\t * data for internal use only.\n\t\t\t\t */\n\t\t\t\t'internal' => true,\n\t\t\t);\n\t\t}\n\t}\n\n\treturn $location;\n}", "function getNodeId($from_lat, $from_lon, $transport){\n // find the closest node_id to ($from_lat, $from_lon) on a way\n global $mysqli;\n $offset = 0.01;\n switch ($transport){\n case \"foot\":\n $sql = \"SELECT id, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_road_nodes\n WHERE lat < $from_lat+$offset AND lat > $from_lat-$offset\n AND lon < $from_lon+$offset AND lon > $from_lon-$offset\n ORDER BY x ASC LIMIT 1\";\n break;\n case \"bicycle\":\n $sql = \"SELECT id, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_road_nodes\n WHERE lat < $from_lat+$offset AND lat > $from_lat-$offset\n AND lon < $from_lon+$offset AND lon > $from_lon-$offset\n ORDER BY x ASC LIMIT 1\";\n break;\n case \"car\":\n $sql = \"SELECT id, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_road_nodes\n WHERE lat < $from_lat+$offset AND lat > $from_lat-$offset\n AND lon < $from_lon+$offset AND lon > $from_lon-$offset\n ORDER BY x ASC LIMIT 1\";\n break;\n }\n $arr = array();\n $result = $mysqli->query($sql);\n while($result && $row = $result->fetch_assoc()){\n $arr[] = $row;\n }\n return (int) $arr[0]['id'];\n}", "public function getShortestPath($origin, $destination);", "function requestClosest($tempLoc, $curLat, $curLon) {\n global $mysqli;\n global $toiletDB;\n \n $revised = $mysqli->prepare(\"SELECT * FROM $toiletDB WHERE absLoc = $tempLoc\");\n $revised->execute();\n $res = $revised->get_result();\n \n printClosest($res, $curLat, $curLon);\n \n $res->close(); \n}", "private function buildFirstLastBoarding()\n {\n $hasPreviousBoarding = false;\n $isLastBoarding = true;\n\n for ($i = 0, $size = count($this->boardings); $i < $size ; $i++) {\n // Lookup for the arrival city and the departure city\n foreach ($this->boardings as $trip) {\n // If current trip departure is another's trip arrival, so we have a previous trip\n if (strcasecmp($this->boardings[$i]['Departure'], $trip['Arrival']) == 0) {\n $hasPreviousBoarding = true;\n } elseif (strcasecmp($this->boardings[$i]['Arrival'], $trip['Departure']) == 0) {\n // If current trip's arrival is another trip departure, then it is not the last trip\n $isLastBoarding = false;\n }\n }\n\n if (!$hasPreviousBoarding) {\n // Its first trip, so should be a first element\n array_unshift($this->boardings, $this->boardings[$i]);\n unset($this->boardings[$i]);\n } elseif ($isLastBoarding) {\n // Lat element pushed to the end\n array_push($this->boardings, $this->boardings[$i]);\n unset($this->boardings[$i]);\n }\n }\n\n // We regenerate indexes\n $this->boardings = array_merge($this->boardings);\n }", "function guess_location_from_city( $location_name, $timezone, $country_code ) {\n\tglobal $cache_group, $cache_life;\n\n\t$cache_key = 'guess_location_from_city:' . md5( $location_name . ':' . $timezone . ':' . $country_code );\n\t$guess = wp_cache_get( $cache_key, $cache_group );\n\n\tif ( $guess ) {\n\t\tif ( '__NOT_FOUND__' == $guess ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $guess;\n\t}\n\n\t$guess = guess_location_from_geonames( $location_name, $timezone, $country_code );\n\n\t/*\n\t * Multi-word queries may contain cities, regions, and countries, so try to extract just the city\n\t *\n\t * This won't work for most ideographic languages, because they don't use the space character as a word\n\t * delimiter.\n\t */\n\t$location_name_parts = preg_split( '/[,\\s]+/u', $location_name );\n\tif ( ! $location_name_parts ) {\n\t\t// Invalid/Unsupported UTF8 characters encountered.\n\t\t$location_name_parts = array( $location_name );\n\t}\n\t$location_word_count = count( $location_name_parts );\n\n\t// Catch input like \"Portland Maine\" and \"Sao Paulo Brazil\"\n\tif ( ! $guess && $location_word_count > 1 ) {\n\t\tforeach ( range( $location_word_count - 1, 1 ) as $i ) {\n\t\t\t$city_name = implode( ' ', array_slice( $location_name_parts, 0, $i ) );\n\t\t\t$guess = guess_location_from_geonames( $city_name, $timezone, $country_code, $wildcard = false );\n\n\t\t\tif ( $guess ) {\n\t\t\t\tbreak; // end foreach\n\t\t\t}\n\t\t}\n\t}\n\n\twp_cache_set( $cache_key, ( $guess ?: '__NOT_FOUND__' ), $cache_group, $cache_life );\n\n\treturn $guess;\n}", "protected function _geocode($city = \"\", $country = \"\", $cp = \"\", $address1 = \"\", $address2 = \"\") {\n\n $place = array();\n\n if(!empty($address1) || !empty($address2)) {\n $place[] = $address1 . (!empty($address2) ? \" \" . $address2 : \"\");\n }\n\n if(!empty($cp)) {\n $place[] = $cp;\n }\n\n if(!empty($city)) {\n $place[] = $city;\n }\n\n if(!empty($country)) {\n $place[] = $country;\n }\n\n $place = urlencode(implode(',', $place));\n\n $url = \"http://maps.google.com/maps/api/geocode/json?sensor=false&address=\" . $place;\n $response = file_get_contents($url);\n\n if(!empty($response)) {\n\n $response = json_decode($response, true);\n\n if(!array_key_exists('status', $response) || $response['status'] != \"OK\") {\n return false;\n }\n\n if(empty($response['results'])) {\n return false;\n }\n\n return $response['results'][0]['geometry']['location'];\n }\n\n return false;\n }", "function distance_lookup($c1,$c2,$distance_table){\n //TODO make this return infinite if there's nothing in the table\n return $distance_table[$c1][$c2]['duration']['value'];\n}", "function requiresTravel($place){\n return $this->ship->place->eq($place);\n }", "public function search($city);", "private function calcTotalScores() {\n $enteredCities = [trim(strtolower($this->cityOne)), \n trim(strtolower($this->cityTwo)), trim(strtolower($this->cityThree))]; \n \n for($x=0; $x<$this->numberOfCities; $x++) {\n $this->totalScores[$x] = $this->tempScores[$x] + $this->traitScores[$x];\n if ($this->totalScores[$x] > $this->maxScore) {\n $testCity = $this->map[$x]; \n if (!in_array(strtolower($testCity), $enteredCities)) {\n # if Day Trip selected, will bypass certain cities too far away\n if($this->purposeForTravel == 'Close Trip') {\n if($this->distScores[$x] > $this->tripDistance)\n continue; \n }\n $this->maxScore = $this->totalScores[$x];\n $this->chosenCity = $testCity; \n }\n }\n }\n }", "function MinimumDistance($distance, $shortestPathTreeSet, $verticesCount)\r\n\t{\r\n\t\tglobal $INT_MAX;\r\n\t\t$min = $INT_MAX;\r\n\t\t$minIndex = 0;\r\n\r\n\t\tfor ($v = 0; $v < $verticesCount; ++$v)\r\n\t\t{\r\n\t\t\tif ($shortestPathTreeSet[$v] == false && $distance[$v] <= $min)\r\n\t\t\t{\r\n\t\t\t\t$min = $distance[$v];\r\n\t\t\t\t$minIndex = $v;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $minIndex;\r\n\t}", "function postcode_dist($postcode1, $postcode2, $suburb1 = '', $suburb2 = '') {\n//Get lat and lon for postcode 1\n $extra = \"\";\n if ($suburb1 != '') {\n $extra = \" and suburb = '$suburb1'\";\n }\n $sqlquery = \"SELECT * FROM postcode_db WHERE lat <> 0 and lon <> 0 and postcode = '$postcode1'$extra\";\n $res = mysqli_query($sqlquery);\n $num = mysqli_num_rows($res);\n\n\n//Get lat and lon for postcode 2\n\n $extra = \"\";\n if ($suburb2 != '') {\n $extra = \" and suburb = '$suburb2'\";\n }\n $sqlquery = \"SELECT * FROM postcode_db WHERE lat <> 0 and lon <> 0 and postcode = '$postcode2'$extra\";\n $res1 = mysqli_query($sqlquery);\n $num1 = mysqli_num_rows($res1);\n\n if ($num != 0 && $num1 != 0) {\n//proceed\n $lat1 = mysql_result($res, 0, \"lat\");\n $lon1 = mysql_result($res, 0, \"lon\");\n $lat2 = mysql_result($res1, 0, \"lat\");\n $lon2 = mysql_result($res1, 0, \"lon\");\n $dist = calc_dist($lat1, $lon1, $lat2, $lon2);\n if (is_numeric($dist)) {\n return $dist;\n } else {\n return \"Unknown\";\n }\n } else {\n return \"Unknown\";\n }\n}", "function getFuelReqTo($place){\n $distance = $this->getTravelDistance($this->ship->place, $place);\n return $distance / 1000;\n }", "function getGoogleRoute($point1, $point2){\n //Reference: https://developers.google.com/maps/documentation/roads/snap\n \n $apiKey = getenv(\"GOOGLE_ROADS_API\");\n $pointStr = \"{$point1[0]},{$point1[1]}|{$point2[0]},{$point2[1]}\";\n $url = \"https://roads.googleapis.com/v1/snapToRoads?path={$pointStr}&interpolate=true&key={$apiKey}\";\n \n $result = file_get_contents($url);\n if ($result === FALSE || empty($result)) { \n echo \"Nothing returned from Google Roads API\";\n $result = FALSE;\n }\n //echo $result;\n return $result;\n}", "public static function checkTravelOverlapping($travel)\n {\n if($travel['nb_days'] < 2) {\n return $travel;\n }\n\n //The departure day is included into the travel duration.\n $nbDays = $travel['nb_days'] - 1;\n //Get the end date of the travel.\n $endDate = UtilityHelper::getLimitDate($nbDays, $travel['date_picker']);\n\n //No overlapping.\n if($endDate <= $travel['date_time_2']) {\n return $travel;\n }\n\n //Compute the number of days for each period.\n $travel['nb_days_period_1'] = UtilityHelper::getRemainingDays($travel['date_time_2'], $travel['date_picker']);\n //The departure day is included into the travel duration.\n $travel['nb_days_period_1'] = $travel['nb_days_period_1'] + 1;\n $travel['nb_days_period_2'] = $travel['nb_days'] - $travel['nb_days_period_1'];\n\n //Get the second overlapping period.\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n $query->select('step_id, dpt_id, date_time, date_time_2')\n ->from('#__odyssey_departure_step_map')\n\t ->where('date_time > '.$db->quote($travel['date_time_2']))\n\t ->where('step_id='.(int)$travel['dpt_step_id'])\n\t ->order('date_time ASC')\n\t ->setLimit('1');\n $db->setQuery($query);\n $period2 = $db->loadAssoc();\n\n //There is no second overlapping period or this period starts after the end of the travel.\n //Note: Add the seconds parameter to endDate or the comparison won't work properly.\n if($period2 === null || $period2['date_time'] > $endDate.':00') {\n return $travel;\n }\n\n //In case there is a gap between the end of the period 1 and the start of the period 2.\n for($i = 1; $i < $travel['nb_days']; $i++) {\n if($period2['date_time'] > UtilityHelper::getLimitDate($i, $travel['date_time_2'], true, 'Y-m-d H:i:s')) {\n\t//Readjust the days for each period.\n\t$travel['nb_days_period_1']++;\n\t$travel['nb_days_period_2']--;\n }\n else {\n\tbreak;\n }\n }\n\n $travel['period_2_dpt_id'] = $period2['dpt_id'];\n $travel['overlapping'] = 1;\n\n return $travel;\n }", "public function fc($name)\n {\n $sourceCity = $this->findCity($name);\n\n if ($sourceCity) {\n return $this->builder->where('source_city_id', $sourceCity->id);\n }\n }", "function distance_slc($lat1, $lon1, $lat2, $lon2) {\n\t\t$earth_radius = 3960.00; # in miles\n\t\t$delta_lat = $lat2 - $lat1 ;\n\t\t$delta_lon = $lon2 - $lon1 ;\n\t\t$distance = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($delta_lon)) ;\n\t\t$distance = acos($distance);\n\t\t$distance = rad2deg($distance);\n\t\t$distance = $distance * 60 * 1.1515;\n\t\t$distance = round($distance, 4);\n\t\n\t\treturn $distance;\n\t}", "function wyz_cmp_listings_near_me( $a, $b ) {\n\tif ( $a['distance'] == $b['distance'] ) return 0;\n\treturn $a['distance'] < $b['distance'] ? -1 : 1;\n}", "function getCityCircuit()\r\n{\r\n\tglobal $db;\r\n\t$city = intval(GET_INC('city'));\r\n\t$db->connDB();\r\n\t$db->query(\"SELECT id,name FROM bus_circuit WHERE city={$city};\");\r\n\t$fw = true;\r\n\twhile ( $res = $db->fetch_array() )\r\n\t{\r\n\t\tif ( $fw )\r\n\t\t{\r\n\t\t\t$fw = false;\r\n\t\t}else{\r\n\t\t\techo '&';\r\n\t\t}\r\n\t\techo $res['id'];\r\n\t\techo ',';\r\n\t\techo $res['name'];\r\n\t}\r\n\t$db->closeDB();\r\n}", "function getDistance($lat1, $lon1, $lat2, $lon2) {\n if(!$lat1 || !$lat2 || !$lon1 || !$lon2){\n return NULL;\n }\n\n if (($lat1 == $lat2) && ($lon1 == $lon2)) {\n return 0;\n }\n else {\n $theta = $lon1 - $lon2;\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist);\n $miles = $dist * 60 * 1.1515;\n\n return ($miles * 1.609344);\n }\n }", "function getBikeParkLoc($from_lat, $from_lon){\n // find the closest node_id to ($from_lat, $from_lon) on a way\n global $mysqli;\n $offset = 0.1;\n $sql = \"SELECT node_id, lat, lon, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_bike_parkings\n ORDER BY x ASC LIMIT 1\";\n $arr = array();\n $result = $mysqli->query($sql);\n while($result && $row = $result->fetch_assoc()){\n $arr[] = array($row['lat'],$row['lon']);\n }\n return $arr[0];\n}", "function detect_city($ip) {\n\t $lat \t= '11.825138'; //NYC: 40.8291\n\t $lon \t= '42.590275';\n\t $city \t= \"Djibouti\";\n\n\t\t// Get location by IP\n\t\t$ip_json \t= file_get_contents(\"http://freegeoip.net/json/\".$ip);\n\t\t$json_loc \t= json_decode($ip_json,true);\n\n\t\tif ($json_loc[\"latitude\"])\n\t\t\treturn array($json_loc[\"latitude\"], $json_loc[\"longitude\"], $json_loc[\"city\"]);\n\t\telse\n\t\t\treturn array($lat, $lon, $city);\n\t}", "public function hasCity() {\n return $this->_has(2);\n }", "public function distance($other_loc) {\r\n if ($this->city == false || $other_loc->city == false) {\r\n return false;\r\n }\r\n $origin = ($this->address ? str_replace(' ', '+', $this->address) : '') . '+' . $this->city . '+' . $this->state;\r\n $destination = ($other_loc->address ? str_replace(' ', '+', $other_loc->address) : '') . '+' . $other_loc->city . '+' . $other_loc->state;\r\n $url = \"https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=$origin&destinations=$destination&key={$GLOBALS['google_maps_key']}\";\r\n $curl_handle = curl_init();\r\n curl_setopt( $curl_handle, CURLOPT_URL, $url );\r\n curl_setopt( $curl_handle, CURLOPT_RETURNTRANSFER, true );\r\n $distance_info = json_decode(curl_exec( $curl_handle ), true);\r\n curl_close( $curl_handle );\r\n if (!isset($distance_info['rows'][0]['elements'][0]['distance'])) {\r\n return false;\r\n }\r\n return [\r\n 'time' => $distance_info['rows'][0]['elements'][0]['duration'],\r\n 'length' => $distance_info['rows'][0]['elements'][0]['distance']\r\n ];\r\n }", "public function getMinLeftSideBearing() {}", "public function breadFirstSearch($origin, $desitnation)\n {\n //mark all nodes as unvisited\n foreach($this->graph as $vetex => $adj)\n {\n $this->visited[$vertec] = false;\n }\n\n //create an empty queue\n $q = new SplQueue();\n\n //enqueue the origin vertex and mark as visted\n $q->enqueue($origin);\n $this->visited[$origin] = true;\n\n //this is used to track the path back from each node\n $path = array();\n $path[$origin] = new SplDoubleLinkedList();\n $path[$origin]->setIteratorMode(\n SpleDoubleLinkedLit::IT_MODE_FIFO|SpleDoublyLinkedList::IT_MODE_KEEP\n );\n\n $path[$origin]->push($origin);\n\n $found = false;\n //while queue is not empty and destination not found\n while(!$q->isEmpty() && $q->bottom != $destination)\n {\n $t = $q->dequeue();\n\n if(!empty($this->graph[$t]))\n {\n //for each adjacent neighbor\n foreach($this->graph[$t] as $vertex)\n {\n if(!$this->visited[$vertex])\n {\n //if not yet visited, enqueue vertex and mark\n //as visited\n $q->enqueue($vertex);\n $this->visited[$vertex] = true;\n //add vertex to current path\n $path[$vertex] = clone$path[$t];\n $path[$vertex]->push($vertex);\n }\n }\n }\n }\n\n if(isset($path[$destination]))\n {\n echo \"$origin to $desitnation in \",\n count($path[$destination]) - 1,\n \"hopsn\";\n $sep = '';\n foreach($path[$destination] as $vertex)\n {\n echo $sep, $vertex;\n $sep = '->';\n }\n echo \"n\";\n }\n else\n {\n echo \"No route from the $origin to $destination\";\n }\n }", "public function testCitiesMergeTogether()\n {\n $route1 = new Route(['Csíkszereda', 'Székelyudvarhely'], 1);\n $route2 = new Route(['Szentegyáza', 'Lövéte', 'Almás'], 2);\n\n $route1->citiesMergeTogether($route2);\n\n //check if the old cities stayed on the route\n $this->assertContains('Csíkszereda', $route1->getCities());\n\n //Check if the new cities are on the route\n $this->assertContains('Szentegyáza', $route1->getCities());\n }", "function GetFuturePts($t)\n{\n global $game, $NUM_BUILDING;\n $_planet_points = 10;\n\n // Sum all points of the planet, $game->planet contains values\n // actualized with the queued buildings\n for($b = 1; $b <= $NUM_BUILDING; $b++)\n $_planet_points += pow($game->planet['building_'.$b],1.5);\n /* \n for($r = 1; $r <= 5; $r++)\n $_planet_points += pow($game->planet['research_'.$r],1.5);\n */\n $_planet_points = round($_planet_points);\n\n // Calculate points of the required building\n $_points = round(pow($game->planet['building_'.($t+1)]+1,1.5)-pow($game->planet['building_'.($t+1)],1.5));\n\n // Sum up all the points\n $_total = $_points + $_planet_points;\n\n return($_total);\n}", "public function hasFlights($did) {\n db_set_active('stage');\n $route = db_select('air_directions_time', 'adt')\n ->fields('adt', array('time'))\n ->condition('adt.did', $did)->execute()->fetchField(0);\n db_set_active('default');\n return $route;\n }", "function getCity($q, $limit){\r\n\t\t$this->load->library('jne');\r\n\t\t$json = $this->jne->getDestination($q, $limit);\r\n\t\tif($json){\r\n\t\t\treturn $json;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "function calculateDistance($first, $second)\r\n{\r\n return abs($first - $second);\r\n}", "public function breadthFirstSearch($origin, $destination, $maxTime) {\n // mark all nodes as unvisited\n foreach ($this->graph as $vertex => $adj) {\n $this->visited[$vertex] = false;\n }\n\n // create an empty queue\n $q = new SplQueue();\n\n // enqueue the origin vertex and mark as visited\n $q->enqueue($origin);\n $this->visited[$origin] = true;\n\n // this is used to track the path back from each node\n $path = array();\n $path[$origin] = new SplDoublyLinkedList();\n $path[$origin]->setIteratorMode(\n SplDoublyLinkedList::IT_MODE_FIFO|SplDoublyLinkedList::IT_MODE_KEEP\n );\n\n $path[$origin]->push($origin);\n\n $found = false;\n // while queue is not empty and destination not found\n while (!$q->isEmpty() && $q->bottom() != $destination) {\n $t = $q->dequeue();\n\n if (!empty($this->graph[$t])) {\n // for each adjacent neighbor\n foreach ($this->graph[$t] as $vertex) {\n $totalTime = 0;\n foreach($vertex as $v=>$time){\n if (!$this->visited[$v]) {\n // if not yet visited, enqueue vertex and mark\n // as visited\n $q->enqueue($v);\n $this->visited[$v] = true;\n // add vertex to current path\n $path[$v] = clone $path[$t];\n $path[$v]->push([$v => $time]);\n $totalTime += $time;\n if($v == $destination){\n $sep = '';\n $output = '';\n $totalTime = 0;\n foreach ($path[$destination] as $key => $value) {\n if($key == 0) {\n $output .= $sep. $value;\n $sep = '=>';\n continue;\n }\n foreach($value as $vertex => $time){\n $output .= $sep. $vertex;\n $totalTime += $time;\n }\n\n }\n $output .= $sep.$totalTime.PHP_EOL;\n if($totalTime < $maxTime) {\n echo $output;\n break;\n }else {\n $this->visited[$v] = false;\n unset($path[$v]);\n }\n }\n }\n }\n\n }\n }\n }\n //print_r($path);\n if (!isset($path[$destination])) {\n echo \"Path not found between $origin to $destination\".PHP_EOL;\n }\n }", "public function getCity() {}", "function getInternationalRoute($originCity, $destinyCity)\n {\n }", "private function extractFirstLastTrip()\n {\n // If trip is shorter than 3 legs, there is actually no need anymore\n if (count($this->tripCollection) < 2) {\n return $this->tripCollection;\n }\n\n // Find the start and end point for the trips\n for ($i = 0, $max = count($this->tripCollection); $i < $max; $i++) {\n $hasPreviousTrip = false;\n $isLastTrip = true;\n\n foreach ($this->tripCollection as $index => $trip) {\n // If this trip is attached to a previous trip, we pass!\n if (strcasecmp($this->tripCollection[$i]['Departure'], $trip['Arrival']) == 0) {\n $hasPreviousTrip = true;\n } // If this trip is not the last trip, we pass!\n elseif (strcasecmp($this->tripCollection[$i]['Arrival'], $trip['Departure']) == 0) {\n $isLastTrip = false;\n }\n }\n\n // We found the start point of the trip,\n // so we put it on the top of the list\n if (!$hasPreviousTrip) {\n array_unshift($this->tripCollection, $this->tripCollection[$i]);\n unset($this->tripCollection[$i]);\n } // And the end of the trip\n elseif ($isLastTrip) {\n array_push($this->tripCollection, $this->tripCollection[$i]);\n unset($this->tripCollection[$i]);\n }\n\n }\n\n // Reset indexes\n $this->tripCollection = array_merge($this->tripCollection);\n }", "public function getFoodTruckNearestLocation($lat, $lon ,$countOfLoc) {\r\n try {\r\n $rows = array_map('str_getcsv', file('../Mobile_Food_Facility_Permit.csv'));\r\n $header = array_shift($rows);\r\n $csv = array();\r\n $counter = 1;\r\n $myJSON = array();\r\n foreach($rows as $row) {\r\n $a = $lat - $row[14];\r\n $b = $lon - $row[15];\r\n $distance = sqrt(($a**2) + ($b**2));\r\n $distances[$row[0]] = $distance;\r\n $array[$row[0]] = $row;\r\n $csv[$row[0]] = array_combine($header, $row);\r\n }\r\n asort($distances);\r\n $counter = 1;\r\n $myJSON = array();\r\n foreach($distances as $id=>$value) {\r\n \r\n $foodTruck[] = array('name'=>$csv[$id]['Applicant'], \r\n \"address\"=>$csv[$id]['LocationDescription'],\r\n \"facilityType\"=>$csv[$id]['FacilityType']);\r\n if($counter++ >$countOfLoc) break;\r\n }\r\n } catch (Exception $e) {\r\n return json_encode(array(\"error\"=>\"true\",\"description\"=>\"Exception\"));\r\n }\r\n return json_encode($foodTruck);\r\n }", "function timestamps_find_minimum($tsA, $tsB){\n $min_AB = PHP_INT_MAX;\n foreach ($tsA as $tsA_p => $tsA_v){\n foreach ($tsB as $tsB_p => $tsB_v){\n if (strtotime($tsB_v) > strtotime($tsA_v)){\n $diff_AB[] = (strtotime($tsB_v)-strtotime($tsA_v));\n }\n }\n if ($diff_AB != NULL){\n $min_AB = min($diff_AB);\n }\n }\n return $min_AB;\n}", "public static function getOriginCities($stateURL) {\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->get_results($wpdb->prepare(\"SELECT `City`, `StateName`, `Code`, REPLACE(LOWER(`StateName`), ' ', '-') AS `URL`, `Image`, `District`, `Latitude`, `Longitude`, `Needs`, `Shares` FROM (SELECT ffi_ta_cities.*, ffi_ta_states.Name AS `StateName`, ffi_ta_states.Code, ffi_ta_states.Image, ffi_ta_states.District, COALESCE(q1.Needs, 0) AS `Needs`, COALESCE(q2.Shares, 0) AS `Shares` FROM `ffi_ta_cities` LEFT JOIN `ffi_ta_states` ON ffi_ta_cities.State = ffi_ta_states.Code LEFT JOIN (SELECT `FromCity`, COUNT(`FromCity`) AS `Needs` FROM `ffi_ta_need` WHERE (ffi_ta_need.Leaving > NOW() AND ffi_ta_need.Fulfilled = 0) OR (ffi_ta_need.Leaving <= NOW() AND ffi_ta_need.EndDate > NOW() AND ffi_ta_need.Fulfilled = 0) GROUP BY `FromCity`) `q1` ON ffi_ta_cities.ID = q1.FromCity LEFT JOIN (SELECT `FromCity`, COUNT(`FromCity`) AS `Shares` FROM `ffi_ta_share` WHERE (ffi_ta_share.Leaving > NOW() AND ffi_ta_share.Seats > ffi_ta_share.Fulfilled) OR (ffi_ta_share.Leaving <= NOW() AND ffi_ta_share.EndDate > NOW() AND ffi_ta_share.Seats > ffi_ta_share.Fulfilled) GROUP BY `FromCity`) `q2` ON ffi_ta_cities.ID = q2.FromCity) `query` WHERE `Needs` > 0 OR `Shares` > 0 HAVING `URL` = %s ORDER BY `City` ASC\", $stateURL));\n\t}", "private function perfectCity() {\n $this->addCity($this->cityOne);\n $this->addCity($this->cityTwo);\n $this->addCity($this->cityThree);\n if ($this->perfectCity != '')\n $this->perfectCitySize = sizeof(array_unique($this->perfectCity)); \n }", "function getCoordStrFromCityname($cityname)\n {\n \n // PHP allows switching on strings, somehow\n switch ($cityname)\n {\n \n case \"Boston\":\n return \"lat=42.36&lng=-71.06\";\n\n \n case \"Los Angeles\":\n return \"lat=34.05&lng=-118.25\";\n\n \n case \"Atlanta\":\n return \"lat=33.755&lng=-84.39\";\n\n \n default:\n // error code goes here\n break;\n \n } \n \n // if we reach here then report failure?\n return \"\";\n \n }", "function ETA($client, $addr1, $addr2){\n \t $url_base = \"https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=\";\n \t $a = $addr1 . \"&destinations=\";\n \t $c = \"&key=AIzaSyDGWyTjn7CiwzGc1UeirymO3H-6HIk2F4w\";\n \t $url = $url_base . $a .$addr2. $c;\n \t $response = $client->get($url);\n \t if ($response->getStatusCode() == 200){\n \t $json_array = json_decode($response->getBody(), true);\n \t $info = $json_array['rows'];\n \t foreach($info as $i){\n \t foreach($i['elements'] as $elem){\n \t return $elem['duration']['value'];\n \t }\n \t }\n \t }\n \t}", "function checkIfCityInUse($id)\r\n {\r\n $sql=\"SELECT city_id\r\n\t FROM edms_our_company\r\n\t\t WHERE city_id=$id LIMIT 0, 1\";\r\n $result=dbQuery($sql);\r\n \r\n if(dbNumRows($result)>0)\r\n {\r\n return true;\r\n }\r\n\r\n $sql=\"SELECT city_id\r\n\t FROM edms_customer\r\n\t\t WHERE city_id=$id LIMIT 0, 1\";\r\n $result=dbQuery($sql);\r\n \r\n if(dbNumRows($result)>0)\r\n {\r\n return true;\r\n }\r\n\r\n $sql=\"SELECT city_id\r\n\t FROM edms_guarantor\r\n\t\t WHERE city_id=$id LIMIT 0, 1\";\r\n $result=dbQuery($sql);\r\n \r\n if(dbNumRows($result)>0)\r\n {\r\n return true;\r\n }\r\n\r\n $sql=\"SELECT city_id\r\n\t FROM edms_vehicle_dealer\r\n\t\t WHERE city_id=$id LIMIT 0, 1\";\r\n $result=dbQuery($sql);\r\n \r\n if(dbNumRows($result)>0)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "public function getFlightsCustom($start_date, $end_date, $origin, $destination)\n {\n /*\n $query = $this->getEntityManager()\n ->createQuery(\n 'SELECT p FROM FlyingMainBundle:Flights p\n WHERE p.active = 1\n AND p.date >= :start_date AND p.date <= :end_date\n AND p.origin = :origin AND p.destination = :destination'\n )->setParameters(array('start_date' => $start_date, 'end_date' => $end_date, 'origin' => $origin, 'destination' => $destination));\n */\n $query = $this->getEntityManager()\n ->createQuery(\n 'SELECT p FROM FlyingMainBundle:Flights p\n WHERE p.price > 0 AND p.flightNumber != :na\n AND p.active = 1\n AND p.date >= :start_date AND p.date <= :end_date\n AND p.origin = :origin AND p.destination = :destination'\n )->setParameters(array('na' => 'NA', 'start_date' => $start_date, 'end_date' => $end_date, 'origin' => $origin, 'destination' => $destination));\n try {\n return $query->getResult();\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return null;\n }\n\n }", "function estimates($search)\n {\n $p = new ETA_Feed();\n $p->parse(curl_get_file_contents('http://www.bart.gov/dev/eta/bart_eta.xml'));\n \n $words = preg_split('#[/\\s\\.]+#', strtolower($search));\n \n $special_cases = array();\n $lev_distances = array();\n $station_matches = array();\n \n // look for possible matches\n foreach($p->stations as $s => $station)\n {\n $station_match = false;\n \n if(array_intersect($words, $station['words']))\n $station_match = true;\n \n foreach($words as $search_word)\n if($search_word)\n foreach($station['words'] as $station_word)\n if(substr($station_word, 0, strlen($search_word)) == $search_word)\n $station_match = true;\n \n switch(true)\n {\n // airport code for SF airport\n case strtoupper($search) == 'SFO' && $station['name'] == \"San Francisco Int'l Airport\":\n \n // airport code for Oakland airport\n case strtoupper($search) == 'OAK' && $station['name'] == 'Coliseum/Oakland Airport':\n \n // just searching for \"berkeley\" should match Downtown Berkeley\n case in_array(strtolower($search), array('berk', 'berkeley')) && $station['name'] == 'Downtown Berkeley':\n \n // does it seem more likely that someone would mean the SF airport over the Oakland one?\n case strtolower($search) == 'airport' && $station['name'] == \"San Francisco Int'l Airport\":\n\n // just searching for \"downtown\" should match downtown SF\n case strtolower($search) == 'downtown' && $station['name'] == 'Montgomery St.':\n\n $special_case = 1;\n $station_match = true;\n break;\n \n default:\n $special_case = 0;\n break;\n }\n \n if($station_match)\n {\n $station_matches[] = $station;\n $lev_distances[] = levenshtein($search, $station['name']);\n $special_cases[] = $special_case;\n }\n }\n \n // sort possible matches\n array_multisort($special_cases, SORT_DESC, $lev_distances, $station_matches);\n \n return count($station_matches) ? $station_matches[0] : null;\n }", "function getAvailableFlights2($source,$dest){\n\n $connection = initDB();\n $query2;\n\n $query2 = \"SELECT * FROM Sectors WHERE Sector='\".$source.\"'\";\n $result2 = mysql_query($query2);\n //or die (\"Query Failed \".mysql_error());\n $row2 = mysql_fetch_array($result2);\n $SourceSID = $row2['SID'];\n\n $query3 = \"SELECT * FROM Sectors WHERE Sector='\".$dest.\"'\";\n $result3 = mysql_query($query3);\n // or die (\"Query Failed \".mysql_error());\n $row3 = mysql_fetch_array($result3);\n $destSID= $row3['SID'];\n\n //Get available flights\n $query3 = \"SELECT * FROM Flights WHERE SourceSID='\".$SourceSID.\"' AND DestSID='\".$destSID.\"'\";\n $result3 = mysql_query($query3);\n // or die (\"Query Failed \".mysql_error());\n\n $flightsArray;\n $flightsID=1;\n\n while($row = mysql_fetch_array($result3)){\n $fName= $row['FName'];\n $flightsArray[$flightsID] = $fName;\n $flightsID = $flightsID +1;\n }\n closeDB($connection);\n return $flightsArray;\n}", "function getAvailableFlights($source,$dest){\n\n $connection = initDB();\n $query2; \n\n $query2 = \"SELECT * FROM Sectors WHERE Sector='\".$source.\"'\";\n $result2 = mysql_query($query2);\n //or die (\"Query Failed \".mysql_error()); \n $row2 = mysql_fetch_array($result2);\n $SourceSID = $row2['SID'];\n\n $query3 = \"SELECT * FROM Sectors WHERE Sector='\".$dest.\"'\";\n $result3 = mysql_query($query3);\n // or die (\"Query Failed \".mysql_error()); \n $row3 = mysql_fetch_array($result3);\n $destSID= $row3['SID'];\n \n //Get available flights\n $query3 = \"SELECT * FROM Flights WHERE SourceSID='\".$SourceSID.\"' AND DestSID='\".$destSID.\"'\";\n $result3 = mysql_query($query3);\n // or die (\"Query Failed \".mysql_error()); \n\n $flightsArray;\n $flightsID=1;\n\n while($row = mysql_fetch_array($result3)){ \n $fName= $row['FName'];\n $flightsArray[$flightsID] = $fName;\n $flightsID = $flightsID +1;\n }\n closeDB($connection);\n return $flightsArray;\n}", "function distance($lat1, $lon1, $lat2, $lon2)\n{\n if (($lat1 == $lat2) && ($lon1 == $lon2)) {\n return 0;\n } else {\n $theta = $lon1 - $lon2;\n $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));\n $dist = acos($dist);\n $dist = rad2deg($dist) * 60 * 1.853159616;\n return $dist;\n }\n}", "function solve_one(string $input) : string\n{\n [$timestamp, $ids] = xplode_input($input);\n $buses = array_filter(explode(',', $ids), function($bus) {\n return $bus != 'x';\n });\n $departures = [];\n foreach ($buses as $bus) {\n $x = 0;\n while($x < $timestamp) {\n $departures[$bus] = $x;\n $x = $x+$bus;\n }\n $departures[$bus] += $bus; // add another route to get the closest departure\n }\n\n asort($departures); // sort array from closer to departure time\n $closest = array_slice($departures, 0, 1, true); //get first element\n $minutes = array_keys($closest)[0] * (array_values($closest)[0]- (int)$timestamp);\n return sprintf(\"Result: %d\\n\",$minutes);\n}", "public function getHotelLocation()\n {\n return $this->select('city')->groupBy('city')->orderBy('city', 'ASC')->findAll();\n }", "public function explore($ap) {\n\t\t$res = $this->spendAP($ap);\n\t\tif ($res==-1) return -3;\n\t\telse {\n\t\t\t$targetLocation = new LocalMap($this->mysqli, $this->x, $this->y);\n\t\t\t$check = $targetLocation->loadcreate();\n\t\t\treturn $check;\n\t\t}\n\t}", "public function startCheck($flight);", "function distance($lat1,$lon1,$lat2,$lon2){\n $delta_lat = $lat2-$lat1;\n $delta_lon = $lon2-$lon1;\n return (($delta_lat * $delta_lat) + ($delta_lon * $delta_lon));\n}", "public function testSearchFlight()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n $flight = $this->addFlight($this->user);\n\n // search specifically for a flight ID\n $query = 'flight_id='.$flight->id;\n $req = $this->get('/api/flights/search?'.$query);\n $req->assertStatus(200);\n }", "private function getLatestPlace(){\n $last = -100000000;\n foreach($this->URLs as $url){\n if($url['url_place'] > $last) $last = $url['url_place'];\n }\n if($last == -100000000) $last = 0;\n return $last;\n }", "private function get_cities_origin() {\n $t_location = get_transient('wcis_location');\n return $t_location['cities'];\n }", "function getDistance($searchee = array(), $candidate = array()){\r\n\t\treturn 1 - $this->getCompatibility($searchee, $candidate);\r\n\t}", "function nearby_result_compare($a, $b) {\n\tif ($a[3] > $b[3]) {\n\t\treturn +1;\n\t} else if ($a[3] < $b[3]) {\n\t\treturn -1;\n\t} else {\n\t\treturn 0;\n\t}\n}", "function getRoute($con, $start_id, $end_id, $cost){\t\n\n\t\t$arrayData = array(); \t\t\t\t// Store geometric results from query in arrays\t\t\n\t\t$t1 = array();\n\t\t$t2 = array();\n\t\t$t3 = array();\n\t\t$t4 = array();\n\t\t$t5 = array();\n\t\t$t6 = array();\t\n\t\t\t\n\t\t$sql_routing = \"SELECT ST_AsGeoJSON(geom),\n\t\t\t\t\t\t\t\tt1, t2, t3, t4, t5, t6\n\t\t\t\t\t\t FROM dublin_traffic\n\t\t\t\t\t\t\t\tJOIN\n\t\t\t\t\t\t\t\t (SELECT * FROM shortest_path('\n\t\t\t\t\t\t\t\t\t SELECT id AS id, \n\t\t\t\t\t\t\t\t\t\t source::int4 AS source, \n\t\t\t\t\t\t\t\t\t\t target::int4 AS target, \n\t\t\t\t\t\t\t\t\t\t $cost::float8 AS cost\n\t\t\t\t\t\t\t\t\t FROM dublin_traffic',\n\t\t\t\t\t\t\t\t $start_id,\n\t\t\t\t\t\t\t\t $end_id,\n\t\t\t\t\t\t\t\t false,\n\t\t\t\t\t\t\t\t false)) AS route\n\t\t\t\t\t\t\tON\n\t\t\t\t\t\t dublin_traffic.id = route.edge_id;\";\n\n\t\t$query = pg_query($con, $sql_routing);\t\t// Run query\t\n\t\t$route = array(); \t\t\t\t\t\t\t// Store results in array\n\t\twhile($r = pg_fetch_row($query) ) {\t\t\t// Parse results\t\t\t\n\t\t\t\t$route[] = $r[0];\t\t\t\n\t\t\t\t$t1[] = $r[1];\t\t\t\n\t\t\t\t$t2[] = $r[2];\t\t\n\t\t\t\t$t3[] = $r[3];\t\t\n\t\t\t\t$t4[] = $r[4];\t\t\n\t\t\t\t$t5[] = $r[5];\t\t\n\t\t}\t\t\n\n\t\t/* function to calculate average */\n\t\tfunction avgT($a){\n\t\t\treturn array_sum($a) / count($a);\t\n\t\t}\n\n\t$avgTraffic = array(avgT($t1), avgT($t2), avgT($t3), avgT($t4), avgT($t5));\n\t\t \t\n\t\t\t\t\n\t\treturn \tarray(\t'start_id' => $start_id, \n\t\t\t\t\t\t'end_id' => $end_id,\n\t\t\t\t\t\t't1' => $t1,\n\t\t\t\t\t\t't2' => $t2,\n\t\t\t\t\t\t't3' => $t3,\n\t\t\t\t\t\t't4' => $t4,\n\t\t\t\t\t\t't5' => $t5,\t\n\t\t\t\t\t\t'avg' => $avgTraffic,\t\t\t\t\t\t\n\t\t\t\t\t\t'roads' => $route\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\t \n\t}", "protected function get_cost_route($route){\r\n $valor = 0;\r\n foreach ($route as $index => $city){\r\n if($index > 0){\r\n $valor += $this->connections[$city][$route[$index-1]];\r\n }\r\n }\r\n return $valor;\r\n }", "private function getFullCost(): float\n {\n $gasPrice = $this->getServicePrice($this->car->getGasType()); // Fetches current gas price.\n $tollPrice = 0;\n if ($this->tollRoads)\n foreach ($this->tollRoads as $road)\n $tollPrice += $this->getServicePrice($road); // Adding each toll road price to tollPrice var.\n // Estimated total passengers weight, considering average Israeli person weight and average luggage weight.\n $passengersWeight = $this->passNum * (self::AVG_PERSON_KG + self::AVG_LUGGAGE_KG);\n // Calculating efficiency change based on estimated passengers weight * efficiency change per KG constant.\n $efficiencyChange = ($passengersWeight * self::CHANGE_PER_KG) * $this->kmPerLiter;\n // Calculating full drive cost based on all variables.\n $fullCost = ($this->distance / ($this->kmPerLiter - $efficiencyChange)) * $gasPrice + $tollPrice;\n return $fullCost;\n }", "public function nextLandmark()\n\t\t{\n\t\t\t#current location\n\t\t\t$count = 0;\n\t\t\tforeach ($this->_locations as $local) {\n\t\t\t\tif($this->_distance < $local->_distance)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $count;\n\t\t\t\t\t}\n\t\t\t\t\t$count +=1;\n\t\t\t\t}\n\t\t}", "public static function getNearbyLocations($lat1,$lon1,$max = NULL) {\n\t\t\n\t\tif ($max == NULL) {\n\t\t\t$max = 100; # 250 meters distance for the check is the default\n\t\t}\n\t\t\t\n\t\t$where = self::getSearchableCategories();\n\t\t$sql = \"SELECT * FROM Buildings WHERE type = 'Building' OR type = 'Library' GROUP BY name ORDER BY name ASC\";\n\t\t$places = self::getPlaces($sql);\n\t\t$convertedPlaces = self::convertPlaces($places);\n\t\t\n\t\t// only converting first because i want easy keys to work with\n\t\t$nearbyPlaces = array();\n\t\tforeach ($convertedPlaces as $place) {\n\t\t\t$lat2 = $place['latitude'];\n\t\t\t$lon2 = $place['longitude'];\n\t\t\t\n\t\t\t// $distance is in kilometers\n\t\t\t$distance = (3958*3.1415926*sqrt(($lat2-$lat1)*($lat2-$lat1) + cos($lat2/57.29578)*cos($lat1/57.29578)*($lon2-$lon1)*($lon2-$lon1))/180);\n\t\t\t\n\t\t\tif ($max >= ($distance*1000)) {\n\t\t\t\t$nearbyPlaces[] = $place;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $nearbyPlaces;\n\t}", "public function GetPopularAirportDestination($depart)\n {\n //https://api.master18.tiket.com/flight_api/getPopularDestination?token=2d5717e45a8f7637470b4eb2514e4e64&depart=MES&output=json\n \n $params = array(\n 'depart' => $depart,\n 'token' => $this->Token\n );\n\n $response = $this->GetPublic('flight_api','getPopularDestination',$params);\n return (!empty($response['popular_destinations']['airport'])) ? $response['popular_destinations']['airport'] : array();\n }" ]
[ "0.5897992", "0.5793001", "0.57794833", "0.57518566", "0.5623613", "0.5551021", "0.54757845", "0.54124254", "0.53923035", "0.5346151", "0.5260339", "0.52358395", "0.52074176", "0.5170392", "0.51621073", "0.51505125", "0.51358765", "0.50730205", "0.5036109", "0.49859467", "0.49835134", "0.4940558", "0.4935654", "0.49197748", "0.48323932", "0.48306936", "0.4823869", "0.4818038", "0.47963485", "0.47861552", "0.47666192", "0.47313398", "0.47297192", "0.47279042", "0.4696487", "0.46947718", "0.46817553", "0.4680214", "0.46799144", "0.46679834", "0.46563023", "0.46524402", "0.46432048", "0.46410167", "0.46013972", "0.45906606", "0.45871297", "0.45801526", "0.457347", "0.4572564", "0.45654327", "0.45642072", "0.4560908", "0.4559782", "0.45542952", "0.4547226", "0.45457837", "0.45451695", "0.45400798", "0.45329243", "0.45256585", "0.4519301", "0.45179895", "0.45102024", "0.4505414", "0.45047534", "0.45027635", "0.44991148", "0.44943696", "0.44907698", "0.4487835", "0.4485826", "0.44828102", "0.44727337", "0.44716012", "0.44704536", "0.44694498", "0.44693172", "0.4465269", "0.44609392", "0.44563544", "0.4455555", "0.4454955", "0.44397527", "0.44319683", "0.4429726", "0.44235635", "0.44151825", "0.44056514", "0.44017607", "0.4399287", "0.4399154", "0.4397652", "0.43973625", "0.4393759", "0.43918732", "0.438408", "0.43839824", "0.4383678", "0.43812597" ]
0.71475494
0
Simple way to encrypt a 4 bytes long ASCII string
public static function encrypt($key, $data) { $simple = new self($key); return $simple->enc($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encrypt($string)\n{\n\t$hash = md5($string);\n\t$blok1 = substr($hash, 0,8);\n\t$blok2 = substr($hash, 8,8);\n\t$blok3 = substr($hash, 16,4);\n\t$blok4 = substr($hash, 20,4);\n\t$blok5 = substr($hash, 24,8);\n\n\treturn $blok2.'-'.$blok4.'-'.$blok5.'-'.$blok3.'-'.$blok1;\n}", "function encrypt($string, $key=KEY) {\n return base64_encode(encrypt_string($string, $key));\n }", "public function encrypt();", "function encrypt($string, $key)\n{ \n\t$result = '';\n\tfor($i=0; $i<strlen($string); $i++)\n\t{\n\t\t$char = substr($string, $i, 1);\n\t\t$keychar = substr($key, ($i % strlen($key))-1, 1);\n\t\t$char = chr(ord($char)+ord($keychar));\n\t\t$result.=$char;\n\t}\n\treturn base64_encode($result);\n}", "function encrypt($string) {\n\t\t\t$iv = $this->_generate_iv();\n\t\t\t\n\t\t\t// Clear output\n\t\t\t$out = '';\n\t\t\t\n\t\t\t// First block of output is ($this->hash_hey XOR IV)\n\t\t\tfor($c=0;$c < $this->hash_length;$c++) {\n\t\t\t\t$out .= chr(ord($iv[$c]) ^ ord($this->hash_key[$c]));\n\t\t\t}\n\t\n\t\t\t// Use IV as first key\n\t\t\t$key = $iv;\n\t\t\t$c = 0;\n\t\n\t\t\t// Go through input string\n\t\t\twhile($c < strlen($string)) {\n\t\t\t\t// If we have used all characters of the current key we switch to a new one\n\t\t\t\tif(($c != 0) and ($c % $this->hash_length == 0)) {\n\t\t\t\t\t// New key is the hash of current key and last block of plaintext\n\t\t\t\t\t$key = $this->_hash($key . substr($string,$c - $this->hash_length,$this->hash_length));\n\t\t\t\t}\n\t\t\t\t// Generate output by xor-ing input and key character for character\n\t\t\t\t$out .= chr(ord($key[$c % $this->hash_length]) ^ ord($string[$c]));\n\t\t\t\t$c++;\n\t\t\t}\n\t\t\t// Apply base64 encoding if necessary\n\t\t\tif($this->base64) $out = base64_encode($out);\n\t\t\treturn $out;\n\t\t}", "public function encrypt($string)\n {\n $key = $this->secretKey;\n //using hexadecimal\n $key = pack('H*', (string)$key);\n\n //$keySize = self::getKeySize($key);\n $iv = self::getIv();\n $cipherText = self::getCipherText($string, $key, $iv);\n\n //prepend the IV for it to be available for decryption\n $cipherText = $iv.$cipherText;\n\n return self::encode($cipherText);\n }", "function simple_encrypt($text){\n \treturn base64_encode(openssl_encrypt($text, \"AES-256-CTR\", \"GhratnaXbS\", 0, \"0123456789abcdef\"));\n }", "function encrypt_string($string, $key=KEY) {\n $iv = mcrypt_create_iv(cipher_iv_size(), MCRYPT_RAND);\n // Needs a key of length 16, 24, or 32\n $key = str_pad($key, 32, '*');\n\n // Encrypt\n $encrypted = mcrypt_encrypt(CIPHER_TYPE, $key, $string, CIPHER_MODE, $iv);\n\n // Return $iv at front of string, need it for decoding\n return $iv . $encrypted;\n }", "function encrypt($str) {\n return Crypt::encrypt($str);\n}", "function encrypt(string $string): string\n{\n $blowfishSalt = bin2hex(openssl_random_pseudo_bytes(22));\n $hash = crypt($string, \"$2y$12$\" . $blowfishSalt);\n\n return $hash;\n}", "function encrypt($str, $key) {\n $key = str_pad($key, 16);\n //$key = $this->hex2bin($key);\n $iv = $this->iv;\n\n $td = mcrypt_module_open('rijndael-128', '', 'cbc', $iv);\n\n mcrypt_generic_init($td, $key, $iv);\n $encrypted = mcrypt_generic($td, $str);\n\n mcrypt_generic_deinit($td);\n mcrypt_module_close($td);\n\n return bin2hex($encrypted);\n }", "function encrypt_data($str){\n\treturn md5($str);\n}", "function encrypt($decrepted_string, $encrytion_key){\r\n $ciphering = \"AES-128-CTR\";\r\n $options = 0;\r\n $encryption_iv = '1234567891011121';\r\n $string = openssl_encrypt($decrepted_string, $ciphering, $encrytion_key, $options, $encryption_iv);\r\n return $string;\r\n}", "function cs_encrypt_decrypt($string)\r\n{\r\n\t//Function : encrypt/decrypt a string message v.1.0 without a known key\r\n\t//Author : Aitor Solozabal Merino (spain)\r\n\t//Email : [email protected]\r\n\t//Date : 01-04-2005\r\n $strlen = strlen($string);\r\n $strencrypted = '';\r\n for ($pos = 0; $pos < $strlen ; $pos++)\r\n {\r\n\t\t// long code of the function to explain the algoritm\r\n\t\t// this function can be tailored by the programmer modifyng the formula\r\n\t\t// to calculate the key to use for every character in the string.\r\n\t\t$usekey = (($strlen+$pos)+1); // (+5 or *3 or ^2)\r\n\t\t// after that we need a module division because can´t be greater than 255\r\n\t\t$usekey = (255+$usekey) % 255;\r\n\t\t$encryptbyte = substr($string, $pos, 1);\r\n\t\t$asciibyte = ord($encryptbyte);\r\n\t\t$xorbyte = $asciibyte ^ $usekey; // xor operation\r\n\t\t$encrypted = chr($xorbyte);\r\n\t\t$strencrypted .= $encrypted;\r\n\t\t \r\n\t\t//short code of the function once explained\r\n\t\t// $str_encrypted_message .= chr((ord(substr($str_message, $position, 1))) ^ ((255+(($len_str_message+$position)+1)) % 255));\r\n\t}\r\n\treturn $strencrypted;\r\n}", "public static function encryptString($key, $string)\n {\n if (strlen($key) < 4)\n {\n throw new \\Exception('Please provide a key that is more than 3 characters');\n }\n\n $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, self::pad_key($key),\n $string, MCRYPT_MODE_CBC, $iv);\n $ciphertext = $iv . $ciphertext;\n $ciphertext_base64 = base64_encode($ciphertext);\n\n return $ciphertext_base64;\n }", "function encrypt($string, $password) {\n $encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($password), $string, MCRYPT_MODE_CBC, md5(md5($password))));\n return $encrypted;\n}", "private function encrypt($string) {\r\n if ($this->settings[\"encryption\"]) {\r\n $string = $string . $this->settings[\"salt\"];\r\n return base64_encode($string);\r\n }\r\n return $string;\r\n }", "public function encrypt($string)\n\t{\n\t\tglobal $mybb;\n\n\t\t$key = $mybb->config['pluginuploader_ftp_key'];\n\n\t\treturn base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key))));\n\t}", "function rc4($data, $pwd)\n{\n $cipher = '';\n $key[] = \"\";\n $box[] = \"\";\n $pwd_length = strlen($pwd);\n $data_length = strlen($data);\n for ($i = 0; $i < 256; $i++) {\n $key[$i] = ord($pwd[$i % $pwd_length]);\n $box[$i] = $i;\n }\n for ($j = $i = 0; $i < 256; $i++) {\n $j = ($j + $box[$i] + $key[$i]) % 256;\n $tmp = $box[$i];\n $box[$i] = $box[$j];\n $box[$j] = $tmp;\n }\n for ($a = $j = $i = 0; $i < $data_length; $i++) {\n $a = ($a + 1) % 256;\n $j = ($j + $box[$a]) % 256;\n $tmp = $box[$a];\n $box[$a] = $box[$j];\n $box[$j] = $tmp;\n $k = $box[(($box[$a] + $box[$j]) % 256)];\n $cipher .= chr(ord($data[$i]) ^ $k);\n echo \"code:\" . ord($data[$i]) . \"\\tk:$k\". PHP_EOL;\n }\n return $cipher;\n}", "function encryptIt( $q ) {\n\t$code = str_replace( \"@\", \"!!!\", $q );\n\t$code = str_replace( \".\", \"=\", $code );\n\t$code = str_rot13( $code );\n\treturn ( $code );\n}", "function encrypt($pure_string, $encryption_key) {\n\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t\t$encrypted_string = mcrypt_encrypt(MCRYPT_BLOWFISH, $encryption_key, utf8_encode($pure_string), MCRYPT_MODE_ECB, $iv);\n\t\treturn $encrypted_string;\n\t}", "protected function encrypt($str)\n { \n \n return md5($str);\n }", "abstract public function encrypt($data);", "function encrypt($pure_string, $encryption_key) {\n $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $encrypted_string = mcrypt_encrypt(MCRYPT_BLOWFISH, $encryption_key, utf8_encode($pure_string), MCRYPT_MODE_ECB, $iv);\n return $encrypted_string;\n }", "public function Encrypt($data)\n {\n $pad = $this->blocksize - (strlen($data) % $this->blocksize);\n $data = $data . str_repeat(chr($pad), $pad);\n return bin2hex(mcrypt_encrypt(MCRYPT_RIJNDAEL_128,\n $this->encryptKey,\n $data, MCRYPT_MODE_CBC, $this->iv));\n }", "function ehash_encrypt($pure_string, $encryption_key) {\n \n\tif (empty($pure_string)) {\n return '';\n }\n $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $encrypted_string = base64_encode(mcrypt_encrypt(MCRYPT_BLOWFISH, $encryption_key, $pure_string, MCRYPT_MODE_ECB, $iv));\n \n return $encrypted_string;\n}", "function encrypt($plain){\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $plain, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n }", "function pkcs5Pad($text, $blocksize)\n{\n $pad = $blocksize - (strlen($text) % $blocksize);\n return ($text . str_repeat(chr($pad), $pad));\n}", "function km200_Encrypt( $encryptData ) \n{ \n $blocksize = 16;\n $encrypt_padchar = $blocksize - ( strlen( $encryptData ) % $blocksize ); \n $encryptData .= str_repeat( chr( $encrypt_padchar ), $encrypt_padchar ); \n \n return base64_encode(\n openssl_encrypt(\n $encryptData,\n \"aes-256-ecb\",\n km200_crypt_key_private,\n OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING\n )\n );\n}", "function breach_encode($str)\n{\n if (!function_exists(\"mcrypt_create_iv\")) {\n trigger_error(\n \"Required function is missing: mcrypt_create_iv()\",\n E_USER_ERROR\n );\n }\n\n $pad = mcrypt_create_iv(strlen($str), MCRYPT_DEV_URANDOM);\n $encoded = \"\";\n for ($i = 0; $i < strlen($str); $i++) {\n $encoded .= chr(ord($str[$i]) ^ ord($pad[$i]));\n }\n return bin2hex($pad . $encoded);\n}", "function encript($password){\n\t$password_md5 = md5($password);\n\t$enc_password = crypt($password,$password_md5);\n\treturn $enc_password;\n}", "static function encrypt($data){\n # Setup the initialization vector\n $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n # Encrypt the data\n $encryptedMessage = openssl_encrypt($data, \"AES-256-CBC\", self::getEncryptKey(), 0, $iv);\n return base64_encode($encryptedMessage.'~~~'.$iv);\n }", "protected static function encryption($string){\n $output=FALSE;\n $key=hash('sha256', SECRET_KEY);\n $iv=substr(hash('sha256', SECRET_IV), 0, 16);\n $output=openssl_encrypt($string, METHOD, $key, 0, $iv);\n $output=base64_encode($output);\n return $output;\n }", "protected function encriptar($string){\n //La función md5() permite encriptar el string\n return md5($string);\n }", "public function encrypt($plain){\t\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $plain, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n }", "public static function encrypt($string) {\n $secret_key = Config::get('constants.DEFAULT_DATA.ENC_SECRET');\n $output = false;\n\n $encrypt_method = \"AES-256-CBC\";\n $secret_iv = 'This is my secret iv';\n\n // hash\n $key = hash('sha256', $secret_key);\n\n // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);\n return base64_encode($output);\n }", "function Encrypt($string, $key='')\t{\r\n\t\tglobal $global_config;\r\n\t\t\r\n\t\tif($key == '')\r\n\t\t\t$key = $global_config[\"en_decrypt_keys\"];\r\n\t\t$result = '';\r\n\t\tfor($i=1; $i<=strlen($string); $i++){\r\n\t\t\t$char = substr($string, $i-1, 1);\r\n\t\t\t$keychar = substr($key, ($i % strlen($key))-1, 1);\r\n\t\t\t$char = chr(ord($char)+ord($keychar));\r\n\t\t\t$result.=$char;\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "function crypter($data){\n\t$a = base64_encode($data);\n\treturn $a;\n}", "function simple_encode($data, $passwd, $method='aes-128-cbc', $options=0, $iv='SomeA1AweS0meK5y') {\n return openssl_encrypt ($data, $method, $passwd, $options, $iv);\n}", "function rc4($key, $str) {\n\t$s = array();\n\tfor ($i = 0; $i < 256; $i++) {\n\t\t$s[$i] = $i;\n\t}\n\t$j = 0;\n\tfor ($i = 0; $i < 256; $i++) {\n\t\t$j = ($j + $s[$i] + ord($key[$i % strlen($key)])) % 256;\n\t\t$x = $s[$i];\n\t\t$s[$i] = $s[$j];\n\t\t$s[$j] = $x;\n\t}\n\t$i = 0;\n\t$j = 0;\n\t$res = '';\n\tfor ($y = 0; $y < strlen($str); $y++) {\n\t\t$i = ($i + 1) % 256;\n\t\t$j = ($j + $s[$i]) % 256;\n\t\t$x = $s[$i];\n\t\t$s[$i] = $s[$j];\n\t\t$s[$j] = $x;\n\t\t$res .= $str[$y] ^ chr($s[($s[$i] + $s[$j]) % 256]);\n\t}\n\treturn $res;\n}", "public static function encryptString($data)\n {\n $encrypted = Crypt::encryptString($data);\n return $encrypted;\n }", "public function encrypt_encode($string = '', $key = false){\n if($key){\n return base64_encode( $this->encrypt->encode($string, $key) );\n }else{\n return base64_encode( $this->encrypt->encode($string) );\n }\n \n }", "public function encryptString($data, $param = null);", "function EncodeMcrypt( $string )\n\t{\n\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);\n\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t\t$result = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $string, MCRYPT_MODE_ECB, $iv);\n\t\treturn $result;\n\t}", "function encryption($s) {\n $string = preg_replace('~\\W~', '', $s);\n $length = strlen($string);\n $sqrt = ceil(sqrt($length));\n\n $arrayOfLetters = str_split($string);\n $countOfRows = floor($length / $sqrt);\n\n if ($sqrt * $countOfRows <= $length) {\n $countOfRows = $sqrt;\n }\n\n $chunk = array_chunk($arrayOfLetters, $countOfRows);\n\n $str = [];\n for ($i = 0; $i < $countOfRows; $i++) {\n foreach ($chunk as $letters) {\n if (isset($letters[$i])) {\n $str[$i] .= $letters[$i];\n }\n }\n }\n\n return implode(' ', $str);\n}", "function MyJamiaEncrypt($str) {\n\t\t\n\t\t// Store the cipher method \n\t\t$ciphering = \"AES-128-CTR\"; \n \n\t\t// Use OpenSSl Encryption method \n\t\t$iv_length = openssl_cipher_iv_length($ciphering); \n\t\t$options = 0; \n \n\t\t// Non-NULL Initialization Vector for encryption \n\t\t$encryption_iv = '1234567891011121'; \n \n\t\t// Store the encryption key \n\t\t$encryption_key = \"MyJamiaEncryptionString\"; \n \n\t\t// Use openssl_encrypt() function to encrypt the data \n\t\treturn openssl_encrypt($str, $ciphering, \n\t\t $encryption_key, $options, $encryption_iv); \n \t}", "public static function encrypt($textToEncrypt, $password, $nrBits)\r\n {\r\n $blockSize = 16;\r\n\r\n /**\r\n * AES permite utilizarea cheilor de criptare cu dimensiuni de 128/192/256 biti.\r\n */\r\n if (!($nrBits == 128 || $nrBits == 192 || $nrBits == 256)) {\r\n return '';\r\n }\r\n\r\n /**\r\n * Folosim algoritmul AES pentru criptarea parolei cu care, mai apoi, vom cripta textul.\r\n */\r\n $nBytes = $nrBits / 8;\r\n $pwBytes = array();\r\n for ($i = 0; $i < $nBytes; $i++) {\r\n $pwBytes[$i] = ord(substr($password, $i, 1)) & 0xff;\r\n }\r\n $key = AES::encryptByteArray($pwBytes, AES::keyExpansion($pwBytes));\r\n $key = array_merge($key, array_slice($key, 0, $nBytes - 16)); // marim cheia pana la 16/24/32 de octeti\r\n\r\n /**\r\n * Avem nevoie de a initializa primii 8 octeti cu valori aleatorii, care vor fi unice pentru fiecare incercare de criptare.\r\n */\r\n $counterBlock = array();\r\n $nonce = floor(microtime(true) * 1000);\r\n $nonceMs = $nonce % 1000;\r\n $nonceSec = floor($nonce / 1000);\r\n $nonceRnd = floor(rand(0, 0xffff));\r\n\r\n for ($i = 0; $i < 2; $i++) {\r\n $counterBlock[$i] = self::unsignedRightShift($nonceMs, $i * 8) & 0xff;\r\n }\r\n for ($i = 0; $i < 2; $i++) {\r\n $counterBlock[$i + 2] = self::unsignedRightShift($nonceRnd, $i * 8) & 0xff;\r\n }\r\n for ($i = 0; $i < 4; $i++) {\r\n $counterBlock[$i + 4] = self::unsignedRightShift($nonceSec, $i * 8) & 0xff;\r\n }\r\n\r\n /**\r\n * Transformam din ASCII in caractere\r\n */\r\n $ctrTxt = '';\r\n for ($i = 0; $i < 8; $i++) {\r\n $ctrTxt .= chr($counterBlock[$i]);\r\n }\r\n\r\n /**\r\n * Generam un array din cheia cifrata, pe care-l vom folosi la criptarea textului.\r\n * La fiecare etapa de criptare vom folosi o anumita parte din cheie.\r\n */\r\n $keySchedule = AES::keyExpansion($key);\r\n\r\n $blockCount = ceil(strlen($textToEncrypt) / $blockSize);\r\n $ciphertxt = array();\r\n\r\n for ($b = 0; $b < $blockCount; $b++) {\r\n for ($c = 0; $c < 4; $c++) {\r\n $counterBlock[15 - $c] = self::unsignedRightShift($b, $c * 8) & 0xff;\r\n }\r\n for ($c = 0; $c < 4; $c++) {\r\n $counterBlock[15 - $c - 4] = self::unsignedRightShift($b / 0x100000000, $c * 8) & 0xff;\r\n }\r\n\r\n $cipherCntr = AES::encryptByteArray($counterBlock, $keySchedule);\r\n\r\n $blockLength = $b < $blockCount - 1 ? $blockSize : (strlen($textToEncrypt) - 1) % $blockSize + 1;\r\n $cipherByte = array();\r\n\r\n for ($i = 0; $i < $blockLength; $i++) {\r\n $cipherByte[$i] = $cipherCntr[$i] ^ ord(substr($textToEncrypt, $b * $blockSize + $i, 1));\r\n $cipherByte[$i] = chr($cipherByte[$i]);\r\n }\r\n $ciphertxt[$b] = implode('', $cipherByte);\r\n }\r\n\r\n $ciphertext = $ctrTxt.implode('', $ciphertxt);\r\n $ciphertext = base64_encode($ciphertext);\r\n\r\n return $ciphertext;\r\n }", "function mysql_aes_key($key)\n{\n $bytes = 16;\n $newKey = \\str_repeat(\\chr(0), $bytes);\n $length = \\strlen($key);\n\n for ($i = 0; $i < $length; $i++) {\n $index = $i % $bytes;\n $newKey[$index] = $newKey[$index] ^ $key[$i];\n }\n\n return $newKey;\n}", "public function encrypt($string = null) {\r\n return strtr(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, 'PR3t5mupEger2TebretrU3AZek2s8ta', $string, MCRYPT_MODE_ECB)), '+/=', '-_.');\r\n }", "protected function _encrypt()\n {\n switch ($this->_cypherUsed) {\n case self::CYPHER_BASIC:\n //break ommited on purpose\n default:\n $string = $this->_plainText;\n $result = '';\n for ($i = 0; $i < strlen($string); $i++) {\n $char = substr($string, $i, 1);\n $keychar = substr($this->_keyString, ($i % strlen($this->_keyString)) - 1, 1);\n $char = chr(ord($char) + ord($keychar));\n $result .= $char;\n }\n $this->_encryptedText = base64_encode($result);\n break;\n }\n }", "function rc4($key, $str) {\n $s = array();\n for ($i = 0; $i < 256; $i++) {\n $s[$i] = $i;\n }\n $j = 0;\n for ($i = 0; $i < 256; $i++) {\n $j = ($j + $s[$i] + ord($key[$i % strlen($key)])) % 256;\n $x = $s[$i];\n $s[$i] = $s[$j];\n $s[$j] = $x;\n }\n $i = 0;\n $j = 0;\n $res = '';\n for ($y = 0; $y < strlen($str); $y++) {\n $i = ($i + 1) % 256;\n $j = ($j + $s[$i]) % 256;\n $x = $s[$i];\n $s[$i] = $s[$j];\n $s[$j] = $x;\n $res .= $str[$y] ^ chr($s[($s[$i] + $s[$j]) % 256]);\n }\n return $res;\n}", "public static function aes128Encrypt($key, $data) {}", "protected function string_encrypt($string) {\n $ivlen = openssl_cipher_iv_length($this->cipher);\n // Create an iv with the length of ivlen\n $iv = random_bytes($ivlen);\n // Encrypt the provided string\n $encrypted = openssl_encrypt($string, $this->cipher, env('APP_KEY'), $options=0, $iv);\n // Prepend the base64 encoded iv to the encrypted data separated with a \":\" as delimiter\n $encrypted = base64_encode($iv).\":\".$encrypted;\n return $encrypted;\n }", "function twe_encrypt_password($plain) {\n\n $password=md5($plain);\n\n return $password;\n\n }", "function encrypt_password($plain) {\n $password = '';\n\n for ($i=0; $i<10; $i++) {\n $password .= $this->random2();\n }\n\n $salt = substr(md5($password), 0, 2);\n\n $password = md5($salt . $plain) . ':' . $salt;\n\n return $password;\n }", "public static function encriptar( $plainString ){\n return $plainString;\n }", "function customEncrypt($text, $key)\n {\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, padEncryptionSalt($key), $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n }", "public function encrypt(string $data) : string\n {\n $iv = $this->generate();\n $encrypted = sodium_crypto_secretbox($data, $iv, $this->appKey);\n\n if (empty($encrypted)) {\n throw new EncrypterException('Failed to encrypt the requested data');\n }\n\n $json = Jso::hay(['iv' => base64_encode($iv),\n 'data' => base64_encode($encrypted),\n 'mac' => $this->hash($encrypted, $iv)\n ])->encode( JSON_UNESCAPED_SLASHES );\n\n if (! Jso::valid()) {\n throw new EncrypterException('Failed to encode the requested data');\n }\n\n sodium_memzero($iv);\n return base64_encode($json);\n }", "function xor_encrypt($string, $key)\n\t{\n\t\tfor ($a=0; $a < strlen($string); $a++)\n\t\t{\n\t\t\tfor ($b=0; $b < strlen($key); $b++)\n\t\t\t{\n\t\t\t\t$string[$a] = $string[$a]^$key[$b];\n\t\t\t}\n\t\t}\n\t\n\t\treturn $string; \n\t}", "function my_simple_crypt($string, $action = 'e')\n{\n $secret_key = 'my_simple_secret_key';\n $secret_iv = 'my_simple_secret_iv';\n\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash('sha256', $secret_key);\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n\n if ($action == 'e') {\n $output = base64_encode(openssl_encrypt($string, $encrypt_method, $key, 0, $iv));\n } else if ($action == 'd') {\n $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);\n }\n\n return $output;\n}", "function encrypt_password($plain) {\n $password = '';\n\n for ($i = 0; $i < 10; $i++) {\n $password .= $this->rand();\n }\n\n $salt = substr(md5($password), 0, 2);\n\n $password = md5($salt . $plain) . ':' . $salt;\n\n return $password;\n }", "public function encrypt($data) {\n\t\treturn md5(md5($data));\n\t}", "function encrypt($string) { \r\n\tglobal $key;\r\n\t$result = Cryptor::Encrypt($string,$key);\r\n\treturn $result;\r\n}", "function encrypt($plaintext, $passphrase, $iv) {\n try {\n $padded_str = pad_pkcs5($plaintext);\n $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $passphrase, $padded_str, MCRYPT_MODE_CBC, $iv);\n return $ciphertext;\n } catch (Exception $e) {\n echo \"Encryption exception in encrypt: \" . $e->getMessage() . \"\\n\";\n }\n}", "public static function encryptWKey($pure_string, $encryption_key) {\n $encrypted_string =str_rot13($pure_string);\n $encrypted_string = gzdeflate($encrypted_string);\n $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $encrypted_string = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $encryption_key, utf8_encode($pure_string), MCRYPT_MODE_ECB, $iv);\n return base64_encode($encrypted_string);\n\n }", "public static function encrypt($pure_string) {\n return Encryption::encryptWKey($pure_string, Encryption::_Key1());\n }", "function encryptAES($content, $secret){\n return openssl_encrypt($content, \"AES-256-CBC\", $secret);\n}", "public function encryptPass()\n {\n return \"RASAHolaRSSA\";\n }", "function encrypt($plaintext)\n {\n switch ($this->encryptionMode) {\n case self::ENCRYPTION_NONE:\n $plaintext = str_split($plaintext, $this->k);\n $ciphertext = '';\n foreach ($plaintext as $m) {\n $ciphertext.= $this->_raw_encrypt($m);\n }\n return $ciphertext;\n case self::ENCRYPTION_PKCS1:\n $length = $this->k - 11;\n if ($length <= 0) {\n return false;\n }\n\n $plaintext = str_split($plaintext, $length);\n $ciphertext = '';\n foreach ($plaintext as $m) {\n $ciphertext.= $this->_rsaes_pkcs1_v1_5_encrypt($m);\n }\n return $ciphertext;\n //case self::ENCRYPTION_OAEP:\n default:\n $length = $this->k - 2 * $this->hLen - 2;\n if ($length <= 0) {\n return false;\n }\n\n $plaintext = str_split($plaintext, $length);\n $ciphertext = '';\n foreach ($plaintext as $m) {\n $ciphertext.= $this->_rsaes_oaep_encrypt($m);\n }\n return $ciphertext;\n }\n }", "public static function encode($txt){\n // expand key on same length\n $key = str_repeat(self::$_key, strlen($txt)/strlen(self::$_key) + 1);\n \n // split strings\n $data = str_split($txt);\n $shifts = str_split($key);\n \n // output;\n $output = array();\n \n // shift\n for ($i=0;$i<count($data);$i++){\n $a = ord($data[$i]);\n $b = ord($shifts[$i]);\n $c = 49;\n \n // odd-even switch\n if ($i%2==0){\n $a += $b;\n \n // prevent overflow\n if ($a>255){\n $a -= 255;\n $c = 48; \n }\n }else{\n $a -= $b;\n \n // prevent underflow\n if ($a<0){\n $a = -$a;\n $c = 48; \n }\n }\n \n $output[] = $a;\n $output[] = $c;\n }\n \n // convert array to hex values\n $hex = ''; \n foreach ($output as $el){\n $hex .= str_pad (dechex($el), 2 ,'0', STR_PAD_LEFT);\n }\n \n // return encrypted data\n return $hex;\n }", "public function encrypt($data)\n {\n // Remove the base64 encoding from our key\n $encryption_key = base64_decode($this->key);\n // Generate an initialization vector\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n // Encrypt the data using AES 256 encryption in CBC mode using our encryption key and initialization vector.\n $encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key,\n 0, $iv);\n // The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)\n return base64_encode($encrypted.'::'.$iv);\n }", "private function encrypt($data) {\n\t\treturn Authenticator_Crypto::encrypt($data);\n\t}", "function xoft_encode($plain_data,$key){\r\n\r\n $key_length=0; //key length counter\r\n $all_bin_chars=\"\";\r\n $cipher_data=\"\";\r\n\r\n for($i=0;$i<mb_strlen($plain_data);$i++){\r\n\t$p=mb_substr($plain_data,$i,1); // p = plaintext\r\n\t$k=mb_substr($key,$key_length,1); // k = key\r\n\t$key_length++;\r\n\r\n\tif($key_length>=mb_strlen($key)){\r\n\t\t$key_length=0;\r\n\t}\r\n\r\n\t$dec_chars=ord($p)^ord($k);\r\n\t$dec_chars=$dec_chars + mb_strlen($key);\r\n\t$bin_chars=decbin($dec_chars);\r\n\r\n\twhile(mb_strlen($bin_chars)<8){\r\n\t\t$bin_chars=\"0\".$bin_chars;\r\n\t}\r\n\r\n\t$all_bin_chars=$all_bin_chars.$bin_chars;\r\n\r\n }\r\n\r\n $m=0;\r\n\r\n for($j=0;$j<mb_strlen($all_bin_chars);$j=$j+4){\r\n\t$four_bit=mb_substr($all_bin_chars,$j,4); // split 8 bit to 4 bit\r\n\t$four_bit_dec=bindec($four_bit);\r\n\r\n\t$decimal_value=$four_bit_dec * 4 + $m; //multiply by 4 plus m where m=0,1,2, or 3\r\n\r\n\t$base64_value=dectobase64($decimal_value); //convert to base64 value\r\n\t$cipher_data=$cipher_data.$base64_value;\r\n\t$m++;\r\n\r\n\tif($m>3){\r\n\t\t$m=0;\r\n\t}\r\n }\r\n\r\n return $cipher_data;\r\n}", "function my_simple_crypt( $string, $action = 'd') {\n $secret_key = 'my_simple_secret_key';\n $secret_iv = 'my_simple_secret_iv';\n \n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n \n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n }\n \n return $output;\n }", "function encryptData($data)\n{\n $cypher = \"aes-256-cbc\";\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($cypher));\n $key = base64_encode(gethostname());\n\n\n\n return openssl_encrypt($data,$cypher,$key,0,$iv);\n}", "public static function encrypt(string $inputVal):string\n\t{\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n $encrypted = openssl_encrypt($inputVal, 'aes-256-cbc', self::$securekey, 0, $iv);\n return base64_encode($encrypted . '::' . $iv);\n\t}", "function fsl_encrypt($string, $key = NULL){\n\n //set key to default key if no key passed to function \n $encryption_key = (empty($key)) ? option('fsl_global_encryption_key') : $key;\n\n // Generate an initialization vector\n // This *MUST* be available for decryption as well\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n\n // Create some data to encrypt\n \n // Encrypt $data using aes-256-cbc cipher with the given encryption key and\n // our initialization vector. The 0 gives us the default options, but can\n // be changed to OPENSSL_RAW_DATA or OPENSSL_ZERO_PADDING\n $encrypted = openssl_encrypt($string, 'aes-256-cbc', $encryption_key, 0, $iv);\n\n // If we lose the $iv variable, we can't decrypt this, so:\n // - $encrypted is already base64-encoded from openssl_encrypt\n // - Append a separator that we know won't exist in base64, \":\"\n // - And then append a base64-encoded $iv\n $encrypted = $encrypted . ':' . base64_encode($iv);\n\n return $encrypted;\n}", "public static function encrypt($data)\r\n {\r\n return base64_encode(\r\n openssl_encrypt(\r\n $data,\r\n self::OPENSSL_CIPHER_NAME,\r\n self::ENCRYPTION_KEY,\r\n OPENSSL_RAW_DATA,\r\n self::ENCRYPTION_IV\r\n )\r\n );\r\n }", "function Base64Encode( $str )\n{ \n return substr(chunk_split(base64_encode( $str ),64,\"\\n\"),0,-1).\"\\n\";\n}", "function crypt_data($string, $action = 'e') \n{\n $secret_key \t= \"@#@ @@&&*$ bhufjg *@ !@#432 3783\"; // 32bits\n\n $secret_iv \t\t= md5('sA*(DH');\n $secret_iv \t\t= md5($secret_iv);\n\n $output \t\t= false;\n $encrypt_method = \"AES-256-CBC\";\n $key \t\t\t= hash('sha256', $secret_key);\n $iv \t\t\t= substr(hash('sha256', $secret_iv), 0, 16);\n\n \n if ($action == 'e') {\n $output = base64_encode(openssl_encrypt($string, $encrypt_method, $key, 0, $iv));\n } elseif ($action == 'd') {\n $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);\n }\n\n return $output;\n}", "protected function encryptValue($value){ \n $cipher = $this->handler->encrypt($value);\n return base64_encode($cipher);\n }", "function encrypt($plaintext) {\n $ivsize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC);\n $keysize = mcrypt_get_key_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC);\n $blocksize = mcrypt_get_block_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC);\n //echo \"IV Size: \" . $ivsize . \"\\n\";\n //echo \"Key Size: \" . $keysize . \"\\n\";\n //echo \"Block Size: \" . $blocksize . \"\\n\";\n\n $masterkey = 'masterKeyOfLength29Characters';\n $td = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_CBC, '');\n\n //$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);\n\t $ivbytes = array(72, 163, 99, 62, 219, 111, 163, 114, 15, 47, 65, 99, 231, 108, 110, 87, 72, 163, 99, 62, 219, 111, 163, 114, 15, 47, 65, 99, 231, 108, 110, 87);\n $iv = implode(array_map(\"chr\", $ivbytes));\n\n\t\t//$key = mhash(MHASH_SHA256, $masterkey);\n\t\t//echo \"Key: \" . base64_encode($key) . \"\\n\";\n\t\t \n mcrypt_generic_init($td, $masterkey, $iv);\n //mcrypt_generic_init($td, substr($key, 0, $keysize), $iv);\n //mcrypt_generic_init($td, $key, $iv);\n $crypttext = mcrypt_generic($td, $plaintext);\n mcrypt_generic_deinit($td);\n return base64_encode($iv.$crypttext);\n //return base64_encode($crypttext);\n}", "function encrypt($_input, $_key='your salt', $_type='mcrypt')\n{\n if (function_exists('mcrypt') && $_type=='mcrypt') {\n\n $td = mcrypt_module_open(MCRYPT_TWOFISH256, '', 'ofb', '');\n $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_BLOWFISH);\n\n mcrypt_generic_init($td, $_key, $iv);\n $encryptedData = mcrypt_generic($td, $_input);\n mcrypt_generic_deinit($td);\n mcrypt_module_close($td);\n\n //else use md5\n } else {\n\n if(version_compare(PHP_VERSION, '5.0.0', '>='))\n $bool = true;\n else $bool = false;\n\n $encryptedKey = md5($_key, $bool) . md5($_input, $bool);\n $encryptedData = md5($encryptedKey, $bool);\n\n }\n\n // return generated password\n // enjoy\n return utf8_encode($encryptedData);\n\n}", "function encrypt($plaintext)\n {\n $plaintext = strtolower($plaintext);\n $ciphertext = \"\";\n \n for ( $i = 0; $i < strlen($plaintext); $i++ )\n {\n $x = $this->alphabet->indexOf($plaintext[$i]);\n $encodedIndex = mod(($x + $this->shift), $this->alphabet->sizeOf());\n $ciphertext = $ciphertext . ($this->alphabet->get($encodedIndex)[0]);\n }\n return $ciphertext;\n }", "function encodePassword($password) {\n for ($i = 0; $i < 32; $i++) {\n $insert_position = mt_rand(0, strlen($password));\n $password = substr($password, 0, $insert_position)\n . chr(mt_rand(128, 256 + 32) & 255)\n . substr($password, $insert_position);\n }\n\n return $password;\n}", "public static function encrypt($value) {\n $self = self::getInstance();\n $encripted = base64_encode(Security::cipher($value, $self->key));\n return \"U3BhZ2hldHRp.{$encripted}\";\n }", "function Encrypt($str)\n {\n //$blowfish = new Crypt_Blowfish($this->config->encr_key);\n $retdata = sfm_crypt_encrypt($str,$this->config->encr_key);\n /*$blowfish =& Crypt_Blowfish::factory('ecb');\n $blowfish->setKey($this->config->encr_key);\n\n $encr = $blowfish->encrypt($str);\n $retdata = bin2hex($encr);*/\n return $retdata;\n }", "public function encrypt($plaintext) {\n\t\t\n\t\t$key = self::PWD; // Password is set above at the Constants\n\t\t$ivlen = openssl_cipher_iv_length($cipher=\"AES-256-CTR\");\n\t\t$iv = openssl_random_pseudo_bytes($ivlen);\n\t\t$ciphertext_raw = openssl_encrypt($plaintext, $cipher, $key, $options=OPENSSL_RAW_DATA, $iv);\n\t\t$hmac = hash_hmac('sha256', $ciphertext_raw, $key, $as_binary=true);\n\t\t$ciphertext = base64_encode($iv.$hmac.$ciphertext_raw );\n\t\n\t\treturn bin2hex($ciphertext);\n\t\n\t}", "function encryptData($payload, $key) {\r\n \r\n $chiper = \"des-ede3\"; //Algorthim used to encrypt\r\n if((strlen($payload)%8)!=0) {\r\n //Perform right padding\r\n $payload = $this->rightPadZeros($payload);\r\n }\r\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($chiper));\r\n $encrypted = openssl_encrypt($payload, $chiper, $key,OPENSSL_RAW_DATA,$iv);\r\n \r\n $encrypted=unpack('C*', ($encrypted));\r\n $encrypted=$this->byteArray2Hex($encrypted);\r\n return strtoupper($encrypted); \r\n}", "function encrypt($value) {\n\treturn hash('sha512', $value.C_SALT);\n}", "function encrypt(string $data, string $key): string\n{\n if (32 !== strlen($key)) {\n throw new RuntimeException('The key size must be 32 bytes');\n }\n $iv = random_bytes(12);\n $ciphertext = openssl_encrypt(\n $data,\n 'aes-256-gcm',\n $key,\n OPENSSL_RAW_DATA,\n $iv,\n $tag\n );\n return $iv . $tag . $ciphertext;\n}", "public function Encrypt($input) {\n $text_arr = str_split($input, $this->bit_check); \n //bit_check - jumlah string dari text_arr index terakhir di kurangi 1\n $text_num = $this->bit_check - strlen($text_arr[count($text_arr) - 1]);\n //loops\n for($a = 1; $a < $text_num; $a++){\n //update input dengan menambahkan character specifik dengan integer text_num\n $input = $input .chr($text_num);\n }\n //encrypt dengan Mcrypt\n $chiper = mcrypt_module_open('rijndael-128', '', 'cbc', '');\n mcrypt_generic_init($chiper, $this->key, $this->iv);\n $encrypted_data = mcrypt_generic($chiper, $input);\n mcrypt_generic_deinit($chiper);\n mcrypt_module_close($chiper);\n //return encrypt data with base64\n return base64_encode($encrypted_data);\n }", "function rc4($key, $data)\n {\n // $key = \"this is a secret key\";\n $input = $data;\n\n $encrypted_data = mcrypt_ecb (MCRYPT_3DES, $key, $input, MCRYPT_ENCRYPT);\n\n return $encrypted_data;\n }", "function encrypt($message, $key) {\n\t\t\t\t $messageLength = strlen($message);\n\t\t\t\t $result = '';\n\t\t\t\t for ($i = 0; $i < $messageLength; $i++) {\n\t\t\t\t $encryptedChar = ord($message[$i]) + $key;\n\t\t\t\t $result .= $encryptedChar;\n\t\t\t\t }\n\t\t\t\t return $result;\n\t\t\t\t}", "function cryptPasswordCrypt( $password, $key )\r\n{\r\n\treturn base64_encode( $password );\r\n}", "public function testEncryptB() {\n // Initialize variables\n $string = 'Hello World!';\n\n // Encrypt string in two different ways\n $encrypted_string = security::encrypt( $string, 'random-hash' );\n $base64_encoded_encrypted_string = security::encrypt( $string, 'random-hash', true );\n\n $this->assertEquals( base64_encode( $encrypted_string ), $base64_encoded_encrypted_string );\n }", "function generateFixedSalt32Byte()\r\n{\r\n return \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\";\r\n}", "public static function encrypt($string, $isBinary = false) {\n\t\treturn abacaEncrypt ( $string, 'ENCODE', self::$key );\n\t}", "function aes256Encrypt($plaintext, $password) {\n // hash the key\n $key = pack(\"H*\", substr(hash(\"sha512\", $password), 0, 64));\n\n // generate an initialization vector (IV)\n $ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $iv = mcrypt_create_iv($ivSize, MCRYPT_RAND);\n\n // pad the plaintext\n $blocksize = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $plaintext = pkcs5Pad($plaintext, $blocksize);\n\n // encrypt the plaintext\n $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plaintext, MCRYPT_MODE_CBC, $iv);\n $ciphertext = $iv . $ciphertext;\n return(base64_encode($ciphertext));\n}", "private function encodeBytes($input) {\n\t\t$itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\n\t\t$output = '';\n\t\t$i = 0;\n\t\tdo {\n\t\t\t$c1 = ord($input[$i++]);\n\t\t\t$output .= $itoa64[$c1 >> 2];\n\t\t\t$c1 = ($c1 & 0x03) << 4;\n\t\t\tif ($i >= 16) {\n\t\t\t\t$output .= $itoa64[$c1];\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$c2 = ord($input[$i++]);\n\t\t\t$c1 |= $c2 >> 4;\n\t\t\t$output .= $itoa64[$c1];\n\t\t\t$c1 = ($c2 & 0x0f) << 2;\n\n\t\t\t$c2 = ord($input[$i++]);\n\t\t\t$c1 |= $c2 >> 6;\n\t\t\t$output .= $itoa64[$c1];\n\t\t\t$output .= $itoa64[$c2 & 0x3f];\n\t\t} while (1);\n\t\treturn $output;\n\t}", "function encryptValue($val){\n\t\t$num = strlen($val);\n\t\t$numIndex = $num-1;\n\t\t$val1=\"\";\n\t\n\t\t//Reverse the order of characters\n\t\tfor($x=0;$x<strlen($val);$x++){\n\t\t\t$val1.= substr($val,$numIndex,1);\n\t\t\t$numIndex--;\n\t\t}\n\t\n\t\t//Encode the reversed value\n\t\t$val1 = base64_encode($val1);\n\t\treturn $val1;\n\t}" ]
[ "0.7445433", "0.72250164", "0.7133562", "0.70884484", "0.7059612", "0.70108306", "0.69913566", "0.6867029", "0.6804856", "0.6788491", "0.67524904", "0.672178", "0.6704899", "0.66929865", "0.66869235", "0.6656718", "0.66557926", "0.66256636", "0.66191477", "0.6611692", "0.6611082", "0.6605479", "0.6598279", "0.6596455", "0.6594915", "0.6587481", "0.6551238", "0.6544876", "0.64970213", "0.6487347", "0.6464532", "0.6464281", "0.6458362", "0.64563036", "0.6442563", "0.643619", "0.642657", "0.6415498", "0.6396606", "0.6395517", "0.6395122", "0.63948756", "0.6393178", "0.6392741", "0.63872457", "0.6363908", "0.6339705", "0.63391626", "0.63363487", "0.63305306", "0.6327215", "0.63268316", "0.6321464", "0.6320006", "0.6292808", "0.6266949", "0.62608105", "0.625063", "0.6250602", "0.6234966", "0.62076765", "0.6202978", "0.61958456", "0.6189921", "0.61846983", "0.618289", "0.6180858", "0.61493534", "0.6143685", "0.61359257", "0.61331123", "0.61259896", "0.61248225", "0.6115371", "0.6114985", "0.6111753", "0.61095256", "0.61091787", "0.6090293", "0.6090185", "0.6086506", "0.6073398", "0.6070319", "0.60657704", "0.606577", "0.60648143", "0.60595214", "0.60398275", "0.6026744", "0.60228336", "0.60211766", "0.60103405", "0.599617", "0.5985775", "0.5950389", "0.5948973", "0.5947457", "0.5946343", "0.59431714", "0.5943025", "0.5941903" ]
0.0
-1
Simple way to decrypt a 4 bytes long ASCII string
public static function decrypt($key, $data) { $simple = new self($key); return $simple->dec($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function decrypt();", "function decrypt($string) {\n\t\t\t// Apply base64 decoding if necessary\n\t\t\tif($this->base64) $string = base64_decode($string);\n\t\t\t\n\t\t\t// Extract encrypted IV from input\n\t\t\t$tmp_iv = substr($string,0,$this->hash_length);\n\t\t\t\n\t\t\t// Extract encrypted message from input\n\t\t\t$string = substr($string,$this->hash_length,strlen($string) - $this->hash_length);\n\t\t\t$iv = $out = '';\n\t\t\t\n\t\t\t// Regenerate IV by xor-ing encrypted IV from block 1 and $this->hashed_key\n\t\t\t// Mathematics: (IV XOR KeY) XOR Key = IV\n\t\t\tfor($c=0;$c < $this->hash_length;$c++) \n\t\t\t{\n\t\t\t\t$iv .= chr(ord($tmp_iv[$c]) ^ ord($this->hash_key[$c]));\n\t\t\t}\n\t\t\t// Use IV as key for decrypting the first block cyphertext\n\t\t\t$key = $iv;\n\t\t\t$c = 0;\n\t\t\t\n\t\t\t// Loop through the whole input string\n\t\t\twhile($c < strlen($string)) {\n\t\t\t\t// If we have used all characters of the current key we switch to a new one\n\t\t\t\tif(($c != 0) and ($c % $this->hash_length == 0)) {\n\t\t\t\t\t// New key is the hash of current key and last block of plaintext\n\t\t\t\t\t$key = $this->_hash($key . substr($out,$c - $this->hash_length,$this->hash_length));\n\t\t\t\t}\n\t\t\t\t// Generate output by xor-ing input and key character for character\n\t\t\t\t$out .= chr(ord($key[$c % $this->hash_length]) ^ ord($string[$c]));\n\t\t\t\t$c++;\n\t\t\t}\n\t\t\treturn $out;\n\t\t}", "function decrypt($string, $key='humanbody_messages_2') {\r\n $result = '';\r\n $string = base64_decode($string);\r\n for($i=0; $i<strlen($string); $i++) {\r\n $char = substr($string, $i, 1);\r\n $keychar = substr($key, ($i % strlen($key))-1, 1);\r\n $char = chr(ord($char)-ord($keychar));\r\n $result.=$char;\r\n }\r\n return $result;\r\n }", "function decrypt($string, $key)\n{ \n\t$result = '';\n\t$string = base64_decode($string);\n\tfor($i=0; $i<strlen($string); $i++)\n\t{\n\t\t$char = substr($string, $i, 1);\n\t\t$keychar = substr($key, ($i % strlen($key))-1, 1);\n\t\t$char = chr(ord($char)-ord($keychar));\n\t\t$result.=$char;\n\t}\n\treturn $result;\n}", "abstract public function decrypt($data);", "function DecodeMcrypt( $string )\n\t{\n\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);\n\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t\t$result = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->key, $string, MCRYPT_MODE_ECB, $iv);\n\t\t$result = rtrim($result, \"\\0\");\n\t\treturn $result;\n\t}", "public function decrypt($string)\n\t{\n\t\tglobal $mybb;\n\n\t\t$key = $mybb->config['pluginuploader_ftp_key'];\n\n\t\treturn rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($string), MCRYPT_MODE_CBC, md5(md5($key))), \"\\0\");\n\t}", "function md5_decrypt( $enc_text, $password, $iv_len = 16 )\n\t{\n \t$enc_text = base64_decode( $enc_text );\n \t$n = strlen( $enc_text );\n \t$i = $iv_len;\n \t$plain_text = '';\n \t$iv = substr( $password ^ substr( $enc_text, 0, $iv_len ), 0, 512 );\n \twhile ( $i < $n )\n \t{\n \t$block = substr( $enc_text, $i, 16 );\n \t$plain_text .= $block ^ pack( 'H*', md5( $iv ) );\n \t$iv = substr( $block . $iv, 0, 512 ) ^ $password;\n \t$i += 16;\n \t}\n \treturn preg_replace( '/\\\\x13\\\\x00*$/', '', $plain_text );\n\t}", "public function decrypt($string)\n {\n $key = $this->secretKey;\n //using hexadecimal\n $key = pack('H*', (string)$key);\n\n $cipherText = self::decode($string);\n\n $ivSize = self::getIvSize();\n //retrieves the IV, iv_size should be created using mcrypt_get_iv_size()\n $iv = substr($cipherText, 0, $ivSize);\n\n //retrieves the cipher text (everything except the $iv_size in the front)\n $cipherText = substr($cipherText, $ivSize);\n $decrypted = self::getPlainText($cipherText, $key, $iv);\n $decrypted = rtrim($decrypted, \"\\0\\4\");\n\n return $decrypted;\n }", "public static function decrypt($string)\n {\n /*\n * ------------------------------------------------\n * ALGORITHMS\n * ------------------------------------------------\n * MCRYPT_3DES MCRYPT_PANAMA\n * MCRYPT_ARCFOUR MCRYPT_RAND\n * MCRYPT_ARCFOUR_IV MCRYPT_RC2\n * MCRYPT_BLOWFISH MCRYPT_RC6\n * MCRYPT_BLOWFISH_COMPAT MCRYPT_RIJNDAEL_128\n * MCRYPT_CAST_128 MCRYPT_RIJNDAEL_192\n * MCRYPT_CAST_256 MCRYPT_RIJNDAEL_256\n * MCRYPT_CRYPT MCRYPT_SAFER128\n * MCRYPT_DECRYPT MCRYPT_SAFER64\n * MCRYPT_DES MCRYPT_SAFERPLUS\n * MCRYPT_DEV_RANDOM MCRYPT_SERPENT\n * MCRYPT_DEV_URANDOM MCRYPT_SKIPJACK\n * MCRYPT_ENCRYPT MCRYPT_THREEWAY\n * MCRYPT_ENIGNA MCRYPT_TRIPLEDES\n * MCRYPT_GOST MCRYPT_TWOFISH\n * MCRYPT_IDEA MCRYPT_WAKE\n * MCRYPT_LOKI97 MCRYPT_XTEA\n * MCRYPT_MARS\n * ------------------------------------------------\n * MODES\n * ------------------------------------------------\n * MCRYPT_MODE_CBC MCRYPT_MODE_NOFB\n * MCRYPT_MODE_CFB MCRYPT_MODE_OFB\n * MCRYPT_MODE_ECB MCRYPT_MODE_STREAM\n */\n \n $algorithm = MCRYPT_RIJNDAEL_256;\n $mode = MCRYPT_MODE_ECB;\n $iv_size = mcrypt_get_iv_size ($algorithm, $mode );\n\t$iv = mcrypt_create_iv ( $iv_size, MCRYPT_RAND );\n\t$key = \"Curso-Yii2-Capa8tv\";\n\t\t\t\t\n\t$encrypt = base64_decode ( $string );\n\t\t\t\t\n\treturn MCRYPT_DECRYPT ( $algorithm, $key, $encrypt, $mode, $iv );\n }", "public static function decryptString($key, $string)\n {\n if (strlen($key) < 4)\n {\n throw new \\Exception('Please provide a key that is more than 3 characters');\n }\n $ciphertext_dec = base64_decode($string);\n $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $iv_dec = substr($ciphertext_dec, 0, $iv_size);\n $ciphertext_dec = substr($ciphertext_dec, $iv_size);\n $plaintext_dec = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, self::pad_key($key),\n $ciphertext_dec, MCRYPT_MODE_CBC, $iv_dec);\n\n return $plaintext_dec;\n }", "protected function _decrypt() {}", "protected function _decrypt() {}", "protected static function decryption($string){\n $key=hash('sha256', SECRET_KEY);\n $iv=substr(hash('sha256', SECRET_IV), 0, 16);\n $output=openssl_decrypt(base64_decode($string), METHOD, $key, 0, $iv);\n return $output;\n }", "function decrypter($data){\n\t$a = base64_decode($data);\n\treturn $a;\n}", "public function decryptString($data, $param = null);", "public static function decrypt($string) {\n\t\treturn abacaEncrypt ( $string, 'DECODE', self::$key );\n\t}", "function MyJamiaDecrypt($str) {\n\n\t\t// Store the cipher method \n\t\t$ciphering = \"AES-128-CTR\"; \n \n\t\t// Use OpenSSl Encryption method \n\t\t$iv_length = openssl_cipher_iv_length($ciphering); \n\t\t$options = 0; \n\t\t\t\t\n\t\t// Non-NULL Initialization Vector for decryption \n\t\t$decryption_iv = '1234567891011121'; \n\t\t \n\t\t// Store the decryption key \n\t\t$decryption_key = \"MyJamiaEncryptionString\"; \n\t\t \n\t\t// Use openssl_decrypt() function to decrypt the data \n\t\treturn openssl_decrypt ($str, $ciphering, \n\t\t $decryption_key, $options, $decryption_iv); \t \n\t}", "public function decrypt(): string\n {\n $decrypted = openssl_decrypt(\n $this->encryptedString,\n $this->encryptionMethod,\n $this->salt,\n 0,\n $this->getInitializationVector(),\n );\n\n assert(is_string($decrypted)); // Make phpstan happy\n\n return $decrypted;\n }", "function decrypt($encrypted_string, $decryption_key){\r\n $ciphering = \"AES-128-CTR\";\r\n $options = 0;\r\n $decryption_iv = '1234567891011121';\r\n $string = openssl_decrypt ($encrypted_string, $ciphering, $decryption_key, $options, $decryption_iv);\r\n return $string;\r\n}", "function ehash_decrypt($encrypted_string, $encryption_key) {\n \n\tif (empty($encrypted_string)) {\n return '';\n }\n $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $encrypted_string = base64_decode($encrypted_string);\n $decrypted_string = mcrypt_decrypt(MCRYPT_BLOWFISH, $encryption_key, $encrypted_string, MCRYPT_MODE_ECB, $iv);\n \n return $decrypted_string;\n}", "private function decrypt($string) {\r\n if ($this->settings[\"encryption\"]) {\r\n $string = base64_decode($string);\r\n return str_replace($this->settings[\"salt\"], \"\", $string);\r\n }\r\n return $string;\r\n }", "public static function decrypt(string $encyptedInput):string\n\t{\n list($encrypted_data, $iv) = explode('::', base64_decode($encyptedInput), 2);\n return openssl_decrypt($encrypted_data, 'aes-256-cbc', self::$securekey, 0, $iv);\n }", "function m_decrypt($encrypted_string, $encryption_key) {\n $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $decrypted_string = mcrypt_decrypt(MCRYPT_BLOWFISH, $encryption_key, $encrypted_string, MCRYPT_MODE_ECB, $iv);\n return $decrypted_string;\n}", "function Decrypt($string, $key=''){\r\n\t\tglobal $global_config;\r\n\t\t\r\n\t\tif($key == '')\r\n\t\t\t$key = $global_config[\"en_decrypt_keys\"];\r\n\t\t$result = '';\r\n\t\tfor($i=1; $i<=strlen($string); $i++){\r\n\t\t\t$char = substr($string, $i-1, 1);\r\n\t\t\t$keychar = substr($key, ($i % strlen($key))-1, 1);\r\n\t\t\t$char = chr(ord($char)-ord($keychar));\r\n\t\t\t$result.=$char;\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "function simple_decrypt($text, $salt = \"VUHuiU6b8jgieEG0p79Yx9T4G8Zqp880\") {\n return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $salt, base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)));\n}", "static public function decrypt($data,$key) {\r\n $iv= substr($data, 0,16); \r\n $data=substr($data,16);\r\n // 128 is blocksize, not keysize!\r\n $out=mcrypt_decrypt(MCRYPT_RIJNDAEL_128,$key,$data,MCRYPT_MODE_CBC, $iv);\r\n $padlen=ord(substr($out,-1));\r\n return substr($out,0, strlen($out)-$padlen);\r\n }", "function fsl_decrypt($string, $key = NULL){\n\n //set key to default key if no key passed to function \n $encryption_key = (empty($key)) ? option('fsl_global_encryption_key') : $key;\n\n // To decrypt, separate the encrypted data from the initialization vector ($iv).\n $parts = explode(':', $string);\n\n // Don't forget to base64-decode the $iv before feeding it back to\n //openssl_decrypt\n $decrypted = openssl_decrypt($parts[0], 'aes-256-cbc', $encryption_key, 0, base64_decode($parts[1]));\n return $decrypted;\n}", "public static function decrypt($string) {\n $secret_key = Config::get('constants.DEFAULT_DATA.ENC_SECRET');\n $output = false;\n\n $encrypt_method = \"AES-256-CBC\";\n $secret_iv = 'This is my secret iv';\n\n // hash\n $key = hash('sha256', $secret_key);\n\n // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n return openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);\n }", "function decrypt($cypher){\n\t\t$cypher =str_replace('%20','+',str_replace(' ','+',$cypher));\t\t\t\n\t\treturn trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->key, base64_decode($cypher), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)));\n }", "function cs_encrypt_decrypt($string)\r\n{\r\n\t//Function : encrypt/decrypt a string message v.1.0 without a known key\r\n\t//Author : Aitor Solozabal Merino (spain)\r\n\t//Email : [email protected]\r\n\t//Date : 01-04-2005\r\n $strlen = strlen($string);\r\n $strencrypted = '';\r\n for ($pos = 0; $pos < $strlen ; $pos++)\r\n {\r\n\t\t// long code of the function to explain the algoritm\r\n\t\t// this function can be tailored by the programmer modifyng the formula\r\n\t\t// to calculate the key to use for every character in the string.\r\n\t\t$usekey = (($strlen+$pos)+1); // (+5 or *3 or ^2)\r\n\t\t// after that we need a module division because can´t be greater than 255\r\n\t\t$usekey = (255+$usekey) % 255;\r\n\t\t$encryptbyte = substr($string, $pos, 1);\r\n\t\t$asciibyte = ord($encryptbyte);\r\n\t\t$xorbyte = $asciibyte ^ $usekey; // xor operation\r\n\t\t$encrypted = chr($xorbyte);\r\n\t\t$strencrypted .= $encrypted;\r\n\t\t \r\n\t\t//short code of the function once explained\r\n\t\t// $str_encrypted_message .= chr((ord(substr($str_message, $position, 1))) ^ ((255+(($len_str_message+$position)+1)) % 255));\r\n\t}\r\n\treturn $strencrypted;\r\n}", "function decrypt_string($iv_with_string, $key=KEY) {\n $iv = substr($iv_with_string, 0, cipher_iv_size());\n $encrypted = substr($iv_with_string, cipher_iv_size());\n // Needs a key of length 16, 24, or 32\n $key = str_pad($key, 32, '*');\n\n // Decrypt\n return mcrypt_decrypt(CIPHER_TYPE, $key, $encrypted, CIPHER_MODE, $iv);\n }", "function decrypt($encrypted_string, $encryption_key) {\n\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t\t$decrypted_string = mcrypt_decrypt(MCRYPT_BLOWFISH, $encryption_key, $encrypted_string, MCRYPT_MODE_ECB, $iv);\n\t\treturn $decrypted_string;\n\t}", "function decrypt($string, $key = 'mykey', $secret = 'SecretKey', $method = 'AES-256-CBC') {\n // hash\n $key = hash('sha256', $key);\n // create iv - encrypt method AES-256-CBC expects 16 bytes\n $iv = substr(hash('sha256', $secret), 0, 16);\n // decode\n $string = base64_decode($string);\n // decrypt\n return openssl_decrypt($string, $method, $key, 0, $iv);\n }", "public static function decrypt($data)\r\n {\r\n return openssl_decrypt(\r\n base64_decode($data),\r\n self::OPENSSL_CIPHER_NAME,\r\n self::ENCRYPTION_KEY,\r\n OPENSSL_RAW_DATA,\r\n self::ENCRYPTION_IV\r\n );\r\n }", "public static function des_encrypt( $string )\n {\n $key = array();\n $tmp = array();\n $length = strlen( $string );\n\n for( $i = 0; $i < 7; ++$i ) $tmp[] = $i < $length ? ord( $string[$i] ) : 0;\n\n $key[] = $tmp[0] & 254;\n $key[] = ( $tmp[0] << 7 ) | ( $tmp[1] >> 1 );\n $key[] = ( $tmp[1] << 6 ) | ( $tmp[2] >> 2 );\n $key[] = ( $tmp[2] << 5 ) | ( $tmp[3] >> 3 );\n $key[] = ( $tmp[3] << 4 ) | ( $tmp[4] >> 4 );\n $key[] = ( $tmp[4] << 3 ) | ( $tmp[5] >> 5 );\n $key[] = ( $tmp[5] << 2 ) | ( $tmp[6] >> 6 );\n $key[] = $tmp[6] << 1;\n \n $key0 = '';\n \n foreach( $key as $k ) $key0 .= chr( $k );\n $crypt = mcrypt_encrypt(\n MCRYPT_DES, $key0, 'KGS!@#$%', MCRYPT_MODE_ECB,\n mcrypt_create_iv( mcrypt_get_iv_size( MCRYPT_DES, MCRYPT_MODE_ECB ), MCRYPT_RAND ) );\n\n return bin2hex( $crypt );\n }", "function decrypt($encrypted_string, $encryption_key) {\n $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $decrypted_string = mcrypt_decrypt(MCRYPT_BLOWFISH, $encryption_key, $encrypted_string, MCRYPT_MODE_ECB, $iv);\n return $decrypted_string;\n }", "static function decrypt($encrypted){\n # Separate the encrypted data from the initialization vector ($iv)\n $data = explode('~~~', base64_decode($encrypted));\n # Decrypt the data\n if(isset($data[1])){\n $decryptedMessage = openssl_decrypt($data[0], \"AES-256-CBC\", self::getEncryptKey(), 0, $data[1]);\n return $decryptedMessage;\n } else {\n return $encrypted;\n }\n }", "function decryptData($data, $key) {\r\n $chiper = \"des-ede3\"; //Algorthim used to decrypt\r\n $data = $this->hex2ByteArray($data);\r\n $data = $this->byteArray2String($data);\r\n $data = base64_encode($data);\r\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($chiper));\r\n $decrypted = openssl_decrypt($data, $chiper, $key, OPENSSL_ZERO_PADDING,$iv);\r\n return $decrypted;\r\n}", "function decrypt($string) { \r\n\tglobal $key;\r\n\t$result = Cryptor::Decrypt($string,$key);\r\n\treturn $result;\r\n}", "public static function decrypt($encrypted_string_b64) {\n return Encryption::decryptWKey($encrypted_string_b64, Encryption::_Key1());\n }", "function BASE64URL_symmetric_decipher($dato, $key, $vector)\n\t{\n $tamVI = strlen($vector);\n\n if($tamVI != 16){\n trigger_error(\"Initialization Vector must have 16 hexadecimal characters\", E_USER_ERROR);\n return null;\n }\n if(strlen($key) != 16){\n trigger_error(\"Simetric Key doesn't have length of 16\", E_USER_ERROR);\n\n return null;\n }\n\n $binvi = pack(\"H*\", $vector);\n\n if($binvi == null){\n trigger_error(\"Initialization Vector is not valid, must contain only hexadecimal characters\", E_USER_ERROR);\n\n return null;\n\n }\n $key .= substr($key,0,8); // agrega los primeros 8 bytes al final\n\n $pas = preg_replace('/_/','/',$dato);\n $pas = preg_replace('/-/','+',$pas);\n $pas = preg_replace('/\\./','=',$pas);\n\n $crypttext = base64_decode($pas);\n\n $crypttext2 = mcrypt_decrypt(MCRYPT_3DES, $key, $crypttext, MCRYPT_MODE_CBC, $binvi);\n\n\n $block = mcrypt_get_block_size('tripledes', 'cbc');\n $packing = ord($crypttext2{strlen($crypttext2) - 1});\n if($packing and ($packing < $block))\n {\n for($P = strlen($crypttext2) - 1; $P >= strlen($crypttext2) - $packing; $P--)\n {\n if(ord($crypttext2{$P}) != $packing)\n {\n $packing = 0;\n }\n }\n }\n\n $crypttext2 = substr($crypttext2,0,strlen($crypttext2) - $packing);\n return $crypttext2;\n\t}", "function decrypt($ciphertext)\r\n {\r\n $this->_setup();\r\n // we pad with chr(0) since that's what mcrypt_generic does. to quote from http://php.net/function.mcrypt-generic :\r\n // \"The data is padded with \"\\0\" to make sure the length of the data is n * blocksize.\"\r\n $ciphertext = str_pad($ciphertext, (strlen($ciphertext) + $this->block_size - 1) % $this->block_size, chr(0));\r\n\r\n $plaintext = '';\r\n switch ($this->mode) {\r\n case CRYPT_RIJNDAEL_MODE_ECB:\r\n for ($i = 0; $i < strlen($ciphertext); $i+=$this->block_size) {\r\n $plaintext.= $this->_decryptBlock(substr($ciphertext, $i, $this->block_size));\r\n }\r\n break;\r\n case CRYPT_RIJNDAEL_MODE_CBC:\r\n $xor = $this->decryptIV;\r\n for ($i = 0; $i < strlen($ciphertext); $i+=$this->block_size) {\r\n $block = substr($ciphertext, $i, $this->block_size);\r\n $plaintext.= $this->_decryptBlock($block) ^ $xor;\r\n $xor = $block;\r\n }\r\n if ($this->continuousBuffer) {\r\n $this->decryptIV = $xor;\r\n }\r\n }\r\n\r\n return $this->_unpad($plaintext);\r\n }", "function decrypt_value($dvalue)\n{\n\t#Decode value\n\t$dvalue = base64_decode($dvalue);\n\n\t$dnum = strlen($dvalue);\n\t$dnumIndex = $dnum-1;\n\t$newDvalue = \"\";\n\n\t#Reverse the order of characters\n\tfor($x=0;$x<strlen($dvalue);$x++){\n\t\t$newDvalue .= substr($dvalue,$dnumIndex,1);\n\t\t$dnumIndex--;\n\t}\n\treturn $newDvalue;\n}", "function descifrar($datos, $llave) {\n $clave_cifrado = base64_decode($llave);\n // Para poder descifrar debemos separar los datos de nuestra cdena del IV, nuestro separador es (::)\n list($cifrado, $iv) = explode('::', base64_decode($datos), 2);\n //Por ultimo, se descifra con la llave y el IV obtenido\n return openssl_decrypt($cifrado, 'aes-256-cbc', $clave_cifrado, 0, $iv);\n}", "function decryptData($openssl_data, $openssl_pass, $openssl_iv){\n\t$method = 'AES-256-CBC';\n\n\tif(strlen($openssl_iv) > '128'){\n\t\t$openssl_iv = substr($openssl_iv, 0, 128);\n\t}\n\n\treturn trim(openssl_decrypt($openssl_data, $method, $openssl_pass, FALSE, $openssl_iv));\n}", "public static function aes128Decrypt($key, $data) {}", "function decryptValue($dval){\n\t\n\t\t//Decode value\n\t\t$dval = base64_decode($dval);\n\t\n\t\t$dnum = strlen($dval);\n\t\t$dnumIndex1 = $dnum-1;\n\t\t$dval1 = \"\";\n\t\n\t\t//Reverse the order of characters\n\t\tfor($x=0;$x<strlen($dval);$x++){\n\t\t\t$dval1.= substr($dval,$dnumIndex1,1);\n\t\t\t$dnumIndex1--;\n\t\t}\n\t\treturn $dval1;\n\t}", "function aesdecrypt($encrypted_chaine)\n {\n $key_password = \"la clé\";\n $decrypted_chaine = openssl_decrypt($encrypted_chaine, \"AES-128-ECB\" ,$key_password);\n var_dump($encrypted_chaine);\n \n }", "function rc4($data, $pwd)\n{\n $cipher = '';\n $key[] = \"\";\n $box[] = \"\";\n $pwd_length = strlen($pwd);\n $data_length = strlen($data);\n for ($i = 0; $i < 256; $i++) {\n $key[$i] = ord($pwd[$i % $pwd_length]);\n $box[$i] = $i;\n }\n for ($j = $i = 0; $i < 256; $i++) {\n $j = ($j + $box[$i] + $key[$i]) % 256;\n $tmp = $box[$i];\n $box[$i] = $box[$j];\n $box[$j] = $tmp;\n }\n for ($a = $j = $i = 0; $i < $data_length; $i++) {\n $a = ($a + 1) % 256;\n $j = ($j + $box[$a]) % 256;\n $tmp = $box[$a];\n $box[$a] = $box[$j];\n $box[$j] = $tmp;\n $k = $box[(($box[$a] + $box[$j]) % 256)];\n $cipher .= chr(ord($data[$i]) ^ $k);\n echo \"code:\" . ord($data[$i]) . \"\\tk:$k\". PHP_EOL;\n }\n return $cipher;\n}", "public function decrypt($cypher){\n\t\t$cypher = str_replace('%20','+',str_replace(' ','+',$cypher));\t\t\t\n\t\treturn trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->key, base64_decode($cypher), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)));\n }", "public static function decrypt($value) {\n $self = self::getInstance();\n $prefix = strpos($value, \"U3BhZ2hldHRp.\");\n if($prefix !== false):\n $encrypted = base64_decode(substr($value, $prefix + 13));\n return Security::cipher($encrypted, $self->key);\n endif;\n return false;\n }", "public function decrypt() \r\n {\r\n //TODO: Implement decrypt method\r\n }", "function decrypt($ciphertext)\n {\n if ( CRYPT_AES_MODE == CRYPT_AES_MODE_MCRYPT ) {\n $this->_mcryptSetup();\n\n if ($this->mode == 'ncfb' && $this->continuousBuffer) {\n $iv = &$this->decryptIV;\n $pos = &$this->debuffer['pos'];\n $len = strlen($ciphertext);\n $plaintext = '';\n $i = 0;\n if ($pos) {\n $orig_pos = $pos;\n $max = 16 - $pos;\n if ($len >= $max) {\n $i = $max;\n $len-= $max;\n $pos = 0;\n } else {\n $i = $len;\n $pos+= $len;\n $len = 0;\n }\n // ie. $i = min($max, $len), $len-= $i, $pos+= $i, $pos%= $blocksize\n $plaintext = substr($iv, $orig_pos) ^ $ciphertext;\n $iv = substr_replace($iv, substr($ciphertext, 0, $i), $orig_pos, $i);\n }\n if ($len >= 16) {\n $cb = substr($ciphertext, $i, $len - $len % 16);\n $plaintext.= mcrypt_generic($this->ecb, $iv . $cb) ^ $cb;\n $iv = substr($cb, -16);\n $len%= 16;\n }\n if ($len) {\n $iv = mcrypt_generic($this->ecb, $iv);\n $plaintext.= $iv ^ substr($ciphertext, -$len);\n $iv = substr_replace($iv, substr($ciphertext, -$len), 0, $len);\n $pos = $len;\n }\n\n return $plaintext;\n }\n\n if ($this->paddable) {\n // we pad with chr(0) since that's what mcrypt_generic does. to quote from http://php.net/function.mcrypt-generic :\n // \"The data is padded with \"\\0\" to make sure the length of the data is n * blocksize.\"\n $ciphertext = str_pad($ciphertext, (strlen($ciphertext) + 15) & 0xFFFFFFF0, chr(0));\n }\n\n $plaintext = mdecrypt_generic($this->demcrypt, $ciphertext);\n\n if (!$this->continuousBuffer) {\n mcrypt_generic_init($this->demcrypt, $this->key, $this->iv);\n }\n\n return $this->paddable ? $this->_unpad($plaintext) : $plaintext;\n }\n\n return parent::decrypt($ciphertext);\n }", "function aes256Decrypt($ciphertext, $password) {\n // hash the key\n $key = pack(\"H*\", substr(hash(\"sha512\", $password), 0, 64));\n\n // divide the initialization vector and encrypted data\n $ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $rawBlock = base64_decode($ciphertext);\n $rawIv = substr($rawBlock, 0, $ivSize);\n $rawCiphertext = substr($rawBlock, $ivSize);\n\n // unpad the plaintext before returning it\n try {\n $plaintext = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $rawCiphertext, MCRYPT_MODE_CBC, $rawIv);\n $plaintext = pkcs5Unpad($plaintext);\n } catch(InvalidArgumentException $invalidArgument) {\n throw(new InvalidArgumentException($invalidArgument->getMessage(), 0, $invalidArgument));\n }\n return($plaintext);\n}", "protected function decrypt($data) {\n if ($this->hash_passwords) {\n return rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($this->secret), base64_decode($data), MCRYPT_MODE_CBC, md5(md5($this->secret))), \"\\0\");\n } else {\n return $data;\n }\n }", "public function decrypt_string($input) {\n\n \n\n //echo \"Before Decrypted Text = $input<br>\";\n\n $input = $this->encrypt_decrypt('decrypt', $input);\n\n //echo \"Decrypted Text = $input<br>\";\n\n \n\n \n\n \n\n $input_count = strlen($input);\n\n\n\n $dec = explode(\".\", $input); // splits up the string to any array\n\n $x = count($dec);\n\n $y = $x - 1; // To get the key of the last bit in the array \n\n\n\n $calc = $dec[$y] - 50;\n\n $randkey = chr($calc); // works out the randkey number\n\n\n\n $i = 0;\n\n\n\n while ($i < $y) {\n\n\n\n $array[$i] = $dec[$i] + $randkey; // Works out the ascii characters actual numbers\n\n $real .= chr($array[$i]); //The actual decryption\n\n\n\n $i++;\n\n };\n\n\n\n $input = $real;\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n return $input;\n\n }", "function cryptPasswordDeCrypt( $cifer, $key )\r\n{\r\n\treturn base64_decode( $cifer );\r\n}", "public function decrypt($data)\n {\n // Remove the base64 encoding from our key\n $encryption_key = base64_decode($this->key);\n // To decrypt, split the encrypted data from our IV - our unique separator used was \"::\"\n list($encrypted_data, $iv) = explode('::', base64_decode($data), 2);\n return openssl_decrypt($encrypted_data, 'aes-256-cbc', $encryption_key,\n 0, $iv);\n }", "public function decrypt($text)\n\t{\n\t\t// check that an iv is set, if required by the mode\n\t\t$this->mode->checkIV();\n\n\t\t// the decryption is done inside the mode\n\t\t$this->mode->decrypt($text);\n\t\treturn $text;\n\t}", "protected function _decrypt()\n {\n switch ($this->_cypherUsed) {\n case self::CYPHER_BASIC:\n //break ommited on purpose\n\n default:\n $result = '';\n $string = base64_decode($this->_encryptedText);\n for ($i = 0; $i < strlen($string); $i++) {\n $char = substr($string, $i, 1);\n $keychar = substr($this->_keyString, ($i % strlen($this->_keyString)) - 1, 1);\n $char = chr(ord($char) - ord($keychar));\n $result .= $char;\n }\n $this->_plainText = $result;\n break;\n }\n }", "public function decrypt(string $data) : string|bool\n {\n $json = Jso::hay(base64_decode($data))->decode(true);\n\n if (! Jso::valid() || !$this->validate((array)$json)) {\n throw new DecrypterException('Could not validate the decrypted data pack');\n }\n\n $iv = base64_decode($json['iv']);\n $encrypted = base64_decode($json['data']);\n $decrypted = sodium_crypto_secretbox_open($encrypted, $iv, $this->appKey);\n\n if (! $decrypted) {\n throw new DecrypterException('Could not decrypt the requested data');\n }\n\n sodium_memzero($encrypted);\n return $decrypted;\n }", "function decrypt( $input,$securekey ) {\n\n \t\t// remove the first char which is @ to flag this is AES encrypted\n \t$input = substr($input,1);\n\n \t// HEX decoding\n \t$input = pack('H*', $input);\n\n \treturn mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $securekey, $input, MCRYPT_MODE_CBC, $securekey);\n }", "function Decrypt($string, $amount){\n\t\tif($amount < 0)\n\t\t\treturn Decrypt($string, $amount + 26);\n\t\t$decrypted = ''; \n\t\tfor( $i=0; $i < strlen($string); $i++){\n\t\t\t$code = ord($string[$i]);\n\t\t\tif ( $code >= 65 && $code <= 90 )\n\t\t\t\t$tmp = (( ($code - 65 + $amount) % 26) + 65);\n\t\t\telse if( $code >= 97 && $code <= 122 )\n\t\t\t\t$tmp = (( ($code - 97 + $amount) % 26) + 97);\n\t\t}\n\t\treturn $decrypted;\n\t}", "public function decrypt($data, $deterministic);", "public function testUnicodeDataEncryptionAndDataDecryption()\n {\n $unicodeData = \"яJx 3!Й$\\v@UdrЯЗЮ\"; // length => NativeRc4::KEY_SIZE\n $randomKey = random_bytes(NativeRc4::KEY_SIZE);\n\n $encryptedData = NativeRc4::encryptData($randomKey, $unicodeData);\n $decryptedData = NativeRc4::decryptData($randomKey, $encryptedData);\n\n $this->assertEquals($unicodeData, $decryptedData);\n\n if (in_array(strtolower(Rc4::ALGORITHM_NAME), openssl_get_cipher_methods(), true)) {\n $this->assertEquals(\n $unicodeData,\n openssl_decrypt($encryptedData, 'RC4', $randomKey, OPENSSL_RAW_DATA, '')\n );\n }\n }", "public function decryptString($payload)\n {\n return $this->decrypt($payload, false);\n }", "function new_decrypt($data, $key) {\n if(empty($key)){\n $key = $encryption_key;\n }\n // Remove the base64 encoding from our key\n $encryption_key = base64_decode($key);\n // To decrypt, split the encrypted data from our IV - our unique separator used was \"::\"\n list($encrypted_data, $iv) = explode('::', base64_decode($data), 2);\n return openssl_decrypt($encrypted_data, 'aes-256-cbc', $encryption_key, 0, $iv);\n}", "public function decrypt($content) {\n // Decode base64 string\n $content = base64_decode($content);\n // Create the initialization vector for added security.\n $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND);\n // Decrypt $string\n $decryptedContent = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->_getSecretKey(), $content, MCRYPT_MODE_ECB, $iv);\n // Decode base64 string\n $decryptedContent = base64_decode($decryptedContent);\n \n return $decryptedContent;\n }", "public static function aes256Decrypt($key, $data) {}", "protected function decryptValue($value){\n $cipher = base64_decode($value);\n return $this->handler->decrypt($cipher);\n }", "public function decrypt(string $cipher, ?string $nonce = null, string $additionalData = null): string;", "public function decrypt($encrypted): string\n {\n return $this->zero_unpad(openssl_decrypt(hex2bin($encrypted), $this->method, $this->key, $this->options));\n }", "function descifrar_cadena(string $cadena, string $llave)\n{\n\t$componentes = explode('::', base64_decode($cadena));\n\t$cifrado = $componentes[0];\n\t$iv = $componentes[1];\n\n\t$descifrado = openssl_decrypt(\n\t\t$cifrado,\n\t\tMETODO,\n\t\t$llave,\n\t\t0,\n\t\t$iv\n\t);\n\n\treturn $descifrado;\n}", "private function decryptCipherTextEncryptionKey()\n {\n $result = $this->getAws()->createKms()->decrypt([\n 'CiphertextBlob' => base64_decode($this->getProtectedHeader(self::KEY_CIPHERTEXT_HEADER_NAME))\n ]);\n return $result['Plaintext'];\n }", "public function decryptCBC($encryptStr) {\n $localIV = $this->ivCBC;\n $encryptKey = $this->secret_key;\n $module = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, $localIV);\n\n mcrypt_generic_init($module, $encryptKey, $localIV);\n\n $encryptedData = base64_decode($encryptStr);\n $encryptedData = mdecrypt_generic($module, $encryptedData);\n\n return $encryptedData;\n }", "function decrypt($ciphertext, $passphrase, $iv) {\n try {\n\t\t$decrypted = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $passphrase, $ciphertext, MCRYPT_MODE_CBC, $iv);\n\t\treturn unpad_pkcs5($decrypted);\n } catch (Exception $e) {\n echo \"Encryption exception in decrypt: \" . $e->getMessage() . \"\\n\";\n }\n}", "public static function decryptData($input, $key_seed)\n {\n $input = base64_decode($input);\n $key = substr(md5($key_seed), 0, 24);\n $text = mcrypt_decrypt(MCRYPT_TRIPLEDES, $key, $input, MCRYPT_MODE_ECB, '12345678');\n $block = mcrypt_get_block_size('tripledes', 'ecb');\n $packing = ord($text{strlen($text) - 1});\n if ($packing and ($packing < $block)) {\n for ($P = strlen($text) - 1; $P >= strlen($text) - $packing; $P--) {\n if (ord($text{$P}) != $packing) {\n $packing = 0;\n }\n }\n }\n $text = substr($text, 0, strlen($text) - $packing);\n return $text;\n }", "public function decryptString(string $string, string $key): string\n {\n try {\n $defuseKey = Key::loadFromAsciiSafeString($key);\n return Crypto::decrypt($string, $defuseKey);\n } catch (CryptoException $ex) {\n throw new CryptographyException('Could not decrypt string.');\n }\n }", "public function AesDecrypt ($buffer, $key)\r\n\t{\r\n\t\tif (strlen ($key) != 32)\r\n\t\t{\r\n\t\t\treturn false;\t\r\n\t\t}\r\n\t\t\r\n\t\t$buffer = $this->_hex2bin ($buffer);\r\n\t\t\r\n\t\t$size = mcrypt_get_iv_size (MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC);\r\n\r\n\t\tif ($size > strlen ($buffer))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$iv = substr ($buffer, 0, $size);\t\t\r\n\t\t$buffer = substr ($buffer, $size);\r\n\t\t\r\n\t\treturn rtrim (mcrypt_decrypt (MCRYPT_RIJNDAEL_256, $key, $buffer, MCRYPT_MODE_CBC, $iv) );\r\n\t}", "private function _decrypt($value)\n {\n if (!strpos($value, '|')) {\n return false;\n }\n\n list($iv, $data) = explode('|', $value);\n $iv = base64_decode($iv);\n $data = base64_decode($data);\n\n $b64 = mcrypt_decrypt(\n self::CIPHER,\n $this->getPassKey(),\n $data,\n self::CIPHER_MODE,\n $iv\n );\n\n // We stored it base64 encoded to remove any numerical\n // patterns.\n $plain = base64_decode($b64);\n\n return rtrim($plain);\n }", "function decrypt_file_url($encrypted_string) {\n \t$encryption_conf = config_item('encryption');\n\n\t//get encryption configurations from config\n $key = $encryption_conf['key'];\n $method = $encryption_conf['method'];\n $iv = $encryption_conf['iv'];\n $output = openssl_decrypt(base64_decode($encrypted_string), $method, $key, 0, $iv);\n\n return $output;\n}", "public function decrypt($iv, $data, $tag = null, $aad = '');", "function getFixedIv8Byte()\r\n{\r\n return \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\";}", "function decrypt($ciphertext)\n {\n $ciphertext = strtolower($ciphertext);\n $plaintext = \"\";\n \n for ( $i = 0; $i < strlen($ciphertext); $i++ )\n {\n $x = $this->alphabet->indexOf($ciphertext[$i]);\n $decodedIndex = mod(($x - $this->shift), $this->alphabet->sizeOf());\n $plaintext = $plaintext . ($this->alphabet->get($decodedIndex)[0]);\n }\n return $plaintext;\n }", "function encrypt($string)\n{\n\t$hash = md5($string);\n\t$blok1 = substr($hash, 0,8);\n\t$blok2 = substr($hash, 8,8);\n\t$blok3 = substr($hash, 16,4);\n\t$blok4 = substr($hash, 20,4);\n\t$blok5 = substr($hash, 24,8);\n\n\treturn $blok2.'-'.$blok4.'-'.$blok5.'-'.$blok3.'-'.$blok1;\n}", "public function decrypt() {\n $str = Input::get ( 'value' );\n $task = new My_task;\n $result = $task->decrypt($str);\n return $result;\n }", "function km200_Decrypt( $decryptData ) \n{ \n $decrypt = openssl_decrypt( \n base64_decode( $decryptData ),\n \"aes-256-ecb\",\n km200_crypt_key_private,\n OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING\n );\n// var_dump($decryptData);\n\n // remove zero padding \n $decrypt = rtrim( $decrypt, \"\\x00\" ); \n // remove PKCS #7 padding \n $decrypt_len = strlen( $decrypt ); \n $decrypt_padchar = ord( $decrypt[ $decrypt_len - 1 ] ); \n for ( $i = 0; $i < $decrypt_padchar ; $i++ ) \n { \n if ( $decrypt_padchar != ord( $decrypt[$decrypt_len - $i - 1] ) ) \n break; \n } \n if ( $i != $decrypt_padchar ) \n return $decrypt; \n else \n return substr( \n $decrypt, \n 0, \n $decrypt_len - $decrypt_padchar \n ); \n}", "public function decrypt($data)\n {\n return Crypto::decrypt($data, $this->key);\n }", "function decrypt( $crypttext )\n\t{\n\t\t$priv_key = $this->RsaPrivateKey;\n\t\t$tt = explode( \":::\", $crypttext );\n\t\t$cnt = count( $tt );\n\t\t$i = 0;\n\t\t$str = '';\n\t\twhile( $i < $cnt )\n\t\t{\n\t\t\topenssl_private_decrypt( $tt[$i], $str1, $priv_key );\n\t\t\t$str .= $str1;\n\t\t\t$i++;\n\t\t}\n\t\treturn $str;\n\t}", "public function decrypt($data)\n {\n if (is_null($data)) {\n return $data;\n }\n\n $data = base64_decode($data);\n\n $data = $this->removeCipherNoise($data, $this->getKey());\n $init_size = openssl_cipher_iv_length($this->cipher);\n\n if ($init_size > strlen($data)) {\n return null;\n }\n\n $init_vect = substr($data, 0, $init_size);\n $data = substr($data, $init_size);\n return rtrim(\n \\openssl_decrypt(\n $data,\n $this->cipher,\n $this->getKey(),\n $this->encryptOptions,\n $init_vect\n ),\n \"\\0\"\n );\n }", "function rc4($key, $str) {\n\t$s = array();\n\tfor ($i = 0; $i < 256; $i++) {\n\t\t$s[$i] = $i;\n\t}\n\t$j = 0;\n\tfor ($i = 0; $i < 256; $i++) {\n\t\t$j = ($j + $s[$i] + ord($key[$i % strlen($key)])) % 256;\n\t\t$x = $s[$i];\n\t\t$s[$i] = $s[$j];\n\t\t$s[$j] = $x;\n\t}\n\t$i = 0;\n\t$j = 0;\n\t$res = '';\n\tfor ($y = 0; $y < strlen($str); $y++) {\n\t\t$i = ($i + 1) % 256;\n\t\t$j = ($j + $s[$i]) % 256;\n\t\t$x = $s[$i];\n\t\t$s[$i] = $s[$j];\n\t\t$s[$j] = $x;\n\t\t$res .= $str[$y] ^ chr($s[($s[$i] + $s[$j]) % 256]);\n\t}\n\treturn $res;\n}", "public function decrypt3DES($text, $key) {\n $key = base64_decode($key);\n $str = $this->hex2bin($text);\n $size = mcrypt_get_iv_size(MCRYPT_3DES, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($size, MCRYPT_RAND);\n $decrypted = mcrypt_decrypt(MCRYPT_3DES, $key, $str, MCRYPT_MODE_ECB, $iv);\n $info = rtrim($this->pkcs5_unpad($decrypted));\n\t\t//log_message('error', 'data decrypt: ' . print_r($info, true));\n return $info;\n }", "public static function decrypt($data, $key) {\n self::iv($key);\n return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, self::$key, hex2bin($data), MCRYPT_MODE_ECB, self::$iv));\n }", "function xoft_decode($cipher_data,$key){\r\n\r\n $m=0;\r\n $all_bin_chars=\"\";\r\n\r\n for($i=0;$i<mb_strlen($cipher_data);$i++){\r\n\t$c=mb_substr($cipher_data,$i,1); // c = ciphertext\r\n\t$decimal_value=base64todec($c); //convert to decimal value\r\n\r\n\t$decimal_value=($decimal_value - $m) / 4; //substract by m where m=0,1,2,or 3 then divide by 4\r\n\r\n\t$four_bit=decbin($decimal_value);\r\n\r\n\twhile(mb_strlen($four_bit)<4){\r\n\t\t$four_bit=\"0\".$four_bit;\r\n\t}\r\n\r\n\t$all_bin_chars=$all_bin_chars.$four_bit;\r\n\t$m++;\r\n\r\n\tif($m>3){\r\n\t\t$m=0;\r\n\t}\r\n }\r\n\r\n $key_length=0;\r\n $plain_data=\"\";\r\n\t\r\n for($j=0;$j<mb_strlen($all_bin_chars);$j=$j+8){\r\n\t$c=mb_substr($all_bin_chars,$j,8);\r\n\t$k=mb_substr($key,$key_length,1);\r\n\t\r\n\t$dec_chars=bindec($c);\r\n\t$dec_chars=$dec_chars - mb_strlen($key);\r\n\t$c=chr($dec_chars);\r\n\t$key_length++;\r\n\t\r\n\tif($key_length>=mb_strlen($key)){\r\n\t\t$key_length=0;\r\n\t}\r\n\t\r\n\t$dec_chars=ord($c)^ord($k);\r\n\t$p=chr($dec_chars);\r\n\t$plain_data=$plain_data.$p;\r\n }\r\n \r\n return $plain_data;\r\n}", "function decryptPassword($password)\n\t{\n\t\t$key = pack('H*', \"bcb04b7e103a05afe34763051cef08bc55abe029fdebae5e1d417e2ffb2a00a3\");\n\n\t $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n\t $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\n\t $ciphertext_dec = base64_decode($password);\n\t $iv_dec = substr($ciphertext_dec, 0, $iv_size);\n\t $ciphertext_dec = substr($ciphertext_dec, $iv_size);\n\n\t $password = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $ciphertext_dec, MCRYPT_MODE_CBC, $iv_dec);\n\n\t \t$count = 0;\n\t \t$length = strlen($password);\n\n\t for ($i = $length - 1; $i >= 0; $i --)\n\t {\n\t \tif (ord($password{$i}) === 0)\n\t \t{\n\t \t\t$count ++;\n\t \t}\n\t }\n\n\t $password = substr($password, 0, $length - $count);\n\n\t return $password;\n\t}", "function TOdecrypt($encrypted, $password, $salt='!kQm*fF3pXe1Kbm%9') {\r\n $key = hash('SHA256', $salt . $password, true);\r\n // Retrieve $iv which is the first 22 characters plus ==, base64_decoded.\r\n $iv = base64_decode(substr($encrypted, 0, 22) . '==');\r\n // Remove $iv from $encrypted.\r\n $encrypted = substr($encrypted, 22);\r\n // Decrypt the data. rtrim won't corrupt the data because the last 32 characters are the md5 hash; thus any \\0 character has to be padding.\r\n $decrypted = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, base64_decode($encrypted), MCRYPT_MODE_CBC, $iv), \"\\0\\4\");\r\n // Retrieve $hash which is the last 32 characters of $decrypted.\r\n $hash = substr($decrypted, -32);\r\n // Remove the last 32 characters from $decrypted.\r\n $decrypted = substr($decrypted, 0, -32);\r\n // Integrity check. If this fails, either the data is corrupted, or the password/salt was incorrect.\r\n if (md5($decrypted) != $hash) return false;\r\n // Yay!\r\n return $decrypted;\r\n }", "function hashDecode($data)\n {\n return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT));\n }", "function decryptData($encryptedString)\r\n\t\t{\r\n\t\t$arrayDataReturn\t= null;\r\n\t\t$baseString \t\t\t= urldecode($encryptedString);\r\n\t\t$arrayDataLine\t\t= explode('#|#',$baseString);\t// Breakes blocks apart (Block = key ~|~ value ~|~ md5 hash)\r\n\t\t\r\n\t\tif(!is_array($arrayDataLine)) return null;\r\n\t\t\r\n\t\tforeach($arrayDataLine as $value) {\r\n\t\t\t$arrayTemp = explode('~|~',$value);\t// The Block is split in 3 sub-blocks\r\n\t\t\tif(!is_array($arrayTemp) || count($arrayTemp) != 3) continue;\r\n\t\t\t\r\n\t\t\tlist($key,$value,$md5hash) = $arrayTemp;\r\n\t\t\t$key = str_rot13($key);\r\n\t\t\t$value = str_rot13($value);\r\n\t\t\t\r\n\t\t\tif($md5hash == md5($key . $value . $this->_confuser)){\r\n\t\t\t\t$arrayDataReturn[$key] = $value;\r\n\t\t\t\t}\n\t\t\telse {\n\t\t\t\t//debug($key . ' V:' . $value,1);\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\treturn $arrayDataReturn;\r\n\t}", "function decode($string);", "function aes256_cbc_decrypt($key, $data, $iv) {\n $data = openssl_decrypt($data, \"aes-256-cbc\", $key, OPENSSL_RAW_DATA, $iv);\n return $data;\n}" ]
[ "0.75565124", "0.70160264", "0.69879854", "0.69580835", "0.6937924", "0.69334626", "0.69318604", "0.68982804", "0.6870063", "0.6865286", "0.6834791", "0.6817039", "0.6817039", "0.6611403", "0.65944904", "0.6591291", "0.65797806", "0.6552204", "0.6537807", "0.653562", "0.65303206", "0.652477", "0.65100193", "0.6478018", "0.64762026", "0.64022493", "0.6380937", "0.63784486", "0.63756746", "0.6349115", "0.6335039", "0.63213027", "0.6263721", "0.62635154", "0.62619334", "0.6257958", "0.62524706", "0.62521595", "0.62408084", "0.622943", "0.62218195", "0.6215479", "0.61957574", "0.6179702", "0.6178945", "0.6174632", "0.6158337", "0.6154416", "0.6148261", "0.6134363", "0.6133906", "0.6113395", "0.611206", "0.6111936", "0.6107109", "0.6104706", "0.6097339", "0.60935533", "0.6082485", "0.6077779", "0.6075047", "0.605803", "0.6046626", "0.60364914", "0.6035665", "0.60340786", "0.60270756", "0.6006432", "0.5992934", "0.596039", "0.59547067", "0.5944655", "0.59443283", "0.59383875", "0.59361833", "0.58982706", "0.5892005", "0.5884321", "0.5870928", "0.5860701", "0.58586234", "0.58431613", "0.5838156", "0.58317107", "0.58303845", "0.5816945", "0.5814862", "0.5810164", "0.58062375", "0.5805775", "0.58043516", "0.57942563", "0.57939583", "0.5793733", "0.5787397", "0.57776916", "0.57630783", "0.5752387", "0.57458377", "0.5727439", "0.57252485" ]
0.0
-1
Encrypt a 4 bytes long ASCII string
public function enc($data) { return $this->_simplify('encrypt', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function encrypt($string)\n{\n\t$hash = md5($string);\n\t$blok1 = substr($hash, 0,8);\n\t$blok2 = substr($hash, 8,8);\n\t$blok3 = substr($hash, 16,4);\n\t$blok4 = substr($hash, 20,4);\n\t$blok5 = substr($hash, 24,8);\n\n\treturn $blok2.'-'.$blok4.'-'.$blok5.'-'.$blok3.'-'.$blok1;\n}", "function encrypt($string, $key=KEY) {\n return base64_encode(encrypt_string($string, $key));\n }", "public function encrypt();", "function encrypt($string) {\n\t\t\t$iv = $this->_generate_iv();\n\t\t\t\n\t\t\t// Clear output\n\t\t\t$out = '';\n\t\t\t\n\t\t\t// First block of output is ($this->hash_hey XOR IV)\n\t\t\tfor($c=0;$c < $this->hash_length;$c++) {\n\t\t\t\t$out .= chr(ord($iv[$c]) ^ ord($this->hash_key[$c]));\n\t\t\t}\n\t\n\t\t\t// Use IV as first key\n\t\t\t$key = $iv;\n\t\t\t$c = 0;\n\t\n\t\t\t// Go through input string\n\t\t\twhile($c < strlen($string)) {\n\t\t\t\t// If we have used all characters of the current key we switch to a new one\n\t\t\t\tif(($c != 0) and ($c % $this->hash_length == 0)) {\n\t\t\t\t\t// New key is the hash of current key and last block of plaintext\n\t\t\t\t\t$key = $this->_hash($key . substr($string,$c - $this->hash_length,$this->hash_length));\n\t\t\t\t}\n\t\t\t\t// Generate output by xor-ing input and key character for character\n\t\t\t\t$out .= chr(ord($key[$c % $this->hash_length]) ^ ord($string[$c]));\n\t\t\t\t$c++;\n\t\t\t}\n\t\t\t// Apply base64 encoding if necessary\n\t\t\tif($this->base64) $out = base64_encode($out);\n\t\t\treturn $out;\n\t\t}", "public function encrypt($string)\n {\n $key = $this->secretKey;\n //using hexadecimal\n $key = pack('H*', (string)$key);\n\n //$keySize = self::getKeySize($key);\n $iv = self::getIv();\n $cipherText = self::getCipherText($string, $key, $iv);\n\n //prepend the IV for it to be available for decryption\n $cipherText = $iv.$cipherText;\n\n return self::encode($cipherText);\n }", "function simple_encrypt($text){\n \treturn base64_encode(openssl_encrypt($text, \"AES-256-CTR\", \"GhratnaXbS\", 0, \"0123456789abcdef\"));\n }", "function encrypt($string, $key)\n{ \n\t$result = '';\n\tfor($i=0; $i<strlen($string); $i++)\n\t{\n\t\t$char = substr($string, $i, 1);\n\t\t$keychar = substr($key, ($i % strlen($key))-1, 1);\n\t\t$char = chr(ord($char)+ord($keychar));\n\t\t$result.=$char;\n\t}\n\treturn base64_encode($result);\n}", "function encrypt($str) {\n return Crypt::encrypt($str);\n}", "private function encrypt($string) {\r\n if ($this->settings[\"encryption\"]) {\r\n $string = $string . $this->settings[\"salt\"];\r\n return base64_encode($string);\r\n }\r\n return $string;\r\n }", "function encrypt($str, $key) {\n $key = str_pad($key, 16);\n //$key = $this->hex2bin($key);\n $iv = $this->iv;\n\n $td = mcrypt_module_open('rijndael-128', '', 'cbc', $iv);\n\n mcrypt_generic_init($td, $key, $iv);\n $encrypted = mcrypt_generic($td, $str);\n\n mcrypt_generic_deinit($td);\n mcrypt_module_close($td);\n\n return bin2hex($encrypted);\n }", "function encrypt(string $string): string\n{\n $blowfishSalt = bin2hex(openssl_random_pseudo_bytes(22));\n $hash = crypt($string, \"$2y$12$\" . $blowfishSalt);\n\n return $hash;\n}", "function encrypt($decrepted_string, $encrytion_key){\r\n $ciphering = \"AES-128-CTR\";\r\n $options = 0;\r\n $encryption_iv = '1234567891011121';\r\n $string = openssl_encrypt($decrepted_string, $ciphering, $encrytion_key, $options, $encryption_iv);\r\n return $string;\r\n}", "function encrypt_string($string, $key=KEY) {\n $iv = mcrypt_create_iv(cipher_iv_size(), MCRYPT_RAND);\n // Needs a key of length 16, 24, or 32\n $key = str_pad($key, 32, '*');\n\n // Encrypt\n $encrypted = mcrypt_encrypt(CIPHER_TYPE, $key, $string, CIPHER_MODE, $iv);\n\n // Return $iv at front of string, need it for decoding\n return $iv . $encrypted;\n }", "public function Encrypt($data)\n {\n $pad = $this->blocksize - (strlen($data) % $this->blocksize);\n $data = $data . str_repeat(chr($pad), $pad);\n return bin2hex(mcrypt_encrypt(MCRYPT_RIJNDAEL_128,\n $this->encryptKey,\n $data, MCRYPT_MODE_CBC, $this->iv));\n }", "public static function encryptString($key, $string)\n {\n if (strlen($key) < 4)\n {\n throw new \\Exception('Please provide a key that is more than 3 characters');\n }\n\n $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, self::pad_key($key),\n $string, MCRYPT_MODE_CBC, $iv);\n $ciphertext = $iv . $ciphertext;\n $ciphertext_base64 = base64_encode($ciphertext);\n\n return $ciphertext_base64;\n }", "abstract public function encrypt($data);", "function encrypt($plain){\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $plain, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n }", "protected static function encryption($string){\n $output=FALSE;\n $key=hash('sha256', SECRET_KEY);\n $iv=substr(hash('sha256', SECRET_IV), 0, 16);\n $output=openssl_encrypt($string, METHOD, $key, 0, $iv);\n $output=base64_encode($output);\n return $output;\n }", "protected function encrypt($str)\n { \n \n return md5($str);\n }", "static function encrypt($data){\n # Setup the initialization vector\n $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n # Encrypt the data\n $encryptedMessage = openssl_encrypt($data, \"AES-256-CBC\", self::getEncryptKey(), 0, $iv);\n return base64_encode($encryptedMessage.'~~~'.$iv);\n }", "function encrypt($string, $password) {\n $encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($password), $string, MCRYPT_MODE_CBC, md5(md5($password))));\n return $encrypted;\n}", "function encrypt_data($str){\n\treturn md5($str);\n}", "public function encrypt($string)\n\t{\n\t\tglobal $mybb;\n\n\t\t$key = $mybb->config['pluginuploader_ftp_key'];\n\n\t\treturn base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key))));\n\t}", "public static function encrypt($string) {\n $secret_key = Config::get('constants.DEFAULT_DATA.ENC_SECRET');\n $output = false;\n\n $encrypt_method = \"AES-256-CBC\";\n $secret_iv = 'This is my secret iv';\n\n // hash\n $key = hash('sha256', $secret_key);\n\n // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);\n return base64_encode($output);\n }", "function ehash_encrypt($pure_string, $encryption_key) {\n \n\tif (empty($pure_string)) {\n return '';\n }\n $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $encrypted_string = base64_encode(mcrypt_encrypt(MCRYPT_BLOWFISH, $encryption_key, $pure_string, MCRYPT_MODE_ECB, $iv));\n \n return $encrypted_string;\n}", "function km200_Encrypt( $encryptData ) \n{ \n $blocksize = 16;\n $encrypt_padchar = $blocksize - ( strlen( $encryptData ) % $blocksize ); \n $encryptData .= str_repeat( chr( $encrypt_padchar ), $encrypt_padchar ); \n \n return base64_encode(\n openssl_encrypt(\n $encryptData,\n \"aes-256-ecb\",\n km200_crypt_key_private,\n OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING\n )\n );\n}", "function encrypt($pure_string, $encryption_key) {\n\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t\t$encrypted_string = mcrypt_encrypt(MCRYPT_BLOWFISH, $encryption_key, utf8_encode($pure_string), MCRYPT_MODE_ECB, $iv);\n\t\treturn $encrypted_string;\n\t}", "public function encrypt($plain){\t\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $plain, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n }", "function encrypt($pure_string, $encryption_key) {\n $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $encrypted_string = mcrypt_encrypt(MCRYPT_BLOWFISH, $encryption_key, utf8_encode($pure_string), MCRYPT_MODE_ECB, $iv);\n return $encrypted_string;\n }", "function encript($password){\n\t$password_md5 = md5($password);\n\t$enc_password = crypt($password,$password_md5);\n\treturn $enc_password;\n}", "protected function _encrypt()\n {\n switch ($this->_cypherUsed) {\n case self::CYPHER_BASIC:\n //break ommited on purpose\n default:\n $string = $this->_plainText;\n $result = '';\n for ($i = 0; $i < strlen($string); $i++) {\n $char = substr($string, $i, 1);\n $keychar = substr($this->_keyString, ($i % strlen($this->_keyString)) - 1, 1);\n $char = chr(ord($char) + ord($keychar));\n $result .= $char;\n }\n $this->_encryptedText = base64_encode($result);\n break;\n }\n }", "function MyJamiaEncrypt($str) {\n\t\t\n\t\t// Store the cipher method \n\t\t$ciphering = \"AES-128-CTR\"; \n \n\t\t// Use OpenSSl Encryption method \n\t\t$iv_length = openssl_cipher_iv_length($ciphering); \n\t\t$options = 0; \n \n\t\t// Non-NULL Initialization Vector for encryption \n\t\t$encryption_iv = '1234567891011121'; \n \n\t\t// Store the encryption key \n\t\t$encryption_key = \"MyJamiaEncryptionString\"; \n \n\t\t// Use openssl_encrypt() function to encrypt the data \n\t\treturn openssl_encrypt($str, $ciphering, \n\t\t $encryption_key, $options, $encryption_iv); \n \t}", "protected function encriptar($string){\n //La función md5() permite encriptar el string\n return md5($string);\n }", "function encryptIt( $q ) {\n\t$code = str_replace( \"@\", \"!!!\", $q );\n\t$code = str_replace( \".\", \"=\", $code );\n\t$code = str_rot13( $code );\n\treturn ( $code );\n}", "function EncodeMcrypt( $string )\n\t{\n\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);\n\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t\t$result = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $string, MCRYPT_MODE_ECB, $iv);\n\t\treturn $result;\n\t}", "public function encrypt(string $data) : string\n {\n $iv = $this->generate();\n $encrypted = sodium_crypto_secretbox($data, $iv, $this->appKey);\n\n if (empty($encrypted)) {\n throw new EncrypterException('Failed to encrypt the requested data');\n }\n\n $json = Jso::hay(['iv' => base64_encode($iv),\n 'data' => base64_encode($encrypted),\n 'mac' => $this->hash($encrypted, $iv)\n ])->encode( JSON_UNESCAPED_SLASHES );\n\n if (! Jso::valid()) {\n throw new EncrypterException('Failed to encode the requested data');\n }\n\n sodium_memzero($iv);\n return base64_encode($json);\n }", "public function encrypt($string = null) {\r\n return strtr(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, 'PR3t5mupEger2TebretrU3AZek2s8ta', $string, MCRYPT_MODE_ECB)), '+/=', '-_.');\r\n }", "protected function string_encrypt($string) {\n $ivlen = openssl_cipher_iv_length($this->cipher);\n // Create an iv with the length of ivlen\n $iv = random_bytes($ivlen);\n // Encrypt the provided string\n $encrypted = openssl_encrypt($string, $this->cipher, env('APP_KEY'), $options=0, $iv);\n // Prepend the base64 encoded iv to the encrypted data separated with a \":\" as delimiter\n $encrypted = base64_encode($iv).\":\".$encrypted;\n return $encrypted;\n }", "function cs_encrypt_decrypt($string)\r\n{\r\n\t//Function : encrypt/decrypt a string message v.1.0 without a known key\r\n\t//Author : Aitor Solozabal Merino (spain)\r\n\t//Email : [email protected]\r\n\t//Date : 01-04-2005\r\n $strlen = strlen($string);\r\n $strencrypted = '';\r\n for ($pos = 0; $pos < $strlen ; $pos++)\r\n {\r\n\t\t// long code of the function to explain the algoritm\r\n\t\t// this function can be tailored by the programmer modifyng the formula\r\n\t\t// to calculate the key to use for every character in the string.\r\n\t\t$usekey = (($strlen+$pos)+1); // (+5 or *3 or ^2)\r\n\t\t// after that we need a module division because can´t be greater than 255\r\n\t\t$usekey = (255+$usekey) % 255;\r\n\t\t$encryptbyte = substr($string, $pos, 1);\r\n\t\t$asciibyte = ord($encryptbyte);\r\n\t\t$xorbyte = $asciibyte ^ $usekey; // xor operation\r\n\t\t$encrypted = chr($xorbyte);\r\n\t\t$strencrypted .= $encrypted;\r\n\t\t \r\n\t\t//short code of the function once explained\r\n\t\t// $str_encrypted_message .= chr((ord(substr($str_message, $position, 1))) ^ ((255+(($len_str_message+$position)+1)) % 255));\r\n\t}\r\n\treturn $strencrypted;\r\n}", "public static function encryptString($data)\n {\n $encrypted = Crypt::encryptString($data);\n return $encrypted;\n }", "public static function aes128Encrypt($key, $data) {}", "function simple_encode($data, $passwd, $method='aes-128-cbc', $options=0, $iv='SomeA1AweS0meK5y') {\n return openssl_encrypt ($data, $method, $passwd, $options, $iv);\n}", "function crypter($data){\n\t$a = base64_encode($data);\n\treturn $a;\n}", "public function encryptString($data, $param = null);", "public function encrypt_encode($string = '', $key = false){\n if($key){\n return base64_encode( $this->encrypt->encode($string, $key) );\n }else{\n return base64_encode( $this->encrypt->encode($string) );\n }\n \n }", "function rc4($data, $pwd)\n{\n $cipher = '';\n $key[] = \"\";\n $box[] = \"\";\n $pwd_length = strlen($pwd);\n $data_length = strlen($data);\n for ($i = 0; $i < 256; $i++) {\n $key[$i] = ord($pwd[$i % $pwd_length]);\n $box[$i] = $i;\n }\n for ($j = $i = 0; $i < 256; $i++) {\n $j = ($j + $box[$i] + $key[$i]) % 256;\n $tmp = $box[$i];\n $box[$i] = $box[$j];\n $box[$j] = $tmp;\n }\n for ($a = $j = $i = 0; $i < $data_length; $i++) {\n $a = ($a + 1) % 256;\n $j = ($j + $box[$a]) % 256;\n $tmp = $box[$a];\n $box[$a] = $box[$j];\n $box[$j] = $tmp;\n $k = $box[(($box[$a] + $box[$j]) % 256)];\n $cipher .= chr(ord($data[$i]) ^ $k);\n echo \"code:\" . ord($data[$i]) . \"\\tk:$k\". PHP_EOL;\n }\n return $cipher;\n}", "function customEncrypt($text, $key)\n {\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, padEncryptionSalt($key), $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n }", "public function encrypt($data)\n {\n // Remove the base64 encoding from our key\n $encryption_key = base64_decode($this->key);\n // Generate an initialization vector\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n // Encrypt the data using AES 256 encryption in CBC mode using our encryption key and initialization vector.\n $encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key,\n 0, $iv);\n // The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)\n return base64_encode($encrypted.'::'.$iv);\n }", "function Encrypt($string, $key='')\t{\r\n\t\tglobal $global_config;\r\n\t\t\r\n\t\tif($key == '')\r\n\t\t\t$key = $global_config[\"en_decrypt_keys\"];\r\n\t\t$result = '';\r\n\t\tfor($i=1; $i<=strlen($string); $i++){\r\n\t\t\t$char = substr($string, $i-1, 1);\r\n\t\t\t$keychar = substr($key, ($i % strlen($key))-1, 1);\r\n\t\t\t$char = chr(ord($char)+ord($keychar));\r\n\t\t\t$result.=$char;\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "public static function encrypt(string $inputVal):string\n\t{\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n $encrypted = openssl_encrypt($inputVal, 'aes-256-cbc', self::$securekey, 0, $iv);\n return base64_encode($encrypted . '::' . $iv);\n\t}", "public static function encriptar( $plainString ){\n return $plainString;\n }", "public static function encrypt($data)\r\n {\r\n return base64_encode(\r\n openssl_encrypt(\r\n $data,\r\n self::OPENSSL_CIPHER_NAME,\r\n self::ENCRYPTION_KEY,\r\n OPENSSL_RAW_DATA,\r\n self::ENCRYPTION_IV\r\n )\r\n );\r\n }", "public static function encrypt($textToEncrypt, $password, $nrBits)\r\n {\r\n $blockSize = 16;\r\n\r\n /**\r\n * AES permite utilizarea cheilor de criptare cu dimensiuni de 128/192/256 biti.\r\n */\r\n if (!($nrBits == 128 || $nrBits == 192 || $nrBits == 256)) {\r\n return '';\r\n }\r\n\r\n /**\r\n * Folosim algoritmul AES pentru criptarea parolei cu care, mai apoi, vom cripta textul.\r\n */\r\n $nBytes = $nrBits / 8;\r\n $pwBytes = array();\r\n for ($i = 0; $i < $nBytes; $i++) {\r\n $pwBytes[$i] = ord(substr($password, $i, 1)) & 0xff;\r\n }\r\n $key = AES::encryptByteArray($pwBytes, AES::keyExpansion($pwBytes));\r\n $key = array_merge($key, array_slice($key, 0, $nBytes - 16)); // marim cheia pana la 16/24/32 de octeti\r\n\r\n /**\r\n * Avem nevoie de a initializa primii 8 octeti cu valori aleatorii, care vor fi unice pentru fiecare incercare de criptare.\r\n */\r\n $counterBlock = array();\r\n $nonce = floor(microtime(true) * 1000);\r\n $nonceMs = $nonce % 1000;\r\n $nonceSec = floor($nonce / 1000);\r\n $nonceRnd = floor(rand(0, 0xffff));\r\n\r\n for ($i = 0; $i < 2; $i++) {\r\n $counterBlock[$i] = self::unsignedRightShift($nonceMs, $i * 8) & 0xff;\r\n }\r\n for ($i = 0; $i < 2; $i++) {\r\n $counterBlock[$i + 2] = self::unsignedRightShift($nonceRnd, $i * 8) & 0xff;\r\n }\r\n for ($i = 0; $i < 4; $i++) {\r\n $counterBlock[$i + 4] = self::unsignedRightShift($nonceSec, $i * 8) & 0xff;\r\n }\r\n\r\n /**\r\n * Transformam din ASCII in caractere\r\n */\r\n $ctrTxt = '';\r\n for ($i = 0; $i < 8; $i++) {\r\n $ctrTxt .= chr($counterBlock[$i]);\r\n }\r\n\r\n /**\r\n * Generam un array din cheia cifrata, pe care-l vom folosi la criptarea textului.\r\n * La fiecare etapa de criptare vom folosi o anumita parte din cheie.\r\n */\r\n $keySchedule = AES::keyExpansion($key);\r\n\r\n $blockCount = ceil(strlen($textToEncrypt) / $blockSize);\r\n $ciphertxt = array();\r\n\r\n for ($b = 0; $b < $blockCount; $b++) {\r\n for ($c = 0; $c < 4; $c++) {\r\n $counterBlock[15 - $c] = self::unsignedRightShift($b, $c * 8) & 0xff;\r\n }\r\n for ($c = 0; $c < 4; $c++) {\r\n $counterBlock[15 - $c - 4] = self::unsignedRightShift($b / 0x100000000, $c * 8) & 0xff;\r\n }\r\n\r\n $cipherCntr = AES::encryptByteArray($counterBlock, $keySchedule);\r\n\r\n $blockLength = $b < $blockCount - 1 ? $blockSize : (strlen($textToEncrypt) - 1) % $blockSize + 1;\r\n $cipherByte = array();\r\n\r\n for ($i = 0; $i < $blockLength; $i++) {\r\n $cipherByte[$i] = $cipherCntr[$i] ^ ord(substr($textToEncrypt, $b * $blockSize + $i, 1));\r\n $cipherByte[$i] = chr($cipherByte[$i]);\r\n }\r\n $ciphertxt[$b] = implode('', $cipherByte);\r\n }\r\n\r\n $ciphertext = $ctrTxt.implode('', $ciphertxt);\r\n $ciphertext = base64_encode($ciphertext);\r\n\r\n return $ciphertext;\r\n }", "function twe_encrypt_password($plain) {\n\n $password=md5($plain);\n\n return $password;\n\n }", "public function encrypt($data) {\n\t\treturn md5(md5($data));\n\t}", "function encrypt($plaintext, $passphrase, $iv) {\n try {\n $padded_str = pad_pkcs5($plaintext);\n $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $passphrase, $padded_str, MCRYPT_MODE_CBC, $iv);\n return $ciphertext;\n } catch (Exception $e) {\n echo \"Encryption exception in encrypt: \" . $e->getMessage() . \"\\n\";\n }\n}", "function pkcs5Pad($text, $blocksize)\n{\n $pad = $blocksize - (strlen($text) % $blocksize);\n return ($text . str_repeat(chr($pad), $pad));\n}", "private function encrypt($data) {\n\t\treturn Authenticator_Crypto::encrypt($data);\n\t}", "function breach_encode($str)\n{\n if (!function_exists(\"mcrypt_create_iv\")) {\n trigger_error(\n \"Required function is missing: mcrypt_create_iv()\",\n E_USER_ERROR\n );\n }\n\n $pad = mcrypt_create_iv(strlen($str), MCRYPT_DEV_URANDOM);\n $encoded = \"\";\n for ($i = 0; $i < strlen($str); $i++) {\n $encoded .= chr(ord($str[$i]) ^ ord($pad[$i]));\n }\n return bin2hex($pad . $encoded);\n}", "function encryptAES($content, $secret){\n return openssl_encrypt($content, \"AES-256-CBC\", $secret);\n}", "function encrypt_password($plain) {\n $password = '';\n\n for ($i=0; $i<10; $i++) {\n $password .= $this->random2();\n }\n\n $salt = substr(md5($password), 0, 2);\n\n $password = md5($salt . $plain) . ':' . $salt;\n\n return $password;\n }", "public static function encrypt($pure_string) {\n return Encryption::encryptWKey($pure_string, Encryption::_Key1());\n }", "function my_simple_crypt($string, $action = 'e')\n{\n $secret_key = 'my_simple_secret_key';\n $secret_iv = 'my_simple_secret_iv';\n\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash('sha256', $secret_key);\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n\n if ($action == 'e') {\n $output = base64_encode(openssl_encrypt($string, $encrypt_method, $key, 0, $iv));\n } else if ($action == 'd') {\n $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);\n }\n\n return $output;\n}", "public static function encryptWKey($pure_string, $encryption_key) {\n $encrypted_string =str_rot13($pure_string);\n $encrypted_string = gzdeflate($encrypted_string);\n $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $encrypted_string = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $encryption_key, utf8_encode($pure_string), MCRYPT_MODE_ECB, $iv);\n return base64_encode($encrypted_string);\n\n }", "public function encrypt($plaintext) {\n\t\t\n\t\t$key = self::PWD; // Password is set above at the Constants\n\t\t$ivlen = openssl_cipher_iv_length($cipher=\"AES-256-CTR\");\n\t\t$iv = openssl_random_pseudo_bytes($ivlen);\n\t\t$ciphertext_raw = openssl_encrypt($plaintext, $cipher, $key, $options=OPENSSL_RAW_DATA, $iv);\n\t\t$hmac = hash_hmac('sha256', $ciphertext_raw, $key, $as_binary=true);\n\t\t$ciphertext = base64_encode($iv.$hmac.$ciphertext_raw );\n\t\n\t\treturn bin2hex($ciphertext);\n\t\n\t}", "public function encryptPass()\n {\n return \"RASAHolaRSSA\";\n }", "protected function encryptValue($value){ \n $cipher = $this->handler->encrypt($value);\n return base64_encode($cipher);\n }", "function fsl_encrypt($string, $key = NULL){\n\n //set key to default key if no key passed to function \n $encryption_key = (empty($key)) ? option('fsl_global_encryption_key') : $key;\n\n // Generate an initialization vector\n // This *MUST* be available for decryption as well\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));\n\n // Create some data to encrypt\n \n // Encrypt $data using aes-256-cbc cipher with the given encryption key and\n // our initialization vector. The 0 gives us the default options, but can\n // be changed to OPENSSL_RAW_DATA or OPENSSL_ZERO_PADDING\n $encrypted = openssl_encrypt($string, 'aes-256-cbc', $encryption_key, 0, $iv);\n\n // If we lose the $iv variable, we can't decrypt this, so:\n // - $encrypted is already base64-encoded from openssl_encrypt\n // - Append a separator that we know won't exist in base64, \":\"\n // - And then append a base64-encoded $iv\n $encrypted = $encrypted . ':' . base64_encode($iv);\n\n return $encrypted;\n}", "function encrypt_password($plain) {\n $password = '';\n\n for ($i = 0; $i < 10; $i++) {\n $password .= $this->rand();\n }\n\n $salt = substr(md5($password), 0, 2);\n\n $password = md5($salt . $plain) . ':' . $salt;\n\n return $password;\n }", "function encryptData($data)\n{\n $cypher = \"aes-256-cbc\";\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($cypher));\n $key = base64_encode(gethostname());\n\n\n\n return openssl_encrypt($data,$cypher,$key,0,$iv);\n}", "function Encrypt($str)\n {\n //$blowfish = new Crypt_Blowfish($this->config->encr_key);\n $retdata = sfm_crypt_encrypt($str,$this->config->encr_key);\n /*$blowfish =& Crypt_Blowfish::factory('ecb');\n $blowfish->setKey($this->config->encr_key);\n\n $encr = $blowfish->encrypt($str);\n $retdata = bin2hex($encr);*/\n return $retdata;\n }", "function encrypt($plaintext)\n {\n switch ($this->encryptionMode) {\n case self::ENCRYPTION_NONE:\n $plaintext = str_split($plaintext, $this->k);\n $ciphertext = '';\n foreach ($plaintext as $m) {\n $ciphertext.= $this->_raw_encrypt($m);\n }\n return $ciphertext;\n case self::ENCRYPTION_PKCS1:\n $length = $this->k - 11;\n if ($length <= 0) {\n return false;\n }\n\n $plaintext = str_split($plaintext, $length);\n $ciphertext = '';\n foreach ($plaintext as $m) {\n $ciphertext.= $this->_rsaes_pkcs1_v1_5_encrypt($m);\n }\n return $ciphertext;\n //case self::ENCRYPTION_OAEP:\n default:\n $length = $this->k - 2 * $this->hLen - 2;\n if ($length <= 0) {\n return false;\n }\n\n $plaintext = str_split($plaintext, $length);\n $ciphertext = '';\n foreach ($plaintext as $m) {\n $ciphertext.= $this->_rsaes_oaep_encrypt($m);\n }\n return $ciphertext;\n }\n }", "function crypt_data($string, $action = 'e') \n{\n $secret_key \t= \"@#@ @@&&*$ bhufjg *@ !@#432 3783\"; // 32bits\n\n $secret_iv \t\t= md5('sA*(DH');\n $secret_iv \t\t= md5($secret_iv);\n\n $output \t\t= false;\n $encrypt_method = \"AES-256-CBC\";\n $key \t\t\t= hash('sha256', $secret_key);\n $iv \t\t\t= substr(hash('sha256', $secret_iv), 0, 16);\n\n \n if ($action == 'e') {\n $output = base64_encode(openssl_encrypt($string, $encrypt_method, $key, 0, $iv));\n } elseif ($action == 'd') {\n $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);\n }\n\n return $output;\n}", "function encryption($s) {\n $string = preg_replace('~\\W~', '', $s);\n $length = strlen($string);\n $sqrt = ceil(sqrt($length));\n\n $arrayOfLetters = str_split($string);\n $countOfRows = floor($length / $sqrt);\n\n if ($sqrt * $countOfRows <= $length) {\n $countOfRows = $sqrt;\n }\n\n $chunk = array_chunk($arrayOfLetters, $countOfRows);\n\n $str = [];\n for ($i = 0; $i < $countOfRows; $i++) {\n foreach ($chunk as $letters) {\n if (isset($letters[$i])) {\n $str[$i] .= $letters[$i];\n }\n }\n }\n\n return implode(' ', $str);\n}", "public static function encrypt($value) {\n $self = self::getInstance();\n $encripted = base64_encode(Security::cipher($value, $self->key));\n return \"U3BhZ2hldHRp.{$encripted}\";\n }", "function encryptData($openssl_data, $openssl_pass, $openssl_iv){\n\t$method = 'AES-256-CBC';\n\n\tif(strlen($openssl_iv) > '128'){\n\t\t$openssl_iv = substr($openssl_iv, 0, 128);\n\t}\n\n\treturn trim(openssl_encrypt($openssl_data, $method, $openssl_pass, FALSE, $openssl_iv));\n}", "function encrypt($string) { \r\n\tglobal $key;\r\n\t$result = Cryptor::Encrypt($string,$key);\r\n\treturn $result;\r\n}", "function my_simple_crypt( $string, $action = 'd') {\n $secret_key = 'my_simple_secret_key';\n $secret_iv = 'my_simple_secret_iv';\n \n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n \n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n }\n \n return $output;\n }", "function aes256Encrypt($plaintext, $password) {\n // hash the key\n $key = pack(\"H*\", substr(hash(\"sha512\", $password), 0, 64));\n\n // generate an initialization vector (IV)\n $ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $iv = mcrypt_create_iv($ivSize, MCRYPT_RAND);\n\n // pad the plaintext\n $blocksize = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $plaintext = pkcs5Pad($plaintext, $blocksize);\n\n // encrypt the plaintext\n $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plaintext, MCRYPT_MODE_CBC, $iv);\n $ciphertext = $iv . $ciphertext;\n return(base64_encode($ciphertext));\n}", "public function encrypt() \r\n {\r\n //TODO: Implement encrypt method\r\n }", "function encryptData($payload, $key) {\r\n \r\n $chiper = \"des-ede3\"; //Algorthim used to encrypt\r\n if((strlen($payload)%8)!=0) {\r\n //Perform right padding\r\n $payload = $this->rightPadZeros($payload);\r\n }\r\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($chiper));\r\n $encrypted = openssl_encrypt($payload, $chiper, $key,OPENSSL_RAW_DATA,$iv);\r\n \r\n $encrypted=unpack('C*', ($encrypted));\r\n $encrypted=$this->byteArray2Hex($encrypted);\r\n return strtoupper($encrypted); \r\n}", "function xor_encrypt($string, $key)\n\t{\n\t\tfor ($a=0; $a < strlen($string); $a++)\n\t\t{\n\t\t\tfor ($b=0; $b < strlen($key); $b++)\n\t\t\t{\n\t\t\t\t$string[$a] = $string[$a]^$key[$b];\n\t\t\t}\n\t\t}\n\t\n\t\treturn $string; \n\t}", "public static function encrypt($string, $isBinary = false) {\n\t\treturn abacaEncrypt ( $string, 'ENCODE', self::$key );\n\t}", "function encrypt($value) {\n\treturn hash('sha512', $value.C_SALT);\n}", "public function Encrypt($input) {\n $text_arr = str_split($input, $this->bit_check); \n //bit_check - jumlah string dari text_arr index terakhir di kurangi 1\n $text_num = $this->bit_check - strlen($text_arr[count($text_arr) - 1]);\n //loops\n for($a = 1; $a < $text_num; $a++){\n //update input dengan menambahkan character specifik dengan integer text_num\n $input = $input .chr($text_num);\n }\n //encrypt dengan Mcrypt\n $chiper = mcrypt_module_open('rijndael-128', '', 'cbc', '');\n mcrypt_generic_init($chiper, $this->key, $this->iv);\n $encrypted_data = mcrypt_generic($chiper, $input);\n mcrypt_generic_deinit($chiper);\n mcrypt_module_close($chiper);\n //return encrypt data with base64\n return base64_encode($encrypted_data);\n }", "function mysql_aes_key($key)\n{\n $bytes = 16;\n $newKey = \\str_repeat(\\chr(0), $bytes);\n $length = \\strlen($key);\n\n for ($i = 0; $i < $length; $i++) {\n $index = $i % $bytes;\n $newKey[$index] = $newKey[$index] ^ $key[$i];\n }\n\n return $newKey;\n}", "function encrypt($_input, $_key='your salt', $_type='mcrypt')\n{\n if (function_exists('mcrypt') && $_type=='mcrypt') {\n\n $td = mcrypt_module_open(MCRYPT_TWOFISH256, '', 'ofb', '');\n $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_BLOWFISH);\n\n mcrypt_generic_init($td, $_key, $iv);\n $encryptedData = mcrypt_generic($td, $_input);\n mcrypt_generic_deinit($td);\n mcrypt_module_close($td);\n\n //else use md5\n } else {\n\n if(version_compare(PHP_VERSION, '5.0.0', '>='))\n $bool = true;\n else $bool = false;\n\n $encryptedKey = md5($_key, $bool) . md5($_input, $bool);\n $encryptedData = md5($encryptedKey, $bool);\n\n }\n\n // return generated password\n // enjoy\n return utf8_encode($encryptedData);\n\n}", "function encrypt($plaintext) {\n $ivsize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC);\n $keysize = mcrypt_get_key_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC);\n $blocksize = mcrypt_get_block_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC);\n //echo \"IV Size: \" . $ivsize . \"\\n\";\n //echo \"Key Size: \" . $keysize . \"\\n\";\n //echo \"Block Size: \" . $blocksize . \"\\n\";\n\n $masterkey = 'masterKeyOfLength29Characters';\n $td = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_CBC, '');\n\n //$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);\n\t $ivbytes = array(72, 163, 99, 62, 219, 111, 163, 114, 15, 47, 65, 99, 231, 108, 110, 87, 72, 163, 99, 62, 219, 111, 163, 114, 15, 47, 65, 99, 231, 108, 110, 87);\n $iv = implode(array_map(\"chr\", $ivbytes));\n\n\t\t//$key = mhash(MHASH_SHA256, $masterkey);\n\t\t//echo \"Key: \" . base64_encode($key) . \"\\n\";\n\t\t \n mcrypt_generic_init($td, $masterkey, $iv);\n //mcrypt_generic_init($td, substr($key, 0, $keysize), $iv);\n //mcrypt_generic_init($td, $key, $iv);\n $crypttext = mcrypt_generic($td, $plaintext);\n mcrypt_generic_deinit($td);\n return base64_encode($iv.$crypttext);\n //return base64_encode($crypttext);\n}", "function encrypt($plaintext)\n {\n $plaintext = strtolower($plaintext);\n $ciphertext = \"\";\n \n for ( $i = 0; $i < strlen($plaintext); $i++ )\n {\n $x = $this->alphabet->indexOf($plaintext[$i]);\n $encodedIndex = mod(($x + $this->shift), $this->alphabet->sizeOf());\n $ciphertext = $ciphertext . ($this->alphabet->get($encodedIndex)[0]);\n }\n return $ciphertext;\n }", "function mc_encrypt($encrypt, $key){\n $encrypt = serialize($encrypt);\n $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC), MCRYPT_DEV_URANDOM);\n $key = pack('H*', $key);\n $mac = hash_hmac('sha256', $encrypt, substr(bin2hex($key), -32));\n $passcrypt = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $encrypt.$mac, MCRYPT_MODE_CBC, $iv);\n $encoded = base64_encode($passcrypt).'|'.base64_encode($iv);\n return $encoded;\n }", "function encryptPassword()\n\t{\n\t\t$userPassword = $_POST['userPassword'];\n\n\t $key = pack('H*', \"bcb04b7e103a05afe34763051cef08bc55abe029fdebae5e1d417e2ffb2a00a3\");\n\t $key_size = strlen($key);\n\n\t $plaintext = $userPassword;\n\n\t $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n\t $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\n\t $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plaintext, MCRYPT_MODE_CBC, $iv);\n\t $ciphertext = $iv . $ciphertext;\n\n\t $userPassword = base64_encode($ciphertext);\n\n\t return $userPassword;\n\t}", "function Base64Encode( $str )\n{ \n return substr(chunk_split(base64_encode( $str ),64,\"\\n\"),0,-1).\"\\n\";\n}", "static public function encrypting($value)\n {\n return Crypt::encryptString($value);\n }", "function encryptValue($val){\n\t\t$num = strlen($val);\n\t\t$numIndex = $num-1;\n\t\t$val1=\"\";\n\t\n\t\t//Reverse the order of characters\n\t\tfor($x=0;$x<strlen($val);$x++){\n\t\t\t$val1.= substr($val,$numIndex,1);\n\t\t\t$numIndex--;\n\t\t}\n\t\n\t\t//Encode the reversed value\n\t\t$val1 = base64_encode($val1);\n\t\treturn $val1;\n\t}", "public static function encode($txt){\n // expand key on same length\n $key = str_repeat(self::$_key, strlen($txt)/strlen(self::$_key) + 1);\n \n // split strings\n $data = str_split($txt);\n $shifts = str_split($key);\n \n // output;\n $output = array();\n \n // shift\n for ($i=0;$i<count($data);$i++){\n $a = ord($data[$i]);\n $b = ord($shifts[$i]);\n $c = 49;\n \n // odd-even switch\n if ($i%2==0){\n $a += $b;\n \n // prevent overflow\n if ($a>255){\n $a -= 255;\n $c = 48; \n }\n }else{\n $a -= $b;\n \n // prevent underflow\n if ($a<0){\n $a = -$a;\n $c = 48; \n }\n }\n \n $output[] = $a;\n $output[] = $c;\n }\n \n // convert array to hex values\n $hex = ''; \n foreach ($output as $el){\n $hex .= str_pad (dechex($el), 2 ,'0', STR_PAD_LEFT);\n }\n \n // return encrypted data\n return $hex;\n }", "protected function createOpenSslEncrypt($username)\n\t{\n\t\t//return string --> 16 letter\n\t\treturn openssl_encrypt($username, $this->openssl_method, $this->openssl_pass, true, $this->openssl_iv);\n\t}", "function doXEncrypt($password){\r\n\t$password = md5($password);\r\n\treturn $password;\r\n}", "function encryptPassword($password) {\n $CI =& get_instance();\n $password_encrypted = \"\";\n $encryption_string = sha1($CI->config->config['encryption_key']);\n if ($encryption_string % 2 == 1) { // we need even number of characters\n $encryption_string .= $encryption_string{0};\n }\n for ($i=0; $i < strlen($password); $i++) { // encrypts one character - two bytes at once\n $password_encrypted .= sprintf(\"%02X\", hexdec(substr($encryption_string, 2*$i % strlen($encryption_string), 2)) ^ ord($password{$i}));\n }\n return $password_encrypted;\n }", "public function encryptWithSecret(string $data, ?string &$inputKey = \"\", bool $keyIsHex = true): string\n {\n try {\n if ($data === '') {\n throw new InvalidArgumentException('Data to encrypt cannot be empty.');\n }\n if ($inputKey === null || $inputKey === '') {\n $inputKey = sodium_bin2hex(sodium_crypto_secretbox_keygen());\n $keyIsHex = true;\n }\n\n $key = $inputKey;\n if ($keyIsHex) {\n $key = sodium_hex2bin($inputKey);\n }\n\n if (strlen($key) < SODIUM_CRYPTO_SECRETBOX_KEYBYTES) {\n $key = sodium_crypto_generichash($key, \"\", 32);\n }\n\n if (strlen($key) !== SODIUM_CRYPTO_SECRETBOX_KEYBYTES) {\n throw new InvalidArgumentException('Key must be 32 bytes long');\n }\n $nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);\n $encrypted = sodium_crypto_secretbox($data, $nonce, $key);\n $encrypted = sodium_bin2base64($nonce . $encrypted, SODIUM_BASE64_VARIANT_ORIGINAL);\n sodium_memzero($data);\n sodium_memzero($key);\n sodium_memzero($nonce);\n return $encrypted;\n } catch (SodiumException $e) {\n throw new RuntimeException('Could not encrypt data', 0, $e);\n } catch (InvalidArgumentException $e) {\n throw $e;\n } catch (Exception $e) {\n throw new RuntimeException('Unable to generate random bytes', 0, $e);\n }\n }", "function rc4($key, $data)\n {\n // $key = \"this is a secret key\";\n $input = $data;\n\n $encrypted_data = mcrypt_ecb (MCRYPT_3DES, $key, $input, MCRYPT_ENCRYPT);\n\n return $encrypted_data;\n }", "private function aes128WithFirst16Char($adminPass, $secretAccessKey)\n {\n $adminPass = $this->pkcs5Pad($adminPass);\n $secretAccessKey = substr($secretAccessKey, 0, 16);\n $crypted = openssl_encrypt($adminPass, 'AES-128-ECB', $secretAccessKey, OPENSSL_RAW_DATA);\n return bin2hex(substr($crypted, 0, 16));\n }" ]
[ "0.72801286", "0.7185777", "0.7122398", "0.7063307", "0.7053885", "0.7015348", "0.6920013", "0.67766416", "0.6775119", "0.67453825", "0.6743714", "0.674079", "0.6725868", "0.6708725", "0.6704437", "0.66854584", "0.6676695", "0.6670882", "0.6670465", "0.66700935", "0.66666996", "0.666534", "0.6649524", "0.6644573", "0.66417426", "0.66206217", "0.6607316", "0.65837884", "0.6581653", "0.65472335", "0.6522311", "0.6519649", "0.64922965", "0.64922416", "0.64840454", "0.64835805", "0.64802545", "0.6479815", "0.6475501", "0.6459964", "0.6443678", "0.64254314", "0.6411977", "0.64053035", "0.63971907", "0.63750017", "0.63617545", "0.63455665", "0.63250315", "0.63222575", "0.63139457", "0.6310544", "0.63017225", "0.62982917", "0.62915295", "0.6289307", "0.6283417", "0.6265937", "0.6254882", "0.6239734", "0.62385154", "0.62182635", "0.6208094", "0.62073046", "0.6185635", "0.6182951", "0.6182205", "0.61724204", "0.61702013", "0.6154862", "0.6152351", "0.6149642", "0.61333984", "0.61271673", "0.61188936", "0.6110733", "0.61092025", "0.6098597", "0.60922176", "0.606908", "0.60504264", "0.6045785", "0.6040623", "0.60355383", "0.6029347", "0.60182923", "0.5999624", "0.59991395", "0.59826314", "0.5979471", "0.59689564", "0.5964357", "0.5946878", "0.5939947", "0.59393984", "0.593883", "0.5936237", "0.5935658", "0.5935218", "0.593393", "0.5933713" ]
0.0
-1
Decrypt a 4 bytes long ASCII string
public function dec($data) { return $this->_simplify('decrypt', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function decrypt();", "function decrypt($string) {\n\t\t\t// Apply base64 decoding if necessary\n\t\t\tif($this->base64) $string = base64_decode($string);\n\t\t\t\n\t\t\t// Extract encrypted IV from input\n\t\t\t$tmp_iv = substr($string,0,$this->hash_length);\n\t\t\t\n\t\t\t// Extract encrypted message from input\n\t\t\t$string = substr($string,$this->hash_length,strlen($string) - $this->hash_length);\n\t\t\t$iv = $out = '';\n\t\t\t\n\t\t\t// Regenerate IV by xor-ing encrypted IV from block 1 and $this->hashed_key\n\t\t\t// Mathematics: (IV XOR KeY) XOR Key = IV\n\t\t\tfor($c=0;$c < $this->hash_length;$c++) \n\t\t\t{\n\t\t\t\t$iv .= chr(ord($tmp_iv[$c]) ^ ord($this->hash_key[$c]));\n\t\t\t}\n\t\t\t// Use IV as key for decrypting the first block cyphertext\n\t\t\t$key = $iv;\n\t\t\t$c = 0;\n\t\t\t\n\t\t\t// Loop through the whole input string\n\t\t\twhile($c < strlen($string)) {\n\t\t\t\t// If we have used all characters of the current key we switch to a new one\n\t\t\t\tif(($c != 0) and ($c % $this->hash_length == 0)) {\n\t\t\t\t\t// New key is the hash of current key and last block of plaintext\n\t\t\t\t\t$key = $this->_hash($key . substr($out,$c - $this->hash_length,$this->hash_length));\n\t\t\t\t}\n\t\t\t\t// Generate output by xor-ing input and key character for character\n\t\t\t\t$out .= chr(ord($key[$c % $this->hash_length]) ^ ord($string[$c]));\n\t\t\t\t$c++;\n\t\t\t}\n\t\t\treturn $out;\n\t\t}", "function DecodeMcrypt( $string )\n\t{\n\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);\n\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t\t$result = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->key, $string, MCRYPT_MODE_ECB, $iv);\n\t\t$result = rtrim($result, \"\\0\");\n\t\treturn $result;\n\t}", "function decrypt($string, $key='humanbody_messages_2') {\r\n $result = '';\r\n $string = base64_decode($string);\r\n for($i=0; $i<strlen($string); $i++) {\r\n $char = substr($string, $i, 1);\r\n $keychar = substr($key, ($i % strlen($key))-1, 1);\r\n $char = chr(ord($char)-ord($keychar));\r\n $result.=$char;\r\n }\r\n return $result;\r\n }", "public function decrypt($string)\n\t{\n\t\tglobal $mybb;\n\n\t\t$key = $mybb->config['pluginuploader_ftp_key'];\n\n\t\treturn rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($string), MCRYPT_MODE_CBC, md5(md5($key))), \"\\0\");\n\t}", "function decrypt($string, $key)\n{ \n\t$result = '';\n\t$string = base64_decode($string);\n\tfor($i=0; $i<strlen($string); $i++)\n\t{\n\t\t$char = substr($string, $i, 1);\n\t\t$keychar = substr($key, ($i % strlen($key))-1, 1);\n\t\t$char = chr(ord($char)-ord($keychar));\n\t\t$result.=$char;\n\t}\n\treturn $result;\n}", "public function decrypt($string)\n {\n $key = $this->secretKey;\n //using hexadecimal\n $key = pack('H*', (string)$key);\n\n $cipherText = self::decode($string);\n\n $ivSize = self::getIvSize();\n //retrieves the IV, iv_size should be created using mcrypt_get_iv_size()\n $iv = substr($cipherText, 0, $ivSize);\n\n //retrieves the cipher text (everything except the $iv_size in the front)\n $cipherText = substr($cipherText, $ivSize);\n $decrypted = self::getPlainText($cipherText, $key, $iv);\n $decrypted = rtrim($decrypted, \"\\0\\4\");\n\n return $decrypted;\n }", "function md5_decrypt( $enc_text, $password, $iv_len = 16 )\n\t{\n \t$enc_text = base64_decode( $enc_text );\n \t$n = strlen( $enc_text );\n \t$i = $iv_len;\n \t$plain_text = '';\n \t$iv = substr( $password ^ substr( $enc_text, 0, $iv_len ), 0, 512 );\n \twhile ( $i < $n )\n \t{\n \t$block = substr( $enc_text, $i, 16 );\n \t$plain_text .= $block ^ pack( 'H*', md5( $iv ) );\n \t$iv = substr( $block . $iv, 0, 512 ) ^ $password;\n \t$i += 16;\n \t}\n \treturn preg_replace( '/\\\\x13\\\\x00*$/', '', $plain_text );\n\t}", "public static function decryptString($key, $string)\n {\n if (strlen($key) < 4)\n {\n throw new \\Exception('Please provide a key that is more than 3 characters');\n }\n $ciphertext_dec = base64_decode($string);\n $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $iv_dec = substr($ciphertext_dec, 0, $iv_size);\n $ciphertext_dec = substr($ciphertext_dec, $iv_size);\n $plaintext_dec = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, self::pad_key($key),\n $ciphertext_dec, MCRYPT_MODE_CBC, $iv_dec);\n\n return $plaintext_dec;\n }", "public static function decrypt($string)\n {\n /*\n * ------------------------------------------------\n * ALGORITHMS\n * ------------------------------------------------\n * MCRYPT_3DES MCRYPT_PANAMA\n * MCRYPT_ARCFOUR MCRYPT_RAND\n * MCRYPT_ARCFOUR_IV MCRYPT_RC2\n * MCRYPT_BLOWFISH MCRYPT_RC6\n * MCRYPT_BLOWFISH_COMPAT MCRYPT_RIJNDAEL_128\n * MCRYPT_CAST_128 MCRYPT_RIJNDAEL_192\n * MCRYPT_CAST_256 MCRYPT_RIJNDAEL_256\n * MCRYPT_CRYPT MCRYPT_SAFER128\n * MCRYPT_DECRYPT MCRYPT_SAFER64\n * MCRYPT_DES MCRYPT_SAFERPLUS\n * MCRYPT_DEV_RANDOM MCRYPT_SERPENT\n * MCRYPT_DEV_URANDOM MCRYPT_SKIPJACK\n * MCRYPT_ENCRYPT MCRYPT_THREEWAY\n * MCRYPT_ENIGNA MCRYPT_TRIPLEDES\n * MCRYPT_GOST MCRYPT_TWOFISH\n * MCRYPT_IDEA MCRYPT_WAKE\n * MCRYPT_LOKI97 MCRYPT_XTEA\n * MCRYPT_MARS\n * ------------------------------------------------\n * MODES\n * ------------------------------------------------\n * MCRYPT_MODE_CBC MCRYPT_MODE_NOFB\n * MCRYPT_MODE_CFB MCRYPT_MODE_OFB\n * MCRYPT_MODE_ECB MCRYPT_MODE_STREAM\n */\n \n $algorithm = MCRYPT_RIJNDAEL_256;\n $mode = MCRYPT_MODE_ECB;\n $iv_size = mcrypt_get_iv_size ($algorithm, $mode );\n\t$iv = mcrypt_create_iv ( $iv_size, MCRYPT_RAND );\n\t$key = \"Curso-Yii2-Capa8tv\";\n\t\t\t\t\n\t$encrypt = base64_decode ( $string );\n\t\t\t\t\n\treturn MCRYPT_DECRYPT ( $algorithm, $key, $encrypt, $mode, $iv );\n }", "abstract public function decrypt($data);", "function MyJamiaDecrypt($str) {\n\n\t\t// Store the cipher method \n\t\t$ciphering = \"AES-128-CTR\"; \n \n\t\t// Use OpenSSl Encryption method \n\t\t$iv_length = openssl_cipher_iv_length($ciphering); \n\t\t$options = 0; \n\t\t\t\t\n\t\t// Non-NULL Initialization Vector for decryption \n\t\t$decryption_iv = '1234567891011121'; \n\t\t \n\t\t// Store the decryption key \n\t\t$decryption_key = \"MyJamiaEncryptionString\"; \n\t\t \n\t\t// Use openssl_decrypt() function to decrypt the data \n\t\treturn openssl_decrypt ($str, $ciphering, \n\t\t $decryption_key, $options, $decryption_iv); \t \n\t}", "protected function _decrypt() {}", "protected function _decrypt() {}", "public function decrypt(): string\n {\n $decrypted = openssl_decrypt(\n $this->encryptedString,\n $this->encryptionMethod,\n $this->salt,\n 0,\n $this->getInitializationVector(),\n );\n\n assert(is_string($decrypted)); // Make phpstan happy\n\n return $decrypted;\n }", "public static function decrypt(string $encyptedInput):string\n\t{\n list($encrypted_data, $iv) = explode('::', base64_decode($encyptedInput), 2);\n return openssl_decrypt($encrypted_data, 'aes-256-cbc', self::$securekey, 0, $iv);\n }", "protected static function decryption($string){\n $key=hash('sha256', SECRET_KEY);\n $iv=substr(hash('sha256', SECRET_IV), 0, 16);\n $output=openssl_decrypt(base64_decode($string), METHOD, $key, 0, $iv);\n return $output;\n }", "public static function decrypt($string) {\n\t\treturn abacaEncrypt ( $string, 'DECODE', self::$key );\n\t}", "function decrypter($data){\n\t$a = base64_decode($data);\n\treturn $a;\n}", "private function decrypt($string) {\r\n if ($this->settings[\"encryption\"]) {\r\n $string = base64_decode($string);\r\n return str_replace($this->settings[\"salt\"], \"\", $string);\r\n }\r\n return $string;\r\n }", "static public function decrypt($data,$key) {\r\n $iv= substr($data, 0,16); \r\n $data=substr($data,16);\r\n // 128 is blocksize, not keysize!\r\n $out=mcrypt_decrypt(MCRYPT_RIJNDAEL_128,$key,$data,MCRYPT_MODE_CBC, $iv);\r\n $padlen=ord(substr($out,-1));\r\n return substr($out,0, strlen($out)-$padlen);\r\n }", "function Decrypt($string, $key=''){\r\n\t\tglobal $global_config;\r\n\t\t\r\n\t\tif($key == '')\r\n\t\t\t$key = $global_config[\"en_decrypt_keys\"];\r\n\t\t$result = '';\r\n\t\tfor($i=1; $i<=strlen($string); $i++){\r\n\t\t\t$char = substr($string, $i-1, 1);\r\n\t\t\t$keychar = substr($key, ($i % strlen($key))-1, 1);\r\n\t\t\t$char = chr(ord($char)-ord($keychar));\r\n\t\t\t$result.=$char;\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "function decrypt($encrypted_string, $decryption_key){\r\n $ciphering = \"AES-128-CTR\";\r\n $options = 0;\r\n $decryption_iv = '1234567891011121';\r\n $string = openssl_decrypt ($encrypted_string, $ciphering, $decryption_key, $options, $decryption_iv);\r\n return $string;\r\n}", "public function decryptString($data, $param = null);", "function fsl_decrypt($string, $key = NULL){\n\n //set key to default key if no key passed to function \n $encryption_key = (empty($key)) ? option('fsl_global_encryption_key') : $key;\n\n // To decrypt, separate the encrypted data from the initialization vector ($iv).\n $parts = explode(':', $string);\n\n // Don't forget to base64-decode the $iv before feeding it back to\n //openssl_decrypt\n $decrypted = openssl_decrypt($parts[0], 'aes-256-cbc', $encryption_key, 0, base64_decode($parts[1]));\n return $decrypted;\n}", "public static function decrypt($data)\r\n {\r\n return openssl_decrypt(\r\n base64_decode($data),\r\n self::OPENSSL_CIPHER_NAME,\r\n self::ENCRYPTION_KEY,\r\n OPENSSL_RAW_DATA,\r\n self::ENCRYPTION_IV\r\n );\r\n }", "function ehash_decrypt($encrypted_string, $encryption_key) {\n \n\tif (empty($encrypted_string)) {\n return '';\n }\n $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $encrypted_string = base64_decode($encrypted_string);\n $decrypted_string = mcrypt_decrypt(MCRYPT_BLOWFISH, $encryption_key, $encrypted_string, MCRYPT_MODE_ECB, $iv);\n \n return $decrypted_string;\n}", "function simple_decrypt($text, $salt = \"VUHuiU6b8jgieEG0p79Yx9T4G8Zqp880\") {\n return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $salt, base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)));\n}", "public static function decrypt($encrypted_string_b64) {\n return Encryption::decryptWKey($encrypted_string_b64, Encryption::_Key1());\n }", "function BASE64URL_symmetric_decipher($dato, $key, $vector)\n\t{\n $tamVI = strlen($vector);\n\n if($tamVI != 16){\n trigger_error(\"Initialization Vector must have 16 hexadecimal characters\", E_USER_ERROR);\n return null;\n }\n if(strlen($key) != 16){\n trigger_error(\"Simetric Key doesn't have length of 16\", E_USER_ERROR);\n\n return null;\n }\n\n $binvi = pack(\"H*\", $vector);\n\n if($binvi == null){\n trigger_error(\"Initialization Vector is not valid, must contain only hexadecimal characters\", E_USER_ERROR);\n\n return null;\n\n }\n $key .= substr($key,0,8); // agrega los primeros 8 bytes al final\n\n $pas = preg_replace('/_/','/',$dato);\n $pas = preg_replace('/-/','+',$pas);\n $pas = preg_replace('/\\./','=',$pas);\n\n $crypttext = base64_decode($pas);\n\n $crypttext2 = mcrypt_decrypt(MCRYPT_3DES, $key, $crypttext, MCRYPT_MODE_CBC, $binvi);\n\n\n $block = mcrypt_get_block_size('tripledes', 'cbc');\n $packing = ord($crypttext2{strlen($crypttext2) - 1});\n if($packing and ($packing < $block))\n {\n for($P = strlen($crypttext2) - 1; $P >= strlen($crypttext2) - $packing; $P--)\n {\n if(ord($crypttext2{$P}) != $packing)\n {\n $packing = 0;\n }\n }\n }\n\n $crypttext2 = substr($crypttext2,0,strlen($crypttext2) - $packing);\n return $crypttext2;\n\t}", "public static function decrypt($string) {\n $secret_key = Config::get('constants.DEFAULT_DATA.ENC_SECRET');\n $output = false;\n\n $encrypt_method = \"AES-256-CBC\";\n $secret_iv = 'This is my secret iv';\n\n // hash\n $key = hash('sha256', $secret_key);\n\n // iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n return openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);\n }", "function decrypt_string($iv_with_string, $key=KEY) {\n $iv = substr($iv_with_string, 0, cipher_iv_size());\n $encrypted = substr($iv_with_string, cipher_iv_size());\n // Needs a key of length 16, 24, or 32\n $key = str_pad($key, 32, '*');\n\n // Decrypt\n return mcrypt_decrypt(CIPHER_TYPE, $key, $encrypted, CIPHER_MODE, $iv);\n }", "public static function des_encrypt( $string )\n {\n $key = array();\n $tmp = array();\n $length = strlen( $string );\n\n for( $i = 0; $i < 7; ++$i ) $tmp[] = $i < $length ? ord( $string[$i] ) : 0;\n\n $key[] = $tmp[0] & 254;\n $key[] = ( $tmp[0] << 7 ) | ( $tmp[1] >> 1 );\n $key[] = ( $tmp[1] << 6 ) | ( $tmp[2] >> 2 );\n $key[] = ( $tmp[2] << 5 ) | ( $tmp[3] >> 3 );\n $key[] = ( $tmp[3] << 4 ) | ( $tmp[4] >> 4 );\n $key[] = ( $tmp[4] << 3 ) | ( $tmp[5] >> 5 );\n $key[] = ( $tmp[5] << 2 ) | ( $tmp[6] >> 6 );\n $key[] = $tmp[6] << 1;\n \n $key0 = '';\n \n foreach( $key as $k ) $key0 .= chr( $k );\n $crypt = mcrypt_encrypt(\n MCRYPT_DES, $key0, 'KGS!@#$%', MCRYPT_MODE_ECB,\n mcrypt_create_iv( mcrypt_get_iv_size( MCRYPT_DES, MCRYPT_MODE_ECB ), MCRYPT_RAND ) );\n\n return bin2hex( $crypt );\n }", "function decrypt($cypher){\n\t\t$cypher =str_replace('%20','+',str_replace(' ','+',$cypher));\t\t\t\n\t\treturn trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->key, base64_decode($cypher), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)));\n }", "function decryptData($data, $key) {\r\n $chiper = \"des-ede3\"; //Algorthim used to decrypt\r\n $data = $this->hex2ByteArray($data);\r\n $data = $this->byteArray2String($data);\r\n $data = base64_encode($data);\r\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($chiper));\r\n $decrypted = openssl_decrypt($data, $chiper, $key, OPENSSL_ZERO_PADDING,$iv);\r\n return $decrypted;\r\n}", "protected function _decrypt()\n {\n switch ($this->_cypherUsed) {\n case self::CYPHER_BASIC:\n //break ommited on purpose\n\n default:\n $result = '';\n $string = base64_decode($this->_encryptedText);\n for ($i = 0; $i < strlen($string); $i++) {\n $char = substr($string, $i, 1);\n $keychar = substr($this->_keyString, ($i % strlen($this->_keyString)) - 1, 1);\n $char = chr(ord($char) - ord($keychar));\n $result .= $char;\n }\n $this->_plainText = $result;\n break;\n }\n }", "function cs_encrypt_decrypt($string)\r\n{\r\n\t//Function : encrypt/decrypt a string message v.1.0 without a known key\r\n\t//Author : Aitor Solozabal Merino (spain)\r\n\t//Email : [email protected]\r\n\t//Date : 01-04-2005\r\n $strlen = strlen($string);\r\n $strencrypted = '';\r\n for ($pos = 0; $pos < $strlen ; $pos++)\r\n {\r\n\t\t// long code of the function to explain the algoritm\r\n\t\t// this function can be tailored by the programmer modifyng the formula\r\n\t\t// to calculate the key to use for every character in the string.\r\n\t\t$usekey = (($strlen+$pos)+1); // (+5 or *3 or ^2)\r\n\t\t// after that we need a module division because can´t be greater than 255\r\n\t\t$usekey = (255+$usekey) % 255;\r\n\t\t$encryptbyte = substr($string, $pos, 1);\r\n\t\t$asciibyte = ord($encryptbyte);\r\n\t\t$xorbyte = $asciibyte ^ $usekey; // xor operation\r\n\t\t$encrypted = chr($xorbyte);\r\n\t\t$strencrypted .= $encrypted;\r\n\t\t \r\n\t\t//short code of the function once explained\r\n\t\t// $str_encrypted_message .= chr((ord(substr($str_message, $position, 1))) ^ ((255+(($len_str_message+$position)+1)) % 255));\r\n\t}\r\n\treturn $strencrypted;\r\n}", "function rc4($data, $pwd)\n{\n $cipher = '';\n $key[] = \"\";\n $box[] = \"\";\n $pwd_length = strlen($pwd);\n $data_length = strlen($data);\n for ($i = 0; $i < 256; $i++) {\n $key[$i] = ord($pwd[$i % $pwd_length]);\n $box[$i] = $i;\n }\n for ($j = $i = 0; $i < 256; $i++) {\n $j = ($j + $box[$i] + $key[$i]) % 256;\n $tmp = $box[$i];\n $box[$i] = $box[$j];\n $box[$j] = $tmp;\n }\n for ($a = $j = $i = 0; $i < $data_length; $i++) {\n $a = ($a + 1) % 256;\n $j = ($j + $box[$a]) % 256;\n $tmp = $box[$a];\n $box[$a] = $box[$j];\n $box[$j] = $tmp;\n $k = $box[(($box[$a] + $box[$j]) % 256)];\n $cipher .= chr(ord($data[$i]) ^ $k);\n echo \"code:\" . ord($data[$i]) . \"\\tk:$k\". PHP_EOL;\n }\n return $cipher;\n}", "function m_decrypt($encrypted_string, $encryption_key) {\n $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $decrypted_string = mcrypt_decrypt(MCRYPT_BLOWFISH, $encryption_key, $encrypted_string, MCRYPT_MODE_ECB, $iv);\n return $decrypted_string;\n}", "public function decrypt($data)\n {\n // Remove the base64 encoding from our key\n $encryption_key = base64_decode($this->key);\n // To decrypt, split the encrypted data from our IV - our unique separator used was \"::\"\n list($encrypted_data, $iv) = explode('::', base64_decode($data), 2);\n return openssl_decrypt($encrypted_data, 'aes-256-cbc', $encryption_key,\n 0, $iv);\n }", "protected function decrypt($data) {\n if ($this->hash_passwords) {\n return rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($this->secret), base64_decode($data), MCRYPT_MODE_CBC, md5(md5($this->secret))), \"\\0\");\n } else {\n return $data;\n }\n }", "function decryptData($openssl_data, $openssl_pass, $openssl_iv){\n\t$method = 'AES-256-CBC';\n\n\tif(strlen($openssl_iv) > '128'){\n\t\t$openssl_iv = substr($openssl_iv, 0, 128);\n\t}\n\n\treturn trim(openssl_decrypt($openssl_data, $method, $openssl_pass, FALSE, $openssl_iv));\n}", "static function decrypt($encrypted){\n # Separate the encrypted data from the initialization vector ($iv)\n $data = explode('~~~', base64_decode($encrypted));\n # Decrypt the data\n if(isset($data[1])){\n $decryptedMessage = openssl_decrypt($data[0], \"AES-256-CBC\", self::getEncryptKey(), 0, $data[1]);\n return $decryptedMessage;\n } else {\n return $encrypted;\n }\n }", "function decrypt($ciphertext)\r\n {\r\n $this->_setup();\r\n // we pad with chr(0) since that's what mcrypt_generic does. to quote from http://php.net/function.mcrypt-generic :\r\n // \"The data is padded with \"\\0\" to make sure the length of the data is n * blocksize.\"\r\n $ciphertext = str_pad($ciphertext, (strlen($ciphertext) + $this->block_size - 1) % $this->block_size, chr(0));\r\n\r\n $plaintext = '';\r\n switch ($this->mode) {\r\n case CRYPT_RIJNDAEL_MODE_ECB:\r\n for ($i = 0; $i < strlen($ciphertext); $i+=$this->block_size) {\r\n $plaintext.= $this->_decryptBlock(substr($ciphertext, $i, $this->block_size));\r\n }\r\n break;\r\n case CRYPT_RIJNDAEL_MODE_CBC:\r\n $xor = $this->decryptIV;\r\n for ($i = 0; $i < strlen($ciphertext); $i+=$this->block_size) {\r\n $block = substr($ciphertext, $i, $this->block_size);\r\n $plaintext.= $this->_decryptBlock($block) ^ $xor;\r\n $xor = $block;\r\n }\r\n if ($this->continuousBuffer) {\r\n $this->decryptIV = $xor;\r\n }\r\n }\r\n\r\n return $this->_unpad($plaintext);\r\n }", "function decryptValue($dval){\n\t\n\t\t//Decode value\n\t\t$dval = base64_decode($dval);\n\t\n\t\t$dnum = strlen($dval);\n\t\t$dnumIndex1 = $dnum-1;\n\t\t$dval1 = \"\";\n\t\n\t\t//Reverse the order of characters\n\t\tfor($x=0;$x<strlen($dval);$x++){\n\t\t\t$dval1.= substr($dval,$dnumIndex1,1);\n\t\t\t$dnumIndex1--;\n\t\t}\n\t\treturn $dval1;\n\t}", "public static function decrypt($value) {\n $self = self::getInstance();\n $prefix = strpos($value, \"U3BhZ2hldHRp.\");\n if($prefix !== false):\n $encrypted = base64_decode(substr($value, $prefix + 13));\n return Security::cipher($encrypted, $self->key);\n endif;\n return false;\n }", "function decrypt_value($dvalue)\n{\n\t#Decode value\n\t$dvalue = base64_decode($dvalue);\n\n\t$dnum = strlen($dvalue);\n\t$dnumIndex = $dnum-1;\n\t$newDvalue = \"\";\n\n\t#Reverse the order of characters\n\tfor($x=0;$x<strlen($dvalue);$x++){\n\t\t$newDvalue .= substr($dvalue,$dnumIndex,1);\n\t\t$dnumIndex--;\n\t}\n\treturn $newDvalue;\n}", "public function decrypt(string $data) : string|bool\n {\n $json = Jso::hay(base64_decode($data))->decode(true);\n\n if (! Jso::valid() || !$this->validate((array)$json)) {\n throw new DecrypterException('Could not validate the decrypted data pack');\n }\n\n $iv = base64_decode($json['iv']);\n $encrypted = base64_decode($json['data']);\n $decrypted = sodium_crypto_secretbox_open($encrypted, $iv, $this->appKey);\n\n if (! $decrypted) {\n throw new DecrypterException('Could not decrypt the requested data');\n }\n\n sodium_memzero($encrypted);\n return $decrypted;\n }", "public static function aes128Decrypt($key, $data) {}", "public function testUnicodeDataEncryptionAndDataDecryption()\n {\n $unicodeData = \"яJx 3!Й$\\v@UdrЯЗЮ\"; // length => NativeRc4::KEY_SIZE\n $randomKey = random_bytes(NativeRc4::KEY_SIZE);\n\n $encryptedData = NativeRc4::encryptData($randomKey, $unicodeData);\n $decryptedData = NativeRc4::decryptData($randomKey, $encryptedData);\n\n $this->assertEquals($unicodeData, $decryptedData);\n\n if (in_array(strtolower(Rc4::ALGORITHM_NAME), openssl_get_cipher_methods(), true)) {\n $this->assertEquals(\n $unicodeData,\n openssl_decrypt($encryptedData, 'RC4', $randomKey, OPENSSL_RAW_DATA, '')\n );\n }\n }", "function decrypt($encrypted_string, $encryption_key) {\n\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t\t$decrypted_string = mcrypt_decrypt(MCRYPT_BLOWFISH, $encryption_key, $encrypted_string, MCRYPT_MODE_ECB, $iv);\n\t\treturn $decrypted_string;\n\t}", "function decrypt($string, $key = 'mykey', $secret = 'SecretKey', $method = 'AES-256-CBC') {\n // hash\n $key = hash('sha256', $key);\n // create iv - encrypt method AES-256-CBC expects 16 bytes\n $iv = substr(hash('sha256', $secret), 0, 16);\n // decode\n $string = base64_decode($string);\n // decrypt\n return openssl_decrypt($string, $method, $key, 0, $iv);\n }", "function decrypt( $crypttext )\n\t{\n\t\t$priv_key = $this->RsaPrivateKey;\n\t\t$tt = explode( \":::\", $crypttext );\n\t\t$cnt = count( $tt );\n\t\t$i = 0;\n\t\t$str = '';\n\t\twhile( $i < $cnt )\n\t\t{\n\t\t\topenssl_private_decrypt( $tt[$i], $str1, $priv_key );\n\t\t\t$str .= $str1;\n\t\t\t$i++;\n\t\t}\n\t\treturn $str;\n\t}", "function aesdecrypt($encrypted_chaine)\n {\n $key_password = \"la clé\";\n $decrypted_chaine = openssl_decrypt($encrypted_chaine, \"AES-128-ECB\" ,$key_password);\n var_dump($encrypted_chaine);\n \n }", "function decrypt($encrypted_string, $encryption_key) {\n $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n $decrypted_string = mcrypt_decrypt(MCRYPT_BLOWFISH, $encryption_key, $encrypted_string, MCRYPT_MODE_ECB, $iv);\n return $decrypted_string;\n }", "function cryptPasswordDeCrypt( $cifer, $key )\r\n{\r\n\treturn base64_decode( $cifer );\r\n}", "function descifrar($datos, $llave) {\n $clave_cifrado = base64_decode($llave);\n // Para poder descifrar debemos separar los datos de nuestra cdena del IV, nuestro separador es (::)\n list($cifrado, $iv) = explode('::', base64_decode($datos), 2);\n //Por ultimo, se descifra con la llave y el IV obtenido\n return openssl_decrypt($cifrado, 'aes-256-cbc', $clave_cifrado, 0, $iv);\n}", "public function decryptString($payload)\n {\n return $this->decrypt($payload, false);\n }", "function new_decrypt($data, $key) {\n if(empty($key)){\n $key = $encryption_key;\n }\n // Remove the base64 encoding from our key\n $encryption_key = base64_decode($key);\n // To decrypt, split the encrypted data from our IV - our unique separator used was \"::\"\n list($encrypted_data, $iv) = explode('::', base64_decode($data), 2);\n return openssl_decrypt($encrypted_data, 'aes-256-cbc', $encryption_key, 0, $iv);\n}", "public static function aes256Decrypt($key, $data) {}", "public function decrypt($cypher){\n\t\t$cypher = str_replace('%20','+',str_replace(' ','+',$cypher));\t\t\t\n\t\treturn trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->key, base64_decode($cypher), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)));\n }", "public function decrypt($text)\n\t{\n\t\t// check that an iv is set, if required by the mode\n\t\t$this->mode->checkIV();\n\n\t\t// the decryption is done inside the mode\n\t\t$this->mode->decrypt($text);\n\t\treturn $text;\n\t}", "function decrypt( $input,$securekey ) {\n\n \t\t// remove the first char which is @ to flag this is AES encrypted\n \t$input = substr($input,1);\n\n \t// HEX decoding\n \t$input = pack('H*', $input);\n\n \treturn mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $securekey, $input, MCRYPT_MODE_CBC, $securekey);\n }", "function descifrar_cadena(string $cadena, string $llave)\n{\n\t$componentes = explode('::', base64_decode($cadena));\n\t$cifrado = $componentes[0];\n\t$iv = $componentes[1];\n\n\t$descifrado = openssl_decrypt(\n\t\t$cifrado,\n\t\tMETODO,\n\t\t$llave,\n\t\t0,\n\t\t$iv\n\t);\n\n\treturn $descifrado;\n}", "public function decrypt3DES($text, $key) {\n $key = base64_decode($key);\n $str = $this->hex2bin($text);\n $size = mcrypt_get_iv_size(MCRYPT_3DES, MCRYPT_MODE_ECB);\n $iv = mcrypt_create_iv($size, MCRYPT_RAND);\n $decrypted = mcrypt_decrypt(MCRYPT_3DES, $key, $str, MCRYPT_MODE_ECB, $iv);\n $info = rtrim($this->pkcs5_unpad($decrypted));\n\t\t//log_message('error', 'data decrypt: ' . print_r($info, true));\n return $info;\n }", "function aes256Decrypt($ciphertext, $password) {\n // hash the key\n $key = pack(\"H*\", substr(hash(\"sha512\", $password), 0, 64));\n\n // divide the initialization vector and encrypted data\n $ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $rawBlock = base64_decode($ciphertext);\n $rawIv = substr($rawBlock, 0, $ivSize);\n $rawCiphertext = substr($rawBlock, $ivSize);\n\n // unpad the plaintext before returning it\n try {\n $plaintext = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $rawCiphertext, MCRYPT_MODE_CBC, $rawIv);\n $plaintext = pkcs5Unpad($plaintext);\n } catch(InvalidArgumentException $invalidArgument) {\n throw(new InvalidArgumentException($invalidArgument->getMessage(), 0, $invalidArgument));\n }\n return($plaintext);\n}", "public function decrypt($content) {\n // Decode base64 string\n $content = base64_decode($content);\n // Create the initialization vector for added security.\n $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND);\n // Decrypt $string\n $decryptedContent = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->_getSecretKey(), $content, MCRYPT_MODE_ECB, $iv);\n // Decode base64 string\n $decryptedContent = base64_decode($decryptedContent);\n \n return $decryptedContent;\n }", "private function decryptCipherTextEncryptionKey()\n {\n $result = $this->getAws()->createKms()->decrypt([\n 'CiphertextBlob' => base64_decode($this->getProtectedHeader(self::KEY_CIPHERTEXT_HEADER_NAME))\n ]);\n return $result['Plaintext'];\n }", "public function decrypt_string($input) {\n\n \n\n //echo \"Before Decrypted Text = $input<br>\";\n\n $input = $this->encrypt_decrypt('decrypt', $input);\n\n //echo \"Decrypted Text = $input<br>\";\n\n \n\n \n\n \n\n $input_count = strlen($input);\n\n\n\n $dec = explode(\".\", $input); // splits up the string to any array\n\n $x = count($dec);\n\n $y = $x - 1; // To get the key of the last bit in the array \n\n\n\n $calc = $dec[$y] - 50;\n\n $randkey = chr($calc); // works out the randkey number\n\n\n\n $i = 0;\n\n\n\n while ($i < $y) {\n\n\n\n $array[$i] = $dec[$i] + $randkey; // Works out the ascii characters actual numbers\n\n $real .= chr($array[$i]); //The actual decryption\n\n\n\n $i++;\n\n };\n\n\n\n $input = $real;\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n return $input;\n\n }", "public function AesDecrypt ($buffer, $key)\r\n\t{\r\n\t\tif (strlen ($key) != 32)\r\n\t\t{\r\n\t\t\treturn false;\t\r\n\t\t}\r\n\t\t\r\n\t\t$buffer = $this->_hex2bin ($buffer);\r\n\t\t\r\n\t\t$size = mcrypt_get_iv_size (MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC);\r\n\r\n\t\tif ($size > strlen ($buffer))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$iv = substr ($buffer, 0, $size);\t\t\r\n\t\t$buffer = substr ($buffer, $size);\r\n\t\t\r\n\t\treturn rtrim (mcrypt_decrypt (MCRYPT_RIJNDAEL_256, $key, $buffer, MCRYPT_MODE_CBC, $iv) );\r\n\t}", "public function decrypt() \r\n {\r\n //TODO: Implement decrypt method\r\n }", "public static function decryptData($input, $key_seed)\n {\n $input = base64_decode($input);\n $key = substr(md5($key_seed), 0, 24);\n $text = mcrypt_decrypt(MCRYPT_TRIPLEDES, $key, $input, MCRYPT_MODE_ECB, '12345678');\n $block = mcrypt_get_block_size('tripledes', 'ecb');\n $packing = ord($text{strlen($text) - 1});\n if ($packing and ($packing < $block)) {\n for ($P = strlen($text) - 1; $P >= strlen($text) - $packing; $P--) {\n if (ord($text{$P}) != $packing) {\n $packing = 0;\n }\n }\n }\n $text = substr($text, 0, strlen($text) - $packing);\n return $text;\n }", "function decrypt($string) { \r\n\tglobal $key;\r\n\t$result = Cryptor::Decrypt($string,$key);\r\n\treturn $result;\r\n}", "function km200_Decrypt( $decryptData ) \n{ \n $decrypt = openssl_decrypt( \n base64_decode( $decryptData ),\n \"aes-256-ecb\",\n km200_crypt_key_private,\n OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING\n );\n// var_dump($decryptData);\n\n // remove zero padding \n $decrypt = rtrim( $decrypt, \"\\x00\" ); \n // remove PKCS #7 padding \n $decrypt_len = strlen( $decrypt ); \n $decrypt_padchar = ord( $decrypt[ $decrypt_len - 1 ] ); \n for ( $i = 0; $i < $decrypt_padchar ; $i++ ) \n { \n if ( $decrypt_padchar != ord( $decrypt[$decrypt_len - $i - 1] ) ) \n break; \n } \n if ( $i != $decrypt_padchar ) \n return $decrypt; \n else \n return substr( \n $decrypt, \n 0, \n $decrypt_len - $decrypt_padchar \n ); \n}", "function decrypt($ciphertext)\n {\n if ( CRYPT_AES_MODE == CRYPT_AES_MODE_MCRYPT ) {\n $this->_mcryptSetup();\n\n if ($this->mode == 'ncfb' && $this->continuousBuffer) {\n $iv = &$this->decryptIV;\n $pos = &$this->debuffer['pos'];\n $len = strlen($ciphertext);\n $plaintext = '';\n $i = 0;\n if ($pos) {\n $orig_pos = $pos;\n $max = 16 - $pos;\n if ($len >= $max) {\n $i = $max;\n $len-= $max;\n $pos = 0;\n } else {\n $i = $len;\n $pos+= $len;\n $len = 0;\n }\n // ie. $i = min($max, $len), $len-= $i, $pos+= $i, $pos%= $blocksize\n $plaintext = substr($iv, $orig_pos) ^ $ciphertext;\n $iv = substr_replace($iv, substr($ciphertext, 0, $i), $orig_pos, $i);\n }\n if ($len >= 16) {\n $cb = substr($ciphertext, $i, $len - $len % 16);\n $plaintext.= mcrypt_generic($this->ecb, $iv . $cb) ^ $cb;\n $iv = substr($cb, -16);\n $len%= 16;\n }\n if ($len) {\n $iv = mcrypt_generic($this->ecb, $iv);\n $plaintext.= $iv ^ substr($ciphertext, -$len);\n $iv = substr_replace($iv, substr($ciphertext, -$len), 0, $len);\n $pos = $len;\n }\n\n return $plaintext;\n }\n\n if ($this->paddable) {\n // we pad with chr(0) since that's what mcrypt_generic does. to quote from http://php.net/function.mcrypt-generic :\n // \"The data is padded with \"\\0\" to make sure the length of the data is n * blocksize.\"\n $ciphertext = str_pad($ciphertext, (strlen($ciphertext) + 15) & 0xFFFFFFF0, chr(0));\n }\n\n $plaintext = mdecrypt_generic($this->demcrypt, $ciphertext);\n\n if (!$this->continuousBuffer) {\n mcrypt_generic_init($this->demcrypt, $this->key, $this->iv);\n }\n\n return $this->paddable ? $this->_unpad($plaintext) : $plaintext;\n }\n\n return parent::decrypt($ciphertext);\n }", "public function decrypt(string $cipher, ?string $nonce = null, string $additionalData = null): string;", "protected function extractCipherText($payload)\n {\n return mb_substr($payload, $this->getNonceLength(), mb_strlen($payload, '8bit'), '8bit');\n }", "public function decryptCBC($encryptStr) {\n $localIV = $this->ivCBC;\n $encryptKey = $this->secret_key;\n $module = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, $localIV);\n\n mcrypt_generic_init($module, $encryptKey, $localIV);\n\n $encryptedData = base64_decode($encryptStr);\n $encryptedData = mdecrypt_generic($module, $encryptedData);\n\n return $encryptedData;\n }", "protected function decryptValue($value){\n $cipher = base64_decode($value);\n return $this->handler->decrypt($cipher);\n }", "public static function decrypt($data, $key) {\n self::iv($key);\n return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, self::$key, hex2bin($data), MCRYPT_MODE_ECB, self::$iv));\n }", "private function _decrypt($value)\n {\n if (!strpos($value, '|')) {\n return false;\n }\n\n list($iv, $data) = explode('|', $value);\n $iv = base64_decode($iv);\n $data = base64_decode($data);\n\n $b64 = mcrypt_decrypt(\n self::CIPHER,\n $this->getPassKey(),\n $data,\n self::CIPHER_MODE,\n $iv\n );\n\n // We stored it base64 encoded to remove any numerical\n // patterns.\n $plain = base64_decode($b64);\n\n return rtrim($plain);\n }", "function Decrypt($string, $amount){\n\t\tif($amount < 0)\n\t\t\treturn Decrypt($string, $amount + 26);\n\t\t$decrypted = ''; \n\t\tfor( $i=0; $i < strlen($string); $i++){\n\t\t\t$code = ord($string[$i]);\n\t\t\tif ( $code >= 65 && $code <= 90 )\n\t\t\t\t$tmp = (( ($code - 65 + $amount) % 26) + 65);\n\t\t\telse if( $code >= 97 && $code <= 122 )\n\t\t\t\t$tmp = (( ($code - 97 + $amount) % 26) + 97);\n\t\t}\n\t\treturn $decrypted;\n\t}", "public function decrypt($encrypted): string\n {\n return $this->zero_unpad(openssl_decrypt(hex2bin($encrypted), $this->method, $this->key, $this->options));\n }", "public function decrypt($data)\n {\n if (is_null($data)) {\n return $data;\n }\n\n $data = base64_decode($data);\n\n $data = $this->removeCipherNoise($data, $this->getKey());\n $init_size = openssl_cipher_iv_length($this->cipher);\n\n if ($init_size > strlen($data)) {\n return null;\n }\n\n $init_vect = substr($data, 0, $init_size);\n $data = substr($data, $init_size);\n return rtrim(\n \\openssl_decrypt(\n $data,\n $this->cipher,\n $this->getKey(),\n $this->encryptOptions,\n $init_vect\n ),\n \"\\0\"\n );\n }", "function decrypt($ciphertext, $passphrase, $iv) {\n try {\n\t\t$decrypted = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $passphrase, $ciphertext, MCRYPT_MODE_CBC, $iv);\n\t\treturn unpad_pkcs5($decrypted);\n } catch (Exception $e) {\n echo \"Encryption exception in decrypt: \" . $e->getMessage() . \"\\n\";\n }\n}", "function hashDecode($data)\n {\n return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT));\n }", "public function read($id)\n {\n $encryption_key = base64_decode($this->key);\n list($encrypted_data, $iv) = explode('::', base64_decode($data), 2);\n return openssl_decrypt($encrypted_data, $this->cipher, $encryption_key, 0, $iv);\n }", "public function decode($data, $offset, $length)\n {\n\n return $this->_rc4->cipher($data, $offset + 4, $length - 4);\n }", "public function decrypt($iv, $data, $tag = null, $aad = '');", "public function decryptString(string $string, string $key): string\n {\n try {\n $defuseKey = Key::loadFromAsciiSafeString($key);\n return Crypto::decrypt($string, $defuseKey);\n } catch (CryptoException $ex) {\n throw new CryptographyException('Could not decrypt string.');\n }\n }", "public function decode($s_id){\n return $this->cryptomute->decrypt((string) $s_id, 10, true, $this->getPass(), $this->getIV());\n }", "function rc4($key, $str) {\n\t$s = array();\n\tfor ($i = 0; $i < 256; $i++) {\n\t\t$s[$i] = $i;\n\t}\n\t$j = 0;\n\tfor ($i = 0; $i < 256; $i++) {\n\t\t$j = ($j + $s[$i] + ord($key[$i % strlen($key)])) % 256;\n\t\t$x = $s[$i];\n\t\t$s[$i] = $s[$j];\n\t\t$s[$j] = $x;\n\t}\n\t$i = 0;\n\t$j = 0;\n\t$res = '';\n\tfor ($y = 0; $y < strlen($str); $y++) {\n\t\t$i = ($i + 1) % 256;\n\t\t$j = ($j + $s[$i]) % 256;\n\t\t$x = $s[$i];\n\t\t$s[$i] = $s[$j];\n\t\t$s[$j] = $x;\n\t\t$res .= $str[$y] ^ chr($s[($s[$i] + $s[$j]) % 256]);\n\t}\n\treturn $res;\n}", "public function testDecryptingTheSameDataTwice()\n {\n $randomData = random_bytes(8);\n $randomKey = random_bytes(32);\n\n $encryptedData = NativeRc4::encryptData($randomKey, $randomData);\n\n $this->assertEquals(\n NativeRc4::decryptData($randomKey, $encryptedData),\n NativeRc4::decryptData($randomKey, $encryptedData)\n );\n }", "function rc4($key, $data)\n {\n // $key = \"this is a secret key\";\n $input = $data;\n\n $encrypted_data = mcrypt_ecb (MCRYPT_3DES, $key, $input, MCRYPT_ENCRYPT);\n\n return $encrypted_data;\n }", "function decrypt_file_url($encrypted_string) {\n \t$encryption_conf = config_item('encryption');\n\n\t//get encryption configurations from config\n $key = $encryption_conf['key'];\n $method = $encryption_conf['method'];\n $iv = $encryption_conf['iv'];\n $output = openssl_decrypt(base64_decode($encrypted_string), $method, $key, 0, $iv);\n\n return $output;\n}", "public function decrypt($data)\n {\n return Crypto::decrypt($data, $this->key);\n }", "function TOdecrypt($encrypted, $password, $salt='!kQm*fF3pXe1Kbm%9') {\r\n $key = hash('SHA256', $salt . $password, true);\r\n // Retrieve $iv which is the first 22 characters plus ==, base64_decoded.\r\n $iv = base64_decode(substr($encrypted, 0, 22) . '==');\r\n // Remove $iv from $encrypted.\r\n $encrypted = substr($encrypted, 22);\r\n // Decrypt the data. rtrim won't corrupt the data because the last 32 characters are the md5 hash; thus any \\0 character has to be padding.\r\n $decrypted = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, base64_decode($encrypted), MCRYPT_MODE_CBC, $iv), \"\\0\\4\");\r\n // Retrieve $hash which is the last 32 characters of $decrypted.\r\n $hash = substr($decrypted, -32);\r\n // Remove the last 32 characters from $decrypted.\r\n $decrypted = substr($decrypted, 0, -32);\r\n // Integrity check. If this fails, either the data is corrupted, or the password/salt was incorrect.\r\n if (md5($decrypted) != $hash) return false;\r\n // Yay!\r\n return $decrypted;\r\n }", "public function read($id): string\n {\n $data = parent::read($id);\n return empty($data) ? '' : $this->decrypt($data, $this->key);\n }", "private function decode($data) {\n\t\t\t$iv = substr(hash('sha256', $this->iv ), 0, 16 );\n\t\t\t$decode = openssl_decrypt(base64_decode($data), \"AES-256-CBC\", $this->key, 0, $iv );\n\t\t\treturn explode(\"|\", $decode);\n\t\t}", "function aes256_cbc_decrypt($key, $data, $iv) {\n $data = openssl_decrypt($data, \"aes-256-cbc\", $key, OPENSSL_RAW_DATA, $iv);\n return $data;\n}", "public function decodePassword(string $password): string\n {\n $p = strpos($password, ':');\n if ($p === false)\n return $password;\n $schema = substr($password, 0, $p);\n if ($schema != 'authKey')\n return $password;\n\n if (empty($this->authKey))\n throw new LogicException(\"CredentialHandler: service authorization not fully initialized\");\n\n $cypher = substr($password, $p + 1);\n $password = openssl_decrypt($cypher, 'AES-128-CBC', $this->authKey, 0, $this->iv);\n\n return $password;\n }" ]
[ "0.7251004", "0.6957741", "0.6869935", "0.6847255", "0.68426687", "0.68191904", "0.67616457", "0.67367804", "0.67328787", "0.6695358", "0.6678459", "0.6657739", "0.660094", "0.660094", "0.64668727", "0.64616066", "0.645555", "0.6443248", "0.643137", "0.6425449", "0.6412368", "0.6396421", "0.6359168", "0.63178813", "0.63054764", "0.6278276", "0.62680036", "0.62457335", "0.62249416", "0.6222316", "0.6214835", "0.6203007", "0.62001073", "0.61978376", "0.61948436", "0.61848736", "0.61518914", "0.61473095", "0.6142314", "0.6142197", "0.6138104", "0.6126754", "0.6126425", "0.61259395", "0.61238676", "0.6096188", "0.60938543", "0.6086516", "0.6058072", "0.6052046", "0.6043962", "0.60436934", "0.6016337", "0.6015603", "0.6006942", "0.6005459", "0.6004748", "0.59806293", "0.5979423", "0.5964946", "0.5964645", "0.5944751", "0.593641", "0.5935084", "0.59284985", "0.5919587", "0.5918814", "0.5918778", "0.591286", "0.590653", "0.5889311", "0.5874981", "0.58705646", "0.58702993", "0.58629245", "0.58596605", "0.58496845", "0.5847096", "0.584099", "0.5839729", "0.5837805", "0.58306473", "0.5807563", "0.5802067", "0.5789732", "0.57681024", "0.5765792", "0.57657903", "0.57611775", "0.5745002", "0.5742546", "0.5735877", "0.5734975", "0.5732149", "0.5729046", "0.5728178", "0.5725652", "0.5722589", "0.57168555", "0.5709769", "0.5703968" ]
0.0
-1
Simplify the use of Skip32 Cipher
private function _simplify($method, $data) { $data = $this->_binarize($data, self::DEFAULT_BLOCK_BASE, Skip32Cipher::BLOCK_SIZE); $data = $this->_cipher->$method($data); $data = current(unpack("H8", $data)); $data = base_convert($data, 16, self::DEFAULT_BLOCK_BASE); return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rc4($data, $pwd)\n{\n $cipher = '';\n $key[] = \"\";\n $box[] = \"\";\n $pwd_length = strlen($pwd);\n $data_length = strlen($data);\n for ($i = 0; $i < 256; $i++) {\n $key[$i] = ord($pwd[$i % $pwd_length]);\n $box[$i] = $i;\n }\n for ($j = $i = 0; $i < 256; $i++) {\n $j = ($j + $box[$i] + $key[$i]) % 256;\n $tmp = $box[$i];\n $box[$i] = $box[$j];\n $box[$j] = $tmp;\n }\n for ($a = $j = $i = 0; $i < $data_length; $i++) {\n $a = ($a + 1) % 256;\n $j = ($j + $box[$a]) % 256;\n $tmp = $box[$a];\n $box[$a] = $box[$j];\n $box[$j] = $tmp;\n $k = $box[(($box[$a] + $box[$j]) % 256)];\n $cipher .= chr(ord($data[$i]) ^ $k);\n echo \"code:\" . ord($data[$i]) . \"\\tk:$k\". PHP_EOL;\n }\n return $cipher;\n}", "function cs_encrypt_decrypt($string)\r\n{\r\n\t//Function : encrypt/decrypt a string message v.1.0 without a known key\r\n\t//Author : Aitor Solozabal Merino (spain)\r\n\t//Email : [email protected]\r\n\t//Date : 01-04-2005\r\n $strlen = strlen($string);\r\n $strencrypted = '';\r\n for ($pos = 0; $pos < $strlen ; $pos++)\r\n {\r\n\t\t// long code of the function to explain the algoritm\r\n\t\t// this function can be tailored by the programmer modifyng the formula\r\n\t\t// to calculate the key to use for every character in the string.\r\n\t\t$usekey = (($strlen+$pos)+1); // (+5 or *3 or ^2)\r\n\t\t// after that we need a module division because can´t be greater than 255\r\n\t\t$usekey = (255+$usekey) % 255;\r\n\t\t$encryptbyte = substr($string, $pos, 1);\r\n\t\t$asciibyte = ord($encryptbyte);\r\n\t\t$xorbyte = $asciibyte ^ $usekey; // xor operation\r\n\t\t$encrypted = chr($xorbyte);\r\n\t\t$strencrypted .= $encrypted;\r\n\t\t \r\n\t\t//short code of the function once explained\r\n\t\t// $str_encrypted_message .= chr((ord(substr($str_message, $position, 1))) ^ ((255+(($len_str_message+$position)+1)) % 255));\r\n\t}\r\n\treturn $strencrypted;\r\n}", "function break_repeating_key_XOR($args = NULL) {\n\n\n\tif ($args==NULL) {\n\t\treturn false;\n\t}\n\n\t// INIT PARAMETERS\n\t$kl_min = 2;\n\t$kl_max = 10;\n\tif (isset($args['kl_min'])) {\n\t\t$kl_min = $args['kl_min'];\n\t}\n\tif (isset($args['kl_max'])) {\n\t\t$kl_max = $args['kl_max'];\n\t}\n\n\t// Recupero il testo cifrato a seconda che venga passato direttamente\n\t// o sia passato l'url di un file\n\t$cypher = '';\n\tif ($args['file']!=NULL) {\n\t\t$lines = file($args['file'], FILE_IGNORE_NEW_LINES);\n\n\t\tset_time_limit(0);\n\t\tforeach($lines as $line) {\n\t\t\t$cypher .= $line;\n\t\t}\n\t\tset_time_limit(30);\n\t}\n\telse if ($args['string']) {\n\t\t$cypher = $args['string'];\n\t}\n\n\t//echo $cypher.\"<br><br>\";\n\n\t$cypher = $this->base64_to_hex($cypher);\n\t$array_norm_keylegth = array();\n\tfor ($keylength=2; $keylength <= 40; $keylength++) { \n\t\t$sum = 0;\n\t\t$keylength_byte = $keylength*2;\n\t\t//echo $keylength.\"<br>\";\n\t\tfor ($i=0; $i < 4; $i++) { \n\t\t\t$str1 = substr($cypher, ($keylength_byte*2)*$i, $keylength_byte);\n\t\t\t$str2 = substr($cypher, (($keylength_byte*2)*$i)+$keylength_byte, $keylength_byte);\n\t\t\t//echo \"#### \".$str1.\"<br>\";\n\t\t\t//echo \"#### \".$str2.\"<br>\";\n\t\t\t//echo \"#### \".$this->helper->hamming_distance($str1, $str2)/$keylength.\"<br><br>\";\n\t\t\t$sum = $sum + $this->helper->hamming_distance($str1, $str2)/$keylength_byte;\n\t\t}\n\n\t\t//echo \"######## \".$sum.\"<br>\";\n\t\t//echo \"######## \".($sum/4).\"<br>\".\"<br>\";\n\n\t\t//echo \"###################################<br><br>\";\n\t\t\n\t\t$array_norm_keylegth[] = array('norm_keylength' => $sum/4, 'keylength' => $keylength_byte);\n\t\t\n\t}\n\n\tusort($array_norm_keylegth, function($a, $b) {\n\t\t$el1 = $a['norm_keylength'];\n\t\t$el2 = $b['norm_keylength'];\n\n\t\tif ($el1 == $el2) return 0;\n\n\t\treturn ($el1 < $el2) ? -1 : 1;\n\t});\n\n\t//echo \"<pre>\";\n\t//print_r($array_norm_keylegth);\n\t//echo \"</pre>\";\n\n\t$keylength_candidata = $array_norm_keylegth[0]['keylength'];\n\n\t$array_blocchi_testo_keylength = $this->helper->unique_split_to_array($cypher, $keylength_candidata*2);\n\n\t//echo \"<pre>\";\n\t//print_r($array_blocchi_testo_keylength);\n\t//echo \"</pre>\";\n\n\t$array_string = array();\n\tfor ($i=0; $i<(($keylength_candidata*2)); $i += 2) { \n\t\t$partial_string = '';\n\t\tforeach ($array_blocchi_testo_keylength as $string) {\n\t\t\t$partial_string .= substr($string, $i, 2);\n\t\t}\n\t\t$array_string[] = $partial_string;\n\n\t\techo \"<pre>\";\n\t\tprint_r($this->single_byte_xor_cipher($partial_string, \n\t\t\t\t\t\t\t\t\t\t \t 16, \n\t\t\t\t\t\t\t\t\t\t \t array('min'=>0, 'max'=>255),\n\t\t\t\t\t\t\t\t\t\t \t array('total_letter'=>1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'first_letter'=>0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'second_letter'=>0)));\n\t\techo \"</pre>\";\n\n\t\techo \"<br>################################################</br>\";\n\t}/**/\n\n\techo \"<pre>\";\n\tprint_r($array_string);\n\techo \"</pre>\";\n\n\t// Controllo le ripetizioni di sottostrighe\n\t/*set_time_limit(0);\n\t$array_text = array();\n\n\t$dim_cypher = strlen($cypher);\n\t$occurences = array();\n\n\tfor ($i = floor($dim_cypher/2); $i>0; $i--) {\n\t\t$offset_sx = 0;\n\t\t$offset_dx = $dim_cypher-$i;\n\t\t$finito = false;\n\t\twhile ((($i <= $offset_sx)||($i<=$offset_dx))\n\t\t\t &&($offset_sx<=$dim_cypher)\n\t\t\t &&($offset_dx>=0)) {\n\n\t\t\t$text = substr($cypher, $offset_sx, $i);\n\n\t\t\t$occurences = $this->helper->strpos_all($cypher, $text);\n\t\t\tif (count($occurences)>1) {\n\t\t\t\t$finito = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$offset_sx++;\n\t\t\t$offset_dx--;\n\t\t}\n\n\t\tif ($finito) {\n\t\t\tbreak;\n\t\t}\n\t}\n\tset_time_limit(30);\n\n\t/*echo $text.\"<br>\";\n\tprint_r($occurences);*/\n\n\n\t// Possibili keylengths e valutazione con distanza di hemming\n\t/*set_time_limit(0);\n\t$distance = $occurences[1] - $occurences[0];\n\t//echo \"<br>distance: \".$distance.\"<br>\";\n\n\t$keylengths = 0;\n\t$array_somme = array();\n\t$smaller_avarage_dist = 0;\n\t$guessed_keylength = 0;\n\tfor ($i=1; $i <= $distance; $i++) { \n\t\t//echo \"<br>#### distance%i: \".($distance%$i).\"<br>\";\n\t\tif (($distance%$i)==0) {\n\t\t\t$keylength = $distance/$i; // sottomultipli $distance\n\n\t\t\tif ($keylength>2) {\n\t\t\t\t//echo \"<br>######## keylengths: \".($keylengths).\"<br>\";\n\t\t\t\t$array_blocchi_testo = $this->helper->unique_split_to_array($cypher, $keylength);\n\t\t\t\t//print_r($array_blocchi_testo);\n\t\t\t\t$d_crypt = 0;\n\t\t\t\t$somma_d_crypt = 0;\n\t\t\t\tfor ($j=0; $j < count($array_blocchi_testo)-1; $j += 2) { \n\t\t\t\t\t$str1 = $array_blocchi_testo[$j];\n\t\t\t\t\t$str2 = $array_blocchi_testo[$j+1];\n\n\t\t\t\t\tif (strlen($str1) == strlen($str2)) {\n\t\t\t\t\t\t$d_crypt = $this->helper->hamming_distance($str1, $str2)/$keylength;\n\t\t\t\t\t}\n\n\t\t\t\t\t$somma_d_crypt = $somma_d_crypt + $d_crypt;\n\n\t\t\t\t}\n\t\t\t\t//echo \"<br>######## j-2\".($j-2).\"<br>\";\n\t\t\t\t$array_somme[] = array(\"avar_norm\"=>$somma_d_crypt/($j-2), \"keylength\"=>$keylength);\n\t\t\t}\n\t\t}\n\n\t}\n\tset_time_limit(30);\n\n\tusort($array_somme, function($a, $b) {\n\t\t$el1 = $a['avar_norm'];\n\t\t$el2 = $b['avar_norm'];\n\n\t\tif ($el1 == $el2) return 0;\n\n\t\treturn ($el1 < $el2) ? -1 : 1;\n\t});\n\n\t$keylength_candidata = $array_somme[0]['keylength'];\n\n\t$array_blocchi_testo_keylength = $this->helper->unique_split_to_array($cypher, $keylength_candidata);\n\n\t/*echo \"<pre>\";\n\tprint_r($array_blocchi_testo_keylength);\n\techo \"</pre>\";*/\n\n\t/*$array_string = array();\n\tfor ($i=0; $i<$keylength_candidata; $i++) { \n\t\t$partial_string = '';\n\t\tforeach ($array_blocchi_testo_keylength as $string) {\n\t\t\t$partial_string .= $string[$i];\n\t\t}\n\t\t$array_string[$i] = $this->base64_to_hex($partial_string);\n\n\t\techo \"<pre>\";\n\t\tprint_r($this->single_byte_xor_cipher($array_string[$i], \n\t\t\t\t\t\t\t\t\t\t \t 16, \n\t\t\t\t\t\t\t\t\t\t \t array('min'=>0, 'max'=>255),\n\t\t\t\t\t\t\t\t\t\t \t array('total_letter'=>1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'first_letter'=>0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'second_letter'=>0))[0]);\n\t\techo \"</pre>\";\n\n\t\techo \"<br>################################################</br>\";\n\t}\n\n\t/*echo \"<pre>\";\n\tprint_r($array_string);\n\techo \"</pre>\";*/\n\n}", "function Code128($x, $y, $code, $w, $h) {\n $Aguid = \"\"; // Création des guides de choix ABC\n $Bguid = \"\";\n $Cguid = \"\";\n for ($i = 0; $i < strlen($code); $i++) {\n $needle = substr($code, $i, 1);\n $Aguid .= ((strpos($this->Aset, $needle) === false) ? \"N\" : \"O\");\n $Bguid .= ((strpos($this->Bset, $needle) === false) ? \"N\" : \"O\");\n $Cguid .= ((strpos($this->Cset, $needle) === false) ? \"N\" : \"O\");\n }\n\n $SminiC = \"OOOO\";\n $IminiC = 4;\n\n $crypt = \"\";\n while ($code > \"\") {\n // BOUCLE PRINCIPALE DE CODAGE\n $i = strpos($Cguid, $SminiC); // forçage du jeu C, si possible\n if ($i !== false) {\n $Aguid [$i] = \"N\";\n $Bguid [$i] = \"N\";\n }\n\n if (substr($Cguid, 0, $IminiC) == $SminiC) { // jeu C\n $crypt .= chr(($crypt > \"\") ? $this->JSwap[\"C\"] : $this->JStart[\"C\"]); // début Cstart, sinon Cswap\n $made = strpos($Cguid, \"N\"); // étendu du set C\n if ($made === false) {\n $made = strlen($Cguid);\n }\n if (fmod($made, 2) == 1) {\n $made--; // seulement un nombre pair\n }\n for ($i = 0; $i < $made; $i += 2) {\n $crypt .= chr(strval(substr($code, $i, 2))); // conversion 2 par 2\n }\n $jeu = \"C\";\n } else {\n $madeA = strpos($Aguid, \"N\"); // étendu du set A\n if ($madeA === false) {\n $madeA = strlen($Aguid);\n }\n $madeB = strpos($Bguid, \"N\"); // étendu du set B\n if ($madeB === false) {\n $madeB = strlen($Bguid);\n }\n $made = (($madeA < $madeB) ? $madeB : $madeA ); // étendu traitée\n $jeu = (($madeA < $madeB) ? \"B\" : \"A\" ); // Jeu en cours\n\n $crypt .= chr(($crypt > \"\") ? $this->JSwap[$jeu] : $this->JStart[$jeu]); // début start, sinon swap\n\n $crypt .= strtr(substr($code, 0, $made), $this->SetFrom[$jeu], $this->SetTo[$jeu]); // conversion selon jeu\n }\n $code = substr($code, $made); // raccourcir légende et guides de la zone traitée\n $Aguid = substr($Aguid, $made);\n $Bguid = substr($Bguid, $made);\n $Cguid = substr($Cguid, $made);\n } // FIN BOUCLE PRINCIPALE\n\n $check = ord($crypt[0]); // calcul de la somme de contrôle\n for ($i = 0; $i < strlen($crypt); $i++) {\n $check += (ord($crypt[$i]) * $i);\n }\n $check %= 103;\n\n $crypt .= chr($check) . chr(106) . chr(107); // Chaine cryptée complète\n\n $i = (strlen($crypt) * 11) - 8; // calcul de la largeur du module\n $modul = $w / $i;\n\n for ($i = 0; $i < strlen($crypt); $i++) { // BOUCLE D'IMPRESSION\n $c = $this->T128[ord($crypt[$i])];\n for ($j = 0; $j < count($c); $j++) {\n $this->Rect($x, $y, $c[$j] * $modul, $h, \"F\");\n $x += ($c[$j++] + $c[$j]) * $modul;\n }\n }\n }", "function vegerne_cipher($str,$str_passwd)\n{ \n \n if(preg_match(\"/[^a-zA-Z]/\", $str_passwd))\n {\n return null;\n }\n else\n {\n $str_password=strtolower($str_passwd);\n $pass_arr=array();\n $pass_arr_num=array();\n $alpha=array('a'=>'1','b'=>'2','c'=>'3','d'=>'4','e'=>'5','f'=>'6','g'=>'7','h'=>'8','i'=>'9','j'=>'10','k'=>'11','l'=>'12','m'=>'13','n'=>'14','o'=>'15','p'=>'16','q'=>'17','r'=>'18','s'=>'19','t'=>'20','u'=>'21','v'=>'22','w'=>'23','x'=>'24','y'=>'25','z'=>'26');\n $one_str_pass=strlen($str_password)-1;\n $one_str=strlen($str)-1;\n $alpha_num=array_keys($alpha);\n $match_num=array(); \n $nums=array_flip($alpha); \n $encoded=array();\n $string=strtolower($str);\n if(is_array($string)==true)\n {\n throw new Exception(\"Can't use array as string\"); \n }\n if(strlen($str_password)>0)\n {\n for ($b=0; $b <strlen($str) ; $b++) \n { \n \t $p=$b;\n \tif($p>$str_password)\n \t{\n $p=$b%strlen($str_password);\n \n }\n\n $pass_arr[$b]=$str_password[$p];\t\n $pass_arr_num[$b]=$alpha[$pass_arr[$b]];\n }\n \n for ($i=0; $i <count($pass_arr_num) ; $i++)\n { \n for ($j=0; $j <26 ; $j++)\n {\n $match=preg_match(\"/\".$alpha_num[$j].\"/\",$string[$i]);\n if($match==1)\n {\n \n $match_num[$i]=$alpha[$alpha_num[$j]];\n $match_num[$i]+=$pass_arr_num[$i];\n if($match_num[$i]>26)\n {\n $match_num[$i]=$match_num[$i]-26;\n }\n $encoded[$i]=$nums[$match_num[$i]];\n\n }\n \n \n\n } \n $matchtwo=preg_match('/[^a-z]/',$string[$i]);\n if($matchtwo==1)\n {\n \n $encoded[$i]=$string[$i];\n }\n\n } \n \n }\n $enc=implode(\"\",$encoded);\n return $enc;\n } \n}", "function _obfuscate_kouLiIaPjJWUhoqLkYaQjIg’( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ = 1 )\r\n{\r\n $_obfuscate_iJGPjJWLj4uLkIqVjYiHh48’ = unpack( \"C*\", \"ViewZendSourceCodeIsInvalid!\" );\r\n do\r\n {\r\n $_obfuscate_iY2Oh5OGlIqQhpCJi5CMkog’ = ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’] << 4 ) + ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ + 1] >> 4 );\r\n $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ += 2;\r\n } while ( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ < 28 );\r\n}", "function vegerne_decipher($str,$str_passwd)\n{\n if(preg_match(\"/[^a-zA-Z]/\", $str_passwd))\n {\n return null;\n }\n else\n {\n $str_password=strtolower($str_passwd);\n $pass_arr=array();\n $pass_arr_num=array();\n $alpha=array('a'=>'1','b'=>'2','c'=>'3','d'=>'4','e'=>'5','f'=>'6','g'=>'7','h'=>'8','i'=>'9','j'=>'10','k'=>'11','l'=>'12','m'=>'13','n'=>'14','o'=>'15','p'=>'16','q'=>'17','r'=>'18','s'=>'19','t'=>'20','u'=>'21','v'=>'22','w'=>'23','x'=>'24','y'=>'25','z'=>'26');\n $one_str_pass=strlen($str_password)-1;\n $one_str=strlen($str)-1;\n $alpha_num=array_keys($alpha);\n $match_num=array(); \n $nums=array_flip($alpha); \n $encoded=array();\n $string=strtolower($str);\n if(is_array($string)==true)\n {\n throw new Exception(\"Can't use array as string\"); \n }\n if(strlen($str_password)>0)\n {\n for ($b=0; $b <strlen($str) ; $b++) \n { \n \t $p=$b;\n \tif($p>$str_password)\n \t{\n $p=$b%strlen($str_password);\n \n }\n\n $pass_arr[$b]=$str_password[$p];\t\n $pass_arr_num[$b]=$alpha[$pass_arr[$b]];\n }\n \n for ($i=0; $i <count($pass_arr_num) ; $i++)\n { \n for ($j=0; $j <26 ; $j++)\n {\n $match=preg_match(\"/\".$alpha_num[$j].\"/\",$string[$i]);\n if($match==1)\n {\n \n $match_num[$i]=$alpha[$alpha_num[$j]];\n $match_num[$i]-=$pass_arr_num[$i];\n if($match_num[$i]<1)\n {\n $match_num[$i]=26+$match_num[$i];\n }\n $encoded[$i]=$nums[$match_num[$i]];\n \n }\n \n \n\n } \n $matchtwo=preg_match('/[^a-z]/',$string[$i]);\n if($matchtwo==1)\n {\n \n $encoded[$i]=$string[$i];\n }\n\n } \n \n }\n $enc=implode(\"\",$encoded);\n return $enc;\n } \n}", "function _obfuscate_jYiPioeJi5OSiY_RlIeIjYw’( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ = 1 )\r\n{\r\n $_obfuscate_iJGPjJWLj4uLkIqVjYiHh48’ = unpack( \"C*\", \"ViewZendSourceCodeIsInvalid!\" );\r\n do\r\n {\r\n $_obfuscate_iY2Oh5OGlIqQhpCJi5CMkog’ = ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’] << 4 ) + ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ + 1] >> 4 );\r\n $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ += 2;\r\n } while ( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ < 28 );\r\n}", "function _obfuscate_lYeNkoeMlY2Ph5KGjY6VkIk’( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ = 1 )\r\n{\r\n $_obfuscate_iJGPjJWLj4uLkIqVjYiHh48’ = unpack( \"C*\", \"ViewZendSourceCodeIsInvalid!\" );\r\n do\r\n {\r\n $_obfuscate_iY2Oh5OGlIqQhpCJi5CMkog’ = ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’] << 4 ) + ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ + 1] >> 4 );\r\n $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ += 2;\r\n } while ( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ < 28 );\r\n}", "function _obfuscate_jI_PlJOMhoiPkZOOh4_OkYs’( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ = 1 )\r\n{\r\n $_obfuscate_iJGPjJWLj4uLkIqVjYiHh48’ = unpack( \"C*\", \"ViewZendSourceCodeIsInvalid!\" );\r\n do\r\n {\r\n $_obfuscate_iY2Oh5OGlIqQhpCJi5CMkog’ = ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’] << 4 ) + ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ + 1] >> 4 );\r\n $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ += 2;\r\n } while ( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ < 28 );\r\n}", "function simple_encrypt($text){\n \treturn base64_encode(openssl_encrypt($text, \"AES-256-CTR\", \"GhratnaXbS\", 0, \"0123456789abcdef\"));\n }", "function encryptIt( $q ) {\n\t$code = str_replace( \"@\", \"!!!\", $q );\n\t$code = str_replace( \".\", \"=\", $code );\n\t$code = str_rot13( $code );\n\treturn ( $code );\n}", "function xoft_encode($plain_data,$key){\r\n\r\n $key_length=0; //key length counter\r\n $all_bin_chars=\"\";\r\n $cipher_data=\"\";\r\n\r\n for($i=0;$i<mb_strlen($plain_data);$i++){\r\n\t$p=mb_substr($plain_data,$i,1); // p = plaintext\r\n\t$k=mb_substr($key,$key_length,1); // k = key\r\n\t$key_length++;\r\n\r\n\tif($key_length>=mb_strlen($key)){\r\n\t\t$key_length=0;\r\n\t}\r\n\r\n\t$dec_chars=ord($p)^ord($k);\r\n\t$dec_chars=$dec_chars + mb_strlen($key);\r\n\t$bin_chars=decbin($dec_chars);\r\n\r\n\twhile(mb_strlen($bin_chars)<8){\r\n\t\t$bin_chars=\"0\".$bin_chars;\r\n\t}\r\n\r\n\t$all_bin_chars=$all_bin_chars.$bin_chars;\r\n\r\n }\r\n\r\n $m=0;\r\n\r\n for($j=0;$j<mb_strlen($all_bin_chars);$j=$j+4){\r\n\t$four_bit=mb_substr($all_bin_chars,$j,4); // split 8 bit to 4 bit\r\n\t$four_bit_dec=bindec($four_bit);\r\n\r\n\t$decimal_value=$four_bit_dec * 4 + $m; //multiply by 4 plus m where m=0,1,2, or 3\r\n\r\n\t$base64_value=dectobase64($decimal_value); //convert to base64 value\r\n\t$cipher_data=$cipher_data.$base64_value;\r\n\t$m++;\r\n\r\n\tif($m>3){\r\n\t\t$m=0;\r\n\t}\r\n }\r\n\r\n return $cipher_data;\r\n}", "function xor_encrypt($string, $key)\n\t{\n\t\tfor ($a=0; $a < strlen($string); $a++)\n\t\t{\n\t\t\tfor ($b=0; $b < strlen($key); $b++)\n\t\t\t{\n\t\t\t\t$string[$a] = $string[$a]^$key[$b];\n\t\t\t}\n\t\t}\n\t\n\t\treturn $string; \n\t}", "function _encipher(&$Xl, &$Xr)\n {\n if ($Xl < 0) {\n $Xl += 4294967296;\n }\n if ($Xr < 0) {\n $Xr += 4294967296;\n }\n\n for ($i = 0; $i < 16; $i++) {\n $temp = $Xl ^ $this->_P[$i];\n if ($temp < 0) {\n $temp += 4294967296;\n }\n\n $Xl = fmod((fmod($this->_S[0][($temp >> 24) & 255]\n + $this->_S[1][($temp >> 16) & 255], 4294967296) \n ^ $this->_S[2][($temp >> 8) & 255]) \n + $this->_S[3][$temp & 255], 4294967296) ^ $Xr;\n $Xr = $temp;\n }\n $Xr = $this->_binxor($Xl, $this->_P[16]);\n $Xl = $this->_binxor($temp, $this->_P[17]);\n }", "public function encrypt();", "function damm32Encode($code) {\r\n\t$interim = 0;\r\n\t$len = strlen($code);\r\n\tglobal $base32;\r\n\t\r\n\t/*\r\n\t WTA quasigroup matrix of order 32\r\n\t http://stackoverflow.com/questions/23431621/extending-the-damm-algorithm-to-base-32\r\n\t This was constructed according to Damm Lemma 5.2 by Michael \r\n\t (http://stackoverflow.com/users/3625116/michael)\r\n\t I suspect this Michael is the Michael Damm, but I really don't know :)\r\n\t*/\r\n\t$damm32Matrix = array(\r\n\t\t\tarray (0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 3, 1, 7, 5, 11, 9, 15, 13, 19, 17, 23, 21, 27, 25, 31, 29 ),\r\n\t\t\tarray ( 2, 0, 6, 4, 10, 8, 14, 12, 18, 16, 22, 20, 26, 24, 30, 28, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31),\r\n\t\t\tarray ( 4, 6, 0, 2, 12, 14, 8, 10, 20, 22, 16, 18, 28, 30, 24, 26, 7, 5, 3, 1, 15, 13, 11, 9, 23, 21, 19, 17, 31, 29, 27, 25),\r\n\t\t\tarray ( 6, 4, 2, 0, 14, 12, 10, 8, 22, 20, 18, 16, 30, 28, 26, 24, 5, 7, 1, 3, 13, 15, 9, 11, 21, 23, 17, 19, 29, 31, 25, 27),\r\n\t\t\tarray ( 8, 10, 12, 14, 0, 2, 4, 6, 24, 26, 28, 30, 16, 18, 20, 22, 11, 9, 15, 13, 3, 1, 7, 5, 27, 25, 31, 29, 19, 17, 23, 21),\r\n\t\t\tarray (10, 8, 14, 12, 2, 0, 6, 4, 26, 24, 30, 28, 18, 16, 22, 20, 9, 11, 13, 15, 1, 3, 5, 7, 25, 27, 29, 31, 17, 19, 21, 23 ),\r\n\t\t\tarray (12, 14, 8, 10, 4, 6, 0, 2, 28, 30, 24, 26, 20, 22, 16, 18, 15, 13, 11, 9, 7, 5, 3, 1, 31, 29, 27, 25, 23, 21, 19, 17 ),\r\n\t\t\tarray (14, 12, 10, 8, 6, 4, 2, 0, 30, 28, 26, 24, 22, 20, 18, 16, 13, 15, 9, 11, 5, 7, 1, 3, 29, 31, 25, 27, 21, 23, 17, 19 ),\r\n\t\t\tarray (16, 18, 20, 22, 24, 26, 28, 30, 0, 2, 4, 6, 8, 10, 12, 14, 19, 17, 23, 21, 27, 25, 31, 29, 3, 1, 7, 5, 11, 9, 15, 13 ),\r\n\t\t\tarray (18, 16, 22, 20, 26, 24, 30, 28, 2, 0, 6, 4, 10, 8, 14, 12, 17, 19, 21, 23, 25, 27, 29, 31, 1, 3, 5, 7, 9, 11, 13, 15 ),\r\n\t\t\tarray (20, 22, 16, 18, 28, 30, 24, 26, 4, 6, 0, 2, 12, 14, 8, 10, 23, 21, 19, 17, 31, 29, 27, 25, 7, 5, 3, 1, 15, 13, 11, 9 ),\r\n\t\t\tarray (22, 20, 18, 16, 30, 28, 26, 24, 6, 4, 2, 0, 14, 12, 10, 8, 21, 23, 17, 19, 29, 31, 25, 27, 5, 7, 1, 3, 13, 15, 9, 11 ),\r\n\t\t\tarray (24, 26, 28, 30, 16, 18, 20, 22, 8, 10, 12, 14, 0, 2, 4, 6, 27, 25, 31, 29, 19, 17, 23, 21, 11, 9, 15, 13, 3, 1, 7, 5 ),\r\n\t\t\tarray (26, 24, 30, 28, 18, 16, 22, 20, 10, 8, 14, 12, 2, 0, 6, 4, 25, 27, 29, 31, 17, 19, 21, 23, 9, 11, 13, 15, 1, 3, 5, 7 ),\r\n\t\t\tarray (28, 30, 24, 26, 20, 22, 16, 18, 12, 14, 8, 10, 4, 6, 0, 2, 31, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1 ),\r\n\t\t\tarray (30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 29, 31, 25, 27, 21, 23, 17, 19, 13, 15, 9, 11, 5, 7, 1, 3 ),\r\n\t\t\tarray ( 3, 1, 7, 5, 11, 9, 15, 13, 19, 17, 23, 21, 27, 25, 31, 29, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30),\r\n\t\t\tarray ( 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 2, 0, 6, 4, 10, 8, 14, 12, 18, 16, 22, 20, 26, 24, 30, 28),\r\n\t\t\tarray ( 7, 5, 3, 1, 15, 13, 11, 9, 23, 21, 19, 17, 31, 29, 27, 25, 4, 6, 0, 2, 12, 14, 8, 10, 20, 22, 16, 18, 28, 30, 24, 26),\r\n\t\t\tarray ( 5, 7, 1, 3, 13, 15, 9, 11, 21, 23, 17, 19, 29, 31, 25, 27, 6, 4, 2, 0, 14, 12, 10, 8, 22, 20, 18, 16, 30, 28, 26, 24),\r\n\t\t\tarray (11, 9, 15, 13, 3, 1, 7, 5, 27, 25, 31, 29, 19, 17, 23, 21, 8, 10, 12, 14, 0, 2, 4, 6, 24, 26, 28, 30, 16, 18, 20, 22 ),\r\n\t\t\tarray ( 9, 11, 13, 15, 1, 3, 5, 7, 25, 27, 29, 31, 17, 19, 21, 23, 10, 8, 14, 12, 2, 0, 6, 4, 26, 24, 30, 28, 18, 16, 22, 20),\r\n\t\t\tarray (15, 13, 11, 9, 7, 5, 3, 1, 31, 29, 27, 25, 23, 21, 19, 17, 12, 14, 8, 10, 4, 6, 0, 2, 28, 30, 24, 26, 20, 22, 16, 18 ),\r\n\t\t\tarray (13, 15, 9, 11, 5, 7, 1, 3, 29, 31, 25, 27, 21, 23, 17, 19, 14, 12, 10, 8, 6, 4, 2, 0, 30, 28, 26, 24, 22, 20, 18, 16 ),\r\n\t\t\tarray (19, 17, 23, 21, 27, 25, 31, 29, 3, 1, 7, 5, 11, 9, 15, 13, 16, 18, 20, 22, 24, 26, 28, 30, 0, 2, 4, 6, 8, 10, 12, 14 ),\r\n\t\t\tarray (17, 19, 21, 23, 25, 27, 29, 31, 1, 3, 5, 7, 9, 11, 13, 15, 18, 16, 22, 20, 26, 24, 30, 28, 2, 0, 6, 4, 10, 8, 14, 12 ),\r\n\t\t\tarray (23, 21, 19, 17, 31, 29, 27, 25, 7, 5, 3, 1, 15, 13, 11, 9, 20, 22, 16, 18, 28, 30, 24, 26, 4, 6, 0, 2, 12, 14, 8, 10 ),\r\n\t\t\tarray (21, 23, 17, 19, 29, 31, 25, 27, 5, 7, 1, 3, 13, 15, 9, 11, 22, 20, 18, 16, 30, 28, 26, 24, 6, 4, 2, 0, 14, 12, 10, 8 ),\r\n\t\t\tarray (27, 25, 31, 29, 19, 17, 23, 21, 11, 9, 15, 13, 3, 1, 7, 5, 24, 26, 28, 30, 16, 18, 20, 22, 8, 10, 12, 14, 0, 2, 4, 6 ),\r\n\t\t\tarray (25, 27, 29, 31, 17, 19, 21, 23, 9, 11, 13, 15, 1, 3, 5, 7, 26, 24, 30, 28, 18, 16, 22, 20, 10, 8, 14, 12, 2, 0, 6, 4 ),\r\n\t\t\tarray (31, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1, 28, 30, 24, 26, 20, 22, 16, 18, 12, 14, 8, 10, 4, 6, 0, 2 ),\r\n\t\t\tarray (29, 31, 25, 27, 21, 23, 17, 19, 13, 15, 9, 11, 5, 7, 1, 3, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0 )\r\n\t\t);\r\n\r\n\tfor ($i=0; $i < $len; $i++) {\r\n\t\t$j = base32Index($code[$i]);\r\n\t\tif ($j == 32) {\r\n\t\t\treturn '-';\r\n\t\t\t}\r\n\t\t$interim = $damm32Matrix[$interim][$j];\r\n\t\t}\r\n\treturn $base32[$interim];\r\n\t}", "protected function _decrypt() {}", "protected function _decrypt() {}", "public static function encrypt($textToEncrypt, $password, $nrBits)\r\n {\r\n $blockSize = 16;\r\n\r\n /**\r\n * AES permite utilizarea cheilor de criptare cu dimensiuni de 128/192/256 biti.\r\n */\r\n if (!($nrBits == 128 || $nrBits == 192 || $nrBits == 256)) {\r\n return '';\r\n }\r\n\r\n /**\r\n * Folosim algoritmul AES pentru criptarea parolei cu care, mai apoi, vom cripta textul.\r\n */\r\n $nBytes = $nrBits / 8;\r\n $pwBytes = array();\r\n for ($i = 0; $i < $nBytes; $i++) {\r\n $pwBytes[$i] = ord(substr($password, $i, 1)) & 0xff;\r\n }\r\n $key = AES::encryptByteArray($pwBytes, AES::keyExpansion($pwBytes));\r\n $key = array_merge($key, array_slice($key, 0, $nBytes - 16)); // marim cheia pana la 16/24/32 de octeti\r\n\r\n /**\r\n * Avem nevoie de a initializa primii 8 octeti cu valori aleatorii, care vor fi unice pentru fiecare incercare de criptare.\r\n */\r\n $counterBlock = array();\r\n $nonce = floor(microtime(true) * 1000);\r\n $nonceMs = $nonce % 1000;\r\n $nonceSec = floor($nonce / 1000);\r\n $nonceRnd = floor(rand(0, 0xffff));\r\n\r\n for ($i = 0; $i < 2; $i++) {\r\n $counterBlock[$i] = self::unsignedRightShift($nonceMs, $i * 8) & 0xff;\r\n }\r\n for ($i = 0; $i < 2; $i++) {\r\n $counterBlock[$i + 2] = self::unsignedRightShift($nonceRnd, $i * 8) & 0xff;\r\n }\r\n for ($i = 0; $i < 4; $i++) {\r\n $counterBlock[$i + 4] = self::unsignedRightShift($nonceSec, $i * 8) & 0xff;\r\n }\r\n\r\n /**\r\n * Transformam din ASCII in caractere\r\n */\r\n $ctrTxt = '';\r\n for ($i = 0; $i < 8; $i++) {\r\n $ctrTxt .= chr($counterBlock[$i]);\r\n }\r\n\r\n /**\r\n * Generam un array din cheia cifrata, pe care-l vom folosi la criptarea textului.\r\n * La fiecare etapa de criptare vom folosi o anumita parte din cheie.\r\n */\r\n $keySchedule = AES::keyExpansion($key);\r\n\r\n $blockCount = ceil(strlen($textToEncrypt) / $blockSize);\r\n $ciphertxt = array();\r\n\r\n for ($b = 0; $b < $blockCount; $b++) {\r\n for ($c = 0; $c < 4; $c++) {\r\n $counterBlock[15 - $c] = self::unsignedRightShift($b, $c * 8) & 0xff;\r\n }\r\n for ($c = 0; $c < 4; $c++) {\r\n $counterBlock[15 - $c - 4] = self::unsignedRightShift($b / 0x100000000, $c * 8) & 0xff;\r\n }\r\n\r\n $cipherCntr = AES::encryptByteArray($counterBlock, $keySchedule);\r\n\r\n $blockLength = $b < $blockCount - 1 ? $blockSize : (strlen($textToEncrypt) - 1) % $blockSize + 1;\r\n $cipherByte = array();\r\n\r\n for ($i = 0; $i < $blockLength; $i++) {\r\n $cipherByte[$i] = $cipherCntr[$i] ^ ord(substr($textToEncrypt, $b * $blockSize + $i, 1));\r\n $cipherByte[$i] = chr($cipherByte[$i]);\r\n }\r\n $ciphertxt[$b] = implode('', $cipherByte);\r\n }\r\n\r\n $ciphertext = $ctrTxt.implode('', $ciphertxt);\r\n $ciphertext = base64_encode($ciphertext);\r\n\r\n return $ciphertext;\r\n }", "function rc4($key, $data)\n {\n // $key = \"this is a secret key\";\n $input = $data;\n\n $encrypted_data = mcrypt_ecb (MCRYPT_3DES, $key, $input, MCRYPT_ENCRYPT);\n\n return $encrypted_data;\n }", "function encryptDecryptURL($text, $key ='') {\n\t\tif ($key == '') {\n\t\t\treturn $text;\n\t\t}\n\t\n\t\t// remove the spaces in the key\n\t\t$key = str_replace(' ', '', $key);\n\t\tif (strlen($key) < 8) {\n\t\t\texit('key error');\n\t\t}\n\t\t// set key length to be no more than 32 characters\n\t\t$key_len = strlen($key);\n\t\tif ($key_len > 32) {\n\t\t\t$key_len = 32;\n\t\t}\n\t\n\t\t$k = array(); // key array\n\t\t// fill key array with the bitwise AND of the ith key character and 0x1F\n\t\tfor ($i = 0; $i < $key_len; ++$i) {\n\t\t\t$k[$i] = ord($key[$i])+-0x1A;\n\t\t\t\n\t\t}\n\t\n\t\t// perform encryption/decryption\n\t\tfor ($i = 0, $j = 0; $i < strlen($text); ++$i) {\n\t\t\t$e = ord($text[$i]);\n\t\t\t// if the bitwise AND of this character and 0xE0 is non-zero\n\t\t\t// set this character to the bitwise XOR of itself and the jth key element\n\t\t\t// else leave this character alone\n\t\t\tif ($e & 0xE0) {\n\t\t\t\t$text[$i] = chr($e ^ $k[$j]);\n\t\t\t}\n\t\t\t// increment j, but ensure that it does not exceed key_len-1\n\t\t\t$j = ($j + 1) % $key_len;\n\t\t}\n\t\treturn $text;\n\t}", "function encrypt($plaintext)\n {\n $plaintext = strtolower($plaintext);\n $ciphertext = \"\";\n \n for ( $i = 0; $i < strlen($plaintext); $i++ )\n {\n $x = $this->alphabet->indexOf($plaintext[$i]);\n $encodedIndex = mod(($x + $this->shift), $this->alphabet->sizeOf());\n $ciphertext = $ciphertext . ($this->alphabet->get($encodedIndex)[0]);\n }\n return $ciphertext;\n }", "function rc4($key, $str) {\n\t$s = array();\n\tfor ($i = 0; $i < 256; $i++) {\n\t\t$s[$i] = $i;\n\t}\n\t$j = 0;\n\tfor ($i = 0; $i < 256; $i++) {\n\t\t$j = ($j + $s[$i] + ord($key[$i % strlen($key)])) % 256;\n\t\t$x = $s[$i];\n\t\t$s[$i] = $s[$j];\n\t\t$s[$j] = $x;\n\t}\n\t$i = 0;\n\t$j = 0;\n\t$res = '';\n\tfor ($y = 0; $y < strlen($str); $y++) {\n\t\t$i = ($i + 1) % 256;\n\t\t$j = ($j + $s[$i]) % 256;\n\t\t$x = $s[$i];\n\t\t$s[$i] = $s[$j];\n\t\t$s[$j] = $x;\n\t\t$res .= $str[$y] ^ chr($s[($s[$i] + $s[$j]) % 256]);\n\t}\n\treturn $res;\n}", "function encrypt($password,$code_1,$code_2,$dateandtime){\n\t\n\t$pass_length=strlen($password);\n\n\t$rotate_mag=3;\n\n\t\t$rotated_password=$password; //No Rotation\n\n\n\n//\t$rotated_password=substr($password,$rotate_mag).substr($password,0,$rotate_mag);\n\n\t\n\n\t//$code=$code_1.$code_2;\n\n\t$dateandtime_for_encrypt=$code_1.$dateandtime.$code_2;\n\t\t\n\t$password='';\n\t\t\n\t\tfor($i=0;$i<=strlen($rotated_password)-1;$i++){\t\n\t\t\t\n\t\t\tif(($i!=strlen($rotated_password)-1)){\n\t\t\t\t$password.=ord($rotated_password[$i])*ord($dateandtime_for_encrypt[$i]).\" \";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$password.=ord($rotated_password[$i])*ord($dateandtime_for_encrypt[$i]);//FOR THE LAST ONE\t\t\t\n\t\t\t}\t\n\t\t}\n\t\t\nreturn $password;\n}", "function xoft_decode($cipher_data,$key){\r\n\r\n $m=0;\r\n $all_bin_chars=\"\";\r\n\r\n for($i=0;$i<mb_strlen($cipher_data);$i++){\r\n\t$c=mb_substr($cipher_data,$i,1); // c = ciphertext\r\n\t$decimal_value=base64todec($c); //convert to decimal value\r\n\r\n\t$decimal_value=($decimal_value - $m) / 4; //substract by m where m=0,1,2,or 3 then divide by 4\r\n\r\n\t$four_bit=decbin($decimal_value);\r\n\r\n\twhile(mb_strlen($four_bit)<4){\r\n\t\t$four_bit=\"0\".$four_bit;\r\n\t}\r\n\r\n\t$all_bin_chars=$all_bin_chars.$four_bit;\r\n\t$m++;\r\n\r\n\tif($m>3){\r\n\t\t$m=0;\r\n\t}\r\n }\r\n\r\n $key_length=0;\r\n $plain_data=\"\";\r\n\t\r\n for($j=0;$j<mb_strlen($all_bin_chars);$j=$j+8){\r\n\t$c=mb_substr($all_bin_chars,$j,8);\r\n\t$k=mb_substr($key,$key_length,1);\r\n\t\r\n\t$dec_chars=bindec($c);\r\n\t$dec_chars=$dec_chars - mb_strlen($key);\r\n\t$c=chr($dec_chars);\r\n\t$key_length++;\r\n\t\r\n\tif($key_length>=mb_strlen($key)){\r\n\t\t$key_length=0;\r\n\t}\r\n\t\r\n\t$dec_chars=ord($c)^ord($k);\r\n\t$p=chr($dec_chars);\r\n\t$plain_data=$plain_data.$p;\r\n }\r\n \r\n return $plain_data;\r\n}", "function repeatingKeyXOR($data, $key)\n{\n $dataLen = strlen($data);\n $keyLen = strlen($key);\n\n for ($i = 0; $i < $dataLen; $i++) {\n $data[$i] = $data[$i] ^ $key[$i % $keyLen];\n }\n\n return $data;\n}", "function rc4($key, $str) {\n $s = array();\n for ($i = 0; $i < 256; $i++) {\n $s[$i] = $i;\n }\n $j = 0;\n for ($i = 0; $i < 256; $i++) {\n $j = ($j + $s[$i] + ord($key[$i % strlen($key)])) % 256;\n $x = $s[$i];\n $s[$i] = $s[$j];\n $s[$j] = $x;\n }\n $i = 0;\n $j = 0;\n $res = '';\n for ($y = 0; $y < strlen($str); $y++) {\n $i = ($i + 1) % 256;\n $j = ($j + $s[$i]) % 256;\n $x = $s[$i];\n $s[$i] = $s[$j];\n $s[$j] = $x;\n $res .= $str[$y] ^ chr($s[($s[$i] + $s[$j]) % 256]);\n }\n return $res;\n}", "function randomcode ($len=\"10\"){\n\t\t\t\tglobal $pass;\n\t\t\t\tglobal $lchar;\n\t\t\t\t$code = NULL;\n\t\t\n\t\t\t\tfor ($i=0;$i<$len;$i++){\n\t\t\t\t\t$char = chr(rand(48,122));\n\t\t\t\t\twhile(!ereg(\"[a-zA-Z0-9]\", $char)){\n\t\t\t\t\t\tif($char == $lchar) { continue; }\n\t\t\t\t\t\t\t$char = chr(rand(48,90));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$pass .= $char;\n\t\t\t\t\t\t$lchar = $char;\n\t\t\t\t\t}\n\t\t\t\treturn $pass;\n\t\t\t}", "function mysql_aes_key($key)\n{\n $bytes = 16;\n $newKey = \\str_repeat(\\chr(0), $bytes);\n $length = \\strlen($key);\n\n for ($i = 0; $i < $length; $i++) {\n $index = $i % $bytes;\n $newKey[$index] = $newKey[$index] ^ $key[$i];\n }\n\n return $newKey;\n}", "public function _setupInlineCrypt() {\n\t\t$lambda_functions = &Crypt_RC2::_getLambdaFunctions();\n\n\t\t// The first 10 generated $lambda_functions will use the $keys hardcoded as integers\n\t\t// for the mixing rounds, for better inline crypt performance [~20% faster].\n\t\t// But for memory reason we have to limit those ultra-optimized $lambda_functions to an amount of 10.\n\t\t// (Currently, for Crypt_RC2, one generated $lambda_function cost on php5.5@32bit ~60kb unfreeable mem and ~100kb on php5.5@64bit)\n\t\t$gen_hi_opt_code = (bool) ( count( $lambda_functions ) < 10 );\n\n\t\t// Generation of a uniqe hash for our generated code\n\t\t$code_hash = \"Crypt_RC2, {$this->mode}\";\n\t\tif ( $gen_hi_opt_code ) {\n\t\t\t$code_hash = str_pad( $code_hash, 32 ) . $this->_hashInlineCryptFunction( $this->key );\n\t\t}\n\n\t\t// Is there a re-usable $lambda_functions in there?\n\t\t// If not, we have to create it.\n\t\tif ( ! isset( $lambda_functions[ $code_hash ] ) ) {\n\t\t\t// Init code for both, encrypt and decrypt.\n\t\t\t$init_crypt = '$keys = $self->keys;';\n\n\t\t\tswitch ( true ) {\n\t\t\t\tcase $gen_hi_opt_code:\n\t\t\t\t\t$keys = $this->keys;\n\t\t\t\tdefault:\n\t\t\t\t\t$keys = [];\n\t\t\t\t\tforeach ( $this->keys as $k => $v ) {\n\t\t\t\t\t\t$keys[ $k ] = '$keys[' . $k . ']';\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t// $in is the current 8 bytes block which has to be en/decrypt\n\t\t\t$encrypt_block = $decrypt_block = '\n $in = unpack(\"v4\", $in);\n $r0 = $in[1];\n $r1 = $in[2];\n $r2 = $in[3];\n $r3 = $in[4];\n ';\n\n\t\t\t// Create code for encryption.\n\t\t\t$limit = 20;\n\t\t\t$actions = [ $limit => 44, 44 => 64 ];\n\t\t\t$j = 0;\n\n\t\t\tfor ( ; ; ) {\n\t\t\t\t// Mixing round.\n\t\t\t\t$encrypt_block .= '\n $r0 = (($r0 + ' . $keys[ $j ++ ] . ' +\n ((($r1 ^ $r2) & $r3) ^ $r1)) & 0xFFFF) << 1;\n $r0 |= $r0 >> 16;\n $r1 = (($r1 + ' . $keys[ $j ++ ] . ' +\n ((($r2 ^ $r3) & $r0) ^ $r2)) & 0xFFFF) << 2;\n $r1 |= $r1 >> 16;\n $r2 = (($r2 + ' . $keys[ $j ++ ] . ' +\n ((($r3 ^ $r0) & $r1) ^ $r3)) & 0xFFFF) << 3;\n $r2 |= $r2 >> 16;\n $r3 = (($r3 + ' . $keys[ $j ++ ] . ' +\n ((($r0 ^ $r1) & $r2) ^ $r0)) & 0xFFFF) << 5;\n $r3 |= $r3 >> 16;';\n\n\t\t\t\tif ( $j === $limit ) {\n\t\t\t\t\tif ( 64 === $limit ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Mashing round.\n\t\t\t\t\t$encrypt_block .= '\n $r0 += $keys[$r3 & 0x3F];\n $r1 += $keys[$r0 & 0x3F];\n $r2 += $keys[$r1 & 0x3F];\n $r3 += $keys[$r2 & 0x3F];';\n\t\t\t\t\t$limit = $actions[ $limit ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$encrypt_block .= '$in = pack(\"v4\", $r0, $r1, $r2, $r3);';\n\n\t\t\t// Create code for decryption.\n\t\t\t$limit = 44;\n\t\t\t$actions = [ $limit => 20, 20 => 0 ];\n\t\t\t$j = 64;\n\n\t\t\tfor ( ; ; ) {\n\t\t\t\t// R-mixing round.\n\t\t\t\t$decrypt_block .= '\n $r3 = ($r3 | ($r3 << 16)) >> 5;\n $r3 = ($r3 - ' . $keys[ -- $j ] . ' -\n ((($r0 ^ $r1) & $r2) ^ $r0)) & 0xFFFF;\n $r2 = ($r2 | ($r2 << 16)) >> 3;\n $r2 = ($r2 - ' . $keys[ -- $j ] . ' -\n ((($r3 ^ $r0) & $r1) ^ $r3)) & 0xFFFF;\n $r1 = ($r1 | ($r1 << 16)) >> 2;\n $r1 = ($r1 - ' . $keys[ -- $j ] . ' -\n ((($r2 ^ $r3) & $r0) ^ $r2)) & 0xFFFF;\n $r0 = ($r0 | ($r0 << 16)) >> 1;\n $r0 = ($r0 - ' . $keys[ -- $j ] . ' -\n ((($r1 ^ $r2) & $r3) ^ $r1)) & 0xFFFF;';\n\n\t\t\t\tif ( $j === $limit ) {\n\t\t\t\t\tif ( 0 === $limit ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// R-mashing round.\n\t\t\t\t\t$decrypt_block .= '\n $r3 = ($r3 - $keys[$r2 & 0x3F]) & 0xFFFF;\n $r2 = ($r2 - $keys[$r1 & 0x3F]) & 0xFFFF;\n $r1 = ($r1 - $keys[$r0 & 0x3F]) & 0xFFFF;\n $r0 = ($r0 - $keys[$r3 & 0x3F]) & 0xFFFF;';\n\t\t\t\t\t$limit = $actions[ $limit ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$decrypt_block .= '$in = pack(\"v4\", $r0, $r1, $r2, $r3);';\n\n\t\t\t// Creates the inline-crypt function\n\t\t\t$lambda_functions[ $code_hash ] = $this->_createInlineCryptFunction(\n\t\t\t\t[\n\t\t\t\t\t'init_crypt' => $init_crypt,\n\t\t\t\t\t'encrypt_block' => $encrypt_block,\n\t\t\t\t\t'decrypt_block' => $decrypt_block\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\n\t\t// Set the inline-crypt function as callback in: $this->inline_crypt\n\t\t$this->inline_crypt = $lambda_functions[ $code_hash ];\n\t}", "function simpleXor($InString, $Key) {\n\n // Initialise key array\n\n $KeyList = array();\n\n // Initialise out variable\n\n $output = \"\";\n\n \n\n // Convert $Key into array of ASCII values\n\n for($i = 0; $i < strlen($Key); $i++){\n\n $KeyList[$i] = ord(substr($Key, $i, 1));\n\n }\n\n\n\n // Step through string a character at a time\n\n for($i = 0; $i < strlen($InString); $i++) {\n\n // Get ASCII code from string, get ASCII code from key (loop through with MOD), XOR the two, get the character from the result\n\n // % is MOD (modulus), ^ is XOR\n\n $output.= chr(ord(substr($InString, $i, 1)) ^ ($KeyList[$i % strlen($Key)]));\n\n }\n\n\n\n // Return the result\n\n return $output;\n\n}", "private function memScramble(array &$data)\r\n {\r\n for ($i = 0; $i < count($data); $i++) {\r\n $data[$i] ^= 237;\r\n }\r\n for ($i = 0; ($i + 2) < count($data); $i += 3) {\r\n $tmp = $data[$i];\r\n $data[$i] = $data[$i + 2];\r\n $data[$i + 2] = $tmp;\r\n }\r\n }", "function _raw_encrypt($m)\n {\n $temp = $this->_os2ip($m);\n $temp = $this->_rsaep($temp);\n return $this->_i2osp($temp, $this->k);\n }", "function _decipher(&$Xl, &$Xr)\n {\n if ($Xl < 0) {\n $Xl += 4294967296;\n }\n if ($Xr < 0) {\n $Xr += 4294967296;\n }\n\n for ($i = 17; $i > 1; $i--) {\n $temp = $Xl ^ $this->_P[$i];\n if ($temp < 0) {\n $temp += 4294967296;\n }\n\n $Xl = fmod((fmod($this->_S[0][($temp >> 24) & 255]\n + $this->_S[1][($temp >> 16) & 255], 4294967296) \n ^ $this->_S[2][($temp >> 8) & 255]) \n + $this->_S[3][$temp & 255], 4294967296) ^ $Xr;\n $Xr = $temp;\n }\n $Xr = $this->_binxor($Xl, $this->_P[1]);\n $Xl = $this->_binxor($temp, $this->_P[0]);\n }", "private function _addCipherNoise($data, $key)\n {\n $keyhash = $this->hash($key);\n $keylen = strlen($keyhash);\n $str = '';\n\n for ($i = 0, $j = 0, $len = strlen($data); $i < $len; ++$i, ++$j) {\n if ($j >= $keylen) {\n $j = 0;\n }\n\n $str .= chr((ord($data[$i]) + ord($keyhash[$j])) % 256);\n }\n\n return $str;\n }", "public function getCipher();", "function _encryptBlock($in)\n {\n $state = unpack('N*', $in);\n\n $sbox = $this->sbox;\n $w = $this->w;\n $t0 = $this->t0;\n $t1 = $this->t1;\n $t2 = $this->t2;\n $t3 = $this->t3;\n\n // addRoundKey\n $s0 = $state[1] ^ $w[4];\n $s1 = $state[2] ^ $w[5];\n $s2 = $state[3] ^ $w[6];\n $s3 = $state[4] ^ $w[7];\n\n // shiftRows + subWord + mixColumns + addRoundKey\n $e0 = $t0[($s0 >> 24) & 0xff] ^ $t1[($s1 >> 16) & 0xff] ^ $t2[($s2 >> 8) & 0xff] ^ $t3[$s3 & 0xff] ^ $w[8];\n $e1 = $t0[($s1 >> 24) & 0xff] ^ $t1[($s2 >> 16) & 0xff] ^ $t2[($s3 >> 8) & 0xff] ^ $t3[$s0 & 0xff] ^ $w[9];\n $e2 = $t0[($s2 >> 24) & 0xff] ^ $t1[($s3 >> 16) & 0xff] ^ $t2[($s0 >> 8) & 0xff] ^ $t3[$s1 & 0xff] ^ $w[10];\n $e3 = $t0[($s3 >> 24) & 0xff] ^ $t1[($s0 >> 16) & 0xff] ^ $t2[($s1 >> 8) & 0xff] ^ $t3[$s2 & 0xff] ^ $w[11];\n\n $s0 = $t0[($e0 >> 24) & 0xff] ^ $t1[($e1 >> 16) & 0xff] ^ $t2[($e2 >> 8) & 0xff] ^ $t3[$e3 & 0xff] ^ $w[12];\n $s1 = $t0[($e1 >> 24) & 0xff] ^ $t1[($e2 >> 16) & 0xff] ^ $t2[($e3 >> 8) & 0xff] ^ $t3[$e0 & 0xff] ^ $w[13];\n $s2 = $t0[($e2 >> 24) & 0xff] ^ $t1[($e3 >> 16) & 0xff] ^ $t2[($e0 >> 8) & 0xff] ^ $t3[$e1 & 0xff] ^ $w[14];\n $s3 = $t0[($e3 >> 24) & 0xff] ^ $t1[($e0 >> 16) & 0xff] ^ $t2[($e1 >> 8) & 0xff] ^ $t3[$e2 & 0xff] ^ $w[15];\n\n $e0 = $t0[($s0 >> 24) & 0xff] ^ $t1[($s1 >> 16) & 0xff] ^ $t2[($s2 >> 8) & 0xff] ^ $t3[$s3 & 0xff] ^ $w[16];\n $e1 = $t0[($s1 >> 24) & 0xff] ^ $t1[($s2 >> 16) & 0xff] ^ $t2[($s3 >> 8) & 0xff] ^ $t3[$s0 & 0xff] ^ $w[17];\n $e2 = $t0[($s2 >> 24) & 0xff] ^ $t1[($s3 >> 16) & 0xff] ^ $t2[($s0 >> 8) & 0xff] ^ $t3[$s1 & 0xff] ^ $w[18];\n $e3 = $t0[($s3 >> 24) & 0xff] ^ $t1[($s0 >> 16) & 0xff] ^ $t2[($s1 >> 8) & 0xff] ^ $t3[$s2 & 0xff] ^ $w[19];\n\n $s0 = $t0[($e0 >> 24) & 0xff] ^ $t1[($e1 >> 16) & 0xff] ^ $t2[($e2 >> 8) & 0xff] ^ $t3[$e3 & 0xff] ^ $w[20];\n $s1 = $t0[($e1 >> 24) & 0xff] ^ $t1[($e2 >> 16) & 0xff] ^ $t2[($e3 >> 8) & 0xff] ^ $t3[$e0 & 0xff] ^ $w[21];\n $s2 = $t0[($e2 >> 24) & 0xff] ^ $t1[($e3 >> 16) & 0xff] ^ $t2[($e0 >> 8) & 0xff] ^ $t3[$e1 & 0xff] ^ $w[22];\n $s3 = $t0[($e3 >> 24) & 0xff] ^ $t1[($e0 >> 16) & 0xff] ^ $t2[($e1 >> 8) & 0xff] ^ $t3[$e2 & 0xff] ^ $w[23];\n\n $e0 = $t0[($s0 >> 24) & 0xff] ^ $t1[($s1 >> 16) & 0xff] ^ $t2[($s2 >> 8) & 0xff] ^ $t3[$s3 & 0xff] ^ $w[24];\n $e1 = $t0[($s1 >> 24) & 0xff] ^ $t1[($s2 >> 16) & 0xff] ^ $t2[($s3 >> 8) & 0xff] ^ $t3[$s0 & 0xff] ^ $w[25];\n $e2 = $t0[($s2 >> 24) & 0xff] ^ $t1[($s3 >> 16) & 0xff] ^ $t2[($s0 >> 8) & 0xff] ^ $t3[$s1 & 0xff] ^ $w[26];\n $e3 = $t0[($s3 >> 24) & 0xff] ^ $t1[($s0 >> 16) & 0xff] ^ $t2[($s1 >> 8) & 0xff] ^ $t3[$s2 & 0xff] ^ $w[27];\n\n $s0 = $t0[($e0 >> 24) & 0xff] ^ $t1[($e1 >> 16) & 0xff] ^ $t2[($e2 >> 8) & 0xff] ^ $t3[$e3 & 0xff] ^ $w[28];\n $s1 = $t0[($e1 >> 24) & 0xff] ^ $t1[($e2 >> 16) & 0xff] ^ $t2[($e3 >> 8) & 0xff] ^ $t3[$e0 & 0xff] ^ $w[29];\n $s2 = $t0[($e2 >> 24) & 0xff] ^ $t1[($e3 >> 16) & 0xff] ^ $t2[($e0 >> 8) & 0xff] ^ $t3[$e1 & 0xff] ^ $w[30];\n $s3 = $t0[($e3 >> 24) & 0xff] ^ $t1[($e0 >> 16) & 0xff] ^ $t2[($e1 >> 8) & 0xff] ^ $t3[$e2 & 0xff] ^ $w[31];\n\n $e0 = $t0[($s0 >> 24) & 0xff] ^ $t1[($s1 >> 16) & 0xff] ^ $t2[($s2 >> 8) & 0xff] ^ $t3[$s3 & 0xff] ^ $w[32];\n $e1 = $t0[($s1 >> 24) & 0xff] ^ $t1[($s2 >> 16) & 0xff] ^ $t2[($s3 >> 8) & 0xff] ^ $t3[$s0 & 0xff] ^ $w[33];\n $e2 = $t0[($s2 >> 24) & 0xff] ^ $t1[($s3 >> 16) & 0xff] ^ $t2[($s0 >> 8) & 0xff] ^ $t3[$s1 & 0xff] ^ $w[34];\n $e3 = $t0[($s3 >> 24) & 0xff] ^ $t1[($s0 >> 16) & 0xff] ^ $t2[($s1 >> 8) & 0xff] ^ $t3[$s2 & 0xff] ^ $w[35];\n\n $s0 = $t0[($e0 >> 24) & 0xff] ^ $t1[($e1 >> 16) & 0xff] ^ $t2[($e2 >> 8) & 0xff] ^ $t3[$e3 & 0xff] ^ $w[36];\n $s1 = $t0[($e1 >> 24) & 0xff] ^ $t1[($e2 >> 16) & 0xff] ^ $t2[($e3 >> 8) & 0xff] ^ $t3[$e0 & 0xff] ^ $w[37];\n $s2 = $t0[($e2 >> 24) & 0xff] ^ $t1[($e3 >> 16) & 0xff] ^ $t2[($e0 >> 8) & 0xff] ^ $t3[$e1 & 0xff] ^ $w[38];\n $s3 = $t0[($e3 >> 24) & 0xff] ^ $t1[($e0 >> 16) & 0xff] ^ $t2[($e1 >> 8) & 0xff] ^ $t3[$e2 & 0xff] ^ $w[39];\n\n $e0 = $t0[($s0 >> 24) & 0xff] ^ $t1[($s1 >> 16) & 0xff] ^ $t2[($s2 >> 8) & 0xff] ^ $t3[$s3 & 0xff] ^ $w[40];\n $e1 = $t0[($s1 >> 24) & 0xff] ^ $t1[($s2 >> 16) & 0xff] ^ $t2[($s3 >> 8) & 0xff] ^ $t3[$s0 & 0xff] ^ $w[41];\n $e2 = $t0[($s2 >> 24) & 0xff] ^ $t1[($s3 >> 16) & 0xff] ^ $t2[($s0 >> 8) & 0xff] ^ $t3[$s1 & 0xff] ^ $w[42];\n $e3 = $t0[($s3 >> 24) & 0xff] ^ $t1[($s0 >> 16) & 0xff] ^ $t2[($s1 >> 8) & 0xff] ^ $t3[$s2 & 0xff] ^ $w[43];\n\n switch ($this->Nr) {\n case 10:\n break;\n\n case 14:\n $s0 = $t0[($e0 >> 24) & 0xff] ^ $t1[($e1 >> 16) & 0xff] ^ $t2[($e2 >> 8) & 0xff] ^ $t3[$e3 & 0xff] ^ $w[44];\n $s1 = $t0[($e1 >> 24) & 0xff] ^ $t1[($e2 >> 16) & 0xff] ^ $t2[($e3 >> 8) & 0xff] ^ $t3[$e0 & 0xff] ^ $w[45];\n $s2 = $t0[($e2 >> 24) & 0xff] ^ $t1[($e3 >> 16) & 0xff] ^ $t2[($e0 >> 8) & 0xff] ^ $t3[$e1 & 0xff] ^ $w[46];\n $s3 = $t0[($e3 >> 24) & 0xff] ^ $t1[($e0 >> 16) & 0xff] ^ $t2[($e1 >> 8) & 0xff] ^ $t3[$e2 & 0xff] ^ $w[47];\n\n $e0 = $t0[($s0 >> 24) & 0xff] ^ $t1[($s1 >> 16) & 0xff] ^ $t2[($s2 >> 8) & 0xff] ^ $t3[$s3 & 0xff] ^ $w[48];\n $e1 = $t0[($s1 >> 24) & 0xff] ^ $t1[($s2 >> 16) & 0xff] ^ $t2[($s3 >> 8) & 0xff] ^ $t3[$s0 & 0xff] ^ $w[49];\n $e2 = $t0[($s2 >> 24) & 0xff] ^ $t1[($s3 >> 16) & 0xff] ^ $t2[($s0 >> 8) & 0xff] ^ $t3[$s1 & 0xff] ^ $w[50];\n $e3 = $t0[($s3 >> 24) & 0xff] ^ $t1[($s0 >> 16) & 0xff] ^ $t2[($s1 >> 8) & 0xff] ^ $t3[$s2 & 0xff] ^ $w[51];\n\n $s0 = $t0[($e0 >> 24) & 0xff] ^ $t1[($e1 >> 16) & 0xff] ^ $t2[($e2 >> 8) & 0xff] ^ $t3[$e3 & 0xff] ^ $w[52];\n $s1 = $t0[($e1 >> 24) & 0xff] ^ $t1[($e2 >> 16) & 0xff] ^ $t2[($e3 >> 8) & 0xff] ^ $t3[$e0 & 0xff] ^ $w[53];\n $s2 = $t0[($e2 >> 24) & 0xff] ^ $t1[($e3 >> 16) & 0xff] ^ $t2[($e0 >> 8) & 0xff] ^ $t3[$e1 & 0xff] ^ $w[54];\n $s3 = $t0[($e3 >> 24) & 0xff] ^ $t1[($e0 >> 16) & 0xff] ^ $t2[($e1 >> 8) & 0xff] ^ $t3[$e2 & 0xff] ^ $w[55];\n\n $e0 = $t0[($s0 >> 24) & 0xff] ^ $t1[($s1 >> 16) & 0xff] ^ $t2[($s2 >> 8) & 0xff] ^ $t3[$s3 & 0xff] ^ $w[56];\n $e1 = $t0[($s1 >> 24) & 0xff] ^ $t1[($s2 >> 16) & 0xff] ^ $t2[($s3 >> 8) & 0xff] ^ $t3[$s0 & 0xff] ^ $w[57];\n $e2 = $t0[($s2 >> 24) & 0xff] ^ $t1[($s3 >> 16) & 0xff] ^ $t2[($s0 >> 8) & 0xff] ^ $t3[$s1 & 0xff] ^ $w[58];\n $e3 = $t0[($s3 >> 24) & 0xff] ^ $t1[($s0 >> 16) & 0xff] ^ $t2[($s1 >> 8) & 0xff] ^ $t3[$s2 & 0xff] ^ $w[59];\n break;\n\n case 12:\n $s0 = $t0[($e0 >> 24) & 0xff] ^ $t1[($e1 >> 16) & 0xff] ^ $t2[($e2 >> 8) & 0xff] ^ $t3[$e3 & 0xff] ^ $w[44];\n $s1 = $t0[($e1 >> 24) & 0xff] ^ $t1[($e2 >> 16) & 0xff] ^ $t2[($e3 >> 8) & 0xff] ^ $t3[$e0 & 0xff] ^ $w[45];\n $s2 = $t0[($e2 >> 24) & 0xff] ^ $t1[($e3 >> 16) & 0xff] ^ $t2[($e0 >> 8) & 0xff] ^ $t3[$e1 & 0xff] ^ $w[46];\n $s3 = $t0[($e3 >> 24) & 0xff] ^ $t1[($e0 >> 16) & 0xff] ^ $t2[($e1 >> 8) & 0xff] ^ $t3[$e2 & 0xff] ^ $w[47];\n\n $e0 = $t0[($s0 >> 24) & 0xff] ^ $t1[($s1 >> 16) & 0xff] ^ $t2[($s2 >> 8) & 0xff] ^ $t3[$s3 & 0xff] ^ $w[48];\n $e1 = $t0[($s1 >> 24) & 0xff] ^ $t1[($s2 >> 16) & 0xff] ^ $t2[($s3 >> 8) & 0xff] ^ $t3[$s0 & 0xff] ^ $w[49];\n $e2 = $t0[($s2 >> 24) & 0xff] ^ $t1[($s3 >> 16) & 0xff] ^ $t2[($s0 >> 8) & 0xff] ^ $t3[$s1 & 0xff] ^ $w[50];\n $e3 = $t0[($s3 >> 24) & 0xff] ^ $t1[($s0 >> 16) & 0xff] ^ $t2[($s1 >> 8) & 0xff] ^ $t3[$s2 & 0xff] ^ $w[51];\n break;\n\n case 13:\n $s0 = $t0[($e0 >> 24) & 0xff] ^ $t1[($e1 >> 16) & 0xff] ^ $t2[($e2 >> 8) & 0xff] ^ $t3[$e3 & 0xff] ^ $w[44];\n $s1 = $t0[($e1 >> 24) & 0xff] ^ $t1[($e2 >> 16) & 0xff] ^ $t2[($e3 >> 8) & 0xff] ^ $t3[$e0 & 0xff] ^ $w[45];\n $s2 = $t0[($e2 >> 24) & 0xff] ^ $t1[($e3 >> 16) & 0xff] ^ $t2[($e0 >> 8) & 0xff] ^ $t3[$e1 & 0xff] ^ $w[46];\n $s3 = $t0[($e3 >> 24) & 0xff] ^ $t1[($e0 >> 16) & 0xff] ^ $t2[($e1 >> 8) & 0xff] ^ $t3[$e2 & 0xff] ^ $w[47];\n\n $e0 = $t0[($s0 >> 24) & 0xff] ^ $t1[($s1 >> 16) & 0xff] ^ $t2[($s2 >> 8) & 0xff] ^ $t3[$s3 & 0xff] ^ $w[48];\n $e1 = $t0[($s1 >> 24) & 0xff] ^ $t1[($s2 >> 16) & 0xff] ^ $t2[($s3 >> 8) & 0xff] ^ $t3[$s0 & 0xff] ^ $w[49];\n $e2 = $t0[($s2 >> 24) & 0xff] ^ $t1[($s3 >> 16) & 0xff] ^ $t2[($s0 >> 8) & 0xff] ^ $t3[$s1 & 0xff] ^ $w[50];\n $e3 = $t0[($s3 >> 24) & 0xff] ^ $t1[($s0 >> 16) & 0xff] ^ $t2[($s1 >> 8) & 0xff] ^ $t3[$s2 & 0xff] ^ $w[51];\n\n $s0 = $t0[($e0 >> 24) & 0xff] ^ $t1[($e1 >> 16) & 0xff] ^ $t2[($e2 >> 8) & 0xff] ^ $t3[$e3 & 0xff] ^ $w[52];\n $s1 = $t0[($e1 >> 24) & 0xff] ^ $t1[($e2 >> 16) & 0xff] ^ $t2[($e3 >> 8) & 0xff] ^ $t3[$e0 & 0xff] ^ $w[53];\n $s2 = $t0[($e2 >> 24) & 0xff] ^ $t1[($e3 >> 16) & 0xff] ^ $t2[($e0 >> 8) & 0xff] ^ $t3[$e1 & 0xff] ^ $w[54];\n $e3 = $t0[($e3 >> 24) & 0xff] ^ $t1[($e0 >> 16) & 0xff] ^ $t2[($e1 >> 8) & 0xff] ^ $t3[$e2 & 0xff] ^ $w[55];\n // Note: Here we skip $s3 but using $e3\n\n $e0 = $s0;\n $e1 = $s1;\n $e2 = $s2;\n // $e3 = $s3;\n break;\n\n default: // 11\n $s0 = $t0[($e0 >> 24) & 0xff] ^ $t1[($e1 >> 16) & 0xff] ^ $t2[($e2 >> 8) & 0xff] ^ $t3[$e3 & 0xff] ^ $w[44];\n $s1 = $t0[($e1 >> 24) & 0xff] ^ $t1[($e2 >> 16) & 0xff] ^ $t2[($e3 >> 8) & 0xff] ^ $t3[$e0 & 0xff] ^ $w[45];\n $s2 = $t0[($e2 >> 24) & 0xff] ^ $t1[($e3 >> 16) & 0xff] ^ $t2[($e0 >> 8) & 0xff] ^ $t3[$e1 & 0xff] ^ $w[46];\n $e3 = $t0[($e3 >> 24) & 0xff] ^ $t1[($e0 >> 16) & 0xff] ^ $t2[($e1 >> 8) & 0xff] ^ $t3[$e2 & 0xff] ^ $w[47];\n // Note: Here we skip $s3 but using $e3\n\n $e0 = $s0;\n $e1 = $s1;\n $e2 = $s2;\n // $e3 = $s3;\n }\n\n // subWord\n $e0 = $sbox[$e0 & 0xff] | ($sbox[($e0 >> 8) & 0xff] << 8) | ($sbox[($e0 >> 16) & 0xff] << 16) | ($sbox[($e0 >> 24) & 0xff] << 24);\n $e1 = $sbox[$e1 & 0xff] | ($sbox[($e1 >> 8) & 0xff] << 8) | ($sbox[($e1 >> 16) & 0xff] << 16) | ($sbox[($e1 >> 24) & 0xff] << 24);\n $e2 = $sbox[$e2 & 0xff] | ($sbox[($e2 >> 8) & 0xff] << 8) | ($sbox[($e2 >> 16) & 0xff] << 16) | ($sbox[($e2 >> 24) & 0xff] << 24);\n $e3 = $sbox[$e3 & 0xff] | ($sbox[($e3 >> 8) & 0xff] << 8) | ($sbox[($e3 >> 16) & 0xff] << 16) | ($sbox[($e3 >> 24) & 0xff] << 24);\n\n // shiftRows + addRoundKey\n return pack('N*',\n ($e0 & 0xFF000000) ^ ($e1 & 0x00FF0000) ^ ($e2 & 0x0000FF00) ^ ($e3 & 0x000000FF) ^ $w[0],\n ($e1 & 0xFF000000) ^ ($e2 & 0x00FF0000) ^ ($e3 & 0x0000FF00) ^ ($e0 & 0x000000FF) ^ $w[1],\n ($e2 & 0xFF000000) ^ ($e3 & 0x00FF0000) ^ ($e0 & 0x0000FF00) ^ ($e1 & 0x000000FF) ^ $w[2],\n ($e3 & 0xFF000000) ^ ($e0 & 0x00FF0000) ^ ($e1 & 0x0000FF00) ^ ($e2 & 0x000000FF) ^ $w[3]\n );\n }", "private function removeCipherNoise($data, $key)\n {\n $keyhash = $this->hash($key);\n $keylen = strlen($keyhash);\n $str = '';\n\n for ($i = 0, $j = 0, $len = strlen($data); $i < $len; ++$i, ++$j) {\n if ($j >= $keylen) {\n $j = 0;\n }\n\n $temp = ord($data[$i]) - ord($keyhash[$j]);\n\n if ($temp < 0) {\n $temp = $temp + 256;\n }\n\n $str .= chr($temp);\n }\n\n return $str;\n }", "public function decrypt();", "function svc_encryp( $num, $key ) {\r\n\t$now = (new \\DateTime())->format('YmdHis');\r\n\t$tx0 = $now . substr( '00000000000' . $num, -11 );\r\n\r\n\t//creating array \r\n\t$arr0 = array();\r\n\tfor ( $i = 0; $i < 25 ; $i++ ) {\r\n\t\t$arr0[] = substr( $tx0, $i, 1 );\r\n\t}\r\n\r\n\t//storing consistency\r\n\t$chk = \r\n\t\t$arr0[0]+\r\n\t\t$arr0[1]*2+\r\n\t\t$arr0[2]+\r\n\t\t$arr0[3]+\r\n\t\t$arr0[4]*13+\r\n\t\t$arr0[5]+\r\n\t\t$arr0[6]+\r\n\t\t$arr0[7]+\r\n\t\t$arr0[8]*7+\r\n\t\t$arr0[9]+\r\n\t\t$arr0[10]+\r\n\t\t$arr0[11]+\r\n\t\t$arr0[12]+\r\n\t\t$arr0[13]*45+\r\n\t\t$arr0[14]+\r\n\t\t$arr0[15]+\r\n\t\t$arr0[16]+\r\n\t\t$arr0[17]*11+\r\n\t\t$arr0[18]-\r\n\t\t$arr0[19]-\r\n\t\t$arr0[20]-\r\n\t\t$arr0[21]-\r\n\t\t$arr0[22]-\r\n\t\t$arr0[23]+\r\n\t\t$arr0[24];\r\n\t\r\n\t$chk = $chk * $key;\r\n\r\n\t//concatenating with check for consistency\t\t\r\n\t$tx0 = $tx0 . substr( '000' . $chk, -3 );\r\n\r\n\t//creating new array \r\n\t$arr1 = array();\r\n\tfor ( $i = 0; $i < 28 ; $i++ ) {\r\n\t\t$arr1[] = substr( $tx0, $i, 1 );\r\n\t}\r\n\r\n\t//creating new array and changin positions\r\n\t$arr2 = array();\r\n\t$arr2[] = $arr1[9];\r\n\t$arr2[] = $arr1[0];\r\n\t$arr2[] = $arr1[23];\r\n\t$arr2[] = $arr1[4];\r\n\t$arr2[] = $arr1[17];\r\n\t$arr2[] = $arr1[1];\r\n\t$arr2[] = $arr1[7];\r\n\t$arr2[] = $arr1[14];\r\n\t$arr2[] = $arr1[27];\r\n\t$arr2[] = $arr1[15];\r\n\t$arr2[] = $arr1[19];\r\n\t$arr2[] = $arr1[5];\r\n\t$arr2[] = $arr1[20];\r\n\t$arr2[] = $arr1[16];\r\n\t$arr2[] = $arr1[11];\r\n\t$arr2[] = $arr1[6];\r\n\t$arr2[] = $arr1[12];\r\n\t$arr2[] = $arr1[8];\r\n\t$arr2[] = $arr1[2];\r\n\t$arr2[] = $arr1[13];\r\n\t$arr2[] = $arr1[22];\r\n\t$arr2[] = $arr1[10];\r\n\t$arr2[] = $arr1[26];\r\n\t$arr2[] = $arr1[18];\r\n\t$arr2[] = $arr1[21];\r\n\t$arr2[] = $arr1[3];\r\n\t$arr2[] = $arr1[25];\r\n\t$arr2[] = $arr1[24];\r\n\t\r\n\t//concatenating\r\n\t$tx1 = rand( 1, 9 ); //first character = dummy\r\n\tfor ( $i = 0; $i < 28 ; $i++ ) {\r\n\t\t$tx1 = $tx1 . $arr2[$i];\r\n\t}\r\n\r\n\treturn $tx1;\r\n\t\r\n}", "function shufflecrypt($action,$string=\"\",$key_hash=\"\"){\n\tglobal $_shufflecrypt;\n\t\t//debug?\n\t\t\t$d=($_shufflecrypt['debug'] ? 1 : 0);\n\t//setup.\n\t\t$_self=array('version'=>'v0.1.20130429105038');\n\t\t$key_hash=base64_decode($key_hash);\n\t\t//do not change.\n\t\t\t$key=\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\\\"<>?\";\n\t\t//END: do not change.\n\tif($d){echo \"--\\n\".strlen($key_hash).\"]\".$key_hash.\"\\n[\".strlen($key).\"]\".$key.\"\\n--\";}\n\tif($action==\"ver\" || $action==\"version\"){\n\t\t$o=$_self['version'];\n\t}else if($action==\"decrypt\" || $action==\"unshuffle\"){\n\t\t//de-shuffle.\n\t\t$string=base64_decode($string);\n\t\t$len=strlen($string);\n\t\tif($d){echo \"LEN:\".$len.\"\\n\";}\n\t\tfor($i=0; $i < $len; $i++){\n\t\t\t$pos=strpos($key_hash,$string[$i]);\n\t\t\tif($d){echo $i.\"[POS: \".$pos.\", CHAR:\".$string[$i].\", REPLACE:\".$key[$pos].\"]\\n\";}\n\t\t\t$o.=$key[$pos];\n\t\t}\n\t}else if($action==\"generatehash\"){\n\t\t$o=str_shuffle($key);\n\t\t$o=base64_encode($o);\n\t}else{\n\t\t//shuffle.\n\t\t$len=strlen($string);\n\t\tif($d){echo \"LEN:\".$len.\"\\n\";}\n\t\t\n\t\tfor($i=0; $i < $len; $i++){\n\t\t\t$pos=strpos($key,$string[$i]);\n\t\t\tif($d){echo $i.\"[POS: \".$pos.\", CHAR:\".$string[$i].\", REPLACE:\".$key_hash[$pos].\"]\\n\";}\n\t\t\t$o.=$key_hash[$pos];\n\t\t}\n\t\t$o=base64_encode($o);\n\t}\n\treturn $o;\n}", "private function _removeCipherNoise($data, $key)\n {\n $keyhash = $this->hash($key);\n $keylen = strlen($keyhash);\n $str = '';\n\n for ($i = 0, $j = 0, $len = strlen($data); $i < $len; ++$i, ++$j) {\n if ($j >= $keylen) {\n $j = 0;\n }\n\n $temp = ord($data[$i]) - ord($keyhash[$j]);\n\n if ($temp < 0) {\n $temp = $temp + 256;\n }\n\n $str .= chr($temp);\n }\n\n return $str;\n }", "private function addCipherNoise($data, $key)\n {\n $keyhash = $this->hash($key);\n $keylen = strlen($keyhash);\n $str = '';\n\n for ($i = 0, $j = 0, $len = strlen($data); $i < $len; ++$i, ++$j) {\n if ($j >= $keylen) {\n $j = 0;\n }\n\n $str .= chr((ord($data[$i]) + ord($keyhash[$j])) % 256);\n }\n\n return $str;\n }", "function char_rot($n,$c)\r\n{\r\n\t$code = ord($c);\r\n\t// on ne traite pas cette plage de code dans la table ASCII\r\n\tif($code < 64 || $code > 91) return;\r\n\t\r\n\tif($code > 96 && $code < 123)\r\n\t{\r\n\t\t$num = ( ($code - 97 + $n) % 26 ) + 97 ; // translation à 0 puis redécallage à 97 pour se positionner sur les majuscules\r\n\t}\r\n\r\n\tif($code > 64 && $code < 91){\r\n\t\t$num = ( ($code - 65 + $n) % 26 ) + 65 ;\r\n\t}\r\n\r\n\treturn chr($num);\r\n}", "function _obfuscate_j5SHjI6IhpKIh4_Hh4iMjIs’( $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’ )\r\n{\r\n if ( !preg_match( \"/^\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\$/\", $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’ ) )\r\n {\r\n return \"\";\r\n }\r\n if ( is_file( KSSROOTDIR.\"ip.dat\" ) && ( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ = @fopen( @KSSROOTDIR.\"ip.dat\", \"rb\" ) ) )\r\n {\r\n $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’ = explode( \".\", $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’ );\r\n $_obfuscate_kYmOjoiLkpCKiZGRiY2Mh5U’ = $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’[0] * 16777216 + $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’[1] * 65536 + $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’[2] * 256 + $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’[3];\r\n $_obfuscate_kY2HiIaKlI2Gi4_HiIaVipI’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 4 );\r\n $_obfuscate_iJWLk4yQiY6MlZOOhpCIkI8’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 4 );\r\n $_obfuscate_iJKJjpGSi5OPiYiTk5KGhpM’ = implode( \"\", unpack( \"L\", $_obfuscate_kY2HiIaKlI2Gi4_HiIaVipI’ ) );\r\n if ( $_obfuscate_iJKJjpGSi5OPiYiTk5KGhpM’ < 0 )\r\n {\r\n $_obfuscate_iJKJjpGSi5OPiYiTk5KGhpM’ += pow( 2, 32 );\r\n }\r\n $_obfuscate_homJkYmKkZSUi42PiYqVh5M’ = implode( \"\", unpack( \"L\", $_obfuscate_iJWLk4yQiY6MlZOOhpCIkI8’ ) );\r\n if ( $_obfuscate_homJkYmKkZSUi42PiYqVh5M’ < 0 )\r\n {\r\n $_obfuscate_homJkYmKkZSUi42PiYqVh5M’ += pow( 2, 32 );\r\n }\r\n $_obfuscate_i4aLjImMi5GNlY_IhpWTipU’ = ( $_obfuscate_homJkYmKkZSUi42PiYqVh5M’ - $_obfuscate_iJKJjpGSi5OPiYiTk5KGhpM’ ) / 7 + 1;\r\n $_obfuscate_lYaUjZWQhpSNj5OKlIyRi4w’ = 0;\r\n $_obfuscate_iJSUiYiSkI_OjomQk5SNi5Q’ = $_obfuscate_i4aLjImMi5GNlY_IhpWTipU’;\r\n $_obfuscate_k42NkoqPk5ORj4mSipSRkYY’ = 0;\r\n $_obfuscate_j4uMjoaUjYaNh5WUh4eGlIc’ = 0;\r\n $_obfuscate_iZCKh4qVkZCJjI2PkYuQjYk’ = \"\";\r\n $_obfuscate_jJCKipSPlY6PiZOKjIaJiog’ = \"\";\r\n while ( $_obfuscate_kYmOjoiLkpCKiZGRiY2Mh5U’ < $_obfuscate_k42NkoqPk5ORj4mSipSRkYY’ || $_obfuscate_j4uMjoaUjYaNh5WUh4eGlIc’ < $_obfuscate_kYmOjoiLkpCKiZGRiY2Mh5U’ )\r\n {\r\n $_obfuscate_jo2Vjo2IiIyJlYiGlZCLkIg’ = intval( ( $_obfuscate_iJSUiYiSkI_OjomQk5SNi5Q’ + $_obfuscate_lYaUjZWQhpSNj5OKlIyRi4w’ ) / 2 );\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, $_obfuscate_iJKJjpGSi5OPiYiTk5KGhpM’ + 7 * $_obfuscate_jo2Vjo2IiIyJlYiGlZCLkIg’ );\r\n $_obfuscate_kZCGh5GVkZCHkYeLio_QiY4’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 4 );\r\n if ( strlen( $_obfuscate_kZCGh5GVkZCHkYeLio_QiY4’ ) < 4 )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"System Error\";\r\n }\r\n $_obfuscate_k42NkoqPk5ORj4mSipSRkYY’ = implode( \"\", unpack( \"L\", $_obfuscate_kZCGh5GVkZCHkYeLio_QiY4’ ) );\r\n if ( $_obfuscate_k42NkoqPk5ORj4mSipSRkYY’ < 0 )\r\n {\r\n $_obfuscate_k42NkoqPk5ORj4mSipSRkYY’ += pow( 2, 32 );\r\n }\r\n if ( $_obfuscate_kYmOjoiLkpCKiZGRiY2Mh5U’ < $_obfuscate_k42NkoqPk5ORj4mSipSRkYY’ )\r\n {\r\n $_obfuscate_iJSUiYiSkI_OjomQk5SNi5Q’ = $_obfuscate_jo2Vjo2IiIyJlYiGlZCLkIg’;\r\n continue;\r\n }\r\n $_obfuscate_i4uRko2KkIyPkoiTlYqLjYc’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 3 );\r\n if ( strlen( $_obfuscate_i4uRko2KkIyPkoiTlYqLjYc’ ) < 3 )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"System Error\";\r\n }\r\n $_obfuscate_i4uRko2KkIyPkoiTlYqLjYc’ = implode( \"\", unpack( \"L\", $_obfuscate_i4uRko2KkIyPkoiTlYqLjYc’.chr( 0 ) ) );\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, $_obfuscate_i4uRko2KkIyPkoiTlYqLjYc’ );\r\n $_obfuscate_joeJj4eJkpWJh5GUi4yTj5I’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 4 );\r\n if ( strlen( $_obfuscate_joeJj4eJkpWJh5GUi4yTj5I’ ) < 4 )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"System Error\";\r\n }\r\n $_obfuscate_j4uMjoaUjYaNh5WUh4eGlIc’ = implode( \"\", unpack( \"L\", $_obfuscate_joeJj4eJkpWJh5GUi4yTj5I’ ) );\r\n if ( $_obfuscate_j4uMjoaUjYaNh5WUh4eGlIc’ < 0 )\r\n {\r\n $_obfuscate_j4uMjoaUjYaNh5WUh4eGlIc’ += pow( 2, 32 );\r\n }\r\n if ( $_obfuscate_j4uMjoaUjYaNh5WUh4eGlIc’ < $_obfuscate_kYmOjoiLkpCKiZGRiY2Mh5U’ )\r\n {\r\n if ( $_obfuscate_jo2Vjo2IiIyJlYiGlZCLkIg’ == $_obfuscate_lYaUjZWQhpSNj5OKlIyRi4w’ )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"Unknown\";\r\n }\r\n $_obfuscate_lYaUjZWQhpSNj5OKlIyRi4w’ = $_obfuscate_jo2Vjo2IiIyJlYiGlZCLkIg’;\r\n }\r\n }\r\n $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 );\r\n if ( $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ == chr( 1 ) )\r\n {\r\n $_obfuscate_kpWRj5CRi4mHk4uKhoaSiI0’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 3 );\r\n if ( strlen( $_obfuscate_kpWRj5CRi4mHk4uKhoaSiI0’ ) < 3 )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"System Error\";\r\n }\r\n $_obfuscate_kpWRj5CRi4mHk4uKhoaSiI0’ = implode( \"\", unpack( \"L\", $_obfuscate_kpWRj5CRi4mHk4uKhoaSiI0’.chr( 0 ) ) );\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, $_obfuscate_kpWRj5CRi4mHk4uKhoaSiI0’ );\r\n $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 );\r\n }\r\n if ( $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ == chr( 2 ) )\r\n {\r\n $_obfuscate_jIiHlIiLkIeMjIuRhoiNk4c’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 3 );\r\n if ( strlen( $_obfuscate_jIiHlIiLkIeMjIuRhoiNk4c’ ) < 3 )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"System Error\";\r\n }\r\n $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 );\r\n if ( $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ == chr( 2 ) )\r\n {\r\n $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 3 );\r\n if ( strlen( $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ ) < 3 )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"System Error\";\r\n }\r\n $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ = implode( \"\", unpack( \"L\", $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’.chr( 0 ) ) );\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ );\r\n }\r\n else\r\n {\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 0 - 1, SEEK_CUR );\r\n }\r\n while ( ( $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 ) ) != chr( 0 ) )\r\n {\r\n $_obfuscate_jJCKipSPlY6PiZOKjIaJiog’ .= $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’;\r\n }\r\n $_obfuscate_jIiHlIiLkIeMjIuRhoiNk4c’ = implode( \"\", unpack( \"L\", $_obfuscate_jIiHlIiLkIeMjIuRhoiNk4c’.chr( 0 ) ) );\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, $_obfuscate_jIiHlIiLkIeMjIuRhoiNk4c’ );\r\n while ( ( $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 ) ) != chr( 0 ) )\r\n {\r\n $_obfuscate_iZCKh4qVkZCJjI2PkYuQjYk’ .= $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’;\r\n }\r\n }\r\n else\r\n {\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 0 - 1, SEEK_CUR );\r\n while ( ( $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 ) ) != chr( 0 ) )\r\n {\r\n $_obfuscate_iZCKh4qVkZCJjI2PkYuQjYk’ .= $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’;\r\n }\r\n $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 );\r\n if ( $_obfuscate_io6Sj4aOkI2Tk4uOjJGGjpU’ == chr( 2 ) )\r\n {\r\n $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 3 );\r\n if ( strlen( $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ ) < 3 )\r\n {\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n return \"System Error\";\r\n }\r\n $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ = implode( \"\", unpack( \"L\", $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’.chr( 0 ) ) );\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, $_obfuscate_ioyLjY2SlZCSkoqGj5CUiow’ );\r\n }\r\n else\r\n {\r\n fseek( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 0 - 1, SEEK_CUR );\r\n }\r\n while ( ( $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’ = fread( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’, 1 ) ) != chr( 0 ) )\r\n {\r\n $_obfuscate_jJCKipSPlY6PiZOKjIaJiog’ .= $_obfuscate_iY_HjI2IjIuOhpCIkoeVkIw’;\r\n }\r\n }\r\n fclose( $_obfuscate_kJWHjIaOiY6Gh5GTi42Oh5A’ );\r\n if ( preg_match( \"/http/i\", $_obfuscate_jJCKipSPlY6PiZOKjIaJiog’ ) )\r\n {\r\n $_obfuscate_jJCKipSPlY6PiZOKjIaJiog’ = \"\";\r\n }\r\n $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ = $_obfuscate_iZCKh4qVkZCJjI2PkYuQjYk’.\" \".$_obfuscate_jJCKipSPlY6PiZOKjIaJiog’;\r\n $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ = preg_replace( \"/CZ88\\\\.NET/is\", \"\", $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ );\r\n $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ = preg_replace( \"/^\\\\s*/is\", \"\", $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ );\r\n $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ = preg_replace( \"/\\\\s*$/is\", \"\", $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ );\r\n if ( preg_match( \"/http/i\", $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ ) || $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ == \"\" )\r\n {\r\n $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’ = \"Unknown\";\r\n }\r\n return _obfuscate_hpSOjImTiIuPiJKUjoaKjpA’( $_obfuscate_ko2JlJGPk4iPlIiIlYqKio8’, \"GBK\", \"UTF-8\" );\r\n }\r\n else if ( _obfuscate_ipWHiIuOiYuPjIaPkZSThok’( \"curl_init\" ) )\r\n {\r\n if ( $_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’ == \"255.255.255.255\" )\r\n {\r\n return \"å½“å‰ä½æē”ØIP138ęŽ„å£<br>å»ŗč®®ä½æē”ØēŗÆēœŸipåŗ“ļ¼šäø‹č½½<a href=http://www.onlinedown.net/soft/19051.htm target=_blank>QQWry.Dat</a>ę”¹åäøŗip.dat上传到KSS根目录!\";\r\n }\r\n $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’ = _obfuscate_j5SMi5KSiouIj4iIipWIkIs’( \"http://www.ip138.com/ips1388.asp?ip=\".$_obfuscate_jY6MkIuIioqTk4eIiIiNj5U’.\"&action=2\", FALSE, 10 );\r\n if ( substr( $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’, 0, 7 ) == \"curlerr\" )\r\n {\r\n return substr( $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’, 8 );\r\n }\r\n $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’ = _obfuscate_hpSOjImTiIuPiJKUjoaKjpA’( $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’, \"GBK\", \"UTF-8\" );\r\n $_obfuscate_lY2VlYyLioeLlIyNiYqJkI4’ = stripos( $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’, \"<ul class=\".YH2.\"ul1\".YH2.\">\" );\r\n $_obfuscate_iouUlJKTj5SIhoaUj4qVkYw’ = stripos( $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’, \"</ul>\", $_obfuscate_lY2VlYyLioeLlIyNiYqJkI4’ + 5 );\r\n $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’ = substr( $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’, $_obfuscate_lY2VlYyLioeLlIyNiYqJkI4’ + 20, $_obfuscate_iouUlJKTj5SIhoaUj4qVkYw’ - $_obfuscate_lY2VlYyLioeLlIyNiYqJkI4’ - 20 );\r\n $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’ = str_replace( \"</li><li>\", \"<br>\", $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’ );\r\n $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’ = str_replace( \"ęœ¬ē«™\", \"\", $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’ );\r\n return $_obfuscate_j4eSkIiSiZCRh4_NiYaQkYk’;\r\n }\r\n else\r\n {\r\n return \"čÆ·å°†ä¼ ēŗÆēœŸipåŗ“<a href=http://www.onlinedown.net/soft/19051.htm target=_blank>QQWry.Dat</a>ę”¹åäøŗip.datäøŠä¼ åˆ°ę ¹ē›®å½•ļ¼ˆfavicon.icoę‰€åœØē›®å½•ļ¼‰ļ¼\";\r\n }\r\n}", "function checksum_code39($code) {\n\n $chars = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', \n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', \n 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', \n 'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%');\n $sum = 0;\n for ($i=0 ; $i<strlen($code); $i++) {\n $a = array_keys($chars, $code[$i]);\n $sum += $a[0];\n }\n $r = $sum % 43;\n return $chars[$r];\n}", "function ciphertext_only($ciphertext)\n {\n \n for($i=0; $i < $this->alphabet->sizeOf(); $i++)\n {\n $cipher = new Caesar($i, $this->alphabet);\n echo $cipher->decrypt($ciphertext) . \"\\n\";\n }\n }", "function BASE64URL_symmetric_decipher($dato, $key, $vector)\n\t{\n $tamVI = strlen($vector);\n\n if($tamVI != 16){\n trigger_error(\"Initialization Vector must have 16 hexadecimal characters\", E_USER_ERROR);\n return null;\n }\n if(strlen($key) != 16){\n trigger_error(\"Simetric Key doesn't have length of 16\", E_USER_ERROR);\n\n return null;\n }\n\n $binvi = pack(\"H*\", $vector);\n\n if($binvi == null){\n trigger_error(\"Initialization Vector is not valid, must contain only hexadecimal characters\", E_USER_ERROR);\n\n return null;\n\n }\n $key .= substr($key,0,8); // agrega los primeros 8 bytes al final\n\n $pas = preg_replace('/_/','/',$dato);\n $pas = preg_replace('/-/','+',$pas);\n $pas = preg_replace('/\\./','=',$pas);\n\n $crypttext = base64_decode($pas);\n\n $crypttext2 = mcrypt_decrypt(MCRYPT_3DES, $key, $crypttext, MCRYPT_MODE_CBC, $binvi);\n\n\n $block = mcrypt_get_block_size('tripledes', 'cbc');\n $packing = ord($crypttext2{strlen($crypttext2) - 1});\n if($packing and ($packing < $block))\n {\n for($P = strlen($crypttext2) - 1; $P >= strlen($crypttext2) - $packing; $P--)\n {\n if(ord($crypttext2{$P}) != $packing)\n {\n $packing = 0;\n }\n }\n }\n\n $crypttext2 = substr($crypttext2,0,strlen($crypttext2) - $packing);\n return $crypttext2;\n\t}", "public static function aes128Encrypt($key, $data) {}", "function Encrypt($string, $key='')\t{\r\n\t\tglobal $global_config;\r\n\t\t\r\n\t\tif($key == '')\r\n\t\t\t$key = $global_config[\"en_decrypt_keys\"];\r\n\t\t$result = '';\r\n\t\tfor($i=1; $i<=strlen($string); $i++){\r\n\t\t\t$char = substr($string, $i-1, 1);\r\n\t\t\t$keychar = substr($key, ($i % strlen($key))-1, 1);\r\n\t\t\t$char = chr(ord($char)+ord($keychar));\r\n\t\t\t$result.=$char;\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "function generateFixedSalt32Byte()\r\n{\r\n return \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\";\r\n}", "function acucPassToCode( $arrayPasscode )\r\n{\r\n\tglobal $acucUsableChars;\r\n\t\r\n\t$arrayReturnPasscode = $arrayPasscode;\r\n\t\r\n\tif( count($arrayPasscode) < 28 )\r\n\t\treturn false;\r\n\t\r\n\tfor( $idx = 0; $idx < 28; $idx++ )\r\n\t{\r\n\t\t$arrayReturnPasscode[$idx] = array_search( $arrayPasscode[$idx], $acucUsableChars);\r\n\t\tif( $arrayReturnPasscode[$idx] === false )\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\treturn $arrayReturnPasscode;\r\n}", "public function encryptPassword($pass){\r\n\t\t$this->string = array(\r\n\t\t\t\"string\" => $pass,\r\n\t\t\t\"count\" => strlen($pass)\r\n\t\t);\r\n\t\t//the function setCharacters() is executed to get all the initial characters to use for password encryption.\r\n\t\t$characters = $this->setCharacters();\r\n\t\t/* \r\n\t\t\tIn order to encrypt this password with a unique pattern I took the password and found the position\r\n\t\t\ton my character table. I took all positions that are found on my character table and use those numbers like patters\r\n\t\t\tI set the characters location as ranges in my $start_range variable.\r\n\t\t*/\r\n\t\t$start_range = array();\r\n\t\tfor($x=0; $x<$this->string['count']; $x++){\r\n\t\t\t$start_range[$x] = array_search($this->string['string'][$x], $characters);\r\n\t\t}\r\n\t\tforeach ($start_range as $key => $value) {\r\n\t\t\tif($value == null){\r\n\t\t\t\t$start_range[$key] = $this->string['count'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//doubles the range to make the password more complex base on mathematical additions; submitted on the 1.2 update\r\n\t\t$a = 0;\r\n\t\tfor ($i=0; $i < $this->string['count']; $i++) {\r\n\t\t\t$start_range[$this->string['count'] + $a] = round(($start_range[$i] * ($this->string['count'] + $a))); \r\n\t\t\t$a++;\r\n\t\t}\r\n\t\t/*\r\n\t\t\tUnique matrix is created depending on number of characters and the location of the characters\r\n\t\t\tI set for what i call my matrix to be 5000 characters to make the mattern more complex. you can set that to your liking i dont recommend going lower than 1000 characters.\r\n\t\t*/\r\n\t\t$matrix = $this->generateMatrix($characters, $start_range, $this->matrixLength);\r\n\t\t/*\r\n\t\t\t@param array will make sure the matrix is as complex as possible.\r\n\t\t*/\r\n\t\t$matrix_final = $this->generateMatrix($matrix, $start_range, $this->matrixLength);\r\n\t\t/*\r\n\t\t\tI have tested with 128 characters, havent test for less or more yet.\r\n\t\t\tthis is where the magic happens and i use the same consept of creating a matrix to create the final encryption.\r\n\t\t*/\r\n\t\t$final_password = $this->generateMatrix($matrix_final, $start_range, $this->passwordEncryptionLenght);\r\n\t\t$this->encPassword = implode('',$final_password);\r\n\t}", "function xorffswapnibbleencrypt($inputstring)\n\t{\n\t\t$outputstring = \"\";\n\t\t$arrayOfInputCharacters = str_split($inputstring);\n\t\tfor($ii=0;$ii<count($arrayOfInputCharacters);$ii++)\n\t\t\t$outputstring .= dechex((ord($arrayOfInputCharacters[$ii]) ^ 0x0f) & 0x0f).dechex((ord($arrayOfInputCharacters[$ii]) ^ 0xf0) >> 4);\n\t\treturn $outputstring;\n\t}", "function php02($n_caracteres_crypt,$coord,$dato_crypt){\n\t$n_caracteres = strlen($dato_crypt);\n\t$texto_crypt = php01($n_caracteres_crypt);\n\t$texto_n = '';\n\tfor($i = 0; $i < strlen($texto_crypt); $i++){\n\t\twhile ( $i == $coord){\n\t\t\tfor($j = 0; $j < strlen($dato_crypt); $j++){\n\t\t\t\t$texto_n = $texto_n . $dato_crypt[$j];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t$texto_n = $texto_n . $texto_crypt[$i];\n\t}\n\treturn $texto_n;\n}", "public function ivGenerator() \n {\n $chars = \"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,#,@,$,%,&,!\";\n $chars = explode(\",\", $chars);\n $ints = array();\n for ($i = 0; $i < 4; $i++) {\n array_push($ints, rand(0, 64));\n }\n $password = array();\n\n //composing the password\n foreach ($ints as $int) {\n $char = $chars[$int * rand(0, 3)];\n if (($int * rand(0, 3)) % 2 == 0) {\n $char = strtoupper($char);\n array_push($password, $int);\n }\n array_push($password, $char);\n }\n\n //convert the password array to string\n $stringpass = '';\n foreach ($password as $char) {\n $stringpass.=$char;\n }\n return $stringpass;\n }", "function Code39 ($Asc)\n{\n switch ($Asc)\n {\n case ' ':\n return \"011000100\"; \n case '$':\n return \"010101000\"; \n case '%':\n return \"000101010\"; \n case '*':\n return \"010010100\"; // * Start/Stop\n case '+':\n return \"010001010\"; \n case '|':\n return \"010000101\"; \n case '.':\n return \"110000100\"; \n case '/':\n return \"010100010\"; \n\t\t\t\tcase '-':\n\t\t\t\t\t\treturn \"010000101\";\n case '0':\n return \"000110100\"; \n case '1':\n return \"100100001\"; \n case '2':\n return \"001100001\"; \n case '3':\n return \"101100000\"; \n case '4':\n return \"000110001\"; \n case '5':\n return \"100110000\"; \n case '6':\n return \"001110000\"; \n case '7':\n return \"000100101\"; \n case '8':\n return \"100100100\"; \n case '9':\n return \"001100100\"; \n case 'A':\n return \"100001001\"; \n case 'B':\n return \"001001001\"; \n case 'C':\n return \"101001000\";\n case 'D':\n return \"000011001\";\n case 'E':\n return \"100011000\";\n case 'F':\n return \"001011000\";\n case 'G':\n return \"000001101\";\n case 'H':\n return \"100001100\";\n case 'I':\n return \"001001100\";\n case 'J':\n return \"000011100\";\n case 'K':\n return \"100000011\";\n case 'L':\n return \"001000011\";\n case 'M':\n return \"101000010\";\n case 'N':\n return \"000010011\";\n case 'O':\n return \"100010010\";\n case 'P':\n return \"001010010\";\n case 'Q':\n return \"000000111\";\n case 'R':\n return \"100000110\";\n case 'S':\n return \"001000110\";\n case 'T':\n return \"000010110\";\n case 'U':\n return \"110000001\";\n case 'V':\n return \"011000001\";\n case 'W':\n return \"111000000\";\n case 'X':\n return \"010010001\";\n case 'Y':\n return \"110010000\";\n case 'Z':\n return \"011010000\";\n default:\n return \"011000100\"; \n }\n}", "function acucDecodeBitShuffle( $arrayCode, $usedKey)\r\n{\r\n\tglobal $acucSelectIndexTable;\r\n\t\r\n\t$arrayOutputBuffer = array();\r\n\tfor( $idx = 0; $idx < 21; $idx++ )\r\n\t{\r\n\t\t$arrayOutputBuffer[] = 0;\r\n\t}\r\n\t\r\n\tif( $usedKey == 0 )\r\n\t{\r\n\t\t$charOffset = 13;\r\n\t\t$charCount = 19;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$charOffset = 2;\r\n\t\t$charCount = 20;\r\n\t}\r\n\t\r\n\t$arrayBuffer = array_merge( array_slice( $arrayCode, 0, $charOffset), array_slice( $arrayCode, $charOffset + 1, 20 - $charOffset) );\r\n\t\r\n\t$tableNumber = ( $arrayCode[ $charOffset ] << 2 ) &0x0c;\r\n\t$indexTable = $acucSelectIndexTable[ $tableNumber >> 2 ];\r\n\t\r\n\tfor( $idx = 0; $idx < $charCount; $idx++ )\r\n\t{\r\n\t\tfor($tIdx = 0; $tIdx < 8; $tIdx++)\r\n\t\t{\r\n\t\t\t$outputOffset = $indexTable[ $tIdx ] + $idx;\r\n\t\t\t$outputOffset %= $charCount;\r\n\t\t\t$valueByte = $arrayBuffer[$outputOffset];\r\n\t\t\t$valueByte = ($valueByte >> $tIdx ) & 0x01;\r\n\t\t\t$valueByte <<= $tIdx;\r\n\t\t\t$arrayOutputBuffer[$idx] |= $valueByte;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$arrayReturnCode = array_merge( array_slice( $arrayOutputBuffer, 0, $charOffset),\r\n\t\t\t\t\t\t\t\t\t\tarray_slice( $arrayCode, $charOffset, 1),\r\n\t\t\t\t\t\t\t\t\t\tarray_slice( $arrayOutputBuffer, $charOffset, 20-$charOffset));\r\n\t$arrayReturnCode = array_merge( $arrayReturnCode, array_slice($arrayCode, count($arrayReturnCode)));\r\n\treturn $arrayReturnCode;\r\n}", "public function testEncryptPadding(): void\n {\n $rc2 = new RC2('ecb');\n\n // unlike Crypt_AES / Crypt_Rijndael, when you tell Crypt_RC2 that the key length is 128-bits the key isn't null padded to that length.\n // instead, RC2 key expansion is used to extend it out to that length. this isn't done for AES / Rijndael since that doesn't define any\n // sort of key expansion algorithm.\n\n // admittedly, phpseclib is inconsistent in this regard. RC4 and Blowfish support arbitrary key lengths between a certain range, as well,\n // and they don't have any way to set the key length. but then again, neither do those algorithms have their own key expansion algorithm,\n // whereas RC2 does. and technically, AES / Rijndael (and even Twofish) don't support arbitrary key lengths - they support variable key\n // lengths. so in some ways, i suppose this inconsistency somewhat makes sense, although the fact that Crypt_Twofish doesn't have a\n // setKeyLength() function whereas Crypt_AES / Crypt_Rijndael do not is, itself, an inconsistency.\n\n // but that said, Crypt_RC2 is inconsistent in other ways: if you pass a 128-bit (16-byte) key to it via setKey() the key is not treated\n // as a 128-bit key but rather as a 1024-bit key and is expanded accordingly, not via null padding, but via RC2's key expansion algorithm.\n\n // this behavior is in contrast to mcrypt, which extends keys via null padding to 1024 bits. it is also in contrast to OpenSSL, which\n // extends keys, via null padding, to 128 bits. mcrypt's approach seems preferable as one can simulate 128 bit keys by using RC2's\n // key expansion algorithm to extend the key to 1024 bits and then changing the first byte of the new key with an inverse pitable mapping.\n // in contrast, to my knowledge, there is no technique for expanding a key less than 128 bits to 128 bits, via RC2 key expansion. the only\n // scenario in that regard is null padding.\n\n // simple truncation is insufficient, since, quoting RFC2268, \"the purpose of the key-expansion algorithm [in RC2] is to modify the key buffer\n // so that each bit of the expanded key depends in a complicated way on every bit of the supplied input key\".\n\n // now, to OpenSSL's credit, null padding is internally consistent with OpenSSL. OpenSSL only supports fixed length keys. For rc2, rc4 and\n // bf (blowfish), all keys are 128 bits (or are null padded / truncated accordingly). to use 40-bit or 64-bit keys with RC4 with OpenSSL you\n // don't use the rc4 algorithm - you use the rc4-40 or rc4-64 algorithm. and similarly, it's not aes-cbc that you use - it's either aes-128-cbc\n // or aes-192-cbc or aes-256-cbc. this is in contrast to mcrypt, which (with the exception of RC2) actually supports variable and arbitrary\n // length keys.\n\n // superficially, it seens like Rijndael would be another exception to mcrypt's key length handling, but it in fact is not. the reason being that,\n // with mcrypt, when you specify MCRYPT_RIJNDAEL_128 or MCRYPT_RIJNDAEL_192 or MCRYPT_RIJNDAEL_256 the numbers at the end aren't referring to the\n // key length, but rather, the block length. ie. Rijndael, unlike most block ciphers, doesn't just have a variable (but not arbitrary) key length -\n // it also has a variable block length. AES's block length, however, is not variable, so technically, only MCRYPT_RIJNDAEL_128 is AES.\n\n $rc2->setKey(str_repeat('d', 16), 128);\n\n $rc2->setPreferredEngine('PHP');\n $internal = $rc2->encrypt('d');\n\n $result = pack('H*', 'e3b36057f4821346');\n $this->assertEquals($result, $internal, 'Failed asserting that the internal engine produced the correct result');\n\n $rc2->setPreferredEngine('OpenSSL');\n if ($rc2->getEngine() == 'OpenSSL') {\n $openssl = $rc2->encrypt('d');\n $this->assertEquals($result, $openssl, 'Failed asserting that the OpenSSL engine produced the correct result');\n } else {\n self::markTestSkipped('Unable to initialize OpenSSL engine');\n }\n }", "public static function aes128Decrypt($key, $data) {}", "function encryptCC($db, $ccNum, $ccv, $actioner_id) {\n //generate the key\n $key = $ccv . PAINFULLY_SECRET . $actioner_id;\n return \" AES_ENCRYPT('\" . $ccNum . \"', '\" . $db->escape($key) . \"') \";\n}", "function encode_advanced_rle(string $path_to_encode, string $result_path) {\n // check if the picture exist\n if (!file_exists($path_to_encode)) return 1;\n $codemotif = \"\";\n $hexa = bin2hex(file_get_contents($path_to_encode));\n $taille = strlen($hexa);\n\n // set a space all the two carracters. I'm gonna call it a motif\n for ($i = 1; $i < $taille; $i += 2)\n $codemotif = $codemotif.$hexa[$i-1].$hexa[$i].' ';\n \n $taille2 = strlen($codemotif);\n $compress = \"\";\n\n $i = 2;\n while ($i <= $taille2 - 3) {\n // compare the motifs two by two, and since they are equal, concatenate them.\n $pack = $codemotif[$i-2].$codemotif[$i-1].' ';\n $pack2 = $codemotif[$i+1].$codemotif[$i+2].' ';\n $count = 0;\n if ($pack == $pack2) {\n $count++;\n do {\n $count++;\n $i += 3;\n if ($i+1 >= $taille2) break;\n $pack = $codemotif[$i-2].$codemotif[$i-1].' ';\n $pack2 = $codemotif[$i+1].$codemotif[$i+2].' ';\n } while ($pack == $pack2);\n $compress .= $count.' '.$pack;\n $i += 3;\n if ($i+1 >= $taille2) break;\n $pack = $codemotif[$i-2].$codemotif[$i-1].' ';\n $pack2 = $codemotif[$i+1].$codemotif[$i+2].' ';\n $count = 0;\n }\n // compare the motifs two by two, and since they are differents.\n if ($pack != $pack2) {\n $j = $i;\n do {\n $count++;\n $i += 3; \n if ($i + 1 >= $taille2) {\n $count++;\n $i += 3;\n break;\n }\n $pack = $codemotif[$i-2].$codemotif[$i-1].' ';\n $pack2 = $codemotif[$i+1].$codemotif[$i+2].' ';\n } while ($pack != $pack2);\n $compress .= '00 '.$count.' ';\n // add the last motif if they are an odd number\n while ($j < $i) {\n $pack = $codemotif[$j-2].$codemotif[$j-1].' ';\n $compress = $compress.$pack;\n $j += 3;\n }\n }\n }\n\n // make a save \n if (file_exists($result_path)) unlink($result_path);\n file_put_contents($result_path, $compress);\n return 0;\n}", "function km200_Encrypt( $encryptData ) \n{ \n $blocksize = 16;\n $encrypt_padchar = $blocksize - ( strlen( $encryptData ) % $blocksize ); \n $encryptData .= str_repeat( chr( $encrypt_padchar ), $encrypt_padchar ); \n \n return base64_encode(\n openssl_encrypt(\n $encryptData,\n \"aes-256-ecb\",\n km200_crypt_key_private,\n OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING\n )\n );\n}", "protected function _encrypt()\n {\n switch ($this->_cypherUsed) {\n case self::CYPHER_BASIC:\n //break ommited on purpose\n default:\n $string = $this->_plainText;\n $result = '';\n for ($i = 0; $i < strlen($string); $i++) {\n $char = substr($string, $i, 1);\n $keychar = substr($this->_keyString, ($i % strlen($this->_keyString)) - 1, 1);\n $char = chr(ord($char) + ord($keychar));\n $result .= $char;\n }\n $this->_encryptedText = base64_encode($result);\n break;\n }\n }", "abstract protected function getCrypt();", "public function testMiddleKey3()\n {\n $this->setExpectedException('PHPUnit_Framework_Error_Warning');\n\n $key = str_repeat('z', 20);\n $iv = str_repeat('z', 16);\n\n $plaintext = 'a';\n\n phpseclib_mcrypt_encrypt('rijndael-128', $key, $plaintext, 'cbc', $iv);\n }", "function decrypt_score($encrypted_score) {\n\n\t// This is the code of this PHP function in obfuscated JavaScript\n\t// var m = 4; // Max digits\n\t// var dec = function(x){if(x.length!=32)return 0;for(y=\"\",i=1;(i-1)<(x.indexOf(v[v.length-1])-parseInt(x[0]));i++){for(j=0;v[j]!=x[i+parseInt(x[0])-1];j++);while((j-(i*11*(x.indexOf(v[v.length-1])-parseInt(x[0]))+13))<0||x[i+parseInt(x[0])-1]!=v[j%(v.length-1)]){j+=v.length-1;if(j>((m+1)*m*11+13))return 0;}y+=j-(i*11*(x.indexOf(v[v.length-1])-parseInt(x[0]))+13);}return parseInt(y);};\n\n\tif(strlen($encrypted_score) != 32)\n\t\treturn 0;\n\t$v = array(\"6\",\"a\",\"0\",\"7\",\"d\",\"f\",\"c\",\"4\",\"e\",\"5\",\"3\",\"1\",\"2\",\"9\",\"8\",\"b\");\n\t$m = 4;\n\t$y = \"\";\n\t\n\tfor($i = 1; ($i - 1) < (strpos($encrypted_score, $v[count($v) - 1]) - $encrypted_score[0]); $i++) {\n\t\t$j = 0;\n\t\twhile($v[$j] != $encrypted_score[$i + $encrypted_score[0] - 1]) {\n\t\t\t$j++;\n\t\t}\n\t\twhile(($j - ($i * 11 * (strpos($encrypted_score, $v[count($v) - 1]) - $encrypted_score[0]) + 13)) < 0 || $encrypted_score[$i + $encrypted_score[0] - 1] != $v[$j % (count($v)-1)]) {\n\t\t\t$j += count($v) - 1;\n\t\t\tif($j > (($m + 1) * $m * 11 + 13)) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$y .= $j - ($i * 11 * (strpos($encrypted_score, $v[count($v)-1]) - $encrypted_score[0]) + 13);\n\t}\n\n\treturn $y;\n}", "public function encrypt($plaintext) {\n\t\t//Capitalize all the characters\n\t\t$plaintext = strtoupper($plaintext); // see https://www.php.net/manual/en/function.strtoupper.php\n\t\t//convert the string to an array, and then loop over the \n\t\t$plaintext = str_split ($plaintext); //see https://www.php.net/manual/en/function.str-split.php\n\t\t\t\t\t\t\t\t\t\t\t\t//also see https://www.php.net/manual/en/function.explode.php\n\t\t\n\t\t//var_dump($plaintext); //Debug code uncomment to see the array\n\t\t\n\t\t$cyphertext = array(); //create an empty array for our cyphertext\n\t\t\n\t\t//temporary variables for our script. This is inelegant, but easy to follow.\n\t\t$tmp_plain_num = 0;\n\t\t$tmp_crypt_num = 0;\n\t\tforeach ($plaintext as $char) {\n\t\t\t//check to make sure we have a letter. If we do not, just stick it in the cyphertext unencrypted.\n\t\t\tif(ctype_alpha($char)) {\n\t\t\t\t$tmp_plain_num = self::$lettersToNumbers[$char]; //gets the number\n\t\t\t\t/**\n\t\t\t\t *\tIn php, mod takes precedence over addition, so we need parenthesis. What would happen without them?\n\t\t\t\t */\n\t\t\t\t$tmp_crypt_num = ($tmp_plain_num + $this->shift_key) % 26; // See https://www.php.net/manual/en/language.operators.precedence.php for php's PEMDAS\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t *\tIn php (as opposed to some other languages), we can append an element to the end of an array \n\t\t\t\t * by simply leaving the index empty.\n\t\t\t\t */\n\t\t\t\t$cyphertext[] = self::$numbersToLetters[$tmp_crypt_num]; //encrypt the letter, and append it to the array.\n\t\t\t} else {\n\t\t\t\t$cyphertext[] = $char; //stick the non-letter in.\n\t\t\t}\n\t\t}\n\t\t\n\t\t//var_dump($cyphertext); //Debug code Uncomment to see the array\n\t\t\n\t\t$cyphertext = implode($cyphertext); //convert back to a string. See https://www.php.net/manual/en/function.implode.php\n\t\t\n\t\treturn($cyphertext);\n\t}", "function cryptCCNumberDeCrypt( $cifer, $key )\r\n{\r\n\treturn base64_decode($cifer);\r\n}", "function encrypt($decrepted_string, $encrytion_key){\r\n $ciphering = \"AES-128-CTR\";\r\n $options = 0;\r\n $encryption_iv = '1234567891011121';\r\n $string = openssl_encrypt($decrepted_string, $ciphering, $encrytion_key, $options, $encryption_iv);\r\n return $string;\r\n}", "function ConfirmationCode($len,$code=''){\r\n\t\t\t\t$list ='';\r\n\r\n\t\t\t\tfor($i=0;$i<$len;$i++){\r\n\t\t\t\t\t$code = str_shuffle($code);\r\n\t\t\t\t\t$list .=$code[0];\r\n\t\t\t\t}\r\n\t\t\t\treturn $list;\r\n\r\n\t\t\t}", "function ConfirmationCode($len,$code=''){\r\n\t\t\t\t$list ='';\r\n\r\n\t\t\t\tfor($i=0;$i<$len;$i++){\r\n\t\t\t\t\t$code = str_shuffle($code);\r\n\t\t\t\t\t$list .=$code[0];\r\n\t\t\t\t}\r\n\t\t\t\treturn $list;\r\n\r\n\t\t\t}", "function Caesar_cipher($huruf, $key)\n{\n $huruf = ctype_alpha($huruf)? $huruf : die('Inputan salah!');\n\n //ubah inputan kedalam uppercase\n $huruf = strtoupper($huruf);\n\n // periksa nomor ascii nya\n $ascii = ord($huruf);\n\n // tambahkan key nya / geser ke nomor ascii yang baru\n $ascii_baru = $ascii + $key;\n\n // periksa jika nomor ascii sudah sampai alphabet terakhir\n // kembalikan ke alphabet awal\n $ascii_baru = $ascii_baru > 90 ? $ascii_baru - 26 : $ascii_baru;\n $ascii_baru = $ascii_baru < 65 ? $ascii_baru + 26 : $ascii_baru;\n\n // tampilkan huruf baru yang sudah digeser\n $huruf_baru = chr($ascii_baru);\n return ($huruf_baru);\n\n}", "function decryptCC($db, $ccv, $actioner_id) {\n //generate the key\n $key = $ccv . PAINFULLY_SECRET . $actioner_id;\n return \" AES_DECRYPT(uacc.number, '\" . $db->escape($key) . \"') \";\n}", "private function _genCode(){\n\t\t$str = \"1 2 3 4 6 7 8 9 a b c d e f g h k m n P t\";\n\t\t\n\t\t$temp = explode(\" \", $str);\n\t\t$c1 = $temp[rand(1, 20)];\n\t\t$c2 = $temp[rand(1, 11)];\n\t\t$c3 = $temp[rand(1, 13)];\n\t\t$c4 = $temp[rand(1, 20)];\n\t\t$c5 = $temp[rand(1, 18)];\n\t\t$c6 = $temp[rand(1, 20)];\n\t\t\n\t\t$chars = $c1.$c2.$c3.$c4.$c5.$c6;\n\t\t\n\t\treturn strtolower($chars);\n\t}", "function cryptPasswordDeCrypt( $cifer, $key )\r\n{\r\n\treturn base64_decode( $cifer );\r\n}", "function des_createKeys (key) {\r\n //declaring this locally speeds things up a bit\r\n pc2bytes0 = new Array (0,0x4,0x20000000,0x20000004,0x10000,0x10004,0x20010000,0x20010004,0x200,0x204,0x20000200,0x20000204,0x10200,0x10204,0x20010200,0x20010204);\r\n pc2bytes1 = new Array (0,0x1,0x100000,0x100001,0x4000000,0x4000001,0x4100000,0x4100001,0x100,0x101,0x100100,0x100101,0x4000100,0x4000101,0x4100100,0x4100101);\r\n pc2bytes2 = new Array (0,0x8,0x800,0x808,0x1000000,0x1000008,0x1000800,0x1000808,0,0x8,0x800,0x808,0x1000000,0x1000008,0x1000800,0x1000808);\r\n pc2bytes3 = new Array (0,0x200000,0x8000000,0x8200000,0x2000,0x202000,0x8002000,0x8202000,0x20000,0x220000,0x8020000,0x8220000,0x22000,0x222000,0x8022000,0x8222000);\r\n pc2bytes4 = new Array (0,0x40000,0x10,0x40010,0,0x40000,0x10,0x40010,0x1000,0x41000,0x1010,0x41010,0x1000,0x41000,0x1010,0x41010);\r\n pc2bytes5 = new Array (0,0x400,0x20,0x420,0,0x400,0x20,0x420,0x2000000,0x2000400,0x2000020,0x2000420,0x2000000,0x2000400,0x2000020,0x2000420);\r\n pc2bytes6 = new Array (0,0x10000000,0x80000,0x10080000,0x2,0x10000002,0x80002,0x10080002,0,0x10000000,0x80000,0x10080000,0x2,0x10000002,0x80002,0x10080002);\r\n pc2bytes7 = new Array (0,0x10000,0x800,0x10800,0x20000000,0x20010000,0x20000800,0x20010800,0x20000,0x30000,0x20800,0x30800,0x20020000,0x20030000,0x20020800,0x20030800);\r\n pc2bytes8 = new Array (0,0x40000,0,0x40000,0x2,0x40002,0x2,0x40002,0x2000000,0x2040000,0x2000000,0x2040000,0x2000002,0x2040002,0x2000002,0x2040002);\r\n pc2bytes9 = new Array (0,0x10000000,0x8,0x10000008,0,0x10000000,0x8,0x10000008,0x400,0x10000400,0x408,0x10000408,0x400,0x10000400,0x408,0x10000408);\r\n pc2bytes10 = new Array (0,0x20,0,0x20,0x100000,0x100020,0x100000,0x100020,0x2000,0x2020,0x2000,0x2020,0x102000,0x102020,0x102000,0x102020);\r\n pc2bytes11 = new Array (0,0x1000000,0x200,0x1000200,0x200000,0x1200000,0x200200,0x1200200,0x4000000,0x5000000,0x4000200,0x5000200,0x4200000,0x5200000,0x4200200,0x5200200);\r\n pc2bytes12 = new Array (0,0x1000,0x8000000,0x8001000,0x80000,0x81000,0x8080000,0x8081000,0x10,0x1010,0x8000010,0x8001010,0x80010,0x81010,0x8080010,0x8081010);\r\n pc2bytes13 = new Array (0,0x4,0x100,0x104,0,0x4,0x100,0x104,0x1,0x5,0x101,0x105,0x1,0x5,0x101,0x105);\r\n\r\n //how many iterations (1 for des, 3 for triple des)\r\n var iterations = key.length > 8 ? 3 : 1; //changed by Paul 16/6/2007 to use Triple DES for 9+ byte keys\r\n //stores the return keys\r\n var keys = new Array (32 * iterations);\r\n //now define the left shifts which need to be done\r\n var shifts = new Array (0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0);\r\n //other variables\r\n var lefttemp, righttemp, m=0, n=0, temp;\r\n\r\n for (var j=0; j<iterations; j++) { //either 1 or 3 iterations\r\n left = (key.charCodeAt(m++) << 24) | (key.charCodeAt(m++) << 16) | (key.charCodeAt(m++) << 8) | key.charCodeAt(m++);\r\n right = (key.charCodeAt(m++) << 24) | (key.charCodeAt(m++) << 16) | (key.charCodeAt(m++) << 8) | key.charCodeAt(m++);\r\n\r\n temp = ((left >>> 4) ^ right) & 0x0f0f0f0f; right ^= temp; left ^= (temp << 4);\r\n temp = ((right >>> -16) ^ left) & 0x0000ffff; left ^= temp; right ^= (temp << -16);\r\n temp = ((left >>> 2) ^ right) & 0x33333333; right ^= temp; left ^= (temp << 2);\r\n temp = ((right >>> -16) ^ left) & 0x0000ffff; left ^= temp; right ^= (temp << -16);\r\n temp = ((left >>> 1) ^ right) & 0x55555555; right ^= temp; left ^= (temp << 1);\r\n temp = ((right >>> 8) ^ left) & 0x00ff00ff; left ^= temp; right ^= (temp << 8);\r\n temp = ((left >>> 1) ^ right) & 0x55555555; right ^= temp; left ^= (temp << 1);\r\n\r\n //the right side needs to be shifted and to get the last four bits of the left side\r\n temp = (left << 8) | ((right >>> 20) & 0x000000f0);\r\n //left needs to be put upside down\r\n left = (right << 24) | ((right << 8) & 0xff0000) | ((right >>> 8) & 0xff00) | ((right >>> 24) & 0xf0);\r\n right = temp;\r\n\r\n //now go through and perform these shifts on the left and right keys\r\n for (var i=0; i < shifts.length; i++) {\r\n //shift the keys either one or two bits to the left\r\n if (shifts[i]) {left = (left << 2) | (left >>> 26); right = (right << 2) | (right >>> 26);}\r\n else {left = (left << 1) | (left >>> 27); right = (right << 1) | (right >>> 27);}\r\n left &= -0xf; right &= -0xf;\r\n\r\n //now apply PC-2, in such a way that E is easier when encrypting or decrypting\r\n //this conversion will look like PC-2 except only the last 6 bits of each byte are used\r\n //rather than 48 consecutive bits and the order of lines will be according to \r\n //how the S selection functions will be applied: S2, S4, S6, S8, S1, S3, S5, S7\r\n lefttemp = pc2bytes0[left >>> 28] | pc2bytes1[(left >>> 24) & 0xf]\r\n | pc2bytes2[(left >>> 20) & 0xf] | pc2bytes3[(left >>> 16) & 0xf]\r\n | pc2bytes4[(left >>> 12) & 0xf] | pc2bytes5[(left >>> 8) & 0xf]\r\n | pc2bytes6[(left >>> 4) & 0xf];\r\n righttemp = pc2bytes7[right >>> 28] | pc2bytes8[(right >>> 24) & 0xf]\r\n | pc2bytes9[(right >>> 20) & 0xf] | pc2bytes10[(right >>> 16) & 0xf]\r\n | pc2bytes11[(right >>> 12) & 0xf] | pc2bytes12[(right >>> 8) & 0xf]\r\n | pc2bytes13[(right >>> 4) & 0xf];\r\n temp = ((righttemp >>> 16) ^ lefttemp) & 0x0000ffff; \r\n keys[n++] = lefttemp ^ temp; keys[n++] = righttemp ^ (temp << 16);\r\n }\r\n } //for each iterations\r\n //return the keys we've created\r\n return keys;\r\n}", "function encode_trans3($text,$table_file='gb2big5') {\n // $str = fread($fp,strlen($table_file.'.table')); \n // fclose($fp); \n $max=strlen($text)-1; \n for($i=0;$i<$max;$i++) { \n $h=ord($text[$i]); \n if($h>=160) { \n $l=ord($text[$i+1]); \n if($h==161 && $l==64) { \n $text[$i]=' '; \n $text[++$i]=' '; \n }else{ \n $pos = ($h-160)*510+($l-1)*2; \n $text[$i]=$str[$pos]; \n $text[++$i]=$str[$pos+1]; \n } \n } \n } \n return $text; \n}", "function ordutf8($string, &$offset) {\n $code = ord(substr($string, $offset, 1));\n if ($code >= 128) { //otherwise 0xxxxxxx \n if ($code < 224)\n $bytesnumber = 2; //110xxxxx \n else if ($code < 240)\n $bytesnumber = 3; //1110xxxxelse if ($code < 248) $bytesnumber = 4; //11110xxx \n $codetemp = $code - 192 - ($bytesnumber > 2 ? 32 : 0) -\n ($bytesnumber > 3 ? 16 : 0);\n for ($i = 2; $i <= $bytesnumber; $i++) {\n $offset ++;\n $code2 = ord(substr($string, $offset, 1)) - 128; //10xxxxxx \n $codetemp = $codetemp * 64 + $code2;\n }\n $code = $codetemp;\n }\n return $code;\n}", "function encryption($s) {\n $string = preg_replace('~\\W~', '', $s);\n $length = strlen($string);\n $sqrt = ceil(sqrt($length));\n\n $arrayOfLetters = str_split($string);\n $countOfRows = floor($length / $sqrt);\n\n if ($sqrt * $countOfRows <= $length) {\n $countOfRows = $sqrt;\n }\n\n $chunk = array_chunk($arrayOfLetters, $countOfRows);\n\n $str = [];\n for ($i = 0; $i < $countOfRows; $i++) {\n foreach ($chunk as $letters) {\n if (isset($letters[$i])) {\n $str[$i] .= $letters[$i];\n }\n }\n }\n\n return implode(' ', $str);\n}", "function customEncrypt($text, $key)\n {\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, padEncryptionSalt($key), $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n }", "function _gensesskey() {\n # with compliments to \"ripat at lumadis dot be\" from php.net online docs\n $acceptedChars = 'azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN0123456789';\n $max = strlen($acceptedChars)-1;\n $key = null;\n for ($i = 0; $i < 64; $i++) {\n $key .= $acceptedChars{mt_rand(0, $max)};\n }\n return $key;\n }", "function acf_encrypt($data = '')\n{\n}", "function init_code(&$code)\n\n{\n\n $code .= \"\\n\";\n\n \n\n // code not allowed to contain our special characters\n\n return ($code = strtr($code, array(\"\\x00\" => '', \"\\x01\" => '')));\n\n}", "function generarCodigo($longitud){\n $key = '';\n $pattern = \"1234567890abcdefghijklmnopqrstuvwxyz\";\n $max =strlen($pattern)-1;\n for($i=0; $i < $longitud; $i++) $key .=$pattern{mt_rand(0,$max)};\n\n return $key;\n \n \n }", "function passgen() {\r\n\t$pw = '';\r\n\t$pw_lenght = 8;\r\n $zeichen = \"0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z\";\r\n $array_b = explode(\",\",$zeichen);\r\n for($i=0;$i<$pw_lenght;$i++) {\r\n \tsrand((double)microtime()*1000000);\r\n $z = rand(0,25);\r\n $pw .= \"\".$array_b[$z].\"\";\r\n }\r\n\treturn $pw;\r\n}", "function MyJamiaEncrypt($str) {\n\t\t\n\t\t// Store the cipher method \n\t\t$ciphering = \"AES-128-CTR\"; \n \n\t\t// Use OpenSSl Encryption method \n\t\t$iv_length = openssl_cipher_iv_length($ciphering); \n\t\t$options = 0; \n \n\t\t// Non-NULL Initialization Vector for encryption \n\t\t$encryption_iv = '1234567891011121'; \n \n\t\t// Store the encryption key \n\t\t$encryption_key = \"MyJamiaEncryptionString\"; \n \n\t\t// Use openssl_encrypt() function to encrypt the data \n\t\treturn openssl_encrypt($str, $ciphering, \n\t\t $encryption_key, $options, $encryption_iv); \n \t}", "function cryptCCNumberCrypt( $cc_number, $key )\r\n{\r\n\treturn base64_encode($cc_number);\r\n}", "function encryptData($payload, $key) {\r\n \r\n $chiper = \"des-ede3\"; //Algorthim used to encrypt\r\n if((strlen($payload)%8)!=0) {\r\n //Perform right padding\r\n $payload = $this->rightPadZeros($payload);\r\n }\r\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($chiper));\r\n $encrypted = openssl_encrypt($payload, $chiper, $key,OPENSSL_RAW_DATA,$iv);\r\n \r\n $encrypted=unpack('C*', ($encrypted));\r\n $encrypted=$this->byteArray2Hex($encrypted);\r\n return strtoupper($encrypted); \r\n}", "function encodePassword($password) {\n for ($i = 0; $i < 32; $i++) {\n $insert_position = mt_rand(0, strlen($password));\n $password = substr($password, 0, $insert_position)\n . chr(mt_rand(128, 256 + 32) & 255)\n . substr($password, $insert_position);\n }\n\n return $password;\n}", "public function encryptPass()\n {\n return \"RASAHolaRSSA\";\n }", "function simpleXor($InString, $Key) {\n // Initialise key array\n $KeyList = array();\n // Initialise out variable\n $output = \"\";\n \n // Convert $Key into array of ASCII values\n for($i = 0; $i < strlen($Key); $i++){\n $KeyList[$i] = ord(substr($Key, $i, 1));\n }\n\n // Step through string a character at a time\n for($i = 0; $i < strlen($InString); $i++) {\n // Get ASCII code from string, get ASCII code from key (loop through with MOD), XOR the two, get the character from the result\n // % is MOD (modulus), ^ is XOR\n $output.= chr(ord(substr($InString, $i, 1)) ^ ($KeyList[$i % strlen($Key)]));\n }\n\n // Return the result\n return $output;\n}", "function genera_password($num=8,$randnum=0){ // By Kernellover \n $voc = 'aeiou'; \n $con = 'bcdfgjklmnpqrstwxyz';\n\t$nvoc = strlen($voc)-1;\n\t$ncon = strlen($con)-1;\n\t$psw =mt_rand(0,1)?$con[mt_rand(0,$ncon)]:''; // defineix si comença per vocal o consonant\n\n\t\n for ($n=0; $n<=ceil($num/2); $n++){ \n $psw .= $voc[mt_rand(0,$nvoc)]; \n $psw .= $con[mt_rand(0,$ncon)]; \n }\n\n\t$cua=$randnum?mt_rand(1,$randnum):'';\n\t$psw = str_replace (array('q','quu','yi','iy'),array('qu','que','ya','ya'),$psw);\n $psw = substr($psw,0,$num-strlen($cua)).$cua; \n\n\n return $psw; \n}", "function encode($s,$key) {\r\n\r\n\t$o = \"\";\r\n\r\n\tfor ($i=0;$i<strlen($s);$i++) {\r\n\r\n\t\t$char = substr($s, $i, 1);\r\n\t\t$pos = alphabet_position($char);\r\n\r\n\t\tif ($pos !== false) {\r\n\t\t\t$key_char = substr($key, $i, 1);\r\n\t\t\t$char_pos = (alphabet_position($key_char) + $pos) % 52;\r\n\t\t\t$char = char_at_position($char_pos);\r\n\t\t}\r\n\r\n\t\t$o .= $char;\r\n\t}\r\n\treturn $o;\r\n}", "abstract public function encrypt($data);", "function test32($a, $b) {\n\n}", "public function includeSymboles() {\n\n for ($i=0; $i <$this->symbolPortion ; $i++) {\n $this->password = $this->password.substr($this->symboles, rand(0, strlen($this->symboles) - 1), 1);\n }\n }", "function encrypt($plain){\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $plain, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n }", "public function testEncryptingTheSameDataTwice()\n {\n $randomData = random_bytes(32);\n $randomKey = random_bytes(2);\n\n $this->assertEquals(\n NativeRc4::encryptData($randomKey, $randomData),\n NativeRc4::encryptData($randomKey, $randomData)\n );\n }" ]
[ "0.63721275", "0.62534225", "0.5917689", "0.5911548", "0.5868365", "0.5815041", "0.5778121", "0.57640564", "0.57507074", "0.57393235", "0.572775", "0.5727074", "0.56591696", "0.5655187", "0.5628471", "0.56091094", "0.55859846", "0.5564763", "0.5564763", "0.5529267", "0.55284905", "0.5514067", "0.5501781", "0.5496837", "0.5495249", "0.54818636", "0.5475917", "0.5475595", "0.54561186", "0.54353696", "0.53995925", "0.53791344", "0.53775406", "0.53372955", "0.53304696", "0.53226054", "0.53160924", "0.53033084", "0.5301364", "0.5291051", "0.5289307", "0.5287902", "0.52869016", "0.5280775", "0.5270888", "0.5266276", "0.5240805", "0.52356863", "0.5220001", "0.5203338", "0.5203023", "0.51947767", "0.5193468", "0.5182706", "0.518056", "0.51744306", "0.5170374", "0.51679784", "0.5161894", "0.5142761", "0.5136198", "0.5135402", "0.5127272", "0.5116492", "0.51083934", "0.51002127", "0.5100151", "0.5090686", "0.5088312", "0.5084221", "0.50828445", "0.5082043", "0.5082043", "0.5078714", "0.5053247", "0.50422686", "0.5034295", "0.5033573", "0.50300336", "0.50286317", "0.5028145", "0.5024211", "0.501738", "0.50128746", "0.50128686", "0.50068873", "0.49992067", "0.4995195", "0.4988511", "0.49860507", "0.49851048", "0.49819994", "0.49766102", "0.4973822", "0.49585512", "0.49545568", "0.49469376", "0.49414286", "0.49223092", "0.49134907" ]
0.5119198
63
Binarize an ASCII representation of bytes
private function _binarize($data, $base, $n) { if ($base != 16) { $data = base_convert($data, $base, 16); } $len = $n * 2; $hex = sprintf("%0{$len}s", $data); return pack("H{$len}", $hex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toBin($str){\n $str = (string)$str;\n $l = strlen($str);\n $result = '';\n while($l--){\n $result = str_pad(decbin(ord($str[$l])),8,\"0\",STR_PAD_LEFT).$result;\n }\n return $result;\n }", "function bstr2bin($input)\r\n\t{\r\n\t\tif (!is_string($input)) return null; // Sanity check\r\n\t\t// Unpack as a hexadecimal string\r\n\t\t$value = unpack('H*', $input);\r\n\t\t// Output binary representation\r\n\t\t$value = str_split($value[1], 1);\r\n\t\t$bin = '';\r\n\t\tforeach ($value as $v){\r\n\t\t\t$b = str_pad(base_convert($v, 16, 2), 4, '0', STR_PAD_LEFT);\r\n\t\t\t$bin .= $b;\r\n\t\t}\r\n\t\treturn $bin;\r\n\t}", "function bin2bstr($input)\r\n\t{\r\n\t\tif (!is_string($input)) return null; // Sanity check\r\n\t\t// Pack into a string\r\n\t\t$input = str_split($input, 2);\r\n\t\t$str = '';\r\n\t\tforeach ($input as $v){\r\n\t\t\t$str .= base_convert($v, 2, 16);\r\n\t\t}\r\n\t\t$str = pack('H*', $str);\r\n\t\treturn $str;\r\n\t}", "function str2bin($str)\n {\n $out = '';\n\n foreach (str_split($str) as $char) {\n //determine symbol ASCII-code\n $dec = ord($char);\n //convert to binary representation and add leading zeros\n $bin = sprintf('%08d', base_convert($dec, 10, 2));\n $out .= $bin;\n }\n\n return $out;\n }", "private function binaryToString(string $input)\n\t{\n\t\t$length = strlen($input);\n\t\t$result = '';\n\n\t\tfor($i=0; $i<$length; $i+=8) {\n\t\t\t$byte = substr($input, $i, 8);\n\t\t\t$code = base_convert($byte, 2, 10);\n\t\t\t$char = chr((int)$code);\n\t\t\t$result .= $char; \n\t\t}\n\n\t\treturn $result;\n\t}", "private function arrayToBin(\n array $bytes\n ): string {\n return call_user_func_array('pack', array_merge(['c*'], $bytes));\n }", "function bin2str($binary)\n {\n // 8 bits\n $binary = chunk_split($binary, 8, ' ');\n if(substr($binary, -1) === ' ') {\n $binary = substr($binary, 0, -1);\n }\n\n $binaryArray = explode(' ', $binary);\n\n $string = '';\n foreach ($binaryArray as $bin) {\n $bin = str_pad($bin, 8, 0, STR_PAD_RIGHT);\n $string .= chr(bindec($bin));\n }\n\n return $string;\n }", "private function encodeBytes($input) {\n\t\t$itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\n\t\t$output = '';\n\t\t$i = 0;\n\t\tdo {\n\t\t\t$c1 = ord($input[$i++]);\n\t\t\t$output .= $itoa64[$c1 >> 2];\n\t\t\t$c1 = ($c1 & 0x03) << 4;\n\t\t\tif ($i >= 16) {\n\t\t\t\t$output .= $itoa64[$c1];\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$c2 = ord($input[$i++]);\n\t\t\t$c1 |= $c2 >> 4;\n\t\t\t$output .= $itoa64[$c1];\n\t\t\t$c1 = ($c2 & 0x0f) << 2;\n\n\t\t\t$c2 = ord($input[$i++]);\n\t\t\t$c1 |= $c2 >> 6;\n\t\t\t$output .= $itoa64[$c1];\n\t\t\t$output .= $itoa64[$c2 & 0x3f];\n\t\t} while (1);\n\t\treturn $output;\n\t}", "private function hex2bin($data){\n $encoded = '';\n $data_arr = str_split($data, 2);\n\n foreach($data_arr as $val){\n $binary = base_convert($val, 16, 2);\n $encoded .= str_pad($binary, 8, '0', STR_PAD_LEFT);\n }\n return $encoded;\n }", "private function stringToBinary(string $input)\n\t{\n\t\t$length = strlen($input);\n\t\t$binary = '';\n\n\t\tfor ($i=0; $i<$length; $i++) {\n\t\t\t$char = substr($input, $i); \n\t\t\t$code = ord($char);\n\t\t\t$binCode = base_convert($code, 10, 2);\n\t\t\t$diff = 8 - strlen($binCode);\n\t\t\t$add = substr(\"00000000\", 0, $diff);\n\t\t\t$binary .= ($add . $binCode);\n\t\t}\n\n\t\treturn $binary;\n\t}", "function blake2bHex($input, $key, $outlen = 64) {\n\t\t$output = $this->blake2b($input, $key, $outlen);\n\t\treturn $this->toHex($output);\n\t}", "public static function encode($in) {\n if (strlen($in) > 8) {\n $out = '';\n\n while (strlen($in) >= 8) {\n $out .= static::encode(substr($in, 0, 8));\n $in = substr($in, 8); \n }\n\n return $out;\n }\n\n return chr(bindec($in));\n }", "private function encodeBytes($input) {\n $itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\n $output = '';\n $i = 0;\n do {\n $c1 = ord($input[$i++]);\n $output .= $itoa64[$c1 >> 2];\n $c1 = ($c1 & 0x03) << 4;\n if ($i >= 16) {\n $output .= $itoa64[$c1];\n break;\n }\n\n $c2 = ord($input[$i++]);\n $c1 |= $c2 >> 4;\n $output .= $itoa64[$c1];\n $c1 = ($c2 & 0x0f) << 2;\n\n $c2 = ord($input[$i++]);\n $c1 |= $c2 >> 6;\n $output .= $itoa64[$c1];\n $output .= $itoa64[$c2 & 0x3f];\n } while (1);\n\n return $output;\n }", "function hextobin($hexString) \n { \n $length = strlen($hexString); \n $binString=\"\"; \n $count=0; \n while($count<$length) \n { \n $subString =substr($hexString,$count,2); \n $packedString = pack(\"H*\",$subString); \n if ($count==0)\n {\n $binString=$packedString;\n } \n \n else \n {\n $binString.=$packedString;\n } \n \n $count+=2; \n } \n return $binString; \n }", "public static function hex2bin(string $str): string {\n return hex2bin(strlen($str) % 2 == 1 ? \"0\" . $str : $str);\n }", "public function bytes();", "public function getBytes()\n {\n $out = \"\";\n\n $fullBytes = (int)floor($this->size / 8);\n $remainder = $this->size % 8;\n\n for ($i = 0; $i < $fullBytes; $i++) {\n $intIdx = (int)($i * 8 / $this->intSize);\n $mask = 0xff << (((PHP_INT_SIZE-1) - ($i % PHP_INT_SIZE)) * 8);\n\n $out .= chr((($this->data[$intIdx] & $mask) >> (((PHP_INT_SIZE-1) - ($i % PHP_INT_SIZE)) * 8)) & 0xff);\n }\n\n if ($remainder > 0) {\n $lastByte = 0;\n for ($i = 0; $i < $remainder; $i++) {\n $lastByte = $lastByte | ($this->get($fullBytes * 8 + $i) << (7 - $i));\n }\n\n $out .= chr($lastByte);\n }\n\n return $out;\n }", "public function test_character_to_bytes_conversion()\n {\n $ascii = new ASCII();\n $this->assertEquals(65, $ascii->setCharacter('A')->getBytes(), '[A] to bytes should be 65');\n }", "public function binToInt($bytes, $twoc = false)\n {\n $isNegative = ((ord($bytes[0]) & 0x80) && $twoc);\n\n if ($isNegative) {\n $bytes = ~$bytes;\n }\n\n $len = (strlen($bytes) + 3) & 0xfffffffc;\n $bytes = str_pad($bytes, $len, chr(0), STR_PAD_LEFT);\n\n $result = '0';\n for ($i = 0; $i < $len; $i += 4) {\n $result = bcmul($result, '4294967296'); // 2**32\n $result = bcadd($result, 0x1000000 * ord($bytes[$i]) +\n ((ord($bytes[$i + 1]) << 16) |\n (ord($bytes[$i + 2]) << 8) |\n ord($bytes[$i + 3])));\n }\n\n if ($isNegative) {\n $result = bcsub('-' . $result, '1');\n }\n\n return $result;\n }", "static public function hexToBin(string $hex): string\n {\n $code = \"0123456789abcdef\";\n $bin = \"\";\n for ($i = strlen($hex) - 1; $i >= 0; $i--) {\n $char = $hex[$i];\n $dec = strpos($code, $char);\n $binpart = decbin($dec);\n $bin = self::prependBin($binpart, 4) . $bin;\n }\n\n return $bin;\n }", "function inttobyte($n)\r\n\t{\r\n\t\treturn chr($n);\r\n\t}", "function javascript_to_binary ($texte) {\n\twhile (ereg(\"%([0-9A-F][0-9A-F])\", $texte, $regs))\n\t\t$texte = str_replace($regs[0],chr(hexdec($regs[1])), $texte);\n\treturn $texte;\n}", "public static function stringToBytes($str)\n {\n return self::unpackStringToArray('c*', $str);\n }", "public function is_binary($text)\n {\n }", "public function test_bytes_to_character_conversion()\n {\n $ascii = new ASCII();\n $this->assertEquals('A', $ascii->setBytes(65)->getCharacter(), '65 to character should be A');\n }", "private static function decodeBinary ($input) {\n \n $content = ''; \n $chunks = explode (\"\\n\", $input);\n \n foreach ($chunks as $chunk) {\n $content .= base64_decode (trim ($chunk));\n }\n \n return $content;\n }", "public function getBinary();", "public function intToBin($operand, $twoc = false)\n {\n $nb = chr(0);\n $isNegative = (strpos($operand, '-') === 0);\n $operand = ltrim($operand, '+-0');\n\n if (empty($operand)) {\n return $nb;\n }\n\n if ($isNegative && $twoc) {\n $operand = bcsub($operand, '1');\n }\n\n $bytes = '';\n while (bccomp($operand, '0', 0) > 0) {\n $temp = bcmod($operand, '16777216');\n $bytes = chr($temp >> 16) . chr($temp >> 8) . chr($temp) . $bytes;\n $operand = bcdiv($operand, '16777216');\n }\n $bytes = ltrim($bytes, $nb);\n\n if ($twoc) {\n if (ord($bytes[0]) & 0x80) {\n $bytes = $nb . $bytes;\n }\n return $isNegative ? ~$bytes : $bytes;\n }\n\n return $bytes;\n }", "function is_binary($string){\n return preg_match('~[^\\x20-\\x7E\\t\\r\\n]~', $string) > 0;\n}", "protected function IP2Bin($ip)\n {\n return sprintf(\"%032s\",base_convert($this->convertIp2Long($ip),10,2));\n }", "public static function gmpBinconv($hex)\n {\n $rem = '';\n $dv = '';\n $byte = '';\n $digits = array();\n\n for ($x = 0; $x < 256; $x++) {\n $digits[$x] = chr($x);\n }\n\n if (substr(strtolower($hex), 0, 2) != '0x') {\n $hex = '0x'.strtolower($hex);\n }\n\n while (gmp_cmp($hex, 0) > 0) {\n $dv = gmp_div($hex, 256);\n $rem = gmp_strval(gmp_mod($hex, 256));\n $hex = $dv;\n $byte = $byte.$digits[$rem];\n }\n\n return strrev($byte);\n }", "private function _hex2bin ($data)\r\n\t{\r\n\t\t$len = strlen ($data);\r\n\t\treturn pack (\"H\" . $len, $data);\r\n\t}", "static public function binToHex(string $bin): string\n {\n $code = \"0123456789abcdef\";\n\n // check the length\n $rest = strlen($bin) % 4;\n if ($rest > 0) {\n // we need to prepend 0's....\n $newLength = strlen($bin) + (4 - $rest);\n $bin = self::prependBin($bin, $newLength);\n }\n\n $parts = str_split($bin, 4);\n $res = \"\";\n foreach ($parts as $p) {\n $dec = bindec($p);\n $res .= $code[$dec];\n }\n\n return $res;\n }", "public static function ipToBin($ip_str) {\n $ip_int = self::ipToInt($ip_str);\n return ip4_int2bin($ip_int);\n }", "static protected function HexBlockToBinary( $strHex )\n\t{\n\t\t$strTemp = '';\n\t\tfor( $intPos = 1 ; $intPos <= \\strlen( $strHex ) ; $intPos = $intPos + 1 )\n\t\t{\n\t\t\t$strTemp = $strTemp . self::HexToBinary( substr( $strHex, intval( $intPos ) - 1, 1 ) );\n\t\t}\n\t\t\n\t\treturn $strTemp;\n\t}", "public function quoteBinary(?string $value): string\n {\n if ($value===null || $value==='') return 'null';\n\n return '0x'.bin2hex($value);\n }", "protected function packConvertHexStringToRawBinary($hex_string){\n\t\treturn pack('h*', $hex_string);\n\t}", "function escByteA($binData) {\n\t\t/**\n\t\t* \\134 = 92 = backslash, \\000 = 00 = NULL, \\047 = 39 = Single Quote\n\t\t*\n\t\t* str_replace() replaces the searches array in order.\n\t\t* Therefore, we must\n\t\t* process the 'backslash' character first. If we process it last, it'll\n\t\t* replace all the escaped backslashes from the other searches that came\n\t\t* before. tomATminnesota.com\n\t\t*/\n\t\t$search = array(chr(92), chr(0), chr(39));\n\t\t$replace = array('\\\\\\134', '\\\\\\000', '\\\\\\047');\n\t\t$binData = str_replace($search, $replace, $binData);\n\t\treturn $binData;\n\t}", "public function getEncoded();", "static function stripBinary(string $s): string {\n // printable characters\n return preg_replace('/[^[:print:]]/', '', $s);\n }", "public static function strBytes($str)\n {\n // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT\n\n // Number of characters in string\n $strlen_var = strlen($str);\n\n // string bytes counter\n $d = 0;\n\n /*\n * Iterate over every character in the string,\n * escaping with a slash or encoding to UTF-8 where necessary\n */\n for($c = 0; $c < $strlen_var; ++$c)\n {\n $ord_var_c = ord($str{$c});\n\n switch(true)\n {\n case(($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):\n // characters U-00000000 - U-0000007F (same as ASCII)\n $d ++;\n break;\n case(($ord_var_c & 0xE0) == 0xC0):\n // characters U-00000080 - U-000007FF, mask 110XXXXX\n $d += 2;\n break;\n case(($ord_var_c & 0xF0) == 0xE0):\n // characters U-00000800 - U-0000FFFF, mask 1110XXXX\n $d += 3;\n break;\n case(($ord_var_c & 0xF8) == 0xF0):\n // characters U-00010000 - U-001FFFFF, mask 11110XXX\n $d += 4;\n break;\n case(($ord_var_c & 0xFC) == 0xF8):\n // characters U-00200000 - U-03FFFFFF, mask 111110XX\n $d += 5;\n break;\n case(($ord_var_c & 0xFE) == 0xFC):\n // characters U-04000000 - U-7FFFFFFF, mask 1111110X\n $d += 6;\n break;\n default:\n $d ++;\n }//switch\n }//for\n\n return number_format($d);\n }", "function bintoip($ip) {\n\t\t\tif (!preg_match(\"/^[0-1]{0,128}$/\", $ip))\n\t\t\t\treturn false;\n\n\t\t\t$ip = sprintf(\"%0128s\", $ip);\n\n\t\t\t$ip = str_split($ip, 4);\n\t\t\tforeach ($ip as $index => $value)\n\t\t\t\t$ip[$index] = dechex(bindec($value));\n\n\t\t\treturn implode(\":\", str_split(implode(\"\", $ip), 4));\n\t\t}", "static function toBinary($int, $bit)\n\t{\n\t\tif(!$bit){\n\t\t\t$bit = self::is64bit() ? 64: 32;\n\t\t}\n\t\t$str = decbin($int);\n\t\treturn str_pad($str, $bit, 0, STR_PAD_LEFT);\n\t}", "function encode($str) {\n $encoded = '';\n\n for ($i = 0; $i < strlen($str); $i++) {\n\n $val = ord($str[$i]) + $i;\n\n if (!($i % 2))\n $val ^= 0xff;\n\n $encoded .= sprintf('%02x', $val);\n }\n\n return strrev($encoded);\n}", "function sha1_bin($hex)\r\n{\r\n return pack('H40', $hex);\r\n}", "function getByte($input)\n {\n return ord($input{$this->_strpos++});\n }", "public static function getBinary(): string\n {\n return PHP_BINARY;\n }", "public function getBinary()\n {\n return $this->get(self::_BINARY);\n }", "function hex_to_base64($str_to_conv) {\n\n\t$bin_cod = '';\n\n\t$bit = 4;\n\n\tfor($i=0; $i<strlen($str_to_conv); $i++) {\n\t\tforeach ($base16_code as $key => $value) {\n\t\t\tif ($str_to_conv[$i]==$value) {\n\t\t\t\t$result = $key;\n\t\t\t\t$byte = '';\n\t\t\t\tfor ($j=0; $j<$bit; $j++) {\n\t\t\t\t\t$byte = ($result%2).$byte;\n\t\t\t\t\t$result = floor($result/2);\n\t\t\t\t}\n\t\t\t\t$bin_cod .= $byte;\n\t\t\t}\n\t\t}\n\t}\n\n\t$str_ecoded = '';\n\tfor ($p=1; $p<=strlen($bin_cod); $p++){\n\t\tif ($p%6==0) {\n\t\t\t$seibit = substr($bin_cod, $p-6, 6);\n\t\t\t$key_for_base64_code = 0;\n\t\t\tfor ($q=0; $q<strlen($seibit); $q++){\n\t\t\t\t$key_for_base64_code = $key_for_base64_code + $seibit[$q]*pow(2,(5-$q));\n\t\t\t}\n\t\t\t$str_ecoded .= $base64_code[$key_for_base64_code];\n\t\t}\n\t}\n\n\treturn $str_ecoded;\n}", "function packBitValues($atoms)\n\t{\n\t\tarray_push($this->FMDebug, \"packBitsValues\");\n\n\t\tif (!(is_string($atoms))) {\n\n\t\t\t$this->FMError(\"packBitValues argument not a string\");\n\t\t}\n\n\t\t$atoms = $atoms . str_repeat(\"0\", (int) ((ceil(strlen($atoms) / 8)) * 8 - strlen($atoms)));\n\n\t\t$limit = ceil(strlen($atoms) / 8);\n\n\t\t$bytestream = \"\";\n\n\t\tfor ($n = 0; $n < $limit; $n++) {\n\n\t\t\t$bytestream .= chr(base_convert(substr($atoms, 0, 8), 2, 10));\n\t\t\t$atoms = substr($atoms, 8);\n\t\t}\n\n\t\tarray_pop($this->FMDebug);\n\n\t\treturn $bytestream;\n\t}", "public function getRaw()\n {\n // Save our current position\n $position = $this->ftell();\n\n $this->rewind();\n\n $raw = '';\n\n while ($this->valid()) {\n $raw .= $this->fgets();\n }\n\n // Go back to our original position\n $this->fseek($position);\n\n if ($this->isWrappedHex()) {\n return hex2bin($raw);\n }\n\n return $raw;\n }", "public static function toAscii($s)\n\t{\n\t\t$s = preg_replace('#[^\\x09\\x0A\\x0D\\x20-\\x7E\\xA0-\\x{2FF}\\x{370}-\\x{10FFFF}]#u', '', $s);\n\t\t$s = strtr($s, '`\\'\"^~?', \"\\x01\\x02\\x03\\x04\\x05\\x06\");\n\t\t$s = str_replace(\n\t\t\tarray(\"\\xE2\\x80\\x9E\", \"\\xE2\\x80\\x9C\", \"\\xE2\\x80\\x9D\", \"\\xE2\\x80\\x9A\", \"\\xE2\\x80\\x98\", \"\\xE2\\x80\\x99\", \"\\xC2\\xB0\"),\n\t\t\tarray(\"\\x03\", \"\\x03\", \"\\x03\", \"\\x02\", \"\\x02\", \"\\x02\", \"\\x04\"), $s\n\t\t);\n\t\tif (class_exists('Transliterator') && $transliterator = \\Transliterator::create('Any-Latin; Latin-ASCII')) {\n\t\t\t$s = $transliterator->transliterate($s);\n\t\t}\n\t\tif (ICONV_IMPL === 'glibc') {\n\t\t\t$s = str_replace(\n\t\t\t\tarray(\"\\xC2\\xBB\", \"\\xC2\\xAB\", \"\\xE2\\x80\\xA6\", \"\\xE2\\x84\\xA2\", \"\\xC2\\xA9\", \"\\xC2\\xAE\"),\n\t\t\t\tarray('>>', '<<', '...', 'TM', '(c)', '(R)'), $s\n\t\t\t);\n\t\t\t$s = @iconv('UTF-8', 'WINDOWS-1250//TRANSLIT//IGNORE', $s); // intentionally @\n\t\t\t$s = strtr($s, \"\\xa5\\xa3\\xbc\\x8c\\xa7\\x8a\\xaa\\x8d\\x8f\\x8e\\xaf\\xb9\\xb3\\xbe\\x9c\\x9a\\xba\\x9d\\x9f\\x9e\"\n\t\t\t\t. \"\\xbf\\xc0\\xc1\\xc2\\xc3\\xc4\\xc5\\xc6\\xc7\\xc8\\xc9\\xca\\xcb\\xcc\\xcd\\xce\\xcf\\xd0\\xd1\\xd2\\xd3\"\n\t\t\t\t. \"\\xd4\\xd5\\xd6\\xd7\\xd8\\xd9\\xda\\xdb\\xdc\\xdd\\xde\\xdf\\xe0\\xe1\\xe2\\xe3\\xe4\\xe5\\xe6\\xe7\\xe8\"\n\t\t\t\t. \"\\xe9\\xea\\xeb\\xec\\xed\\xee\\xef\\xf0\\xf1\\xf2\\xf3\\xf4\\xf5\\xf6\\xf8\\xf9\\xfa\\xfb\\xfc\\xfd\\xfe\"\n\t\t\t\t. \"\\x96\\xa0\\x8b\\x97\\x9b\\xa6\\xad\\xb7\",\n\t\t\t\t\"ALLSSSSTZZZallssstzzzRAAAALCCCEEEEIIDDNNOOOOxRUUUUYTsraaaalccceeeeiiddnnooooruuuuyt- <->|-.\");\n\t\t\t$s = preg_replace('#[^\\x00-\\x7F]++#', '', $s);\n\t\t} else {\n\t\t\t$s = @iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $s); // intentionally @\n\t\t}\n\t\t$s = str_replace(array('`', \"'\", '\"', '^', '~', '?'), '', $s);\n\t\treturn strtr($s, \"\\x01\\x02\\x03\\x04\\x05\\x06\", '`\\'\"^~?');\n\t}", "public static function tidy_bytes($data){\n\t\t/*\n\t\t\tTODO Port ruby source\n\t\t*/\n\t\treturn $data;\n\t\t\n\t\t#if force\n\t\t# return string.unpack(\"C*\").map do |b|\n\t\t# tidy_byte(b)\n\t\t# end.flatten.compact.pack(\"C*\").unpack(\"U*\").pack(\"U*\")\n\t\t#end\n #\n\t\t#bytes = string.unpack(\"C*\")\n\t\t#conts_expected = 0\n\t\t#last_lead = 0\n #\n\t\t#bytes.each_index do |i|\n #\n\t\t# byte = bytes[i]\n\t\t# is_cont = byte > 127 && byte < 192\n\t\t# is_lead = byte > 191 && byte < 245\n\t\t# is_unused = byte > 240\n\t\t# is_restricted = byte > 244\n #\n\t\t# # Impossible or highly unlikely byte? Clean it.\n\t\t# if is_unused || is_restricted\n\t\t# bytes[i] = tidy_byte(byte)\n\t\t# elsif is_cont\n\t\t# # Not expecting continuation byte? Clean up. Otherwise, now expect one less.\n\t\t# conts_expected == 0 ? bytes[i] = tidy_byte(byte) : conts_expected -= 1\n\t\t# else\n\t\t# if conts_expected > 0\n\t\t# # Expected continuation, but got ASCII or leading? Clean backwards up to\n\t\t# # the leading byte.\n\t\t# (1..(i - last_lead)).each {|j| bytes[i - j] = tidy_byte(bytes[i - j])}\n\t\t# conts_expected = 0\n\t\t# end\n\t\t# if is_lead\n\t\t# # Final byte is leading? Clean it.\n\t\t# if i == bytes.length - 1\n\t\t# bytes[i] = tidy_byte(bytes.last)\n\t\t# else\n\t\t# # Valid leading byte? Expect continuations determined by position of\n\t\t# # first zero bit, with max of 3.\n\t\t# conts_expected = byte < 224 ? 1 : byte < 240 ? 2 : 3\n\t\t# last_lead = i\n\t\t# end\n\t\t# end\n\t\t# end\n\t\t#end\n\t\t#bytes.empty? ? \"\" : bytes.flatten.compact.pack(\"C*\").unpack(\"U*\").pack(\"U*\")\n\t}", "function toHex($bytes) {\n\t\treturn implode('', array_map(function ($n){return ($n < 16 ? \"0\" : \"\") . dechex($n);}, $bytes));\n\t}", "function base64_to_hex($str_to_conv) {\n\n\t$bin_cod = '';\n\n\t$bin_string = '';\n\tfor ($i=0; $i<strlen($str_to_conv); $i++) { \n\t\t$base_64_key = array_search($str_to_conv[$i], $base64_code);\n\t\t$bin_string .= sprintf(\"%06d\", decbin($base_64_key));\n\t}\n\n\t$hex_string = '';\n\tfor ($i=0; $i < strlen($bin_string); $i += 4) { \n\t\t$hex_string .= base_convert(substr($bin_string, $i, 4), 2, 16);\n\t}\n\n\treturn $hex_string;\n}", "static public function ifcToBin(string $ifc)\n {\n if (strlen($ifc) !== 22) {\n // not an official IFC code\n\n return false;\n }\n\n $bin = \"\";\n\n for ($i = 0; $i < strlen($ifc); $i++) {\n $char = $ifc[$i];\n if ($binPart = self::ifcPartToBin($char)) {\n\n $length = $i == 0 ? 2 : 6;\n $binPart = self::prependBin($binPart, $length);\n\n $bin .= $binPart;\n } else {\n return false;\n }\n }\n\n return $bin;\n }", "public function decode(string $data): string\n {\n if (empty($data)) {\n return \"\";\n }\n\n if ($this->isCrockford()) {\n $data = strtoupper($data);\n $data = str_replace([\"O\", \"L\", \"I\", \"-\"], [\"0\", \"1\", \"1\", \"\"], $data);\n }\n\n $this->validateInput($data);\n\n $data = str_split($data);\n $data = array_map(function ($character) {\n if ($character !== $this->padding()) {\n $index = strpos($this->characters(), $character);\n return sprintf(\"%05b\", $index);\n }\n }, $data);\n $binary = implode(\"\", $data);\n\n /* Split to eight bit chunks. */\n $data = str_split($binary, 8);\n\n /* Make sure binary is divisible by eight by ignoring the incomplete byte. */\n $last = array_pop($data);\n if ((null !== $last) && (8 === strlen($last))) {\n $data[] = $last;\n }\n\n return implode(\"\", array_map(function ($byte) {\n //return pack(\"C\", bindec($byte));\n return chr((int)bindec($byte));\n }, $data));\n }", "function _twobytes2int_le($s) {\n\treturn (ord(substr($s, 1, 1))<<8) + ord(substr($s, 0, 1));\n}", "public static function ascii() {}", "static function base58_encode($string,$alphabet='123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'){\n\t\t$base=strlen($alphabet);\n\t\t// Type validation\n\t\tif(is_string($string) === false){\n\t\t\treturn false;\n\t\t}\n\t\t// If the string is empty, then the encoded string is obviously empty\n\t\tif(strlen($string) === 0){\n\t\t\treturn '';\n\t\t}\n\t\t// Now we need to convert the byte array into an arbitrary-precision decimal\n\t\t// We basically do this by performing a base256 to base10 conversion\n\t\t$hex=unpack('H*',$string);\n\t\t$hex=reset($hex);\n\t\t$decimal=new BigInteger($hex,16);\n\t\t// This loop now performs base 10 to base 58 conversion\n\t\t// The remainder or modulo on each loop becomes a base 58 character\n\t\t$output='';\n\t\twhile($decimal->cmp($base) >= 0){\n\t\t\tlist($decimal,$mod)=$decimal->divQR($base);\n\t\t\t$output.=$alphabet[$mod->toNumber()];\n\t\t}\n\t\t// If there's still a remainder, append it\n\t\tif($decimal->cmp(0) > 0){\n\t\t\t$output.=$alphabet[$decimal->toNumber()];\n\t\t}\n\t\t// Now we need to reverse the encoded data\n\t\t$output=strrev($output);\n\t\t// Now we need to add leading zeros\n\t\t$bytes=str_split($string);\n\t\tforeach($bytes as $byte){\n\t\t\tif($byte === \"\\x00\"){\n\t\t\t\t$output=$alphabet[0].$output;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\treturn (string)$output;\n\t}", "public static function bytesToString(&$bytes)\n {\n return self::packArrayToString(\"c*\", $bytes);\n }", "function dec_base_10_to_bin($dec){\n $binStr = '';\n while ($dec>=1){\n $bin = $dec % 2;\n $dec = round($dec/2, 0, PHP_ROUND_HALF_DOWN);\n $binStr .= $bin;\n }\n\n $binStr = strrev($binStr);\n return $binStr;\n }", "public static function Dec2Bin($value)\r {\r $res = $value;\r $bin = \"\";\r while(bccomp($res, 0) != 0)\r {\r $mod = bcmod($res, 2);\r $res = bcdiv($res, 2);\r $res = explode(\".\", $res);\r $res = $res[0];\r $bin = $mod.$bin;\r }\r return $bin;\r }", "function benc($obj) {\n\tif (!is_array($obj) || !isset($obj[\"type\"]) || !isset($obj[\"value\"]))\n\treturn;\n\t$c = $obj[\"value\"];\n\tswitch ($obj[\"type\"]) {\n\t\tcase \"string\":\n\t\t\treturn benc_str($c);\n\t\tcase \"integer\":\n\t\t\treturn benc_int($c);\n\t\tcase \"list\":\n\t\t\treturn benc_list($c);\n\t\tcase \"dictionary\":\n\t\t\treturn benc_dict($c);\n\t\tdefault:\n\t\t\treturn;\n\t}\n}", "function bigendian_int($str){\n\t$bits = array_map(\"intval\",str_split($str,1));\n\t$v = 0;\n\t$x = 0;\n\tfor($i = strlen($str) - 1; $i >= 0; --$i){\n\t\t$v += pow(2, $i) * $bits[$x];\n\t\t++$x;\n\t}\n\treturn $v;\n\n}", "function sortBinMessToRealMess($tab = array()) {\n $mess_decoded = null;\n\n foreach ($tab as $result_values) {\n $mess_decoded .= chr(bindec($result_values));\n }\n echo \"\n Alice reçoit Le Message, et trouve comme Message une fois dechiffré :\\n\",\n \" \", $mess_decoded, \"\\n\";\n }", "function toString($str) {\n $text_array = explode(\"\\r\\n\", chunk_split($str, 8));\n $newstring = '';\n for ($n = 0; $n < count($text_array) - 1; $n++) {\n $newstring .= chr(base_convert($text_array[$n], 2, 10));\n }\n return $newstring;\n}", "public function readByte()\n\t{\n\t\t$b = parent::readByte();\n\t\tif( $b >= 0 ){\n\t\t\t$this->length = ($this->length + 1) & 0xffffffff;\n\t\t\thash_update($this->crc, chr($b));\n\t\t}\n\t\treturn $b;\n\t}", "private function _convertIPAddressToBinary($ipAddress)\n {\n return base_convert(ip2long($ipAddress), 10, 2);\n }", "function Convert($str){\n $str = strtoupper($str);\n $arr = str_split($str);\n foreach ($arr as &$var){\n $var = ord($var); // converts to ascii\n }\n print_r($arr);\n $arr = base_convert($arr,10,36);\n return $test;\n}", "private function convertHexStringToByteString($hexString) {\n\t\t$result = \"\";\n\t\tfor($i=0;$i<strlen($hexString);$i += 2) $result .= chr(hexdec($hexString[$i].$hexString[$i+1]));\n\t\treturn $result;\n\t}", "function iptobin($ip) {\n\t\t\tif (!($type = IPv6::validate_ip($ip)))\n\t\t\t\treturn false;\n\n\t\t\t$ip = IPv6::uncompress($ip);\n\t\t\t$ip = explode(\":\", $ip);\n\n\t\t\t$binip = \"\";\n\t\t\tforeach ($ip as $value)\n\t\t\t\t$binip .= sprintf(\"%016s\", decbin(hexdec($value)));\n\n\t\t\treturn $binip;\n\t\t}", "function translate($binary){\n $exploded = str_split($binary);\n $output_array = array();\n $offset = 0;\n \n foreach($exploded as $digit){\n if(!isset($output_array[0])){\n $output_array[] = array($digit, 1);\n } else {\n if($digit == $output_array[$offset][0]){\n $output_array[$offset][1]++;\n } else {\n $output_array[] = array($digit, 1);\n $offset++;\n }\n }\n }\n $final_array = array();\n foreach($output_array as $block){\n $number2 = '';\n $value = $block[0];\n $number = $block[1];\n if($value == '1'){\n $value = '0';\n } else {\n $value = '00';\n }\n for($i = 1; $i <= $number; $i++){\n $number2 .= '0';\n }\n $final_array[] = $value;\n $final_array[] = $number2;\n }\n $output = implode(' ', $final_array);\n \n return $output;\n}", "function inet_to_bits($inet)\n{\n // Unpacks from a binary string into an array\n $unpacked = unpack('A*', $inet);\n $unpacked = str_split($unpacked[1]);\n $ip_bits = '';\n foreach ($unpacked as $char) {\n $ip_bits .= str_pad(decbin(ord($char)), 8, '0', STR_PAD_LEFT);\n }\n return $ip_bits;\n}", "protected function binary()\n {\n $binary = parent::binary();\n\n unset($binary[0]);\n $binary = array_values($binary);\n\n if ('phpdbg' === PHP_SAPI) {\n return array_merge([PHP_BINARY, '-qrr'], $binary);\n }\n\n $binary[0] = __DIR__.'/../../../../../'.$binary[0];\n\n return array_merge([PHP_BINARY], $binary);\n }", "function char_vigen_encode($a, $b)\r\n{\r\n\treturn char_rot(ord($b) - 65, $a);\r\n}", "function intoAscii($string)\r\n{\r\n $len = strlen($string);\r\n $y = ' ';\r\n for ($i=0; $i<$len;$i++){\r\n \r\n if (ord($string[$i]) < 100){\r\n \r\n $y.='0'.''.ord($string[$i]).' ';\r\n \r\n }else\r\n \r\n $y.= ord($string[$i]).' ';\r\n \r\n }\r\n return $y;\r\n}", "function intostring($ascii){\r\n $s = ' ';\r\n $array = str_split($ascii,4);\r\n $count = count($array);\r\n \r\n for ($i=0; $i<$count;$i++){\r\n $s.= chr($array[$i]);\r\n }\r\n return $s;\r\n}", "function mbstring_binary_safe_encoding($reset = \\false)\n {\n }", "public function getBin()\n\t{\n\t\treturn $this->bin;\n\t}", "private function inet_to_bits($inet, $IPv6) \r\n\t{\r\n\t\t$unpacked = unpack('A16', $inet);\r\n\t\t$unpacked = str_split($unpacked[1]);\r\n\t\t$binaryip = '';\r\n\t\t\r\n\t\tforeach ($unpacked as $char) {\r\n\t\t\t$binaryip .= str_pad(decbin(ord($char)), 8, '0', STR_PAD_LEFT);\r\n\t\t}\r\n\t\treturn $binaryip;\r\n\t}", "function isBinary($string){\n static $bin_chars = array(\n \"\\x00\", \"\\x01\", \"\\x02\", \"\\x03\", \"\\x04\",\n \"\\x05\", \"\\x06\", \"\\x07\", \"\\xFF\"\n );\n $result = false;\n if ($string != null) {\n foreach ($bin_chars as $char) {\n if (strpos($string, $char) !== false) {\n $result = true;\n break;\n }\n }\n }\n return $result;\n }", "function benc_list($a) {\n\t$s = \"l\";\n\tforeach ($a as $e) {\n\t\t$s .= benc($e);\n\t}\n\t$s .= \"e\";\n\treturn $s;\n}", "abstract function decode($bytes);", "function getBinary() {return $this->_binary;}", "public function uuid2bin($uuid)\n {\n if (! Uuid::isValid($uuid)) {\n return $uuid;\n }\n if (! $uuid instanceof Uuid) {\n $uuid = Uuid::fromString($uuid);\n }\n return $uuid->getBytes();\n }", "public static function strOrds($a) {\n $b = array();\n $a = mb_convert_encoding($a,\"UCS-4BE\",\"UTF-8\");\n for ($i=0; $i<mb_strlen($a,\"UCS-4BE\"); $i++) {\n // Now we have 4 bytes. Find their total numeric value.\n $c = unpack(\"N\", mb_substr($a,$i,1,\"UCS-4BE\"));\n $b[] = $c[1]; }\n return $b;\n }", "function benc_str($s) {\n\treturn strlen($s) . \":$s\";\n}", "static public function prependBin(string $bin, int $length = 128): string\n {\n\n // prepend 0's\n while (strlen($bin) < $length) {\n $bin = \"0\" . $bin;\n }\n\n return $bin;\n }", "public function toBinary()\n {\n try {\n return\n $this->getBinaryCommand().\n $this->getBinaryIdentifier().\n $this->getBinaryExpiry().\n $this->getBinaryDeviceToken().\n $this->getBinaryPayload()\n ;\n } catch (\\Exception $e) {\n throw new ConvertException('Unable to convert to binary', null, $e);\n }\n }", "private function inetToBits(string $ipv6): string\n {\n $unpck = \\str_split(\\unpack('A16', \\inet_pton($ipv6))[1]);\n\n foreach ($unpck as $key => $char) {\n $unpck[$key] = \\str_pad(\\decbin(\\ord($char)), 8, '0', STR_PAD_LEFT);\n }\n\n return \\implode('', $unpck);\n }", "public static function encode($txt){\n // expand key on same length\n $key = str_repeat(self::$_key, strlen($txt)/strlen(self::$_key) + 1);\n \n // split strings\n $data = str_split($txt);\n $shifts = str_split($key);\n \n // output;\n $output = array();\n \n // shift\n for ($i=0;$i<count($data);$i++){\n $a = ord($data[$i]);\n $b = ord($shifts[$i]);\n $c = 49;\n \n // odd-even switch\n if ($i%2==0){\n $a += $b;\n \n // prevent overflow\n if ($a>255){\n $a -= 255;\n $c = 48; \n }\n }else{\n $a -= $b;\n \n // prevent underflow\n if ($a<0){\n $a = -$a;\n $c = 48; \n }\n }\n \n $output[] = $a;\n $output[] = $c;\n }\n \n // convert array to hex values\n $hex = ''; \n foreach ($output as $el){\n $hex .= str_pad (dechex($el), 2 ,'0', STR_PAD_LEFT);\n }\n \n // return encrypted data\n return $hex;\n }", "public function writeUnsignedChar($byte){ }", "public function getBinaryBitsetBe(): string\n {\n return \\strrev($this->getBinaryBitsetLe());\n }", "public function encodeBlob( $b ) {\n\t\treturn $b;\n\t}", "public function binToArray(\n string $bytes\n ): array {\n $result = unpack('C*', $bytes);\n if (false === $result) {\n throw new RuntimeException('Can not convert bytes to array.');\n }\n\n return $result;\n }", "protected static function convertBytesToBigInt(array $bytes): string\n {\n $sig = $bytes[0] >= 0 ? 1 : -1;\n if ($sig === -1) {\n for ($pos = 47; $pos >= 0; --$pos) {\n $sub = ($bytes[$pos] & 0xFF) - 1;\n $bytes[$pos] = $sub <= 0x7F ? $sub : $sub - 0x100;\n if ($bytes[$pos] !== -1) {\n break;\n }\n }\n\n $bytes = \\array_map(function ($x) {\n return ~$x;\n }, $bytes);\n }\n\n $result = 0;\n $rev = \\array_reverse($bytes, false);\n foreach ($rev as $pos => $x) {\n $result = \\gmp_add($result, \\gmp_mul(\\gmp_and($x, 0xFF), \\gmp_pow(2, $pos * 8)));\n }\n\n return \\gmp_strval(\\gmp_mul($result, $sig));\n }", "protected static function convertBigintToBytes(string $bigInt): array\n {\n $bytesArrayTemp = [];\n for ($pos = 0; $pos < 48; ++$pos) {\n $bytesArrayTemp[] = (int) (\\gmp_abs($bigInt) >> $pos * 8) % (1 << 8);\n }\n\n $bytesArray = \\array_map(function ($x) {\n return ($x <= 0x7F) ? $x : $x - 0x100;\n }, \\array_reverse($bytesArrayTemp));\n\n if (\\gmp_cmp($bigInt, 0) < 0) {\n // 1-compliment\n $bytesArray = \\array_map(function ($x) {\n return ~$x;\n }, $bytesArray);\n\n for ($pos = \\count($bytesArray) - 1; $pos >= 0; --$pos) {\n $add = ($bytesArray[$pos] & 0xFF) + 1;\n $bytesArray[$pos] = ($add <= 0x7F) ? $add : $add - 0x100;\n if (0 !== $bytesArray[$pos]) {\n break;\n }\n }\n }\n\n return $bytesArray;\n }", "function dotbin($binin,$cdr_nmask){\r\n\tif ($binin==\"N/A\") return $binin;\r\n\t$oct=rtrim(chunk_split($binin,8,\".\"),\".\");\r\n\tif ($cdr_nmask > 0){\r\n\t\t$offset=sprintf(\"%u\",$cdr_nmask/8) + $cdr_nmask ;\r\n\t\treturn mb_substr($oct,0,$offset ) . \"&nbsp;&nbsp;&nbsp;\" . mb_substr($oct,$offset) ;\r\n\t} else {\r\n\treturn $oct;\r\n\t}\r\n}", "public static function bit8(int $data): string\n {\n return pack('C', $data);\n }" ]
[ "0.7237423", "0.70222133", "0.68546", "0.66503304", "0.628639", "0.6272994", "0.6226631", "0.61193436", "0.61016184", "0.60973084", "0.5998715", "0.5995095", "0.596487", "0.5920353", "0.58535224", "0.58064973", "0.57935125", "0.5760243", "0.57560295", "0.5746516", "0.57329065", "0.57262385", "0.56691605", "0.56649923", "0.5644892", "0.5604918", "0.5582202", "0.55446583", "0.5542253", "0.552011", "0.55148536", "0.54647505", "0.546112", "0.5442702", "0.5395337", "0.5359784", "0.5356842", "0.5332277", "0.5317722", "0.53161514", "0.5294549", "0.52836615", "0.52634156", "0.52496314", "0.52449673", "0.5233633", "0.52289", "0.5224701", "0.519743", "0.51967466", "0.51949793", "0.51762104", "0.51244915", "0.5102987", "0.50885", "0.50717616", "0.5070764", "0.50617373", "0.50575465", "0.50480247", "0.50477934", "0.50422114", "0.50418353", "0.5040871", "0.50397533", "0.5012278", "0.5011599", "0.50093806", "0.49972415", "0.499075", "0.49858248", "0.49752513", "0.49718264", "0.49608308", "0.49556634", "0.49538746", "0.49520558", "0.49343368", "0.49336922", "0.49283627", "0.49165452", "0.49146456", "0.49125582", "0.49096206", "0.49060234", "0.49048722", "0.4904512", "0.49039385", "0.48971945", "0.4888968", "0.4882994", "0.48797265", "0.48793843", "0.4878943", "0.48761824", "0.4867547", "0.48667696", "0.48568216", "0.4848243", "0.48478433" ]
0.52438915
45
Create a Font Awesome icon.
public static function newFontAwesomeIcon(): FontAwesomeIconInterface { return new FontAwesomeIcon(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fa_icon( $icon = 'user' ) {\n\t\treturn \"<i class=\\\"fa fa-{$icon}\\\"></i>\";\n\t}", "function font_awesome($icon){\n\treturn \"<span class='fa fa-fw $icon'></span>\";\n}", "public function get_icon()\n\t{\n\t\treturn 'fab fa-algolia';\n\t}", "static function icon($icon) {\n\t\treturn self::tag('i', 'glyphicon glyphicon-' . $icon);\n\t}", "function i($code){\n $icon = '<i class=\"fa fa-'.$code.'\"></i>';\n return $icon;\n }", "public function iconFunction($icon)\n {\n return sprintf('<span class=\"fa fa-%s\"></span>', $icon);\n }", "public function icon($icon);", "public function getIcon()\n {\n return ' fa fa-lock';\n }", "public static function parseFontAwesomeIcon(array $args): FontAwesomeIconInterface {\n\n $icon = static::newFontAwesomeIcon();\n\n $icon->setName(ArrayHelper::get($args, \"name\", \"home\"));\n $icon->setStyle(ArrayHelper::get($args, \"style\"));\n\n $icon->setAnimation(ArrayHelper::get($args, \"animation\"));\n $icon->setBordered(ArrayHelper::get($args, \"bordered\", false));\n $icon->setFixedWidth(ArrayHelper::get($args, \"fixedWidth\", false));\n $icon->setFont(ArrayHelper::get($args, \"font\"));\n $icon->setPull(ArrayHelper::get($args, \"pull\"));\n $icon->setSize(ArrayHelper::get($args, \"size\"));\n\n return $icon;\n }", "public function get_icon() {\n\t\treturn 'fa fa-pencil';\n\t}", "public function get_icon() {\n\t\treturn 'fa fa-pencil';\n\t}", "function _kalatheme_font_icon($name, $bundle = NULL, $attr = array(), $resolvePrefix = TRUE){\n if($bundle === NULL){\n $bundle = theme_get_setting('icon_font_library');\n }\n // Find the icon prefix\n if($resolvePrefix){\n switch($bundle){\n case('font_awesome'):\n $name = 'fa-' . $name;\n break;\n case('bootstrap_glyphicons'):\n $name = 'glyphicon-' . $name;\n break;\n }\n }\n\n $output = NULL;\n if (module_exists('icon')){\n $output = theme('icon', array(\n 'bundle' => $bundle,\n 'icon' => $name,\n 'attributes' => $attr\n ));\n }\n if($output === NULL){\n $attr = array();\n $attr += array('aria-hidden' => 'true' );\n $attr['class'] = array();\n\n if($bundle === 'font_awesome'){\n $attr['class'][] = 'fa';\n }\n elseif($bundle === 'bootstrap_glyphicons'){\n $attr['class'][] = 'glyphicon';\n }\n\n\n $attr['class'][] = $name;\n $output = '<span '. drupal_attributes($attr) . '></span>';\n }\n return $output;\n}", "function icon($which, $alt='', $url=false, $print_alt = false, $class=false) {\n return new Icon($which, $alt, $url, $print_alt, $class);\n}", "function addIcon($i){\n return $this->add('Icon',null,'Icon')->set($i)->addClass('atk-size-mega');\n }", "public function get_icon()\n {\n return 'fa fa-image';\n }", "function fa($icon, $element = null, $attr = null) {\n\t$render = '';\n\t\n\tif (is_null($element) && is_null($attr)) {\n\t\t$render = '<i class=\"fa fa-' . $icon . '\"></i>';\n\t} else {\n\t\tif (!is_null($element)) {\n\t\t\t$render = '<' . $element;\n\t\t} else {\n\t\t\t$render = '<i';\n\t\t}\n\t\tif (!is_null($attr)) {\n\t\t\tif (is_array($attr)) {\n\t\t\t\tif (!empty($attr['class'])) {\n\t\t\t\t\t$render .= ' class=\"fa fa-' . $icon . ' ' . $attr['class'] . '\"';\n\t\t\t\t} else {\n\t\t\t\t\t$render .= ' class=\"fa fa-' . $icon . '\"';\n\t\t\t\t}\n\t\t\t\tforeach ($attr as $index => $val) {\n\t\t\t\t\tif ($index != 'class') {\n\t\t\t\t\t\t$render .= ' ' . $index . '=\"' . $val . '\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$render .= ' ' . $attr;\n\t\t\t}\n\t\t} else {\n\t\t\t$render .= ' class=\"fa fa-' . $icon . '\"';\n\t\t}\n\t\tif (!is_null($element)) {\n\t\t\t$render .= '></' . $element . '>';\n\t\t} else {\n\t\t\t$render .= '></i>';\n\t\t}\n\t}\n\t\n\treturn $render;\n}", "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "public static function icon()\n {\n return '<i class=\"fas fa-plane-departure sidebar-icon\"></i>';\n }", "public function icon(): string;", "protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "protected function createIcon($item)\n {\n $output = '';\n\n if (array_key_exists('icon', $item)) {\n $output .= sprintf(\n '<i class=\"fa fa-lg fa-fw fa-%s\"></i> ',\n $item['icon']\n );\n }\n\n return $output;\n }", "function format_icon($p_icon, $p_color = '', $p_space_right = '5px'){\n\treturn '<i class=\"ace-icon fa ' . $p_icon . ' ' . $p_color . '\"></i>' . format_hspace($p_space_right);\n}", "public static function icon_factory( $fresh = false ) {\n\n\t\treturn self::factory( 'icon-factory', $fresh );\n\t}", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function get_icon()\n {\n return 'fa fa-file-video-o';\n }", "function av_icon($icon, $font = false, $string = 'string')\n{\t\n\treturn avia_font_manager::frontend_icon($icon, $font, $string);\n}", "function studeon_vc_iconpicker_type_fontawesome($icons) {\n\t\t$list = studeon_get_list_icons();\n\t\tif (!is_array($list) || count($list) == 0) return $icons;\n\t\t$rez = array();\n\t\tforeach ($list as $icon)\n\t\t\t$rez[] = array($icon => str_replace('icon-', '', $icon));\n\t\treturn array_merge( $icons, array(esc_html__('Theme Icons', 'studeon') => $rez) );\n\t}", "public function get_icon() {\n return 'fa fa-address-card';\n }", "protected function get__icon()\n\t{\n\t\treturn 'coffee';\n\t}", "public function get_icon()\n {\n return 'fa fa-heading';\n }", "public function admin_enqueue_fontawesomeBlock(){\n\t\t}", "public function get_icon() {\n return 'fas fa-comments';\n }", "public static function fontawesome_bwc($icon){\n $old_to_new = array(\n 'address-book-o' => 'address-book', 'address-card-o' => 'address-card', 'area-chart' => 'chart-area', 'arrow-circle-o-down' => 'arrow-alt-circle-down', 'arrow-circle-o-left' => 'arrow-alt-circle-left', 'arrow-circle-o-right' => 'arrow-alt-circle-right', 'arrow-circle-o-up' => 'arrow-alt-circle-up', 'arrows' => 'arrows-alt', 'arrows-alt' => 'expand-arrows-alt', 'arrows-h' => 'arrows-alt-h', 'arrows-v' => 'arrows-alt-v', 'asl-interpreting' => 'american-sign-language-interpreting', 'automobile' => 'car', 'bank' => 'university', 'bar-chart' => 'chart-bar', 'bar-chart-o' => 'chart-bar', 'bathtub' => 'bath', 'battery' => 'battery-full', 'battery-0' => 'battery-empty', 'battery-1' => 'battery-quarter', 'battery-2' => 'battery-half', 'battery-3' => 'battery-three-quarters', 'battery-4' => 'battery-full', 'bell-o' => 'bell', 'bell-slash-o' => 'bell-slash', 'bitbucket-square' => 'bitbucket', 'bitcoin' => 'btc', 'bookmark-o' => 'bookmark', 'building-o' => 'building', 'cab' => 'taxi', 'calendar' => 'calendar-alt', 'calendar-check-o' => 'calendar-check', 'calendar-minus-o' => 'calendar-minus', 'calendar-o' => 'calendar', 'calendar-plus-o' => 'calendar-plus', 'calendar-times-o' => 'calendar-times', 'caret-square-o-down' => 'caret-square-down', 'caret-square-o-left' => 'caret-square-left', 'caret-square-o-right' => 'caret-square-right', 'caret-square-o-up' => 'caret-square-up', 'cc' => 'closed-captioning', 'chain' => 'link', 'chain-broken' => 'unlink', 'check-circle-o' => 'check-circle', 'check-square-o' => 'check-square', 'circle-o' => 'circle', 'circle-o-notch' => 'circle-notch', 'circle-thin' => 'circle', 'clock-o' => 'clock', 'close' => 'times', 'cloud-download' => 'cloud-download-alt', 'cloud-upload' => 'cloud-upload-alt', 'cny' => 'yen-sign', 'code-fork' => 'code-branch', 'comment-o' => 'comment', 'commenting' => 'comment-dots', 'commenting-o' => 'comment-dots', 'comments-o' => 'comments', 'credit-card-alt' => 'credit-card', 'cutlery' => 'utensils', 'dashboard' => 'tachometer-alt', 'deafness' => 'deaf', 'dedent' => 'outdent', 'diamond' => 'gem', 'dollar' => 'dollar-sign', 'dot-circle-o' => 'dot-circle', 'drivers-license' => 'id-card', 'drivers-license-o' => 'id-card', 'eercast' => 'sellcast', 'envelope-o' => 'envelope', 'envelope-open-o' => 'envelope-open', 'eur' => 'euro-sign', 'euro' => 'euro-sign', 'exchange' => 'exchange-alt', 'external-link' => 'external-link-alt', 'external-link-square' => 'external-link-square-alt', 'eyedropper' => 'eye-dropper', 'fa' => 'font-awesome', 'facebook' => 'facebook-f', 'facebook-official' => 'facebook', 'feed' => 'rss', 'file-archive-o' => 'file-archive', 'file-audio-o' => 'file-audio', 'file-code-o' => 'file-code', 'file-excel-o' => 'file-excel', 'file-image-o' => 'file-image', 'file-movie-o' => 'file-video', 'file-o' => 'file', 'file-pdf-o' => 'file-pdf', 'file-photo-o' => 'file-image', 'file-picture-o' => 'file-image', 'file-powerpoint-o' => 'file-powerpoint', 'file-sound-o' => 'file-audio', 'file-text' => 'file-alt', 'file-text-o' => 'file-alt', 'file-video-o' => 'file-video', 'file-word-o' => 'file-word', 'file-zip-o' => 'file-archive', 'files-o' => 'copy', 'flag-o' => 'flag', 'flash' => 'bolt', 'floppy-o' => 'save', 'folder-o' => 'folder', 'folder-open-o' => 'folder-open', 'frown-o' => 'frown', 'futbol-o' => 'futbol', 'gbp' => 'pound-sign', 'ge' => 'empire', 'gear' => 'cog', 'gears' => 'cogs', 'gittip' => 'gratipay', 'glass' => 'glass-martini', 'google-plus' => 'google-plus-g', 'google-plus-circle' => 'google-plus', 'google-plus-official' => 'google-plus', 'group' => 'users', 'hand-grab-o' => 'hand-rock', 'hand-lizard-o' => 'hand-lizard', 'hand-o-down' => 'hand-point-down', 'hand-o-left' => 'hand-point-left', 'hand-o-right' => 'hand-point-right', 'hand-o-up' => 'hand-point-up', 'hand-paper-o' => 'hand-paper', 'hand-peace-o' => 'hand-peace', 'hand-pointer-o' => 'hand-pointer', 'hand-rock-o' => 'hand-rock', 'hand-scissors-o' => 'hand-scissors', 'hand-spock-o' => 'hand-spock', 'hand-stop-o' => 'hand-paper', 'handshake-o' => 'handshake', 'hard-of-hearing' => 'deaf', 'hdd-o' => 'hdd', 'header' => 'heading', 'heart-o' => 'heart', 'hospital-o' => 'hospital', 'hotel' => 'bed', 'hourglass-1' => 'hourglass-start', 'hourglass-2' => 'hourglass-half', 'hourglass-3' => 'hourglass-end', 'hourglass-o' => 'hourglass', 'id-card-o' => 'id-card', 'ils' => 'shekel-sign', 'inr' => 'rupee-sign', 'institution' => 'university', 'intersex' => 'transgender', 'jpy' => 'yen-sign', 'keyboard-o' => 'keyboard', 'krw' => 'won-sign', 'legal' => 'gavel', 'lemon-o' => 'lemon', 'level-down' => 'level-down-alt', 'level-up' => 'level-up-alt', 'life-bouy' => 'life-ring', 'life-buoy' => 'life-ring', 'life-saver' => 'life-ring', 'lightbulb-o' => 'lightbulb', 'line-chart' => 'chart-line', 'linkedin' => 'linkedin-in', 'linkedin-square' => 'linkedin', 'long-arrow-down' => 'long-arrow-alt-down', 'long-arrow-left' => 'long-arrow-alt-left', 'long-arrow-right' => 'long-arrow-alt-right', 'long-arrow-up' => 'long-arrow-alt-up', 'mail-forward' => 'share', 'mail-reply' => 'reply', 'mail-reply-all' => 'reply-all', 'map-marker' => 'map-marker-alt', 'map-o' => 'map', 'meanpath' => 'font-awesome', 'meh-o' => 'meh', 'minus-square-o' => 'minus-square', 'mobile' => 'mobile-alt', 'mobile-phone' => 'mobile-alt', 'money' => 'money-bill-alt', 'moon-o' => 'moon', 'mortar-board' => 'graduation-cap', 'navicon' => 'bars', 'newspaper-o' => 'newspaper', 'paper-plane-o' => 'paper-plane', 'paste' => 'clipboard', 'pause-circle-o' => 'pause-circle', 'pencil' => 'pencil-alt', 'pencil-square' => 'pen-square', 'pencil-square-o' => 'edit', 'photo' => 'image', 'picture-o' => 'image', 'pie-chart' => 'chart-pie', 'play-circle-o' => 'play-circle', 'plus-square-o' => 'plus-square', 'question-circle-o' => 'question-circle', 'ra' => 'rebel', 'refresh' => 'sync', 'remove' => 'times', 'reorder' => 'bars', 'repeat' => 'redo', 'resistance' => 'rebel', 'rmb' => 'yen-sign', 'rotate-left' => 'undo', 'rotate-right' => 'redo', 'rouble' => 'ruble-sign', 'rub' => 'ruble-sign', 'ruble' => 'ruble-sign', 'rupee' => 'rupee-sign', 's15' => 'bath', 'scissors' => 'cut', 'send' => 'paper-plane', 'send-o' => 'paper-plane', 'share-square-o' => 'share-square', 'shekel' => 'shekel-sign', 'sheqel' => 'shekel-sign', 'shield' => 'shield-alt', 'sign-in' => 'sign-in-alt', 'sign-out' => 'sign-out-alt', 'signing' => 'sign-language', 'sliders' => 'sliders-h', 'smile-o' => 'smile', 'snowflake-o' => 'snowflake', 'soccer-ball-o' => 'futbol', 'sort-alpha-asc' => 'sort-alpha-down', 'sort-alpha-desc' => 'sort-alpha-up', 'sort-amount-asc' => 'sort-amount-down', 'sort-amount-desc' => 'sort-amount-up', 'sort-asc' => 'sort-up', 'sort-desc' => 'sort-down', 'sort-numeric-asc' => 'sort-numeric-down', 'sort-numeric-desc' => 'sort-numeric-up', 'spoon' => 'utensil-spoon', 'square-o' => 'square', 'star-half-empty' => 'star-half', 'star-half-full' => 'star-half', 'star-half-o' => 'star-half', 'star-o' => 'star', 'sticky-note-o' => 'sticky-note', 'stop-circle-o' => 'stop-circle', 'sun-o' => 'sun', 'support' => 'life-ring', 'tablet' => 'tablet-alt', 'tachometer' => 'tachometer-alt', 'television' => 'tv', 'thermometer' => 'thermometer-full', 'thermometer-0' => 'thermometer-empty', 'thermometer-1' => 'thermometer-quarter', 'thermometer-2' => 'thermometer-half', 'thermometer-3' => 'thermometer-three-quarters', 'thermometer-4' => 'thermometer-full', 'thumb-tack' => 'thumbtack', 'thumbs-o-down' => 'thumbs-down', 'thumbs-o-up' => 'thumbs-up', 'ticket' => 'ticket-alt', 'times-circle-o' => 'times-circle', 'times-rectangle' => 'window-close', 'times-rectangle-o' => 'window-close', 'toggle-down' => 'caret-square-down', 'toggle-left' => 'caret-square-left', 'toggle-right' => 'caret-square-right', 'toggle-up' => 'caret-square-up', 'trash' => 'trash-alt', 'trash-o' => 'trash-alt', 'try' => 'lira-sign', 'turkish-lira' => 'lira-sign', 'unsorted' => 'sort', 'usd' => 'dollar-sign', 'user-circle-o' => 'user-circle', 'user-o' => 'user', 'vcard' => 'address-card', 'vcard-o' => 'address-card', 'video-camera' => 'video', 'vimeo' => 'vimeo-v', 'volume-control-phone' => 'phone-volume', 'warning' => 'exclamation-triangle', 'wechat' => 'weixin', 'wheelchair-alt' => 'accessible-icon', 'window-close-o' => 'window-close', 'won' => 'won-sign', 'y-combinator-square' => 'hacker-news', 'yc' => 'y-combinator', 'yc-square' => 'hacker-news', 'yen' => 'yen-sign', 'youtube-play' => 'youtube',\n );\n // Return new if found\n if(isset($old_to_new[$icon])){\n return $old_to_new[$icon];\n } \n // Otherwise just return original\n return $icon;\n }", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "function font_awesome()\n{\n wp_enqueue_style(\"font_awesome\", \"//use.fontawesome.com/releases/v5.6.3/css/all.css\");\n}", "private function createIconModifier($icon)\n {\n return $this->getBaseClass(\n str_replace(\"_\", \"-\", $icon),\n true\n );\n }", "function mod_escape_get_fontawesome_icon_map() {\n return [\n 'mod_escape:e/copy' => 'fa-clone',\n ];\n}", "public function getIcon($extension)\n {\n switch (strtolower($extension)) {\n case 'csv':\n case 'xls':\n case 'xlsx':\n $icon = 'fa-file-excel-o';\n break;\n case 'png':\n case 'jpg':\n $icon = 'fa-file-picture-o';\n break;\n case 'pdf':\n $icon = 'fa-file-pdf-o';\n break;\n case 'docx':\n $icon = 'fa-file-word-o';\n break;\n default:\n $icon = 'fa-file-o';\n break;\n }\n\n return \"<i class='fa {$icon}'></i>\";\n }", "public function getIcon() {}", "public function get_icon()\n {\n return 'fa fa-filter';\n }", "public static function favicon(){\n\t\t$fv = \"<link rel='shortcut icon' href='favicon.ico' type='image/x-icon' />\";\n\t\treturn $fv;\n\t}", "function theme_add_bootstrap_fontawesome() {\n\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() . '/css/bootstrap.min.css' );\n\twp_enqueue_style( 'style-css', get_stylesheet_directory_uri() . '/style.css' );\n\twp_enqueue_style( 'fontawesome-css', get_stylesheet_directory_uri() . '/css/font-awesome.min.css' );\n\twp_enqueue_script( 'bootstrap-js', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array(), '3.0.0', true );\n}", "protected function establish_icon() {\n\t\t$this->icon = \"<i class='sw swp_{$this->key}_icon'></i>\";\n\t}", "public static function getFactoryIconUseIt() {\n }", "public static function getIcon(): string\n {\n }", "public static function getIcon(): string\n {\n }", "public function icon($service)\n {\n return '<i class=\"icon-'.$service.'\"></i>';\n }", "public function get_icon() {\n\t\treturn 'fa fa-cloud';\n\t}", "function quasar_favico() {\n echo '<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"'.xr_get_option('company_logo_favicon', F_WAY.'/images/demo/favico.ico').'\" />';\n}", "function av_icon_css_string($char)\n{\n\tglobal $avia_config;\n\treturn \"content:'\\\\\".str_replace('ue','E',$avia_config['font_icons'][$char]['icon']).\"'; font-family: '\".$avia_config['font_icons'][$char]['font'].\"';\";\n}", "public function getIcon()\n {\n }", "public function icon($href)\n {\n return $this->rel('icon')->href($href);\n }", "function icon_shortcode($atts, $content = NULL) {\n $a = shortcode_atts( array(\n 'class' => ''\n ), $atts );\n $content = '<span class=\"fa '.$class.'\"></span>';\n return $content;\n}", "function simpleshop_product_add_to_cart_text($text) {\n return '<i class=\"fa fa-shopping-basket\"></i>';\n}", "function fa_func( $atts ) {\n $atts = shortcode_atts( array(\n 'icon' => '',\n 'link' => '',\n 'xclass' => ''\n ), $atts );\n $html = '';\n if( $atts['link'] ) {\n $html .= '<a href=\"'.$atts['link'].'\" target=\"_blank\" class=\"social-link\">';\n }\n $html .= '<i class=\"fa fa-'.$atts['icon'].' '.$atts['xclass'].'\"></i>';\n if( $atts['link'] ) {\n $html .= '</a>';\n }\n return $html;\n}", "public function get_icon() {\n\t\treturn 'eicon-icon-box';\n\t}", "function sIcon($icon, $class = null)\n {\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" class=\"' . $class . '\"><use xlink:href=\"#' . $icon . '\"></use></svg>';\n }", "function icon($icons = null, $options = array()) {\n\t\t// At least one icon is needed\n\t\tif (empty($icons)) return false;\n\t\t// If one icon specified, we convert it to an array\n\t\tif (is_string($icons)) $icons = array($icons);\n\n\t\t// Default options\n\t\t$options = array_merge(array(\n\t\t\t'class' => ''\n\t\t), $options);\n\n\t\t// We get an array of classnames\n\t\t$class = array_values(array_filter(explode(' ', $options['class'])));\n\t\t// We add the icons\n\t\t$class[] = 'icon';\n\t\tforeach($icons as &$icon) {\n\t\t\t$class[] = 'icon'.ucfirst($icon);\n\t\t}\n\t\t$options['class'] = implode(' ', $class);\n\n\t\t// Returning a span with icon class added\n\t\treturn $this->Html->tag('span','', $options);\n\t}", "function av_icon_class($font)\n{\n\tglobal $avia_config;\n\treturn 'avia-font-'.$avia_config['font_icons'][$font]['font'];\n}", "public function setIcon($icon);", "public function get_icon() {\n\t\treturn 'eicon-eye';\n\t}", "private function userIconType() {\n $firstInitial = substr($this->get('username'),0,1);\n if (strlen($firstInitial) > 0) {\n echo '<i class=\"first-initial\" aria-hidden=\"true\">'.$firstInitial.'</i><span class=\"sr-only\">My User</span>';\n } else {\n echo '<i class=\"fa fa-user\" aria-hidden=\"true\"></i><span class=\"sr-only\">My User</span>';\n }\n }", "public function icons() {\n\n\t\t$solid_icons = array(\n\t\t\t\"fas-f641\" => \"fas fa-ad\",\n\t\t\t\"fas-f2b9\" => \"fas fa-address-book\",\n\t\t\t\"fas-f2bb\" => \"fas fa-address-card\",\n\t\t\t\"fas-f042\" => \"fas fa-adjust\",\n\t\t\t\"fas-f5d0\" => \"fas fa-air-freshener\",\n\t\t\t\"fas-f037\" => \"fas fa-align-center\",\n\t\t\t\"fas-f039\" => \"fas fa-align-justify\",\n\t\t\t\"fas-f036\" => \"fas fa-align-left\",\n\t\t\t\"fas-f038\" => \"fas fa-align-right\",\n\t\t\t\"fas-f461\" => \"fas fa-allergies\",\n\t\t\t\"fas-f0f9\" => \"fas fa-ambulance\",\n\t\t\t\"fas-f2a3\" => \"fas fa-american-sign-language-interpreting\",\n\t\t\t\"fas-f13d\" => \"fas fa-anchor\",\n\t\t\t\"fas-f103\" => \"fas fa-angle-double-down\",\n\t\t\t\"fas-f100\" => \"fas fa-angle-double-left\",\n\t\t\t\"fas-f101\" => \"fas fa-angle-double-right\",\n\t\t\t\"fas-f102\" => \"fas fa-angle-double-up\",\n\t\t\t\"fas-f107\" => \"fas fa-angle-down\",\n\t\t\t\"fas-f104\" => \"fas fa-angle-left\",\n\t\t\t\"fas-f105\" => \"fas fa-angle-right\",\n\t\t\t\"fas-f106\" => \"fas fa-angle-up\",\n\t\t\t\"fas-f556\" => \"fas fa-angry\",\n\t\t\t\"fas-f644\" => \"fas fa-ankh\",\n\t\t\t\"fas-f5d1\" => \"fas fa-apple-alt\",\n\t\t\t\"fas-f187\" => \"fas fa-archive\",\n\t\t\t\"fas-f557\" => \"fas fa-archway\",\n\t\t\t\"fas-f358\" => \"fas fa-arrow-alt-circle-down\",\n\t\t\t\"fas-f359\" => \"fas fa-arrow-alt-circle-left\",\n\t\t\t\"fas-f35a\" => \"fas fa-arrow-alt-circle-right\",\n\t\t\t\"fas-f35b\" => \"fas fa-arrow-alt-circle-up\",\n\t\t\t\"fas-f0ab\" => \"fas fa-arrow-circle-down\",\n\t\t\t\"fas-f0a8\" => \"fas fa-arrow-circle-left\",\n\t\t\t\"fas-f0a9\" => \"fas fa-arrow-circle-right\",\n\t\t\t\"fas-f0aa\" => \"fas fa-arrow-circle-up\",\n\t\t\t\"fas-f063\" => \"fas fa-arrow-down\",\n\t\t\t\"fas-f060\" => \"fas fa-arrow-left\",\n\t\t\t\"fas-f061\" => \"fas fa-arrow-right\",\n\t\t\t\"fas-f062\" => \"fas fa-arrow-up\",\n\t\t\t\"fas-f0b2\" => \"fas fa-arrows-alt\",\n\t\t\t\"fas-f337\" => \"fas fa-arrows-alt-h\",\n\t\t\t\"fas-f338\" => \"fas fa-arrows-alt-v\",\n\t\t\t\"fas-f2a2\" => \"fas fa-assistive-listening-systems\",\n\t\t\t\"fas-f069\" => \"fas fa-asterisk\",\n\t\t\t\"fas-f1fa\" => \"fas fa-at\",\n\t\t\t\"fas-f558\" => \"fas fa-atlas\",\n\t\t\t\"fas-f5d2\" => \"fas fa-atom\",\n\t\t\t\"fas-f29e\" => \"fas fa-audio-description\",\n\t\t\t\"fas-f559\" => \"fas fa-award\",\n\t\t\t\"fas-f77c\" => \"fas fa-baby\",\n\t\t\t\"fas-f77d\" => \"fas fa-baby-carriage\",\n\t\t\t\"fas-f55a\" => \"fas fa-backspace\",\n\t\t\t\"fas-f04a\" => \"fas fa-backward\",\n\t\t\t\"fas-f7e5\" => \"fas fa-bacon\",\n\t\t\t\"fas-f666\" => \"fas fa-bahai\",\n\t\t\t\"fas-f24e\" => \"fas fa-balance-scale\",\n\t\t\t\"fas-f515\" => \"fas fa-balance-scale-left\",\n\t\t\t\"fas-f516\" => \"fas fa-balance-scale-right\",\n\t\t\t\"fas-f05e\" => \"fas fa-ban\",\n\t\t\t\"fas-f462\" => \"fas fa-band-aid\",\n\t\t\t\"fas-f02a\" => \"fas fa-barcode\",\n\t\t\t\"fas-f0c9\" => \"fas fa-bars\",\n\t\t\t\"fas-f433\" => \"fas fa-baseball-ball\",\n\t\t\t\"fas-f434\" => \"fas fa-basketball-ball\",\n\t\t\t\"fas-f2cd\" => \"fas fa-bath\",\n\t\t\t\"fas-f244\" => \"fas fa-battery-empty\",\n\t\t\t\"fas-f240\" => \"fas fa-battery-full\",\n\t\t\t\"fas-f242\" => \"fas fa-battery-half\",\n\t\t\t\"fas-f243\" => \"fas fa-battery-quarter\",\n\t\t\t\"fas-f241\" => \"fas fa-battery-three-quarters\",\n\t\t\t\"fas-f236\" => \"fas fa-bed\",\n\t\t\t\"fas-f0fc\" => \"fas fa-beer\",\n\t\t\t\"fas-f0f3\" => \"fas fa-bell\",\n\t\t\t\"fas-f1f6\" => \"fas fa-bell-slash\",\n\t\t\t\"fas-f55b\" => \"fas fa-bezier-curve\",\n\t\t\t\"fas-f647\" => \"fas fa-bible\",\n\t\t\t\"fas-f206\" => \"fas fa-bicycle\",\n\t\t\t\"fas-f84a\" => \"fas fa-biking\",\n\t\t\t\"fas-f1e5\" => \"fas fa-binoculars\",\n\t\t\t\"fas-f780\" => \"fas fa-biohazard\",\n\t\t\t\"fas-f1fd\" => \"fas fa-birthday-cake\",\n\t\t\t\"fas-f517\" => \"fas fa-blender\",\n\t\t\t\"fas-f6b6\" => \"fas fa-blender-phone\",\n\t\t\t\"fas-f29d\" => \"fas fa-blind\",\n\t\t\t\"fas-f781\" => \"fas fa-blog\",\n\t\t\t\"fas-f032\" => \"fas fa-bold\",\n\t\t\t\"fas-f0e7\" => \"fas fa-bolt\",\n\t\t\t\"fas-f1e2\" => \"fas fa-bomb\",\n\t\t\t\"fas-f5d7\" => \"fas fa-bone\",\n\t\t\t\"fas-f55c\" => \"fas fa-bong\",\n\t\t\t\"fas-f02d\" => \"fas fa-book\",\n\t\t\t\"fas-f6b7\" => \"fas fa-book-dead\",\n\t\t\t\"fas-f7e6\" => \"fas fa-book-medical\",\n\t\t\t\"fas-f518\" => \"fas fa-book-open\",\n\t\t\t\"fas-f5da\" => \"fas fa-book-reader\",\n\t\t\t\"fas-f02e\" => \"fas fa-bookmark\",\n\t\t\t\"fas-f84c\" => \"fas fa-border-all\",\n\t\t\t\"fas-f850\" => \"fas fa-border-none\",\n\t\t\t\"fas-f853\" => \"fas fa-border-style\",\n\t\t\t\"fas-f436\" => \"fas fa-bowling-ball\",\n\t\t\t\"fas-f466\" => \"fas fa-box\",\n\t\t\t\"fas-f49e\" => \"fas fa-box-open\",\n\t\t\t\"fas-f95b\" => \"fas fa-box-tissue\",\n\t\t\t\"fas-f468\" => \"fas fa-boxes\",\n\t\t\t\"fas-f2a1\" => \"fas fa-braille\",\n\t\t\t\"fas-f5dc\" => \"fas fa-brain\",\n\t\t\t\"fas-f7ec\" => \"fas fa-bread-slice\",\n\t\t\t\"fas-f0b1\" => \"fas fa-briefcase\",\n\t\t\t\"fas-f469\" => \"fas fa-briefcase-medical\",\n\t\t\t\"fas-f519\" => \"fas fa-broadcast-tower\",\n\t\t\t\"fas-f51a\" => \"fas fa-broom\",\n\t\t\t\"fas-f55d\" => \"fas fa-brush\",\n\t\t\t\"fas-f188\" => \"fas fa-bug\",\n\t\t\t\"fas-f1ad\" => \"fas fa-building\",\n\t\t\t\"fas-f0a1\" => \"fas fa-bullhorn\",\n\t\t\t\"fas-f140\" => \"fas fa-bullseye\",\n\t\t\t\"fas-f46a\" => \"fas fa-burn\",\n\t\t\t\"fas-f207\" => \"fas fa-bus\",\n\t\t\t\"fas-f55e\" => \"fas fa-bus-alt\",\n\t\t\t\"fas-f64a\" => \"fas fa-business-time\",\n\t\t\t\"fas-f1ec\" => \"fas fa-calculator\",\n\t\t\t\"fas-f133\" => \"fas fa-calendar\",\n\t\t\t\"fas-f073\" => \"fas fa-calendar-alt\",\n\t\t\t\"fas-f274\" => \"fas fa-calendar-check\",\n\t\t\t\"fas-f783\" => \"fas fa-calendar-day\",\n\t\t\t\"fas-f272\" => \"fas fa-calendar-minus\",\n\t\t\t\"fas-f271\" => \"fas fa-calendar-plus\",\n\t\t\t\"fas-f273\" => \"fas fa-calendar-times\",\n\t\t\t\"fas-f784\" => \"fas fa-calendar-week\",\n\t\t\t\"fas-f030\" => \"fas fa-camera\",\n\t\t\t\"fas-f083\" => \"fas fa-camera-retro\",\n\t\t\t\"fas-f6bb\" => \"fas fa-campground\",\n\t\t\t\"fas-f786\" => \"fas fa-candy-cane\",\n\t\t\t\"fas-f55f\" => \"fas fa-cannabis\",\n\t\t\t\"fas-f46b\" => \"fas fa-capsules\",\n\t\t\t\"fas-f1b9\" => \"fas fa-car\",\n\t\t\t\"fas-f5de\" => \"fas fa-car-alt\",\n\t\t\t\"fas-f5df\" => \"fas fa-car-battery\",\n\t\t\t\"fas-f5e1\" => \"fas fa-car-crash\",\n\t\t\t\"fas-f5e4\" => \"fas fa-car-side\",\n\t\t\t\"fas-f8ff\" => \"fas fa-caravan\",\n\t\t\t\"fas-f0d7\" => \"fas fa-caret-down\",\n\t\t\t\"fas-f0d9\" => \"fas fa-caret-left\",\n\t\t\t\"fas-f0da\" => \"fas fa-caret-right\",\n\t\t\t\"fas-f150\" => \"fas fa-caret-square-down\",\n\t\t\t\"fas-f191\" => \"fas fa-caret-square-left\",\n\t\t\t\"fas-f152\" => \"fas fa-caret-square-right\",\n\t\t\t\"fas-f151\" => \"fas fa-caret-square-up\",\n\t\t\t\"fas-f0d8\" => \"fas fa-caret-up\",\n\t\t\t\"fas-f787\" => \"fas fa-carrot\",\n\t\t\t\"fas-f218\" => \"fas fa-cart-arrow-down\",\n\t\t\t\"fas-f217\" => \"fas fa-cart-plus\",\n\t\t\t\"fas-f788\" => \"fas fa-cash-register\",\n\t\t\t\"fas-f6be\" => \"fas fa-cat\",\n\t\t\t\"fas-f0a3\" => \"fas fa-certificate\",\n\t\t\t\"fas-f6c0\" => \"fas fa-chair\",\n\t\t\t\"fas-f51b\" => \"fas fa-chalkboard\",\n\t\t\t\"fas-f51c\" => \"fas fa-chalkboard-teacher\",\n\t\t\t\"fas-f5e7\" => \"fas fa-charging-station\",\n\t\t\t\"fas-f1fe\" => \"fas fa-chart-area\",\n\t\t\t\"fas-f080\" => \"fas fa-chart-bar\",\n\t\t\t\"fas-f201\" => \"fas fa-chart-line\",\n\t\t\t\"fas-f200\" => \"fas fa-chart-pie\",\n\t\t\t\"fas-f00c\" => \"fas fa-check\",\n\t\t\t\"fas-f058\" => \"fas fa-check-circle\",\n\t\t\t\"fas-f560\" => \"fas fa-check-double\",\n\t\t\t\"fas-f14a\" => \"fas fa-check-square\",\n\t\t\t\"fas-f7ef\" => \"fas fa-cheese\",\n\t\t\t\"fas-f439\" => \"fas fa-chess\",\n\t\t\t\"fas-f43a\" => \"fas fa-chess-bishop\",\n\t\t\t\"fas-f43c\" => \"fas fa-chess-board\",\n\t\t\t\"fas-f43f\" => \"fas fa-chess-king\",\n\t\t\t\"fas-f441\" => \"fas fa-chess-knight\",\n\t\t\t\"fas-f443\" => \"fas fa-chess-pawn\",\n\t\t\t\"fas-f445\" => \"fas fa-chess-queen\",\n\t\t\t\"fas-f447\" => \"fas fa-chess-rook\",\n\t\t\t\"fas-f13a\" => \"fas fa-chevron-circle-down\",\n\t\t\t\"fas-f137\" => \"fas fa-chevron-circle-left\",\n\t\t\t\"fas-f138\" => \"fas fa-chevron-circle-right\",\n\t\t\t\"fas-f139\" => \"fas fa-chevron-circle-up\",\n\t\t\t\"fas-f078\" => \"fas fa-chevron-down\",\n\t\t\t\"fas-f053\" => \"fas fa-chevron-left\",\n\t\t\t\"fas-f054\" => \"fas fa-chevron-right\",\n\t\t\t\"fas-f077\" => \"fas fa-chevron-up\",\n\t\t\t\"fas-f1ae\" => \"fas fa-child\",\n\t\t\t\"fas-f51d\" => \"fas fa-church\",\n\t\t\t\"fas-f111\" => \"fas fa-circle\",\n\t\t\t\"fas-f1ce\" => \"fas fa-circle-notch\",\n\t\t\t\"fas-f64f\" => \"fas fa-city\",\n\t\t\t\"fas-f7f2\" => \"fas fa-clinic-medical\",\n\t\t\t\"fas-f328\" => \"fas fa-clipboard\",\n\t\t\t\"fas-f46c\" => \"fas fa-clipboard-check\",\n\t\t\t\"fas-f46d\" => \"fas fa-clipboard-list\",\n\t\t\t\"fas-f017\" => \"fas fa-clock\",\n\t\t\t\"fas-f24d\" => \"fas fa-clone\",\n\t\t\t\"fas-f20a\" => \"fas fa-closed-captioning\",\n\t\t\t\"fas-f0c2\" => \"fas fa-cloud\",\n\t\t\t\"fas-f381\" => \"fas fa-cloud-download-alt\",\n\t\t\t\"fas-f73b\" => \"fas fa-cloud-meatball\",\n\t\t\t\"fas-f6c3\" => \"fas fa-cloud-moon\",\n\t\t\t\"fas-f73c\" => \"fas fa-cloud-moon-rain\",\n\t\t\t\"fas-f73d\" => \"fas fa-cloud-rain\",\n\t\t\t\"fas-f740\" => \"fas fa-cloud-showers-heavy\",\n\t\t\t\"fas-f6c4\" => \"fas fa-cloud-sun\",\n\t\t\t\"fas-f743\" => \"fas fa-cloud-sun-rain\",\n\t\t\t\"fas-f382\" => \"fas fa-cloud-upload-alt\",\n\t\t\t\"fas-f561\" => \"fas fa-cocktail\",\n\t\t\t\"fas-f121\" => \"fas fa-code\",\n\t\t\t\"fas-f126\" => \"fas fa-code-branch\",\n\t\t\t\"fas-f0f4\" => \"fas fa-coffee\",\n\t\t\t\"fas-f013\" => \"fas fa-cog\",\n\t\t\t\"fas-f085\" => \"fas fa-cogs\",\n\t\t\t\"fas-f51e\" => \"fas fa-coins\",\n\t\t\t\"fas-f0db\" => \"fas fa-columns\",\n\t\t\t\"fas-f075\" => \"fas fa-comment\",\n\t\t\t\"fas-f27a\" => \"fas fa-comment-alt\",\n\t\t\t\"fas-f651\" => \"fas fa-comment-dollar\",\n\t\t\t\"fas-f4ad\" => \"fas fa-comment-dots\",\n\t\t\t\"fas-f7f5\" => \"fas fa-comment-medical\",\n\t\t\t\"fas-f4b3\" => \"fas fa-comment-slash\",\n\t\t\t\"fas-f086\" => \"fas fa-comments\",\n\t\t\t\"fas-f653\" => \"fas fa-comments-dollar\",\n\t\t\t\"fas-f51f\" => \"fas fa-compact-disc\",\n\t\t\t\"fas-f14e\" => \"fas fa-compass\",\n\t\t\t\"fas-f066\" => \"fas fa-compress\",\n\t\t\t\"fas-f422\" => \"fas fa-compress-alt\",\n\t\t\t\"fas-f78c\" => \"fas fa-compress-arrows-alt\",\n\t\t\t\"fas-f562\" => \"fas fa-concierge-bell\",\n\t\t\t\"fas-f563\" => \"fas fa-cookie\",\n\t\t\t\"fas-f564\" => \"fas fa-cookie-bite\",\n\t\t\t\"fas-f0c5\" => \"fas fa-copy\",\n\t\t\t\"fas-f1f9\" => \"fas fa-copyright\",\n\t\t\t\"fas-f4b8\" => \"fas fa-couch\",\n\t\t\t\"fas-f09d\" => \"fas fa-credit-card\",\n\t\t\t\"fas-f125\" => \"fas fa-crop\",\n\t\t\t\"fas-f565\" => \"fas fa-crop-alt\",\n\t\t\t\"fas-f654\" => \"fas fa-cross\",\n\t\t\t\"fas-f05b\" => \"fas fa-crosshairs\",\n\t\t\t\"fas-f520\" => \"fas fa-crow\",\n\t\t\t\"fas-f521\" => \"fas fa-crown\",\n\t\t\t\"fas-f7f7\" => \"fas fa-crutch\",\n\t\t\t\"fas-f1b2\" => \"fas fa-cube\",\n\t\t\t\"fas-f1b3\" => \"fas fa-cubes\",\n\t\t\t\"fas-f0c4\" => \"fas fa-cut\",\n\t\t\t\"fas-f1c0\" => \"fas fa-database\",\n\t\t\t\"fas-f2a4\" => \"fas fa-deaf\",\n\t\t\t\"fas-f747\" => \"fas fa-democrat\",\n\t\t\t\"fas-f108\" => \"fas fa-desktop\",\n\t\t\t\"fas-f655\" => \"fas fa-dharmachakra\",\n\t\t\t\"fas-f470\" => \"fas fa-diagnoses\",\n\t\t\t\"fas-f522\" => \"fas fa-dice\",\n\t\t\t\"fas-f6cf\" => \"fas fa-dice-d20\",\n\t\t\t\"fas-f6d1\" => \"fas fa-dice-d6\",\n\t\t\t\"fas-f523\" => \"fas fa-dice-five\",\n\t\t\t\"fas-f524\" => \"fas fa-dice-four\",\n\t\t\t\"fas-f525\" => \"fas fa-dice-one\",\n\t\t\t\"fas-f526\" => \"fas fa-dice-six\",\n\t\t\t\"fas-f527\" => \"fas fa-dice-three\",\n\t\t\t\"fas-f528\" => \"fas fa-dice-two\",\n\t\t\t\"fas-f566\" => \"fas fa-digital-tachograph\",\n\t\t\t\"fas-f5eb\" => \"fas fa-directions\",\n\t\t\t\"fas-f7fa\" => \"fas fa-disease\",\n\t\t\t\"fas-f529\" => \"fas fa-divide\",\n\t\t\t\"fas-f567\" => \"fas fa-dizzy\",\n\t\t\t\"fas-f471\" => \"fas fa-dna\",\n\t\t\t\"fas-f6d3\" => \"fas fa-dog\",\n\t\t\t\"fas-f155\" => \"fas fa-dollar-sign\",\n\t\t\t\"fas-f472\" => \"fas fa-dolly\",\n\t\t\t\"fas-f474\" => \"fas fa-dolly-flatbed\",\n\t\t\t\"fas-f4b9\" => \"fas fa-donate\",\n\t\t\t\"fas-f52a\" => \"fas fa-door-closed\",\n\t\t\t\"fas-f52b\" => \"fas fa-door-open\",\n\t\t\t\"fas-f192\" => \"fas fa-dot-circle\",\n\t\t\t\"fas-f4ba\" => \"fas fa-dove\",\n\t\t\t\"fas-f019\" => \"fas fa-download\",\n\t\t\t\"fas-f568\" => \"fas fa-drafting-compass\",\n\t\t\t\"fas-f6d5\" => \"fas fa-dragon\",\n\t\t\t\"fas-f5ee\" => \"fas fa-draw-polygon\",\n\t\t\t\"fas-f569\" => \"fas fa-drum\",\n\t\t\t\"fas-f56a\" => \"fas fa-drum-steelpan\",\n\t\t\t\"fas-f6d7\" => \"fas fa-drumstick-bite\",\n\t\t\t\"fas-f44b\" => \"fas fa-dumbbell\",\n\t\t\t\"fas-f793\" => \"fas fa-dumpster\",\n\t\t\t\"fas-f794\" => \"fas fa-dumpster-fire\",\n\t\t\t\"fas-f6d9\" => \"fas fa-dungeon\",\n\t\t\t\"fas-f044\" => \"fas fa-edit\",\n\t\t\t\"fas-f7fb\" => \"fas fa-egg\",\n\t\t\t\"fas-f052\" => \"fas fa-eject\",\n\t\t\t\"fas-f141\" => \"fas fa-ellipsis-h\",\n\t\t\t\"fas-f142\" => \"fas fa-ellipsis-v\",\n\t\t\t\"fas-f0e0\" => \"fas fa-envelope\",\n\t\t\t\"fas-f2b6\" => \"fas fa-envelope-open\",\n\t\t\t\"fas-f658\" => \"fas fa-envelope-open-text\",\n\t\t\t\"fas-f199\" => \"fas fa-envelope-square\",\n\t\t\t\"fas-f52c\" => \"fas fa-equals\",\n\t\t\t\"fas-f12d\" => \"fas fa-eraser\",\n\t\t\t\"fas-f796\" => \"fas fa-ethernet\",\n\t\t\t\"fas-f153\" => \"fas fa-euro-sign\",\n\t\t\t\"fas-f362\" => \"fas fa-exchange-alt\",\n\t\t\t\"fas-f12a\" => \"fas fa-exclamation\",\n\t\t\t\"fas-f06a\" => \"fas fa-exclamation-circle\",\n\t\t\t\"fas-f071\" => \"fas fa-exclamation-triangle\",\n\t\t\t\"fas-f065\" => \"fas fa-expand\",\n\t\t\t\"fas-f424\" => \"fas fa-expand-alt\",\n\t\t\t\"fas-f31e\" => \"fas fa-expand-arrows-alt\",\n\t\t\t\"fas-f35d\" => \"fas fa-external-link-alt\",\n\t\t\t\"fas-f360\" => \"fas fa-external-link-square-alt\",\n\t\t\t\"fas-f06e\" => \"fas fa-eye\",\n\t\t\t\"fas-f1fb\" => \"fas fa-eye-dropper\",\n\t\t\t\"fas-f070\" => \"fas fa-eye-slash\",\n\t\t\t\"fas-f863\" => \"fas fa-fan\",\n\t\t\t\"fas-f049\" => \"fas fa-fast-backward\",\n\t\t\t\"fas-f050\" => \"fas fa-fast-forward\",\n\t\t\t\"fas-f905\" => \"fas fa-faucet\",\n\t\t\t\"fas-f1ac\" => \"fas fa-fax\",\n\t\t\t\"fas-f52d\" => \"fas fa-feather\",\n\t\t\t\"fas-f56b\" => \"fas fa-feather-alt\",\n\t\t\t\"fas-f182\" => \"fas fa-female\",\n\t\t\t\"fas-f0fb\" => \"fas fa-fighter-jet\",\n\t\t\t\"fas-f15b\" => \"fas fa-file\",\n\t\t\t\"fas-f15c\" => \"fas fa-file-alt\",\n\t\t\t\"fas-f1c6\" => \"fas fa-file-archive\",\n\t\t\t\"fas-f1c7\" => \"fas fa-file-audio\",\n\t\t\t\"fas-f1c9\" => \"fas fa-file-code\",\n\t\t\t\"fas-f56c\" => \"fas fa-file-contract\",\n\t\t\t\"fas-f6dd\" => \"fas fa-file-csv\",\n\t\t\t\"fas-f56d\" => \"fas fa-file-download\",\n\t\t\t\"fas-f1c3\" => \"fas fa-file-excel\",\n\t\t\t\"fas-f56e\" => \"fas fa-file-export\",\n\t\t\t\"fas-f1c5\" => \"fas fa-file-image\",\n\t\t\t\"fas-f56f\" => \"fas fa-file-import\",\n\t\t\t\"fas-f570\" => \"fas fa-file-invoice\",\n\t\t\t\"fas-f571\" => \"fas fa-file-invoice-dollar\",\n\t\t\t\"fas-f477\" => \"fas fa-file-medical\",\n\t\t\t\"fas-f478\" => \"fas fa-file-medical-alt\",\n\t\t\t\"fas-f1c1\" => \"fas fa-file-pdf\",\n\t\t\t\"fas-f1c4\" => \"fas fa-file-powerpoint\",\n\t\t\t\"fas-f572\" => \"fas fa-file-prescription\",\n\t\t\t\"fas-f573\" => \"fas fa-file-signature\",\n\t\t\t\"fas-f574\" => \"fas fa-file-upload\",\n\t\t\t\"fas-f1c8\" => \"fas fa-file-video\",\n\t\t\t\"fas-f1c2\" => \"fas fa-file-word\",\n\t\t\t\"fas-f575\" => \"fas fa-fill\",\n\t\t\t\"fas-f576\" => \"fas fa-fill-drip\",\n\t\t\t\"fas-f008\" => \"fas fa-film\",\n\t\t\t\"fas-f0b0\" => \"fas fa-filter\",\n\t\t\t\"fas-f577\" => \"fas fa-fingerprint\",\n\t\t\t\"fas-f06d\" => \"fas fa-fire\",\n\t\t\t\"fas-f7e4\" => \"fas fa-fire-alt\",\n\t\t\t\"fas-f134\" => \"fas fa-fire-extinguisher\",\n\t\t\t\"fas-f479\" => \"fas fa-first-aid\",\n\t\t\t\"fas-f578\" => \"fas fa-fish\",\n\t\t\t\"fas-f6de\" => \"fas fa-fist-raised\",\n\t\t\t\"fas-f024\" => \"fas fa-flag\",\n\t\t\t\"fas-f11e\" => \"fas fa-flag-checkered\",\n\t\t\t\"fas-f74d\" => \"fas fa-flag-usa\",\n\t\t\t\"fas-f0c3\" => \"fas fa-flask\",\n\t\t\t\"fas-f579\" => \"fas fa-flushed\",\n\t\t\t\"fas-f07b\" => \"fas fa-folder\",\n\t\t\t\"fas-f65d\" => \"fas fa-folder-minus\",\n\t\t\t\"fas-f07c\" => \"fas fa-folder-open\",\n\t\t\t\"fas-f65e\" => \"fas fa-folder-plus\",\n\t\t\t\"fas-f031\" => \"fas fa-font\",\n\t\t\t\"fas-f44e\" => \"fas fa-football-ball\",\n\t\t\t\"fas-f04e\" => \"fas fa-forward\",\n\t\t\t\"fas-f52e\" => \"fas fa-frog\",\n\t\t\t\"fas-f119\" => \"fas fa-frown\",\n\t\t\t\"fas-f57a\" => \"fas fa-frown-open\",\n\t\t\t\"fas-f662\" => \"fas fa-funnel-dollar\",\n\t\t\t\"fas-f1e3\" => \"fas fa-futbol\",\n\t\t\t\"fas-f11b\" => \"fas fa-gamepad\",\n\t\t\t\"fas-f52f\" => \"fas fa-gas-pump\",\n\t\t\t\"fas-f0e3\" => \"fas fa-gavel\",\n\t\t\t\"fas-f3a5\" => \"fas fa-gem\",\n\t\t\t\"fas-f22d\" => \"fas fa-genderless\",\n\t\t\t\"fas-f6e2\" => \"fas fa-ghost\",\n\t\t\t\"fas-f06b\" => \"fas fa-gift\",\n\t\t\t\"fas-f79c\" => \"fas fa-gifts\",\n\t\t\t\"fas-f79f\" => \"fas fa-glass-cheers\",\n\t\t\t\"fas-f000\" => \"fas fa-glass-martini\",\n\t\t\t\"fas-f57b\" => \"fas fa-glass-martini-alt\",\n\t\t\t\"fas-f7a0\" => \"fas fa-glass-whiskey\",\n\t\t\t\"fas-f530\" => \"fas fa-glasses\",\n\t\t\t\"fas-f0ac\" => \"fas fa-globe\",\n\t\t\t\"fas-f57c\" => \"fas fa-globe-africa\",\n\t\t\t\"fas-f57d\" => \"fas fa-globe-americas\",\n\t\t\t\"fas-f57e\" => \"fas fa-globe-asia\",\n\t\t\t\"fas-f7a2\" => \"fas fa-globe-europe\",\n\t\t\t\"fas-f450\" => \"fas fa-golf-ball\",\n\t\t\t\"fas-f664\" => \"fas fa-gopuram\",\n\t\t\t\"fas-f19d\" => \"fas fa-graduation-cap\",\n\t\t\t\"fas-f531\" => \"fas fa-greater-than\",\n\t\t\t\"fas-f532\" => \"fas fa-greater-than-equal\",\n\t\t\t\"fas-f57f\" => \"fas fa-grimace\",\n\t\t\t\"fas-f580\" => \"fas fa-grin\",\n\t\t\t\"fas-f581\" => \"fas fa-grin-alt\",\n\t\t\t\"fas-f582\" => \"fas fa-grin-beam\",\n\t\t\t\"fas-f583\" => \"fas fa-grin-beam-sweat\",\n\t\t\t\"fas-f584\" => \"fas fa-grin-hearts\",\n\t\t\t\"fas-f585\" => \"fas fa-grin-squint\",\n\t\t\t\"fas-f586\" => \"fas fa-grin-squint-tears\",\n\t\t\t\"fas-f587\" => \"fas fa-grin-stars\",\n\t\t\t\"fas-f588\" => \"fas fa-grin-tears\",\n\t\t\t\"fas-f589\" => \"fas fa-grin-tongue\",\n\t\t\t\"fas-f58a\" => \"fas fa-grin-tongue-squint\",\n\t\t\t\"fas-f58b\" => \"fas fa-grin-tongue-wink\",\n\t\t\t\"fas-f58c\" => \"fas fa-grin-wink\",\n\t\t\t\"fas-f58d\" => \"fas fa-grip-horizontal\",\n\t\t\t\"fas-f7a4\" => \"fas fa-grip-lines\",\n\t\t\t\"fas-f7a5\" => \"fas fa-grip-lines-vertical\",\n\t\t\t\"fas-f58e\" => \"fas fa-grip-vertical\",\n\t\t\t\"fas-f7a6\" => \"fas fa-guitar\",\n\t\t\t\"fas-f0fd\" => \"fas fa-h-square\",\n\t\t\t\"fas-f805\" => \"fas fa-hamburger\",\n\t\t\t\"fas-f6e3\" => \"fas fa-hammer\",\n\t\t\t\"fas-f665\" => \"fas fa-hamsa\",\n\t\t\t\"fas-f4bd\" => \"fas fa-hand-holding\",\n\t\t\t\"fas-f4be\" => \"fas fa-hand-holding-heart\",\n\t\t\t\"fas-f95c\" => \"fas fa-hand-holding-medical\",\n\t\t\t\"fas-f4c0\" => \"fas fa-hand-holding-usd\",\n\t\t\t\"fas-f4c1\" => \"fas fa-hand-holding-water\",\n\t\t\t\"fas-f258\" => \"fas fa-hand-lizard\",\n\t\t\t\"fas-f806\" => \"fas fa-hand-middle-finger\",\n\t\t\t\"fas-f256\" => \"fas fa-hand-paper\",\n\t\t\t\"fas-f25b\" => \"fas fa-hand-peace\",\n\t\t\t\"fas-f0a7\" => \"fas fa-hand-point-down\",\n\t\t\t\"fas-f0a5\" => \"fas fa-hand-point-left\",\n\t\t\t\"fas-f0a4\" => \"fas fa-hand-point-right\",\n\t\t\t\"fas-f0a6\" => \"fas fa-hand-point-up\",\n\t\t\t\"fas-f25a\" => \"fas fa-hand-pointer\",\n\t\t\t\"fas-f255\" => \"fas fa-hand-rock\",\n\t\t\t\"fas-f257\" => \"fas fa-hand-scissors\",\n\t\t\t\"fas-f95d\" => \"fas fa-hand-sparkles\",\n\t\t\t\"fas-f259\" => \"fas fa-hand-spock\",\n\t\t\t\"fas-f4c2\" => \"fas fa-hands\",\n\t\t\t\"fas-f4c4\" => \"fas fa-hands-helping\",\n\t\t\t\"fas-f95e\" => \"fas fa-hands-wash\",\n\t\t\t\"fas-f2b5\" => \"fas fa-handshake\",\n\t\t\t\"fas-f95f\" => \"fas fa-handshake-alt-slash\",\n\t\t\t\"fas-f960\" => \"fas fa-handshake-slash\",\n\t\t\t\"fas-f6e6\" => \"fas fa-hanukiah\",\n\t\t\t\"fas-f807\" => \"fas fa-hard-hat\",\n\t\t\t\"fas-f292\" => \"fas fa-hashtag\",\n\t\t\t\"fas-f8c0\" => \"fas fa-hat-cowboy\",\n\t\t\t\"fas-f8c1\" => \"fas fa-hat-cowboy-side\",\n\t\t\t\"fas-f6e8\" => \"fas fa-hat-wizard\",\n\t\t\t\"fas-f0a0\" => \"fas fa-hdd\",\n\t\t\t\"fas-f961\" => \"fas fa-head-side-cough\",\n\t\t\t\"fas-f962\" => \"fas fa-head-side-cough-slash\",\n\t\t\t\"fas-f963\" => \"fas fa-head-side-mask\",\n\t\t\t\"fas-f964\" => \"fas fa-head-side-virus\",\n\t\t\t\"fas-f1dc\" => \"fas fa-heading\",\n\t\t\t\"fas-f025\" => \"fas fa-headphones\",\n\t\t\t\"fas-f58f\" => \"fas fa-headphones-alt\",\n\t\t\t\"fas-f590\" => \"fas fa-headset\",\n\t\t\t\"fas-f004\" => \"fas fa-heart\",\n\t\t\t\"fas-f7a9\" => \"fas fa-heart-broken\",\n\t\t\t\"fas-f21e\" => \"fas fa-heartbeat\",\n\t\t\t\"fas-f533\" => \"fas fa-helicopter\",\n\t\t\t\"fas-f591\" => \"fas fa-highlighter\",\n\t\t\t\"fas-f6ec\" => \"fas fa-hiking\",\n\t\t\t\"fas-f6ed\" => \"fas fa-hippo\",\n\t\t\t\"fas-f1da\" => \"fas fa-history\",\n\t\t\t\"fas-f453\" => \"fas fa-hockey-puck\",\n\t\t\t\"fas-f7aa\" => \"fas fa-holly-berry\",\n\t\t\t\"fas-f015\" => \"fas fa-home\",\n\t\t\t\"fas-f6f0\" => \"fas fa-horse\",\n\t\t\t\"fas-f7ab\" => \"fas fa-horse-head\",\n\t\t\t\"fas-f0f8\" => \"fas fa-hospital\",\n\t\t\t\"fas-f47d\" => \"fas fa-hospital-alt\",\n\t\t\t\"fas-f47e\" => \"fas fa-hospital-symbol\",\n\t\t\t\"fas-f80d\" => \"fas fa-hospital-user\",\n\t\t\t\"fas-f593\" => \"fas fa-hot-tub\",\n\t\t\t\"fas-f80f\" => \"fas fa-hotdog\",\n\t\t\t\"fas-f594\" => \"fas fa-hotel\",\n\t\t\t\"fas-f254\" => \"fas fa-hourglass\",\n\t\t\t\"fas-f253\" => \"fas fa-hourglass-end\",\n\t\t\t\"fas-f252\" => \"fas fa-hourglass-half\",\n\t\t\t\"fas-f251\" => \"fas fa-hourglass-start\",\n\t\t\t\"fas-f6f1\" => \"fas fa-house-damage\",\n\t\t\t\"fas-f965\" => \"fas fa-house-user\",\n\t\t\t\"fas-f6f2\" => \"fas fa-hryvnia\",\n\t\t\t\"fas-f246\" => \"fas fa-i-cursor\",\n\t\t\t\"fas-f810\" => \"fas fa-ice-cream\",\n\t\t\t\"fas-f7ad\" => \"fas fa-icicles\",\n\t\t\t\"fas-f86d\" => \"fas fa-icons\",\n\t\t\t\"fas-f2c1\" => \"fas fa-id-badge\",\n\t\t\t\"fas-f2c2\" => \"fas fa-id-card\",\n\t\t\t\"fas-f47f\" => \"fas fa-id-card-alt\",\n\t\t\t\"fas-f7ae\" => \"fas fa-igloo\",\n\t\t\t\"fas-f03e\" => \"fas fa-image\",\n\t\t\t\"fas-f302\" => \"fas fa-images\",\n\t\t\t\"fas-f01c\" => \"fas fa-inbox\",\n\t\t\t\"fas-f03c\" => \"fas fa-indent\",\n\t\t\t\"fas-f275\" => \"fas fa-industry\",\n\t\t\t\"fas-f534\" => \"fas fa-infinity\",\n\t\t\t\"fas-f129\" => \"fas fa-info\",\n\t\t\t\"fas-f05a\" => \"fas fa-info-circle\",\n\t\t\t\"fas-f033\" => \"fas fa-italic\",\n\t\t\t\"fas-f669\" => \"fas fa-jedi\",\n\t\t\t\"fas-f595\" => \"fas fa-joint\",\n\t\t\t\"fas-f66a\" => \"fas fa-journal-whills\",\n\t\t\t\"fas-f66b\" => \"fas fa-kaaba\",\n\t\t\t\"fas-f084\" => \"fas fa-key\",\n\t\t\t\"fas-f11c\" => \"fas fa-keyboard\",\n\t\t\t\"fas-f66d\" => \"fas fa-khanda\",\n\t\t\t\"fas-f596\" => \"fas fa-kiss\",\n\t\t\t\"fas-f597\" => \"fas fa-kiss-beam\",\n\t\t\t\"fas-f598\" => \"fas fa-kiss-wink-heart\",\n\t\t\t\"fas-f535\" => \"fas fa-kiwi-bird\",\n\t\t\t\"fas-f66f\" => \"fas fa-landmark\",\n\t\t\t\"fas-f1ab\" => \"fas fa-language\",\n\t\t\t\"fas-f109\" => \"fas fa-laptop\",\n\t\t\t\"fas-f5fc\" => \"fas fa-laptop-code\",\n\t\t\t\"fas-f966\" => \"fas fa-laptop-house\",\n\t\t\t\"fas-f812\" => \"fas fa-laptop-medical\",\n\t\t\t\"fas-f599\" => \"fas fa-laugh\",\n\t\t\t\"fas-f59a\" => \"fas fa-laugh-beam\",\n\t\t\t\"fas-f59b\" => \"fas fa-laugh-squint\",\n\t\t\t\"fas-f59c\" => \"fas fa-laugh-wink\",\n\t\t\t\"fas-f5fd\" => \"fas fa-layer-group\",\n\t\t\t\"fas-f06c\" => \"fas fa-leaf\",\n\t\t\t\"fas-f094\" => \"fas fa-lemon\",\n\t\t\t\"fas-f536\" => \"fas fa-less-than\",\n\t\t\t\"fas-f537\" => \"fas fa-less-than-equal\",\n\t\t\t\"fas-f3be\" => \"fas fa-level-down-alt\",\n\t\t\t\"fas-f3bf\" => \"fas fa-level-up-alt\",\n\t\t\t\"fas-f1cd\" => \"fas fa-life-ring\",\n\t\t\t\"fas-f0eb\" => \"fas fa-lightbulb\",\n\t\t\t\"fas-f0c1\" => \"fas fa-link\",\n\t\t\t\"fas-f195\" => \"fas fa-lira-sign\",\n\t\t\t\"fas-f03a\" => \"fas fa-list\",\n\t\t\t\"fas-f022\" => \"fas fa-list-alt\",\n\t\t\t\"fas-f0cb\" => \"fas fa-list-ol\",\n\t\t\t\"fas-f0ca\" => \"fas fa-list-ul\",\n\t\t\t\"fas-f124\" => \"fas fa-location-arrow\",\n\t\t\t\"fas-f023\" => \"fas fa-lock\",\n\t\t\t\"fas-f3c1\" => \"fas fa-lock-open\",\n\t\t\t\"fas-f309\" => \"fas fa-long-arrow-alt-down\",\n\t\t\t\"fas-f30a\" => \"fas fa-long-arrow-alt-left\",\n\t\t\t\"fas-f30b\" => \"fas fa-long-arrow-alt-right\",\n\t\t\t\"fas-f30c\" => \"fas fa-long-arrow-alt-up\",\n\t\t\t\"fas-f2a8\" => \"fas fa-low-vision\",\n\t\t\t\"fas-f59d\" => \"fas fa-luggage-cart\",\n\t\t\t\"fas-f604\" => \"fas fa-lungs\",\n\t\t\t\"fas-f967\" => \"fas fa-lungs-virus\",\n\t\t\t\"fas-f0d0\" => \"fas fa-magic\",\n\t\t\t\"fas-f076\" => \"fas fa-magnet\",\n\t\t\t\"fas-f674\" => \"fas fa-mail-bulk\",\n\t\t\t\"fas-f183\" => \"fas fa-male\",\n\t\t\t\"fas-f279\" => \"fas fa-map\",\n\t\t\t\"fas-f59f\" => \"fas fa-map-marked\",\n\t\t\t\"fas-f5a0\" => \"fas fa-map-marked-alt\",\n\t\t\t\"fas-f041\" => \"fas fa-map-marker\",\n\t\t\t\"fas-f3c5\" => \"fas fa-map-marker-alt\",\n\t\t\t\"fas-f276\" => \"fas fa-map-pin\",\n\t\t\t\"fas-f277\" => \"fas fa-map-signs\",\n\t\t\t\"fas-f5a1\" => \"fas fa-marker\",\n\t\t\t\"fas-f222\" => \"fas fa-mars\",\n\t\t\t\"fas-f227\" => \"fas fa-mars-double\",\n\t\t\t\"fas-f229\" => \"fas fa-mars-stroke\",\n\t\t\t\"fas-f22b\" => \"fas fa-mars-stroke-h\",\n\t\t\t\"fas-f22a\" => \"fas fa-mars-stroke-v\",\n\t\t\t\"fas-f6fa\" => \"fas fa-mask\",\n\t\t\t\"fas-f5a2\" => \"fas fa-medal\",\n\t\t\t\"fas-f0fa\" => \"fas fa-medkit\",\n\t\t\t\"fas-f11a\" => \"fas fa-meh\",\n\t\t\t\"fas-f5a4\" => \"fas fa-meh-blank\",\n\t\t\t\"fas-f5a5\" => \"fas fa-meh-rolling-eyes\",\n\t\t\t\"fas-f538\" => \"fas fa-memory\",\n\t\t\t\"fas-f676\" => \"fas fa-menorah\",\n\t\t\t\"fas-f223\" => \"fas fa-mercury\",\n\t\t\t\"fas-f753\" => \"fas fa-meteor\",\n\t\t\t\"fas-f2db\" => \"fas fa-microchip\",\n\t\t\t\"fas-f130\" => \"fas fa-microphone\",\n\t\t\t\"fas-f3c9\" => \"fas fa-microphone-alt\",\n\t\t\t\"fas-f539\" => \"fas fa-microphone-alt-slash\",\n\t\t\t\"fas-f131\" => \"fas fa-microphone-slash\",\n\t\t\t\"fas-f610\" => \"fas fa-microscope\",\n\t\t\t\"fas-f068\" => \"fas fa-minus\",\n\t\t\t\"fas-f056\" => \"fas fa-minus-circle\",\n\t\t\t\"fas-f146\" => \"fas fa-minus-square\",\n\t\t\t\"fas-f7b5\" => \"fas fa-mitten\",\n\t\t\t\"fas-f10b\" => \"fas fa-mobile\",\n\t\t\t\"fas-f3cd\" => \"fas fa-mobile-alt\",\n\t\t\t\"fas-f0d6\" => \"fas fa-money-bill\",\n\t\t\t\"fas-f3d1\" => \"fas fa-money-bill-alt\",\n\t\t\t\"fas-f53a\" => \"fas fa-money-bill-wave\",\n\t\t\t\"fas-f53b\" => \"fas fa-money-bill-wave-alt\",\n\t\t\t\"fas-f53c\" => \"fas fa-money-check\",\n\t\t\t\"fas-f53d\" => \"fas fa-money-check-alt\",\n\t\t\t\"fas-f5a6\" => \"fas fa-monument\",\n\t\t\t\"fas-f186\" => \"fas fa-moon\",\n\t\t\t\"fas-f5a7\" => \"fas fa-mortar-pestle\",\n\t\t\t\"fas-f678\" => \"fas fa-mosque\",\n\t\t\t\"fas-f21c\" => \"fas fa-motorcycle\",\n\t\t\t\"fas-f6fc\" => \"fas fa-mountain\",\n\t\t\t\"fas-f8cc\" => \"fas fa-mouse\",\n\t\t\t\"fas-f245\" => \"fas fa-mouse-pointer\",\n\t\t\t\"fas-f7b6\" => \"fas fa-mug-hot\",\n\t\t\t\"fas-f001\" => \"fas fa-music\",\n\t\t\t\"fas-f6ff\" => \"fas fa-network-wired\",\n\t\t\t\"fas-f22c\" => \"fas fa-neuter\",\n\t\t\t\"fas-f1ea\" => \"fas fa-newspaper\",\n\t\t\t\"fas-f53e\" => \"fas fa-not-equal\",\n\t\t\t\"fas-f481\" => \"fas fa-notes-medical\",\n\t\t\t\"fas-f247\" => \"fas fa-object-group\",\n\t\t\t\"fas-f248\" => \"fas fa-object-ungroup\",\n\t\t\t\"fas-f613\" => \"fas fa-oil-can\",\n\t\t\t\"fas-f679\" => \"fas fa-om\",\n\t\t\t\"fas-f700\" => \"fas fa-otter\",\n\t\t\t\"fas-f03b\" => \"fas fa-outdent\",\n\t\t\t\"fas-f815\" => \"fas fa-pager\",\n\t\t\t\"fas-f1fc\" => \"fas fa-paint-brush\",\n\t\t\t\"fas-f5aa\" => \"fas fa-paint-roller\",\n\t\t\t\"fas-f53f\" => \"fas fa-palette\",\n\t\t\t\"fas-f482\" => \"fas fa-pallet\",\n\t\t\t\"fas-f1d8\" => \"fas fa-paper-plane\",\n\t\t\t\"fas-f0c6\" => \"fas fa-paperclip\",\n\t\t\t\"fas-f4cd\" => \"fas fa-parachute-box\",\n\t\t\t\"fas-f1dd\" => \"fas fa-paragraph\",\n\t\t\t\"fas-f540\" => \"fas fa-parking\",\n\t\t\t\"fas-f5ab\" => \"fas fa-passport\",\n\t\t\t\"fas-f67b\" => \"fas fa-pastafarianism\",\n\t\t\t\"fas-f0ea\" => \"fas fa-paste\",\n\t\t\t\"fas-f04c\" => \"fas fa-pause\",\n\t\t\t\"fas-f28b\" => \"fas fa-pause-circle\",\n\t\t\t\"fas-f1b0\" => \"fas fa-paw\",\n\t\t\t\"fas-f67c\" => \"fas fa-peace\",\n\t\t\t\"fas-f304\" => \"fas fa-pen\",\n\t\t\t\"fas-f305\" => \"fas fa-pen-alt\",\n\t\t\t\"fas-f5ac\" => \"fas fa-pen-fancy\",\n\t\t\t\"fas-f5ad\" => \"fas fa-pen-nib\",\n\t\t\t\"fas-f14b\" => \"fas fa-pen-square\",\n\t\t\t\"fas-f303\" => \"fas fa-pencil-alt\",\n\t\t\t\"fas-f5ae\" => \"fas fa-pencil-ruler\",\n\t\t\t\"fas-f968\" => \"fas fa-people-arrows\",\n\t\t\t\"fas-f4ce\" => \"fas fa-people-carry\",\n\t\t\t\"fas-f816\" => \"fas fa-pepper-hot\",\n\t\t\t\"fas-f295\" => \"fas fa-percent\",\n\t\t\t\"fas-f541\" => \"fas fa-percentage\",\n\t\t\t\"fas-f756\" => \"fas fa-person-booth\",\n\t\t\t\"fas-f095\" => \"fas fa-phone\",\n\t\t\t\"fas-f879\" => \"fas fa-phone-alt\",\n\t\t\t\"fas-f3dd\" => \"fas fa-phone-slash\",\n\t\t\t\"fas-f098\" => \"fas fa-phone-square\",\n\t\t\t\"fas-f87b\" => \"fas fa-phone-square-alt\",\n\t\t\t\"fas-f2a0\" => \"fas fa-phone-volume\",\n\t\t\t\"fas-f87c\" => \"fas fa-photo-video\",\n\t\t\t\"fas-f4d3\" => \"fas fa-piggy-bank\",\n\t\t\t\"fas-f484\" => \"fas fa-pills\",\n\t\t\t\"fas-f818\" => \"fas fa-pizza-slice\",\n\t\t\t\"fas-f67f\" => \"fas fa-place-of-worship\",\n\t\t\t\"fas-f072\" => \"fas fa-plane\",\n\t\t\t\"fas-f5af\" => \"fas fa-plane-arrival\",\n\t\t\t\"fas-f5b0\" => \"fas fa-plane-departure\",\n\t\t\t\"fas-f969\" => \"fas fa-plane-slash\",\n\t\t\t\"fas-f04b\" => \"fas fa-play\",\n\t\t\t\"fas-f144\" => \"fas fa-play-circle\",\n\t\t\t\"fas-f1e6\" => \"fas fa-plug\",\n\t\t\t\"fas-f067\" => \"fas fa-plus\",\n\t\t\t\"fas-f055\" => \"fas fa-plus-circle\",\n\t\t\t\"fas-f0fe\" => \"fas fa-plus-square\",\n\t\t\t\"fas-f2ce\" => \"fas fa-podcast\",\n\t\t\t\"fas-f681\" => \"fas fa-poll\",\n\t\t\t\"fas-f682\" => \"fas fa-poll-h\",\n\t\t\t\"fas-f2fe\" => \"fas fa-poo\",\n\t\t\t\"fas-f75a\" => \"fas fa-poo-storm\",\n\t\t\t\"fas-f619\" => \"fas fa-poop\",\n\t\t\t\"fas-f3e0\" => \"fas fa-portrait\",\n\t\t\t\"fas-f154\" => \"fas fa-pound-sign\",\n\t\t\t\"fas-f011\" => \"fas fa-power-off\",\n\t\t\t\"fas-f683\" => \"fas fa-pray\",\n\t\t\t\"fas-f684\" => \"fas fa-praying-hands\",\n\t\t\t\"fas-f5b1\" => \"fas fa-prescription\",\n\t\t\t\"fas-f485\" => \"fas fa-prescription-bottle\",\n\t\t\t\"fas-f486\" => \"fas fa-prescription-bottle-alt\",\n\t\t\t\"fas-f02f\" => \"fas fa-print\",\n\t\t\t\"fas-f487\" => \"fas fa-procedures\",\n\t\t\t\"fas-f542\" => \"fas fa-project-diagram\",\n\t\t\t\"fas-f96a\" => \"fas fa-pump-medical\",\n\t\t\t\"fas-f96b\" => \"fas fa-pump-soap\",\n\t\t\t\"fas-f12e\" => \"fas fa-puzzle-piece\",\n\t\t\t\"fas-f029\" => \"fas fa-qrcode\",\n\t\t\t\"fas-f128\" => \"fas fa-question\",\n\t\t\t\"fas-f059\" => \"fas fa-question-circle\",\n\t\t\t\"fas-f458\" => \"fas fa-quidditch\",\n\t\t\t\"fas-f10d\" => \"fas fa-quote-left\",\n\t\t\t\"fas-f10e\" => \"fas fa-quote-right\",\n\t\t\t\"fas-f687\" => \"fas fa-quran\",\n\t\t\t\"fas-f7b9\" => \"fas fa-radiation\",\n\t\t\t\"fas-f7ba\" => \"fas fa-radiation-alt\",\n\t\t\t\"fas-f75b\" => \"fas fa-rainbow\",\n\t\t\t\"fas-f074\" => \"fas fa-random\",\n\t\t\t\"fas-f543\" => \"fas fa-receipt\",\n\t\t\t\"fas-f8d9\" => \"fas fa-record-vinyl\",\n\t\t\t\"fas-f1b8\" => \"fas fa-recycle\",\n\t\t\t\"fas-f01e\" => \"fas fa-redo\",\n\t\t\t\"fas-f2f9\" => \"fas fa-redo-alt\",\n\t\t\t\"fas-f25d\" => \"fas fa-registered\",\n\t\t\t\"fas-f87d\" => \"fas fa-remove-format\",\n\t\t\t\"fas-f3e5\" => \"fas fa-reply\",\n\t\t\t\"fas-f122\" => \"fas fa-reply-all\",\n\t\t\t\"fas-f75e\" => \"fas fa-republican\",\n\t\t\t\"fas-f7bd\" => \"fas fa-restroom\",\n\t\t\t\"fas-f079\" => \"fas fa-retweet\",\n\t\t\t\"fas-f4d6\" => \"fas fa-ribbon\",\n\t\t\t\"fas-f70b\" => \"fas fa-ring\",\n\t\t\t\"fas-f018\" => \"fas fa-road\",\n\t\t\t\"fas-f544\" => \"fas fa-robot\",\n\t\t\t\"fas-f135\" => \"fas fa-rocket\",\n\t\t\t\"fas-f4d7\" => \"fas fa-route\",\n\t\t\t\"fas-f09e\" => \"fas fa-rss\",\n\t\t\t\"fas-f143\" => \"fas fa-rss-square\",\n\t\t\t\"fas-f158\" => \"fas fa-ruble-sign\",\n\t\t\t\"fas-f545\" => \"fas fa-ruler\",\n\t\t\t\"fas-f546\" => \"fas fa-ruler-combined\",\n\t\t\t\"fas-f547\" => \"fas fa-ruler-horizontal\",\n\t\t\t\"fas-f548\" => \"fas fa-ruler-vertical\",\n\t\t\t\"fas-f70c\" => \"fas fa-running\",\n\t\t\t\"fas-f156\" => \"fas fa-rupee-sign\",\n\t\t\t\"fas-f5b3\" => \"fas fa-sad-cry\",\n\t\t\t\"fas-f5b4\" => \"fas fa-sad-tear\",\n\t\t\t\"fas-f7bf\" => \"fas fa-satellite\",\n\t\t\t\"fas-f7c0\" => \"fas fa-satellite-dish\",\n\t\t\t\"fas-f0c7\" => \"fas fa-save\",\n\t\t\t\"fas-f549\" => \"fas fa-school\",\n\t\t\t\"fas-f54a\" => \"fas fa-screwdriver\",\n\t\t\t\"fas-f70e\" => \"fas fa-scroll\",\n\t\t\t\"fas-f7c2\" => \"fas fa-sd-card\",\n\t\t\t\"fas-f002\" => \"fas fa-search\",\n\t\t\t\"fas-f688\" => \"fas fa-search-dollar\",\n\t\t\t\"fas-f689\" => \"fas fa-search-location\",\n\t\t\t\"fas-f010\" => \"fas fa-search-minus\",\n\t\t\t\"fas-f00e\" => \"fas fa-search-plus\",\n\t\t\t\"fas-f4d8\" => \"fas fa-seedling\",\n\t\t\t\"fas-f233\" => \"fas fa-server\",\n\t\t\t\"fas-f61f\" => \"fas fa-shapes\",\n\t\t\t\"fas-f064\" => \"fas fa-share\",\n\t\t\t\"fas-f1e0\" => \"fas fa-share-alt\",\n\t\t\t\"fas-f1e1\" => \"fas fa-share-alt-square\",\n\t\t\t\"fas-f14d\" => \"fas fa-share-square\",\n\t\t\t\"fas-f20b\" => \"fas fa-shekel-sign\",\n\t\t\t\"fas-f3ed\" => \"fas fa-shield-alt\",\n\t\t\t\"fas-f96c\" => \"fas fa-shield-virus\",\n\t\t\t\"fas-f21a\" => \"fas fa-ship\",\n\t\t\t\"fas-f48b\" => \"fas fa-shipping-fast\",\n\t\t\t\"fas-f54b\" => \"fas fa-shoe-prints\",\n\t\t\t\"fas-f290\" => \"fas fa-shopping-bag\",\n\t\t\t\"fas-f291\" => \"fas fa-shopping-basket\",\n\t\t\t\"fas-f07a\" => \"fas fa-shopping-cart\",\n\t\t\t\"fas-f2cc\" => \"fas fa-shower\",\n\t\t\t\"fas-f5b6\" => \"fas fa-shuttle-van\",\n\t\t\t\"fas-f4d9\" => \"fas fa-sign\",\n\t\t\t\"fas-f2f6\" => \"fas fa-sign-in-alt\",\n\t\t\t\"fas-f2a7\" => \"fas fa-sign-language\",\n\t\t\t\"fas-f2f5\" => \"fas fa-sign-out-alt\",\n\t\t\t\"fas-f012\" => \"fas fa-signal\",\n\t\t\t\"fas-f5b7\" => \"fas fa-signature\",\n\t\t\t\"fas-f7c4\" => \"fas fa-sim-card\",\n\t\t\t\"fas-f0e8\" => \"fas fa-sitemap\",\n\t\t\t\"fas-f7c5\" => \"fas fa-skating\",\n\t\t\t\"fas-f7c9\" => \"fas fa-skiing\",\n\t\t\t\"fas-f7ca\" => \"fas fa-skiing-nordic\",\n\t\t\t\"fas-f54c\" => \"fas fa-skull\",\n\t\t\t\"fas-f714\" => \"fas fa-skull-crossbones\",\n\t\t\t\"fas-f715\" => \"fas fa-slash\",\n\t\t\t\"fas-f7cc\" => \"fas fa-sleigh\",\n\t\t\t\"fas-f1de\" => \"fas fa-sliders-h\",\n\t\t\t\"fas-f118\" => \"fas fa-smile\",\n\t\t\t\"fas-f5b8\" => \"fas fa-smile-beam\",\n\t\t\t\"fas-f4da\" => \"fas fa-smile-wink\",\n\t\t\t\"fas-f75f\" => \"fas fa-smog\",\n\t\t\t\"fas-f48d\" => \"fas fa-smoking\",\n\t\t\t\"fas-f54d\" => \"fas fa-smoking-ban\",\n\t\t\t\"fas-f7cd\" => \"fas fa-sms\",\n\t\t\t\"fas-f7ce\" => \"fas fa-snowboarding\",\n\t\t\t\"fas-f2dc\" => \"fas fa-snowflake\",\n\t\t\t\"fas-f7d0\" => \"fas fa-snowman\",\n\t\t\t\"fas-f7d2\" => \"fas fa-snowplow\",\n\t\t\t\"fas-f96e\" => \"fas fa-soap\",\n\t\t\t\"fas-f696\" => \"fas fa-socks\",\n\t\t\t\"fas-f5ba\" => \"fas fa-solar-panel\",\n\t\t\t\"fas-f0dc\" => \"fas fa-sort\",\n\t\t\t\"fas-f15d\" => \"fas fa-sort-alpha-down\",\n\t\t\t\"fas-f881\" => \"fas fa-sort-alpha-down-alt\",\n\t\t\t\"fas-f15e\" => \"fas fa-sort-alpha-up\",\n\t\t\t\"fas-f882\" => \"fas fa-sort-alpha-up-alt\",\n\t\t\t\"fas-f160\" => \"fas fa-sort-amount-down\",\n\t\t\t\"fas-f884\" => \"fas fa-sort-amount-down-alt\",\n\t\t\t\"fas-f161\" => \"fas fa-sort-amount-up\",\n\t\t\t\"fas-f885\" => \"fas fa-sort-amount-up-alt\",\n\t\t\t\"fas-f0dd\" => \"fas fa-sort-down\",\n\t\t\t\"fas-f162\" => \"fas fa-sort-numeric-down\",\n\t\t\t\"fas-f886\" => \"fas fa-sort-numeric-down-alt\",\n\t\t\t\"fas-f163\" => \"fas fa-sort-numeric-up\",\n\t\t\t\"fas-f887\" => \"fas fa-sort-numeric-up-alt\",\n\t\t\t\"fas-f0de\" => \"fas fa-sort-up\",\n\t\t\t\"fas-f5bb\" => \"fas fa-spa\",\n\t\t\t\"fas-f197\" => \"fas fa-space-shuttle\",\n\t\t\t\"fas-f891\" => \"fas fa-spell-check\",\n\t\t\t\"fas-f717\" => \"fas fa-spider\",\n\t\t\t\"fas-f110\" => \"fas fa-spinner\",\n\t\t\t\"fas-f5bc\" => \"fas fa-splotch\",\n\t\t\t\"fas-f5bd\" => \"fas fa-spray-can\",\n\t\t\t\"fas-f0c8\" => \"fas fa-square\",\n\t\t\t\"fas-f45c\" => \"fas fa-square-full\",\n\t\t\t\"fas-f698\" => \"fas fa-square-root-alt\",\n\t\t\t\"fas-f5bf\" => \"fas fa-stamp\",\n\t\t\t\"fas-f005\" => \"fas fa-star\",\n\t\t\t\"fas-f699\" => \"fas fa-star-and-crescent\",\n\t\t\t\"fas-f089\" => \"fas fa-star-half\",\n\t\t\t\"fas-f5c0\" => \"fas fa-star-half-alt\",\n\t\t\t\"fas-f69a\" => \"fas fa-star-of-david\",\n\t\t\t\"fas-f621\" => \"fas fa-star-of-life\",\n\t\t\t\"fas-f048\" => \"fas fa-step-backward\",\n\t\t\t\"fas-f051\" => \"fas fa-step-forward\",\n\t\t\t\"fas-f0f1\" => \"fas fa-stethoscope\",\n\t\t\t\"fas-f249\" => \"fas fa-sticky-note\",\n\t\t\t\"fas-f04d\" => \"fas fa-stop\",\n\t\t\t\"fas-f28d\" => \"fas fa-stop-circle\",\n\t\t\t\"fas-f2f2\" => \"fas fa-stopwatch\",\n\t\t\t\"fas-f96f\" => \"fas fa-stopwatch-20\",\n\t\t\t\"fas-f54e\" => \"fas fa-store\",\n\t\t\t\"fas-f54f\" => \"fas fa-store-alt\",\n\t\t\t\"fas-f970\" => \"fas fa-store-alt-slash\",\n\t\t\t\"fas-f971\" => \"fas fa-store-slash\",\n\t\t\t\"fas-f550\" => \"fas fa-stream\",\n\t\t\t\"fas-f21d\" => \"fas fa-street-view\",\n\t\t\t\"fas-f0cc\" => \"fas fa-strikethrough\",\n\t\t\t\"fas-f551\" => \"fas fa-stroopwafel\",\n\t\t\t\"fas-f12c\" => \"fas fa-subscript\",\n\t\t\t\"fas-f239\" => \"fas fa-subway\",\n\t\t\t\"fas-f0f2\" => \"fas fa-suitcase\",\n\t\t\t\"fas-f5c1\" => \"fas fa-suitcase-rolling\",\n\t\t\t\"fas-f185\" => \"fas fa-sun\",\n\t\t\t\"fas-f12b\" => \"fas fa-superscript\",\n\t\t\t\"fas-f5c2\" => \"fas fa-surprise\",\n\t\t\t\"fas-f5c3\" => \"fas fa-swatchbook\",\n\t\t\t\"fas-f5c4\" => \"fas fa-swimmer\",\n\t\t\t\"fas-f5c5\" => \"fas fa-swimming-pool\",\n\t\t\t\"fas-f69b\" => \"fas fa-synagogue\",\n\t\t\t\"fas-f021\" => \"fas fa-sync\",\n\t\t\t\"fas-f2f1\" => \"fas fa-sync-alt\",\n\t\t\t\"fas-f48e\" => \"fas fa-syringe\",\n\t\t\t\"fas-f0ce\" => \"fas fa-table\",\n\t\t\t\"fas-f45d\" => \"fas fa-table-tennis\",\n\t\t\t\"fas-f10a\" => \"fas fa-tablet\",\n\t\t\t\"fas-f3fa\" => \"fas fa-tablet-alt\",\n\t\t\t\"fas-f490\" => \"fas fa-tablets\",\n\t\t\t\"fas-f3fd\" => \"fas fa-tachometer-alt\",\n\t\t\t\"fas-f02b\" => \"fas fa-tag\",\n\t\t\t\"fas-f02c\" => \"fas fa-tags\",\n\t\t\t\"fas-f4db\" => \"fas fa-tape\",\n\t\t\t\"fas-f0ae\" => \"fas fa-tasks\",\n\t\t\t\"fas-f1ba\" => \"fas fa-taxi\",\n\t\t\t\"fas-f62e\" => \"fas fa-teeth\",\n\t\t\t\"fas-f62f\" => \"fas fa-teeth-open\",\n\t\t\t\"fas-f769\" => \"fas fa-temperature-high\",\n\t\t\t\"fas-f76b\" => \"fas fa-temperature-low\",\n\t\t\t\"fas-f7d7\" => \"fas fa-tenge\",\n\t\t\t\"fas-f120\" => \"fas fa-terminal\",\n\t\t\t\"fas-f034\" => \"fas fa-text-height\",\n\t\t\t\"fas-f035\" => \"fas fa-text-width\",\n\t\t\t\"fas-f00a\" => \"fas fa-th\",\n\t\t\t\"fas-f009\" => \"fas fa-th-large\",\n\t\t\t\"fas-f00b\" => \"fas fa-th-list\",\n\t\t\t\"fas-f630\" => \"fas fa-theater-masks\",\n\t\t\t\"fas-f491\" => \"fas fa-thermometer\",\n\t\t\t\"fas-f2cb\" => \"fas fa-thermometer-empty\",\n\t\t\t\"fas-f2c7\" => \"fas fa-thermometer-full\",\n\t\t\t\"fas-f2c9\" => \"fas fa-thermometer-half\",\n\t\t\t\"fas-f2ca\" => \"fas fa-thermometer-quarter\",\n\t\t\t\"fas-f2c8\" => \"fas fa-thermometer-three-quarters\",\n\t\t\t\"fas-f165\" => \"fas fa-thumbs-down\",\n\t\t\t\"fas-f164\" => \"fas fa-thumbs-up\",\n\t\t\t\"fas-f08d\" => \"fas fa-thumbtack\",\n\t\t\t\"fas-f3ff\" => \"fas fa-ticket-alt\",\n\t\t\t\"fas-f00d\" => \"fas fa-times\",\n\t\t\t\"fas-f057\" => \"fas fa-times-circle\",\n\t\t\t\"fas-f043\" => \"fas fa-tint\",\n\t\t\t\"fas-f5c7\" => \"fas fa-tint-slash\",\n\t\t\t\"fas-f5c8\" => \"fas fa-tired\",\n\t\t\t\"fas-f204\" => \"fas fa-toggle-off\",\n\t\t\t\"fas-f205\" => \"fas fa-toggle-on\",\n\t\t\t\"fas-f7d8\" => \"fas fa-toilet\",\n\t\t\t\"fas-f71e\" => \"fas fa-toilet-paper\",\n\t\t\t\"fas-f972\" => \"fas fa-toilet-paper-slash\",\n\t\t\t\"fas-f552\" => \"fas fa-toolbox\",\n\t\t\t\"fas-f7d9\" => \"fas fa-tools\",\n\t\t\t\"fas-f5c9\" => \"fas fa-tooth\",\n\t\t\t\"fas-f6a0\" => \"fas fa-torah\",\n\t\t\t\"fas-f6a1\" => \"fas fa-torii-gate\",\n\t\t\t\"fas-f722\" => \"fas fa-tractor\",\n\t\t\t\"fas-f25c\" => \"fas fa-trademark\",\n\t\t\t\"fas-f637\" => \"fas fa-traffic-light\",\n\t\t\t\"fas-f941\" => \"fas fa-trailer\",\n\t\t\t\"fas-f238\" => \"fas fa-train\",\n\t\t\t\"fas-f7da\" => \"fas fa-tram\",\n\t\t\t\"fas-f224\" => \"fas fa-transgender\",\n\t\t\t\"fas-f225\" => \"fas fa-transgender-alt\",\n\t\t\t\"fas-f1f8\" => \"fas fa-trash\",\n\t\t\t\"fas-f2ed\" => \"fas fa-trash-alt\",\n\t\t\t\"fas-f829\" => \"fas fa-trash-restore\",\n\t\t\t\"fas-f82a\" => \"fas fa-trash-restore-alt\",\n\t\t\t\"fas-f1bb\" => \"fas fa-tree\",\n\t\t\t\"fas-f091\" => \"fas fa-trophy\",\n\t\t\t\"fas-f0d1\" => \"fas fa-truck\",\n\t\t\t\"fas-f4de\" => \"fas fa-truck-loading\",\n\t\t\t\"fas-f63b\" => \"fas fa-truck-monster\",\n\t\t\t\"fas-f4df\" => \"fas fa-truck-moving\",\n\t\t\t\"fas-f63c\" => \"fas fa-truck-pickup\",\n\t\t\t\"fas-f553\" => \"fas fa-tshirt\",\n\t\t\t\"fas-f1e4\" => \"fas fa-tty\",\n\t\t\t\"fas-f26c\" => \"fas fa-tv\",\n\t\t\t\"fas-f0e9\" => \"fas fa-umbrella\",\n\t\t\t\"fas-f5ca\" => \"fas fa-umbrella-beach\",\n\t\t\t\"fas-f0cd\" => \"fas fa-underline\",\n\t\t\t\"fas-f0e2\" => \"fas fa-undo\",\n\t\t\t\"fas-f2ea\" => \"fas fa-undo-alt\",\n\t\t\t\"fas-f29a\" => \"fas fa-universal-access\",\n\t\t\t\"fas-f19c\" => \"fas fa-university\",\n\t\t\t\"fas-f127\" => \"fas fa-unlink\",\n\t\t\t\"fas-f09c\" => \"fas fa-unlock\",\n\t\t\t\"fas-f13e\" => \"fas fa-unlock-alt\",\n\t\t\t\"fas-f093\" => \"fas fa-upload\",\n\t\t\t\"fas-f007\" => \"fas fa-user\",\n\t\t\t\"fas-f406\" => \"fas fa-user-alt\",\n\t\t\t\"fas-f4fa\" => \"fas fa-user-alt-slash\",\n\t\t\t\"fas-f4fb\" => \"fas fa-user-astronaut\",\n\t\t\t\"fas-f4fc\" => \"fas fa-user-check\",\n\t\t\t\"fas-f2bd\" => \"fas fa-user-circle\",\n\t\t\t\"fas-f4fd\" => \"fas fa-user-clock\",\n\t\t\t\"fas-f4fe\" => \"fas fa-user-cog\",\n\t\t\t\"fas-f4ff\" => \"fas fa-user-edit\",\n\t\t\t\"fas-f500\" => \"fas fa-user-friends\",\n\t\t\t\"fas-f501\" => \"fas fa-user-graduate\",\n\t\t\t\"fas-f728\" => \"fas fa-user-injured\",\n\t\t\t\"fas-f502\" => \"fas fa-user-lock\",\n\t\t\t\"fas-f0f0\" => \"fas fa-user-md\",\n\t\t\t\"fas-f503\" => \"fas fa-user-minus\",\n\t\t\t\"fas-f504\" => \"fas fa-user-ninja\",\n\t\t\t\"fas-f82f\" => \"fas fa-user-nurse\",\n\t\t\t\"fas-f234\" => \"fas fa-user-plus\",\n\t\t\t\"fas-f21b\" => \"fas fa-user-secret\",\n\t\t\t\"fas-f505\" => \"fas fa-user-shield\",\n\t\t\t\"fas-f506\" => \"fas fa-user-slash\",\n\t\t\t\"fas-f507\" => \"fas fa-user-tag\",\n\t\t\t\"fas-f508\" => \"fas fa-user-tie\",\n\t\t\t\"fas-f235\" => \"fas fa-user-times\",\n\t\t\t\"fas-f0c0\" => \"fas fa-users\",\n\t\t\t\"fas-f509\" => \"fas fa-users-cog\",\n\t\t\t\"fas-f2e5\" => \"fas fa-utensil-spoon\",\n\t\t\t\"fas-f2e7\" => \"fas fa-utensils\",\n\t\t\t\"fas-f5cb\" => \"fas fa-vector-square\",\n\t\t\t\"fas-f221\" => \"fas fa-venus\",\n\t\t\t\"fas-f226\" => \"fas fa-venus-double\",\n\t\t\t\"fas-f228\" => \"fas fa-venus-mars\",\n\t\t\t\"fas-f492\" => \"fas fa-vial\",\n\t\t\t\"fas-f493\" => \"fas fa-vials\",\n\t\t\t\"fas-f03d\" => \"fas fa-video\",\n\t\t\t\"fas-f4e2\" => \"fas fa-video-slash\",\n\t\t\t\"fas-f6a7\" => \"fas fa-vihara\",\n\t\t\t\"fas-f974\" => \"fas fa-virus\",\n\t\t\t\"fas-f975\" => \"fas fa-virus-slash\",\n\t\t\t\"fas-f976\" => \"fas fa-viruses\",\n\t\t\t\"fas-f897\" => \"fas fa-voicemail\",\n\t\t\t\"fas-f45f\" => \"fas fa-volleyball-ball\",\n\t\t\t\"fas-f027\" => \"fas fa-volume-down\",\n\t\t\t\"fas-f6a9\" => \"fas fa-volume-mute\",\n\t\t\t\"fas-f026\" => \"fas fa-volume-off\",\n\t\t\t\"fas-f028\" => \"fas fa-volume-up\",\n\t\t\t\"fas-f772\" => \"fas fa-vote-yea\",\n\t\t\t\"fas-f729\" => \"fas fa-vr-cardboard\",\n\t\t\t\"fas-f554\" => \"fas fa-walking\",\n\t\t\t\"fas-f555\" => \"fas fa-wallet\",\n\t\t\t\"fas-f494\" => \"fas fa-warehouse\",\n\t\t\t\"fas-f773\" => \"fas fa-water\",\n\t\t\t\"fas-f83e\" => \"fas fa-wave-square\",\n\t\t\t\"fas-f496\" => \"fas fa-weight\",\n\t\t\t\"fas-f5cd\" => \"fas fa-weight-hanging\",\n\t\t\t\"fas-f193\" => \"fas fa-wheelchair\",\n\t\t\t\"fas-f1eb\" => \"fas fa-wifi\",\n\t\t\t\"fas-f72e\" => \"fas fa-wind\",\n\t\t\t\"fas-f410\" => \"fas fa-window-close\",\n\t\t\t\"fas-f2d0\" => \"fas fa-window-maximize\",\n\t\t\t\"fas-f2d1\" => \"fas fa-window-minimize\",\n\t\t\t\"fas-f2d2\" => \"fas fa-window-restore\",\n\t\t\t\"fas-f72f\" => \"fas fa-wine-bottle\",\n\t\t\t\"fas-f4e3\" => \"fas fa-wine-glass\",\n\t\t\t\"fas-f5ce\" => \"fas fa-wine-glass-alt\",\n\t\t\t\"fas-f159\" => \"fas fa-won-sign\",\n\t\t\t\"fas-f0ad\" => \"fas fa-wrench\",\n\t\t\t\"fas-f497\" => \"fas fa-x-ray\",\n\t\t\t\"fas-f157\" => \"fas fa-yen-sign\",\n\t\t\t\"fas-f6ad\" => \"fas fa-yin-y\"\n\t\t);\n\n\t\t$regular_icons = array(\t\n\t\t\t\"far-f2b9\" => \"far fa-address-book\",\n\t\t\t\"far-f2bb\" => \"far fa-address-card\",\n\t\t\t\"far-f556\" => \"far fa-angry\",\n\t\t\t\"far-f358\" => \"far fa-arrow-alt-circle-down\",\n\t\t\t\"far-f359\" => \"far fa-arrow-alt-circle-left\",\n\t\t\t\"far-f35a\" => \"far fa-arrow-alt-circle-right\",\n\t\t\t\"far-f35b\" => \"far fa-arrow-alt-circle-up\",\n\t\t\t\"far-f0f3\" => \"far fa-bell\",\n\t\t\t\"far-f1f6\" => \"far fa-bell-slash\",\n\t\t\t\"far-f02e\" => \"far fa-bookmark\",\n\t\t\t\"far-f1ad\" => \"far fa-building\",\n\t\t\t\"far-f133\" => \"far fa-calendar\",\n\t\t\t\"far-f073\" => \"far fa-calendar-alt\",\n\t\t\t\"far-f274\" => \"far fa-calendar-check\",\n\t\t\t\"far-f272\" => \"far fa-calendar-minus\",\n\t\t\t\"far-f271\" => \"far fa-calendar-plus\",\n\t\t\t\"far-f273\" => \"far fa-calendar-times\",\n\t\t\t\"far-f150\" => \"far fa-caret-square-down\",\n\t\t\t\"far-f191\" => \"far fa-caret-square-left\",\n\t\t\t\"far-f152\" => \"far fa-caret-square-right\",\n\t\t\t\"far-f151\" => \"far fa-caret-square-up\",\n\t\t\t\"far-f080\" => \"far fa-chart-bar\",\n\t\t\t\"far-f058\" => \"far fa-check-circle\",\n\t\t\t\"far-f14a\" => \"far fa-check-square\",\n\t\t\t\"far-f111\" => \"far fa-circle\",\n\t\t\t\"far-f328\" => \"far fa-clipboard\",\n\t\t\t\"far-f017\" => \"far fa-clock\",\n\t\t\t\"far-f24d\" => \"far fa-clone\",\n\t\t\t\"far-f20a\" => \"far fa-closed-captioning\",\n\t\t\t\"far-f075\" => \"far fa-comment\",\n\t\t\t\"far-f27a\" => \"far fa-comment-alt\",\n\t\t\t\"far-f4ad\" => \"far fa-comment-dots\",\n\t\t\t\"far-f086\" => \"far fa-comments\",\n\t\t\t\"far-f14e\" => \"far fa-compass\",\n\t\t\t\"far-f0c5\" => \"far fa-copy\",\n\t\t\t\"far-f1f9\" => \"far fa-copyright\",\n\t\t\t\"far-f09d\" => \"far fa-credit-card\",\n\t\t\t\"far-f567\" => \"far fa-dizzy\",\n\t\t\t\"far-f192\" => \"far fa-dot-circle\",\n\t\t\t\"far-f044\" => \"far fa-edit\",\n\t\t\t\"far-f0e0\" => \"far fa-envelope\",\n\t\t\t\"far-f2b6\" => \"far fa-envelope-open\",\n\t\t\t\"far-f06e\" => \"far fa-eye\",\n\t\t\t\"far-f070\" => \"far fa-eye-slash\",\n\t\t\t\"far-f15b\" => \"far fa-file\",\n\t\t\t\"far-f15c\" => \"far fa-file-alt\",\n\t\t\t\"far-f1c6\" => \"far fa-file-archive\",\n\t\t\t\"far-f1c7\" => \"far fa-file-audio\",\n\t\t\t\"far-f1c9\" => \"far fa-file-code\",\n\t\t\t\"far-f1c3\" => \"far fa-file-excel\",\n\t\t\t\"far-f1c5\" => \"far fa-file-image\",\n\t\t\t\"far-f1c1\" => \"far fa-file-pdf\",\n\t\t\t\"far-f1c4\" => \"far fa-file-powerpoint\",\n\t\t\t\"far-f1c8\" => \"far fa-file-video\",\n\t\t\t\"far-f1c2\" => \"far fa-file-word\",\n\t\t\t\"far-f024\" => \"far fa-flag\",\n\t\t\t\"far-f579\" => \"far fa-flushed\",\n\t\t\t\"far-f07b\" => \"far fa-folder\",\n\t\t\t\"far-f07c\" => \"far fa-folder-open\",\n\t\t\t\"far-f119\" => \"far fa-frown\",\n\t\t\t\"far-f57a\" => \"far fa-frown-open\",\n\t\t\t\"far-f1e3\" => \"far fa-futbol\",\n\t\t\t\"far-f3a5\" => \"far fa-gem\",\n\t\t\t\"far-f57f\" => \"far fa-grimace\",\n\t\t\t\"far-f580\" => \"far fa-grin\",\n\t\t\t\"far-f581\" => \"far fa-grin-alt\",\n\t\t\t\"far-f582\" => \"far fa-grin-beam\",\n\t\t\t\"far-f583\" => \"far fa-grin-beam-sweat\",\n\t\t\t\"far-f584\" => \"far fa-grin-hearts\",\n\t\t\t\"far-f585\" => \"far fa-grin-squint\",\n\t\t\t\"far-f586\" => \"far fa-grin-squint-tears\",\n\t\t\t\"far-f587\" => \"far fa-grin-stars\",\n\t\t\t\"far-f588\" => \"far fa-grin-tears\",\n\t\t\t\"far-f589\" => \"far fa-grin-tongue\",\n\t\t\t\"far-f58a\" => \"far fa-grin-tongue-squint\",\n\t\t\t\"far-f58b\" => \"far fa-grin-tongue-wink\",\n\t\t\t\"far-f58c\" => \"far fa-grin-wink\",\n\t\t\t\"far-f258\" => \"far fa-hand-lizard\",\n\t\t\t\"far-f256\" => \"far fa-hand-paper\",\n\t\t\t\"far-f25b\" => \"far fa-hand-peace\",\n\t\t\t\"far-f0a7\" => \"far fa-hand-point-down\",\n\t\t\t\"far-f0a5\" => \"far fa-hand-point-left\",\n\t\t\t\"far-f0a4\" => \"far fa-hand-point-right\",\n\t\t\t\"far-f0a6\" => \"far fa-hand-point-up\",\n\t\t\t\"far-f25a\" => \"far fa-hand-pointer\",\n\t\t\t\"far-f255\" => \"far fa-hand-rock\",\n\t\t\t\"far-f257\" => \"far fa-hand-scissors\",\n\t\t\t\"far-f259\" => \"far fa-hand-spock\",\n\t\t\t\"far-f2b5\" => \"far fa-handshake\",\n\t\t\t\"far-f0a0\" => \"far fa-hdd\",\n\t\t\t\"far-f004\" => \"far fa-heart\",\n\t\t\t\"far-f0f8\" => \"far fa-hospital\",\n\t\t\t\"far-f254\" => \"far fa-hourglass\",\n\t\t\t\"far-f2c1\" => \"far fa-id-badge\",\n\t\t\t\"far-f2c2\" => \"far fa-id-card\",\n\t\t\t\"far-f03e\" => \"far fa-image\",\n\t\t\t\"far-f302\" => \"far fa-images\",\n\t\t\t\"far-f11c\" => \"far fa-keyboard\",\n\t\t\t\"far-f596\" => \"far fa-kiss\",\n\t\t\t\"far-f597\" => \"far fa-kiss-beam\",\n\t\t\t\"far-f598\" => \"far fa-kiss-wink-heart\",\n\t\t\t\"far-f599\" => \"far fa-laugh\",\n\t\t\t\"far-f59a\" => \"far fa-laugh-beam\",\n\t\t\t\"far-f59b\" => \"far fa-laugh-squint\",\n\t\t\t\"far-f59c\" => \"far fa-laugh-wink\",\n\t\t\t\"far-f094\" => \"far fa-lemon\",\n\t\t\t\"far-f1cd\" => \"far fa-life-ring\",\n\t\t\t\"far-f0eb\" => \"far fa-lightbulb\",\n\t\t\t\"far-f022\" => \"far fa-list-alt\",\n\t\t\t\"far-f279\" => \"far fa-map\",\n\t\t\t\"far-f11a\" => \"far fa-meh\",\n\t\t\t\"far-f5a4\" => \"far fa-meh-blank\",\n\t\t\t\"far-f5a5\" => \"far fa-meh-rolling-eyes\",\n\t\t\t\"far-f146\" => \"far fa-minus-square\",\n\t\t\t\"far-f3d1\" => \"far fa-money-bill-alt\",\n\t\t\t\"far-f186\" => \"far fa-moon\",\n\t\t\t\"far-f1ea\" => \"far fa-newspaper\",\n\t\t\t\"far-f247\" => \"far fa-object-group\",\n\t\t\t\"far-f248\" => \"far fa-object-ungroup\",\n\t\t\t\"far-f1d8\" => \"far fa-paper-plane\",\n\t\t\t\"far-f28b\" => \"far fa-pause-circle\",\n\t\t\t\"far-f144\" => \"far fa-play-circle\",\n\t\t\t\"far-f0fe\" => \"far fa-plus-square\",\n\t\t\t\"far-f059\" => \"far fa-question-circle\",\n\t\t\t\"far-f25d\" => \"far fa-registered\",\n\t\t\t\"far-f5b3\" => \"far fa-sad-cry\",\n\t\t\t\"far-f5b4\" => \"far fa-sad-tear\",\n\t\t\t\"far-f0c7\" => \"far fa-save\",\n\t\t\t\"far-f14d\" => \"far fa-share-square\",\n\t\t\t\"far-f118\" => \"far fa-smile\",\n\t\t\t\"far-f5b8\" => \"far fa-smile-beam\",\n\t\t\t\"far-f4da\" => \"far fa-smile-wink\",\n\t\t\t\"far-f2dc\" => \"far fa-snowflake\",\n\t\t\t\"far-f0c8\" => \"far fa-square\",\n\t\t\t\"far-f005\" => \"far fa-star\",\n\t\t\t\"far-f089\" => \"far fa-star-half\",\n\t\t\t\"far-f249\" => \"far fa-sticky-note\",\n\t\t\t\"far-f28d\" => \"far fa-stop-circle\",\n\t\t\t\"far-f185\" => \"far fa-sun\",\n\t\t\t\"far-f5c2\" => \"far fa-surprise\",\n\t\t\t\"far-f165\" => \"far fa-thumbs-down\",\n\t\t\t\"far-f164\" => \"far fa-thumbs-up\",\n\t\t\t\"far-f057\" => \"far fa-times-circle\",\n\t\t\t\"far-f5c8\" => \"far fa-tired\",\n\t\t\t\"far-f2ed\" => \"far fa-trash-alt\",\n\t\t\t\"far-f007\" => \"far fa-user\",\n\t\t\t\"far-f2bd\" => \"far fa-user-circle\",\n\t\t\t\"far-f410\" => \"far fa-window-close\",\n\t\t\t\"far-f2d0\" => \"far fa-window-maximize\",\n\t\t\t\"far-f2d1\" => \"far fa-window-minimize\",\n\t\t\t\"far-f2d2\" => \"far fa-window-rest\"\n\t\t);\n\n\t\t$brand_icons = array(\n\t\t\t\"fab-f26e\" => \"fab fa-500px\",\n\t\t\t\"fab-f368\" => \"fab fa-accessible-icon\",\n\t\t\t\"fab-f369\" => \"fab fa-accusoft\",\n\t\t\t\"fab-f6af\" => \"fab fa-acquisitions-incorporated\",\n\t\t\t\"fab-f170\" => \"fab fa-adn\",\n\t\t\t\"fab-f778\" => \"fab fa-adobe\",\n\t\t\t\"fab-f36a\" => \"fab fa-adversal\",\n\t\t\t\"fab-f36b\" => \"fab fa-affiliatetheme\",\n\t\t\t\"fab-f834\" => \"fab fa-airbnb\",\n\t\t\t\"fab-f36c\" => \"fab fa-algolia\",\n\t\t\t\"fab-f642\" => \"fab fa-alipay\",\n\t\t\t\"fab-f270\" => \"fab fa-amazon\",\n\t\t\t\"fab-f42c\" => \"fab fa-amazon-pay\",\n\t\t\t\"fab-f36d\" => \"fab fa-amilia\",\n\t\t\t\"fab-f17b\" => \"fab fa-android\",\n\t\t\t\"fab-f209\" => \"fab fa-angellist\",\n\t\t\t\"fab-f36e\" => \"fab fa-angrycreative\",\n\t\t\t\"fab-f420\" => \"fab fa-angular\",\n\t\t\t\"fab-f36f\" => \"fab fa-app-store\",\n\t\t\t\"fab-f370\" => \"fab fa-app-store-ios\",\n\t\t\t\"fab-f371\" => \"fab fa-apper\",\n\t\t\t\"fab-f179\" => \"fab fa-apple\",\n\t\t\t\"fab-f415\" => \"fab fa-apple-pay\",\n\t\t\t\"fab-f77a\" => \"fab fa-artstation\",\n\t\t\t\"fab-f372\" => \"fab fa-asymmetrik\",\n\t\t\t\"fab-f77b\" => \"fab fa-atlassian\",\n\t\t\t\"fab-f373\" => \"fab fa-audible\",\n\t\t\t\"fab-f41c\" => \"fab fa-autoprefixer\",\n\t\t\t\"fab-f374\" => \"fab fa-avianex\",\n\t\t\t\"fab-f421\" => \"fab fa-aviato\",\n\t\t\t\"fab-f375\" => \"fab fa-aws\",\n\t\t\t\"fab-f2d5\" => \"fab fa-bandcamp\",\n\t\t\t\"fab-f835\" => \"fab fa-battle-net\",\n\t\t\t\"fab-f1b4\" => \"fab fa-behance\",\n\t\t\t\"fab-f1b5\" => \"fab fa-behance-square\",\n\t\t\t\"fab-f378\" => \"fab fa-bimobject\",\n\t\t\t\"fab-f171\" => \"fab fa-bitbucket\",\n\t\t\t\"fab-f379\" => \"fab fa-bitcoin\",\n\t\t\t\"fab-f37a\" => \"fab fa-bity\",\n\t\t\t\"fab-f27e\" => \"fab fa-black-tie\",\n\t\t\t\"fab-f37b\" => \"fab fa-blackberry\",\n\t\t\t\"fab-f37c\" => \"fab fa-blogger\",\n\t\t\t\"fab-f37d\" => \"fab fa-blogger-b\",\n\t\t\t\"fab-f293\" => \"fab fa-bluetooth\",\n\t\t\t\"fab-f294\" => \"fab fa-bluetooth-b\",\n\t\t\t\"fab-f836\" => \"fab fa-bootstrap\",\n\t\t\t\"fab-f15a\" => \"fab fa-btc\",\n\t\t\t\"fab-f837\" => \"fab fa-buffer\",\n\t\t\t\"fab-f37f\" => \"fab fa-buromobelexperte\",\n\t\t\t\"fab-f8a6\" => \"fab fa-buy-n-large\",\n\t\t\t\"fab-f20d\" => \"fab fa-buysellads\",\n\t\t\t\"fab-f785\" => \"fab fa-canadian-maple-leaf\",\n\t\t\t\"fab-f42d\" => \"fab fa-cc-amazon-pay\",\n\t\t\t\"fab-f1f3\" => \"fab fa-cc-amex\",\n\t\t\t\"fab-f416\" => \"fab fa-cc-apple-pay\",\n\t\t\t\"fab-f24c\" => \"fab fa-cc-diners-club\",\n\t\t\t\"fab-f1f2\" => \"fab fa-cc-discover\",\n\t\t\t\"fab-f24b\" => \"fab fa-cc-jcb\",\n\t\t\t\"fab-f1f1\" => \"fab fa-cc-mastercard\",\n\t\t\t\"fab-f1f4\" => \"fab fa-cc-paypal\",\n\t\t\t\"fab-f1f5\" => \"fab fa-cc-stripe\",\n\t\t\t\"fab-f1f0\" => \"fab fa-cc-visa\",\n\t\t\t\"fab-f380\" => \"fab fa-centercode\",\n\t\t\t\"fab-f789\" => \"fab fa-centos\",\n\t\t\t\"fab-f268\" => \"fab fa-chrome\",\n\t\t\t\"fab-f838\" => \"fab fa-chromecast\",\n\t\t\t\"fab-f383\" => \"fab fa-cloudscale\",\n\t\t\t\"fab-f384\" => \"fab fa-cloudsmith\",\n\t\t\t\"fab-f385\" => \"fab fa-cloudversify\",\n\t\t\t\"fab-f1cb\" => \"fab fa-codepen\",\n\t\t\t\"fab-f284\" => \"fab fa-codiepie\",\n\t\t\t\"fab-f78d\" => \"fab fa-confluence\",\n\t\t\t\"fab-f20e\" => \"fab fa-connectdevelop\",\n\t\t\t\"fab-f26d\" => \"fab fa-contao\",\n\t\t\t\"fab-f89e\" => \"fab fa-cotton-bureau\",\n\t\t\t\"fab-f388\" => \"fab fa-cpanel\",\n\t\t\t\"fab-f25e\" => \"fab fa-creative-commons\",\n\t\t\t\"fab-f4e7\" => \"fab fa-creative-commons-by\",\n\t\t\t\"fab-f4e8\" => \"fab fa-creative-commons-nc\",\n\t\t\t\"fab-f4e9\" => \"fab fa-creative-commons-nc-eu\",\n\t\t\t\"fab-f4ea\" => \"fab fa-creative-commons-nc-jp\",\n\t\t\t\"fab-f4eb\" => \"fab fa-creative-commons-nd\",\n\t\t\t\"fab-f4ec\" => \"fab fa-creative-commons-pd\",\n\t\t\t\"fab-f4ed\" => \"fab fa-creative-commons-pd-alt\",\n\t\t\t\"fab-f4ee\" => \"fab fa-creative-commons-remix\",\n\t\t\t\"fab-f4ef\" => \"fab fa-creative-commons-sa\",\n\t\t\t\"fab-f4f0\" => \"fab fa-creative-commons-sampling\",\n\t\t\t\"fab-f4f1\" => \"fab fa-creative-commons-sampling-plus\",\n\t\t\t\"fab-f4f2\" => \"fab fa-creative-commons-share\",\n\t\t\t\"fab-f4f3\" => \"fab fa-creative-commons-zero\",\n\t\t\t\"fab-f6c9\" => \"fab fa-critical-role\",\n\t\t\t\"fab-f13c\" => \"fab fa-css3\",\n\t\t\t\"fab-f38b\" => \"fab fa-css3-alt\",\n\t\t\t\"fab-f38c\" => \"fab fa-cuttlefish\",\n\t\t\t\"fab-f38d\" => \"fab fa-d-and-d\",\n\t\t\t\"fab-f6ca\" => \"fab fa-d-and-d-beyond\",\n\t\t\t\"fab-f952\" => \"fab fa-dailymotion\",\n\t\t\t\"fab-f210\" => \"fab fa-dashcube\",\n\t\t\t\"fab-f1a5\" => \"fab fa-delicious\",\n\t\t\t\"fab-f38e\" => \"fab fa-deploydog\",\n\t\t\t\"fab-f38f\" => \"fab fa-deskpro\",\n\t\t\t\"fab-f6cc\" => \"fab fa-dev\",\n\t\t\t\"fab-f1bd\" => \"fab fa-deviantart\",\n\t\t\t\"fab-f790\" => \"fab fa-dhl\",\n\t\t\t\"fab-f791\" => \"fab fa-diaspora\",\n\t\t\t\"fab-f1a6\" => \"fab fa-digg\",\n\t\t\t\"fab-f391\" => \"fab fa-digital-ocean\",\n\t\t\t\"fab-f392\" => \"fab fa-discord\",\n\t\t\t\"fab-f393\" => \"fab fa-discourse\",\n\t\t\t\"fab-f394\" => \"fab fa-dochub\",\n\t\t\t\"fab-f395\" => \"fab fa-docker\",\n\t\t\t\"fab-f396\" => \"fab fa-draft2digital\",\n\t\t\t\"fab-f17d\" => \"fab fa-dribbble\",\n\t\t\t\"fab-f397\" => \"fab fa-dribbble-square\",\n\t\t\t\"fab-f16b\" => \"fab fa-dropbox\",\n\t\t\t\"fab-f1a9\" => \"fab fa-drupal\",\n\t\t\t\"fab-f399\" => \"fab fa-dyalog\",\n\t\t\t\"fab-f39a\" => \"fab fa-earlybirds\",\n\t\t\t\"fab-f4f4\" => \"fab fa-ebay\",\n\t\t\t\"fab-f282\" => \"fab fa-edge\",\n\t\t\t\"fab-f430\" => \"fab fa-elementor\",\n\t\t\t\"fab-f5f1\" => \"fab fa-ello\",\n\t\t\t\"fab-f423\" => \"fab fa-ember\",\n\t\t\t\"fab-f1d1\" => \"fab fa-empire\",\n\t\t\t\"fab-f299\" => \"fab fa-envira\",\n\t\t\t\"fab-f39d\" => \"fab fa-erlang\",\n\t\t\t\"fab-f42e\" => \"fab fa-ethereum\",\n\t\t\t\"fab-f2d7\" => \"fab fa-etsy\",\n\t\t\t\"fab-f839\" => \"fab fa-evernote\",\n\t\t\t\"fab-f23e\" => \"fab fa-expeditedssl\",\n\t\t\t\"fab-f09a\" => \"fab fa-facebook\",\n\t\t\t\"fab-f39e\" => \"fab fa-facebook-f\",\n\t\t\t\"fab-f39f\" => \"fab fa-facebook-messenger\",\n\t\t\t\"fab-f082\" => \"fab fa-facebook-square\",\n\t\t\t\"fab-f6dc\" => \"fab fa-fantasy-flight-games\",\n\t\t\t\"fab-f797\" => \"fab fa-fedex\",\n\t\t\t\"fab-f798\" => \"fab fa-fedora\",\n\t\t\t\"fab-f799\" => \"fab fa-figma\",\n\t\t\t\"fab-f269\" => \"fab fa-firefox\",\n\t\t\t\"fab-f907\" => \"fab fa-firefox-browser\",\n\t\t\t\"fab-f2b0\" => \"fab fa-first-order\",\n\t\t\t\"fab-f50a\" => \"fab fa-first-order-alt\",\n\t\t\t\"fab-f3a1\" => \"fab fa-firstdraft\",\n\t\t\t\"fab-f16e\" => \"fab fa-flickr\",\n\t\t\t\"fab-f44d\" => \"fab fa-flipboard\",\n\t\t\t\"fab-f417\" => \"fab fa-fly\",\n\t\t\t\"fab-f2b4\" => \"fab fa-font-awesome\",\n\t\t\t\"fab-f35c\" => \"fab fa-font-awesome-alt\",\n\t\t\t\"fab-f425\" => \"fab fa-font-awesome-flag\",\n\t\t\t\"fab-f280\" => \"fab fa-fonticons\",\n\t\t\t\"fab-f3a2\" => \"fab fa-fonticons-fi\",\n\t\t\t\"fab-f286\" => \"fab fa-fort-awesome\",\n\t\t\t\"fab-f3a3\" => \"fab fa-fort-awesome-alt\",\n\t\t\t\"fab-f211\" => \"fab fa-forumbee\",\n\t\t\t\"fab-f180\" => \"fab fa-foursquare\",\n\t\t\t\"fab-f2c5\" => \"fab fa-free-code-camp\",\n\t\t\t\"fab-f3a4\" => \"fab fa-freebsd\",\n\t\t\t\"fab-f50b\" => \"fab fa-fulcrum\",\n\t\t\t\"fab-f50c\" => \"fab fa-galactic-republic\",\n\t\t\t\"fab-f50d\" => \"fab fa-galactic-senate\",\n\t\t\t\"fab-f265\" => \"fab fa-get-pocket\",\n\t\t\t\"fab-f260\" => \"fab fa-gg\",\n\t\t\t\"fab-f261\" => \"fab fa-gg-circle\",\n\t\t\t\"fab-f1d3\" => \"fab fa-git\",\n\t\t\t\"fab-f841\" => \"fab fa-git-alt\",\n\t\t\t\"fab-f1d2\" => \"fab fa-git-square\",\n\t\t\t\"fab-f09b\" => \"fab fa-github\",\n\t\t\t\"fab-f113\" => \"fab fa-github-alt\",\n\t\t\t\"fab-f092\" => \"fab fa-github-square\",\n\t\t\t\"fab-f3a6\" => \"fab fa-gitkraken\",\n\t\t\t\"fab-f296\" => \"fab fa-gitlab\",\n\t\t\t\"fab-f426\" => \"fab fa-gitter\",\n\t\t\t\"fab-f2a5\" => \"fab fa-glide\",\n\t\t\t\"fab-f2a6\" => \"fab fa-glide-g\",\n\t\t\t\"fab-f3a7\" => \"fab fa-gofore\",\n\t\t\t\"fab-f3a8\" => \"fab fa-goodreads\",\n\t\t\t\"fab-f3a9\" => \"fab fa-goodreads-g\",\n\t\t\t\"fab-f1a0\" => \"fab fa-google\",\n\t\t\t\"fab-f3aa\" => \"fab fa-google-drive\",\n\t\t\t\"fab-f3ab\" => \"fab fa-google-play\",\n\t\t\t\"fab-f2b3\" => \"fab fa-google-plus\",\n\t\t\t\"fab-f0d5\" => \"fab fa-google-plus-g\",\n\t\t\t\"fab-f0d4\" => \"fab fa-google-plus-square\",\n\t\t\t\"fab-f1ee\" => \"fab fa-google-wallet\",\n\t\t\t\"fab-f184\" => \"fab fa-gratipay\",\n\t\t\t\"fab-f2d6\" => \"fab fa-grav\",\n\t\t\t\"fab-f3ac\" => \"fab fa-gripfire\",\n\t\t\t\"fab-f3ad\" => \"fab fa-grunt\",\n\t\t\t\"fab-f3ae\" => \"fab fa-gulp\",\n\t\t\t\"fab-f1d4\" => \"fab fa-hacker-news\",\n\t\t\t\"fab-f3af\" => \"fab fa-hacker-news-square\",\n\t\t\t\"fab-f5f7\" => \"fab fa-hackerrank\",\n\t\t\t\"fab-f452\" => \"fab fa-hips\",\n\t\t\t\"fab-f3b0\" => \"fab fa-hire-a-helper\",\n\t\t\t\"fab-f427\" => \"fab fa-hooli\",\n\t\t\t\"fab-f592\" => \"fab fa-hornbill\",\n\t\t\t\"fab-f3b1\" => \"fab fa-hotjar\",\n\t\t\t\"fab-f27c\" => \"fab fa-houzz\",\n\t\t\t\"fab-f13b\" => \"fab fa-html5\",\n\t\t\t\"fab-f3b2\" => \"fab fa-hubspot\",\n\t\t\t\"fab-f913\" => \"fab fa-ideal\",\n\t\t\t\"fab-f2d8\" => \"fab fa-imdb\",\n\t\t\t\"fab-f16d\" => \"fab fa-instagram\",\n\t\t\t\"fab-f955\" => \"fab fa-instagram-square\",\n\t\t\t\"fab-f7af\" => \"fab fa-intercom\",\n\t\t\t\"fab-f26b\" => \"fab fa-internet-explorer\",\n\t\t\t\"fab-f7b0\" => \"fab fa-invision\",\n\t\t\t\"fab-f208\" => \"fab fa-ioxhost\",\n\t\t\t\"fab-f83a\" => \"fab fa-itch-io\",\n\t\t\t\"fab-f3b4\" => \"fab fa-itunes\",\n\t\t\t\"fab-f3b5\" => \"fab fa-itunes-note\",\n\t\t\t\"fab-f4e4\" => \"fab fa-java\",\n\t\t\t\"fab-f50e\" => \"fab fa-jedi-order\",\n\t\t\t\"fab-f3b6\" => \"fab fa-jenkins\",\n\t\t\t\"fab-f7b1\" => \"fab fa-jira\",\n\t\t\t\"fab-f3b7\" => \"fab fa-joget\",\n\t\t\t\"fab-f1aa\" => \"fab fa-joomla\",\n\t\t\t\"fab-f3b8\" => \"fab fa-js\",\n\t\t\t\"fab-f3b9\" => \"fab fa-js-square\",\n\t\t\t\"fab-f1cc\" => \"fab fa-jsfiddle\",\n\t\t\t\"fab-f5fa\" => \"fab fa-kaggle\",\n\t\t\t\"fab-f4f5\" => \"fab fa-keybase\",\n\t\t\t\"fab-f3ba\" => \"fab fa-keycdn\",\n\t\t\t\"fab-f3bb\" => \"fab fa-kickstarter\",\n\t\t\t\"fab-f3bc\" => \"fab fa-kickstarter-k\",\n\t\t\t\"fab-f42f\" => \"fab fa-korvue\",\n\t\t\t\"fab-f3bd\" => \"fab fa-laravel\",\n\t\t\t\"fab-f202\" => \"fab fa-lastfm\",\n\t\t\t\"fab-f203\" => \"fab fa-lastfm-square\",\n\t\t\t\"fab-f212\" => \"fab fa-leanpub\",\n\t\t\t\"fab-f41d\" => \"fab fa-less\",\n\t\t\t\"fab-f3c0\" => \"fab fa-line\",\n\t\t\t\"fab-f08c\" => \"fab fa-linkedin\",\n\t\t\t\"fab-f0e1\" => \"fab fa-linkedin-in\",\n\t\t\t\"fab-f2b8\" => \"fab fa-linode\",\n\t\t\t\"fab-f17c\" => \"fab fa-linux\",\n\t\t\t\"fab-f3c3\" => \"fab fa-lyft\",\n\t\t\t\"fab-f3c4\" => \"fab fa-magento\",\n\t\t\t\"fab-f59e\" => \"fab fa-mailchimp\",\n\t\t\t\"fab-f50f\" => \"fab fa-mandalorian\",\n\t\t\t\"fab-f60f\" => \"fab fa-markdown\",\n\t\t\t\"fab-f4f6\" => \"fab fa-mastodon\",\n\t\t\t\"fab-f136\" => \"fab fa-maxcdn\",\n\t\t\t\"fab-f8ca\" => \"fab fa-mdb\",\n\t\t\t\"fab-f3c6\" => \"fab fa-medapps\",\n\t\t\t\"fab-f23a\" => \"fab fa-medium\",\n\t\t\t\"fab-f3c7\" => \"fab fa-medium-m\",\n\t\t\t\"fab-f3c8\" => \"fab fa-medrt\",\n\t\t\t\"fab-f2e0\" => \"fab fa-meetup\",\n\t\t\t\"fab-f5a3\" => \"fab fa-megaport\",\n\t\t\t\"fab-f7b3\" => \"fab fa-mendeley\",\n\t\t\t\"fab-f91a\" => \"fab fa-microblog\",\n\t\t\t\"fab-f3ca\" => \"fab fa-microsoft\",\n\t\t\t\"fab-f3cb\" => \"fab fa-mix\",\n\t\t\t\"fab-f289\" => \"fab fa-mixcloud\",\n\t\t\t\"fab-f956\" => \"fab fa-mixer\",\n\t\t\t\"fab-f3cc\" => \"fab fa-mizuni\",\n\t\t\t\"fab-f285\" => \"fab fa-modx\",\n\t\t\t\"fab-f3d0\" => \"fab fa-monero\",\n\t\t\t\"fab-f3d2\" => \"fab fa-napster\",\n\t\t\t\"fab-f612\" => \"fab fa-neos\",\n\t\t\t\"fab-f5a8\" => \"fab fa-nimblr\",\n\t\t\t\"fab-f419\" => \"fab fa-node\",\n\t\t\t\"fab-f3d3\" => \"fab fa-node-js\",\n\t\t\t\"fab-f3d4\" => \"fab fa-npm\",\n\t\t\t\"fab-f3d5\" => \"fab fa-ns8\",\n\t\t\t\"fab-f3d6\" => \"fab fa-nutritionix\",\n\t\t\t\"fab-f263\" => \"fab fa-odnoklassniki\",\n\t\t\t\"fab-f264\" => \"fab fa-odnoklassniki-square\",\n\t\t\t\"fab-f510\" => \"fab fa-old-republic\",\n\t\t\t\"fab-f23d\" => \"fab fa-opencart\",\n\t\t\t\"fab-f19b\" => \"fab fa-openid\",\n\t\t\t\"fab-f26a\" => \"fab fa-opera\",\n\t\t\t\"fab-f23c\" => \"fab fa-optin-monster\",\n\t\t\t\"fab-f8d2\" => \"fab fa-orcid\",\n\t\t\t\"fab-f41a\" => \"fab fa-osi\",\n\t\t\t\"fab-f3d7\" => \"fab fa-page4\",\n\t\t\t\"fab-f18c\" => \"fab fa-pagelines\",\n\t\t\t\"fab-f3d8\" => \"fab fa-palfed\",\n\t\t\t\"fab-f3d9\" => \"fab fa-patreon\",\n\t\t\t\"fab-f1ed\" => \"fab fa-paypal\",\n\t\t\t\"fab-f704\" => \"fab fa-penny-arcade\",\n\t\t\t\"fab-f3da\" => \"fab fa-periscope\",\n\t\t\t\"fab-f3db\" => \"fab fa-phabricator\",\n\t\t\t\"fab-f3dc\" => \"fab fa-phoenix-framework\",\n\t\t\t\"fab-f511\" => \"fab fa-phoenix-squadron\",\n\t\t\t\"fab-f457\" => \"fab fa-php\",\n\t\t\t\"fab-f2ae\" => \"fab fa-pied-piper\",\n\t\t\t\"fab-f1a8\" => \"fab fa-pied-piper-alt\",\n\t\t\t\"fab-f4e5\" => \"fab fa-pied-piper-hat\",\n\t\t\t\"fab-f1a7\" => \"fab fa-pied-piper-pp\",\n\t\t\t\"fab-f91e\" => \"fab fa-pied-piper-square\",\n\t\t\t\"fab-f0d2\" => \"fab fa-pinterest\",\n\t\t\t\"fab-f231\" => \"fab fa-pinterest-p\",\n\t\t\t\"fab-f0d3\" => \"fab fa-pinterest-square\",\n\t\t\t\"fab-f3df\" => \"fab fa-playstation\",\n\t\t\t\"fab-f288\" => \"fab fa-product-hunt\",\n\t\t\t\"fab-f3e1\" => \"fab fa-pushed\",\n\t\t\t\"fab-f3e2\" => \"fab fa-python\",\n\t\t\t\"fab-f1d6\" => \"fab fa-qq\",\n\t\t\t\"fab-f459\" => \"fab fa-quinscape\",\n\t\t\t\"fab-f2c4\" => \"fab fa-quora\",\n\t\t\t\"fab-f4f7\" => \"fab fa-r-project\",\n\t\t\t\"fab-f7bb\" => \"fab fa-raspberry-pi\",\n\t\t\t\"fab-f2d9\" => \"fab fa-ravelry\",\n\t\t\t\"fab-f41b\" => \"fab fa-react\",\n\t\t\t\"fab-f75d\" => \"fab fa-reacteurope\",\n\t\t\t\"fab-f4d5\" => \"fab fa-readme\",\n\t\t\t\"fab-f1d0\" => \"fab fa-rebel\",\n\t\t\t\"fab-f3e3\" => \"fab fa-red-river\",\n\t\t\t\"fab-f1a1\" => \"fab fa-reddit\",\n\t\t\t\"fab-f281\" => \"fab fa-reddit-alien\",\n\t\t\t\"fab-f1a2\" => \"fab fa-reddit-square\",\n\t\t\t\"fab-f7bc\" => \"fab fa-redhat\",\n\t\t\t\"fab-f18b\" => \"fab fa-renren\",\n\t\t\t\"fab-f3e6\" => \"fab fa-replyd\",\n\t\t\t\"fab-f4f8\" => \"fab fa-researchgate\",\n\t\t\t\"fab-f3e7\" => \"fab fa-resolving\",\n\t\t\t\"fab-f5b2\" => \"fab fa-rev\",\n\t\t\t\"fab-f3e8\" => \"fab fa-rocketchat\",\n\t\t\t\"fab-f3e9\" => \"fab fa-rockrms\",\n\t\t\t\"fab-f267\" => \"fab fa-safari\",\n\t\t\t\"fab-f83b\" => \"fab fa-salesforce\",\n\t\t\t\"fab-f41e\" => \"fab fa-sass\",\n\t\t\t\"fab-f3ea\" => \"fab fa-schlix\",\n\t\t\t\"fab-f28a\" => \"fab fa-scribd\",\n\t\t\t\"fab-f3eb\" => \"fab fa-searchengin\",\n\t\t\t\"fab-f2da\" => \"fab fa-sellcast\",\n\t\t\t\"fab-f213\" => \"fab fa-sellsy\",\n\t\t\t\"fab-f3ec\" => \"fab fa-servicestack\",\n\t\t\t\"fab-f214\" => \"fab fa-shirtsinbulk\",\n\t\t\t\"fab-f957\" => \"fab fa-shopify\",\n\t\t\t\"fab-f5b5\" => \"fab fa-shopware\",\n\t\t\t\"fab-f215\" => \"fab fa-simplybuilt\",\n\t\t\t\"fab-f3ee\" => \"fab fa-sistrix\",\n\t\t\t\"fab-f512\" => \"fab fa-sith\",\n\t\t\t\"fab-f7c6\" => \"fab fa-sketch\",\n\t\t\t\"fab-f216\" => \"fab fa-skyatlas\",\n\t\t\t\"fab-f17e\" => \"fab fa-skype\",\n\t\t\t\"fab-f198\" => \"fab fa-slack\",\n\t\t\t\"fab-f3ef\" => \"fab fa-slack-hash\",\n\t\t\t\"fab-f1e7\" => \"fab fa-slideshare\",\n\t\t\t\"fab-f2ab\" => \"fab fa-snapchat\",\n\t\t\t\"fab-f2ac\" => \"fab fa-snapchat-ghost\",\n\t\t\t\"fab-f2ad\" => \"fab fa-snapchat-square\",\n\t\t\t\"fab-f1be\" => \"fab fa-soundcloud\",\n\t\t\t\"fab-f7d3\" => \"fab fa-sourcetree\",\n\t\t\t\"fab-f3f3\" => \"fab fa-speakap\",\n\t\t\t\"fab-f83c\" => \"fab fa-speaker-deck\",\n\t\t\t\"fab-f1bc\" => \"fab fa-spotify\",\n\t\t\t\"fab-f5be\" => \"fab fa-squarespace\",\n\t\t\t\"fab-f18d\" => \"fab fa-stack-exchange\",\n\t\t\t\"fab-f16c\" => \"fab fa-stack-overflow\",\n\t\t\t\"fab-f842\" => \"fab fa-stackpath\",\n\t\t\t\"fab-f3f5\" => \"fab fa-staylinked\",\n\t\t\t\"fab-f1b6\" => \"fab fa-steam\",\n\t\t\t\"fab-f1b7\" => \"fab fa-steam-square\",\n\t\t\t\"fab-f3f6\" => \"fab fa-steam-symbol\",\n\t\t\t\"fab-f3f7\" => \"fab fa-sticker-mule\",\n\t\t\t\"fab-f428\" => \"fab fa-strava\",\n\t\t\t\"fab-f429\" => \"fab fa-stripe\",\n\t\t\t\"fab-f42a\" => \"fab fa-stripe-s\",\n\t\t\t\"fab-f3f8\" => \"fab fa-studiovinari\",\n\t\t\t\"fab-f1a4\" => \"fab fa-stumbleupon\",\n\t\t\t\"fab-f1a3\" => \"fab fa-stumbleupon-circle\",\n\t\t\t\"fab-f2dd\" => \"fab fa-superpowers\",\n\t\t\t\"fab-f3f9\" => \"fab fa-supple\",\n\t\t\t\"fab-f7d6\" => \"fab fa-suse\",\n\t\t\t\"fab-f8e1\" => \"fab fa-swift\",\n\t\t\t\"fab-f83d\" => \"fab fa-symfony\",\n\t\t\t\"fab-f4f9\" => \"fab fa-teamspeak\",\n\t\t\t\"fab-f2c6\" => \"fab fa-telegram\",\n\t\t\t\"fab-f3fe\" => \"fab fa-telegram-plane\",\n\t\t\t\"fab-f1d5\" => \"fab fa-tencent-weibo\",\n\t\t\t\"fab-f69d\" => \"fab fa-the-red-yeti\",\n\t\t\t\"fab-f5c6\" => \"fab fa-themeco\",\n\t\t\t\"fab-f2b2\" => \"fab fa-themeisle\",\n\t\t\t\"fab-f731\" => \"fab fa-think-peaks\",\n\t\t\t\"fab-f513\" => \"fab fa-trade-federation\",\n\t\t\t\"fab-f181\" => \"fab fa-trello\",\n\t\t\t\"fab-f262\" => \"fab fa-tripadvisor\",\n\t\t\t\"fab-f173\" => \"fab fa-tumblr\",\n\t\t\t\"fab-f174\" => \"fab fa-tumblr-square\",\n\t\t\t\"fab-f1e8\" => \"fab fa-twitch\",\n\t\t\t\"fab-f099\" => \"fab fa-twitter\",\n\t\t\t\"fab-f081\" => \"fab fa-twitter-square\",\n\t\t\t\"fab-f42b\" => \"fab fa-typo3\",\n\t\t\t\"fab-f402\" => \"fab fa-uber\",\n\t\t\t\"fab-f7df\" => \"fab fa-ubuntu\",\n\t\t\t\"fab-f403\" => \"fab fa-uikit\",\n\t\t\t\"fab-f8e8\" => \"fab fa-umbraco\",\n\t\t\t\"fab-f404\" => \"fab fa-uniregistry\",\n\t\t\t\"fab-f949\" => \"fab fa-unity\",\n\t\t\t\"fab-f405\" => \"fab fa-untappd\",\n\t\t\t\"fab-f7e0\" => \"fab fa-ups\",\n\t\t\t\"fab-f287\" => \"fab fa-usb\",\n\t\t\t\"fab-f7e1\" => \"fab fa-usps\",\n\t\t\t\"fab-f407\" => \"fab fa-ussunnah\",\n\t\t\t\"fab-f408\" => \"fab fa-vaadin\",\n\t\t\t\"fab-f237\" => \"fab fa-viacoin\",\n\t\t\t\"fab-f2a9\" => \"fab fa-viadeo\",\n\t\t\t\"fab-f2aa\" => \"fab fa-viadeo-square\",\n\t\t\t\"fab-f409\" => \"fab fa-viber\",\n\t\t\t\"fab-f40a\" => \"fab fa-vimeo\",\n\t\t\t\"fab-f194\" => \"fab fa-vimeo-square\",\n\t\t\t\"fab-f27d\" => \"fab fa-vimeo-v\",\n\t\t\t\"fab-f1ca\" => \"fab fa-vine\",\n\t\t\t\"fab-f189\" => \"fab fa-vk\",\n\t\t\t\"fab-f40b\" => \"fab fa-vnv\",\n\t\t\t\"fab-f41f\" => \"fab fa-vuejs\",\n\t\t\t\"fab-f83f\" => \"fab fa-waze\",\n\t\t\t\"fab-f5cc\" => \"fab fa-weebly\",\n\t\t\t\"fab-f18a\" => \"fab fa-weibo\",\n\t\t\t\"fab-f1d7\" => \"fab fa-weixin\",\n\t\t\t\"fab-f232\" => \"fab fa-whatsapp\",\n\t\t\t\"fab-f40c\" => \"fab fa-whatsapp-square\",\n\t\t\t\"fab-f40d\" => \"fab fa-whmcs\",\n\t\t\t\"fab-f266\" => \"fab fa-wikipedia-w\",\n\t\t\t\"fab-f17a\" => \"fab fa-windows\",\n\t\t\t\"fab-f5cf\" => \"fab fa-wix\",\n\t\t\t\"fab-f730\" => \"fab fa-wizards-of-the-coast\",\n\t\t\t\"fab-f514\" => \"fab fa-wolf-pack-battalion\",\n\t\t\t\"fab-f19a\" => \"fab fa-wordpress\",\n\t\t\t\"fab-f411\" => \"fab fa-wordpress-simple\",\n\t\t\t\"fab-f297\" => \"fab fa-wpbeginner\",\n\t\t\t\"fab-f2de\" => \"fab fa-wpexplorer\",\n\t\t\t\"fab-f298\" => \"fab fa-wpforms\",\n\t\t\t\"fab-f3e4\" => \"fab fa-wpressr\",\n\t\t\t\"fab-f412\" => \"fab fa-xbox\",\n\t\t\t\"fab-f168\" => \"fab fa-xing\",\n\t\t\t\"fab-f169\" => \"fab fa-xing-square\",\n\t\t\t\"fab-f23b\" => \"fab fa-y-combinator\",\n\t\t\t\"fab-f19e\" => \"fab fa-yahoo\",\n\t\t\t\"fab-f840\" => \"fab fa-yammer\",\n\t\t\t\"fab-f413\" => \"fab fa-yandex\",\n\t\t\t\"fab-f414\" => \"fab fa-yandex-international\",\n\t\t\t\"fab-f7e3\" => \"fab fa-yarn\",\n\t\t\t\"fab-f1e9\" => \"fab fa-yelp\",\n\t\t\t\"fab-f2b1\" => \"fab fa-yoast\",\n\t\t\t\"fab-f167\" => \"fab fa-youtube\",\n\t\t\t\"fab-f431\" => \"fab fa-youtube-square\",\n\t\t\t\"fab-f63f\" => \"fab fa-zhihu\"\n\t\t);\n\n\t\t$icons = array_merge( $solid_icons, $regular_icons, $brand_icons );\n\n\t\t$icons = apply_filters( \"megamenu_fontawesome_5_icons\", $icons );\n\n\t\treturn $icons;\n\n\t}", "public function get_icon() {\n return 'eicon-heading apr-badge';\n }", "function maybe_enqueue_font_awesome( $field )\n\t{\n\t\tif( 'font-awesome' == $field['type'] && $field['enqueue_fa'] ) {\n\t\t\tadd_action( 'wp_footer', array( $this, 'frontend_enqueue_scripts' ) );\n\t\t}\n\n\t\treturn $field;\n\t}", "function enqueue_font_awesome(){\n\twp_enqueue_style('font-awesome', get_stylesheet_directory_uri() . '/library/css/font-awesome.css');\n}", "function iconlink($id = '', $class = '', $title = '', $href = '')\n{\n return '<a id=\"' . $id . '\" href=\"' . URI . '/' . $href . '\" class=\"btn mini green-stripe ' . $class . '\" data-href=\"\">Güncelle</a>';\n}", "function prefix_enqueue_awesome() {\n\twp_enqueue_style( 'prefix-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3' );\n}", "public function icon($value)\n {\n $this->icon = $value;\n\n return $this;\n }", "function __construct()\n\t{\n\t\t$this->name = 'font-awesome';\n\t\t$this->label = __('Font Awesome Icon');\n\t\t$this->category = __(\"Content\",'acf'); // Basic, Content, Choice, etc\n\t\t$this->defaults = array(\n\t\t\t'enqueue_fa' \t=>\t0,\n\t\t\t'allow_null' \t=>\t0,\n\t\t\t'save_format'\t=> 'element',\n\t\t\t'default_value'\t=>\t'',\n\t\t\t'choices'\t\t=>\t$this->get_icons()\n\t\t);\n\n\t\t$this->settings = array(\n\t\t\t'path' => apply_filters('acf/helpers/get_path', __FILE__),\n\t\t\t'dir' => apply_filters('acf/helpers/get_dir', __FILE__),\n\t\t\t'version' => '1.5'\n\t\t);\n\n\t\tadd_filter('acf/load_field', array( $this, 'maybe_enqueue_font_awesome' ) );\n\n \tparent::__construct();\n\t}", "public function enqueue_font_awesome() {\n\t\tglobal $hestia_load_fa;\n\n\t\tif ( $hestia_load_fa !== true ) {\n\t\t\treturn false;\n\t\t}\n\n\t\twp_enqueue_style( 'font-awesome-5-all', get_template_directory_uri() . '/assets/font-awesome/css/all.min.css', array(), HESTIA_VENDOR_VERSION );\n\t\tif ( $this->should_load_shim() ) {\n\t\t\twp_enqueue_style( 'font-awesome-4-shim', get_template_directory_uri() . '/assets/font-awesome/css/v4-shims.min.css', array(), HESTIA_VENDOR_VERSION );\n\t\t}\n\n\t\treturn true;\n\t}", "function av_icon_char($char)\n{\n\tglobal $avia_config;\n\treturn avia_font_manager::frontend_icon($avia_config['font_icons'][$char]['icon'], $avia_config['font_icons'][$char]['font'], false);\n}", "function vcex_enqueue_icon_font( $family = '', $icon = '' ) {\n\tif ( ! $icon ) {\n\t\treturn;\n\t}\n\n\t// If font family isn't defined lets get it from the icon class.\n\tif ( ! $family ) {\n\t\t$family = vcex_get_icon_type_from_class( $icon );\n\t}\n\n\t// Return if we are using ticons.\n\tif ( 'ticons' === $family || ! $family ) {\n\t\twp_enqueue_style( 'ticons' );\n\t\treturn;\n\t}\n\n\t// Check for custom enqueue.\n\t$fonts = vcex_get_icon_font_families();\n\n\t// Custom stylesheet check.\n\tif ( ! empty( $fonts[$family]['style'] ) ) {\n\t\twp_enqueue_style( $fonts[$family]['style'] );\n\t\treturn;\n\t}\n\n\t// Default vc font icons.\n\tif ( function_exists( 'vc_icon_element_fonts_enqueue' ) ) {\n\t\tvc_icon_element_fonts_enqueue( $family );\n\t}\n}", "static function frontend_icon($icon, $font = false, $return = 'string')\n\t{\n\t\t//if we got no font passed use the default font\n\t\tif(empty($font)) $font = key(AviaBuilder::$default_iconfont); \n\t\t\n\t\t//fetch the character to display\n\t\t$display_char = self::get_display_char($icon, $font);\n\t\n\t\t//return the html string that gets attached to the element. css classes for font display are generated automatically\n\t\tif($return == 'string')\n\t\t{\n\t\t\treturn \"aria-hidden='true' data-av_icon='{$display_char}' data-av_iconfont='{$font}'\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $display_char;\n\t\t}\n\t}", "public function icon($icon = true)\n {\n $this->option('icon', $icon);\n\n return $this;\n }", "public function get_icon()\n {\n return 'eicon-nav-menu';\n }", "function av_icon_string($char)\n{\n\tglobal $avia_config;\n\t\n\tif(!isset($avia_config['font_icons'][$char]['icon'])) $char = 'standard';\n\t\n\treturn avia_font_manager::frontend_icon($avia_config['font_icons'][$char]['icon'], $avia_config['font_icons'][$char]['font']);\n}", "public function get_icon() {\n\t\treturn 'eicon-image';\n\t}", "public function getIcon($icon, $animated = false)\n {\n $imageDir = $animated ? 'animated' : 'static';\n return \"{$this->imageDir}/{$imageDir}/{$icon}\";\n }", "public function registerFontBox(){\n\t\t$param = WPBMap::getParam( 'vc_icon', 'type' );\n\t\t\n\t\t$param['value'][$this->getIconHeader()] = $this->getIconLib();\n\t\tvc_update_shortcode_param( 'vc_icon', $param );\n\t}", "public function icon(): string\n {\n return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACYSURBVEhLYxgFJIHU1FSjtLS0i0D8AYj7gEKMEBkqAaAFF4D4ERCvAFrwH4gDoFIMKSkpFkB+OTEYqgUTACXfA/GqjIwMQyD9H2hRHlQKJFcBEiMGQ7VgAqCBvUgK32dmZspCpagGGNPT0/1BLqeF4bQHQJePpiIwhmrBBEADR1MRfgB0+WgqAmOoFkwANHA0FY0CUgEDAwCQ0PUpNB3kqwAAAABJRU5ErkJggg==';\n }", "public function getIcon();", "public function getIcon();", "public function get_icon() {\n\t\treturn 'fa fa-images';\n\t}", "function tac_add_favicon() {\n\t?>\n\t<link rel=\"shortcut icon\" href=\"<?php echo esc_html( get_stylesheet_directory_uri() ); ?>/img/favicon.png\"/>\n\t<link rel=\"apple-touch-icon\" href=\"<?php echo esc_html( get_stylesheet_directory_uri() ); ?>/img/apple-touch-icon.png\">\n<?php\n}", "public function get_font_icon() {\n\t\t$icons = array(\n\t\t\t'twitter' => 'twitter',\n\t\t\t'instagram' => 'instagram'\n\t\t\t);\n\t\tif ( isset( $icons[ $this->get_embed_type() ] ) ) {\n\t\t\treturn $icons[ $this->get_embed_type() ];\n\t\t} else {\n\t\t\treturn 'flickr';\n\t\t}\n\t}", "public function get_icon() {\n\t\treturn 'eicon-call-to-action';\n\t}", "public function get_icon() {\n\t\treturn 'eicon-call-to-action';\n\t}", "public function get_icon() {\n\t\treturn 'eicon-call-to-action';\n\t}", "public static function newMaterialDesignIconicFontIcon(): MaterialDesignIconicFontIconInterface {\n return new MaterialDesignIconicFontIcon();\n }", "public function icon($name , $alt)\n {\n return Wgt::icon($name,'xsmall',$alt);\n }", "public function get_menu_icon() {\n\t\treturn 'gform-icon--akismet';\n\t}", "static function Icon($icon_to_test)\n\t{\n\t\tif(in_array($icon_to_test, self::$_icons) )\n\t\t\treturn $icon_to_test;\n\t\tWdfException::Raise(\"Invalid Icon '$icon_to_test'\");\n return '';\n\t}", "public static function iconButton($icon, $text, $controller, $action=\"index\", $array=array()) {\n\t\t$type = $text == false ? \"notext\" : \"text\";\n\t\treturn \"<a href=\\\"\" . self::href($controller, $action, $array) . \"\\\" class=\\\"button $type $icon\\\">$text</a>\";\n\t}" ]
[ "0.76038563", "0.75430125", "0.7001806", "0.6913122", "0.68559563", "0.6789669", "0.65218407", "0.6414753", "0.6343736", "0.6298402", "0.6298402", "0.62157124", "0.62005365", "0.61868227", "0.6165205", "0.615888", "0.60706115", "0.60706115", "0.60683924", "0.60541767", "0.6042999", "0.6030921", "0.60081786", "0.5995295", "0.5988851", "0.5988851", "0.5988851", "0.59859264", "0.5983694", "0.59829795", "0.59620905", "0.59482276", "0.5920499", "0.5918848", "0.5916336", "0.5880699", "0.58802116", "0.58802116", "0.5879793", "0.5879793", "0.5871147", "0.5853954", "0.58445764", "0.5838236", "0.58343285", "0.58198667", "0.5811302", "0.5778984", "0.5741199", "0.57372016", "0.5709493", "0.5709493", "0.5708841", "0.56932664", "0.5692921", "0.5676102", "0.56723636", "0.56667674", "0.5664856", "0.5655069", "0.5641584", "0.562673", "0.5626246", "0.5590262", "0.55866957", "0.5569038", "0.5560283", "0.555603", "0.5555133", "0.5550508", "0.554242", "0.5524968", "0.55122566", "0.55122316", "0.5480663", "0.5477598", "0.5467148", "0.54595584", "0.5451625", "0.5444254", "0.54435414", "0.5429813", "0.5426771", "0.5423004", "0.54055774", "0.54044276", "0.54020035", "0.54015297", "0.54015297", "0.5398893", "0.5396083", "0.53944397", "0.5385108", "0.5385108", "0.5385108", "0.5376054", "0.53679603", "0.5365634", "0.5364211", "0.53626794" ]
0.75936645
1
Create a Material Design Iconic Font icon.
public static function newMaterialDesignIconicFontIcon(): MaterialDesignIconicFontIconInterface { return new MaterialDesignIconicFontIcon(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function parseMaterialDesignIconicFontIcon(array $args): MaterialDesignIconicFontIconInterface {\n\n $icon = static::newMaterialDesignIconicFontIcon();\n\n $icon->setName(ArrayHelper::get($args, \"name\", \"home\"));\n $icon->setStyle(ArrayHelper::get($args, \"style\"));\n\n $icon->setBorder(ArrayHelper::get($args, \"border\", false));\n $icon->setFixedWidth(ArrayHelper::get($args, \"fixedWidth\", false));\n $icon->setFlip(ArrayHelper::get($args, \"flip\"));\n $icon->setPull(ArrayHelper::get($args, \"pull\"));\n $icon->setRotate(ArrayHelper::get($args, \"rotate\"));\n $icon->setSize(ArrayHelper::get($args, \"size\"));\n $icon->setSpin(ArrayHelper::get($args, \"spin\"));\n\n return $icon;\n }", "public function getIcon() {}", "public function icon($icon);", "public function getIcon()\n {\n }", "function av_icon($icon, $font = false, $string = 'string')\n{\t\n\treturn avia_font_manager::frontend_icon($icon, $font, $string);\n}", "public function getIcon();", "public function getIcon();", "function addIcon($i){\n return $this->add('Icon',null,'Icon')->set($i)->addClass('atk-size-mega');\n }", "public static function getIcon(): string\n {\n }", "public static function getIcon(): string\n {\n }", "public function icon(): string;", "public function getIcon(): string\n {\n return $this->icon ?: static::DEFAULT_ICON;\n }", "protected function establish_icon() {\n\t\t$this->icon = \"<i class='sw swp_{$this->key}_icon'></i>\";\n\t}", "protected function get__icon()\n\t{\n\t\treturn 'coffee';\n\t}", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "static function icon($icon) {\n\t\treturn self::tag('i', 'glyphicon glyphicon-' . $icon);\n\t}", "public function get_icon()\n\t{\n\t\treturn 'fab fa-algolia';\n\t}", "public static function newFontAwesomeIcon(): FontAwesomeIconInterface {\n return new FontAwesomeIcon();\n }", "public function get_icon() {\n\t\treturn 'eicon-image';\n\t}", "public function getSvgIcon();", "public function getIcon()\n {\n return $this->get(self::_ICON);\n }", "public static function getFactoryIconUseIt() {\n }", "public function get_menu_icon() {\n\t\treturn 'gform-icon--akismet';\n\t}", "protected function getIcon()\n {\n /** @var IconFactory $iconFactory */\n $iconFactory = GeneralUtility::makeInstance(IconFactory::class);\n return $iconFactory->getIcon('px-shopware-clear-cache', Icon::SIZE_SMALL)->render();\n }", "public function get_icon()\n {\n return 'fa fa-image';\n }", "public function getIconForResourceWithPngFileReturnsIcon() {}", "public function icon(): string\n {\n return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACYSURBVEhLYxgFJIHU1FSjtLS0i0D8AYj7gEKMEBkqAaAFF4D4ERCvAFrwH4gDoFIMKSkpFkB+OTEYqgUTACXfA/GqjIwMQyD9H2hRHlQKJFcBEiMGQ7VgAqCBvUgK32dmZspCpagGGNPT0/1BLqeF4bQHQJePpiIwhmrBBEADR1MRfgB0+WgqAmOoFkwANHA0FY0CUgEDAwCQ0PUpNB3kqwAAAABJRU5ErkJggg==';\n }", "public function getIcon()\n {\n return ' fa fa-lock';\n }", "public function get_icon() {\n\t\treturn 'eicon-icon-box';\n\t}", "public function get_font_icon() {\n\t\t$icons = array(\n\t\t\t'twitter' => 'twitter',\n\t\t\t'instagram' => 'instagram'\n\t\t\t);\n\t\tif ( isset( $icons[ $this->get_embed_type() ] ) ) {\n\t\t\treturn $icons[ $this->get_embed_type() ];\n\t\t} else {\n\t\t\treturn 'flickr';\n\t\t}\n\t}", "static function Icon($icon_to_test)\n\t{\n\t\tif(in_array($icon_to_test, self::$_icons) )\n\t\t\treturn $icon_to_test;\n\t\tWdfException::Raise(\"Invalid Icon '$icon_to_test'\");\n return '';\n\t}", "public function icon(): string\n {\n return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADLSURBVEhL5ZRLCsIwGAa7UkE9gd5HUfEoekxxJx7AhXoCca/fhESkJiQxBHwMDG3S/9EmJc0n0JMruZVXK/fMdWQRY7mXt4A7OZJvwZu74hRayIEc2nv3jGtXZrOWrnifiRY0OkhiWK5sWGeS52bkZymJ2ZhRJmwmySxLCL6CmIsZZUIixkiNezCRR+kSUyWH3Cgn6SuQIk2iuOBckvN+t8FMnq1TJloUN3jefN9mhvJeCAVWb8CyUDj0vxc3iPFHDaofFdUPu2+iae7nYJMCY/1bpAAAAABJRU5ErkJggg==';\n }", "public function getIcon() {\r\n\t\r\n\t$fileType = $this->getType();\r\n\t\r\n\t$image = array(\r\n\t 'image/gif',\r\n\t 'image/png',\r\n\t 'image/jpg',\r\n\t 'image/jpeg'\r\n\t);\r\n\t\r\n\t$rarZip = array(\r\n\t 'application/zip',\r\n 'application/x-rar-compressed'\r\n\t);\r\n\t\r\n\t$audio = array(\r\n\t 'audio/mpeg'\r\n\t);\r\n\t\r\n\t$video = array(\r\n\t 'video/quicktime',\r\n\t 'video/mp4'\r\n\t);\r\n\t\r\n\t$pdf = array(\r\n\t 'application/pdf'\r\n\t);\r\n\t\r\n\t$wordExcelPptx = array(\r\n\t 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\r\n\t 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\r\n\t 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\r\n\t 'application/msword',\r\n\t 'application/vnd.ms-excel',\r\n\t 'application/vnd.ms-powerpoint'\r\n\t);\r\n\t\r\n\tif (in_array($fileType, $image)) {\r\n\t return \"image.png\";\r\n\t} elseif (in_array($fileType, $audio)) {\r\n\t return \"audio.png\";\r\n\t} elseif (in_array($fileType, $video)) {\r\n\t return \"video.png\";\r\n\t} elseif (in_array($fileType, $rarZip)) {\r\n\t return \"rarZip.png\";\r\n\t} elseif (in_array($fileType, $pdf)) {\r\n\t return \"pdf.png\";\r\n\t} elseif (in_array($fileType, $wordExcelPptx)) {\r\n\t return \"wordExcelPptx.png\";\r\n\t} else {\r\n\t return \"default.png\";\r\n\t}\r\n\t\r\n }", "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "function fa_icon( $icon = 'user' ) {\n\t\treturn \"<i class=\\\"fa fa-{$icon}\\\"></i>\";\n\t}", "function av_icon_css_string($char)\n{\n\tglobal $avia_config;\n\treturn \"content:'\\\\\".str_replace('ue','E',$avia_config['font_icons'][$char]['icon']).\"'; font-family: '\".$avia_config['font_icons'][$char]['font'].\"';\";\n}", "public static function makeIcon(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return '✕';\n case self::SKIPPED:\n return 's';\n case self::RISKY:\n return 'r';\n case self::INCOMPLETE:\n return 'i';\n case self::WARN:\n return 'w';\n case self::RUNS:\n return '•';\n default:\n return '✓';\n }\n }", "function icon($which, $alt='', $url=false, $print_alt = false, $class=false) {\n return new Icon($which, $alt, $url, $print_alt, $class);\n}", "function _kalatheme_font_icon($name, $bundle = NULL, $attr = array(), $resolvePrefix = TRUE){\n if($bundle === NULL){\n $bundle = theme_get_setting('icon_font_library');\n }\n // Find the icon prefix\n if($resolvePrefix){\n switch($bundle){\n case('font_awesome'):\n $name = 'fa-' . $name;\n break;\n case('bootstrap_glyphicons'):\n $name = 'glyphicon-' . $name;\n break;\n }\n }\n\n $output = NULL;\n if (module_exists('icon')){\n $output = theme('icon', array(\n 'bundle' => $bundle,\n 'icon' => $name,\n 'attributes' => $attr\n ));\n }\n if($output === NULL){\n $attr = array();\n $attr += array('aria-hidden' => 'true' );\n $attr['class'] = array();\n\n if($bundle === 'font_awesome'){\n $attr['class'][] = 'fa';\n }\n elseif($bundle === 'bootstrap_glyphicons'){\n $attr['class'][] = 'glyphicon';\n }\n\n\n $attr['class'][] = $name;\n $output = '<span '. drupal_attributes($attr) . '></span>';\n }\n return $output;\n}", "public function get_icon() {\n\t\treturn 'fa fa-cloud';\n\t}", "protected function micon($string, array $args = array(), array $options = array()) {\n return new MiconIconize($string, $args, $options, $this->getStringTranslation());\n }", "function icon() {\n global $CFG;\n\n return \"<img src='$CFG->wwwroot/blocks/ilp/pix/graphicon.jpg' height='24' width='24' />\";\n }", "function i($code){\n $icon = '<i class=\"fa fa-'.$code.'\"></i>';\n return $icon;\n }", "public static function icon($params)\n {\n $name = isset($params[0]) ? $params[0] : '';\n $template = isset($params[1]) ? $params[1] : 'base/_icon.tpl';\n return self::renderTemplate($template, [\n 'name' => $name\n ]);\n }", "function av_icon_string($char)\n{\n\tglobal $avia_config;\n\t\n\tif(!isset($avia_config['font_icons'][$char]['icon'])) $char = 'standard';\n\t\n\treturn avia_font_manager::frontend_icon($avia_config['font_icons'][$char]['icon'], $avia_config['font_icons'][$char]['font']);\n}", "public function getIcon()\n {\n return \"group_channel\";\n }", "public function setIcon($icon);", "public function getIcon()\n {\n return $this->Icon;\n }", "public function getIconTag() {\n\t\treturn '<img class=\"languageIcon jsTooltip\" src=\"' . $this->getIconPath() . '\" title=\"' . $this->getTitle() . '\" alt=\"' . $this->getTitle() . '\" />';\n\t}", "public function getIconForResourceWithCustomImageMimeTypeReturnsImageIcon() {}", "public function get_icon() {\n\t\treturn 'fa fa-pencil';\n\t}", "public function get_icon() {\n\t\treturn 'fa fa-pencil';\n\t}", "public function get_icon() {\n return 'fas fa-comments';\n }", "function av_backend_icon($params)\n{\n\treturn avia_font_manager::backend_icon($params);\n}", "function av_icon_char($char)\n{\n\tglobal $avia_config;\n\treturn avia_font_manager::frontend_icon($avia_config['font_icons'][$char]['icon'], $avia_config['font_icons'][$char]['font'], false);\n}", "function vcex_enqueue_icon_font( $family = '', $icon = '' ) {\n\tif ( ! $icon ) {\n\t\treturn;\n\t}\n\n\t// If font family isn't defined lets get it from the icon class.\n\tif ( ! $family ) {\n\t\t$family = vcex_get_icon_type_from_class( $icon );\n\t}\n\n\t// Return if we are using ticons.\n\tif ( 'ticons' === $family || ! $family ) {\n\t\twp_enqueue_style( 'ticons' );\n\t\treturn;\n\t}\n\n\t// Check for custom enqueue.\n\t$fonts = vcex_get_icon_font_families();\n\n\t// Custom stylesheet check.\n\tif ( ! empty( $fonts[$family]['style'] ) ) {\n\t\twp_enqueue_style( $fonts[$family]['style'] );\n\t\treturn;\n\t}\n\n\t// Default vc font icons.\n\tif ( function_exists( 'vc_icon_element_fonts_enqueue' ) ) {\n\t\tvc_icon_element_fonts_enqueue( $family );\n\t}\n}", "function av_icon_class($font)\n{\n\tglobal $avia_config;\n\treturn 'avia-font-'.$avia_config['font_icons'][$font]['font'];\n}", "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "private function _renderIcon()\n {\n return !empty($this->_icon) ? '<i class=\"' . $this->_icon . '\"></i>' : '';\n }", "public function get_icon() {\n\t\treturn 'fa fa-images';\n\t}", "public abstract function render_pix_icon(renderer_base $output, pix_icon $icon);", "protected function imageIcon(): string\n {\n $types = [\n 'image' => 'file-image',\n 'video' => 'file-video',\n 'document' => 'file-document',\n 'audio' => 'file-audio',\n 'code' => 'file-code',\n 'archive' => 'file-zip'\n ];\n\n $extensions = [\n 'xls' => 'file-spreadsheet',\n 'xlsx' => 'file-spreadsheet',\n 'csv' => 'file-spreadsheet',\n 'docx' => 'file-word',\n 'doc' => 'file-word',\n 'rtf' => 'file-word',\n 'mdown' => 'file-text',\n 'md' => 'file-text'\n ];\n\n return $extensions[$this->model->extension()] ??\n $types[$this->model->type()] ??\n parent::imageDefaults()['color'];\n }", "private function createIconModifier($icon)\n {\n return $this->getBaseClass(\n str_replace(\"_\", \"-\", $icon),\n true\n );\n }", "public function iconFunction($icon)\n {\n return sprintf('<span class=\"fa fa-%s\"></span>', $icon);\n }", "public function getIconForFileWithFileTypePngReturnsPngIcon() {}", "static function frontend_icon($icon, $font = false, $return = 'string')\n\t{\n\t\t//if we got no font passed use the default font\n\t\tif(empty($font)) $font = key(AviaBuilder::$default_iconfont); \n\t\t\n\t\t//fetch the character to display\n\t\t$display_char = self::get_display_char($icon, $font);\n\t\n\t\t//return the html string that gets attached to the element. css classes for font display are generated automatically\n\t\tif($return == 'string')\n\t\t{\n\t\t\treturn \"aria-hidden='true' data-av_icon='{$display_char}' data-av_iconfont='{$font}'\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $display_char;\n\t\t}\n\t}", "public static function type_return_icon($type_id)\n {\n switch($type_id):\n case '101';\n return \"<i class=\\\"fa fa-beer fa-1x\\\"></i>\";\n break;\n case '102';\n return \"<i class=\\\"fa fa-thumbs-o-up fa-1x\\\"></i>\";\n break;\n case '103';\n break;\n case '200';\n return \"<i class=\\\"fa fa-picture-o fa-1x\\\"></i>\";\n break;\n case '300';\n return \"<i class=\\\"fa fa-map-marker fa-1x\\\"></i>\";\n break;\n endswitch;\n }", "protected function getIcon($color) {\n return Assets::image_path('icons/16/' . $color . '/forum.png');\n }", "public function registerFontBox(){\n\t\t$param = WPBMap::getParam( 'vc_icon', 'type' );\n\t\t\n\t\t$param['value'][$this->getIconHeader()] = $this->getIconLib();\n\t\tvc_update_shortcode_param( 'vc_icon', $param );\n\t}", "public function getIcon()\n {\n return ModuleResourceLoader::resourceURL(\n 'silverstripe/framework:client/images/app_icons/folder_icon_large.png'\n );\n }", "public function getIcon() {\n\t\t//regex is used to check if there's a filename within the iconFile string\n\t\treturn preg_replace('/^.*\\/([^\\/]+\\.(gif|png))?$/i', '\\1', $this->iconFile) ? $this->iconFile : '';\n\t}", "public function getIcon()\n\t{\n\t\treturn $this->icon;\n\t}", "public function get_icon()\n {\n return 'fa fa-heading';\n }", "public function defaultIcon()\n {\n return 'mail';\n }", "public function getIcon() {\r\n \r\n $mime = explode(\"/\", $this->mime); \r\n \r\n switch ($mime[0]) {\r\n case \"video\" : \r\n return [\r\n \"label\" => \"Video\",\r\n \"icon\" => '<i class=\"fa fa-file-video-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"image\" : \r\n return [\r\n \"label\" => \"Image\",\r\n \"icon\" => '<i class=\"fa fa-file-image-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n }\r\n \r\n switch ($this->mime) {\r\n case \"application/msword\":\r\n case \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":\r\n return [ \r\n \"label\" => \"Microsoft Word\",\r\n \"icon\" => '<i class=\"fa fa-file-word-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"application/vnd.ms-excel\":\r\n case \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\":\r\n return [ \r\n \"label\" => \"Microsoft Excel\",\r\n \"icon\" => '<i class=\"fa fa-file-excel-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"application/pdf\":\r\n case \"application/x-pdf\":\r\n return [ \r\n \"label\" => \"PDF\",\r\n \"icon\" => '<i class=\"fa fa-file-pdf-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n }\r\n \r\n return [\r\n \"label\" => \"Unknown\",\r\n \"icon\" => '<i class=\"fa fa-file-o\"></i>'\r\n ];\r\n \r\n }", "public function icon ( )\n\t{\n\t\treturn Array( 'id' => $this->id,\t// shoud be consistent with what is passed to _uicmp_stuff_fold class\n\t\t\t\t\t 'title' => $this->messages['icon'] );\n\t}", "function thirdtheme_custom_icon()\n {\n add_theme_support('post-thumbnails');\n add_image_size('iconsize',55,45);\n $args = array(\n 'labels' => array('name' =>__('icon'),\n 'add_new' =>__('add new icon')),\n \n 'public' => true,\n 'menu_icon' => 'dashicons-art',\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title','editor','thumbnail' )); \n register_post_type('icon',$args);\n }", "protected function buildCssAndRegisterIcons() {}", "public function getIcons($milestone)\n {\n // Compose the channel icon path\n $bundlePath = $milestone->getMilestoneModule()->getBundle()->getWebAssetsPath();\n $bundleName = $milestone->getMilestoneModule()->getBundle()->getName();\n $iconName = str_replace('campaignchain/', '', str_replace('-', '_', $bundleName)).'.png';\n $icon['16px'] = '/'.$bundlePath.'/images/icons/16x16/'.$iconName;\n $icon['24px'] = '/'.$bundlePath.'/images/icons/24x24/'.$iconName;\n\n return $icon;\n }", "public function icon($href)\n {\n return $this->rel('icon')->href($href);\n }", "public function setIconName($iconName) {}", "public function setIconName($iconName) {}", "public function getIcon() {\n\t\treturn $this->icon;\n\t}", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function setIconName($iconName) {}" ]
[ "0.7058905", "0.68383014", "0.66942304", "0.66805327", "0.66458786", "0.6594002", "0.6594002", "0.65276146", "0.65077174", "0.65077174", "0.6405133", "0.6391595", "0.63782626", "0.63415873", "0.6339644", "0.6339644", "0.6338894", "0.6338894", "0.6316775", "0.62772155", "0.6276117", "0.6270967", "0.62476224", "0.62387145", "0.62030584", "0.62029415", "0.61687", "0.61683506", "0.6163189", "0.6153032", "0.6149896", "0.6122558", "0.61147636", "0.61095005", "0.60742736", "0.6066151", "0.60528255", "0.60528255", "0.6039497", "0.6034821", "0.6015558", "0.60030544", "0.5990095", "0.59868705", "0.5983183", "0.5973705", "0.5966832", "0.5966287", "0.5936082", "0.59352577", "0.5904745", "0.5898503", "0.58960664", "0.5895623", "0.58894", "0.58894", "0.5873306", "0.58544374", "0.5853911", "0.58354896", "0.5824071", "0.5822421", "0.5822421", "0.5819408", "0.5819408", "0.5819408", "0.5819408", "0.5819408", "0.5819408", "0.5819408", "0.5812375", "0.5805808", "0.5791802", "0.5789088", "0.57831067", "0.5779977", "0.5768412", "0.57638514", "0.57625985", "0.57510346", "0.57482743", "0.5746635", "0.5728526", "0.57272667", "0.5722675", "0.5719961", "0.57059115", "0.5702199", "0.570216", "0.5698259", "0.56945145", "0.56755906", "0.5663191", "0.56603646", "0.56603646", "0.5658385", "0.56578887", "0.56578887", "0.56578887", "0.5656843" ]
0.833063
0
Parse a Font Awesome icon.
public static function parseFontAwesomeIcon(array $args): FontAwesomeIconInterface { $icon = static::newFontAwesomeIcon(); $icon->setName(ArrayHelper::get($args, "name", "home")); $icon->setStyle(ArrayHelper::get($args, "style")); $icon->setAnimation(ArrayHelper::get($args, "animation")); $icon->setBordered(ArrayHelper::get($args, "bordered", false)); $icon->setFixedWidth(ArrayHelper::get($args, "fixedWidth", false)); $icon->setFont(ArrayHelper::get($args, "font")); $icon->setPull(ArrayHelper::get($args, "pull")); $icon->setSize(ArrayHelper::get($args, "size")); return $icon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _parseFavicon($html){\n\n\t\t$matches = array();\n\n\t\t/* Search for <link rel=\"icon\" type=\"image/png\" href=\"http://example.com/icon.png\" /> */\n\t\tpreg_match('/><link.*?rel=(\"|\\').*icon(\"|\\').*?href=(\"|\\')(.*?)(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 4)\n\t\t\treturn trim($matches[4]);\n\n\t\t/* Search for <link rel=\"icon\" type=\"image/png\" href=\"http://example.com/icon.png\" /> */\n\t\tpreg_match('/<link.*?type=(\"|\\')image.*(\"|\\').*?href=(\"|\\')(.*?)(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 4)\n\t\t\treturn trim($matches[4]);\n\n\t\t/* \n\t\t * Order of attributes could be swapped around:\n\t\t * <link href=\"http://example.com/icon.png\" type=\"image/......\" />\n\t\t */\n\t\tpreg_match('/<link.*?href=(\"|\\')(.*?)(\"|\\').*?type=(\"|\\')image.*(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 2)\n\t\t\treturn trim($matches[2]);\n\n\t\t/* \n\t\t * Order of attributes could be swapped around:\n\t\t * <link type=\"image/......\" href=\"http://example.com/icon.png\" />\n\t\t */\n\t\tpreg_match('/<link.*?rel=(\"|\\').*icon(\"|\\').*?href=(\"|\\')(.*?)(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 4)\n\t\t\treturn trim($matches[4]);\n\n\t\t/* Order of attributes could be swapped around:\n\t\t * <link href=\"http://example.com/icon.png\" rel=\"icon\" />\n\t\t */\n\t\tpreg_match('/<link.*?href=(\"|\\')(.*?)(\"|\\').*?rel=(\"|\\').*icon(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 2)\n\t\t\treturn trim($matches[2]);\n\n\t\t/* Order of attributes could be swapped around:\n\t\t * <link rel=\"icon\" href=\"http://example.com/icon.png\" />\n\t\t */\n\t\tpreg_match('/<link.*?rel=(\"|\\')icon(\"|\\').*?href=(\"|\\')(.*?)(\"|\\')/i', $html, $match_todo);\n\t\tif (count($match_todo) > 3)\n\t\t\treturn trim($match_todo[3]);\n\n\t\t/* No match */\n\t\treturn null;\n\t}", "function fa_icon( $icon = 'user' ) {\n\t\treturn \"<i class=\\\"fa fa-{$icon}\\\"></i>\";\n\t}", "public static function newFontAwesomeIcon(): FontAwesomeIconInterface {\n return new FontAwesomeIcon();\n }", "static function try_decode_icon($icon)\n\t{\n\t\tif(strpos($icon, 'u') === 0) $icon = json_decode('\"\\\\'.$icon.'\"');\n\t\treturn $icon;\n\t}", "function font_awesome($icon){\n\treturn \"<span class='fa fa-fw $icon'></span>\";\n}", "public function parseIconsFilter($text)\n {\n $that = $this;\n return preg_replace_callback(\n '/\\.faIco-([a-z0-9-]+)/',\n function ($matches) use ($that) {\n return $that->iconFunction($matches[1]);\n },\n $text\n );\n }", "private static function getFaiconsList() {\n\t\n\t\t$content = file_get_contents('https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/metadata/icons.json');\n\t\t$json = json_decode($content);\n\t\t$icons = [];\n\t\n\t\tforeach ($json as $icon => $value) {\n\t\t\tforeach ($value->styles as $style) {\n\t\t\t\t$icons[] = 'fa'.substr($style, 0 ,1).' fa-'.$icon;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $icons;\n\t}", "public static function validateIconName($element, FormStateInterface $form_state) {\n // Load the configuration settings.\n $configuration_settings = \\Drupal::config('fontawesome.settings');\n // Check if we need to bypass.\n if ($configuration_settings->get('bypass_validation')) {\n return;\n }\n\n $value = $element['#value'];\n if (strlen($value) == 0) {\n $form_state->setValueForElement($element, '');\n return;\n }\n\n // Load the icon data so we can check for a valid icon.\n $iconData = \\Drupal::service('fontawesome.font_awesome_manager')->getIconMetadata($value);\n\n if (!isset($iconData['name'])) {\n $form_state->setError($element, t(\"Invalid icon name %value. Please see @iconLink for correct icon names, or turn off validation in the Font Awesome settings if you are trying to use custom icon names.\", [\n '%value' => $value,\n '@iconLink' => Link::fromTextAndUrl(t('the Font Awesome icon list'), Url::fromUri('https://fontawesome.com/icons'))->toString(),\n ]));\n }\n }", "public function get_icon()\n\t{\n\t\treturn 'fab fa-algolia';\n\t}", "public function icon($icon);", "public function getIcon() {\r\n \r\n $mime = explode(\"/\", $this->mime); \r\n \r\n switch ($mime[0]) {\r\n case \"video\" : \r\n return [\r\n \"label\" => \"Video\",\r\n \"icon\" => '<i class=\"fa fa-file-video-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"image\" : \r\n return [\r\n \"label\" => \"Image\",\r\n \"icon\" => '<i class=\"fa fa-file-image-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n }\r\n \r\n switch ($this->mime) {\r\n case \"application/msword\":\r\n case \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":\r\n return [ \r\n \"label\" => \"Microsoft Word\",\r\n \"icon\" => '<i class=\"fa fa-file-word-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"application/vnd.ms-excel\":\r\n case \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\":\r\n return [ \r\n \"label\" => \"Microsoft Excel\",\r\n \"icon\" => '<i class=\"fa fa-file-excel-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"application/pdf\":\r\n case \"application/x-pdf\":\r\n return [ \r\n \"label\" => \"PDF\",\r\n \"icon\" => '<i class=\"fa fa-file-pdf-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n }\r\n \r\n return [\r\n \"label\" => \"Unknown\",\r\n \"icon\" => '<i class=\"fa fa-file-o\"></i>'\r\n ];\r\n \r\n }", "public function getIcon() {\n\t\t//regex is used to check if there's a filename within the iconFile string\n\t\treturn preg_replace('/^.*\\/([^\\/]+\\.(gif|png))?$/i', '\\1', $this->iconFile) ? $this->iconFile : '';\n\t}", "protected function getFaIds()\n {\n $arrMatches = [];\n $path = \\Contao\\Config::get('fontawesomIconPickerFontawesomeMeta');\n if (strpos($path, '/') !== 0) {\n $path = '/'.$path;\n }\n $strFile = file_get_contents(TL_ROOT . $path);\n\n $arrYaml = Yaml::parse($strFile);\n foreach ($arrYaml as $iconName => $arrItemProps)\n {\n $arrItem = array(\n 'id' => $iconName,\n 'faClass' => 'fa-' . $iconName,\n 'styles' => $arrItemProps['styles'],\n 'label' => $arrItemProps['label'],\n 'unicode' => $arrItemProps['unicode']\n );\n\n if (is_array($arrItemProps['styles']))\n {\n if (in_array('light', $arrItemProps['styles']))\n {\n $arrItem['style'] = 'light';\n $arrItem['faStyle'] = 'fal';\n }\n\n if (in_array('regular', $arrItemProps['styles']))\n {\n $arrItem['style'] = 'regular';\n $arrItem['faStyle'] = 'far';\n }\n\n if (in_array('solid', $arrItemProps['styles']))\n {\n $arrItem['style'] = 'solid';\n $arrItem['faStyle'] = 'fas';\n }\n\n if (in_array('brands', $arrItemProps['styles']))\n {\n $arrItem['style'] = 'brands';\n $arrItem['faStyle'] = 'fab';\n }\n\n }\n $arrMatches[] = $arrItem;\n }\n\n return $arrMatches;\n }", "function av_icon($icon, $font = false, $string = 'string')\n{\t\n\treturn avia_font_manager::frontend_icon($icon, $font, $string);\n}", "function studeon_vc_iconpicker_type_fontawesome($icons) {\n\t\t$list = studeon_get_list_icons();\n\t\tif (!is_array($list) || count($list) == 0) return $icons;\n\t\t$rez = array();\n\t\tforeach ($list as $icon)\n\t\t\t$rez[] = array($icon => str_replace('icon-', '', $icon));\n\t\treturn array_merge( $icons, array(esc_html__('Theme Icons', 'studeon') => $rez) );\n\t}", "private function parseInlineIcons($message)\n {\n preg_match('/<icon.*<\\/icon>/U', $message, $inline);\n\n if ($inline) {\n preg_match('/(?<=<icon>).*(?=<\\/icon>)/U', $inline[0], $icon);\n $icon = $icon ? $this->getIconCode($icon[0]) : \"\";\n $message = str_replace($inline, $icon, $message);\n\n return $this->parseInlineIcons($message);\n }\n\n return $message;\n }", "function maybe_enqueue_font_awesome( $field )\n\t{\n\t\tif( 'font-awesome' == $field['type'] && $field['enqueue_fa'] ) {\n\t\t\tadd_action( 'wp_footer', array( $this, 'frontend_enqueue_scripts' ) );\n\t\t}\n\n\t\treturn $field;\n\t}", "public function icon(): string;", "public function get_icon()\n {\n return 'fa fa-image';\n }", "function av_icon_char($char)\n{\n\tglobal $avia_config;\n\treturn avia_font_manager::frontend_icon($avia_config['font_icons'][$char]['icon'], $avia_config['font_icons'][$char]['font'], false);\n}", "public function get_icon()\n {\n return 'fa fa-file-video-o';\n }", "function i($code){\n $icon = '<i class=\"fa fa-'.$code.'\"></i>';\n return $icon;\n }", "function format_icon($p_icon, $p_color = '', $p_space_right = '5px'){\n\treturn '<i class=\"ace-icon fa ' . $p_icon . ' ' . $p_color . '\"></i>' . format_hspace($p_space_right);\n}", "static function icon($icon) {\n\t\treturn self::tag('i', 'glyphicon glyphicon-' . $icon);\n\t}", "function av_icon_css_string($char)\n{\n\tglobal $avia_config;\n\treturn \"content:'\\\\\".str_replace('ue','E',$avia_config['font_icons'][$char]['icon']).\"'; font-family: '\".$avia_config['font_icons'][$char]['font'].\"';\";\n}", "public function getIconName() {}", "public function getIconName() {}", "public static function parseMaterialDesignIconicFontIcon(array $args): MaterialDesignIconicFontIconInterface {\n\n $icon = static::newMaterialDesignIconicFontIcon();\n\n $icon->setName(ArrayHelper::get($args, \"name\", \"home\"));\n $icon->setStyle(ArrayHelper::get($args, \"style\"));\n\n $icon->setBorder(ArrayHelper::get($args, \"border\", false));\n $icon->setFixedWidth(ArrayHelper::get($args, \"fixedWidth\", false));\n $icon->setFlip(ArrayHelper::get($args, \"flip\"));\n $icon->setPull(ArrayHelper::get($args, \"pull\"));\n $icon->setRotate(ArrayHelper::get($args, \"rotate\"));\n $icon->setSize(ArrayHelper::get($args, \"size\"));\n $icon->setSpin(ArrayHelper::get($args, \"spin\"));\n\n return $icon;\n }", "public function getIconName() {}", "public function getIconName() {}", "public static function fontawesome_bwc($icon){\n $old_to_new = array(\n 'address-book-o' => 'address-book', 'address-card-o' => 'address-card', 'area-chart' => 'chart-area', 'arrow-circle-o-down' => 'arrow-alt-circle-down', 'arrow-circle-o-left' => 'arrow-alt-circle-left', 'arrow-circle-o-right' => 'arrow-alt-circle-right', 'arrow-circle-o-up' => 'arrow-alt-circle-up', 'arrows' => 'arrows-alt', 'arrows-alt' => 'expand-arrows-alt', 'arrows-h' => 'arrows-alt-h', 'arrows-v' => 'arrows-alt-v', 'asl-interpreting' => 'american-sign-language-interpreting', 'automobile' => 'car', 'bank' => 'university', 'bar-chart' => 'chart-bar', 'bar-chart-o' => 'chart-bar', 'bathtub' => 'bath', 'battery' => 'battery-full', 'battery-0' => 'battery-empty', 'battery-1' => 'battery-quarter', 'battery-2' => 'battery-half', 'battery-3' => 'battery-three-quarters', 'battery-4' => 'battery-full', 'bell-o' => 'bell', 'bell-slash-o' => 'bell-slash', 'bitbucket-square' => 'bitbucket', 'bitcoin' => 'btc', 'bookmark-o' => 'bookmark', 'building-o' => 'building', 'cab' => 'taxi', 'calendar' => 'calendar-alt', 'calendar-check-o' => 'calendar-check', 'calendar-minus-o' => 'calendar-minus', 'calendar-o' => 'calendar', 'calendar-plus-o' => 'calendar-plus', 'calendar-times-o' => 'calendar-times', 'caret-square-o-down' => 'caret-square-down', 'caret-square-o-left' => 'caret-square-left', 'caret-square-o-right' => 'caret-square-right', 'caret-square-o-up' => 'caret-square-up', 'cc' => 'closed-captioning', 'chain' => 'link', 'chain-broken' => 'unlink', 'check-circle-o' => 'check-circle', 'check-square-o' => 'check-square', 'circle-o' => 'circle', 'circle-o-notch' => 'circle-notch', 'circle-thin' => 'circle', 'clock-o' => 'clock', 'close' => 'times', 'cloud-download' => 'cloud-download-alt', 'cloud-upload' => 'cloud-upload-alt', 'cny' => 'yen-sign', 'code-fork' => 'code-branch', 'comment-o' => 'comment', 'commenting' => 'comment-dots', 'commenting-o' => 'comment-dots', 'comments-o' => 'comments', 'credit-card-alt' => 'credit-card', 'cutlery' => 'utensils', 'dashboard' => 'tachometer-alt', 'deafness' => 'deaf', 'dedent' => 'outdent', 'diamond' => 'gem', 'dollar' => 'dollar-sign', 'dot-circle-o' => 'dot-circle', 'drivers-license' => 'id-card', 'drivers-license-o' => 'id-card', 'eercast' => 'sellcast', 'envelope-o' => 'envelope', 'envelope-open-o' => 'envelope-open', 'eur' => 'euro-sign', 'euro' => 'euro-sign', 'exchange' => 'exchange-alt', 'external-link' => 'external-link-alt', 'external-link-square' => 'external-link-square-alt', 'eyedropper' => 'eye-dropper', 'fa' => 'font-awesome', 'facebook' => 'facebook-f', 'facebook-official' => 'facebook', 'feed' => 'rss', 'file-archive-o' => 'file-archive', 'file-audio-o' => 'file-audio', 'file-code-o' => 'file-code', 'file-excel-o' => 'file-excel', 'file-image-o' => 'file-image', 'file-movie-o' => 'file-video', 'file-o' => 'file', 'file-pdf-o' => 'file-pdf', 'file-photo-o' => 'file-image', 'file-picture-o' => 'file-image', 'file-powerpoint-o' => 'file-powerpoint', 'file-sound-o' => 'file-audio', 'file-text' => 'file-alt', 'file-text-o' => 'file-alt', 'file-video-o' => 'file-video', 'file-word-o' => 'file-word', 'file-zip-o' => 'file-archive', 'files-o' => 'copy', 'flag-o' => 'flag', 'flash' => 'bolt', 'floppy-o' => 'save', 'folder-o' => 'folder', 'folder-open-o' => 'folder-open', 'frown-o' => 'frown', 'futbol-o' => 'futbol', 'gbp' => 'pound-sign', 'ge' => 'empire', 'gear' => 'cog', 'gears' => 'cogs', 'gittip' => 'gratipay', 'glass' => 'glass-martini', 'google-plus' => 'google-plus-g', 'google-plus-circle' => 'google-plus', 'google-plus-official' => 'google-plus', 'group' => 'users', 'hand-grab-o' => 'hand-rock', 'hand-lizard-o' => 'hand-lizard', 'hand-o-down' => 'hand-point-down', 'hand-o-left' => 'hand-point-left', 'hand-o-right' => 'hand-point-right', 'hand-o-up' => 'hand-point-up', 'hand-paper-o' => 'hand-paper', 'hand-peace-o' => 'hand-peace', 'hand-pointer-o' => 'hand-pointer', 'hand-rock-o' => 'hand-rock', 'hand-scissors-o' => 'hand-scissors', 'hand-spock-o' => 'hand-spock', 'hand-stop-o' => 'hand-paper', 'handshake-o' => 'handshake', 'hard-of-hearing' => 'deaf', 'hdd-o' => 'hdd', 'header' => 'heading', 'heart-o' => 'heart', 'hospital-o' => 'hospital', 'hotel' => 'bed', 'hourglass-1' => 'hourglass-start', 'hourglass-2' => 'hourglass-half', 'hourglass-3' => 'hourglass-end', 'hourglass-o' => 'hourglass', 'id-card-o' => 'id-card', 'ils' => 'shekel-sign', 'inr' => 'rupee-sign', 'institution' => 'university', 'intersex' => 'transgender', 'jpy' => 'yen-sign', 'keyboard-o' => 'keyboard', 'krw' => 'won-sign', 'legal' => 'gavel', 'lemon-o' => 'lemon', 'level-down' => 'level-down-alt', 'level-up' => 'level-up-alt', 'life-bouy' => 'life-ring', 'life-buoy' => 'life-ring', 'life-saver' => 'life-ring', 'lightbulb-o' => 'lightbulb', 'line-chart' => 'chart-line', 'linkedin' => 'linkedin-in', 'linkedin-square' => 'linkedin', 'long-arrow-down' => 'long-arrow-alt-down', 'long-arrow-left' => 'long-arrow-alt-left', 'long-arrow-right' => 'long-arrow-alt-right', 'long-arrow-up' => 'long-arrow-alt-up', 'mail-forward' => 'share', 'mail-reply' => 'reply', 'mail-reply-all' => 'reply-all', 'map-marker' => 'map-marker-alt', 'map-o' => 'map', 'meanpath' => 'font-awesome', 'meh-o' => 'meh', 'minus-square-o' => 'minus-square', 'mobile' => 'mobile-alt', 'mobile-phone' => 'mobile-alt', 'money' => 'money-bill-alt', 'moon-o' => 'moon', 'mortar-board' => 'graduation-cap', 'navicon' => 'bars', 'newspaper-o' => 'newspaper', 'paper-plane-o' => 'paper-plane', 'paste' => 'clipboard', 'pause-circle-o' => 'pause-circle', 'pencil' => 'pencil-alt', 'pencil-square' => 'pen-square', 'pencil-square-o' => 'edit', 'photo' => 'image', 'picture-o' => 'image', 'pie-chart' => 'chart-pie', 'play-circle-o' => 'play-circle', 'plus-square-o' => 'plus-square', 'question-circle-o' => 'question-circle', 'ra' => 'rebel', 'refresh' => 'sync', 'remove' => 'times', 'reorder' => 'bars', 'repeat' => 'redo', 'resistance' => 'rebel', 'rmb' => 'yen-sign', 'rotate-left' => 'undo', 'rotate-right' => 'redo', 'rouble' => 'ruble-sign', 'rub' => 'ruble-sign', 'ruble' => 'ruble-sign', 'rupee' => 'rupee-sign', 's15' => 'bath', 'scissors' => 'cut', 'send' => 'paper-plane', 'send-o' => 'paper-plane', 'share-square-o' => 'share-square', 'shekel' => 'shekel-sign', 'sheqel' => 'shekel-sign', 'shield' => 'shield-alt', 'sign-in' => 'sign-in-alt', 'sign-out' => 'sign-out-alt', 'signing' => 'sign-language', 'sliders' => 'sliders-h', 'smile-o' => 'smile', 'snowflake-o' => 'snowflake', 'soccer-ball-o' => 'futbol', 'sort-alpha-asc' => 'sort-alpha-down', 'sort-alpha-desc' => 'sort-alpha-up', 'sort-amount-asc' => 'sort-amount-down', 'sort-amount-desc' => 'sort-amount-up', 'sort-asc' => 'sort-up', 'sort-desc' => 'sort-down', 'sort-numeric-asc' => 'sort-numeric-down', 'sort-numeric-desc' => 'sort-numeric-up', 'spoon' => 'utensil-spoon', 'square-o' => 'square', 'star-half-empty' => 'star-half', 'star-half-full' => 'star-half', 'star-half-o' => 'star-half', 'star-o' => 'star', 'sticky-note-o' => 'sticky-note', 'stop-circle-o' => 'stop-circle', 'sun-o' => 'sun', 'support' => 'life-ring', 'tablet' => 'tablet-alt', 'tachometer' => 'tachometer-alt', 'television' => 'tv', 'thermometer' => 'thermometer-full', 'thermometer-0' => 'thermometer-empty', 'thermometer-1' => 'thermometer-quarter', 'thermometer-2' => 'thermometer-half', 'thermometer-3' => 'thermometer-three-quarters', 'thermometer-4' => 'thermometer-full', 'thumb-tack' => 'thumbtack', 'thumbs-o-down' => 'thumbs-down', 'thumbs-o-up' => 'thumbs-up', 'ticket' => 'ticket-alt', 'times-circle-o' => 'times-circle', 'times-rectangle' => 'window-close', 'times-rectangle-o' => 'window-close', 'toggle-down' => 'caret-square-down', 'toggle-left' => 'caret-square-left', 'toggle-right' => 'caret-square-right', 'toggle-up' => 'caret-square-up', 'trash' => 'trash-alt', 'trash-o' => 'trash-alt', 'try' => 'lira-sign', 'turkish-lira' => 'lira-sign', 'unsorted' => 'sort', 'usd' => 'dollar-sign', 'user-circle-o' => 'user-circle', 'user-o' => 'user', 'vcard' => 'address-card', 'vcard-o' => 'address-card', 'video-camera' => 'video', 'vimeo' => 'vimeo-v', 'volume-control-phone' => 'phone-volume', 'warning' => 'exclamation-triangle', 'wechat' => 'weixin', 'wheelchair-alt' => 'accessible-icon', 'window-close-o' => 'window-close', 'won' => 'won-sign', 'y-combinator-square' => 'hacker-news', 'yc' => 'y-combinator', 'yc-square' => 'hacker-news', 'yen' => 'yen-sign', 'youtube-play' => 'youtube',\n );\n // Return new if found\n if(isset($old_to_new[$icon])){\n return $old_to_new[$icon];\n } \n // Otherwise just return original\n return $icon;\n }", "public function icon($href)\n {\n return $this->rel('icon')->href($href);\n }", "function _kalatheme_font_icon($name, $bundle = NULL, $attr = array(), $resolvePrefix = TRUE){\n if($bundle === NULL){\n $bundle = theme_get_setting('icon_font_library');\n }\n // Find the icon prefix\n if($resolvePrefix){\n switch($bundle){\n case('font_awesome'):\n $name = 'fa-' . $name;\n break;\n case('bootstrap_glyphicons'):\n $name = 'glyphicon-' . $name;\n break;\n }\n }\n\n $output = NULL;\n if (module_exists('icon')){\n $output = theme('icon', array(\n 'bundle' => $bundle,\n 'icon' => $name,\n 'attributes' => $attr\n ));\n }\n if($output === NULL){\n $attr = array();\n $attr += array('aria-hidden' => 'true' );\n $attr['class'] = array();\n\n if($bundle === 'font_awesome'){\n $attr['class'][] = 'fa';\n }\n elseif($bundle === 'bootstrap_glyphicons'){\n $attr['class'][] = 'glyphicon';\n }\n\n\n $attr['class'][] = $name;\n $output = '<span '. drupal_attributes($attr) . '></span>';\n }\n return $output;\n}", "public function getIcon()\n {\n return ' fa fa-lock';\n }", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function parse_svg() {\n\t\t$files = $this->get_all_svg_files();\n\t\tif ( empty( $files ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Get the allowed tags to parse icon's ids\n\t\t *\n\t\t * @param string $allowed_tags : Passed directly to strip_tags\n\t\t *\n\t\t * @return string\n\t\t * @since 2.0.1\n\t\t *\n\t\t * @author david-treblig\n\t\t */\n\t\t$allowed_tags = apply_filters( 'acf_svg_icon_svg_parse_tags', '<symbol><g>' );\n\n\t\t$out = array();\n\n\t\t// Ignore SVG with type media to check if there are multiple sprite\n\t\t$custom_files = array_filter(\n\t\t\t$files,\n\t\t\tfunction ( $file ) {\n\t\t\t\treturn 'media' !== $file['type'];\n\t\t\t}\n\t\t);\n\n\t\tforeach ( $files as $file ) {\n\t\t\tif ( ! is_file( $file['file'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( 'media' === $file['type'] ) {\n\t\t\t\t$pathinfo = pathinfo( $file['file'] );\n\t\t\t\t$out[] = array(\n\t\t\t\t\t'id' => $file['id'],\n\t\t\t\t\t'text' => self::get_nice_display_text( $pathinfo['filename'], false ),\n\t\t\t\t\t'url' => $file['file_url'],\n\t\t\t\t\t'disabled' => false,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t// If not extract them from the CSS file.\n\t\t\t\t$contents = file_get_contents( $file['file'] );\n\t\t\t\tpreg_match_all( '/id=\"(\\S+)\"/m', strip_tags( $contents, $allowed_tags ), $svg );\n\n\t\t\t\tforeach ( $svg[1] as $id ) {\n\t\t\t\t\t$id = sanitize_title( $id );\n\t\t\t\t\t// If multiple sprites registered, return sprite name and icon name, otherwise return icon name only\n\t\t\t\t\t$value = 1 < count( $custom_files ) ? basename( $file['file'] ) . '#' . $id : $id;\n\t\t\t\t\t$out[] = array(\n\t\t\t\t\t\t'id' => $value,\n\t\t\t\t\t\t'text' => self::get_nice_display_text( $id ),\n\t\t\t\t\t\t'disabled' => false,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn apply_filters( 'acf_svg_icon_parsed_svg', $out, $files );\n\t}", "private function get_icon( $html, $url ) {\n\t\t// Grab the icon's link element.\n\t\t$pattern = '#<link\\s[^>]*rel=(?:[\\\"\\']??)\\s*(?:icon|shortcut icon|icon shortcut)\\s*(?:[\\\"\\']??)[^>]*\\/?>#isU';\n\t\tpreg_match( $pattern, $html, $element );\n\t\tif ( empty( $element[0] ) || ! is_string( $element[0] ) ) {\n\t\t\treturn '';\n\t\t}\n\t\t$element = trim( $element[0] );\n\n\t\t// Get the icon's href value.\n\t\t$pattern = '#href=([\\\"\\']??)([^\\\" >]*?)\\\\1[^>]*#isU';\n\t\tpreg_match( $pattern, $element, $icon );\n\t\tif ( empty( $icon[2] ) || ! is_string( $icon[2] ) ) {\n\t\t\treturn '';\n\t\t}\n\t\t$icon = trim( $icon[2] );\n\n\t\t// If the icon is a data URL, return it.\n\t\t$parsed_icon = parse_url( $icon );\n\t\tif ( isset( $parsed_icon['scheme'] ) && 'data' === $parsed_icon['scheme'] ) {\n\t\t\treturn $icon;\n\t\t}\n\n\t\t// Attempt to convert relative URLs to absolute.\n\t\tif ( ! is_string( $url ) || '' === $url ) {\n\t\t\treturn $icon;\n\t\t}\n\t\t$parsed_url = parse_url( $url );\n\t\tif ( isset( $parsed_url['scheme'] ) && isset( $parsed_url['host'] ) ) {\n\t\t\t$root_url = $parsed_url['scheme'] . '://' . $parsed_url['host'] . '/';\n\t\t\t$icon = WP_Http::make_absolute_url( $icon, $root_url );\n\t\t}\n\n\t\treturn $icon;\n\t}", "public function getIcon() {}", "public function icons() {\n\n\t\t$solid_icons = array(\n\t\t\t\"fas-f641\" => \"fas fa-ad\",\n\t\t\t\"fas-f2b9\" => \"fas fa-address-book\",\n\t\t\t\"fas-f2bb\" => \"fas fa-address-card\",\n\t\t\t\"fas-f042\" => \"fas fa-adjust\",\n\t\t\t\"fas-f5d0\" => \"fas fa-air-freshener\",\n\t\t\t\"fas-f037\" => \"fas fa-align-center\",\n\t\t\t\"fas-f039\" => \"fas fa-align-justify\",\n\t\t\t\"fas-f036\" => \"fas fa-align-left\",\n\t\t\t\"fas-f038\" => \"fas fa-align-right\",\n\t\t\t\"fas-f461\" => \"fas fa-allergies\",\n\t\t\t\"fas-f0f9\" => \"fas fa-ambulance\",\n\t\t\t\"fas-f2a3\" => \"fas fa-american-sign-language-interpreting\",\n\t\t\t\"fas-f13d\" => \"fas fa-anchor\",\n\t\t\t\"fas-f103\" => \"fas fa-angle-double-down\",\n\t\t\t\"fas-f100\" => \"fas fa-angle-double-left\",\n\t\t\t\"fas-f101\" => \"fas fa-angle-double-right\",\n\t\t\t\"fas-f102\" => \"fas fa-angle-double-up\",\n\t\t\t\"fas-f107\" => \"fas fa-angle-down\",\n\t\t\t\"fas-f104\" => \"fas fa-angle-left\",\n\t\t\t\"fas-f105\" => \"fas fa-angle-right\",\n\t\t\t\"fas-f106\" => \"fas fa-angle-up\",\n\t\t\t\"fas-f556\" => \"fas fa-angry\",\n\t\t\t\"fas-f644\" => \"fas fa-ankh\",\n\t\t\t\"fas-f5d1\" => \"fas fa-apple-alt\",\n\t\t\t\"fas-f187\" => \"fas fa-archive\",\n\t\t\t\"fas-f557\" => \"fas fa-archway\",\n\t\t\t\"fas-f358\" => \"fas fa-arrow-alt-circle-down\",\n\t\t\t\"fas-f359\" => \"fas fa-arrow-alt-circle-left\",\n\t\t\t\"fas-f35a\" => \"fas fa-arrow-alt-circle-right\",\n\t\t\t\"fas-f35b\" => \"fas fa-arrow-alt-circle-up\",\n\t\t\t\"fas-f0ab\" => \"fas fa-arrow-circle-down\",\n\t\t\t\"fas-f0a8\" => \"fas fa-arrow-circle-left\",\n\t\t\t\"fas-f0a9\" => \"fas fa-arrow-circle-right\",\n\t\t\t\"fas-f0aa\" => \"fas fa-arrow-circle-up\",\n\t\t\t\"fas-f063\" => \"fas fa-arrow-down\",\n\t\t\t\"fas-f060\" => \"fas fa-arrow-left\",\n\t\t\t\"fas-f061\" => \"fas fa-arrow-right\",\n\t\t\t\"fas-f062\" => \"fas fa-arrow-up\",\n\t\t\t\"fas-f0b2\" => \"fas fa-arrows-alt\",\n\t\t\t\"fas-f337\" => \"fas fa-arrows-alt-h\",\n\t\t\t\"fas-f338\" => \"fas fa-arrows-alt-v\",\n\t\t\t\"fas-f2a2\" => \"fas fa-assistive-listening-systems\",\n\t\t\t\"fas-f069\" => \"fas fa-asterisk\",\n\t\t\t\"fas-f1fa\" => \"fas fa-at\",\n\t\t\t\"fas-f558\" => \"fas fa-atlas\",\n\t\t\t\"fas-f5d2\" => \"fas fa-atom\",\n\t\t\t\"fas-f29e\" => \"fas fa-audio-description\",\n\t\t\t\"fas-f559\" => \"fas fa-award\",\n\t\t\t\"fas-f77c\" => \"fas fa-baby\",\n\t\t\t\"fas-f77d\" => \"fas fa-baby-carriage\",\n\t\t\t\"fas-f55a\" => \"fas fa-backspace\",\n\t\t\t\"fas-f04a\" => \"fas fa-backward\",\n\t\t\t\"fas-f7e5\" => \"fas fa-bacon\",\n\t\t\t\"fas-f666\" => \"fas fa-bahai\",\n\t\t\t\"fas-f24e\" => \"fas fa-balance-scale\",\n\t\t\t\"fas-f515\" => \"fas fa-balance-scale-left\",\n\t\t\t\"fas-f516\" => \"fas fa-balance-scale-right\",\n\t\t\t\"fas-f05e\" => \"fas fa-ban\",\n\t\t\t\"fas-f462\" => \"fas fa-band-aid\",\n\t\t\t\"fas-f02a\" => \"fas fa-barcode\",\n\t\t\t\"fas-f0c9\" => \"fas fa-bars\",\n\t\t\t\"fas-f433\" => \"fas fa-baseball-ball\",\n\t\t\t\"fas-f434\" => \"fas fa-basketball-ball\",\n\t\t\t\"fas-f2cd\" => \"fas fa-bath\",\n\t\t\t\"fas-f244\" => \"fas fa-battery-empty\",\n\t\t\t\"fas-f240\" => \"fas fa-battery-full\",\n\t\t\t\"fas-f242\" => \"fas fa-battery-half\",\n\t\t\t\"fas-f243\" => \"fas fa-battery-quarter\",\n\t\t\t\"fas-f241\" => \"fas fa-battery-three-quarters\",\n\t\t\t\"fas-f236\" => \"fas fa-bed\",\n\t\t\t\"fas-f0fc\" => \"fas fa-beer\",\n\t\t\t\"fas-f0f3\" => \"fas fa-bell\",\n\t\t\t\"fas-f1f6\" => \"fas fa-bell-slash\",\n\t\t\t\"fas-f55b\" => \"fas fa-bezier-curve\",\n\t\t\t\"fas-f647\" => \"fas fa-bible\",\n\t\t\t\"fas-f206\" => \"fas fa-bicycle\",\n\t\t\t\"fas-f84a\" => \"fas fa-biking\",\n\t\t\t\"fas-f1e5\" => \"fas fa-binoculars\",\n\t\t\t\"fas-f780\" => \"fas fa-biohazard\",\n\t\t\t\"fas-f1fd\" => \"fas fa-birthday-cake\",\n\t\t\t\"fas-f517\" => \"fas fa-blender\",\n\t\t\t\"fas-f6b6\" => \"fas fa-blender-phone\",\n\t\t\t\"fas-f29d\" => \"fas fa-blind\",\n\t\t\t\"fas-f781\" => \"fas fa-blog\",\n\t\t\t\"fas-f032\" => \"fas fa-bold\",\n\t\t\t\"fas-f0e7\" => \"fas fa-bolt\",\n\t\t\t\"fas-f1e2\" => \"fas fa-bomb\",\n\t\t\t\"fas-f5d7\" => \"fas fa-bone\",\n\t\t\t\"fas-f55c\" => \"fas fa-bong\",\n\t\t\t\"fas-f02d\" => \"fas fa-book\",\n\t\t\t\"fas-f6b7\" => \"fas fa-book-dead\",\n\t\t\t\"fas-f7e6\" => \"fas fa-book-medical\",\n\t\t\t\"fas-f518\" => \"fas fa-book-open\",\n\t\t\t\"fas-f5da\" => \"fas fa-book-reader\",\n\t\t\t\"fas-f02e\" => \"fas fa-bookmark\",\n\t\t\t\"fas-f84c\" => \"fas fa-border-all\",\n\t\t\t\"fas-f850\" => \"fas fa-border-none\",\n\t\t\t\"fas-f853\" => \"fas fa-border-style\",\n\t\t\t\"fas-f436\" => \"fas fa-bowling-ball\",\n\t\t\t\"fas-f466\" => \"fas fa-box\",\n\t\t\t\"fas-f49e\" => \"fas fa-box-open\",\n\t\t\t\"fas-f95b\" => \"fas fa-box-tissue\",\n\t\t\t\"fas-f468\" => \"fas fa-boxes\",\n\t\t\t\"fas-f2a1\" => \"fas fa-braille\",\n\t\t\t\"fas-f5dc\" => \"fas fa-brain\",\n\t\t\t\"fas-f7ec\" => \"fas fa-bread-slice\",\n\t\t\t\"fas-f0b1\" => \"fas fa-briefcase\",\n\t\t\t\"fas-f469\" => \"fas fa-briefcase-medical\",\n\t\t\t\"fas-f519\" => \"fas fa-broadcast-tower\",\n\t\t\t\"fas-f51a\" => \"fas fa-broom\",\n\t\t\t\"fas-f55d\" => \"fas fa-brush\",\n\t\t\t\"fas-f188\" => \"fas fa-bug\",\n\t\t\t\"fas-f1ad\" => \"fas fa-building\",\n\t\t\t\"fas-f0a1\" => \"fas fa-bullhorn\",\n\t\t\t\"fas-f140\" => \"fas fa-bullseye\",\n\t\t\t\"fas-f46a\" => \"fas fa-burn\",\n\t\t\t\"fas-f207\" => \"fas fa-bus\",\n\t\t\t\"fas-f55e\" => \"fas fa-bus-alt\",\n\t\t\t\"fas-f64a\" => \"fas fa-business-time\",\n\t\t\t\"fas-f1ec\" => \"fas fa-calculator\",\n\t\t\t\"fas-f133\" => \"fas fa-calendar\",\n\t\t\t\"fas-f073\" => \"fas fa-calendar-alt\",\n\t\t\t\"fas-f274\" => \"fas fa-calendar-check\",\n\t\t\t\"fas-f783\" => \"fas fa-calendar-day\",\n\t\t\t\"fas-f272\" => \"fas fa-calendar-minus\",\n\t\t\t\"fas-f271\" => \"fas fa-calendar-plus\",\n\t\t\t\"fas-f273\" => \"fas fa-calendar-times\",\n\t\t\t\"fas-f784\" => \"fas fa-calendar-week\",\n\t\t\t\"fas-f030\" => \"fas fa-camera\",\n\t\t\t\"fas-f083\" => \"fas fa-camera-retro\",\n\t\t\t\"fas-f6bb\" => \"fas fa-campground\",\n\t\t\t\"fas-f786\" => \"fas fa-candy-cane\",\n\t\t\t\"fas-f55f\" => \"fas fa-cannabis\",\n\t\t\t\"fas-f46b\" => \"fas fa-capsules\",\n\t\t\t\"fas-f1b9\" => \"fas fa-car\",\n\t\t\t\"fas-f5de\" => \"fas fa-car-alt\",\n\t\t\t\"fas-f5df\" => \"fas fa-car-battery\",\n\t\t\t\"fas-f5e1\" => \"fas fa-car-crash\",\n\t\t\t\"fas-f5e4\" => \"fas fa-car-side\",\n\t\t\t\"fas-f8ff\" => \"fas fa-caravan\",\n\t\t\t\"fas-f0d7\" => \"fas fa-caret-down\",\n\t\t\t\"fas-f0d9\" => \"fas fa-caret-left\",\n\t\t\t\"fas-f0da\" => \"fas fa-caret-right\",\n\t\t\t\"fas-f150\" => \"fas fa-caret-square-down\",\n\t\t\t\"fas-f191\" => \"fas fa-caret-square-left\",\n\t\t\t\"fas-f152\" => \"fas fa-caret-square-right\",\n\t\t\t\"fas-f151\" => \"fas fa-caret-square-up\",\n\t\t\t\"fas-f0d8\" => \"fas fa-caret-up\",\n\t\t\t\"fas-f787\" => \"fas fa-carrot\",\n\t\t\t\"fas-f218\" => \"fas fa-cart-arrow-down\",\n\t\t\t\"fas-f217\" => \"fas fa-cart-plus\",\n\t\t\t\"fas-f788\" => \"fas fa-cash-register\",\n\t\t\t\"fas-f6be\" => \"fas fa-cat\",\n\t\t\t\"fas-f0a3\" => \"fas fa-certificate\",\n\t\t\t\"fas-f6c0\" => \"fas fa-chair\",\n\t\t\t\"fas-f51b\" => \"fas fa-chalkboard\",\n\t\t\t\"fas-f51c\" => \"fas fa-chalkboard-teacher\",\n\t\t\t\"fas-f5e7\" => \"fas fa-charging-station\",\n\t\t\t\"fas-f1fe\" => \"fas fa-chart-area\",\n\t\t\t\"fas-f080\" => \"fas fa-chart-bar\",\n\t\t\t\"fas-f201\" => \"fas fa-chart-line\",\n\t\t\t\"fas-f200\" => \"fas fa-chart-pie\",\n\t\t\t\"fas-f00c\" => \"fas fa-check\",\n\t\t\t\"fas-f058\" => \"fas fa-check-circle\",\n\t\t\t\"fas-f560\" => \"fas fa-check-double\",\n\t\t\t\"fas-f14a\" => \"fas fa-check-square\",\n\t\t\t\"fas-f7ef\" => \"fas fa-cheese\",\n\t\t\t\"fas-f439\" => \"fas fa-chess\",\n\t\t\t\"fas-f43a\" => \"fas fa-chess-bishop\",\n\t\t\t\"fas-f43c\" => \"fas fa-chess-board\",\n\t\t\t\"fas-f43f\" => \"fas fa-chess-king\",\n\t\t\t\"fas-f441\" => \"fas fa-chess-knight\",\n\t\t\t\"fas-f443\" => \"fas fa-chess-pawn\",\n\t\t\t\"fas-f445\" => \"fas fa-chess-queen\",\n\t\t\t\"fas-f447\" => \"fas fa-chess-rook\",\n\t\t\t\"fas-f13a\" => \"fas fa-chevron-circle-down\",\n\t\t\t\"fas-f137\" => \"fas fa-chevron-circle-left\",\n\t\t\t\"fas-f138\" => \"fas fa-chevron-circle-right\",\n\t\t\t\"fas-f139\" => \"fas fa-chevron-circle-up\",\n\t\t\t\"fas-f078\" => \"fas fa-chevron-down\",\n\t\t\t\"fas-f053\" => \"fas fa-chevron-left\",\n\t\t\t\"fas-f054\" => \"fas fa-chevron-right\",\n\t\t\t\"fas-f077\" => \"fas fa-chevron-up\",\n\t\t\t\"fas-f1ae\" => \"fas fa-child\",\n\t\t\t\"fas-f51d\" => \"fas fa-church\",\n\t\t\t\"fas-f111\" => \"fas fa-circle\",\n\t\t\t\"fas-f1ce\" => \"fas fa-circle-notch\",\n\t\t\t\"fas-f64f\" => \"fas fa-city\",\n\t\t\t\"fas-f7f2\" => \"fas fa-clinic-medical\",\n\t\t\t\"fas-f328\" => \"fas fa-clipboard\",\n\t\t\t\"fas-f46c\" => \"fas fa-clipboard-check\",\n\t\t\t\"fas-f46d\" => \"fas fa-clipboard-list\",\n\t\t\t\"fas-f017\" => \"fas fa-clock\",\n\t\t\t\"fas-f24d\" => \"fas fa-clone\",\n\t\t\t\"fas-f20a\" => \"fas fa-closed-captioning\",\n\t\t\t\"fas-f0c2\" => \"fas fa-cloud\",\n\t\t\t\"fas-f381\" => \"fas fa-cloud-download-alt\",\n\t\t\t\"fas-f73b\" => \"fas fa-cloud-meatball\",\n\t\t\t\"fas-f6c3\" => \"fas fa-cloud-moon\",\n\t\t\t\"fas-f73c\" => \"fas fa-cloud-moon-rain\",\n\t\t\t\"fas-f73d\" => \"fas fa-cloud-rain\",\n\t\t\t\"fas-f740\" => \"fas fa-cloud-showers-heavy\",\n\t\t\t\"fas-f6c4\" => \"fas fa-cloud-sun\",\n\t\t\t\"fas-f743\" => \"fas fa-cloud-sun-rain\",\n\t\t\t\"fas-f382\" => \"fas fa-cloud-upload-alt\",\n\t\t\t\"fas-f561\" => \"fas fa-cocktail\",\n\t\t\t\"fas-f121\" => \"fas fa-code\",\n\t\t\t\"fas-f126\" => \"fas fa-code-branch\",\n\t\t\t\"fas-f0f4\" => \"fas fa-coffee\",\n\t\t\t\"fas-f013\" => \"fas fa-cog\",\n\t\t\t\"fas-f085\" => \"fas fa-cogs\",\n\t\t\t\"fas-f51e\" => \"fas fa-coins\",\n\t\t\t\"fas-f0db\" => \"fas fa-columns\",\n\t\t\t\"fas-f075\" => \"fas fa-comment\",\n\t\t\t\"fas-f27a\" => \"fas fa-comment-alt\",\n\t\t\t\"fas-f651\" => \"fas fa-comment-dollar\",\n\t\t\t\"fas-f4ad\" => \"fas fa-comment-dots\",\n\t\t\t\"fas-f7f5\" => \"fas fa-comment-medical\",\n\t\t\t\"fas-f4b3\" => \"fas fa-comment-slash\",\n\t\t\t\"fas-f086\" => \"fas fa-comments\",\n\t\t\t\"fas-f653\" => \"fas fa-comments-dollar\",\n\t\t\t\"fas-f51f\" => \"fas fa-compact-disc\",\n\t\t\t\"fas-f14e\" => \"fas fa-compass\",\n\t\t\t\"fas-f066\" => \"fas fa-compress\",\n\t\t\t\"fas-f422\" => \"fas fa-compress-alt\",\n\t\t\t\"fas-f78c\" => \"fas fa-compress-arrows-alt\",\n\t\t\t\"fas-f562\" => \"fas fa-concierge-bell\",\n\t\t\t\"fas-f563\" => \"fas fa-cookie\",\n\t\t\t\"fas-f564\" => \"fas fa-cookie-bite\",\n\t\t\t\"fas-f0c5\" => \"fas fa-copy\",\n\t\t\t\"fas-f1f9\" => \"fas fa-copyright\",\n\t\t\t\"fas-f4b8\" => \"fas fa-couch\",\n\t\t\t\"fas-f09d\" => \"fas fa-credit-card\",\n\t\t\t\"fas-f125\" => \"fas fa-crop\",\n\t\t\t\"fas-f565\" => \"fas fa-crop-alt\",\n\t\t\t\"fas-f654\" => \"fas fa-cross\",\n\t\t\t\"fas-f05b\" => \"fas fa-crosshairs\",\n\t\t\t\"fas-f520\" => \"fas fa-crow\",\n\t\t\t\"fas-f521\" => \"fas fa-crown\",\n\t\t\t\"fas-f7f7\" => \"fas fa-crutch\",\n\t\t\t\"fas-f1b2\" => \"fas fa-cube\",\n\t\t\t\"fas-f1b3\" => \"fas fa-cubes\",\n\t\t\t\"fas-f0c4\" => \"fas fa-cut\",\n\t\t\t\"fas-f1c0\" => \"fas fa-database\",\n\t\t\t\"fas-f2a4\" => \"fas fa-deaf\",\n\t\t\t\"fas-f747\" => \"fas fa-democrat\",\n\t\t\t\"fas-f108\" => \"fas fa-desktop\",\n\t\t\t\"fas-f655\" => \"fas fa-dharmachakra\",\n\t\t\t\"fas-f470\" => \"fas fa-diagnoses\",\n\t\t\t\"fas-f522\" => \"fas fa-dice\",\n\t\t\t\"fas-f6cf\" => \"fas fa-dice-d20\",\n\t\t\t\"fas-f6d1\" => \"fas fa-dice-d6\",\n\t\t\t\"fas-f523\" => \"fas fa-dice-five\",\n\t\t\t\"fas-f524\" => \"fas fa-dice-four\",\n\t\t\t\"fas-f525\" => \"fas fa-dice-one\",\n\t\t\t\"fas-f526\" => \"fas fa-dice-six\",\n\t\t\t\"fas-f527\" => \"fas fa-dice-three\",\n\t\t\t\"fas-f528\" => \"fas fa-dice-two\",\n\t\t\t\"fas-f566\" => \"fas fa-digital-tachograph\",\n\t\t\t\"fas-f5eb\" => \"fas fa-directions\",\n\t\t\t\"fas-f7fa\" => \"fas fa-disease\",\n\t\t\t\"fas-f529\" => \"fas fa-divide\",\n\t\t\t\"fas-f567\" => \"fas fa-dizzy\",\n\t\t\t\"fas-f471\" => \"fas fa-dna\",\n\t\t\t\"fas-f6d3\" => \"fas fa-dog\",\n\t\t\t\"fas-f155\" => \"fas fa-dollar-sign\",\n\t\t\t\"fas-f472\" => \"fas fa-dolly\",\n\t\t\t\"fas-f474\" => \"fas fa-dolly-flatbed\",\n\t\t\t\"fas-f4b9\" => \"fas fa-donate\",\n\t\t\t\"fas-f52a\" => \"fas fa-door-closed\",\n\t\t\t\"fas-f52b\" => \"fas fa-door-open\",\n\t\t\t\"fas-f192\" => \"fas fa-dot-circle\",\n\t\t\t\"fas-f4ba\" => \"fas fa-dove\",\n\t\t\t\"fas-f019\" => \"fas fa-download\",\n\t\t\t\"fas-f568\" => \"fas fa-drafting-compass\",\n\t\t\t\"fas-f6d5\" => \"fas fa-dragon\",\n\t\t\t\"fas-f5ee\" => \"fas fa-draw-polygon\",\n\t\t\t\"fas-f569\" => \"fas fa-drum\",\n\t\t\t\"fas-f56a\" => \"fas fa-drum-steelpan\",\n\t\t\t\"fas-f6d7\" => \"fas fa-drumstick-bite\",\n\t\t\t\"fas-f44b\" => \"fas fa-dumbbell\",\n\t\t\t\"fas-f793\" => \"fas fa-dumpster\",\n\t\t\t\"fas-f794\" => \"fas fa-dumpster-fire\",\n\t\t\t\"fas-f6d9\" => \"fas fa-dungeon\",\n\t\t\t\"fas-f044\" => \"fas fa-edit\",\n\t\t\t\"fas-f7fb\" => \"fas fa-egg\",\n\t\t\t\"fas-f052\" => \"fas fa-eject\",\n\t\t\t\"fas-f141\" => \"fas fa-ellipsis-h\",\n\t\t\t\"fas-f142\" => \"fas fa-ellipsis-v\",\n\t\t\t\"fas-f0e0\" => \"fas fa-envelope\",\n\t\t\t\"fas-f2b6\" => \"fas fa-envelope-open\",\n\t\t\t\"fas-f658\" => \"fas fa-envelope-open-text\",\n\t\t\t\"fas-f199\" => \"fas fa-envelope-square\",\n\t\t\t\"fas-f52c\" => \"fas fa-equals\",\n\t\t\t\"fas-f12d\" => \"fas fa-eraser\",\n\t\t\t\"fas-f796\" => \"fas fa-ethernet\",\n\t\t\t\"fas-f153\" => \"fas fa-euro-sign\",\n\t\t\t\"fas-f362\" => \"fas fa-exchange-alt\",\n\t\t\t\"fas-f12a\" => \"fas fa-exclamation\",\n\t\t\t\"fas-f06a\" => \"fas fa-exclamation-circle\",\n\t\t\t\"fas-f071\" => \"fas fa-exclamation-triangle\",\n\t\t\t\"fas-f065\" => \"fas fa-expand\",\n\t\t\t\"fas-f424\" => \"fas fa-expand-alt\",\n\t\t\t\"fas-f31e\" => \"fas fa-expand-arrows-alt\",\n\t\t\t\"fas-f35d\" => \"fas fa-external-link-alt\",\n\t\t\t\"fas-f360\" => \"fas fa-external-link-square-alt\",\n\t\t\t\"fas-f06e\" => \"fas fa-eye\",\n\t\t\t\"fas-f1fb\" => \"fas fa-eye-dropper\",\n\t\t\t\"fas-f070\" => \"fas fa-eye-slash\",\n\t\t\t\"fas-f863\" => \"fas fa-fan\",\n\t\t\t\"fas-f049\" => \"fas fa-fast-backward\",\n\t\t\t\"fas-f050\" => \"fas fa-fast-forward\",\n\t\t\t\"fas-f905\" => \"fas fa-faucet\",\n\t\t\t\"fas-f1ac\" => \"fas fa-fax\",\n\t\t\t\"fas-f52d\" => \"fas fa-feather\",\n\t\t\t\"fas-f56b\" => \"fas fa-feather-alt\",\n\t\t\t\"fas-f182\" => \"fas fa-female\",\n\t\t\t\"fas-f0fb\" => \"fas fa-fighter-jet\",\n\t\t\t\"fas-f15b\" => \"fas fa-file\",\n\t\t\t\"fas-f15c\" => \"fas fa-file-alt\",\n\t\t\t\"fas-f1c6\" => \"fas fa-file-archive\",\n\t\t\t\"fas-f1c7\" => \"fas fa-file-audio\",\n\t\t\t\"fas-f1c9\" => \"fas fa-file-code\",\n\t\t\t\"fas-f56c\" => \"fas fa-file-contract\",\n\t\t\t\"fas-f6dd\" => \"fas fa-file-csv\",\n\t\t\t\"fas-f56d\" => \"fas fa-file-download\",\n\t\t\t\"fas-f1c3\" => \"fas fa-file-excel\",\n\t\t\t\"fas-f56e\" => \"fas fa-file-export\",\n\t\t\t\"fas-f1c5\" => \"fas fa-file-image\",\n\t\t\t\"fas-f56f\" => \"fas fa-file-import\",\n\t\t\t\"fas-f570\" => \"fas fa-file-invoice\",\n\t\t\t\"fas-f571\" => \"fas fa-file-invoice-dollar\",\n\t\t\t\"fas-f477\" => \"fas fa-file-medical\",\n\t\t\t\"fas-f478\" => \"fas fa-file-medical-alt\",\n\t\t\t\"fas-f1c1\" => \"fas fa-file-pdf\",\n\t\t\t\"fas-f1c4\" => \"fas fa-file-powerpoint\",\n\t\t\t\"fas-f572\" => \"fas fa-file-prescription\",\n\t\t\t\"fas-f573\" => \"fas fa-file-signature\",\n\t\t\t\"fas-f574\" => \"fas fa-file-upload\",\n\t\t\t\"fas-f1c8\" => \"fas fa-file-video\",\n\t\t\t\"fas-f1c2\" => \"fas fa-file-word\",\n\t\t\t\"fas-f575\" => \"fas fa-fill\",\n\t\t\t\"fas-f576\" => \"fas fa-fill-drip\",\n\t\t\t\"fas-f008\" => \"fas fa-film\",\n\t\t\t\"fas-f0b0\" => \"fas fa-filter\",\n\t\t\t\"fas-f577\" => \"fas fa-fingerprint\",\n\t\t\t\"fas-f06d\" => \"fas fa-fire\",\n\t\t\t\"fas-f7e4\" => \"fas fa-fire-alt\",\n\t\t\t\"fas-f134\" => \"fas fa-fire-extinguisher\",\n\t\t\t\"fas-f479\" => \"fas fa-first-aid\",\n\t\t\t\"fas-f578\" => \"fas fa-fish\",\n\t\t\t\"fas-f6de\" => \"fas fa-fist-raised\",\n\t\t\t\"fas-f024\" => \"fas fa-flag\",\n\t\t\t\"fas-f11e\" => \"fas fa-flag-checkered\",\n\t\t\t\"fas-f74d\" => \"fas fa-flag-usa\",\n\t\t\t\"fas-f0c3\" => \"fas fa-flask\",\n\t\t\t\"fas-f579\" => \"fas fa-flushed\",\n\t\t\t\"fas-f07b\" => \"fas fa-folder\",\n\t\t\t\"fas-f65d\" => \"fas fa-folder-minus\",\n\t\t\t\"fas-f07c\" => \"fas fa-folder-open\",\n\t\t\t\"fas-f65e\" => \"fas fa-folder-plus\",\n\t\t\t\"fas-f031\" => \"fas fa-font\",\n\t\t\t\"fas-f44e\" => \"fas fa-football-ball\",\n\t\t\t\"fas-f04e\" => \"fas fa-forward\",\n\t\t\t\"fas-f52e\" => \"fas fa-frog\",\n\t\t\t\"fas-f119\" => \"fas fa-frown\",\n\t\t\t\"fas-f57a\" => \"fas fa-frown-open\",\n\t\t\t\"fas-f662\" => \"fas fa-funnel-dollar\",\n\t\t\t\"fas-f1e3\" => \"fas fa-futbol\",\n\t\t\t\"fas-f11b\" => \"fas fa-gamepad\",\n\t\t\t\"fas-f52f\" => \"fas fa-gas-pump\",\n\t\t\t\"fas-f0e3\" => \"fas fa-gavel\",\n\t\t\t\"fas-f3a5\" => \"fas fa-gem\",\n\t\t\t\"fas-f22d\" => \"fas fa-genderless\",\n\t\t\t\"fas-f6e2\" => \"fas fa-ghost\",\n\t\t\t\"fas-f06b\" => \"fas fa-gift\",\n\t\t\t\"fas-f79c\" => \"fas fa-gifts\",\n\t\t\t\"fas-f79f\" => \"fas fa-glass-cheers\",\n\t\t\t\"fas-f000\" => \"fas fa-glass-martini\",\n\t\t\t\"fas-f57b\" => \"fas fa-glass-martini-alt\",\n\t\t\t\"fas-f7a0\" => \"fas fa-glass-whiskey\",\n\t\t\t\"fas-f530\" => \"fas fa-glasses\",\n\t\t\t\"fas-f0ac\" => \"fas fa-globe\",\n\t\t\t\"fas-f57c\" => \"fas fa-globe-africa\",\n\t\t\t\"fas-f57d\" => \"fas fa-globe-americas\",\n\t\t\t\"fas-f57e\" => \"fas fa-globe-asia\",\n\t\t\t\"fas-f7a2\" => \"fas fa-globe-europe\",\n\t\t\t\"fas-f450\" => \"fas fa-golf-ball\",\n\t\t\t\"fas-f664\" => \"fas fa-gopuram\",\n\t\t\t\"fas-f19d\" => \"fas fa-graduation-cap\",\n\t\t\t\"fas-f531\" => \"fas fa-greater-than\",\n\t\t\t\"fas-f532\" => \"fas fa-greater-than-equal\",\n\t\t\t\"fas-f57f\" => \"fas fa-grimace\",\n\t\t\t\"fas-f580\" => \"fas fa-grin\",\n\t\t\t\"fas-f581\" => \"fas fa-grin-alt\",\n\t\t\t\"fas-f582\" => \"fas fa-grin-beam\",\n\t\t\t\"fas-f583\" => \"fas fa-grin-beam-sweat\",\n\t\t\t\"fas-f584\" => \"fas fa-grin-hearts\",\n\t\t\t\"fas-f585\" => \"fas fa-grin-squint\",\n\t\t\t\"fas-f586\" => \"fas fa-grin-squint-tears\",\n\t\t\t\"fas-f587\" => \"fas fa-grin-stars\",\n\t\t\t\"fas-f588\" => \"fas fa-grin-tears\",\n\t\t\t\"fas-f589\" => \"fas fa-grin-tongue\",\n\t\t\t\"fas-f58a\" => \"fas fa-grin-tongue-squint\",\n\t\t\t\"fas-f58b\" => \"fas fa-grin-tongue-wink\",\n\t\t\t\"fas-f58c\" => \"fas fa-grin-wink\",\n\t\t\t\"fas-f58d\" => \"fas fa-grip-horizontal\",\n\t\t\t\"fas-f7a4\" => \"fas fa-grip-lines\",\n\t\t\t\"fas-f7a5\" => \"fas fa-grip-lines-vertical\",\n\t\t\t\"fas-f58e\" => \"fas fa-grip-vertical\",\n\t\t\t\"fas-f7a6\" => \"fas fa-guitar\",\n\t\t\t\"fas-f0fd\" => \"fas fa-h-square\",\n\t\t\t\"fas-f805\" => \"fas fa-hamburger\",\n\t\t\t\"fas-f6e3\" => \"fas fa-hammer\",\n\t\t\t\"fas-f665\" => \"fas fa-hamsa\",\n\t\t\t\"fas-f4bd\" => \"fas fa-hand-holding\",\n\t\t\t\"fas-f4be\" => \"fas fa-hand-holding-heart\",\n\t\t\t\"fas-f95c\" => \"fas fa-hand-holding-medical\",\n\t\t\t\"fas-f4c0\" => \"fas fa-hand-holding-usd\",\n\t\t\t\"fas-f4c1\" => \"fas fa-hand-holding-water\",\n\t\t\t\"fas-f258\" => \"fas fa-hand-lizard\",\n\t\t\t\"fas-f806\" => \"fas fa-hand-middle-finger\",\n\t\t\t\"fas-f256\" => \"fas fa-hand-paper\",\n\t\t\t\"fas-f25b\" => \"fas fa-hand-peace\",\n\t\t\t\"fas-f0a7\" => \"fas fa-hand-point-down\",\n\t\t\t\"fas-f0a5\" => \"fas fa-hand-point-left\",\n\t\t\t\"fas-f0a4\" => \"fas fa-hand-point-right\",\n\t\t\t\"fas-f0a6\" => \"fas fa-hand-point-up\",\n\t\t\t\"fas-f25a\" => \"fas fa-hand-pointer\",\n\t\t\t\"fas-f255\" => \"fas fa-hand-rock\",\n\t\t\t\"fas-f257\" => \"fas fa-hand-scissors\",\n\t\t\t\"fas-f95d\" => \"fas fa-hand-sparkles\",\n\t\t\t\"fas-f259\" => \"fas fa-hand-spock\",\n\t\t\t\"fas-f4c2\" => \"fas fa-hands\",\n\t\t\t\"fas-f4c4\" => \"fas fa-hands-helping\",\n\t\t\t\"fas-f95e\" => \"fas fa-hands-wash\",\n\t\t\t\"fas-f2b5\" => \"fas fa-handshake\",\n\t\t\t\"fas-f95f\" => \"fas fa-handshake-alt-slash\",\n\t\t\t\"fas-f960\" => \"fas fa-handshake-slash\",\n\t\t\t\"fas-f6e6\" => \"fas fa-hanukiah\",\n\t\t\t\"fas-f807\" => \"fas fa-hard-hat\",\n\t\t\t\"fas-f292\" => \"fas fa-hashtag\",\n\t\t\t\"fas-f8c0\" => \"fas fa-hat-cowboy\",\n\t\t\t\"fas-f8c1\" => \"fas fa-hat-cowboy-side\",\n\t\t\t\"fas-f6e8\" => \"fas fa-hat-wizard\",\n\t\t\t\"fas-f0a0\" => \"fas fa-hdd\",\n\t\t\t\"fas-f961\" => \"fas fa-head-side-cough\",\n\t\t\t\"fas-f962\" => \"fas fa-head-side-cough-slash\",\n\t\t\t\"fas-f963\" => \"fas fa-head-side-mask\",\n\t\t\t\"fas-f964\" => \"fas fa-head-side-virus\",\n\t\t\t\"fas-f1dc\" => \"fas fa-heading\",\n\t\t\t\"fas-f025\" => \"fas fa-headphones\",\n\t\t\t\"fas-f58f\" => \"fas fa-headphones-alt\",\n\t\t\t\"fas-f590\" => \"fas fa-headset\",\n\t\t\t\"fas-f004\" => \"fas fa-heart\",\n\t\t\t\"fas-f7a9\" => \"fas fa-heart-broken\",\n\t\t\t\"fas-f21e\" => \"fas fa-heartbeat\",\n\t\t\t\"fas-f533\" => \"fas fa-helicopter\",\n\t\t\t\"fas-f591\" => \"fas fa-highlighter\",\n\t\t\t\"fas-f6ec\" => \"fas fa-hiking\",\n\t\t\t\"fas-f6ed\" => \"fas fa-hippo\",\n\t\t\t\"fas-f1da\" => \"fas fa-history\",\n\t\t\t\"fas-f453\" => \"fas fa-hockey-puck\",\n\t\t\t\"fas-f7aa\" => \"fas fa-holly-berry\",\n\t\t\t\"fas-f015\" => \"fas fa-home\",\n\t\t\t\"fas-f6f0\" => \"fas fa-horse\",\n\t\t\t\"fas-f7ab\" => \"fas fa-horse-head\",\n\t\t\t\"fas-f0f8\" => \"fas fa-hospital\",\n\t\t\t\"fas-f47d\" => \"fas fa-hospital-alt\",\n\t\t\t\"fas-f47e\" => \"fas fa-hospital-symbol\",\n\t\t\t\"fas-f80d\" => \"fas fa-hospital-user\",\n\t\t\t\"fas-f593\" => \"fas fa-hot-tub\",\n\t\t\t\"fas-f80f\" => \"fas fa-hotdog\",\n\t\t\t\"fas-f594\" => \"fas fa-hotel\",\n\t\t\t\"fas-f254\" => \"fas fa-hourglass\",\n\t\t\t\"fas-f253\" => \"fas fa-hourglass-end\",\n\t\t\t\"fas-f252\" => \"fas fa-hourglass-half\",\n\t\t\t\"fas-f251\" => \"fas fa-hourglass-start\",\n\t\t\t\"fas-f6f1\" => \"fas fa-house-damage\",\n\t\t\t\"fas-f965\" => \"fas fa-house-user\",\n\t\t\t\"fas-f6f2\" => \"fas fa-hryvnia\",\n\t\t\t\"fas-f246\" => \"fas fa-i-cursor\",\n\t\t\t\"fas-f810\" => \"fas fa-ice-cream\",\n\t\t\t\"fas-f7ad\" => \"fas fa-icicles\",\n\t\t\t\"fas-f86d\" => \"fas fa-icons\",\n\t\t\t\"fas-f2c1\" => \"fas fa-id-badge\",\n\t\t\t\"fas-f2c2\" => \"fas fa-id-card\",\n\t\t\t\"fas-f47f\" => \"fas fa-id-card-alt\",\n\t\t\t\"fas-f7ae\" => \"fas fa-igloo\",\n\t\t\t\"fas-f03e\" => \"fas fa-image\",\n\t\t\t\"fas-f302\" => \"fas fa-images\",\n\t\t\t\"fas-f01c\" => \"fas fa-inbox\",\n\t\t\t\"fas-f03c\" => \"fas fa-indent\",\n\t\t\t\"fas-f275\" => \"fas fa-industry\",\n\t\t\t\"fas-f534\" => \"fas fa-infinity\",\n\t\t\t\"fas-f129\" => \"fas fa-info\",\n\t\t\t\"fas-f05a\" => \"fas fa-info-circle\",\n\t\t\t\"fas-f033\" => \"fas fa-italic\",\n\t\t\t\"fas-f669\" => \"fas fa-jedi\",\n\t\t\t\"fas-f595\" => \"fas fa-joint\",\n\t\t\t\"fas-f66a\" => \"fas fa-journal-whills\",\n\t\t\t\"fas-f66b\" => \"fas fa-kaaba\",\n\t\t\t\"fas-f084\" => \"fas fa-key\",\n\t\t\t\"fas-f11c\" => \"fas fa-keyboard\",\n\t\t\t\"fas-f66d\" => \"fas fa-khanda\",\n\t\t\t\"fas-f596\" => \"fas fa-kiss\",\n\t\t\t\"fas-f597\" => \"fas fa-kiss-beam\",\n\t\t\t\"fas-f598\" => \"fas fa-kiss-wink-heart\",\n\t\t\t\"fas-f535\" => \"fas fa-kiwi-bird\",\n\t\t\t\"fas-f66f\" => \"fas fa-landmark\",\n\t\t\t\"fas-f1ab\" => \"fas fa-language\",\n\t\t\t\"fas-f109\" => \"fas fa-laptop\",\n\t\t\t\"fas-f5fc\" => \"fas fa-laptop-code\",\n\t\t\t\"fas-f966\" => \"fas fa-laptop-house\",\n\t\t\t\"fas-f812\" => \"fas fa-laptop-medical\",\n\t\t\t\"fas-f599\" => \"fas fa-laugh\",\n\t\t\t\"fas-f59a\" => \"fas fa-laugh-beam\",\n\t\t\t\"fas-f59b\" => \"fas fa-laugh-squint\",\n\t\t\t\"fas-f59c\" => \"fas fa-laugh-wink\",\n\t\t\t\"fas-f5fd\" => \"fas fa-layer-group\",\n\t\t\t\"fas-f06c\" => \"fas fa-leaf\",\n\t\t\t\"fas-f094\" => \"fas fa-lemon\",\n\t\t\t\"fas-f536\" => \"fas fa-less-than\",\n\t\t\t\"fas-f537\" => \"fas fa-less-than-equal\",\n\t\t\t\"fas-f3be\" => \"fas fa-level-down-alt\",\n\t\t\t\"fas-f3bf\" => \"fas fa-level-up-alt\",\n\t\t\t\"fas-f1cd\" => \"fas fa-life-ring\",\n\t\t\t\"fas-f0eb\" => \"fas fa-lightbulb\",\n\t\t\t\"fas-f0c1\" => \"fas fa-link\",\n\t\t\t\"fas-f195\" => \"fas fa-lira-sign\",\n\t\t\t\"fas-f03a\" => \"fas fa-list\",\n\t\t\t\"fas-f022\" => \"fas fa-list-alt\",\n\t\t\t\"fas-f0cb\" => \"fas fa-list-ol\",\n\t\t\t\"fas-f0ca\" => \"fas fa-list-ul\",\n\t\t\t\"fas-f124\" => \"fas fa-location-arrow\",\n\t\t\t\"fas-f023\" => \"fas fa-lock\",\n\t\t\t\"fas-f3c1\" => \"fas fa-lock-open\",\n\t\t\t\"fas-f309\" => \"fas fa-long-arrow-alt-down\",\n\t\t\t\"fas-f30a\" => \"fas fa-long-arrow-alt-left\",\n\t\t\t\"fas-f30b\" => \"fas fa-long-arrow-alt-right\",\n\t\t\t\"fas-f30c\" => \"fas fa-long-arrow-alt-up\",\n\t\t\t\"fas-f2a8\" => \"fas fa-low-vision\",\n\t\t\t\"fas-f59d\" => \"fas fa-luggage-cart\",\n\t\t\t\"fas-f604\" => \"fas fa-lungs\",\n\t\t\t\"fas-f967\" => \"fas fa-lungs-virus\",\n\t\t\t\"fas-f0d0\" => \"fas fa-magic\",\n\t\t\t\"fas-f076\" => \"fas fa-magnet\",\n\t\t\t\"fas-f674\" => \"fas fa-mail-bulk\",\n\t\t\t\"fas-f183\" => \"fas fa-male\",\n\t\t\t\"fas-f279\" => \"fas fa-map\",\n\t\t\t\"fas-f59f\" => \"fas fa-map-marked\",\n\t\t\t\"fas-f5a0\" => \"fas fa-map-marked-alt\",\n\t\t\t\"fas-f041\" => \"fas fa-map-marker\",\n\t\t\t\"fas-f3c5\" => \"fas fa-map-marker-alt\",\n\t\t\t\"fas-f276\" => \"fas fa-map-pin\",\n\t\t\t\"fas-f277\" => \"fas fa-map-signs\",\n\t\t\t\"fas-f5a1\" => \"fas fa-marker\",\n\t\t\t\"fas-f222\" => \"fas fa-mars\",\n\t\t\t\"fas-f227\" => \"fas fa-mars-double\",\n\t\t\t\"fas-f229\" => \"fas fa-mars-stroke\",\n\t\t\t\"fas-f22b\" => \"fas fa-mars-stroke-h\",\n\t\t\t\"fas-f22a\" => \"fas fa-mars-stroke-v\",\n\t\t\t\"fas-f6fa\" => \"fas fa-mask\",\n\t\t\t\"fas-f5a2\" => \"fas fa-medal\",\n\t\t\t\"fas-f0fa\" => \"fas fa-medkit\",\n\t\t\t\"fas-f11a\" => \"fas fa-meh\",\n\t\t\t\"fas-f5a4\" => \"fas fa-meh-blank\",\n\t\t\t\"fas-f5a5\" => \"fas fa-meh-rolling-eyes\",\n\t\t\t\"fas-f538\" => \"fas fa-memory\",\n\t\t\t\"fas-f676\" => \"fas fa-menorah\",\n\t\t\t\"fas-f223\" => \"fas fa-mercury\",\n\t\t\t\"fas-f753\" => \"fas fa-meteor\",\n\t\t\t\"fas-f2db\" => \"fas fa-microchip\",\n\t\t\t\"fas-f130\" => \"fas fa-microphone\",\n\t\t\t\"fas-f3c9\" => \"fas fa-microphone-alt\",\n\t\t\t\"fas-f539\" => \"fas fa-microphone-alt-slash\",\n\t\t\t\"fas-f131\" => \"fas fa-microphone-slash\",\n\t\t\t\"fas-f610\" => \"fas fa-microscope\",\n\t\t\t\"fas-f068\" => \"fas fa-minus\",\n\t\t\t\"fas-f056\" => \"fas fa-minus-circle\",\n\t\t\t\"fas-f146\" => \"fas fa-minus-square\",\n\t\t\t\"fas-f7b5\" => \"fas fa-mitten\",\n\t\t\t\"fas-f10b\" => \"fas fa-mobile\",\n\t\t\t\"fas-f3cd\" => \"fas fa-mobile-alt\",\n\t\t\t\"fas-f0d6\" => \"fas fa-money-bill\",\n\t\t\t\"fas-f3d1\" => \"fas fa-money-bill-alt\",\n\t\t\t\"fas-f53a\" => \"fas fa-money-bill-wave\",\n\t\t\t\"fas-f53b\" => \"fas fa-money-bill-wave-alt\",\n\t\t\t\"fas-f53c\" => \"fas fa-money-check\",\n\t\t\t\"fas-f53d\" => \"fas fa-money-check-alt\",\n\t\t\t\"fas-f5a6\" => \"fas fa-monument\",\n\t\t\t\"fas-f186\" => \"fas fa-moon\",\n\t\t\t\"fas-f5a7\" => \"fas fa-mortar-pestle\",\n\t\t\t\"fas-f678\" => \"fas fa-mosque\",\n\t\t\t\"fas-f21c\" => \"fas fa-motorcycle\",\n\t\t\t\"fas-f6fc\" => \"fas fa-mountain\",\n\t\t\t\"fas-f8cc\" => \"fas fa-mouse\",\n\t\t\t\"fas-f245\" => \"fas fa-mouse-pointer\",\n\t\t\t\"fas-f7b6\" => \"fas fa-mug-hot\",\n\t\t\t\"fas-f001\" => \"fas fa-music\",\n\t\t\t\"fas-f6ff\" => \"fas fa-network-wired\",\n\t\t\t\"fas-f22c\" => \"fas fa-neuter\",\n\t\t\t\"fas-f1ea\" => \"fas fa-newspaper\",\n\t\t\t\"fas-f53e\" => \"fas fa-not-equal\",\n\t\t\t\"fas-f481\" => \"fas fa-notes-medical\",\n\t\t\t\"fas-f247\" => \"fas fa-object-group\",\n\t\t\t\"fas-f248\" => \"fas fa-object-ungroup\",\n\t\t\t\"fas-f613\" => \"fas fa-oil-can\",\n\t\t\t\"fas-f679\" => \"fas fa-om\",\n\t\t\t\"fas-f700\" => \"fas fa-otter\",\n\t\t\t\"fas-f03b\" => \"fas fa-outdent\",\n\t\t\t\"fas-f815\" => \"fas fa-pager\",\n\t\t\t\"fas-f1fc\" => \"fas fa-paint-brush\",\n\t\t\t\"fas-f5aa\" => \"fas fa-paint-roller\",\n\t\t\t\"fas-f53f\" => \"fas fa-palette\",\n\t\t\t\"fas-f482\" => \"fas fa-pallet\",\n\t\t\t\"fas-f1d8\" => \"fas fa-paper-plane\",\n\t\t\t\"fas-f0c6\" => \"fas fa-paperclip\",\n\t\t\t\"fas-f4cd\" => \"fas fa-parachute-box\",\n\t\t\t\"fas-f1dd\" => \"fas fa-paragraph\",\n\t\t\t\"fas-f540\" => \"fas fa-parking\",\n\t\t\t\"fas-f5ab\" => \"fas fa-passport\",\n\t\t\t\"fas-f67b\" => \"fas fa-pastafarianism\",\n\t\t\t\"fas-f0ea\" => \"fas fa-paste\",\n\t\t\t\"fas-f04c\" => \"fas fa-pause\",\n\t\t\t\"fas-f28b\" => \"fas fa-pause-circle\",\n\t\t\t\"fas-f1b0\" => \"fas fa-paw\",\n\t\t\t\"fas-f67c\" => \"fas fa-peace\",\n\t\t\t\"fas-f304\" => \"fas fa-pen\",\n\t\t\t\"fas-f305\" => \"fas fa-pen-alt\",\n\t\t\t\"fas-f5ac\" => \"fas fa-pen-fancy\",\n\t\t\t\"fas-f5ad\" => \"fas fa-pen-nib\",\n\t\t\t\"fas-f14b\" => \"fas fa-pen-square\",\n\t\t\t\"fas-f303\" => \"fas fa-pencil-alt\",\n\t\t\t\"fas-f5ae\" => \"fas fa-pencil-ruler\",\n\t\t\t\"fas-f968\" => \"fas fa-people-arrows\",\n\t\t\t\"fas-f4ce\" => \"fas fa-people-carry\",\n\t\t\t\"fas-f816\" => \"fas fa-pepper-hot\",\n\t\t\t\"fas-f295\" => \"fas fa-percent\",\n\t\t\t\"fas-f541\" => \"fas fa-percentage\",\n\t\t\t\"fas-f756\" => \"fas fa-person-booth\",\n\t\t\t\"fas-f095\" => \"fas fa-phone\",\n\t\t\t\"fas-f879\" => \"fas fa-phone-alt\",\n\t\t\t\"fas-f3dd\" => \"fas fa-phone-slash\",\n\t\t\t\"fas-f098\" => \"fas fa-phone-square\",\n\t\t\t\"fas-f87b\" => \"fas fa-phone-square-alt\",\n\t\t\t\"fas-f2a0\" => \"fas fa-phone-volume\",\n\t\t\t\"fas-f87c\" => \"fas fa-photo-video\",\n\t\t\t\"fas-f4d3\" => \"fas fa-piggy-bank\",\n\t\t\t\"fas-f484\" => \"fas fa-pills\",\n\t\t\t\"fas-f818\" => \"fas fa-pizza-slice\",\n\t\t\t\"fas-f67f\" => \"fas fa-place-of-worship\",\n\t\t\t\"fas-f072\" => \"fas fa-plane\",\n\t\t\t\"fas-f5af\" => \"fas fa-plane-arrival\",\n\t\t\t\"fas-f5b0\" => \"fas fa-plane-departure\",\n\t\t\t\"fas-f969\" => \"fas fa-plane-slash\",\n\t\t\t\"fas-f04b\" => \"fas fa-play\",\n\t\t\t\"fas-f144\" => \"fas fa-play-circle\",\n\t\t\t\"fas-f1e6\" => \"fas fa-plug\",\n\t\t\t\"fas-f067\" => \"fas fa-plus\",\n\t\t\t\"fas-f055\" => \"fas fa-plus-circle\",\n\t\t\t\"fas-f0fe\" => \"fas fa-plus-square\",\n\t\t\t\"fas-f2ce\" => \"fas fa-podcast\",\n\t\t\t\"fas-f681\" => \"fas fa-poll\",\n\t\t\t\"fas-f682\" => \"fas fa-poll-h\",\n\t\t\t\"fas-f2fe\" => \"fas fa-poo\",\n\t\t\t\"fas-f75a\" => \"fas fa-poo-storm\",\n\t\t\t\"fas-f619\" => \"fas fa-poop\",\n\t\t\t\"fas-f3e0\" => \"fas fa-portrait\",\n\t\t\t\"fas-f154\" => \"fas fa-pound-sign\",\n\t\t\t\"fas-f011\" => \"fas fa-power-off\",\n\t\t\t\"fas-f683\" => \"fas fa-pray\",\n\t\t\t\"fas-f684\" => \"fas fa-praying-hands\",\n\t\t\t\"fas-f5b1\" => \"fas fa-prescription\",\n\t\t\t\"fas-f485\" => \"fas fa-prescription-bottle\",\n\t\t\t\"fas-f486\" => \"fas fa-prescription-bottle-alt\",\n\t\t\t\"fas-f02f\" => \"fas fa-print\",\n\t\t\t\"fas-f487\" => \"fas fa-procedures\",\n\t\t\t\"fas-f542\" => \"fas fa-project-diagram\",\n\t\t\t\"fas-f96a\" => \"fas fa-pump-medical\",\n\t\t\t\"fas-f96b\" => \"fas fa-pump-soap\",\n\t\t\t\"fas-f12e\" => \"fas fa-puzzle-piece\",\n\t\t\t\"fas-f029\" => \"fas fa-qrcode\",\n\t\t\t\"fas-f128\" => \"fas fa-question\",\n\t\t\t\"fas-f059\" => \"fas fa-question-circle\",\n\t\t\t\"fas-f458\" => \"fas fa-quidditch\",\n\t\t\t\"fas-f10d\" => \"fas fa-quote-left\",\n\t\t\t\"fas-f10e\" => \"fas fa-quote-right\",\n\t\t\t\"fas-f687\" => \"fas fa-quran\",\n\t\t\t\"fas-f7b9\" => \"fas fa-radiation\",\n\t\t\t\"fas-f7ba\" => \"fas fa-radiation-alt\",\n\t\t\t\"fas-f75b\" => \"fas fa-rainbow\",\n\t\t\t\"fas-f074\" => \"fas fa-random\",\n\t\t\t\"fas-f543\" => \"fas fa-receipt\",\n\t\t\t\"fas-f8d9\" => \"fas fa-record-vinyl\",\n\t\t\t\"fas-f1b8\" => \"fas fa-recycle\",\n\t\t\t\"fas-f01e\" => \"fas fa-redo\",\n\t\t\t\"fas-f2f9\" => \"fas fa-redo-alt\",\n\t\t\t\"fas-f25d\" => \"fas fa-registered\",\n\t\t\t\"fas-f87d\" => \"fas fa-remove-format\",\n\t\t\t\"fas-f3e5\" => \"fas fa-reply\",\n\t\t\t\"fas-f122\" => \"fas fa-reply-all\",\n\t\t\t\"fas-f75e\" => \"fas fa-republican\",\n\t\t\t\"fas-f7bd\" => \"fas fa-restroom\",\n\t\t\t\"fas-f079\" => \"fas fa-retweet\",\n\t\t\t\"fas-f4d6\" => \"fas fa-ribbon\",\n\t\t\t\"fas-f70b\" => \"fas fa-ring\",\n\t\t\t\"fas-f018\" => \"fas fa-road\",\n\t\t\t\"fas-f544\" => \"fas fa-robot\",\n\t\t\t\"fas-f135\" => \"fas fa-rocket\",\n\t\t\t\"fas-f4d7\" => \"fas fa-route\",\n\t\t\t\"fas-f09e\" => \"fas fa-rss\",\n\t\t\t\"fas-f143\" => \"fas fa-rss-square\",\n\t\t\t\"fas-f158\" => \"fas fa-ruble-sign\",\n\t\t\t\"fas-f545\" => \"fas fa-ruler\",\n\t\t\t\"fas-f546\" => \"fas fa-ruler-combined\",\n\t\t\t\"fas-f547\" => \"fas fa-ruler-horizontal\",\n\t\t\t\"fas-f548\" => \"fas fa-ruler-vertical\",\n\t\t\t\"fas-f70c\" => \"fas fa-running\",\n\t\t\t\"fas-f156\" => \"fas fa-rupee-sign\",\n\t\t\t\"fas-f5b3\" => \"fas fa-sad-cry\",\n\t\t\t\"fas-f5b4\" => \"fas fa-sad-tear\",\n\t\t\t\"fas-f7bf\" => \"fas fa-satellite\",\n\t\t\t\"fas-f7c0\" => \"fas fa-satellite-dish\",\n\t\t\t\"fas-f0c7\" => \"fas fa-save\",\n\t\t\t\"fas-f549\" => \"fas fa-school\",\n\t\t\t\"fas-f54a\" => \"fas fa-screwdriver\",\n\t\t\t\"fas-f70e\" => \"fas fa-scroll\",\n\t\t\t\"fas-f7c2\" => \"fas fa-sd-card\",\n\t\t\t\"fas-f002\" => \"fas fa-search\",\n\t\t\t\"fas-f688\" => \"fas fa-search-dollar\",\n\t\t\t\"fas-f689\" => \"fas fa-search-location\",\n\t\t\t\"fas-f010\" => \"fas fa-search-minus\",\n\t\t\t\"fas-f00e\" => \"fas fa-search-plus\",\n\t\t\t\"fas-f4d8\" => \"fas fa-seedling\",\n\t\t\t\"fas-f233\" => \"fas fa-server\",\n\t\t\t\"fas-f61f\" => \"fas fa-shapes\",\n\t\t\t\"fas-f064\" => \"fas fa-share\",\n\t\t\t\"fas-f1e0\" => \"fas fa-share-alt\",\n\t\t\t\"fas-f1e1\" => \"fas fa-share-alt-square\",\n\t\t\t\"fas-f14d\" => \"fas fa-share-square\",\n\t\t\t\"fas-f20b\" => \"fas fa-shekel-sign\",\n\t\t\t\"fas-f3ed\" => \"fas fa-shield-alt\",\n\t\t\t\"fas-f96c\" => \"fas fa-shield-virus\",\n\t\t\t\"fas-f21a\" => \"fas fa-ship\",\n\t\t\t\"fas-f48b\" => \"fas fa-shipping-fast\",\n\t\t\t\"fas-f54b\" => \"fas fa-shoe-prints\",\n\t\t\t\"fas-f290\" => \"fas fa-shopping-bag\",\n\t\t\t\"fas-f291\" => \"fas fa-shopping-basket\",\n\t\t\t\"fas-f07a\" => \"fas fa-shopping-cart\",\n\t\t\t\"fas-f2cc\" => \"fas fa-shower\",\n\t\t\t\"fas-f5b6\" => \"fas fa-shuttle-van\",\n\t\t\t\"fas-f4d9\" => \"fas fa-sign\",\n\t\t\t\"fas-f2f6\" => \"fas fa-sign-in-alt\",\n\t\t\t\"fas-f2a7\" => \"fas fa-sign-language\",\n\t\t\t\"fas-f2f5\" => \"fas fa-sign-out-alt\",\n\t\t\t\"fas-f012\" => \"fas fa-signal\",\n\t\t\t\"fas-f5b7\" => \"fas fa-signature\",\n\t\t\t\"fas-f7c4\" => \"fas fa-sim-card\",\n\t\t\t\"fas-f0e8\" => \"fas fa-sitemap\",\n\t\t\t\"fas-f7c5\" => \"fas fa-skating\",\n\t\t\t\"fas-f7c9\" => \"fas fa-skiing\",\n\t\t\t\"fas-f7ca\" => \"fas fa-skiing-nordic\",\n\t\t\t\"fas-f54c\" => \"fas fa-skull\",\n\t\t\t\"fas-f714\" => \"fas fa-skull-crossbones\",\n\t\t\t\"fas-f715\" => \"fas fa-slash\",\n\t\t\t\"fas-f7cc\" => \"fas fa-sleigh\",\n\t\t\t\"fas-f1de\" => \"fas fa-sliders-h\",\n\t\t\t\"fas-f118\" => \"fas fa-smile\",\n\t\t\t\"fas-f5b8\" => \"fas fa-smile-beam\",\n\t\t\t\"fas-f4da\" => \"fas fa-smile-wink\",\n\t\t\t\"fas-f75f\" => \"fas fa-smog\",\n\t\t\t\"fas-f48d\" => \"fas fa-smoking\",\n\t\t\t\"fas-f54d\" => \"fas fa-smoking-ban\",\n\t\t\t\"fas-f7cd\" => \"fas fa-sms\",\n\t\t\t\"fas-f7ce\" => \"fas fa-snowboarding\",\n\t\t\t\"fas-f2dc\" => \"fas fa-snowflake\",\n\t\t\t\"fas-f7d0\" => \"fas fa-snowman\",\n\t\t\t\"fas-f7d2\" => \"fas fa-snowplow\",\n\t\t\t\"fas-f96e\" => \"fas fa-soap\",\n\t\t\t\"fas-f696\" => \"fas fa-socks\",\n\t\t\t\"fas-f5ba\" => \"fas fa-solar-panel\",\n\t\t\t\"fas-f0dc\" => \"fas fa-sort\",\n\t\t\t\"fas-f15d\" => \"fas fa-sort-alpha-down\",\n\t\t\t\"fas-f881\" => \"fas fa-sort-alpha-down-alt\",\n\t\t\t\"fas-f15e\" => \"fas fa-sort-alpha-up\",\n\t\t\t\"fas-f882\" => \"fas fa-sort-alpha-up-alt\",\n\t\t\t\"fas-f160\" => \"fas fa-sort-amount-down\",\n\t\t\t\"fas-f884\" => \"fas fa-sort-amount-down-alt\",\n\t\t\t\"fas-f161\" => \"fas fa-sort-amount-up\",\n\t\t\t\"fas-f885\" => \"fas fa-sort-amount-up-alt\",\n\t\t\t\"fas-f0dd\" => \"fas fa-sort-down\",\n\t\t\t\"fas-f162\" => \"fas fa-sort-numeric-down\",\n\t\t\t\"fas-f886\" => \"fas fa-sort-numeric-down-alt\",\n\t\t\t\"fas-f163\" => \"fas fa-sort-numeric-up\",\n\t\t\t\"fas-f887\" => \"fas fa-sort-numeric-up-alt\",\n\t\t\t\"fas-f0de\" => \"fas fa-sort-up\",\n\t\t\t\"fas-f5bb\" => \"fas fa-spa\",\n\t\t\t\"fas-f197\" => \"fas fa-space-shuttle\",\n\t\t\t\"fas-f891\" => \"fas fa-spell-check\",\n\t\t\t\"fas-f717\" => \"fas fa-spider\",\n\t\t\t\"fas-f110\" => \"fas fa-spinner\",\n\t\t\t\"fas-f5bc\" => \"fas fa-splotch\",\n\t\t\t\"fas-f5bd\" => \"fas fa-spray-can\",\n\t\t\t\"fas-f0c8\" => \"fas fa-square\",\n\t\t\t\"fas-f45c\" => \"fas fa-square-full\",\n\t\t\t\"fas-f698\" => \"fas fa-square-root-alt\",\n\t\t\t\"fas-f5bf\" => \"fas fa-stamp\",\n\t\t\t\"fas-f005\" => \"fas fa-star\",\n\t\t\t\"fas-f699\" => \"fas fa-star-and-crescent\",\n\t\t\t\"fas-f089\" => \"fas fa-star-half\",\n\t\t\t\"fas-f5c0\" => \"fas fa-star-half-alt\",\n\t\t\t\"fas-f69a\" => \"fas fa-star-of-david\",\n\t\t\t\"fas-f621\" => \"fas fa-star-of-life\",\n\t\t\t\"fas-f048\" => \"fas fa-step-backward\",\n\t\t\t\"fas-f051\" => \"fas fa-step-forward\",\n\t\t\t\"fas-f0f1\" => \"fas fa-stethoscope\",\n\t\t\t\"fas-f249\" => \"fas fa-sticky-note\",\n\t\t\t\"fas-f04d\" => \"fas fa-stop\",\n\t\t\t\"fas-f28d\" => \"fas fa-stop-circle\",\n\t\t\t\"fas-f2f2\" => \"fas fa-stopwatch\",\n\t\t\t\"fas-f96f\" => \"fas fa-stopwatch-20\",\n\t\t\t\"fas-f54e\" => \"fas fa-store\",\n\t\t\t\"fas-f54f\" => \"fas fa-store-alt\",\n\t\t\t\"fas-f970\" => \"fas fa-store-alt-slash\",\n\t\t\t\"fas-f971\" => \"fas fa-store-slash\",\n\t\t\t\"fas-f550\" => \"fas fa-stream\",\n\t\t\t\"fas-f21d\" => \"fas fa-street-view\",\n\t\t\t\"fas-f0cc\" => \"fas fa-strikethrough\",\n\t\t\t\"fas-f551\" => \"fas fa-stroopwafel\",\n\t\t\t\"fas-f12c\" => \"fas fa-subscript\",\n\t\t\t\"fas-f239\" => \"fas fa-subway\",\n\t\t\t\"fas-f0f2\" => \"fas fa-suitcase\",\n\t\t\t\"fas-f5c1\" => \"fas fa-suitcase-rolling\",\n\t\t\t\"fas-f185\" => \"fas fa-sun\",\n\t\t\t\"fas-f12b\" => \"fas fa-superscript\",\n\t\t\t\"fas-f5c2\" => \"fas fa-surprise\",\n\t\t\t\"fas-f5c3\" => \"fas fa-swatchbook\",\n\t\t\t\"fas-f5c4\" => \"fas fa-swimmer\",\n\t\t\t\"fas-f5c5\" => \"fas fa-swimming-pool\",\n\t\t\t\"fas-f69b\" => \"fas fa-synagogue\",\n\t\t\t\"fas-f021\" => \"fas fa-sync\",\n\t\t\t\"fas-f2f1\" => \"fas fa-sync-alt\",\n\t\t\t\"fas-f48e\" => \"fas fa-syringe\",\n\t\t\t\"fas-f0ce\" => \"fas fa-table\",\n\t\t\t\"fas-f45d\" => \"fas fa-table-tennis\",\n\t\t\t\"fas-f10a\" => \"fas fa-tablet\",\n\t\t\t\"fas-f3fa\" => \"fas fa-tablet-alt\",\n\t\t\t\"fas-f490\" => \"fas fa-tablets\",\n\t\t\t\"fas-f3fd\" => \"fas fa-tachometer-alt\",\n\t\t\t\"fas-f02b\" => \"fas fa-tag\",\n\t\t\t\"fas-f02c\" => \"fas fa-tags\",\n\t\t\t\"fas-f4db\" => \"fas fa-tape\",\n\t\t\t\"fas-f0ae\" => \"fas fa-tasks\",\n\t\t\t\"fas-f1ba\" => \"fas fa-taxi\",\n\t\t\t\"fas-f62e\" => \"fas fa-teeth\",\n\t\t\t\"fas-f62f\" => \"fas fa-teeth-open\",\n\t\t\t\"fas-f769\" => \"fas fa-temperature-high\",\n\t\t\t\"fas-f76b\" => \"fas fa-temperature-low\",\n\t\t\t\"fas-f7d7\" => \"fas fa-tenge\",\n\t\t\t\"fas-f120\" => \"fas fa-terminal\",\n\t\t\t\"fas-f034\" => \"fas fa-text-height\",\n\t\t\t\"fas-f035\" => \"fas fa-text-width\",\n\t\t\t\"fas-f00a\" => \"fas fa-th\",\n\t\t\t\"fas-f009\" => \"fas fa-th-large\",\n\t\t\t\"fas-f00b\" => \"fas fa-th-list\",\n\t\t\t\"fas-f630\" => \"fas fa-theater-masks\",\n\t\t\t\"fas-f491\" => \"fas fa-thermometer\",\n\t\t\t\"fas-f2cb\" => \"fas fa-thermometer-empty\",\n\t\t\t\"fas-f2c7\" => \"fas fa-thermometer-full\",\n\t\t\t\"fas-f2c9\" => \"fas fa-thermometer-half\",\n\t\t\t\"fas-f2ca\" => \"fas fa-thermometer-quarter\",\n\t\t\t\"fas-f2c8\" => \"fas fa-thermometer-three-quarters\",\n\t\t\t\"fas-f165\" => \"fas fa-thumbs-down\",\n\t\t\t\"fas-f164\" => \"fas fa-thumbs-up\",\n\t\t\t\"fas-f08d\" => \"fas fa-thumbtack\",\n\t\t\t\"fas-f3ff\" => \"fas fa-ticket-alt\",\n\t\t\t\"fas-f00d\" => \"fas fa-times\",\n\t\t\t\"fas-f057\" => \"fas fa-times-circle\",\n\t\t\t\"fas-f043\" => \"fas fa-tint\",\n\t\t\t\"fas-f5c7\" => \"fas fa-tint-slash\",\n\t\t\t\"fas-f5c8\" => \"fas fa-tired\",\n\t\t\t\"fas-f204\" => \"fas fa-toggle-off\",\n\t\t\t\"fas-f205\" => \"fas fa-toggle-on\",\n\t\t\t\"fas-f7d8\" => \"fas fa-toilet\",\n\t\t\t\"fas-f71e\" => \"fas fa-toilet-paper\",\n\t\t\t\"fas-f972\" => \"fas fa-toilet-paper-slash\",\n\t\t\t\"fas-f552\" => \"fas fa-toolbox\",\n\t\t\t\"fas-f7d9\" => \"fas fa-tools\",\n\t\t\t\"fas-f5c9\" => \"fas fa-tooth\",\n\t\t\t\"fas-f6a0\" => \"fas fa-torah\",\n\t\t\t\"fas-f6a1\" => \"fas fa-torii-gate\",\n\t\t\t\"fas-f722\" => \"fas fa-tractor\",\n\t\t\t\"fas-f25c\" => \"fas fa-trademark\",\n\t\t\t\"fas-f637\" => \"fas fa-traffic-light\",\n\t\t\t\"fas-f941\" => \"fas fa-trailer\",\n\t\t\t\"fas-f238\" => \"fas fa-train\",\n\t\t\t\"fas-f7da\" => \"fas fa-tram\",\n\t\t\t\"fas-f224\" => \"fas fa-transgender\",\n\t\t\t\"fas-f225\" => \"fas fa-transgender-alt\",\n\t\t\t\"fas-f1f8\" => \"fas fa-trash\",\n\t\t\t\"fas-f2ed\" => \"fas fa-trash-alt\",\n\t\t\t\"fas-f829\" => \"fas fa-trash-restore\",\n\t\t\t\"fas-f82a\" => \"fas fa-trash-restore-alt\",\n\t\t\t\"fas-f1bb\" => \"fas fa-tree\",\n\t\t\t\"fas-f091\" => \"fas fa-trophy\",\n\t\t\t\"fas-f0d1\" => \"fas fa-truck\",\n\t\t\t\"fas-f4de\" => \"fas fa-truck-loading\",\n\t\t\t\"fas-f63b\" => \"fas fa-truck-monster\",\n\t\t\t\"fas-f4df\" => \"fas fa-truck-moving\",\n\t\t\t\"fas-f63c\" => \"fas fa-truck-pickup\",\n\t\t\t\"fas-f553\" => \"fas fa-tshirt\",\n\t\t\t\"fas-f1e4\" => \"fas fa-tty\",\n\t\t\t\"fas-f26c\" => \"fas fa-tv\",\n\t\t\t\"fas-f0e9\" => \"fas fa-umbrella\",\n\t\t\t\"fas-f5ca\" => \"fas fa-umbrella-beach\",\n\t\t\t\"fas-f0cd\" => \"fas fa-underline\",\n\t\t\t\"fas-f0e2\" => \"fas fa-undo\",\n\t\t\t\"fas-f2ea\" => \"fas fa-undo-alt\",\n\t\t\t\"fas-f29a\" => \"fas fa-universal-access\",\n\t\t\t\"fas-f19c\" => \"fas fa-university\",\n\t\t\t\"fas-f127\" => \"fas fa-unlink\",\n\t\t\t\"fas-f09c\" => \"fas fa-unlock\",\n\t\t\t\"fas-f13e\" => \"fas fa-unlock-alt\",\n\t\t\t\"fas-f093\" => \"fas fa-upload\",\n\t\t\t\"fas-f007\" => \"fas fa-user\",\n\t\t\t\"fas-f406\" => \"fas fa-user-alt\",\n\t\t\t\"fas-f4fa\" => \"fas fa-user-alt-slash\",\n\t\t\t\"fas-f4fb\" => \"fas fa-user-astronaut\",\n\t\t\t\"fas-f4fc\" => \"fas fa-user-check\",\n\t\t\t\"fas-f2bd\" => \"fas fa-user-circle\",\n\t\t\t\"fas-f4fd\" => \"fas fa-user-clock\",\n\t\t\t\"fas-f4fe\" => \"fas fa-user-cog\",\n\t\t\t\"fas-f4ff\" => \"fas fa-user-edit\",\n\t\t\t\"fas-f500\" => \"fas fa-user-friends\",\n\t\t\t\"fas-f501\" => \"fas fa-user-graduate\",\n\t\t\t\"fas-f728\" => \"fas fa-user-injured\",\n\t\t\t\"fas-f502\" => \"fas fa-user-lock\",\n\t\t\t\"fas-f0f0\" => \"fas fa-user-md\",\n\t\t\t\"fas-f503\" => \"fas fa-user-minus\",\n\t\t\t\"fas-f504\" => \"fas fa-user-ninja\",\n\t\t\t\"fas-f82f\" => \"fas fa-user-nurse\",\n\t\t\t\"fas-f234\" => \"fas fa-user-plus\",\n\t\t\t\"fas-f21b\" => \"fas fa-user-secret\",\n\t\t\t\"fas-f505\" => \"fas fa-user-shield\",\n\t\t\t\"fas-f506\" => \"fas fa-user-slash\",\n\t\t\t\"fas-f507\" => \"fas fa-user-tag\",\n\t\t\t\"fas-f508\" => \"fas fa-user-tie\",\n\t\t\t\"fas-f235\" => \"fas fa-user-times\",\n\t\t\t\"fas-f0c0\" => \"fas fa-users\",\n\t\t\t\"fas-f509\" => \"fas fa-users-cog\",\n\t\t\t\"fas-f2e5\" => \"fas fa-utensil-spoon\",\n\t\t\t\"fas-f2e7\" => \"fas fa-utensils\",\n\t\t\t\"fas-f5cb\" => \"fas fa-vector-square\",\n\t\t\t\"fas-f221\" => \"fas fa-venus\",\n\t\t\t\"fas-f226\" => \"fas fa-venus-double\",\n\t\t\t\"fas-f228\" => \"fas fa-venus-mars\",\n\t\t\t\"fas-f492\" => \"fas fa-vial\",\n\t\t\t\"fas-f493\" => \"fas fa-vials\",\n\t\t\t\"fas-f03d\" => \"fas fa-video\",\n\t\t\t\"fas-f4e2\" => \"fas fa-video-slash\",\n\t\t\t\"fas-f6a7\" => \"fas fa-vihara\",\n\t\t\t\"fas-f974\" => \"fas fa-virus\",\n\t\t\t\"fas-f975\" => \"fas fa-virus-slash\",\n\t\t\t\"fas-f976\" => \"fas fa-viruses\",\n\t\t\t\"fas-f897\" => \"fas fa-voicemail\",\n\t\t\t\"fas-f45f\" => \"fas fa-volleyball-ball\",\n\t\t\t\"fas-f027\" => \"fas fa-volume-down\",\n\t\t\t\"fas-f6a9\" => \"fas fa-volume-mute\",\n\t\t\t\"fas-f026\" => \"fas fa-volume-off\",\n\t\t\t\"fas-f028\" => \"fas fa-volume-up\",\n\t\t\t\"fas-f772\" => \"fas fa-vote-yea\",\n\t\t\t\"fas-f729\" => \"fas fa-vr-cardboard\",\n\t\t\t\"fas-f554\" => \"fas fa-walking\",\n\t\t\t\"fas-f555\" => \"fas fa-wallet\",\n\t\t\t\"fas-f494\" => \"fas fa-warehouse\",\n\t\t\t\"fas-f773\" => \"fas fa-water\",\n\t\t\t\"fas-f83e\" => \"fas fa-wave-square\",\n\t\t\t\"fas-f496\" => \"fas fa-weight\",\n\t\t\t\"fas-f5cd\" => \"fas fa-weight-hanging\",\n\t\t\t\"fas-f193\" => \"fas fa-wheelchair\",\n\t\t\t\"fas-f1eb\" => \"fas fa-wifi\",\n\t\t\t\"fas-f72e\" => \"fas fa-wind\",\n\t\t\t\"fas-f410\" => \"fas fa-window-close\",\n\t\t\t\"fas-f2d0\" => \"fas fa-window-maximize\",\n\t\t\t\"fas-f2d1\" => \"fas fa-window-minimize\",\n\t\t\t\"fas-f2d2\" => \"fas fa-window-restore\",\n\t\t\t\"fas-f72f\" => \"fas fa-wine-bottle\",\n\t\t\t\"fas-f4e3\" => \"fas fa-wine-glass\",\n\t\t\t\"fas-f5ce\" => \"fas fa-wine-glass-alt\",\n\t\t\t\"fas-f159\" => \"fas fa-won-sign\",\n\t\t\t\"fas-f0ad\" => \"fas fa-wrench\",\n\t\t\t\"fas-f497\" => \"fas fa-x-ray\",\n\t\t\t\"fas-f157\" => \"fas fa-yen-sign\",\n\t\t\t\"fas-f6ad\" => \"fas fa-yin-y\"\n\t\t);\n\n\t\t$regular_icons = array(\t\n\t\t\t\"far-f2b9\" => \"far fa-address-book\",\n\t\t\t\"far-f2bb\" => \"far fa-address-card\",\n\t\t\t\"far-f556\" => \"far fa-angry\",\n\t\t\t\"far-f358\" => \"far fa-arrow-alt-circle-down\",\n\t\t\t\"far-f359\" => \"far fa-arrow-alt-circle-left\",\n\t\t\t\"far-f35a\" => \"far fa-arrow-alt-circle-right\",\n\t\t\t\"far-f35b\" => \"far fa-arrow-alt-circle-up\",\n\t\t\t\"far-f0f3\" => \"far fa-bell\",\n\t\t\t\"far-f1f6\" => \"far fa-bell-slash\",\n\t\t\t\"far-f02e\" => \"far fa-bookmark\",\n\t\t\t\"far-f1ad\" => \"far fa-building\",\n\t\t\t\"far-f133\" => \"far fa-calendar\",\n\t\t\t\"far-f073\" => \"far fa-calendar-alt\",\n\t\t\t\"far-f274\" => \"far fa-calendar-check\",\n\t\t\t\"far-f272\" => \"far fa-calendar-minus\",\n\t\t\t\"far-f271\" => \"far fa-calendar-plus\",\n\t\t\t\"far-f273\" => \"far fa-calendar-times\",\n\t\t\t\"far-f150\" => \"far fa-caret-square-down\",\n\t\t\t\"far-f191\" => \"far fa-caret-square-left\",\n\t\t\t\"far-f152\" => \"far fa-caret-square-right\",\n\t\t\t\"far-f151\" => \"far fa-caret-square-up\",\n\t\t\t\"far-f080\" => \"far fa-chart-bar\",\n\t\t\t\"far-f058\" => \"far fa-check-circle\",\n\t\t\t\"far-f14a\" => \"far fa-check-square\",\n\t\t\t\"far-f111\" => \"far fa-circle\",\n\t\t\t\"far-f328\" => \"far fa-clipboard\",\n\t\t\t\"far-f017\" => \"far fa-clock\",\n\t\t\t\"far-f24d\" => \"far fa-clone\",\n\t\t\t\"far-f20a\" => \"far fa-closed-captioning\",\n\t\t\t\"far-f075\" => \"far fa-comment\",\n\t\t\t\"far-f27a\" => \"far fa-comment-alt\",\n\t\t\t\"far-f4ad\" => \"far fa-comment-dots\",\n\t\t\t\"far-f086\" => \"far fa-comments\",\n\t\t\t\"far-f14e\" => \"far fa-compass\",\n\t\t\t\"far-f0c5\" => \"far fa-copy\",\n\t\t\t\"far-f1f9\" => \"far fa-copyright\",\n\t\t\t\"far-f09d\" => \"far fa-credit-card\",\n\t\t\t\"far-f567\" => \"far fa-dizzy\",\n\t\t\t\"far-f192\" => \"far fa-dot-circle\",\n\t\t\t\"far-f044\" => \"far fa-edit\",\n\t\t\t\"far-f0e0\" => \"far fa-envelope\",\n\t\t\t\"far-f2b6\" => \"far fa-envelope-open\",\n\t\t\t\"far-f06e\" => \"far fa-eye\",\n\t\t\t\"far-f070\" => \"far fa-eye-slash\",\n\t\t\t\"far-f15b\" => \"far fa-file\",\n\t\t\t\"far-f15c\" => \"far fa-file-alt\",\n\t\t\t\"far-f1c6\" => \"far fa-file-archive\",\n\t\t\t\"far-f1c7\" => \"far fa-file-audio\",\n\t\t\t\"far-f1c9\" => \"far fa-file-code\",\n\t\t\t\"far-f1c3\" => \"far fa-file-excel\",\n\t\t\t\"far-f1c5\" => \"far fa-file-image\",\n\t\t\t\"far-f1c1\" => \"far fa-file-pdf\",\n\t\t\t\"far-f1c4\" => \"far fa-file-powerpoint\",\n\t\t\t\"far-f1c8\" => \"far fa-file-video\",\n\t\t\t\"far-f1c2\" => \"far fa-file-word\",\n\t\t\t\"far-f024\" => \"far fa-flag\",\n\t\t\t\"far-f579\" => \"far fa-flushed\",\n\t\t\t\"far-f07b\" => \"far fa-folder\",\n\t\t\t\"far-f07c\" => \"far fa-folder-open\",\n\t\t\t\"far-f119\" => \"far fa-frown\",\n\t\t\t\"far-f57a\" => \"far fa-frown-open\",\n\t\t\t\"far-f1e3\" => \"far fa-futbol\",\n\t\t\t\"far-f3a5\" => \"far fa-gem\",\n\t\t\t\"far-f57f\" => \"far fa-grimace\",\n\t\t\t\"far-f580\" => \"far fa-grin\",\n\t\t\t\"far-f581\" => \"far fa-grin-alt\",\n\t\t\t\"far-f582\" => \"far fa-grin-beam\",\n\t\t\t\"far-f583\" => \"far fa-grin-beam-sweat\",\n\t\t\t\"far-f584\" => \"far fa-grin-hearts\",\n\t\t\t\"far-f585\" => \"far fa-grin-squint\",\n\t\t\t\"far-f586\" => \"far fa-grin-squint-tears\",\n\t\t\t\"far-f587\" => \"far fa-grin-stars\",\n\t\t\t\"far-f588\" => \"far fa-grin-tears\",\n\t\t\t\"far-f589\" => \"far fa-grin-tongue\",\n\t\t\t\"far-f58a\" => \"far fa-grin-tongue-squint\",\n\t\t\t\"far-f58b\" => \"far fa-grin-tongue-wink\",\n\t\t\t\"far-f58c\" => \"far fa-grin-wink\",\n\t\t\t\"far-f258\" => \"far fa-hand-lizard\",\n\t\t\t\"far-f256\" => \"far fa-hand-paper\",\n\t\t\t\"far-f25b\" => \"far fa-hand-peace\",\n\t\t\t\"far-f0a7\" => \"far fa-hand-point-down\",\n\t\t\t\"far-f0a5\" => \"far fa-hand-point-left\",\n\t\t\t\"far-f0a4\" => \"far fa-hand-point-right\",\n\t\t\t\"far-f0a6\" => \"far fa-hand-point-up\",\n\t\t\t\"far-f25a\" => \"far fa-hand-pointer\",\n\t\t\t\"far-f255\" => \"far fa-hand-rock\",\n\t\t\t\"far-f257\" => \"far fa-hand-scissors\",\n\t\t\t\"far-f259\" => \"far fa-hand-spock\",\n\t\t\t\"far-f2b5\" => \"far fa-handshake\",\n\t\t\t\"far-f0a0\" => \"far fa-hdd\",\n\t\t\t\"far-f004\" => \"far fa-heart\",\n\t\t\t\"far-f0f8\" => \"far fa-hospital\",\n\t\t\t\"far-f254\" => \"far fa-hourglass\",\n\t\t\t\"far-f2c1\" => \"far fa-id-badge\",\n\t\t\t\"far-f2c2\" => \"far fa-id-card\",\n\t\t\t\"far-f03e\" => \"far fa-image\",\n\t\t\t\"far-f302\" => \"far fa-images\",\n\t\t\t\"far-f11c\" => \"far fa-keyboard\",\n\t\t\t\"far-f596\" => \"far fa-kiss\",\n\t\t\t\"far-f597\" => \"far fa-kiss-beam\",\n\t\t\t\"far-f598\" => \"far fa-kiss-wink-heart\",\n\t\t\t\"far-f599\" => \"far fa-laugh\",\n\t\t\t\"far-f59a\" => \"far fa-laugh-beam\",\n\t\t\t\"far-f59b\" => \"far fa-laugh-squint\",\n\t\t\t\"far-f59c\" => \"far fa-laugh-wink\",\n\t\t\t\"far-f094\" => \"far fa-lemon\",\n\t\t\t\"far-f1cd\" => \"far fa-life-ring\",\n\t\t\t\"far-f0eb\" => \"far fa-lightbulb\",\n\t\t\t\"far-f022\" => \"far fa-list-alt\",\n\t\t\t\"far-f279\" => \"far fa-map\",\n\t\t\t\"far-f11a\" => \"far fa-meh\",\n\t\t\t\"far-f5a4\" => \"far fa-meh-blank\",\n\t\t\t\"far-f5a5\" => \"far fa-meh-rolling-eyes\",\n\t\t\t\"far-f146\" => \"far fa-minus-square\",\n\t\t\t\"far-f3d1\" => \"far fa-money-bill-alt\",\n\t\t\t\"far-f186\" => \"far fa-moon\",\n\t\t\t\"far-f1ea\" => \"far fa-newspaper\",\n\t\t\t\"far-f247\" => \"far fa-object-group\",\n\t\t\t\"far-f248\" => \"far fa-object-ungroup\",\n\t\t\t\"far-f1d8\" => \"far fa-paper-plane\",\n\t\t\t\"far-f28b\" => \"far fa-pause-circle\",\n\t\t\t\"far-f144\" => \"far fa-play-circle\",\n\t\t\t\"far-f0fe\" => \"far fa-plus-square\",\n\t\t\t\"far-f059\" => \"far fa-question-circle\",\n\t\t\t\"far-f25d\" => \"far fa-registered\",\n\t\t\t\"far-f5b3\" => \"far fa-sad-cry\",\n\t\t\t\"far-f5b4\" => \"far fa-sad-tear\",\n\t\t\t\"far-f0c7\" => \"far fa-save\",\n\t\t\t\"far-f14d\" => \"far fa-share-square\",\n\t\t\t\"far-f118\" => \"far fa-smile\",\n\t\t\t\"far-f5b8\" => \"far fa-smile-beam\",\n\t\t\t\"far-f4da\" => \"far fa-smile-wink\",\n\t\t\t\"far-f2dc\" => \"far fa-snowflake\",\n\t\t\t\"far-f0c8\" => \"far fa-square\",\n\t\t\t\"far-f005\" => \"far fa-star\",\n\t\t\t\"far-f089\" => \"far fa-star-half\",\n\t\t\t\"far-f249\" => \"far fa-sticky-note\",\n\t\t\t\"far-f28d\" => \"far fa-stop-circle\",\n\t\t\t\"far-f185\" => \"far fa-sun\",\n\t\t\t\"far-f5c2\" => \"far fa-surprise\",\n\t\t\t\"far-f165\" => \"far fa-thumbs-down\",\n\t\t\t\"far-f164\" => \"far fa-thumbs-up\",\n\t\t\t\"far-f057\" => \"far fa-times-circle\",\n\t\t\t\"far-f5c8\" => \"far fa-tired\",\n\t\t\t\"far-f2ed\" => \"far fa-trash-alt\",\n\t\t\t\"far-f007\" => \"far fa-user\",\n\t\t\t\"far-f2bd\" => \"far fa-user-circle\",\n\t\t\t\"far-f410\" => \"far fa-window-close\",\n\t\t\t\"far-f2d0\" => \"far fa-window-maximize\",\n\t\t\t\"far-f2d1\" => \"far fa-window-minimize\",\n\t\t\t\"far-f2d2\" => \"far fa-window-rest\"\n\t\t);\n\n\t\t$brand_icons = array(\n\t\t\t\"fab-f26e\" => \"fab fa-500px\",\n\t\t\t\"fab-f368\" => \"fab fa-accessible-icon\",\n\t\t\t\"fab-f369\" => \"fab fa-accusoft\",\n\t\t\t\"fab-f6af\" => \"fab fa-acquisitions-incorporated\",\n\t\t\t\"fab-f170\" => \"fab fa-adn\",\n\t\t\t\"fab-f778\" => \"fab fa-adobe\",\n\t\t\t\"fab-f36a\" => \"fab fa-adversal\",\n\t\t\t\"fab-f36b\" => \"fab fa-affiliatetheme\",\n\t\t\t\"fab-f834\" => \"fab fa-airbnb\",\n\t\t\t\"fab-f36c\" => \"fab fa-algolia\",\n\t\t\t\"fab-f642\" => \"fab fa-alipay\",\n\t\t\t\"fab-f270\" => \"fab fa-amazon\",\n\t\t\t\"fab-f42c\" => \"fab fa-amazon-pay\",\n\t\t\t\"fab-f36d\" => \"fab fa-amilia\",\n\t\t\t\"fab-f17b\" => \"fab fa-android\",\n\t\t\t\"fab-f209\" => \"fab fa-angellist\",\n\t\t\t\"fab-f36e\" => \"fab fa-angrycreative\",\n\t\t\t\"fab-f420\" => \"fab fa-angular\",\n\t\t\t\"fab-f36f\" => \"fab fa-app-store\",\n\t\t\t\"fab-f370\" => \"fab fa-app-store-ios\",\n\t\t\t\"fab-f371\" => \"fab fa-apper\",\n\t\t\t\"fab-f179\" => \"fab fa-apple\",\n\t\t\t\"fab-f415\" => \"fab fa-apple-pay\",\n\t\t\t\"fab-f77a\" => \"fab fa-artstation\",\n\t\t\t\"fab-f372\" => \"fab fa-asymmetrik\",\n\t\t\t\"fab-f77b\" => \"fab fa-atlassian\",\n\t\t\t\"fab-f373\" => \"fab fa-audible\",\n\t\t\t\"fab-f41c\" => \"fab fa-autoprefixer\",\n\t\t\t\"fab-f374\" => \"fab fa-avianex\",\n\t\t\t\"fab-f421\" => \"fab fa-aviato\",\n\t\t\t\"fab-f375\" => \"fab fa-aws\",\n\t\t\t\"fab-f2d5\" => \"fab fa-bandcamp\",\n\t\t\t\"fab-f835\" => \"fab fa-battle-net\",\n\t\t\t\"fab-f1b4\" => \"fab fa-behance\",\n\t\t\t\"fab-f1b5\" => \"fab fa-behance-square\",\n\t\t\t\"fab-f378\" => \"fab fa-bimobject\",\n\t\t\t\"fab-f171\" => \"fab fa-bitbucket\",\n\t\t\t\"fab-f379\" => \"fab fa-bitcoin\",\n\t\t\t\"fab-f37a\" => \"fab fa-bity\",\n\t\t\t\"fab-f27e\" => \"fab fa-black-tie\",\n\t\t\t\"fab-f37b\" => \"fab fa-blackberry\",\n\t\t\t\"fab-f37c\" => \"fab fa-blogger\",\n\t\t\t\"fab-f37d\" => \"fab fa-blogger-b\",\n\t\t\t\"fab-f293\" => \"fab fa-bluetooth\",\n\t\t\t\"fab-f294\" => \"fab fa-bluetooth-b\",\n\t\t\t\"fab-f836\" => \"fab fa-bootstrap\",\n\t\t\t\"fab-f15a\" => \"fab fa-btc\",\n\t\t\t\"fab-f837\" => \"fab fa-buffer\",\n\t\t\t\"fab-f37f\" => \"fab fa-buromobelexperte\",\n\t\t\t\"fab-f8a6\" => \"fab fa-buy-n-large\",\n\t\t\t\"fab-f20d\" => \"fab fa-buysellads\",\n\t\t\t\"fab-f785\" => \"fab fa-canadian-maple-leaf\",\n\t\t\t\"fab-f42d\" => \"fab fa-cc-amazon-pay\",\n\t\t\t\"fab-f1f3\" => \"fab fa-cc-amex\",\n\t\t\t\"fab-f416\" => \"fab fa-cc-apple-pay\",\n\t\t\t\"fab-f24c\" => \"fab fa-cc-diners-club\",\n\t\t\t\"fab-f1f2\" => \"fab fa-cc-discover\",\n\t\t\t\"fab-f24b\" => \"fab fa-cc-jcb\",\n\t\t\t\"fab-f1f1\" => \"fab fa-cc-mastercard\",\n\t\t\t\"fab-f1f4\" => \"fab fa-cc-paypal\",\n\t\t\t\"fab-f1f5\" => \"fab fa-cc-stripe\",\n\t\t\t\"fab-f1f0\" => \"fab fa-cc-visa\",\n\t\t\t\"fab-f380\" => \"fab fa-centercode\",\n\t\t\t\"fab-f789\" => \"fab fa-centos\",\n\t\t\t\"fab-f268\" => \"fab fa-chrome\",\n\t\t\t\"fab-f838\" => \"fab fa-chromecast\",\n\t\t\t\"fab-f383\" => \"fab fa-cloudscale\",\n\t\t\t\"fab-f384\" => \"fab fa-cloudsmith\",\n\t\t\t\"fab-f385\" => \"fab fa-cloudversify\",\n\t\t\t\"fab-f1cb\" => \"fab fa-codepen\",\n\t\t\t\"fab-f284\" => \"fab fa-codiepie\",\n\t\t\t\"fab-f78d\" => \"fab fa-confluence\",\n\t\t\t\"fab-f20e\" => \"fab fa-connectdevelop\",\n\t\t\t\"fab-f26d\" => \"fab fa-contao\",\n\t\t\t\"fab-f89e\" => \"fab fa-cotton-bureau\",\n\t\t\t\"fab-f388\" => \"fab fa-cpanel\",\n\t\t\t\"fab-f25e\" => \"fab fa-creative-commons\",\n\t\t\t\"fab-f4e7\" => \"fab fa-creative-commons-by\",\n\t\t\t\"fab-f4e8\" => \"fab fa-creative-commons-nc\",\n\t\t\t\"fab-f4e9\" => \"fab fa-creative-commons-nc-eu\",\n\t\t\t\"fab-f4ea\" => \"fab fa-creative-commons-nc-jp\",\n\t\t\t\"fab-f4eb\" => \"fab fa-creative-commons-nd\",\n\t\t\t\"fab-f4ec\" => \"fab fa-creative-commons-pd\",\n\t\t\t\"fab-f4ed\" => \"fab fa-creative-commons-pd-alt\",\n\t\t\t\"fab-f4ee\" => \"fab fa-creative-commons-remix\",\n\t\t\t\"fab-f4ef\" => \"fab fa-creative-commons-sa\",\n\t\t\t\"fab-f4f0\" => \"fab fa-creative-commons-sampling\",\n\t\t\t\"fab-f4f1\" => \"fab fa-creative-commons-sampling-plus\",\n\t\t\t\"fab-f4f2\" => \"fab fa-creative-commons-share\",\n\t\t\t\"fab-f4f3\" => \"fab fa-creative-commons-zero\",\n\t\t\t\"fab-f6c9\" => \"fab fa-critical-role\",\n\t\t\t\"fab-f13c\" => \"fab fa-css3\",\n\t\t\t\"fab-f38b\" => \"fab fa-css3-alt\",\n\t\t\t\"fab-f38c\" => \"fab fa-cuttlefish\",\n\t\t\t\"fab-f38d\" => \"fab fa-d-and-d\",\n\t\t\t\"fab-f6ca\" => \"fab fa-d-and-d-beyond\",\n\t\t\t\"fab-f952\" => \"fab fa-dailymotion\",\n\t\t\t\"fab-f210\" => \"fab fa-dashcube\",\n\t\t\t\"fab-f1a5\" => \"fab fa-delicious\",\n\t\t\t\"fab-f38e\" => \"fab fa-deploydog\",\n\t\t\t\"fab-f38f\" => \"fab fa-deskpro\",\n\t\t\t\"fab-f6cc\" => \"fab fa-dev\",\n\t\t\t\"fab-f1bd\" => \"fab fa-deviantart\",\n\t\t\t\"fab-f790\" => \"fab fa-dhl\",\n\t\t\t\"fab-f791\" => \"fab fa-diaspora\",\n\t\t\t\"fab-f1a6\" => \"fab fa-digg\",\n\t\t\t\"fab-f391\" => \"fab fa-digital-ocean\",\n\t\t\t\"fab-f392\" => \"fab fa-discord\",\n\t\t\t\"fab-f393\" => \"fab fa-discourse\",\n\t\t\t\"fab-f394\" => \"fab fa-dochub\",\n\t\t\t\"fab-f395\" => \"fab fa-docker\",\n\t\t\t\"fab-f396\" => \"fab fa-draft2digital\",\n\t\t\t\"fab-f17d\" => \"fab fa-dribbble\",\n\t\t\t\"fab-f397\" => \"fab fa-dribbble-square\",\n\t\t\t\"fab-f16b\" => \"fab fa-dropbox\",\n\t\t\t\"fab-f1a9\" => \"fab fa-drupal\",\n\t\t\t\"fab-f399\" => \"fab fa-dyalog\",\n\t\t\t\"fab-f39a\" => \"fab fa-earlybirds\",\n\t\t\t\"fab-f4f4\" => \"fab fa-ebay\",\n\t\t\t\"fab-f282\" => \"fab fa-edge\",\n\t\t\t\"fab-f430\" => \"fab fa-elementor\",\n\t\t\t\"fab-f5f1\" => \"fab fa-ello\",\n\t\t\t\"fab-f423\" => \"fab fa-ember\",\n\t\t\t\"fab-f1d1\" => \"fab fa-empire\",\n\t\t\t\"fab-f299\" => \"fab fa-envira\",\n\t\t\t\"fab-f39d\" => \"fab fa-erlang\",\n\t\t\t\"fab-f42e\" => \"fab fa-ethereum\",\n\t\t\t\"fab-f2d7\" => \"fab fa-etsy\",\n\t\t\t\"fab-f839\" => \"fab fa-evernote\",\n\t\t\t\"fab-f23e\" => \"fab fa-expeditedssl\",\n\t\t\t\"fab-f09a\" => \"fab fa-facebook\",\n\t\t\t\"fab-f39e\" => \"fab fa-facebook-f\",\n\t\t\t\"fab-f39f\" => \"fab fa-facebook-messenger\",\n\t\t\t\"fab-f082\" => \"fab fa-facebook-square\",\n\t\t\t\"fab-f6dc\" => \"fab fa-fantasy-flight-games\",\n\t\t\t\"fab-f797\" => \"fab fa-fedex\",\n\t\t\t\"fab-f798\" => \"fab fa-fedora\",\n\t\t\t\"fab-f799\" => \"fab fa-figma\",\n\t\t\t\"fab-f269\" => \"fab fa-firefox\",\n\t\t\t\"fab-f907\" => \"fab fa-firefox-browser\",\n\t\t\t\"fab-f2b0\" => \"fab fa-first-order\",\n\t\t\t\"fab-f50a\" => \"fab fa-first-order-alt\",\n\t\t\t\"fab-f3a1\" => \"fab fa-firstdraft\",\n\t\t\t\"fab-f16e\" => \"fab fa-flickr\",\n\t\t\t\"fab-f44d\" => \"fab fa-flipboard\",\n\t\t\t\"fab-f417\" => \"fab fa-fly\",\n\t\t\t\"fab-f2b4\" => \"fab fa-font-awesome\",\n\t\t\t\"fab-f35c\" => \"fab fa-font-awesome-alt\",\n\t\t\t\"fab-f425\" => \"fab fa-font-awesome-flag\",\n\t\t\t\"fab-f280\" => \"fab fa-fonticons\",\n\t\t\t\"fab-f3a2\" => \"fab fa-fonticons-fi\",\n\t\t\t\"fab-f286\" => \"fab fa-fort-awesome\",\n\t\t\t\"fab-f3a3\" => \"fab fa-fort-awesome-alt\",\n\t\t\t\"fab-f211\" => \"fab fa-forumbee\",\n\t\t\t\"fab-f180\" => \"fab fa-foursquare\",\n\t\t\t\"fab-f2c5\" => \"fab fa-free-code-camp\",\n\t\t\t\"fab-f3a4\" => \"fab fa-freebsd\",\n\t\t\t\"fab-f50b\" => \"fab fa-fulcrum\",\n\t\t\t\"fab-f50c\" => \"fab fa-galactic-republic\",\n\t\t\t\"fab-f50d\" => \"fab fa-galactic-senate\",\n\t\t\t\"fab-f265\" => \"fab fa-get-pocket\",\n\t\t\t\"fab-f260\" => \"fab fa-gg\",\n\t\t\t\"fab-f261\" => \"fab fa-gg-circle\",\n\t\t\t\"fab-f1d3\" => \"fab fa-git\",\n\t\t\t\"fab-f841\" => \"fab fa-git-alt\",\n\t\t\t\"fab-f1d2\" => \"fab fa-git-square\",\n\t\t\t\"fab-f09b\" => \"fab fa-github\",\n\t\t\t\"fab-f113\" => \"fab fa-github-alt\",\n\t\t\t\"fab-f092\" => \"fab fa-github-square\",\n\t\t\t\"fab-f3a6\" => \"fab fa-gitkraken\",\n\t\t\t\"fab-f296\" => \"fab fa-gitlab\",\n\t\t\t\"fab-f426\" => \"fab fa-gitter\",\n\t\t\t\"fab-f2a5\" => \"fab fa-glide\",\n\t\t\t\"fab-f2a6\" => \"fab fa-glide-g\",\n\t\t\t\"fab-f3a7\" => \"fab fa-gofore\",\n\t\t\t\"fab-f3a8\" => \"fab fa-goodreads\",\n\t\t\t\"fab-f3a9\" => \"fab fa-goodreads-g\",\n\t\t\t\"fab-f1a0\" => \"fab fa-google\",\n\t\t\t\"fab-f3aa\" => \"fab fa-google-drive\",\n\t\t\t\"fab-f3ab\" => \"fab fa-google-play\",\n\t\t\t\"fab-f2b3\" => \"fab fa-google-plus\",\n\t\t\t\"fab-f0d5\" => \"fab fa-google-plus-g\",\n\t\t\t\"fab-f0d4\" => \"fab fa-google-plus-square\",\n\t\t\t\"fab-f1ee\" => \"fab fa-google-wallet\",\n\t\t\t\"fab-f184\" => \"fab fa-gratipay\",\n\t\t\t\"fab-f2d6\" => \"fab fa-grav\",\n\t\t\t\"fab-f3ac\" => \"fab fa-gripfire\",\n\t\t\t\"fab-f3ad\" => \"fab fa-grunt\",\n\t\t\t\"fab-f3ae\" => \"fab fa-gulp\",\n\t\t\t\"fab-f1d4\" => \"fab fa-hacker-news\",\n\t\t\t\"fab-f3af\" => \"fab fa-hacker-news-square\",\n\t\t\t\"fab-f5f7\" => \"fab fa-hackerrank\",\n\t\t\t\"fab-f452\" => \"fab fa-hips\",\n\t\t\t\"fab-f3b0\" => \"fab fa-hire-a-helper\",\n\t\t\t\"fab-f427\" => \"fab fa-hooli\",\n\t\t\t\"fab-f592\" => \"fab fa-hornbill\",\n\t\t\t\"fab-f3b1\" => \"fab fa-hotjar\",\n\t\t\t\"fab-f27c\" => \"fab fa-houzz\",\n\t\t\t\"fab-f13b\" => \"fab fa-html5\",\n\t\t\t\"fab-f3b2\" => \"fab fa-hubspot\",\n\t\t\t\"fab-f913\" => \"fab fa-ideal\",\n\t\t\t\"fab-f2d8\" => \"fab fa-imdb\",\n\t\t\t\"fab-f16d\" => \"fab fa-instagram\",\n\t\t\t\"fab-f955\" => \"fab fa-instagram-square\",\n\t\t\t\"fab-f7af\" => \"fab fa-intercom\",\n\t\t\t\"fab-f26b\" => \"fab fa-internet-explorer\",\n\t\t\t\"fab-f7b0\" => \"fab fa-invision\",\n\t\t\t\"fab-f208\" => \"fab fa-ioxhost\",\n\t\t\t\"fab-f83a\" => \"fab fa-itch-io\",\n\t\t\t\"fab-f3b4\" => \"fab fa-itunes\",\n\t\t\t\"fab-f3b5\" => \"fab fa-itunes-note\",\n\t\t\t\"fab-f4e4\" => \"fab fa-java\",\n\t\t\t\"fab-f50e\" => \"fab fa-jedi-order\",\n\t\t\t\"fab-f3b6\" => \"fab fa-jenkins\",\n\t\t\t\"fab-f7b1\" => \"fab fa-jira\",\n\t\t\t\"fab-f3b7\" => \"fab fa-joget\",\n\t\t\t\"fab-f1aa\" => \"fab fa-joomla\",\n\t\t\t\"fab-f3b8\" => \"fab fa-js\",\n\t\t\t\"fab-f3b9\" => \"fab fa-js-square\",\n\t\t\t\"fab-f1cc\" => \"fab fa-jsfiddle\",\n\t\t\t\"fab-f5fa\" => \"fab fa-kaggle\",\n\t\t\t\"fab-f4f5\" => \"fab fa-keybase\",\n\t\t\t\"fab-f3ba\" => \"fab fa-keycdn\",\n\t\t\t\"fab-f3bb\" => \"fab fa-kickstarter\",\n\t\t\t\"fab-f3bc\" => \"fab fa-kickstarter-k\",\n\t\t\t\"fab-f42f\" => \"fab fa-korvue\",\n\t\t\t\"fab-f3bd\" => \"fab fa-laravel\",\n\t\t\t\"fab-f202\" => \"fab fa-lastfm\",\n\t\t\t\"fab-f203\" => \"fab fa-lastfm-square\",\n\t\t\t\"fab-f212\" => \"fab fa-leanpub\",\n\t\t\t\"fab-f41d\" => \"fab fa-less\",\n\t\t\t\"fab-f3c0\" => \"fab fa-line\",\n\t\t\t\"fab-f08c\" => \"fab fa-linkedin\",\n\t\t\t\"fab-f0e1\" => \"fab fa-linkedin-in\",\n\t\t\t\"fab-f2b8\" => \"fab fa-linode\",\n\t\t\t\"fab-f17c\" => \"fab fa-linux\",\n\t\t\t\"fab-f3c3\" => \"fab fa-lyft\",\n\t\t\t\"fab-f3c4\" => \"fab fa-magento\",\n\t\t\t\"fab-f59e\" => \"fab fa-mailchimp\",\n\t\t\t\"fab-f50f\" => \"fab fa-mandalorian\",\n\t\t\t\"fab-f60f\" => \"fab fa-markdown\",\n\t\t\t\"fab-f4f6\" => \"fab fa-mastodon\",\n\t\t\t\"fab-f136\" => \"fab fa-maxcdn\",\n\t\t\t\"fab-f8ca\" => \"fab fa-mdb\",\n\t\t\t\"fab-f3c6\" => \"fab fa-medapps\",\n\t\t\t\"fab-f23a\" => \"fab fa-medium\",\n\t\t\t\"fab-f3c7\" => \"fab fa-medium-m\",\n\t\t\t\"fab-f3c8\" => \"fab fa-medrt\",\n\t\t\t\"fab-f2e0\" => \"fab fa-meetup\",\n\t\t\t\"fab-f5a3\" => \"fab fa-megaport\",\n\t\t\t\"fab-f7b3\" => \"fab fa-mendeley\",\n\t\t\t\"fab-f91a\" => \"fab fa-microblog\",\n\t\t\t\"fab-f3ca\" => \"fab fa-microsoft\",\n\t\t\t\"fab-f3cb\" => \"fab fa-mix\",\n\t\t\t\"fab-f289\" => \"fab fa-mixcloud\",\n\t\t\t\"fab-f956\" => \"fab fa-mixer\",\n\t\t\t\"fab-f3cc\" => \"fab fa-mizuni\",\n\t\t\t\"fab-f285\" => \"fab fa-modx\",\n\t\t\t\"fab-f3d0\" => \"fab fa-monero\",\n\t\t\t\"fab-f3d2\" => \"fab fa-napster\",\n\t\t\t\"fab-f612\" => \"fab fa-neos\",\n\t\t\t\"fab-f5a8\" => \"fab fa-nimblr\",\n\t\t\t\"fab-f419\" => \"fab fa-node\",\n\t\t\t\"fab-f3d3\" => \"fab fa-node-js\",\n\t\t\t\"fab-f3d4\" => \"fab fa-npm\",\n\t\t\t\"fab-f3d5\" => \"fab fa-ns8\",\n\t\t\t\"fab-f3d6\" => \"fab fa-nutritionix\",\n\t\t\t\"fab-f263\" => \"fab fa-odnoklassniki\",\n\t\t\t\"fab-f264\" => \"fab fa-odnoklassniki-square\",\n\t\t\t\"fab-f510\" => \"fab fa-old-republic\",\n\t\t\t\"fab-f23d\" => \"fab fa-opencart\",\n\t\t\t\"fab-f19b\" => \"fab fa-openid\",\n\t\t\t\"fab-f26a\" => \"fab fa-opera\",\n\t\t\t\"fab-f23c\" => \"fab fa-optin-monster\",\n\t\t\t\"fab-f8d2\" => \"fab fa-orcid\",\n\t\t\t\"fab-f41a\" => \"fab fa-osi\",\n\t\t\t\"fab-f3d7\" => \"fab fa-page4\",\n\t\t\t\"fab-f18c\" => \"fab fa-pagelines\",\n\t\t\t\"fab-f3d8\" => \"fab fa-palfed\",\n\t\t\t\"fab-f3d9\" => \"fab fa-patreon\",\n\t\t\t\"fab-f1ed\" => \"fab fa-paypal\",\n\t\t\t\"fab-f704\" => \"fab fa-penny-arcade\",\n\t\t\t\"fab-f3da\" => \"fab fa-periscope\",\n\t\t\t\"fab-f3db\" => \"fab fa-phabricator\",\n\t\t\t\"fab-f3dc\" => \"fab fa-phoenix-framework\",\n\t\t\t\"fab-f511\" => \"fab fa-phoenix-squadron\",\n\t\t\t\"fab-f457\" => \"fab fa-php\",\n\t\t\t\"fab-f2ae\" => \"fab fa-pied-piper\",\n\t\t\t\"fab-f1a8\" => \"fab fa-pied-piper-alt\",\n\t\t\t\"fab-f4e5\" => \"fab fa-pied-piper-hat\",\n\t\t\t\"fab-f1a7\" => \"fab fa-pied-piper-pp\",\n\t\t\t\"fab-f91e\" => \"fab fa-pied-piper-square\",\n\t\t\t\"fab-f0d2\" => \"fab fa-pinterest\",\n\t\t\t\"fab-f231\" => \"fab fa-pinterest-p\",\n\t\t\t\"fab-f0d3\" => \"fab fa-pinterest-square\",\n\t\t\t\"fab-f3df\" => \"fab fa-playstation\",\n\t\t\t\"fab-f288\" => \"fab fa-product-hunt\",\n\t\t\t\"fab-f3e1\" => \"fab fa-pushed\",\n\t\t\t\"fab-f3e2\" => \"fab fa-python\",\n\t\t\t\"fab-f1d6\" => \"fab fa-qq\",\n\t\t\t\"fab-f459\" => \"fab fa-quinscape\",\n\t\t\t\"fab-f2c4\" => \"fab fa-quora\",\n\t\t\t\"fab-f4f7\" => \"fab fa-r-project\",\n\t\t\t\"fab-f7bb\" => \"fab fa-raspberry-pi\",\n\t\t\t\"fab-f2d9\" => \"fab fa-ravelry\",\n\t\t\t\"fab-f41b\" => \"fab fa-react\",\n\t\t\t\"fab-f75d\" => \"fab fa-reacteurope\",\n\t\t\t\"fab-f4d5\" => \"fab fa-readme\",\n\t\t\t\"fab-f1d0\" => \"fab fa-rebel\",\n\t\t\t\"fab-f3e3\" => \"fab fa-red-river\",\n\t\t\t\"fab-f1a1\" => \"fab fa-reddit\",\n\t\t\t\"fab-f281\" => \"fab fa-reddit-alien\",\n\t\t\t\"fab-f1a2\" => \"fab fa-reddit-square\",\n\t\t\t\"fab-f7bc\" => \"fab fa-redhat\",\n\t\t\t\"fab-f18b\" => \"fab fa-renren\",\n\t\t\t\"fab-f3e6\" => \"fab fa-replyd\",\n\t\t\t\"fab-f4f8\" => \"fab fa-researchgate\",\n\t\t\t\"fab-f3e7\" => \"fab fa-resolving\",\n\t\t\t\"fab-f5b2\" => \"fab fa-rev\",\n\t\t\t\"fab-f3e8\" => \"fab fa-rocketchat\",\n\t\t\t\"fab-f3e9\" => \"fab fa-rockrms\",\n\t\t\t\"fab-f267\" => \"fab fa-safari\",\n\t\t\t\"fab-f83b\" => \"fab fa-salesforce\",\n\t\t\t\"fab-f41e\" => \"fab fa-sass\",\n\t\t\t\"fab-f3ea\" => \"fab fa-schlix\",\n\t\t\t\"fab-f28a\" => \"fab fa-scribd\",\n\t\t\t\"fab-f3eb\" => \"fab fa-searchengin\",\n\t\t\t\"fab-f2da\" => \"fab fa-sellcast\",\n\t\t\t\"fab-f213\" => \"fab fa-sellsy\",\n\t\t\t\"fab-f3ec\" => \"fab fa-servicestack\",\n\t\t\t\"fab-f214\" => \"fab fa-shirtsinbulk\",\n\t\t\t\"fab-f957\" => \"fab fa-shopify\",\n\t\t\t\"fab-f5b5\" => \"fab fa-shopware\",\n\t\t\t\"fab-f215\" => \"fab fa-simplybuilt\",\n\t\t\t\"fab-f3ee\" => \"fab fa-sistrix\",\n\t\t\t\"fab-f512\" => \"fab fa-sith\",\n\t\t\t\"fab-f7c6\" => \"fab fa-sketch\",\n\t\t\t\"fab-f216\" => \"fab fa-skyatlas\",\n\t\t\t\"fab-f17e\" => \"fab fa-skype\",\n\t\t\t\"fab-f198\" => \"fab fa-slack\",\n\t\t\t\"fab-f3ef\" => \"fab fa-slack-hash\",\n\t\t\t\"fab-f1e7\" => \"fab fa-slideshare\",\n\t\t\t\"fab-f2ab\" => \"fab fa-snapchat\",\n\t\t\t\"fab-f2ac\" => \"fab fa-snapchat-ghost\",\n\t\t\t\"fab-f2ad\" => \"fab fa-snapchat-square\",\n\t\t\t\"fab-f1be\" => \"fab fa-soundcloud\",\n\t\t\t\"fab-f7d3\" => \"fab fa-sourcetree\",\n\t\t\t\"fab-f3f3\" => \"fab fa-speakap\",\n\t\t\t\"fab-f83c\" => \"fab fa-speaker-deck\",\n\t\t\t\"fab-f1bc\" => \"fab fa-spotify\",\n\t\t\t\"fab-f5be\" => \"fab fa-squarespace\",\n\t\t\t\"fab-f18d\" => \"fab fa-stack-exchange\",\n\t\t\t\"fab-f16c\" => \"fab fa-stack-overflow\",\n\t\t\t\"fab-f842\" => \"fab fa-stackpath\",\n\t\t\t\"fab-f3f5\" => \"fab fa-staylinked\",\n\t\t\t\"fab-f1b6\" => \"fab fa-steam\",\n\t\t\t\"fab-f1b7\" => \"fab fa-steam-square\",\n\t\t\t\"fab-f3f6\" => \"fab fa-steam-symbol\",\n\t\t\t\"fab-f3f7\" => \"fab fa-sticker-mule\",\n\t\t\t\"fab-f428\" => \"fab fa-strava\",\n\t\t\t\"fab-f429\" => \"fab fa-stripe\",\n\t\t\t\"fab-f42a\" => \"fab fa-stripe-s\",\n\t\t\t\"fab-f3f8\" => \"fab fa-studiovinari\",\n\t\t\t\"fab-f1a4\" => \"fab fa-stumbleupon\",\n\t\t\t\"fab-f1a3\" => \"fab fa-stumbleupon-circle\",\n\t\t\t\"fab-f2dd\" => \"fab fa-superpowers\",\n\t\t\t\"fab-f3f9\" => \"fab fa-supple\",\n\t\t\t\"fab-f7d6\" => \"fab fa-suse\",\n\t\t\t\"fab-f8e1\" => \"fab fa-swift\",\n\t\t\t\"fab-f83d\" => \"fab fa-symfony\",\n\t\t\t\"fab-f4f9\" => \"fab fa-teamspeak\",\n\t\t\t\"fab-f2c6\" => \"fab fa-telegram\",\n\t\t\t\"fab-f3fe\" => \"fab fa-telegram-plane\",\n\t\t\t\"fab-f1d5\" => \"fab fa-tencent-weibo\",\n\t\t\t\"fab-f69d\" => \"fab fa-the-red-yeti\",\n\t\t\t\"fab-f5c6\" => \"fab fa-themeco\",\n\t\t\t\"fab-f2b2\" => \"fab fa-themeisle\",\n\t\t\t\"fab-f731\" => \"fab fa-think-peaks\",\n\t\t\t\"fab-f513\" => \"fab fa-trade-federation\",\n\t\t\t\"fab-f181\" => \"fab fa-trello\",\n\t\t\t\"fab-f262\" => \"fab fa-tripadvisor\",\n\t\t\t\"fab-f173\" => \"fab fa-tumblr\",\n\t\t\t\"fab-f174\" => \"fab fa-tumblr-square\",\n\t\t\t\"fab-f1e8\" => \"fab fa-twitch\",\n\t\t\t\"fab-f099\" => \"fab fa-twitter\",\n\t\t\t\"fab-f081\" => \"fab fa-twitter-square\",\n\t\t\t\"fab-f42b\" => \"fab fa-typo3\",\n\t\t\t\"fab-f402\" => \"fab fa-uber\",\n\t\t\t\"fab-f7df\" => \"fab fa-ubuntu\",\n\t\t\t\"fab-f403\" => \"fab fa-uikit\",\n\t\t\t\"fab-f8e8\" => \"fab fa-umbraco\",\n\t\t\t\"fab-f404\" => \"fab fa-uniregistry\",\n\t\t\t\"fab-f949\" => \"fab fa-unity\",\n\t\t\t\"fab-f405\" => \"fab fa-untappd\",\n\t\t\t\"fab-f7e0\" => \"fab fa-ups\",\n\t\t\t\"fab-f287\" => \"fab fa-usb\",\n\t\t\t\"fab-f7e1\" => \"fab fa-usps\",\n\t\t\t\"fab-f407\" => \"fab fa-ussunnah\",\n\t\t\t\"fab-f408\" => \"fab fa-vaadin\",\n\t\t\t\"fab-f237\" => \"fab fa-viacoin\",\n\t\t\t\"fab-f2a9\" => \"fab fa-viadeo\",\n\t\t\t\"fab-f2aa\" => \"fab fa-viadeo-square\",\n\t\t\t\"fab-f409\" => \"fab fa-viber\",\n\t\t\t\"fab-f40a\" => \"fab fa-vimeo\",\n\t\t\t\"fab-f194\" => \"fab fa-vimeo-square\",\n\t\t\t\"fab-f27d\" => \"fab fa-vimeo-v\",\n\t\t\t\"fab-f1ca\" => \"fab fa-vine\",\n\t\t\t\"fab-f189\" => \"fab fa-vk\",\n\t\t\t\"fab-f40b\" => \"fab fa-vnv\",\n\t\t\t\"fab-f41f\" => \"fab fa-vuejs\",\n\t\t\t\"fab-f83f\" => \"fab fa-waze\",\n\t\t\t\"fab-f5cc\" => \"fab fa-weebly\",\n\t\t\t\"fab-f18a\" => \"fab fa-weibo\",\n\t\t\t\"fab-f1d7\" => \"fab fa-weixin\",\n\t\t\t\"fab-f232\" => \"fab fa-whatsapp\",\n\t\t\t\"fab-f40c\" => \"fab fa-whatsapp-square\",\n\t\t\t\"fab-f40d\" => \"fab fa-whmcs\",\n\t\t\t\"fab-f266\" => \"fab fa-wikipedia-w\",\n\t\t\t\"fab-f17a\" => \"fab fa-windows\",\n\t\t\t\"fab-f5cf\" => \"fab fa-wix\",\n\t\t\t\"fab-f730\" => \"fab fa-wizards-of-the-coast\",\n\t\t\t\"fab-f514\" => \"fab fa-wolf-pack-battalion\",\n\t\t\t\"fab-f19a\" => \"fab fa-wordpress\",\n\t\t\t\"fab-f411\" => \"fab fa-wordpress-simple\",\n\t\t\t\"fab-f297\" => \"fab fa-wpbeginner\",\n\t\t\t\"fab-f2de\" => \"fab fa-wpexplorer\",\n\t\t\t\"fab-f298\" => \"fab fa-wpforms\",\n\t\t\t\"fab-f3e4\" => \"fab fa-wpressr\",\n\t\t\t\"fab-f412\" => \"fab fa-xbox\",\n\t\t\t\"fab-f168\" => \"fab fa-xing\",\n\t\t\t\"fab-f169\" => \"fab fa-xing-square\",\n\t\t\t\"fab-f23b\" => \"fab fa-y-combinator\",\n\t\t\t\"fab-f19e\" => \"fab fa-yahoo\",\n\t\t\t\"fab-f840\" => \"fab fa-yammer\",\n\t\t\t\"fab-f413\" => \"fab fa-yandex\",\n\t\t\t\"fab-f414\" => \"fab fa-yandex-international\",\n\t\t\t\"fab-f7e3\" => \"fab fa-yarn\",\n\t\t\t\"fab-f1e9\" => \"fab fa-yelp\",\n\t\t\t\"fab-f2b1\" => \"fab fa-yoast\",\n\t\t\t\"fab-f167\" => \"fab fa-youtube\",\n\t\t\t\"fab-f431\" => \"fab fa-youtube-square\",\n\t\t\t\"fab-f63f\" => \"fab fa-zhihu\"\n\t\t);\n\n\t\t$icons = array_merge( $solid_icons, $regular_icons, $brand_icons );\n\n\t\t$icons = apply_filters( \"megamenu_fontawesome_5_icons\", $icons );\n\n\t\treturn $icons;\n\n\t}", "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "public function getBsRemoveIcon($icon = null);", "public function update_font_awesome_classes( $class ) {\n\t\t\t$exceptions = array(\n\t\t\t\t'icon-envelope' => 'fa-envelope-o',\n\t\t\t\t'icon-star-empty' => 'fa-star-o',\n\t\t\t\t'icon-ok' => 'fa-check',\n\t\t\t\t'icon-zoom-in' => 'fa-search-plus',\n\t\t\t\t'icon-zoom-out' => 'fa-search-minus',\n\t\t\t\t'icon-off' => 'fa-power-off',\n\t\t\t\t'icon-trash' => 'fa-trash-o',\n\t\t\t\t'icon-share' => 'fa-share-square-o',\n\t\t\t\t'icon-check' => 'fa-check-square-o',\n\t\t\t\t'icon-move' => 'fa-arrows',\n\t\t\t\t'icon-file' => 'fa-file-o',\n\t\t\t\t'icon-time' => 'fa-clock-o',\n\t\t\t\t'icon-download-alt' => 'fa-download',\n\t\t\t\t'icon-download' => 'fa-arrow-circle-o-down',\n\t\t\t\t'icon-upload' => 'fa-arrow-circle-o-up',\n\t\t\t\t'icon-play-circle' => 'fa-play-circle-o',\n\t\t\t\t'icon-indent-left' => 'fa-dedent',\n\t\t\t\t'icon-indent-right' => 'fa-indent',\n\t\t\t\t'icon-facetime-video' => 'fa-video-camera',\n\t\t\t\t'icon-picture' => 'fa-picture-o',\n\t\t\t\t'icon-plus-sign' => 'fa-plus-circle',\n\t\t\t\t'icon-minus-sign' => 'fa-minus-circle',\n\t\t\t\t'icon-remove-sign' => 'fa-times-circle',\n\t\t\t\t'icon-ok-sign' => 'fa-check-circle',\n\t\t\t\t'icon-question-sign' => 'fa-question-circle',\n\t\t\t\t'icon-info-sign' => 'fa-info-circle',\n\t\t\t\t'icon-screenshot' => 'fa-crosshairs',\n\t\t\t\t'icon-remove-circle' => 'fa-times-circle-o',\n\t\t\t\t'icon-ok-circle' => 'fa-check-circle-o',\n\t\t\t\t'icon-ban-circle' => 'fa-ban',\n\t\t\t\t'icon-share-alt' => 'fa-share',\n\t\t\t\t'icon-resize-full' => 'fa-expand',\n\t\t\t\t'icon-resize-small' => 'fa-compress',\n\t\t\t\t'icon-exclamation-sign' => 'fa-exclamation-circle',\n\t\t\t\t'icon-eye-open' => 'fa-eye',\n\t\t\t\t'icon-eye-close' => 'fa-eye-slash',\n\t\t\t\t'icon-warning-sign' => 'fa-warning',\n\t\t\t\t'icon-folder-close' => 'fa-folder',\n\t\t\t\t'icon-resize-vertical' => 'fa-arrows-v',\n\t\t\t\t'icon-resize-horizontal' => 'fa-arrows-h',\n\t\t\t\t'icon-twitter-sign' => 'fa-twitter-square',\n\t\t\t\t'icon-facebook-sign' => 'fa-facebook-square',\n\t\t\t\t'icon-thumbs-up' => 'fa-thumbs-o-up',\n\t\t\t\t'icon-thumbs-down' => 'fa-thumbs-o-down',\n\t\t\t\t'icon-heart-empty' => 'fa-heart-o',\n\t\t\t\t'icon-signout' => 'fa-sign-out',\n\t\t\t\t'icon-linkedin-sign' => 'fa-linkedin-square',\n\t\t\t\t'icon-pushpin' => 'fa-thumb-tack',\n\t\t\t\t'icon-signin' => 'fa-sign-in',\n\t\t\t\t'icon-github-sign' => 'fa-github-square',\n\t\t\t\t'icon-upload-alt' => 'fa-upload',\n\t\t\t\t'icon-lemon' => 'fa-lemon-o',\n\t\t\t\t'icon-check-empty' => 'fa-square-o',\n\t\t\t\t'icon-bookmark-empty' => 'fa-bookmark-o',\n\t\t\t\t'icon-phone-sign' => 'fa-phone-square',\n\t\t\t\t'icon-hdd' => 'fa-hdd-o',\n\t\t\t\t'icon-hand-right' => 'fa-hand-o-right',\n\t\t\t\t'icon-hand-left' => 'fa-hand-o-left',\n\t\t\t\t'icon-hand-up' => 'fa-hand-o-up',\n\t\t\t\t'icon-hand-down' => 'fa-hand-o-down',\n\t\t\t\t'icon-circle-arrow-left' => 'fa-arrow-circle-left',\n\t\t\t\t'icon-circle-arrow-right' => 'fa-arrow-circle-right',\n\t\t\t\t'icon-circle-arrow-up' => 'fa-arrow-circle-up',\n\t\t\t\t'icon-circle-arrow-down' => 'fa-arrow-circle-down',\n\t\t\t\t'icon-fullscreen' => 'fa-arrows-alt',\n\t\t\t\t'icon-beaker' => 'fa-flask',\n\t\t\t\t'icon-paper-clip' => 'fa-paperclip',\n\t\t\t\t'icon-sign-blank' => 'fa-square',\n\t\t\t\t'icon-pinterest-sign' => 'fa-pinterest-square',\n\t\t\t\t'icon-google-plus-sign' => 'fa-google-plus-square',\n\t\t\t\t'icon-envelope-alt' => 'fa-envelope',\n\t\t\t\t'icon-comment-alt' => 'fa-comment-o',\n\t\t\t\t'icon-comments-alt' => 'fa-comments-o'\n\t\t\t);\n\n\t\t\tif( in_array( $class, array_keys( $exceptions ) ) ){\n\t\t\t\t$class = $exceptions[ $class ];\n\t\t\t}\n\n\t\t\t$class = str_replace( 'icon-', 'fa-', $class );\n\n\t\t\treturn $class;\n\t\t}", "public function get_icon()\n {\n return 'fa fa-filter';\n }", "public function enqueue_font_awesome() {\n\t\tglobal $hestia_load_fa;\n\n\t\tif ( $hestia_load_fa !== true ) {\n\t\t\treturn false;\n\t\t}\n\n\t\twp_enqueue_style( 'font-awesome-5-all', get_template_directory_uri() . '/assets/font-awesome/css/all.min.css', array(), HESTIA_VENDOR_VERSION );\n\t\tif ( $this->should_load_shim() ) {\n\t\t\twp_enqueue_style( 'font-awesome-4-shim', get_template_directory_uri() . '/assets/font-awesome/css/v4-shims.min.css', array(), HESTIA_VENDOR_VERSION );\n\t\t}\n\n\t\treturn true;\n\t}", "public function getIconList()\n {\n $icons = [];\n foreach (['FAR', 'FAL', 'FAS', 'FAB', 'FAD'] as $type) {\n $prefix = strtolower($type);\n $ref = new \\ReflectionClass('futuretek\\fontawesome\\\\' . $type);\n foreach ($ref->getConstants() as $name => $icon) {\n if (0 !== strpos($name, '_')) {\n continue;\n }\n $icons[] = '\"' . $prefix . ' ' . $icon . '\"';\n }\n }\n\n return implode(',', $icons);\n }", "function mod_escape_get_fontawesome_icon_map() {\n return [\n 'mod_escape:e/copy' => 'fa-clone',\n ];\n}", "function fa($icon, $element = null, $attr = null) {\n\t$render = '';\n\t\n\tif (is_null($element) && is_null($attr)) {\n\t\t$render = '<i class=\"fa fa-' . $icon . '\"></i>';\n\t} else {\n\t\tif (!is_null($element)) {\n\t\t\t$render = '<' . $element;\n\t\t} else {\n\t\t\t$render = '<i';\n\t\t}\n\t\tif (!is_null($attr)) {\n\t\t\tif (is_array($attr)) {\n\t\t\t\tif (!empty($attr['class'])) {\n\t\t\t\t\t$render .= ' class=\"fa fa-' . $icon . ' ' . $attr['class'] . '\"';\n\t\t\t\t} else {\n\t\t\t\t\t$render .= ' class=\"fa fa-' . $icon . '\"';\n\t\t\t\t}\n\t\t\t\tforeach ($attr as $index => $val) {\n\t\t\t\t\tif ($index != 'class') {\n\t\t\t\t\t\t$render .= ' ' . $index . '=\"' . $val . '\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$render .= ' ' . $attr;\n\t\t\t}\n\t\t} else {\n\t\t\t$render .= ' class=\"fa fa-' . $icon . '\"';\n\t\t}\n\t\tif (!is_null($element)) {\n\t\t\t$render .= '></' . $element . '>';\n\t\t} else {\n\t\t\t$render .= '></i>';\n\t\t}\n\t}\n\t\n\treturn $render;\n}", "public function icon(): ?string\n {\n return $this->getAttribute('icon');\n }", "function av_icon_string($char)\n{\n\tglobal $avia_config;\n\t\n\tif(!isset($avia_config['font_icons'][$char]['icon'])) $char = 'standard';\n\t\n\treturn avia_font_manager::frontend_icon($avia_config['font_icons'][$char]['icon'], $avia_config['font_icons'][$char]['font']);\n}", "public function getBsShowIcon($icon = null);", "public function getIcon();", "public function getIcon();", "public function icons($item) {\n //\n return keyExtractor($item, \"icon\") ?: \"fa fa-circle-o\";\n }", "public function get_icon() {\n return 'fas fa-comments';\n }", "public function get_icon_for_label($label) {\n $retval = 'fa fa-sun-o'; // default\n\n $settings = theme_enoventura_get_settings();\n $formenoventura_field_customicons = $settings->get_property('enoventura', 'formenoventura_field_customicons');\n if (!empty ($formenoventura_field_customicons['value'])) {\n $customicons = explode(\"\\n\", $formenoventura_field_customicons['value']);\n foreach ($customicons as $customicon) {\n $icon = explode('|', $customicon);\n if ($label == trim($icon[0])) {\n $retval = $icon[1];\n }\n }\n }\n\n return $retval;\n }", "public function get_icon() {\n\t\treturn 'fa fa-pencil';\n\t}", "public function get_icon() {\n\t\treturn 'fa fa-pencil';\n\t}", "public function getSvgIcon();", "public function icon ( )\n\t{\n\t\treturn Array( 'id' => $this->id,\t// shoud be consistent with what is passed to _uicmp_stuff_fold class\n\t\t\t\t\t 'title' => $this->messages['icon'] );\n\t}", "public function get_icon() {\n return 'fa fa-address-card';\n }", "public function setIcon($icon);", "public function get_font_icon() {\n\t\t$icons = array(\n\t\t\t'twitter' => 'twitter',\n\t\t\t'instagram' => 'instagram'\n\t\t\t);\n\t\tif ( isset( $icons[ $this->get_embed_type() ] ) ) {\n\t\t\treturn $icons[ $this->get_embed_type() ];\n\t\t} else {\n\t\t\treturn 'flickr';\n\t\t}\n\t}", "function get_icon() {\n\t\treturn $this->settings['icon'];\n\t}", "public function iconFunction($icon)\n {\n return sprintf('<span class=\"fa fa-%s\"></span>', $icon);\n }", "public function admin_enqueue_fontawesomeBlock(){\n\t\t}", "public function get_menu_icon() {\n\t\treturn 'gform-icon--akismet';\n\t}", "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "function av_icon_class($font)\n{\n\tglobal $avia_config;\n\treturn 'avia-font-'.$avia_config['font_icons'][$font]['font'];\n}", "function fa_func( $atts ) {\n $atts = shortcode_atts( array(\n 'icon' => '',\n 'link' => '',\n 'xclass' => ''\n ), $atts );\n $html = '';\n if( $atts['link'] ) {\n $html .= '<a href=\"'.$atts['link'].'\" target=\"_blank\" class=\"social-link\">';\n }\n $html .= '<i class=\"fa fa-'.$atts['icon'].' '.$atts['xclass'].'\"></i>';\n if( $atts['link'] ) {\n $html .= '</a>';\n }\n return $html;\n}", "private function userIconType() {\n $firstInitial = substr($this->get('username'),0,1);\n if (strlen($firstInitial) > 0) {\n echo '<i class=\"first-initial\" aria-hidden=\"true\">'.$firstInitial.'</i><span class=\"sr-only\">My User</span>';\n } else {\n echo '<i class=\"fa fa-user\" aria-hidden=\"true\"></i><span class=\"sr-only\">My User</span>';\n }\n }", "function font_awesome()\n{\n wp_enqueue_style(\"font_awesome\", \"//use.fontawesome.com/releases/v5.6.3/css/all.css\");\n}", "public function getIcon()\n {\n return $this->get(self::_ICON);\n }", "public function get_icon() {\n return 'eicon-heading apr-badge';\n }", "static public function get_social_icons() {\n\t\t$icons = array(\n\t\t\t'' => '',\n\t\t\t'im-icon-google-plus' => 'Google Plus',\n\t\t\t'im-icon-google-drive' => 'Google Drive',\n\t\t\t'im-icon-facebook' => 'Facebook',\n\t\t\t'im-icon-instagram' => 'Instagram',\n\t\t\t'fa-icon-instagram' => 'Instagram (2)',\n\t\t\t'im-icon-twitter' => 'Twitter',\n\t\t\t'im-icon-feed-2' => 'RSS',\n\t\t\t'im-icon-youtube' => 'Youtube',\n\t\t\t'im-icon-vimeo' => 'Vimeo',\n\t\t\t'im-icon-flickr' => 'Flickr',\n\t\t\t'im-icon-picassa' => 'Picassa',\n\t\t\t'im-icon-dribble' => 'Dribbble',\n\t\t\t'im-icon-deviantart-2' => 'Deviantart',\n\t\t\t'im-icon-forrst' => 'Forrst',\n\t\t\t'im-icon-steam' => 'Steam',\n\t\t\t'im-icon-github-3' => 'Github',\n\t\t\t'im-icon-wordpress' => 'Wordpress',\n\t\t\t'im-icon-joomla' => 'Joomla',\n\t\t\t'im-icon-blogger' => 'Blogger',\n\t\t\t'im-icon-tumblt' => 'Tumblt',\n\t\t\t'im-icon-yahoo' => 'Yahoo',\n\t\t\t'im-icon-skype' => 'Skype',\n\t\t\t'im-icon-reddit' => 'Reddit',\n\t\t\t'im-icon-linkedin' => 'Linkedin',\n\t\t\t'im-icon-lastfm' => 'Lastfm',\n\t\t\t'im-icon-delicious' => 'Delicious',\n\t\t\t'im-icon-stumbleupon' => 'Stumbleupon',\n\t\t\t'im-icon-stackoveratom' => 'Stackoveratom',\n\t\t\t'im-icon-pinterest-2' => 'Pinterest',\n\t\t\t'im-icon-xing' => 'Xing',\n\t\t\t'im-icon-flattr' => 'Flattr',\n\t\t\t'im-icon-foursquare-2' => 'Foursquare',\n\t\t\t'im-icon-yelp' => 'Yelp',\n\t\t\t'fa-icon-renren' => 'Renren',\n\t\t\t'fa-icon-vk' => 'Vk',\n\t\t\t'fa-icon-stackexchange' => 'Stackexchange',\n\t\t );\n\t\tasort( $icons );\n\t\treturn $icons;\n\t}", "public function isBreadcrumbFaicon()\r\n\t{\r\n\t\treturn $this->breadcrumbFaicon;\r\n\t}", "function addIcon($i){\n return $this->add('Icon',null,'Icon')->set($i)->addClass('atk-size-mega');\n }", "public function icon()\n {\n return $this->icon;\n }", "public function getIcon($icon, $animated = false)\n {\n $imageDir = $animated ? 'animated' : 'static';\n return \"{$this->imageDir}/{$imageDir}/{$icon}\";\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public static function getIcon(): string\n {\n }", "public static function getIcon(): string\n {\n }", "protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "public function getIconMimeType() {}", "protected function upload_icon()\n {\n $config = array();\n $config['upload_path'] = './upload';\n $config['allowed_types'] = 'ico';\n $config['max_size'] = '0';\n $config['overwrite'] = TRUE;\n $config['encrypt_name'] = TRUE;\n\n $this->load->library('upload', $config);\n $this->upload->do_upload('icon');\n $hasil = $this->upload->data();\n\n return $hasil;\n }", "function pagely_load_font_awesome() {\n\t\n\twp_enqueue_style( 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css', false, false, false ); \n}", "public function get_icon()\n {\n return 'fa fa-heading';\n }", "public function get_menu_icon() {\n\n\t\treturn file_get_contents( $this->get_base_path() . '/images/menu-icon.svg' );\n\n\t}", "function getAchievementIcon($id)\n{\n\tglobal $wowhead_url;\n\t\n\t$data = getXML($wowhead_url . '?achievement=' . $id . '&power');\n\t\n\tif (preg_match('#icon: \\'(.+?)\\'#', $data, $match))\n\t{\n\t\t// icon found\n\t\treturn 'http://static.wowhead.com/images/icons/small/' . strtolower($match[1]) . '.jpg';\t\n\t}\n\telse\n\t{\n\t\treturn false;\t\n\t}\n}", "public function get_icon() {\n\t\treturn 'eicon-icon-box';\n\t}", "public function font_awesome_selector( $tabs, $menu_item_id, $menu_id, $menu_item_depth, $menu_item_meta ) {\n\t\t$is_pro = $this->use_pro() ? \"pro\" : \"\";\n\t\t$settings = get_option(\"megamenu_settings\");\n $css_version = get_option(\"megamenu_pro_css_version\");\n $html = \"\";\n\n if ( is_array( $settings ) && isset( $settings['enqueue_fa_5'] ) && $settings['enqueue_fa_5'] == 'disabled' ) {\n \t$html .= \"<div class='notice notice-warning'>\" . __(\"Font Awesome 5 has been dequeued under Mega Menu > General Settings. You will need to ensure that Font Awesome 5 is enqueued on your site using an alternative method.\", \"megamenu-pro\") . \"</div>\";\n }\n\n foreach ( $this->icons() as $code => $class ) {\n\n $bits = explode( \"-\", $code );\n $code = \"&#x\" . $bits[1] . \"\";\n $type = $bits[0];\n\n $style_bits = explode( \" \", $class);\n $style = $style_bits[0];\n\n $html .= \"<div class='{$style} {$is_pro}'>\";\n $html .= \" <input class='radio' id='{$class}' type='radio' rel='{$code}' name='settings[icon]' value='{$class}' \" . checked( $menu_item_meta['icon'], $class, false ) . \" />\";\n $html .= \" <label rel='{$code}' for='{$class}' title='{$class}'></label>\";\n $html .= \"</div>\";\n\n }\n\n $icon_prefix = \"\";\n\n if ( isset( $menu_item_meta['icon'] ) ) {\n \t$icon_prefix = substr( $menu_item_meta['icon'], 0, 3 );\n }\n\n $title = __(\"Font Awesome 5\", \"megamenu-pro\");\n\n if ( $this->use_pro() ) {\n \t$title .= \" Pro\";\n }\n\n\t\t$insert['fontawesome5'] = array(\n\t\t\t'title' => $title,\n\t\t\t'active' => isset( $menu_item_meta['icon'] ) && in_array( $icon_prefix, array( 'fab', 'fas', 'far', 'fal' ) ),\n\t\t\t'content' => $html\n\t\t);\n\n\t\tarray_splice( $tabs, 2, 0, $insert );\n\t\t\n\t\treturn $tabs;\n\n\t}" ]
[ "0.6159965", "0.6083675", "0.5878301", "0.5808249", "0.57829416", "0.5760135", "0.57514143", "0.5750831", "0.5717603", "0.56902206", "0.55748963", "0.55155647", "0.5512094", "0.53570056", "0.52914655", "0.52423877", "0.5214178", "0.51343954", "0.51150113", "0.51147026", "0.5113578", "0.51133907", "0.5096938", "0.508336", "0.5078419", "0.5069457", "0.5069457", "0.50684476", "0.50684375", "0.50684375", "0.5064596", "0.505689", "0.50484246", "0.50398105", "0.50342524", "0.50342524", "0.50342524", "0.50339526", "0.5015687", "0.49936947", "0.49930617", "0.49829847", "0.49829847", "0.4972257", "0.49722126", "0.49703383", "0.49657327", "0.49608436", "0.4950708", "0.49492106", "0.49404487", "0.49386567", "0.4937358", "0.49313712", "0.49313712", "0.49293175", "0.4929131", "0.49114716", "0.4909662", "0.4909662", "0.49024877", "0.48960033", "0.48878875", "0.48733324", "0.4869068", "0.4866181", "0.48652115", "0.48591626", "0.4845298", "0.48383385", "0.48383385", "0.48360416", "0.48261288", "0.4822694", "0.4802757", "0.47815165", "0.47807363", "0.47794142", "0.4776973", "0.4775242", "0.477377", "0.47677985", "0.47520626", "0.47520626", "0.47520626", "0.47520626", "0.47520626", "0.47520626", "0.47520626", "0.47466475", "0.47466475", "0.4740967", "0.4734363", "0.47303456", "0.4729897", "0.47046927", "0.47009292", "0.46938622", "0.46927762", "0.4690768" ]
0.6573195
0
Parse a Material Design Iconic Font icon.
public static function parseMaterialDesignIconicFontIcon(array $args): MaterialDesignIconicFontIconInterface { $icon = static::newMaterialDesignIconicFontIcon(); $icon->setName(ArrayHelper::get($args, "name", "home")); $icon->setStyle(ArrayHelper::get($args, "style")); $icon->setBorder(ArrayHelper::get($args, "border", false)); $icon->setFixedWidth(ArrayHelper::get($args, "fixedWidth", false)); $icon->setFlip(ArrayHelper::get($args, "flip")); $icon->setPull(ArrayHelper::get($args, "pull")); $icon->setRotate(ArrayHelper::get($args, "rotate")); $icon->setSize(ArrayHelper::get($args, "size")); $icon->setSpin(ArrayHelper::get($args, "spin")); return $icon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function newMaterialDesignIconicFontIcon(): MaterialDesignIconicFontIconInterface {\n return new MaterialDesignIconicFontIcon();\n }", "function av_icon($icon, $font = false, $string = 'string')\n{\t\n\treturn avia_font_manager::frontend_icon($icon, $font, $string);\n}", "public function icon($icon);", "public function getIcon();", "public function getIcon();", "public function getIcon() {}", "public function getIcon() {\n\t\t//regex is used to check if there's a filename within the iconFile string\n\t\treturn preg_replace('/^.*\\/([^\\/]+\\.(gif|png))?$/i', '\\1', $this->iconFile) ? $this->iconFile : '';\n\t}", "public function getSvgIcon();", "function av_icon_css_string($char)\n{\n\tglobal $avia_config;\n\treturn \"content:'\\\\\".str_replace('ue','E',$avia_config['font_icons'][$char]['icon']).\"'; font-family: '\".$avia_config['font_icons'][$char]['font'].\"';\";\n}", "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "public function get_menu_icon() {\n\t\treturn 'gform-icon--akismet';\n\t}", "public function getIcon() {\r\n \r\n $mime = explode(\"/\", $this->mime); \r\n \r\n switch ($mime[0]) {\r\n case \"video\" : \r\n return [\r\n \"label\" => \"Video\",\r\n \"icon\" => '<i class=\"fa fa-file-video-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"image\" : \r\n return [\r\n \"label\" => \"Image\",\r\n \"icon\" => '<i class=\"fa fa-file-image-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n }\r\n \r\n switch ($this->mime) {\r\n case \"application/msword\":\r\n case \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":\r\n return [ \r\n \"label\" => \"Microsoft Word\",\r\n \"icon\" => '<i class=\"fa fa-file-word-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"application/vnd.ms-excel\":\r\n case \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\":\r\n return [ \r\n \"label\" => \"Microsoft Excel\",\r\n \"icon\" => '<i class=\"fa fa-file-excel-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"application/pdf\":\r\n case \"application/x-pdf\":\r\n return [ \r\n \"label\" => \"PDF\",\r\n \"icon\" => '<i class=\"fa fa-file-pdf-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n }\r\n \r\n return [\r\n \"label\" => \"Unknown\",\r\n \"icon\" => '<i class=\"fa fa-file-o\"></i>'\r\n ];\r\n \r\n }", "public function getIcon()\n {\n return $this->get(self::_ICON);\n }", "public function getIcon()\n {\n }", "public function icon ( )\n\t{\n\t\treturn Array( 'id' => $this->id,\t// shoud be consistent with what is passed to _uicmp_stuff_fold class\n\t\t\t\t\t 'title' => $this->messages['icon'] );\n\t}", "function av_icon_string($char)\n{\n\tglobal $avia_config;\n\t\n\tif(!isset($avia_config['font_icons'][$char]['icon'])) $char = 'standard';\n\t\n\treturn avia_font_manager::frontend_icon($avia_config['font_icons'][$char]['icon'], $avia_config['font_icons'][$char]['font']);\n}", "function av_icon_char($char)\n{\n\tglobal $avia_config;\n\treturn avia_font_manager::frontend_icon($avia_config['font_icons'][$char]['icon'], $avia_config['font_icons'][$char]['font'], false);\n}", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function icon(): string;", "public function getIcon(): string\n {\n return $this->icon ?: static::DEFAULT_ICON;\n }", "public static function getIcon(): string\n {\n }", "public static function getIcon(): string\n {\n }", "static function try_decode_icon($icon)\n\t{\n\t\tif(strpos($icon, 'u') === 0) $icon = json_decode('\"\\\\'.$icon.'\"');\n\t\treturn $icon;\n\t}", "public function getIcon()\n\t{\n\t\treturn $this->icon;\n\t}", "function get_icon() {\n\t\treturn $this->settings['icon'];\n\t}", "public function getIcon()\n {\n return $this->_icon;\n }", "public function getIcon() {\n return $this->icon;\n }", "public function getIcon() {\n return $this->icon;\n }", "public function getIcon() {\n\t\treturn $this->icon;\n\t}", "protected function micon($string, array $args = array(), array $options = array()) {\n return new MiconIconize($string, $args, $options, $this->getStringTranslation());\n }", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "public function getIcon()\n {\n return $this->Icon;\n }", "public function getIconForResourceWithPngFileReturnsIcon() {}", "public function get_font_icon() {\n\t\t$icons = array(\n\t\t\t'twitter' => 'twitter',\n\t\t\t'instagram' => 'instagram'\n\t\t\t);\n\t\tif ( isset( $icons[ $this->get_embed_type() ] ) ) {\n\t\t\treturn $icons[ $this->get_embed_type() ];\n\t\t} else {\n\t\t\treturn 'flickr';\n\t\t}\n\t}", "public function get_menu_icon() {\n\n\t\treturn file_get_contents( $this->get_base_path() . '/images/menu-icon.svg' );\n\n\t}", "protected function _parseFavicon($html){\n\n\t\t$matches = array();\n\n\t\t/* Search for <link rel=\"icon\" type=\"image/png\" href=\"http://example.com/icon.png\" /> */\n\t\tpreg_match('/><link.*?rel=(\"|\\').*icon(\"|\\').*?href=(\"|\\')(.*?)(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 4)\n\t\t\treturn trim($matches[4]);\n\n\t\t/* Search for <link rel=\"icon\" type=\"image/png\" href=\"http://example.com/icon.png\" /> */\n\t\tpreg_match('/<link.*?type=(\"|\\')image.*(\"|\\').*?href=(\"|\\')(.*?)(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 4)\n\t\t\treturn trim($matches[4]);\n\n\t\t/* \n\t\t * Order of attributes could be swapped around:\n\t\t * <link href=\"http://example.com/icon.png\" type=\"image/......\" />\n\t\t */\n\t\tpreg_match('/<link.*?href=(\"|\\')(.*?)(\"|\\').*?type=(\"|\\')image.*(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 2)\n\t\t\treturn trim($matches[2]);\n\n\t\t/* \n\t\t * Order of attributes could be swapped around:\n\t\t * <link type=\"image/......\" href=\"http://example.com/icon.png\" />\n\t\t */\n\t\tpreg_match('/<link.*?rel=(\"|\\').*icon(\"|\\').*?href=(\"|\\')(.*?)(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 4)\n\t\t\treturn trim($matches[4]);\n\n\t\t/* Order of attributes could be swapped around:\n\t\t * <link href=\"http://example.com/icon.png\" rel=\"icon\" />\n\t\t */\n\t\tpreg_match('/<link.*?href=(\"|\\')(.*?)(\"|\\').*?rel=(\"|\\').*icon(\"|\\')/i', $html, $matches);\n\t\tif (count($matches) > 2)\n\t\t\treturn trim($matches[2]);\n\n\t\t/* Order of attributes could be swapped around:\n\t\t * <link rel=\"icon\" href=\"http://example.com/icon.png\" />\n\t\t */\n\t\tpreg_match('/<link.*?rel=(\"|\\')icon(\"|\\').*?href=(\"|\\')(.*?)(\"|\\')/i', $html, $match_todo);\n\t\tif (count($match_todo) > 3)\n\t\t\treturn trim($match_todo[3]);\n\n\t\t/* No match */\n\t\treturn null;\n\t}", "public function get_icon() {\n\t\treturn 'eicon-image';\n\t}", "static function Icon($icon_to_test)\n\t{\n\t\tif(in_array($icon_to_test, self::$_icons) )\n\t\t\treturn $icon_to_test;\n\t\tWdfException::Raise(\"Invalid Icon '$icon_to_test'\");\n return '';\n\t}", "public function parse_svg() {\n\t\t$files = $this->get_all_svg_files();\n\t\tif ( empty( $files ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Get the allowed tags to parse icon's ids\n\t\t *\n\t\t * @param string $allowed_tags : Passed directly to strip_tags\n\t\t *\n\t\t * @return string\n\t\t * @since 2.0.1\n\t\t *\n\t\t * @author david-treblig\n\t\t */\n\t\t$allowed_tags = apply_filters( 'acf_svg_icon_svg_parse_tags', '<symbol><g>' );\n\n\t\t$out = array();\n\n\t\t// Ignore SVG with type media to check if there are multiple sprite\n\t\t$custom_files = array_filter(\n\t\t\t$files,\n\t\t\tfunction ( $file ) {\n\t\t\t\treturn 'media' !== $file['type'];\n\t\t\t}\n\t\t);\n\n\t\tforeach ( $files as $file ) {\n\t\t\tif ( ! is_file( $file['file'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( 'media' === $file['type'] ) {\n\t\t\t\t$pathinfo = pathinfo( $file['file'] );\n\t\t\t\t$out[] = array(\n\t\t\t\t\t'id' => $file['id'],\n\t\t\t\t\t'text' => self::get_nice_display_text( $pathinfo['filename'], false ),\n\t\t\t\t\t'url' => $file['file_url'],\n\t\t\t\t\t'disabled' => false,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t// If not extract them from the CSS file.\n\t\t\t\t$contents = file_get_contents( $file['file'] );\n\t\t\t\tpreg_match_all( '/id=\"(\\S+)\"/m', strip_tags( $contents, $allowed_tags ), $svg );\n\n\t\t\t\tforeach ( $svg[1] as $id ) {\n\t\t\t\t\t$id = sanitize_title( $id );\n\t\t\t\t\t// If multiple sprites registered, return sprite name and icon name, otherwise return icon name only\n\t\t\t\t\t$value = 1 < count( $custom_files ) ? basename( $file['file'] ) . '#' . $id : $id;\n\t\t\t\t\t$out[] = array(\n\t\t\t\t\t\t'id' => $value,\n\t\t\t\t\t\t'text' => self::get_nice_display_text( $id ),\n\t\t\t\t\t\t'disabled' => false,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn apply_filters( 'acf_svg_icon_parsed_svg', $out, $files );\n\t}", "function addIcon($i){\n return $this->add('Icon',null,'Icon')->set($i)->addClass('atk-size-mega');\n }", "public function icon()\n {\n return $this->icon;\n }", "public function icon(): ?string\n {\n return $this->getAttribute('icon');\n }", "protected function get__icon()\n\t{\n\t\treturn NULL;\n\t}", "public function getIconEmoji(): string\n {\n return $this->iconEmoji;\n }", "public function setIcon($icon);", "protected function get__icon()\n\t{\n\t\treturn 'coffee';\n\t}", "public function getIcon()\n {\n return \"group_channel\";\n }", "private static function getFaiconsList() {\n\t\n\t\t$content = file_get_contents('https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/metadata/icons.json');\n\t\t$json = json_decode($content);\n\t\t$icons = [];\n\t\n\t\tforeach ($json as $icon => $value) {\n\t\t\tforeach ($value->styles as $style) {\n\t\t\t\t$icons[] = 'fa'.substr($style, 0 ,1).' fa-'.$icon;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $icons;\n\t}", "public function get_icon() {\n\t\treturn 'eicon-icon-box';\n\t}", "public function get_icon()\n\t{\n\t\treturn 'fab fa-algolia';\n\t}", "public function getIcon()\n {\n return $this->getMethod()->images['size2x'];\n }", "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "function av_icon_class($font)\n{\n\tglobal $avia_config;\n\treturn 'avia-font-'.$avia_config['font_icons'][$font]['font'];\n}", "public function getIconMimeType() {}", "public function icon($href)\n {\n return $this->rel('icon')->href($href);\n }", "private function get_icon( $html, $url ) {\n\t\t// Grab the icon's link element.\n\t\t$pattern = '#<link\\s[^>]*rel=(?:[\\\"\\']??)\\s*(?:icon|shortcut icon|icon shortcut)\\s*(?:[\\\"\\']??)[^>]*\\/?>#isU';\n\t\tpreg_match( $pattern, $html, $element );\n\t\tif ( empty( $element[0] ) || ! is_string( $element[0] ) ) {\n\t\t\treturn '';\n\t\t}\n\t\t$element = trim( $element[0] );\n\n\t\t// Get the icon's href value.\n\t\t$pattern = '#href=([\\\"\\']??)([^\\\" >]*?)\\\\1[^>]*#isU';\n\t\tpreg_match( $pattern, $element, $icon );\n\t\tif ( empty( $icon[2] ) || ! is_string( $icon[2] ) ) {\n\t\t\treturn '';\n\t\t}\n\t\t$icon = trim( $icon[2] );\n\n\t\t// If the icon is a data URL, return it.\n\t\t$parsed_icon = parse_url( $icon );\n\t\tif ( isset( $parsed_icon['scheme'] ) && 'data' === $parsed_icon['scheme'] ) {\n\t\t\treturn $icon;\n\t\t}\n\n\t\t// Attempt to convert relative URLs to absolute.\n\t\tif ( ! is_string( $url ) || '' === $url ) {\n\t\t\treturn $icon;\n\t\t}\n\t\t$parsed_url = parse_url( $url );\n\t\tif ( isset( $parsed_url['scheme'] ) && isset( $parsed_url['host'] ) ) {\n\t\t\t$root_url = $parsed_url['scheme'] . '://' . $parsed_url['host'] . '/';\n\t\t\t$icon = WP_Http::make_absolute_url( $icon, $root_url );\n\t\t}\n\n\t\treturn $icon;\n\t}", "public function getIconForResourceWithCustomImageMimeTypeReturnsImageIcon() {}", "public function get_icon()\n {\n return 'fa fa-image';\n }", "protected function getIcon($color) {\n return Assets::image_path('icons/16/' . $color . '/forum.png');\n }", "public function getErrorIcon()\n {\n return $this->errorIcon;\n }", "public function get_icon() {\n return 'fas fa-comments';\n }", "public function get_icon() {\n\t\t\treturn WC_SUMO_Sagepay_Common_Functions::get_icon( $this->cardtypes, $this->sagelink, $this->sagelogo, $this->id );\n\t\t}", "function getAchievementIcon($id)\n{\n\tglobal $wowhead_url;\n\t\n\t$data = getXML($wowhead_url . '?achievement=' . $id . '&power');\n\t\n\tif (preg_match('#icon: \\'(.+?)\\'#', $data, $match))\n\t{\n\t\t// icon found\n\t\treturn 'http://static.wowhead.com/images/icons/small/' . strtolower($match[1]) . '.jpg';\t\n\t}\n\telse\n\t{\n\t\treturn false;\t\n\t}\n}", "public static function parseFontAwesomeIcon(array $args): FontAwesomeIconInterface {\n\n $icon = static::newFontAwesomeIcon();\n\n $icon->setName(ArrayHelper::get($args, \"name\", \"home\"));\n $icon->setStyle(ArrayHelper::get($args, \"style\"));\n\n $icon->setAnimation(ArrayHelper::get($args, \"animation\"));\n $icon->setBordered(ArrayHelper::get($args, \"bordered\", false));\n $icon->setFixedWidth(ArrayHelper::get($args, \"fixedWidth\", false));\n $icon->setFont(ArrayHelper::get($args, \"font\"));\n $icon->setPull(ArrayHelper::get($args, \"pull\"));\n $icon->setSize(ArrayHelper::get($args, \"size\"));\n\n return $icon;\n }", "public function get_icon() {\n\t\treturn 'fa fa-cloud';\n\t}", "public function get_icon_display_data($icon)\n {\n // If this icon refers to an original (i.e. it's a form that is\n // identical to the standard icon), refer to the original's data.\n if (@$icon['original']) {\n $x = $icon['original']['fit']['x'];\n $y = $icon['original']['fit']['y'];\n $w = $icon['original']['w'];\n $h = $icon['original']['h'];\n }\n else {\n $x = $icon['x'];\n $y = $icon['y'];\n $w = $icon['w'];\n $h = $icon['h'];\n }\n // At least return x and y coordinates.\n $data = array(\n 'x' => intval($x),\n 'y' => intval($y),\n );\n // If this type isn't part of a set with a set size, add the size.\n $type = $icon['type'] == 'etc' ? $icon['set'] : $icon['type'];\n if (!isset($this->icon_sizes[$type]['w'])) {\n $data['w'] = intval($w);\n $data['h'] = intval($h);\n }\n return $data;\n }", "static function frontend_icon($icon, $font = false, $return = 'string')\n\t{\n\t\t//if we got no font passed use the default font\n\t\tif(empty($font)) $font = key(AviaBuilder::$default_iconfont); \n\t\t\n\t\t//fetch the character to display\n\t\t$display_char = self::get_display_char($icon, $font);\n\t\n\t\t//return the html string that gets attached to the element. css classes for font display are generated automatically\n\t\tif($return == 'string')\n\t\t{\n\t\t\treturn \"aria-hidden='true' data-av_icon='{$display_char}' data-av_iconfont='{$font}'\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $display_char;\n\t\t}\n\t}", "function vcex_enqueue_icon_font( $family = '', $icon = '' ) {\n\tif ( ! $icon ) {\n\t\treturn;\n\t}\n\n\t// If font family isn't defined lets get it from the icon class.\n\tif ( ! $family ) {\n\t\t$family = vcex_get_icon_type_from_class( $icon );\n\t}\n\n\t// Return if we are using ticons.\n\tif ( 'ticons' === $family || ! $family ) {\n\t\twp_enqueue_style( 'ticons' );\n\t\treturn;\n\t}\n\n\t// Check for custom enqueue.\n\t$fonts = vcex_get_icon_font_families();\n\n\t// Custom stylesheet check.\n\tif ( ! empty( $fonts[$family]['style'] ) ) {\n\t\twp_enqueue_style( $fonts[$family]['style'] );\n\t\treturn;\n\t}\n\n\t// Default vc font icons.\n\tif ( function_exists( 'vc_icon_element_fonts_enqueue' ) ) {\n\t\tvc_icon_element_fonts_enqueue( $family );\n\t}\n}", "protected function getIcon()\n {\n /** @var IconFactory $iconFactory */\n $iconFactory = GeneralUtility::makeInstance(IconFactory::class);\n return $iconFactory->getIcon('px-shopware-clear-cache', Icon::SIZE_SMALL)->render();\n }", "public function getIcon()\n {\n return ' fa fa-lock';\n }", "public static function validateIconName($element, FormStateInterface $form_state) {\n // Load the configuration settings.\n $configuration_settings = \\Drupal::config('fontawesome.settings');\n // Check if we need to bypass.\n if ($configuration_settings->get('bypass_validation')) {\n return;\n }\n\n $value = $element['#value'];\n if (strlen($value) == 0) {\n $form_state->setValueForElement($element, '');\n return;\n }\n\n // Load the icon data so we can check for a valid icon.\n $iconData = \\Drupal::service('fontawesome.font_awesome_manager')->getIconMetadata($value);\n\n if (!isset($iconData['name'])) {\n $form_state->setError($element, t(\"Invalid icon name %value. Please see @iconLink for correct icon names, or turn off validation in the Font Awesome settings if you are trying to use custom icon names.\", [\n '%value' => $value,\n '@iconLink' => Link::fromTextAndUrl(t('the Font Awesome icon list'), Url::fromUri('https://fontawesome.com/icons'))->toString(),\n ]));\n }\n }", "protected function establish_icon() {\n\t\t$this->icon = \"<i class='sw swp_{$this->key}_icon'></i>\";\n\t}", "public function getIcon(AbstractContent $content)\n {\n if (null === $property = $content->getProperty('iconized-by')) {\n return null;\n }\n\n return $this->parseProperty($content, $property);\n }", "public function getSpriteIconCode() {}", "private function parseInlineIcons($message)\n {\n preg_match('/<icon.*<\\/icon>/U', $message, $inline);\n\n if ($inline) {\n preg_match('/(?<=<icon>).*(?=<\\/icon>)/U', $inline[0], $icon);\n $icon = $icon ? $this->getIconCode($icon[0]) : \"\";\n $message = str_replace($inline, $icon, $message);\n\n return $this->parseInlineIcons($message);\n }\n\n return $message;\n }", "public function getIcons($milestone)\n {\n // Compose the channel icon path\n $bundlePath = $milestone->getMilestoneModule()->getBundle()->getWebAssetsPath();\n $bundleName = $milestone->getMilestoneModule()->getBundle()->getName();\n $iconName = str_replace('campaignchain/', '', str_replace('-', '_', $bundleName)).'.png';\n $icon['16px'] = '/'.$bundlePath.'/images/icons/16x16/'.$iconName;\n $icon['24px'] = '/'.$bundlePath.'/images/icons/24x24/'.$iconName;\n\n return $icon;\n }", "public function getIcon() {\r\n\t\r\n\t$fileType = $this->getType();\r\n\t\r\n\t$image = array(\r\n\t 'image/gif',\r\n\t 'image/png',\r\n\t 'image/jpg',\r\n\t 'image/jpeg'\r\n\t);\r\n\t\r\n\t$rarZip = array(\r\n\t 'application/zip',\r\n 'application/x-rar-compressed'\r\n\t);\r\n\t\r\n\t$audio = array(\r\n\t 'audio/mpeg'\r\n\t);\r\n\t\r\n\t$video = array(\r\n\t 'video/quicktime',\r\n\t 'video/mp4'\r\n\t);\r\n\t\r\n\t$pdf = array(\r\n\t 'application/pdf'\r\n\t);\r\n\t\r\n\t$wordExcelPptx = array(\r\n\t 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\r\n\t 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\r\n\t 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\r\n\t 'application/msword',\r\n\t 'application/vnd.ms-excel',\r\n\t 'application/vnd.ms-powerpoint'\r\n\t);\r\n\t\r\n\tif (in_array($fileType, $image)) {\r\n\t return \"image.png\";\r\n\t} elseif (in_array($fileType, $audio)) {\r\n\t return \"audio.png\";\r\n\t} elseif (in_array($fileType, $video)) {\r\n\t return \"video.png\";\r\n\t} elseif (in_array($fileType, $rarZip)) {\r\n\t return \"rarZip.png\";\r\n\t} elseif (in_array($fileType, $pdf)) {\r\n\t return \"pdf.png\";\r\n\t} elseif (in_array($fileType, $wordExcelPptx)) {\r\n\t return \"wordExcelPptx.png\";\r\n\t} else {\r\n\t return \"default.png\";\r\n\t}\r\n\t\r\n }", "public function setIconColor(?string $iconColor): InfoboxInterface;", "function fa_icon( $icon = 'user' ) {\n\t\treturn \"<i class=\\\"fa fa-{$icon}\\\"></i>\";\n\t}", "function format_icon($p_icon, $p_color = '', $p_space_right = '5px'){\n\treturn '<i class=\"ace-icon fa ' . $p_icon . ' ' . $p_color . '\"></i>' . format_hspace($p_space_right);\n}", "protected function upload_icon()\n {\n $config = array();\n $config['upload_path'] = './upload';\n $config['allowed_types'] = 'ico';\n $config['max_size'] = '0';\n $config['overwrite'] = TRUE;\n $config['encrypt_name'] = TRUE;\n\n $this->load->library('upload', $config);\n $this->upload->do_upload('icon');\n $hasil = $this->upload->data();\n\n return $hasil;\n }", "static function backend_icon($params)\n\t{\n\t\t$font = isset($params['args']['font']) ? $params['args']['font'] : key(AviaBuilder::$default_iconfont);\n\t\t$icon = !empty($params['args']['icon']) ? $params['args']['icon'] : \"new\";\n\t\t\n\t\t$display_char = self::get_display_char($icon, $font);\n\t\t\n\t\treturn array('display_char' => $display_char, 'font' => $font);\n\t}", "public function getIconColor(): ?string;", "public function icon(): string\n {\n return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACYSURBVEhLYxgFJIHU1FSjtLS0i0D8AYj7gEKMEBkqAaAFF4D4ERCvAFrwH4gDoFIMKSkpFkB+OTEYqgUTACXfA/GqjIwMQyD9H2hRHlQKJFcBEiMGQ7VgAqCBvUgK32dmZspCpagGGNPT0/1BLqeF4bQHQJePpiIwhmrBBEADR1MRfgB0+WgqAmOoFkwANHA0FY0CUgEDAwCQ0PUpNB3kqwAAAABJRU5ErkJggg==';\n }", "public function get_icon() {\n return 'eicon-heading apr-badge';\n }", "public function get_icon() {\n\t\treturn 'fa fa-images';\n\t}", "public function icon(): string\n {\n return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADLSURBVEhL5ZRLCsIwGAa7UkE9gd5HUfEoekxxJx7AhXoCca/fhESkJiQxBHwMDG3S/9EmJc0n0JMruZVXK/fMdWQRY7mXt4A7OZJvwZu74hRayIEc2nv3jGtXZrOWrnifiRY0OkhiWK5sWGeS52bkZymJ2ZhRJmwmySxLCL6CmIsZZUIixkiNezCRR+kSUyWH3Cgn6SuQIk2iuOBckvN+t8FMnq1TJloUN3jefN9mhvJeCAVWb8CyUDj0vxc3iPFHDaofFdUPu2+iae7nYJMCY/1bpAAAAABJRU5ErkJggg==';\n }", "private function setIcon(\\Scrivo\\Str $icon) {\n\t\t$this->icon = $icon;\n\t}", "protected function imageIcon(): string\n {\n $types = [\n 'image' => 'file-image',\n 'video' => 'file-video',\n 'document' => 'file-document',\n 'audio' => 'file-audio',\n 'code' => 'file-code',\n 'archive' => 'file-zip'\n ];\n\n $extensions = [\n 'xls' => 'file-spreadsheet',\n 'xlsx' => 'file-spreadsheet',\n 'csv' => 'file-spreadsheet',\n 'docx' => 'file-word',\n 'doc' => 'file-word',\n 'rtf' => 'file-word',\n 'mdown' => 'file-text',\n 'md' => 'file-text'\n ];\n\n return $extensions[$this->model->extension()] ??\n $types[$this->model->type()] ??\n parent::imageDefaults()['color'];\n }" ]
[ "0.676625", "0.6017633", "0.59385115", "0.5873442", "0.5873442", "0.5862009", "0.5770806", "0.5744816", "0.5736445", "0.5695407", "0.5695407", "0.56531", "0.56249464", "0.5595677", "0.55845106", "0.5574528", "0.55662036", "0.55342746", "0.5507407", "0.5507407", "0.5507407", "0.5507407", "0.5507407", "0.5507407", "0.5507407", "0.5507129", "0.54999876", "0.5466602", "0.5466602", "0.54634225", "0.5438152", "0.5419445", "0.54166764", "0.54140687", "0.54140687", "0.5411588", "0.5399081", "0.5398427", "0.5398427", "0.5397844", "0.5397844", "0.5389983", "0.5373925", "0.5370492", "0.53633016", "0.5362082", "0.5347674", "0.53373563", "0.5314406", "0.5297013", "0.52901363", "0.5276006", "0.52738243", "0.52702165", "0.51954025", "0.51926285", "0.51891595", "0.51878566", "0.5187561", "0.51681405", "0.5166858", "0.51499814", "0.51499814", "0.5147153", "0.5130852", "0.5117212", "0.51117736", "0.51040375", "0.506968", "0.5059291", "0.50540596", "0.50277156", "0.50235313", "0.5017972", "0.5017926", "0.49975166", "0.4997026", "0.49904397", "0.4989883", "0.4982808", "0.49806294", "0.49722314", "0.4971103", "0.49695414", "0.49685338", "0.49503767", "0.49475303", "0.49365702", "0.49285966", "0.49246502", "0.4917164", "0.4906827", "0.49023604", "0.48989296", "0.48830646", "0.48811355", "0.48803288", "0.48788616", "0.48763272", "0.48757318" ]
0.6822867
0
connexion a la BDD
public function __construct( $dbh ) { $this->dbh = $dbh; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "public function testConnection()\n {\n }", "public function testConnexion(){\n\tif(isset($_POST['email']) && isset($_POST['password'])){\n $user= new Users();\n $user->connexion($_POST['email'], $_POST['password']);\n\t}\t\n}", "public function testConnection() {\n //Set the connection string.\n $success = $this->setConnection();\n if ($success === true) {\n $this->connect();\n }\n }", "public function testConnection();", "public function connectToDB() {}", "public function connect():void\n {\n try{\n $this->pdo = new PDO('mysql:host='.\n $this->settingsBDD['host'].';dbname='.$this->settingsBDD['dbname'],\n $this->settingsBDD['user'],\n $this->settingsBDD['password'],\n [\n PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC,\n PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8mb4\",\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n ]\n );\n }catch(PDOException $e){\n print \"Erreur!\".$e->getMessage().\"<br>\";\n die();\n }\n\n }", "function BDDopen(){\n //ouverture la base de donnes\n \n global $bdd;\n \n if(!isset($bdd)){\n include 'lib/bdd_connect.inc';\n $bdd = new PDO(\"mysql:host=$db_host; dbname=$db_name;charset=UTF8\", $db_user, $db_pass);\n $bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n }\n return $bdd;\n}", "public function connectDB() {}", "function getBDD() {\t\n\t$bdd = new PDO(SQL_DSN,SQL_USERNAME, SQL_PASSWORD, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n return $bdd;\n}", "protected function connect() {\r\n $this->service->connect();\r\n $this->assert_is_true($this->service->is_connected(), $this->service->get_error());\r\n }", "public function testConnectDb($host,$db,$user,$pass) \r\n {\r\n echo \"\\n---Databse Test---\\n\";\r\n $this->assertTrue(con($host, $db, $user, $pass));\r\n }", "public function testThatWeCanConnectToDatabase(){\n $this->assertNotEmpty($this->db->connect());\n }", "public function testDb()\n {\n // print_r($cfg);\n\n // $params = array('adapter', 'host', 'username', 'password', 'dbname');\n // foreach ($params as $param) {\n // $this->assertArrayHasKey(\n // $param, $cfg['database'], 'db缺少' . $param . '配置'\n // );\n // }\n // $dbCfg = $cfg['database'];\n // $dsn = '' . strtolower($dbCfg['adapter']) . ':host=' . $dbCfg['host'] . ';dbname=' . $dbCfg['dbname'] . '';\n\n // new PDO($dsn, $dbCfg['username'], $dbCfg['password']);\n }", "public function testAdminConnection()\n {\n $client = static::createClient();\n $client->request('GET', '/login');\n\n $form = $crawler->selectButton('submit')->form();\n\n // set some values\n $form['login'] = 'admin';\n $form['password'] = 'wnpbGx9F5NaS4S8';\n\n // submit the form\n $crawler = $client->submit($form);\n\n // requete doit etre un succes\n $this->assertTrue($client->getResponse()->isSuccessful());\n }", "public function testConsultarTest()\n {\n $nombre = \"Jose\";\n $edad = 30;\n $puesto = \"Alimentacion\";\n $granja_id = 1;\n\n $response=$this->json('POST','/api/V1/IRegistroEmpleados/registro/'.$nombre.'/'.$edad.'/'.$puesto.'/'.$granja_id);\n $response->assertStatus(200);\n }", "private function connect()\r\n {\r\n\r\n /**\r\n * A TENTATIVA DE CRIAR UM OBJETO COM A CONEXAO DO BANCO É FEITA\r\n */\r\n try {\r\n /**\r\n * SALVA NA VARIAVEL ESTATICA O OBJETO REFERENTE A CONEXÃO COM O BANCO.\r\n * AS VARIAVEIS QUE SAO USADAS PARA CONEXAO SÃO DA CLASSE PAI\r\n */\r\n self::$con = new PDO('mysql:host=' . $this->getHost() . ';dbname=' . $this->getDatabase() . '', $this->getUser(), $this->getPassword(), array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES 'utf8'\"));\r\n /**\r\n * DEFINE O TIPO DE MANIPULAÇÃO DE ERRO SERÁ USADO PELO PDO\r\n */\r\n self::$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n /**\r\n * CAPTURA O ERRO, SE GERADO\r\n */\r\n } catch (\\PDOException $error) {\r\n /**\r\n * O ERRO É IMPRESSO NA TELA\r\n */\r\n echo $error->getMessage();\r\n }\r\n }", "public function connect()\r\n {\r\n \techo 'asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfadsf';exit;\r\n try\r\n {\r\n\r\n \t$res\t= $this->getParameterHolder();\r\n\r\n \tprint_r($res);exit;\r\n\r\n // determine how to get our settings\r\n $method = $this->getParameter('method', 'normal');\r\n\r\n switch ($method)\r\n {\r\n case 'normal':\r\n // get parameters normally, and all are required\r\n $database = $this->getParameter('database', null);\r\n $hostspec = $this->getParameter('hostspec') ? $this->getParameter('hostspec') : ($this->getParameter('host') ? $this->getParameter('hostspec') : null);\r\n $password = $this->getParameter('password', null);\r\n $phptype = $this->getParameter('phptype', null);\r\n $username = $this->getParameter('username', null);\r\n $port = $this->getParameter('port', null);\r\n $encoding = $this->getParameter('encoding', null);\r\n\r\n $dsn = array('database' => $database,\r\n 'hostspec' => $hostspec,\r\n 'password' => $password,\r\n 'phptype' => $phptype,\r\n 'username' => $username,\r\n 'port' => $port,\r\n 'encoding' => $encoding);\r\n break;\r\n\r\n case 'dsn':\r\n $dsn = $this->getParameter('dsn');\r\n\r\n if ($dsn == null)\r\n {\r\n // missing required dsn parameter\r\n $error = 'Database configuration specifies method \"dsn\", but is missing dsn parameter';\r\n\r\n throw new sfDatabaseException($error);\r\n }\r\n\r\n break;\r\n\r\n case 'server':\r\n // construct a DSN connection string from existing $_SERVER values\r\n $dsn =& $this->loadDSN($_SERVER);\r\n\r\n break;\r\n\r\n case 'env':\r\n // construct a DSN connection string from existing $_ENV values\r\n $dsn =& $this->loadDSN($_ENV);\r\n\r\n break;\r\n\r\n default:\r\n // who knows what the user wants...\r\n $error = 'Invalid CreoleDatabase parameter retrieval method \"%s\"';\r\n $error = sprintf($error, $method);\r\n\r\n throw new sfDatabaseException($error);\r\n }\r\n\r\n // get creole class path\r\n $classPath = $this->getParameter('classpath');\r\n\r\n // include the creole file\r\n if ($classPath == null)\r\n {\r\n require_once('creole/Creole.php');\r\n }\r\n else\r\n {\r\n require_once($classPath);\r\n }\r\n\r\n // set our flags\r\n $noAssocLower = $this->getParameter('no_assoc_lower', false);\r\n $persistent = $this->getParameter('persistent', false);\r\n $compatAssocLower = $this->getParameter('compat_assoc_lower', false);\r\n $compatRtrimString = $this->getParameter('compat_rtrim_string', false);\r\n\r\n $flags = 0;\r\n $flags |= ($noAssocLower) ? Creole::NO_ASSOC_LOWER : 0;\r\n $flags |= ($persistent) ? Creole::PERSISTENT : 0;\r\n $flags |= ($compatAssocLower) ? Creole::COMPAT_ASSOC_LOWER : 0;\r\n $flags |= ($compatRtrimString) ? Creole::COMPAT_RTRIM_STRING : 0;\r\n\r\n // do the duuuurtay work, right thurr\r\n if ($flags > 0)\r\n {\r\n $this->connection = Creole::getConnection($dsn, $flags);\r\n }\r\n else\r\n {\r\n $this->connection = Creole::getConnection($dsn);\r\n }\r\n\r\n // get our resource\r\n $this->resource = $this->connection->getResource();\r\n }\r\n catch (SQLException $e)\r\n {\r\n // the connection's foobar'd\r\n throw new sfDatabaseException($e->toString());\r\n }\r\n }", "public function __construct() {\n try {\n $Connexion = new connexion();\n $this->obj = $Connexion->IDconnexion;\n } catch ( PDOException $e ) {\n echo \"<h1>probleme access BDD</h1>\";\n }\n }", "public function test_dotorg_communication()\n {\n }", "function abrir_conexion()\n {\n $this->db = Conectar::conexion();\n }", "public function testDatabaseConnection(){\r\n include('c:\\PHP\\database.php');\r\n $db = new database;\r\n $connectionToDatabase = $db->connectToDatabase();\r\n $this->assertEquals(true,$connectionToDatabase);\r\n }", "private function testGetRecurso()\n {\n $this->repository = app(ChamadoRepository::class);\n }", "public function connect_db() {\n }", "private function testGetRecurso()\n {\n $this->repository = app(ContadorRepository::class);\n }", "public function testConnect()\n {\n $this->assertNotNull($this->emailService->connect($this->getConnectionData()));\n }", "public function testCheckConnections()\n {\n $result = $this->la->checkConnection();\n $this->assertTrue($result);\n }", "function conectarBD ()\n{\n\ttry {\n\t\t$pdo= new PDO('mysql:host=127.0.0.1;dbname=tareas','root','');\n\t\treturn $pdo;\n\t\t} \n\t\tcatch(PDOException $e) \n\t\t{\n\t \tdd($e->getmessage());\n\t // con el operador -> se invocan las funciones de la clase \n\t}\n}", "public function testLogin()\n {\n $unUsuario =User::findOrFail(1);\n $this->browse(function ($browser) use ($unUsuario) {\n $browser->visit('/')\n ->type('identity', $unUsuario->name)\n ->type('password', 'secret')\n ->press('Accedeix')\n ->assertTrue(true);\n });\n }", "protected function setUp()\r\n {\r\n $this->session = new NashEarlySession(self::$config[\"authenticationPath\"], self::$config[\"servicePath\"]);\r\n $this->object = new ContaService($this->session);\r\n $this->session->login(self::$config);\r\n \r\n $empresaService = new EmpresaService($this->session);\r\n $empresa = $empresaService->getEmpresasSelecionaveis(1, 0)[0];\r\n $empresaService->selecionaEmpresa($empresa->getId());\r\n }", "public function test_connect()\n\t{\n\t\t$this->assertTrue( DB::connect( 'phpunit_sqlite' ) );\n\t}", "public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }", "public function testRegistro()\n {\n $this->browse(function (Browser $browser) {\n $browser ->visit('/registro')\n ->type ('nombre','prueba unitaria')\n ->type ('correo','[email protected]')\n ->type ('usuario','prueba1')\n ->type ('contra','123')\n ->press('registro')\n ->assertSee('su pin de seguridad es');\n\n });\n }", "public function testExample()\n {\n # 会员\n $oUser = \\App\\Models\\User::orderBy(\"id\", \"desc\")->first();\n\n # step 2. 会员登入\n $this->UserLogin($oUser->name, \"123qwe\"); \n\n\n # step 3. 遊戲列表\n $sUrl = \"/api/games\";\n $sMethod = \"GET\";\n\n # 傳送參數設定\n $this->aHeader[\"currency\"] = \"VND\";\n $aData = [];\n # 測試接口\n $response = $this->withHeaders($this->aHeader)->json($sMethod, $sUrl, $aData); \n \n\n $sUrl = \"/api/games/9/login\";\n $sMethod = \"POST\";\n\n # 傳送參數設定\n $this->aHeader[\"currency\"] = \"VND\";\n $this->aHeader[\"device\"] = \"1\";\n $aData = [];\n # 測試接口\n $response = $this->withHeaders($this->aHeader)->json($sMethod, $sUrl, $aData);\n\n $response->assertStatus(200);\n }", "private function openConnection() {\n $this->db = new PDO(\"mysql:host=127.0.0.1;dbname=mvc\", \"gert\", \"becode\");\n }", "private function testGetRecurso()\n {\n $this->repository = app(ExpedicaoRepository::class);\n }", "public function testLoginRegister(){\n $user = User::find(1);\n $this->be($user);\n\n $response =$this->get(route('administracion'));\n $response->assertStatus(200);\n }", "public function connexionIntervenantLogin(){\n }", "private function conect(){\r\n\t\tglobal $HOST;\r\n\t\tglobal $BASEDEDATOS;\r\n\t\tglobal $USUARIO;\r\n\t\tglobal $PASS;\r\n\t\t$this->myconn = mysql_connect($HOST,$USUARIO,$PASS);\r\n\t\tif (! $this->myconn){\r\n\t\t\techo \"Error al intentar conectarse con el servidor MySQL\";\r\n\t\texit(); \r\n\t\t}\r\n\r\n\t\tif (! @mysql_select_db($BASEDEDATOS,$this->myconn)){\r\n\t\t\techo \"No se pudo conectar correctamente con la Base de datos\";\r\n\t\t\texit();\r\n\t\t}\r\n\t\r\n\t}", "private function connect(){\n\t\trequire (__DIR__ . '/../../config.php');\n\t\t$mysqlCFG =$database['mysql'];\n\t\t\n\t\tif(!self::$db){\n\t\t\t$connectionString = \"mysql:host=$mysqlCFG[host];dbname=$mysqlCFG[dbname]\";\n\t\t\ttry{\n\t\t\t\tself::$db = new \\PDO($connectionString, $mysqlCFG['user'], $mysqlCFG['password']);\n\t\t\t\tself::$db->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t\t}catch(\\PDOException $e){\n\t\t\t\tdie(\"Ocurrio un error al conectar con la base de datos: $e->getMessage()\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function testLogin(){\n $client00 = static::createClient();\n $client00->request('POST', '/booking/calendar');\n \n $this->assertEquals(\n 405, //METHOD NOT ALLOWED\n $client00->getResponse()->getStatusCode()\n );\t\t\n \n $client01 = $this->createAuthorizedClient();\n $client01->request('POST','/booking/calendar');\n $this->assertEquals(\n 405, //METHOD NOT ALLOWED\n $client01->getResponse()->getStatusCode()\n );\t\n //Requests con GET\n $client02 = $this->createAuthorizedClient();\n $client02->request('GET','/booking/calendar');\n $this->assertEquals(\n 200, //OK\n $client02->getResponse()->getStatusCode()\n ); \n //Usuario no autorizado\n $client03 = static::createClient();\n $client03->request('GET', '/booking/calendar');\n \n //redireccionado porque no tiene los permisos necesarios\n $this->assertTrue($client03->getResponse()->isRedirect()); \n }", "private function conectar(){\n try{\n\t\t\t$this->conexion = Conexion::abrirConexion(); /*inicializa la variable conexion, llamando el metodo abrirConexion(); de la clase Conexion por medio de una instancia*/\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage()); /*Si la conexion no se establece se cortara el flujo enviando un mensaje con el error*/\n\t\t}\n }", "public function testobtenerInstituciones()\n {\n $this->withoutExceptionHandling();\n $response = $this->call('POST','/obtenerInstituciones');\n $this->assertEquals(200, $response->getStatusCode());\n //$response->assertStatus(200);\n \n \n }", "public function testAltaComercializador()\n {\n $data = $this->data();\n $service = new ABM_ComercializadorService();\n $service->crearComer($data);\n\n\n\n $user = ['usuario' => $data['usuario'], 'email' => $data['email']];\n $data['usuario'] = 2;\n unset($data['password']);\n $this->assertDatabaseHas('imputaciones', ['nombre' => 'Comisiones a pagar '.$data['nombre'].' '.$data['apellido'], 'codigo' => 311020001]);\n $this->assertDatabaseHas('saldos_cuentas', ['saldo' => 0, 'codigo' => 311020001, 'nombre' => 'Comisiones a pagar '.$data['nombre'].' '.$data['apellido']]);\n $this->assertDatabaseHas('users', $user);\n $this->assertDatabaseHas('role_users', ['user_id' => 2, 'role_id' => 2]);\n $this->assertDatabaseHas('comercializadores', $data);\n }", "public function __construct() {\n $this->conecta();\n }", "public function connexionAdminStructureLogin(){\n }", "private function connect()\n {\n //variable con el nombre del server\n $server = \"localhost\";\n //variable con el nombre de la base\n $database = \"candidatossv\";\n //variable con el usuario de la base\n $username = \"root\";\n //variable con la contra de la base\n $password = \"\";\n try {\n //realizando conexion\n @self::$connection = new PDO(\"mysql:host=$server; dbname=$database; charset=utf8\", $username, $password);\n } catch (PDOException $exception) {\n //mostrando el tipo de excepcion al realizar la conexion\n throw new Exception($exception->getCode());\n }\n }", "public function connect(): void\n {\n }", "public function Conecta()\n\t{\n\t\t$this->conn = new PDO(\"mysql:host=\".$this->host.\";dbname=\".$this->database, $this->user, $this->password);\n\n\t}", "protected function start(){\n\t\n\t\t\t$this->con = new PDO(\"mysql:host=$this->host;dbname=$this->banco;\", \"$this->user\" , \"$this->senha\");\n\t\t}", "public function test_start() {\n $db = new DB();\n $db->statement('CREATE DATABASE IF NOT EXISTS test');\n $this->assertEquals('',$db->getErrorMsg());\n }", "function testOfInsertWachtwoordWithCorrectInput() {\n include 'DAL.php';\n $conn = mysqli_connect($servername, $username, $password,$dbname);\n //If the record is added successfully, the method 'InsertWachtwoord' will return true.\n\n $test = InsertWachtwoord(290, 'Brouwland' , $conn);\n $this->assertTrue($test); //Normally it has to return 'true'.\n }", "protected function connect() {}", "public function __construct()\n {\n $PARAM_hote = 'localhost';\n\n // le port de connexion à la base de données\n $PARAM_port = '3306';\n // le nom de la base de données\n\n $PARAM_nom_bd = 'InstaDog';\n\n // Le nom d'utilisateur pour se connecter \n $PARAM_utilisateur = 'adminInstaDog';\n\n // le mot de passe de l'utilisateur pour se connecter\n $PARAM_mot_passe = 'Inst@D0g';\n \n // Attraper les exceptions \n try {\n $this->connexion = new PDO(\n 'mysql:host=' . $PARAM_hote . '; dbname=' . $PARAM_nom_bd,\n $PARAM_utilisateur,\n $PARAM_mot_passe\n );\n } catch (Exception $e) {\n echo 'Erreur: ' . $e->getMessage() . '<br/>';\n echo 'N° : ' . $e->getCode();\n }\n }", "private function connecDb()\n {\n try{\n $dsn = \"{$this->db_type}:host={$this->db_host};port={$this->db_port};\";\n $dsn .= \"dbname={$this->db_name};charset={$this->db_charset}\";\n //echo \"$dsn, $this->db_user, $this->db_pass\";\n $this->pdo = new PDO($dsn,$this->db_user,$this->db_pass);\n }catch(PDOException $e){\n echo\"<h2>创建POD对象失败</h2>\";\n $this->ShowErrorMessage($e);\n die();\n }\n }", "public function connect(){\n try {\n $this->_dbh = new PDO('mysql:host='.$this->_host.';dbname='.$this->_db,$this->_user,$this->_pass);\n echo \"connexion reussi\";\n }\n catch(PDOException $e)\n {\n echo \"Connection failed: \" . $e->getMessage();\n }\n }", "function Conecta(){\n\t\t$this->conexao = @mysql_connect($this->servidor,$this->usuario,$this->senha); //varaivel link desntro desta classa recebera a conex�o\n\t\tif(!$this->conexao){\n\t\t\techo 'Falha na conex�o com o banco de dados<br>';\n\t\t\texit();\n\t\t}elseif(!mysql_select_db($this->banco,$this->conexao)){\n\t\t\techo 'Falha ao selecionar o banco de dados<br>';\n\t\t\texit();\n\t\t}\n\t}", "public function setUp()\n\t{\n\t\t$this->connection = Db::connection(array(\n\t\t\t'driver' => 'mysql',\n\t\t\t'username' => 'root',\n\t\t\t'password' => isset($_SERVER['DB']) ? '' : 'root',\n\t\t\t'database' => 'test_database',\n\t\t));\n\t}", "public function testConstruct()\n {\n $con = new EasyDatabase();\n $query = \"SELECT * from test\";\n $result = $con->query($query);\n $this->assertEquals($result['ok'], true);\n\n //from array.\n $con = new EasyDatabase(['host' => 'localhost', 'username' => 'root1', 'password' => 'root1', 'database' => 'root1']);\n $query = \"SELECT * from test\";\n $result = $con->query($query);\n $this->assertEquals($result['ok'], true);\n\n }", "public function connect()\n {\n }", "public function connect()\n {\n }", "public function connect()\n {\n }", "public function conexion(){\n\n $bbdd = $this->driver .':host='. $this->host . ';dbname=' . $this->database . ';charset=' . $this->charset;\n\n //$bbdd = ' mysql:host=localhost;dbname=mvc1;charset=utf8';\n try {\n $connection = new PDO($bbdd, $this->user, $this->pass);\n $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $connection;\n } catch (PDOException $e) {\n //Lanzamos la excepción\n throw new Exception('Problema al establecer conexión.');\n }\n }", "public function connect()\n {\n $data = $this->app->file->requireFile('config.php');\n extract($data);\n try {\n static::$DB = new PDO('mysql:host=' . $server . ';dbname=' . $dbname , $dbuser , $dbpass);\n\n static::$DB->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE , PDO::FETCH_OBJ);\n static::$DB->setAttribute(PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION);\n static::$DB->exec('SET NAMES utf8');\n\n }\n catch (PDOException $e){\n die($e->getMessage());\n }\n }", "public function __construct() {\n\t\t$this->host = sfConfig::get('mod_main_host');\n\t\t$this->port = sfConfig::get('mod_main_port');\n\t\t$this->user = sfConfig::get('mod_main_user');\n\t\t$this->pass = sfConfig::get('mod_main_pass');\n\t\t$this->database = sfConfig::get('mod_main_database');\t\t\n\t\t$this->link = mysql_connect($this->host . ':' . $this->port, $this->user, $this->pass);\n\t \n\t\tif(!$this->link)\n\t\t\tthrow new CustomUOMySQLException('Connexion impossible a la BDD : ' . mysql_error($this->link));\n\t\t \n\t\t$base = mysql_select_db($this->database, $this->link);\t \n\t\tif (!$base)\n\t\t\tthrow new CustomUOMySQLException(mysql_error($this->link));\n\t}", "public function testConnect() {\n\t\t$client = new \\Esprit\\Transport\\Http(array(\n\t\t\t'host' => 'localhost',\n\t\t\t'port' => 666,\n\t\t\t'index' => 'twitter',\n\t\t\t'type' => 'tweet'\n\t\t)) ;\n\n\t\t// Fails\n\t\ttry {\n\t\t\t$client->connect() ;\n\t\t\t$this->fail() ;\n\t\t} catch(\\Exception $e) {} ;\n\n\t\t// Defaults index / type\n\t\t$client = new \\Esprit\\Transport\\Http(array(\n\t\t\t'host' => 'localhost',\n\t\t\t'index' => 'twitter',\n\t\t\t'type' => 'tweet',\n\t\t\t'check' => false\n\t\t)) ;\n\n\t\t$this->assertTrue($client->connect()->connected()) ;\n\t\t$this->assertTrue($client->check()) ;\n\t}", "public function Conect_bbdd(){\n $conn=mysqli_connect($this->localhost, $this->user, $this->pass, $this->bbdd);\n \n //si la connexio es correcte mostrara Conectat a la bbdd sino error.\n if($conn)\n {\n echo json_encode(\"Conectat a la bbdd\") . \"<br>\";\n }\n else\n {\n die(json_encode(\"Connection failed: \" . mysqli_connect_error()));\n }\n\n return $conn;\n }", "protected function setUp () {\n $this->pdoConnection = new \\PDO('mysql:host='.$this->config['server'].';',\n $this->config['user'],\n $this->config['password']);\n $this->pdoConnection->exec('DROP SCHEMA IF EXISTS '.$this->config['name']);\n $this->pdoConnection->exec('CREATE SCHEMA '.$this->config['name']);\n $this->pdoConnection->exec('USE '.$this->config['name']);\n $this->pdoConnection->exec(file_get_contents(__DIR__.'\\ConnectionTestSchema.sql'));\n\n $this->mysqli = new mysqli($this->config['server'],\n $this->config['user'],\n $this->config['password'],\n $this->config['name']);\n\n $this->mysqliConnection = new MysqliConnection($this->mysqli);\n $this->run = true;\n }", "public function test_SaveClientOK(){\n\t\t// Popula variável com os dados do cliente\n\t\t$cliente = $this->dataGenerator->getCliente();\n\t\t// Popula dados da requisição\n\t\t$this->populateData($cliente['Cliente']['login'], $cliente['Cliente']['raw_password']);\n\t\t// Envia requisição e armazena resposta\n\t\t$response = $this->sendRequest($this->fullURL, 'POST', $this->data);\n\t\t// Valida se os campos de resposta são válidos\n\t\t$this->assertNotNull($response);\n\t\t$this->assertNotEmpty($response);\n\t\t$this->assertNotNull($response['client_id']);\n\t\t$this->assertNotEmpty($response['client_id']);\n\t\t// Extrai os dados do cliente retornados\n\t\t$clientId = $response['client_id'];\n\t\t// Busca na base esse cliente, para compara se a senha foi gerada corretamente\n\t\t$dataBaseClient = $this->Cliente->findById($clientId);\n\t\t// Valida se encontrou o cliente com o id retornado\n\t\t$this->assertNotNull($dataBaseClient);\n\t\t$this->assertNotEmpty($dataBaseClient);\n\t\t// Valida os dados da base com o objeto do cliente \n\t\t$this->assertEquals($cliente['Cliente']['tipo'], $dataBaseClient['Cliente']['tipo']);\n\t\t$this->assertEquals($cliente['Cliente']['login'], $dataBaseClient['Cliente']['login']);\n\t\t$this->assertEquals($cliente['Cliente']['senha'], $dataBaseClient['Cliente']['senha']);\n\t\t$this->assertEquals($cliente['Cliente']['ativo'], $dataBaseClient['Cliente']['ativo']);\n\t}", "public function test_example()\n {\n $response = $this->get('/regist');\n\n $response->assertStatus(200);\n }", "public function testPdoConnection() {\n\n\t\t$conn = self::$context->connection;\n\n\t\t// Test instance id member\n\t\t$instId = self::$context->config->INSTANCE_ID;\n\t\t$this->assertEquals($instId, $conn->instanceId);\n\n\t\t// Test id generation\n\t\t$idA = $conn->generateId();\n\t\t$idB = $conn->generateId();\n\t\t$this->assertGreaterThan($idA, $idB);\n\n\t\t// Test binding of the instace id\n\t\t$sth = $conn->prepare(\"SELECT :instId as test\");\n\t\t$conn->bindInstance($sth);\n\t\t$sth->execute();\n\t\t$rd = $sth->fetch(\\PDO::FETCH_ASSOC);\n\t\t$this->assertEquals($rd[\"test\"], \"$instId\");\n\n\t}", "public function testConnection(): void\n {\n $response = $this->client->request('GET');\n $this->assertEquals(200, $response->getStatusCode());\n\n return;\n }", "function post(){\r\n\t\t//Connect\r\n\t\t$sql = new DataBase;\r\n\t\t$sql->connect();\r\n\t}", "private function conectarDB(){\n\t\t$dsn = 'mysql:dbname='.self::nombre_db.' ;host='.self::servidor;\n\t\ttry {\n\t\t\t#metodo abstracto para la conexion a la bd\n\t\t\t$this->_conn = new PDO($dsn, self::usuario_db, self::pwd_db);\n\t\t \t\n\t\t } catch (PDOException $e) {\n\t\t \techo \"Falló la conexión: \".$e->getMessage();\n\t\t } \n\t}", "public function testLogin(): void { }", "public function testExample(){\n //create admin account\n $admin = factory(User::class)->create([\n 'id' => 999,\n 'name' => \"Sue\",\n 'email' => '[email protected]',\n 'password' => Hash::make(\"secret\"),\n 'role' => 'admin'\n ]);\n\n //login with the admin account\n $login = $this->call('POST', 'api/auth/login',\n [\n 'email' => '[email protected]',\n 'password' => 'secret',\n ]\n );\n $login->assertStatus(200);\n\n\n // return 'location not found' message if the location id doesn't exits in the database\n $response = $this->call('GET', 'api/locations/1');\n $response->assertStatus(404);\n\n\n // insert location details into database\n factory(Location::class)->create([\n 'id' => 1,\n 'address' => \"78-56 Victoria St, Carlton VIC 3053\",\n 'latitude' => -37.806717,\n 'longitude' => 144.965405,\n 'slot' => 5,\n 'current_car_num' => 2\n ]);\n\n\n // See location details\n $response = $this->call('GET', 'api/locations/1',\n $this->transformHeadersToServerVars([ 'Authorization' => $login->json(\"access_token\")])\n );\n $response->assertStatus(200);\n\n }", "public function connect(){\n $bd= new PDO(\"mysql:host=localhost;dbname=crud\",\"root\", \"\");\n return $bd;\n }", "public function connect(){\n $this->database->connect($this->server, $this->login, $this->password, $this->db_name);\n if($this->database->connect_errno){\n return;\n }\n //nastavi kodovanie databazy na UTF-8\n $this->database->query(\"SET CHARACTER SET utf8\");\n $this->connected=true;\n }", "function testDBconnect() {\n print \"\\nTEST: database connection:\";\n global $dbhost;\n global $dbuser;\n global $dbpass;\n //global $dbname; // TODO rem\n\n if (empty($dbhost) || empty($dbuser) || empty($dbpass)) {\n print \"\\nWARN: either db host,user or pass info missing.\\n\";\n }\n else {\n // TODO rem $dbname at submission\n\n $sqlConn = new mysqli($dbhost, $dbuser, $dbpass);//, $dbname);\n if ($sqlConn->connect_error) {\n print \"\\nSQL Connection failed: \".$sqlConn->connect_error.\"\\n\";\n } \n else {\n print \"\\nSQL connection successful, closing...\\n\";\n $sqlConn->close();\n }\n }\n interceptExit();\n }", "public static function getMysqlConnexion(){\n\t\ttry{\n\t\t\t\n\t\t\t$db = new \\PDO('mysql:host=' . \\Library\\Application::appConfig()->getConst(\"BDD_HOST\")\n\t\t\t\t\t\t\t. ';dbname=' . \\Library\\Application::appConfig()->getConst(\"BDD_NAME\"). ''\n\t\t\t\t\t\t\t, \\Library\\Application::appConfig()->getConst(\"BDD_USER\")\n\t\t\t\t\t\t\t, \\Library\\Application::appConfig()->getConst(\"BDD_PASSWORD\"));\n\t\t\t\n\t\t\t$db->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t} catch(\\Exception $e) {\n\t\t\tif (\\Library\\Application::appConfig()->getConst(\"LOG\"))\n\t\t\t\tthrow new \\RuntimeException(\"Error ID: \" . \\Library\\Application::logger()->log(\"Error\", \"Page\", \"Error on BDD connection\", __FILE__, __LINE__));\n\t\t\telse\n\t\t\t\tthrow new \\RuntimeException(\"Error on BDD connection\");\n\t\t\texit();\n\t\t}\n\t\treturn $db;\n\t}", "private function testGetRecurso()\n {\n $this->repository = app(NotaEspelhoPatrimonioRepository::class);\n }", "public function testEndPoint()\n {\n\n $user = Auth::loginUsingId(1);\n\n// $response = $this->actingAs($user)\n// ->get('dashboard/orders/create');\n $response = $this->get('dashboard/orders/create');\n\n $response->assertStatus(200);\n }", "protected function setUp() {\n $this->dbh = DB::getDBConnection('mysql:dbname=www_lab0123_users_test;host=127.0.0.1');\n\n // check if we actually got a connection\n if ($this->dbh == null) {\n $this->fail('DB::getDBConnection returned null..');\n }\n\n // create table in database (fail if couldn't do so)\n if (!$this->dbh->query(\n 'CREATE TABLE `users` (\n `id` int(11) NOT NULL,\n `email` varchar(255) NOT NULL,\n `password` varchar(255) NOT NULL,\n `name` varchar(255) NOT NULL,\n `phone` varchar(30) NOT NULL\n ) ENGINE=InnoDB DEFAULT CHARSET=latin1;'\n )) {\n\n $this->fail('Coudn\\'t create table in setup stage of testing');\n }\n\n \n }", "public function testCreateContador()\n {\n }", "public function __construct(){\n $this->conectado = $this->conectar();\n }", "abstract public function connect(): \\PDO;", "private function setConexion()\r\n\t\t{\r\n\t\t\t$this->_conexion = New ConexionController();\r\n\t\t\t$this->_conn = $this->_conexion->initConectar('db');\r\n\t\t}", "private function setConexion()\r\n\t\t{\r\n\t\t\t$this->_conexion = New ConexionController();\r\n\t\t\t$this->_conn = $this->_conexion->initConectar('db');\r\n\t\t}", "public function getConnexion(){\n $this->connexion = null; \n try{\n $this->connexion = new PDO('mysql:host=' . $this->host . ';dbname=' . $this->name,\n $this->user, $this->pass, array(PDO::MYSQL_ATTR_INIT_COMMAND =>'SET NAMES UTF8', \n PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING, PDO::ATTR_EMULATE_PREPARES, false));\n }catch (PDOException $e){\n echo 'false';\n\n }\n }", "public function testCreateAccountTest()\n {\n $data = new Request();\n $data->name = $this->faker->name;\n $data->amount = rand(1000,9999) ;\n\n $banco = new BancoController();\n\n $nuevo = $banco->createAccount($data);\n\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/giris-yap')\n ->type('input[name=\"email\"]','[email protected]')\n ->type('input[name=\"pass\"]','123')\n ->check('input[name=\"rememberme\"]')\n ->click('button[name=\"login\"]')\n ->waitForLocation('/')\n ->click('a[href=\"yeni-is-ekle\"]')\n ->pause(1000)\n ->select('select[name=\"project\"]')\n ->type('input[name=\"title\"]','İş Adı')\n ->type('input[name=\"desc\"]','İş Açıklama')\n ->click('button[name=\"create\"]')\n ->waitForDialog()\n ->assertDialogOpened('İş oluşturma işlemi başarı ile tamamlandı.');\n });\n }", "public function testExample()\n {\n $this->withoutExceptionHandling();\n $response = $this->post('/login',[\n \"email\" => \"[email protected]\",\n \"password\" => \"abbas\"\n ]);\n\n $response->assertOk();\n }", "public function testInvalidConnectionCredentialsDB()\r\n\t\t{\r\n\t\t\tORM::init('mysql:host=localhost;dbname=doesnotexistdb', 'orm_username', 'orm_password');\r\n\t\t}", "public function test_admin_posisi()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/DscMember', 'posisi']);\n $this->assertResponseCode(404);\n }", "function tienda(){\r\n $this->conexion = new Conexion();\r\n $this->conexion->Conexion();\r\n }", "public function conectar() {\n //Establecer conexion con el servidor\n $this->linkId = @mysql_connect($this->servidor, $this->usuario, $this->password);\n if ($this->linkId == true) {//Si se conecto al servidor.\n //Asignar la conexion a la base de datos\n if (!mysql_select_db($this->baseDatos)) {\n throw new Exception(\"No se pudo conectar a la base de datos\");\n }\n } else {//Si no se conecto al servidro\n throw new Exception(\"No se pudo conectar al servidor\");\n }\n }", "public function testUbicaciontracker()\n {\n // $response = $this->get('/');\n // $response->assertStatus(200);\n //$this->visit('buque/store');\n // $response = $this->get('/');\n // $this->assertTrue(true);\n $response = $this->withHeaders([\n 'X-Header' => 'Value',\n ])->json('POST', '/user', ['name' => 'Sally']);\n\n $response\n ->assertStatus(201)\n ->assertJson([\n 'created' => true,\n ]);\n }", "public function testRegistrarmeSinDatos(){\n $this->browse(function ($browser) {\n $browser->visit('/registrar')\n ->press('Registrarme')\n ->assertPathIs('/registrar'); \n }); \n }", "public function testMyTestCase()\n { $this->artisan('migrate');\n \t$this->visit(\"/project/1/add\");\n $this->type('[email protected]', 'email');\n $this->press('Ajouter');\n $this->seePageIs('/project/1/add/confirm');\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->assertSee('SIGN IN')\n ->type('email', '[email protected]')\n ->type('password', '123456')\n ->press('LOGIN')\n ->assertPathIs('/home')\n ->visit('/addProduct')\n ->type('nama_product', 'air jordan')\n ->type('harga_product', '100000')\n ->type('stock_product', '100000')\n ->type('deskripsi', 'haip bis parah ngga sih')\n ->select('kategori_product', 'Lainnya')\n ->select('nama_marketplace', 'Shopee')\n ->attach('img_path', __DIR__.'\\test.jpg')\n ->press('Submit');\n });\n }", "public function testExample()\n {\n // //获取token\n // dump(\"Require Token:\");\n // $response = $this->json('POST', '/api/auth/token/require',array());\n // $response\n // ->assertStatus(200)\n // ->assertJson([\n // 'code' => 0,\n // ]);\n // $token = $response->json()[\"data\"][\"accessToken\"];\n //\n // dump(\"$token\");\n //\n // //用户登陆\n // $user = \"kk142872\";\n // $pwd = \"123456\";\n // $response = $this->json('POST', '/api/auth/login',array(\n // \"accessToken\"=>$token,\n // \"userid\"=>$user,\n // \"pwd\"=>$pwd\n //\n // ));\n // $response\n // ->assertStatus(200)\n // ->assertJson([\n // 'code' => 0,\n // ]);\n //\n // dump('登陆成功');\n //\n // //查询用户充值代币信息\n // $response = $this->json('POST', '/api/user/getcoinrechargelist',array(\n // \"accessToken\"=>$token,\n // \"pageIndex\"=>1,\n // \"pageSize\"=>10\n //\n // ));\n // $response\n // ->assertStatus(200)\n // ->assertJson([\n // 'code' => 0,\n // ]);\n // dump('用户代币充值信息');\n // dump($response->json());\n //\n // //查询管理员充值代币信息\n // $response = $this->json('POST', '/api/admin/getrechargelist',array(\n // \"accessToken\"=>$token,\n // \"pageIndex\"=>1,\n // \"pageSize\"=>10\n //\n // ));\n // $response\n // ->assertStatus(200)\n // ->assertJson([\n // 'code' => 0,\n // ]);\n // dump('所有代币充值信息');\n // dump($response->json());\n //\n //\n // //查询用户充值代币信息\n // $response = $this->json('POST', '/api/user/getcoinwithdrawallist',array(\n // \"accessToken\"=>$token,\n // \"pageIndex\"=>1,\n // \"pageSize\"=>10\n //\n // ));\n // $response\n // ->assertStatus(200)\n // ->assertJson([\n // 'code' => 0,\n // ]);\n // dump('用户代币提现信息');\n // dump($response->json());\n //\n //\n // //查询用户充值代币信息\n // $response = $this->json('POST', '/api/admin/getwithdrawallist',array(\n // \"accessToken\"=>$token,\n // \"pageIndex\"=>1,\n // \"pageSize\"=>10\n //\n // ));\n // $response\n // ->assertStatus(200)\n // ->assertJson([\n // 'code' => 0,\n // ]);\n // dump('所有代币提现信息');\n // dump($response->json());\n //\n //\n // //查询用户充值代币信息\n // $response = $this->json('POST', '/api/user/getcoinjournallist',array(\n // \"accessToken\"=>$token,\n // \"pageIndex\"=>1,\n // \"pageSize\"=>10\n //\n // ));\n // $response\n // ->assertStatus(200)\n // ->assertJson([\n // 'code' => 0,\n // ]);\n // dump('用户代币流水信息');\n // dump($response->json());\n //\n // //查询用户代币账户\n // $response = $this->json('POST', '/api/user/getusercoinlist',array(\n // \"accessToken\"=>$token,\n // \"pageIndex\"=>1,\n // \"pageSize\"=>10\n //\n // ));\n // $response\n // ->assertStatus(200)\n // ->assertJson([\n // 'code' => 0,\n // ]);\n // dump('用户代币账户:');\n // dump($response->json());\n //\n //\n // $this->assertTrue(true);\n }" ]
[ "0.7369911", "0.6954309", "0.6861216", "0.65744746", "0.65286696", "0.650217", "0.64745367", "0.6428432", "0.6368971", "0.635507", "0.63446414", "0.6343586", "0.6331158", "0.6286763", "0.6262916", "0.62575155", "0.6250237", "0.62463355", "0.62119174", "0.62108856", "0.6189704", "0.6181891", "0.6180194", "0.6176975", "0.6173369", "0.61579037", "0.61132544", "0.61077386", "0.609416", "0.60826814", "0.6080439", "0.60584205", "0.6052316", "0.6045543", "0.6042401", "0.6042333", "0.60401344", "0.60328376", "0.60246944", "0.602339", "0.60168475", "0.60157734", "0.6010236", "0.6009073", "0.6006204", "0.60012877", "0.5992793", "0.59910667", "0.5979237", "0.5974687", "0.5946534", "0.59432864", "0.5940647", "0.5940497", "0.59330446", "0.593078", "0.5929634", "0.5925557", "0.59242034", "0.59194547", "0.59194547", "0.59194547", "0.5916166", "0.59146494", "0.59107417", "0.590667", "0.59019214", "0.59010375", "0.5898951", "0.5890297", "0.58901244", "0.5888684", "0.5881134", "0.58808595", "0.5878598", "0.58775866", "0.5868914", "0.58588564", "0.58587813", "0.5858014", "0.5856617", "0.5851375", "0.58494663", "0.5844064", "0.58412015", "0.5835271", "0.5834449", "0.5834449", "0.58343434", "0.5830026", "0.58276796", "0.5813016", "0.580716", "0.58036524", "0.57980335", "0.57976663", "0.5796608", "0.5795402", "0.5793029", "0.57928216", "0.5792793" ]
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $item = new HistoryUser(); $data = $request->only($item->getFillable()); if ($item->fill($data)->save()){ json_encode('ok'); }else{ json_encode('fail'); } }
{ "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($historyUser) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($historyUser) { // }
{ "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(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\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(form $form)\n {\n //\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\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 return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "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) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\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 editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", "0.68129057", "0.68083996", "0.68082106", "0.6803853", "0.67966306", "0.6794222", "0.6794222", "0.6789979", "0.67861426", "0.678112", "0.677748", "0.67702436", "0.67625374", "0.6748088", "0.67475355", "0.67475355", "0.67446774", "0.6742005", "0.67374676", "0.6727497", "0.6714345", "0.6696231", "0.6693851", "0.6689907", "0.6689746", "0.6687102", "0.66870165", "0.6684574", "0.6670877", "0.66705006", "0.6667089", "0.6667089", "0.6663205", "0.66626745", "0.66603845", "0.66593564", "0.66560745", "0.66545844", "0.66447026", "0.6633528", "0.66319114", "0.66298395", "0.66298395", "0.6622365", "0.6621021", "0.66170275", "0.661664", "0.6612467", "0.66107714", "0.6608453", "0.65979743", "0.659645", "0.6596389", "0.6592672", "0.6591205", "0.6588125", "0.6582166", "0.6581656", "0.65811247", "0.65785724", "0.65782833", "0.6576397", "0.6570971", "0.6569483", "0.6568432", "0.656811", "0.6563493", "0.6563493", "0.65622604", "0.65602434", "0.65585065", "0.6557997", "0.65574414", "0.6556701", "0.65565753", "0.6556226", "0.6556107", "0.6549118", "0.65485924", "0.65463555" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $historyUser) { // }
{ "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($historyUser) { // }
{ "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
Get the observers attached to this object.
public function observers() { return $this->observers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getObservers()\n {\n return $this->observers;\n }", "public function getObservers()\n {\n return $this->observers;\n }", "public static function getObservers()\n\t{\n\t\t$observers = self::$_observers;\n\t\treturn $observers;\n\t}", "public function get_observers() : array\n\t{\n\t\treturn $this->_observers;\n\t}", "public function getObservacions()\n {\n return $this->observacions;\n }", "public final function GetObserver()\n {\n return $this->observer;\n }", "public function observers();", "public function getElementProgressObservers()\n {\n return $this->_elementProgressObservers;\n }", "public function getEventListeners()\n {\n return $this->eventListeners;\n }", "public function getObservateurs()\n {\n return $this->observateurs;\n }", "public function getSubscribers()\n\t\t{\n\t\t\treturn $this->subscribers;\n\t\t}", "public static function get_observer_list() {\n $events = \\core\\event\\manager::get_all_observers();\n foreach ($events as $key => $observers) {\n foreach ($observers as $observerskey => $observer) {\n $events[$key][$observerskey]->parentplugin =\n \\core_plugin_manager::instance()->get_parent_of_subplugin($observer->plugintype);\n }\n }\n return $events;\n }", "public function getObservacoes()\n {\n return $this->observacoes;\n }", "public function getSubscribers()\n {\n return $this['subscribers'];\n }", "function getObservaciones() {\r\n return $this->observaciones;\r\n }", "public static function getObservers(prototype\\Prototype $prototype) :array\n {\n return (isset(self::$observers[$prototype]) ? self::$observers[$prototype] : [] );\n }", "public function getEvents()\n {\n return $this->eventListeners;\n }", "public function getListeners()\n {\n return $this->listeners;\n }", "public function getListeners()\n {\n return $this->listeners;\n }", "public function getObservableEvents()\n {\n return array_merge(\n [\n 'creating', 'created', 'updating', 'updated',\n 'deleting', 'deleted', 'saving', 'saved',\n 'fetching', 'fetched'\n ],\n $this->observables\n );\n }", "public function events()\n {\n return $this->events;\n }", "public function events()\n {\n return $this->events;\n }", "public function subscribers() {\n return new Subscriber($this);\n }", "public function getObs()\n {\n return $this->obs;\n }", "public function getObservableEvents()\n {\n return array_merge(\n [\n 'retrieved', 'creating', 'created', 'updating', 'updated',\n 'saving', 'saved', 'restoring', 'restored', 'replicating',\n 'deleting', 'deleted', 'forceDeleted',\n ],\n static::getRelationshipObservables(),\n $this->observables,\n );\n }", "public function getWindowResizeListeners() {\n return ($this->resizeListeners == null) ? new SplObjectStorage() : $this->resizeListeners;\n }", "public function getNotifications()\n {\n return $this->_notifications;\n }", "public function getEvents()\n {\n return $this->_events;\n }", "public function getEvents() {\n return $this->_events;\n }", "public function getListeners(): array;", "public function getObs()\n {\n return isset($this->obs) ? $this->obs : null;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getEvents()\n {\n return $this->events;\n }", "public function getSubscribedEvents()\n {\n return $this->wrapped->getSubscribedEvents();\n }", "function GetNotifications () {\n\t\treturn $this->notifications;\n\t}", "public function notifyObservers() {\n \n // Iterate through observer list\n foreach ($this->observers as $observer) {\n \n // Call notify on observer\n $observer->notify();\n \n }\n \n // Implement fluent interface\n return $this;\n }", "public function getObservables()\n {\n return is_array($this->observables) ? array_merge($this->observables, $this->translationEvent) : $this->translationEvent;\n }", "protected function _getSortedObservers()\n {\n $array = $this->_splObjectStorageToArray($this->observers);\n\n usort($array, function ($a, $b) {\n return (int) $a['data'] < (int) $b['data'];\n });\n\n return array_map(function ($item) {\n return $item['obj'];\n }, $array);\n }", "public function getEventHandlers()\n {\n return $this->eventHandlers;\n }", "public function getEvents()\n\t{\n\t\treturn $this->events;\n\t}", "public function notifications() { return $this->notifications; }", "private function get_subscribers()\n {\n return array(\n new CommentIQ_Subscriber_AssetsSubscriber($this->plugin_url . 'assets/', $this->get_supported_post_types()),\n new CommentIQ_Subscriber_PostmaticAssetsSubscriber($this->plugin_path . 'assets/' ),\n new CommentIQ_Subscriber_AutomatedatozsitesCommentSubscriber($this->get_atozsites_comment_generator(), $this->get_supported_post_types()),\n new CommentIQ_Subscriber_CommentIQAPISubscriber($this->api_client, $this->get_supported_post_types()),\n );\n }", "public static function getListeners() : array\n {\n return Event::$listeners;\n }", "function getObserv()\n {\n if (!isset($this->sobserv) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->sobserv;\n }", "function getObserv()\n {\n if (!isset($this->sobserv) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->sobserv;\n }", "public function getImplementedListeners(): iterable;", "public function getEvents() { return $this->_events; }", "public function behaviors() {\n\t\treturn $this->Behaviors;\n\t}", "public static function getSubscribedEvents() {\n return [];\n }", "public function observer()\n {\n return $this->belongsTo(Observer::class);\n }", "public function subs() {\n return self::$instance->subs;\n }", "public function events()\r\n {\r\n if (!$this->events instanceof EventCollection) {\r\n $this->setEventManager(new EventManager(array(\r\n __CLASS__, \r\n get_called_class(),\r\n 'ze-auth'\r\n )));\r\n $this->attachDefaultListeners();\r\n }\r\n return $this->events;\r\n }", "public function GetDeviceNotifications()\n {\n return $this->deviceNotifications;\n }", "protected function _readObserversQueue() {\n if (Zend_Registry::isRegistered('observers_queue')) {\n $observerQueue = Zend_Registry::get('observers_queue');\n } else {\n $observerQueue = array();\n }\n\n\t\t$modelClassName = get_called_class();\n if (array_key_exists($modelClassName, $observerQueue) && !empty($observerQueue[$modelClassName])){\n foreach ($observerQueue[$modelClassName] as $observer) {\n if(Zend_Loader_Autoloader::getInstance()->suppressNotFoundWarnings(true)->autoload($observer)) {\n $this->registerObserver(new $observer());\n } else {\n if(Tools_System_Tools::debugMode()) {\n error_log('Unable to load an observer from the queue: ' . $observer);\n }\n }\n }\n }\n\n }", "public function getAll()\n {\n $listeners = [];\n\n // Get a clone of the queue.\n $queue = $this->getIterator();\n\n foreach ($queue as $listener) {\n $listeners[] = $listener;\n }\n\n unset($queue);\n return $listeners;\n }", "public static function get_subscribed_events() {\r\n\t\treturn [\r\n\t\t\t'rocket_buffer' => [\r\n\t\t\t\t[ 'extract_ie_conditionals', 1 ],\r\n\t\t\t\t[ 'inject_ie_conditionals', 34 ],\r\n\t\t\t],\r\n\t\t];\r\n\t}", "function getHandlers()\n {\n eval(PUBSUB_MUTATE);\n return $this->_handlers;\n }", "public function setObservers($observers)\n {\n $this->observers = $observers;\n\n return $this;\n }", "function getEvents() {\n return [];\n }", "public function getAppenders() {\n\t\treturn $this->appenders;\n\t}", "public function getCachedSubscribersAttribute(): Collection\n {\n return Cache::remember($this->cacheKey().':subscribers', 10, function () {\n return $this->subscribers()->latest()->get();\n });\n }", "public function getTxObservaciones()\n\t{\n\t\treturn $this->tx_observaciones;\n\t}", "public function getComponents() {\n return $this->components;\n }", "public function getExtensions()\n {\n return $this->extensions;\n }", "public function getExtensions()\n {\n return $this->extensions;\n }", "public function getExtensions()\n {\n return $this->extensions;\n }", "public function getExtensions()\n {\n return $this->extensions;\n }", "public function all()\n {\n return $this->subscriptions;\n }", "public function getEvents();", "public function getEvents();", "public function getDispatcherEvents()\n\t{\n\t\treturn $this->dispatcher;\n\t}", "public function callbacks() {\n\n\t\t$callbacks = get_class_methods( __CLASS__ );\n\n\t\tunset( $callbacks [ __METHOD__ ] );\n\n\t\treturn $callbacks;\n\n\t}", "public function getChannels()\n {\n return $this->channels;\n }", "public function getSubscribedEvents()\n {\n return [\n 'postPersist',\n 'postUpdate',\n 'preRemove',\n ];\n }", "public function getSubscribedEvents()\n {\n return [\n 'postPersist',\n 'postUpdate',\n 'preRemove',\n ];\n }", "public function event_notification_methods_data_provider()\n {\n return array(\n array(ImplementationNotifierDataClassListener::BEFORE_DELETE), \n array(ImplementationNotifierDataClassListener::BEFORE_CREATE), \n array(ImplementationNotifierDataClassListener::BEFORE_SET_PROPERTY), \n array(ImplementationNotifierDataClassListener::BEFORE_UPDATE), \n array(ImplementationNotifierDataClassListener::AFTER_DELETE), \n array(ImplementationNotifierDataClassListener::AFTER_CREATE), \n array(ImplementationNotifierDataClassListener::AFTER_SET_PROPERTY), \n array(ImplementationNotifierDataClassListener::AFTER_UPDATE), \n array(ImplementationNotifierDataClassListener::GET_DEPENDENCIES));\n }", "public function getChannels()\n {\n return $this->Channels;\n }", "public function getObservacion()\r\n {\r\n return $this->Observacion;\r\n }", "public function getSubscribedEvents()\n {\n return [\n Events::postFlush,\n Events::preRemove\n ];\n }", "public function getEventDispatcher()\n\t{\n\t\treturn $this->neoeloquent->getEventDispatcher();\n\t}", "public function getSubscribedEvents()\n {\n return [\n Events::postPersist,\n Events::postUpdate,\n Events::preRemove,\n ];\n }", "public function getUpdates() {\n\t\treturn AddonManager::getUpdates($this);\n\t}", "public function getObjects()\n {\n return $this->objects;\n }", "public function getSubscribedEvents()\n {\n return [\n Events::postUpdate,\n Events::postPersist,\n Events::preRemove\n ];\n }", "function getPlugins() {\n\n return $this->plugins;\n\n }", "public function getSystemEvents()\n {\n return $this->systemEvents;\n }", "public function getObservacao()\n {\n return $this->observacao;\n }", "public function getSubscribedEvents()\n {\n return [\n 'preUpdate',\n 'prePersist',\n 'preRemove',\n 'preFlush',\n 'postFlush',\n 'postPersist',\n 'postUpdate',\n 'postRemove',\n 'postLoad',\n 'onFlush',\n ];\n }", "public function countObservers() : int\n {\n\n return \\count( $this->_observers );\n\n }", "public function getEvents()\n {\n $events = [];\n foreach ($this->servers as $server) {\n $serverEvents = $server->getEvents();\n if (empty($serverEvents))\n continue;\n $events = array_merge($events, $serverEvents);\n }\n\n return $events;\n }", "function getEventListeners()\n {\n $listeners = array();\n \n $listener = new Listener($this);\n \n $listeners[] = array(\n 'event' => RoutesCompile::EVENT_NAME,\n 'listener' => array($listener, 'onRoutesCompile')\n );\n\n $listeners[] = array(\n 'event' => GetAuthenticationPlugins::EVENT_NAME,\n 'listener' => array($listener, 'onGetAuthenticationPlugins')\n );\n\n return $listeners;\n }", "public function getSubEvents()\n {\n return $this->subEvents;\n }", "public function getCot_observaciones(){\n return $this->cot_observaciones;\n }", "public function notifications()\n {\n return $this->morphMany(Notification::class, 'notificable');\n }" ]
[ "0.8706012", "0.8706012", "0.84819514", "0.8188519", "0.74312025", "0.7168714", "0.71632785", "0.6904595", "0.6642985", "0.6642676", "0.66323316", "0.6561525", "0.6549337", "0.6512406", "0.64812803", "0.6333697", "0.6272465", "0.6260663", "0.6260663", "0.62135774", "0.6192441", "0.6192441", "0.613398", "0.609224", "0.60046834", "0.59729975", "0.59691983", "0.59525687", "0.5938053", "0.59369344", "0.5908375", "0.59008974", "0.59008974", "0.59008974", "0.59008974", "0.59008974", "0.59008974", "0.59008974", "0.59008974", "0.5862263", "0.5850391", "0.5843823", "0.58323485", "0.5830028", "0.5828991", "0.58229333", "0.5760634", "0.5740563", "0.5734214", "0.5726932", "0.5726932", "0.5691189", "0.56877625", "0.56807816", "0.5607873", "0.5585103", "0.5559939", "0.5550627", "0.5537243", "0.5510991", "0.5491742", "0.5483071", "0.5480132", "0.5477412", "0.54636765", "0.5444476", "0.54439783", "0.54291254", "0.5412922", "0.54092026", "0.54092026", "0.54092026", "0.54092026", "0.5388985", "0.538424", "0.538424", "0.5382946", "0.53747314", "0.5360376", "0.5358871", "0.5358871", "0.53569704", "0.5350797", "0.53408074", "0.5333933", "0.5332262", "0.5302128", "0.5299778", "0.5290299", "0.5287902", "0.5281204", "0.5281046", "0.52775776", "0.52700734", "0.5265762", "0.5262866", "0.52603734", "0.5257246", "0.5255698", "0.5251632" ]
0.89210606
0
Attach a new observer to the list of observers.
public function attach(Observer $observer) { $this->observers[] = $observer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function attach( $observer )\r\n {\r\n $this->observers []= $observer;\r\n }", "public function add($observer){\n $this->observers[] = $observer;\n }", "public function attach(Observer $observer) {\n $this->observers[] = $observer;\n }", "function attach( &$observer)\r\n\t{\r\n\t\tif (is_object($observer))\r\n\t\t{\r\n\t\t\t$class = get_class($observer);\r\n\t\t\tforeach ($this->_observers as $check) {\r\n\t\t\t\tif (is_a($check, $class)) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->_observers[] =& $observer;\r\n\t\t} else {\r\n\t\t\t$this->_observers[] =& $observer;\r\n\t\t}\r\n\t}", "function attach(Observer $observer_in) {\n $this->observers[] = $observer_in;\n }", "public function attach($observer)\n {\n $observerKey = spl_object_hash($observer);\n $this->observers[$observerKey] = $observer;\n }", "function addObserver(Observer $observer_in) {\n $this->observers[] = $observer_in;\n }", "function attach(AbstractObserver $observer)\n {\n $this->observers[] = $observer;\n\n }", "public function attach(SplObserver $observer){\n $id = spl_object_hash($observer);\n $this->observers[$id] = $observer;\n }", "public function attach(SplObserver $observer) {\n\t\tarray_push($this->_observers, $observer);\n\t\t$this->notify();\n\t}", "public function registerObserver($observer)\n {\n $this->observers[] = $observer;\n }", "public function attachObserver(ISimulatorObserver $observer) {\r\n \t$this->_observers[] = $observer;\r\n }", "public function attach(\\SplObserver $observer) {}", "public function attach(\\SplObserver $observer) {}", "public function attach(\\SplObserver $observer) {}", "public function attach(\\SplObserver $observer) {}", "public function attach(\\SplObserver $observer) {}", "public function attach(\\SplObserver $observer) {}", "private function add_observers( $observers, $subject ) {\n \n if ( is_array( $observers ) ) {\n \n foreach ( $observers as $observer) {\n \n if ( class_exists( $observer ) ) {\n \n $subject->attach( new $observer() );\n \n }\n }\n \n }\n \n }", "public function attach(SplObserver $observer)\n {\n $this->_observers->attach($observer);\n }", "public function bindObserver($observer)\n\t{\n\t\t$file = dirname(__FILE__) . '/Observer/' . $observer . '.php';\n\t\tif(file_exists($file)){\n\t\t\trequire_once($file);\n\t\t\t$obj = new $observer($this->CI, $this->config);\n\t\t\tif($obj instanceof ObserverInterface){\n\t\t\t\t$this->observers[] = $obj;\n\t\t\t}\n\t\t}\n\t}", "public function attach( \\SplObserver $observer )\n {\n $this->_storage->attach( $observer );\n }", "function attach(ftpClientObserver $observer) {\r\n\t\t$this->_listeners[$observer->getId()] = $observer;\r\n\t\treturn true;\r\n\t}", "public function attach(\\SplObserver $observer)\n {\n $this->storage->attach($observer);\n }", "public function attach(ObserverInterface $observer)\n {\n $observers = $this->getObservers();\n\n foreach ($observer->getEvents() as $event) {\n $observers[$event][] = $observer;\n }\n\n $this->setObservers($observers);\n }", "public function observers();", "public function AddObserver(object $objObserver) {\n if(method_exists($objObserver,\"On\")) {\n $this->_arrObservers[] = $objObserver;\n }\n }", "public function addObserver(WorkflowObserverInterface $observer)\n {\n $this->observers[] = $observer;\n }", "function attach(&$observer, $eventIDArray)\n {\n foreach ($eventIDArray as $eventID) {\n $nameHash = md5(get_class($observer) . $eventID);\n base::setStaticObserver($nameHash, array('obs' => &$observer, 'eventID' => $eventID));\n }\n }", "public function attach($event, Event_ObserverInterface $observer) {\r\n\t\t$this->_eventObservers[$event][] = $observer;\r\n\t}", "public static function attachStaticObserver(TA_Model_Observer_Interface $o)\n\t{\n\t\tarray_push(self::$_observers, $o);\n\t}", "public function notify()\n {\n $eventName = $this->getEventName();\n if (empty($this->observers[$eventName])) {\n $observerNames = Model::factory('Observer')->getByEventName($eventName);\n foreach ($observerNames as $observerName) {\n $this->observers[$eventName][] = new $observerName();\n }\n }\n if (!empty($this->observers[$eventName])) {\n foreach ($this->observers[$eventName] as $observer) {\n $observer->update($this);\n }\n }\n }", "public function notify(){\n foreach ($this->observers as $observer){\n $observer->update();\n }\n }", "public function attach(EventObserver $observer,int $priority=0){\r\n $name=$observer->eventName();\r\n if (is_string($name))$name=[$name];\r\n foreach ($name as $v) $this->storage[$v][]=array($observer,$priority);\r\n return $this;\r\n }", "public function attach(ObservesProxyLoading $observer) : void;", "function notify()\n {\n foreach ($this->observers as $observer) {\n $observer->update($this);\n }\n }", "public function notify()\n {\n foreach ($this->_observers as $observer) {\n $observer->update($this);\n }\n }", "public function setObservers($observers)\n {\n $this->observers = $observers;\n\n return $this;\n }", "public function attachObserver(Delegate_1 $d)\n\t{\n\t\t// get a unique hash for this delegate\n\t\t$hash = spl_object_hash($d);\n\t\t\n\t\t// add to our list of observers\n\t\t$this->observers[$hash] = $d;\n\t}", "public function addObserver(Component $observer) {\n if ($observer->attributeExists('data-equalizer-watch') && $observer->attributes()->getValue('data-equalizer-watch') !== $this->getEqualizerName()) {\n throw new \\Sphp\\Exceptions\\InvalidArgumentException('Observer already watches an equalizer');\n }\n $observer->setAttribute('data-equalizer-watch', $this->getEqualizerName());\n return $this;\n }", "public function notify()\r\n {\r\n foreach( $this->observers as $observer )\r\n $observer->update( $this );\r\n\r\n }", "public function attach(ECP_OverlegObserver $obs){\r\n $i = array_search($obs, $this->observer);\r\n if ($i === false) {\r\n $this->observers[] = $obs;\r\n }\r\n return $this;\r\n }", "public function notify()\n {\n foreach ($this->observers as $observer) {\n $observer->update();\n }\n }", "public function attach(IObservable_1 $model)\n\t{\n\t\t$model->attachObserver($this->delegate);\n\t}", "public function attach(\\SplObserver $observer, $priority = 0) {\n\t\t$this->storage->insert($observer, $priority);\n\t\treturn $this;\n\t}", "function notify()\n {\n foreach ($this->observers as $obKey => $obValue) {\n $obValue->update($this);\n }\n }", "public function notify()\n\t{\n\t\tforeach ($this->observers as $obs)\n\t\t{\n\t\t\t$obs->update($this);\n\t\t}\n\t}", "public function notify()\n {\n foreach ($this->observers as $value) {\n $value->update($this);\n }\n }", "public function notify() {\n\t\tforeach($this->_observers as $key => $val) {\n\t\t\t$val->update($this);\n\t\t}\n\t}", "public function notifyObservers()\n {\n foreach ($this->observers as $obj) {\n $obj->update(\n $this->temperature,\n $this->humidity,\n $this->pressure\n );\n }\n }", "public function notifyObserver()\n {\n if (!empty($this->observers)) {\n foreach ($this->observers as $observer) {\n $observer->update($this->getTemperature(), $this->getPressure(), $this->getHumidity());\n }\n }\n }", "public function observe(\n $id,\n ObserverInterface $observer,\n $priority = SubjectInterface::FIRST_PRIORITY\n ) {\n $this->getSubject($id)->registerObserver($observer, $priority);\n }", "public function notify()\n {\n foreach($this->_storage AS $observer) {\n $observer->update($this);\n }\n }", "public static function observe( &$varname )\n\t\t{\n\t\t\t$this->observer_list[] =& $var;\n\t\t}", "public function notify() {\n // Updates all classes subscribed to this object\n foreach ($this->observers as $obs) {\n $obs->update($this);\n }\n }", "protected function registerEloquentObservers()\n {\n App\\User::observe(Observers\\UserObserver::class);\n }", "public function on($name, $observer, array $config = array())\n {\n if (!isset($this->events[$name])) {\n $this->events[$name] = array();\n }\n\n if (Arr::get($config, 'prepend', false)) {\n Arr::unshift($this->events, $observer, $config);\n } else {\n $this->events[$name][$observer] = $config;\n }\n\n return $this;\n }", "public function attach(SplObserver $obj)\n\t{\n\t\tif ( ! ($obj instanceof Calendar_Event_Observer))\n\t\t\tthrow new Eight_Exception('eventable.invalid_observer', get_class($obj), get_class($this));\n\n\t\t// Add a new listener\n\t\t$this->listeners[spl_object_hash($obj)] = $obj;\n\n\t\treturn $this;\n\t}", "public function notify() {\n $this->observers->rewind();\n while($this->observers->valid()) {\n $object = $this->observers->current();\n // dump($object);die;\n $object->update($this);\n $this->observers->next();\n }\n }", "public function createObserver(SubjectInterface $subject);", "public function attachEventListeners( Observable $observable )\n\t{\n\t\tforeach ( array( 'update', 'open', 'delete', 'after_delete', 'after_update', 'dispense' ) as $eventID ) {\n\t\t\t$observable->addEventListener( $eventID, $this );\n\t\t}\n\t}", "public function canAppendAValueToObservers()\n {\n $object0 = $this->getMock('ATM_Config_Abstract', array('getName'));\n $object1 = $this->getMock('ATM_Config_Comment', array(), array('comment'));\n $this->object->append($object0);\n $this->object->append($object1);\n $collection = $this->object->filterClasses(get_class($object0));\n $collection->append($object0, true);\n $this->assertEquals(2, count($collection));\n $this->assertEquals(3, count($this->object));\n $this->assertSame($object0, $this->object[2]);\n }", "public function notifyObservers() {\n\t\tforeach ( $this->observers as $obs => $key )\n\t\t\t$key->update ( $this->actTemp, $this->maxTemp, $this->minTemp, $this->actPressure );\n\t}", "public function addAnalogPinObserver(Device\\PinObserver $observer)\n {/*{{{*/\n $this->_analogPinObservers[] = $observer;\n }", "public function detach( $observer )\r\n {\r\n $this->observers []= $observer; // an an observer to the observer subject.\r\n }", "public function observers()\n {\n return $this->observers;\n }", "public function addDigitalPinObserver(Device\\PinObserver $observer)\n {/*{{{*/\n $this->_digitalPinObservers[] = $observer;\n }", "private function addModuleObservers( Core_Module $module )\n\t{\n\t\t$hooks = $module->getListHooksRegistered();\n\t\t\n\t\tforeach($hooks as $hookName => $methodToCall)\n\t\t{\n\t\t\t$this->dispatcher->addObserver( array( $module, $methodToCall), $hookName );\n\t\t}\n\t}", "public function notifyObservers() {\n \n // Iterate through observer list\n foreach ($this->observers as $observer) {\n \n // Call notify on observer\n $observer->notify();\n \n }\n \n // Implement fluent interface\n return $this;\n }", "public static function attachAllObservers(JObservableInterface $observableObject)\n\t{\n\t\t$observableClass = get_class($observableObject);\n\n\t\twhile ($observableClass != false)\n\t\t{\n\t\t\t// Attach applicable Observers for the class to the Observable subject:\n\t\t\tif (isset(static::$observations[$observableClass]))\n\t\t\t{\n\t\t\t\tforeach (static::$observations[$observableClass] as $observerClass => $params)\n\t\t\t\t{\n\t\t\t\t\t// Attach an Observer to the Observable subject:\n\t\t\t\t\t/**\n\t\t\t\t\t * @var JObserverInterface $observerClass\n\t\t\t\t\t */\n\t\t\t\t\t$observerClass::createObserver($observableObject, $params);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Get parent class name (or false if none), and redo the above on it:\n\t\t\t$observableClass = get_parent_class($observableClass);\n\t\t}\n\t}", "private function registerSubscribers()\n {\n $extensions = $this->dataGridFactory->getExtensions();\n\n foreach ($extensions as $extension) {\n $extension->registerSubscribers($this);\n }\n }", "public function attachAllHitStatObservers()\n\t{\n\t\t$event_log = new Stats_OLP_Observe_Eventlog();\n\t\t$event_log->observeHitStat($this);\n\t}", "public function notify( mixed $extras = null ) : IObservable\n {\n\n if ( 1 < \\count( $this->_cache ) )\n {\n $this->_cache[] = $extras;\n }\n else\n {\n $this->_cache = $extras;\n }\n\n foreach ( $this->_observers as $ob )\n {\n $ob->onUpdate( $this, $this->_cache );\n }\n\n $this->_cache = [];\n\n return $this;\n\n }", "public static function getObservers()\n\t{\n\t\t$observers = self::$_observers;\n\t\treturn $observers;\n\t}", "public function observe() {}", "public static function ReconfigureObservers()\r\n\t\t{\r\n\t\t\tif (!self::$observersSetuped)\r\n\t\t\t\tself::setupObservers();\r\n\t\t\t\r\n\t\t\tforeach (self::$EventObservers as &$observer)\r\n\t\t\t{\r\n\t\t\t\tif (method_exists($observer, \"__construct\"))\r\n\t\t\t\t\t$observer->__construct();\r\n\t\t\t}\r\n\t\t}", "public function get_observers() : array\n\t{\n\t\treturn $this->_observers;\n\t}", "public function notify()\n {\n foreach ($this->storage as $obs){\n $obs->update($this);\n }\n }", "protected function _readObserversQueue() {\n if (Zend_Registry::isRegistered('observers_queue')) {\n $observerQueue = Zend_Registry::get('observers_queue');\n } else {\n $observerQueue = array();\n }\n\n\t\t$modelClassName = get_called_class();\n if (array_key_exists($modelClassName, $observerQueue) && !empty($observerQueue[$modelClassName])){\n foreach ($observerQueue[$modelClassName] as $observer) {\n if(Zend_Loader_Autoloader::getInstance()->suppressNotFoundWarnings(true)->autoload($observer)) {\n $this->registerObserver(new $observer());\n } else {\n if(Tools_System_Tools::debugMode()) {\n error_log('Unable to load an observer from the queue: ' . $observer);\n }\n }\n }\n }\n\n }", "public static function addObserverClassToClass($observerClass, $observableClass, $params = array())\n\t{\n\t\tif ($params !== false)\n\t\t{\n\t\t\tstatic::$observations[$observableClass][$observerClass] = $params;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tunset(static::$observations[$observableClass][$observerClass]);\n\t\t}\n\t}", "public function _insert()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "public static function observe(prototype\\Prototype $prototype, callable $callback, array $acceptList=null) :void\n {\n if ( !isset(self::$observers) ) {\n self::$observers = new \\SplObjectStorage();\n }\n if ( !isset(self::$observers[$prototype]) ) {\n self::$observers[$prototype] = [];\n }\n if ( !isset($acceptList) ) {\n $acceptList = ['add','update','delete','reconfigure'];\n }\n $observers = self::$observers[$prototype];\n foreach( $acceptList as $acceptType ) {\n if ( !isset($observers[$acceptType]) ) {\n $observers[$acceptType] = new \\SplObjectStorage();\n }\n $observers[$acceptType][$callback] = true;\n }\n self::$observers[$prototype] = $observers;\n }", "public function getObservers()\n {\n return $this->observers;\n }", "public function getObservers()\n {\n return $this->observers;\n }", "public function attach_criteria(completion_criteria $criteria) {\n $this->_criteria = $criteria;\n }", "function isAttached(ftpClientObserver $observer) {\r\n\t\tif ( isset($this->_listeners[$observer->getId()]) ) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function attach(EventManagerInterface $events) {\n $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH, __CLASS__ . '::onDispatch', 1000);\n }", "public function registerWishlistChange(Varien_Event_Observer $observer)\n {\n if (Mage::helper('core')->isModuleEnabled('Enterprise_Wishlist') &&\n Mage::helper('enterprise_wishlist')->isMultipleEnabled()) {\n /** @var Mage_Wishlist_Model_Wishlist $wishlist */\n $wishlist = $observer->getEvent()->getObject();\n $wishlistId = $wishlist->getId();\n if ($wishlistId) {\n try {\n $websiteId = $this->getWishlistOwnerWebsiteId($wishlist);\n /** @var Oro_Api_Model_Wishlist_Status $wishlistStatus */\n $wishlistStatus = Mage::getModel('oro_api/wishlist_status')\n ->setWishlistId($wishlistId)\n ->setWebsiteId($websiteId)\n ->setDeletedAt(Mage::getSingleton('core/date')->gmtDate());\n $wishlistStatus->save();\n } catch (Exception $e) {\n Mage::log($e->getMessage());\n }\n }\n }\n\n return $this;\n }", "function attached(&$observer)\n {\n return isset($this->observers[$observer->getHashCode()]);\n }", "public function attach(EventManagerInterface $events)\n {\n $this->listeners[] = $events->attach('get.pre', array($this, 'load'), 100);\n $this->listeners[] = $events->attach('get.post', array($this, 'save'), -100);\n }", "private function addPluginObservers( Piwik_Plugin $plugin )\n\t{\n\t\t$hooks = $plugin->getListHooksRegistered();\n\n\t\tforeach($hooks as $hookName => $methodToCall)\n\t\t{\n\t\t\t$this->dispatcher->addObserver( array( $plugin, $methodToCall), $hookName );\n\t\t}\n\t}", "public function registerTags(Varien_Event_Observer $observer) {\n /**\n * @var $engine Brim_PageCache_Model_Engine\n */\n\n $engine = Mage::getSingleton('brim_pagecache/engine');\n\n if (!$engine->isEnabled()) {\n return;\n }\n\n $tags = array();\n $event = $observer->getEvent();\n $block = $event->getBlock();\n\n // Add CMS Page Tag\n if ($block instanceof Mage_Cms_Block_Page && ($page = $block->getPage()) != null) {\n $tags[] = Brim_PageCache_Model_Engine::FPC_TAG . '_CMS_PAGE_' . $page->getId();\n }\n\n if (count($tags) > 0) {\n $engine->devDebug(__METHOD__, $tags);\n $engine->registerPageTags($tags);\n }\n }", "public function attach(EventManagerInterface $events, $priority = 400)\n {\n $this->listeners[] = $events->attach(ViewEvent::EVENT_RENDERER, [$this, 'selectRenderer'], $priority);\n $this->listeners[] = $events->attach(ViewEvent::EVENT_RESPONSE, [$this, 'injectResponse'], $priority);\n }", "public function attach(EventManagerInterface $eventManager, $priority = 1)\n {\n $this->listeners[] = $eventManager->attach(Event::EVENT_DETECT, [$this, 'detect'], $priority);\n $this->listeners[] = $eventManager->attach(Event::EVENT_FOUND, [$this, 'found'], $priority);\n $this->listeners[] = $eventManager->attach(Event::EVENT_ASSEMBLE, [$this, 'assemble'], $priority);\n }", "protected function attachHandlers()\n { \n foreach ($this->dataCollectors as $dataCollector) {\n $this->eventsManager->attach($dataCollector->getListenerType(), $dataCollector);\n }\n \n $this->eventsManager->attach('view:beforeRender', function($event, $view){\n $this->di->get('assets')\n ->addCss('assets/css/profiler.css')\n ->addJs('assets/js/profiler.js')\n ;\n $view->setVar('profilerRequestId', $this->storage->getRequestId());\n });\n \n // Profiled request details writer\n $this->eventsManager->attach('view:afterRender', function() {\n if (static::$profilerModuleName === $this->di->getShared('dispatcher')->getModuleName()) {\n return;\n }\n $this->storage->store($this);\n });\n }", "public function attach(EventManagerInterface $eventManager, $priority = 100)\n {\n $shared = $eventManager->getSharedManager();\n $this->listeners[] = '???';\n }", "public function detach(\\SplObserver $observer) {}", "public function testUpdateObserver() {\n\t\t$this->testSave();\n\t\t/** @var \\arConnector $observerConnector */\n\t\t$observerConnector = Mockery::namedMock(\"observerConnectorMock\", \\arConnector::class);\n\n\t\t\\arConnectorMap::register(new BucketContainer(), $observerConnector);\n\n\t\t// Observer is updated after tasks are added.\n\t\t$observerConnector->shouldReceive(\"read\")->once()->andReturn(1);\n\t\t$observerConnector->shouldReceive(\"update\")->once()->andReturn(true);\n\n\t\t$this->persistence->setConnector($observerConnector);\n\t\t$this->persistence->updateBucket($this->bucket);\n\t}", "public function attach(EventManagerInterface $events)\n {\n $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH, [$this, 'onDispatch'], 2);\n }", "public function removeObserver() {\n //$this->__observers = array();\n foreach($this->__observers as $obj) {\n unset($obj);\n }\n }" ]
[ "0.7820493", "0.7818284", "0.7745597", "0.7601909", "0.74209553", "0.7416625", "0.7415615", "0.73693126", "0.7364559", "0.73460317", "0.7197385", "0.71633446", "0.7152962", "0.7152962", "0.7152962", "0.7152944", "0.7152944", "0.7152944", "0.70528364", "0.69975406", "0.6718772", "0.6636573", "0.6630026", "0.660941", "0.6550727", "0.6508109", "0.6504082", "0.64978594", "0.64320374", "0.6381146", "0.6177967", "0.604135", "0.5983719", "0.5983413", "0.5898945", "0.58304435", "0.5819891", "0.5819098", "0.5818704", "0.58102", "0.58080524", "0.5797332", "0.5795311", "0.5774319", "0.575981", "0.572779", "0.5717851", "0.5697296", "0.5676107", "0.56614345", "0.5644731", "0.55673075", "0.5565707", "0.55382913", "0.55001783", "0.54663044", "0.54547906", "0.5436461", "0.53903574", "0.53745276", "0.53503656", "0.52908105", "0.5260755", "0.5211557", "0.51996833", "0.5152434", "0.50847983", "0.5045648", "0.50367427", "0.50247866", "0.5004251", "0.5002901", "0.498159", "0.4919785", "0.49070093", "0.48741716", "0.48704764", "0.48597315", "0.4838761", "0.48325983", "0.48276928", "0.48257482", "0.481648", "0.481648", "0.48093784", "0.4786222", "0.47665668", "0.4762713", "0.47240302", "0.47142193", "0.4713886", "0.46988162", "0.46915907", "0.46844882", "0.46791056", "0.46606484", "0.465448", "0.465135", "0.4640643", "0.46399105" ]
0.76717025
3
Detach an observer from the list of observers.
public function detach(Observer $observer) { if (($key = array_search($observer, $this->observers, true)) !== false) { unset($this->observers[$key]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function detach(Observer $observer) {\n foreach ($this->observers as $key => $obs) {\n if ($observer == $obs) {\n unset($this->observers[$key]);\n break;\n }\n }\n }", "public function detach(Observer $observer)\n\t{\n\t\tunset($this->_observers[array_search($observer, $this->_observers)]);\n\t}", "public function detach($observer)\n {\n $observerKey = spl_object_hash($observer);\n unset($this->observers[$observerKey]);\n }", "public function detach(SplObserver $observer){\n $id = spl_object_hash($observer);\n unset($this->observers[$id]);\n }", "public function removeObserver() {\n //$this->__observers = array();\n foreach($this->__observers as $obj) {\n unset($obj);\n }\n }", "function detach(AbstractObserver $observer)\n {\n foreach($this->observers as $okey => $oval) {\n if ($oval == $observer) {\n unset($this->observers[$okey]);\n }\n }\n }", "function detach(Observer $observer_in) {\n //or\n //$this->observers = array_diff($this->observers, array($observer_in));\n //or\n foreach($this->observers as $okey => $oval) {\n if ($oval == $observer_in) {\n unset($this->observers[$okey]);\n }\n }\n }", "public function detach( $observer )\r\n {\r\n $this->observers []= $observer; // an an observer to the observer subject.\r\n }", "public function detach(\\SplObserver $observer) {}", "public function detach(ObserverInterface $observer)\n {\n $observers = $this->getObservers();\n\n foreach ($observer->getEvents() as $event) {\n $count = count($observers[$event]);\n\n for ($i = 0; $i < $count; $i++) {\n if ($observers[$event][$i] == $observer) {\n unset($observers[$event][$i]);\n }\n }\n }\n\n $this->setObservers($observers);\n }", "public function detach(SplObserver $observer)\n {\n $this->_observers->detach($observer);\n }", "public function detach(\\SplObserver $observer)\n {\n $this->storage->detach($observer);\n }", "public function detach( \\SplObserver $observer )\n {\n $this->_storage->detach( $observer );\n }", "public function removeObserver($observer)\n {\n if (in_array($observer, $this->observers)) {\n $key = array_search($observer, $this->observers);\n if (!empty($this->observers[$key])) {\n unset($this->observers[$key]);\n }\n }\n }", "public function detach($observer)\n\t{\n // Not implemented here\n }", "public function detach($event, Event_ObserverInterface $observer) {\r\n\t\tif (isset($this->_eventObservers[$event])) {\r\n\t\t\t$key = array_search($observer, $this->_eventObservers[$event], true);\r\n\t\t\tif ($key !== false) {\r\n\t\t\t\tarray_splice($this->_eventObservers[$event], $key, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function detach(\\SplObserver $observer) {\n\t\treturn $this->storage->delete($observer);\n\t}", "public function unsubscribe( ?IObserver $observer = null ) : IObservable\n {\n\n for ( $i = 0, $c = \\count( $this->_observers ); $i < $c; $i++)\n {\n if ( $observer === $this->_observers[ $i ] )\n {\n unset( $this->_observers[ $i ] );\n }\n }\n\n $this->_observers = array_values( $this->_observers );\n\n return $this;\n\n }", "public function detach(ObservesProxyLoading $observer) : void;", "public function detachObserver(Delegate_1 $d)\n\t{\n\t\t// detach this observer\n\t\t$hash = spl_object_hash($d);\n\t\tunset($this->observers[$hash]);\n\t}", "function detach($observer, $eventIDArray)\n {\n foreach ($eventIDArray as $eventID) {\n $nameHash = md5(get_class($observer) . $eventID);\n base::unsetStaticObserver($nameHash);\n }\n }", "public function detach(EventObserver $observer):bool{\r\n $name=$observer->eventName();\r\n if (is_string($name))$name=[$name];\r\n $deatch=0;\r\n foreach ($name as $v){\r\n foreach ($this->storage[$v]??[] as $k=>$ob){\r\n if($ob[0]===$observer){\r\n unset($this->storage[$v][$k]);\r\n $deatch++;\r\n }\r\n }\r\n }\r\n return $deatch;\r\n }", "public function detach(SplObserver $obj)\n\t{\n\t\t// Remove the listener\n\t\tunset($this->listeners[spl_object_hash($obj)]);\n\n\t\treturn $this;\n\t}", "function detach(ftpClientObserver $observer) {\r\n\t\tif ( !isset($this->_listeners[$observer->getId()]) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tunset($this->_listeners[$observer->getId()]);\r\n\t\treturn true;\r\n\t}", "public function detach(EventManagerInterface $events)\r\n {\r\n foreach ($this->listeners as $index => $listener) {\r\n if ($events->detach($listener)) {\r\n unset($this->listeners[$index]);\r\n }\r\n }\r\n }", "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($listener[$index]);\n }\n }\n }", "public function removeObserver(Component $observer) {\n $observer->attributes()->remove('data-equalizer-watch');\n return $this;\n }", "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "public function detach(EventManagerInterface $em)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($em->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "public function detach(EventManagerInterface $events)\n {\n array_walk($this->listeners, array($events,'detach'));\n $this->listeners = array();\n }", "public function detach(EventManagerInterface $eventManager)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($eventManager->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "public static function unobserve(prototype\\Prototype $prototype, callable $callback) :void\n {\n if ( isset(self::$observers) && isset(self::$observers[$prototype]) ) {\n unset(self::$observers[$prototype][$callback]);\n }\n }", "public function detach(EventCollection $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "public function detach(): void\n\t{\n\t\t$this->events->detach($this->type, $this->hook);\n\t}", "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $i => $listener) {\n if ($events->getSharedManager()->detach(MainProcessor::EVENT_MANAGER_ID, $listener)) {\n unset($this->listeners[$i]);\n }\n }\n }", "public function off($name, $observer = null)\n {\n if (null === $observer) {\n unset($this->events[$name]);\n } else {\n unset($this->events[$name][$observer]);\n }\n\n return $this;\n }", "public function detachShared(SharedEventManagerInterface $events)\n\t\t{\n\t\t\tforeach ($this->listeners as $index => $listener) {\n\t\t\t if ($events->detach($index, $listener)) {\n\t\t\t\t unset($this->listeners[$index]);\n\t\t\t }\n\t\t }\n\t\t}", "public function unsubscribe(): void;", "public function detachShared(SharedEventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $callback) {\n if ($events->detach('', $callback)) {\n unset($this->listeners[$index]);\n }\n }\n }", "public function removeDigitalPinObserver(Device\\PinObserver $observer)\n {/*{{{*/\n self::_removePinObserver($this->_digitalPinObservers, $observer);\n }", "public function newsletterUnsubscribe($observer)\n {\n $subscriber = $observer->getSubscriber();\n \n $result = Mage::getSingleton('extensions_store_constantcontact/constantcontact')->updateSubscriber($subscriber);\n \n return $observer; \n }", "public function removeEventSubscriber(IEventSubscriber $subscriber);", "public function removeAnalogPinObserver(Device\\PinObserver $observer)\n {/*{{{*/\n self::_removePinObserver($this->_analogPinObservers, $observer);\n }", "public function detach(EventManagerInterface $events)\n {\n $sharedManager = $events->getSharedManager();\n\n foreach ($this->listeners as $index => $listeners) {\n if ($listeners === $this) {\n continue;\n }\n\n if ($listeners instanceof ListenerAggregateInterface) {\n $listeners->detach($events);\n }\n\n $events->detach($listeners);\n }\n\n /** @var array $sharedListeners */\n foreach ($this->sharedListeners as $id => $sharedListeners) {\n foreach ($sharedListeners as $index => $listener) {\n if ($listener === $this) {\n continue;\n }\n\n if ($listener instanceof ListenerAggregateInterface) {\n $listener->detach($events);\n }\n\n $sharedManager->detach($listener, $id);\n }\n }\n }", "public function detach() {}", "public function detach() {}", "public function detach()\n {\n // TODO\n }", "public static function detachStaticObserver(TA_Model_Observer_Interface $o)\n\t{\n\t\tforeach (self::$_observers as $key => $observer) {\n\t\t\tif ($observer == $o) {\n\t\t\t\tself::$_observers[$key] = null;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function detach($eventName, $observerName)\n {\n if (empty($eventName) || empty($observerName)) {\n return false;\n }\n return Model::factory('Observer')->detach($eventName, $observerName);\n }", "public function removeNotifications()\n {\n foreach ($this->notifications as $notification) {\n $notification->delete();\n }\n }", "public function detach()\r\n {\r\n $this->_parentNode->removeChild($this);\r\n }", "public function detach()\n {\n if ($this->getBack()) {\n $this->getBack()->setNext($this->getNext());\n }\n\n if ($this->getNext()) {\n $this->getNext()->setBack($this->getBack());\n }\n }", "public function detach();", "protected function _unsubscribeFromEngineEvents()\n {\n $events = array(\n Streamwide_Engine_Events_Event::SDP,\n Streamwide_Engine_Events_Event::CHILD,\n Streamwide_Engine_Events_Event::OKMOVED,\n Streamwide_Engine_Events_Event::MOVED,\n Streamwide_Engine_Events_Event::FAILMOVED\n );\n \n $controller = $this->getController();\n foreach ( $events as $event ) {\n $controller->removeEventListener( $event, array( 'callback' => array( $this, 'onSignalReceived' ) ) );\n }\n }", "public function detachUsersAndDestroy()\n {\n if ($this->subscribed()) {\n $this->subscription()->cancelNow();\n }\n\n $this->users()\n ->where('current_team_id', $this->id)\n ->update(['current_team_id' => null]);\n\n $this->users()->detach();\n\n $this->delete();\n }", "public function detach($component);", "public function removeAllListeners($eventName);", "public function destroy(UnsubscribeMotive $motive)\n {\n //\n }", "public function clearSubscribers();", "protected function _unsubscribeFromEngineEvents()\n {\n $controller = $this->getController();\n $controller->removeEventListener(\n Streamwide_Engine_Events_Event::ENDOFFAX,\n array( 'callback' => array( $this, 'onEndOfFax' ) )\n );\n $controller->removeEventListener(\n Streamwide_Engine_Events_Event::FAXPAGE,\n array( 'callback' => array( $this, 'onFaxPage' ) )\n );\n }", "public function detachListener(\n $listener,\n /*# string */ $eventName = ''\n )/*# : EventManagerInterface */;", "public function detach()\n {\n // dummy implementation\n }", "public function unregister()\n {\n $previousHandlers = $this->previousHandlers;\n\n foreach ($previousHandlers as $signal => $handler) {\n if (is_null($handler)) {\n pcntl_signal($signal, SIG_DFL);\n\n unset($previousHandlers[$signal]);\n }\n }\n\n $this->setHandlers($previousHandlers);\n }", "public function remove($listener);", "public final function GetObserver()\n {\n return $this->observer;\n }", "public function remSubscriber(IEventSubscriber $Subscriber)\n {\n // Loop through each subscriver event\n foreach ($Subscriber->getSubscribedEvents() as $EventName => $Params) {\n\n // Params is array[]|Traversable[]\n if (is_array($Params) && is_array($Params[0]) ?: $Params[0] instanceof Traversable) {\n\n // Deregister each method\n foreach ($Params as $NewParams) {\n $this->deregister(\n $EventName,\n array(\n $Subscriber,\n $NewParams[0]\n )\n );\n }\n\n // Otherwise, Deregester method\n } else {\n $this->deregister(\n $EventName,\n array(\n $Subscriber,\n is_string($Params) ? $Params : $Params[0]\n )\n );\n }\n }\n }", "public function notifyDisconnected(StreamObserver $observer): void;", "public function forget($event)\n {\n unset($this->listeners[$event], $this->sorted[$event]);\n }", "public static function detaching ($callback, $priority = 0) {\n static::registerModelEvent('detaching', $callback, $priority);\n }", "public function unsubscribe(Subscriber $subscriber)\n\t{\n\t\t$this->getEventEmitter()->unsubscribe($subscriber);\n\t}", "public function detach($enumerator): void\n {\n $this->remove($enumerator);\n }", "public function clearBehaviors()\n\t{\n\t\tif($this->_m!==null)\n\t\t{\n\t\t\tforeach($this->_m->toArray() as $name=>$behavior)\n\t\t\t\t$this->detachBehavior($name);\n\t\t\t$this->_m=null;\n\t\t}\n\t}", "function detach();", "function unextend() {\n if ($this->observation) {\n $this->observation->cancel();\n $this->observation = NULL;\n }\n }", "public function removeObservableEvents($observables)\n {\n $observables = is_array($observables) ? $observables : func_get_args();\n\n $this->observables = array_diff($this->observables, $observables);\n }", "public function detach($callback)\n {\n $this->callbacks = array_filter($this->callbacks, function($handler) use($callback) {\n return $handler['callback'] != $callback;\n });\n\n return $this;\n }", "public function detach($entity)\n {\n $visited = [];\n $this->doDetach($entity, $visited);\n }", "public function destroy(Subscriber $subscriber)\n {\n //\n }", "public function detachArticles()\n {\n $this->model->articles()->detach();\n }", "public function detachFiles() {\r\n\t\t$this->_attachedFiles = null;\r\n\t}", "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $i => $listener) {\n if ($events->detach($listener)) {\n unset($this->listeners[$i]);\n }\n }\n\n return empty($this->listeners);\n }", "public function detachAll() {}", "public function observers();", "public function detach()\n\t{\n\t\tif (null !== $this->shmId) {\n\t\t\tshmop_close($this->shmId);\n\t\t\t$this->shmId = null;\n\t\t}\n\t}", "public function removeSubscribes();", "private function unsubscribe()\n {\n $this->botman->hears('unsubscribe', function(BotMan $bot) {\n $userId = $bot->getUser()->getId();\n Subscriber::where('telegram_user_id', $userId)->delete();\n $bot->reply('You have just unsubscribed from our updates!');\n });\n }", "public function clearListeners()\n {\n $this->listeners = array();\n }", "public function remove() {}", "public function detach()\n {\n return null;\n }", "public function remove() {}", "public function unSubscribe()\n {\n }", "public function cleanCacheByTags(Varien_Event_Observer $observer)\n {\n /** @var $tags array */\n $tags = $observer->getEvent()->getTags();\n if (empty($tags)) {\n Mage::app()->cleanCache();\n return $this;\n }\n\n Mage::app()->cleanCache($tags);\n return $this;\n }", "public function forget($event)\n {\n unset($this->listeners[$event]);\n }", "public function _delete()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "public function onRemove();", "public function unSubscribe()\n {\n $this->disconnect();\n $this->queue = $this->currentEnvelope = null;\n }", "public function remove();" ]
[ "0.82576317", "0.8136378", "0.7937366", "0.7899317", "0.78832656", "0.7800022", "0.7721606", "0.7624079", "0.7622597", "0.7566358", "0.74750525", "0.733576", "0.7317719", "0.7245711", "0.71319586", "0.7009916", "0.69106203", "0.6609986", "0.65475345", "0.6437398", "0.6430881", "0.6356355", "0.61851287", "0.60559875", "0.60073256", "0.5966593", "0.5900076", "0.5833134", "0.5833134", "0.5833134", "0.5833134", "0.5789845", "0.5738784", "0.5738664", "0.5726451", "0.55765086", "0.5575285", "0.5550786", "0.5545157", "0.5540614", "0.54905367", "0.54559934", "0.5392545", "0.5273487", "0.5267045", "0.5250868", "0.5234514", "0.51924914", "0.51924914", "0.5187637", "0.5171531", "0.5093847", "0.5086007", "0.5068145", "0.5036861", "0.50302285", "0.5023155", "0.4963976", "0.49381545", "0.49241558", "0.49188218", "0.49136505", "0.49128437", "0.48960721", "0.48916513", "0.48797333", "0.48774356", "0.48076668", "0.48014507", "0.47846612", "0.47817513", "0.47668505", "0.47374022", "0.473399", "0.471141", "0.46842578", "0.46658584", "0.4661527", "0.4661337", "0.46445343", "0.46374714", "0.4618789", "0.45946398", "0.4590289", "0.45890877", "0.45591626", "0.45273104", "0.45129558", "0.4499506", "0.44767347", "0.44696608", "0.44691667", "0.44687045", "0.44595408", "0.44511396", "0.44447392", "0.4441531", "0.4433546", "0.44322872", "0.4429931" ]
0.82060266
1
declare saveXML methods for all CurrencyXML classes
public function SaveXMLFile();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveXML(){\r\n return $this->xml->saveXML();\r\n }", "private function _saveExt() {\r\n\r\n }", "function saveToXML( $filename, $xml = null ){\n\t\tif( ! $xml ){\n\t\t\t$xml = $this->xml;\n\t\t}\n\t\t$xml->asXML( $filename );\n\t}", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "public abstract function save();", "public function write($xml);", "public function save(){ \r\n return $this->xmlfile->save($this->absolutepath);\r\n }", "private function writeCurrenciesToFile() {\n createFile(\n \"currencies.xml\",\n $this->currencies[0]->asXML()\n );\n }", "public function toXML();", "public function saveSO() {\n // Setup XML\n $xml = \"<FbiXml>\".\n \" <Ticket>\".\n \" <Key></Key>\".\n \" </Ticket>\".\n \"<FbiMsgsRq>\". \n \" <SOSaveRq>\\n\".\n\t\t\t\t\"\t\t\t\t\t<SalesOrder>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<Salesman>admin</Salesman>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<Number>60312</Number>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<Status>10</Status>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<Carrier>Will Call</Carrier>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<FirstShipDate>2016-08-29T00:00:00</FirstShipDate>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<CreatedDate>2016-08-29T00:00:00</CreatedDate>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<IssuedDate>2016-08-29T16:48:56</IssuedDate>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<TaxRatePercentage>0.0625</TaxRatePercentage>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<TaxRateName>Utah</TaxRateName>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<ShippingTerms>Prepaid </ShippingTerms>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<PaymentTerms>COD</PaymentTerms>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<CustomerContact>Beach Bike</CustomerContact>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<CustomerName>Beach Bike</CustomerName>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<FOB>Origin</FOB>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<QuickBooksClassName>Salt Lake City</QuickBooksClassName>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<LocationGroup>AYC</LocationGroup>\\n\".\t\t\t\t\n\t\t\t\t\"\t\t\t\t\t\t<BillTo>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t <Name>test</Name>\\n\".\n \" <AddressField>555 Suntan Ave.</AddressField>\".\n\t\t\t\t\" <City>Santa Barbara</City>\".\n\t\t\t\t\" \t <Zip>93101</Zip>\". \n\t\t\t\t\"\t\t\t\t\t\t</BillTo>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<Ship>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t <Name>test</Name>\\n\".\n \" <AddressField>555 Suntan Ave.</AddressField>\".\n\t\t\t\t\" \t <Zip>93101</Zip>\".\n\t\t\t\t\" <Country>US</Country>\". \n\t\t\t\t\" <State>California</State>\". \n\t\t\t\t\"\t\t\t\t\t\t</Ship>\\n\";\n\t\t//foreach ($data['soitems'] AS $key=>$value) {\n\t\t\t$xml .=\"\t\t\t\t\t<SalesOrderItem>\\n\n\t\t\t\t\t\t\t\t\t\t <ID>-1</ID>\\n\n\t\t\t\t\t\t\t\t\t\t <ProductNumber>00-KIN-APPHDR-057</ProductNumber>\\n\n <SOID>94</SOID>\\n\n <Description>Battery Pack</Description>\n <Taxable>true</Taxable>\\n \n\t\t\t\t\t\t\t\t\t\t <Quantity>1</Quantity>\\n\n <ProductPrice>-95.00</ProductPrice>\n <TotalPrice>-95.00</TotalPrice>\n <UOMCode>ea</UOMCode>\n\t\t\t\t\t\t\t\t\t\t <ItemType>20</ItemType>\\n\n\t\t\t\t\t\t\t\t\t\t <QuickBooksClassName>Salt Lake City</QuickBooksClassName>\\n\n\t\t\t\t\t\t\t\t\t\t <NewItemFlag>false</NewItemFlag>\\n\n <LineNumber>2</LineNumber>\n\t\t\t\t\t\t\t\t\t\t</SalesOrderItem>\\n\";\n\t\t//}\n\t\t$xml .=\"\t\t\t\t\t </SalesOrder>\\n\".\n \"<IssueFlag>false</IssueFlag>\".\n\t\t\t\"<IgnoreItems>false</IgnoreItems>\".\n \"</SOSaveRq>\\n\".\n \"</FbiMsgsRq>\";\n\t\t// Create request and pack\n\t\t$this->createRequest($xml);\n $len = strlen($this->xmlRequest);\n $packed = pack(\"N\", $len);\n\n // Send and get the response\n fwrite($this->id, $packed, 4);\n fwrite($this->id, $this->xmlRequest);\n $this->getResponse();\n\n // Set the result\n $this->setResult($this->parseXML($this->xmlResponse));\n }", "public function save():void;", "protected function saving() {\n // This will get reimplemented by children when necessary\n }", "final function save() { return $this->parser->saveXML($this->root, LIBXML_NOEMPTYTAG); }", "public function saveXML(){\n\t\t$path = \"/var/www/html/cap_12\";\n\t\t$xml = $this->gerarXMLCAP12();\n\t\n\t\t$siglacap = $this->instituicao->siglacap;\n\t\t$anoFolder = date('Y');\n\t\t$mesFolder = date('m');\n\t\t$diaFolder = date('d');\n\t\n\t\t$writer = new Writer();\n\t\t$writer->write($path . DIRECTORY_SEPARATOR)\n\t\t\t\t ->write($anoFolder . DIRECTORY_SEPARATOR)\n\t\t\t\t ->write($mesFolder . DIRECTORY_SEPARATOR)\n\t\t\t\t ->write($diaFolder . DIRECTORY_SEPARATOR)\n\t\t\t\t ->write($siglacap . DIRECTORY_SEPARATOR);\n\t\t\t\t\n\t\t$nomePasta = $writer->getString();\n\t\t$fileHelper = new FileHelper();\n\t\t$fileHelper->createDirectory($nomePasta, 755, true);\t\n\t\t\n\t\t$nomeArquivo = $nomePasta. $this->identifier.\".xml\";\n\t\ttry {\n\t\t\t$this->salvarArquivo($nomeArquivo, $xml);\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\tthrow new \\Exception(\"Erro ao tentar salvar o arquivo xml do cap\");\n\t\t}\n\t\treturn str_replace(\"/var/www/html/\", \"\", $nomeArquivo);\t\n\t}", "public function asXML();", "function toXML()\n {\n // Not implemented yet.\n }", "public function saveXml()\n {\n return $this->_dom->saveXML();\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();", "function save();", "function save();", "public function save()\n {\n }", "public function save()\n {\n }", "function mysql2xml() {\r\n\t $this->xml = new XMLFile();\r\n \r\n }", "public function save()\n {\n $source = $this->document->saveXml( $this->document );\n return $source;\n }", "public function save()\n\t{\n\n\t}", "public function save()\r\n {\r\n //\r\n }", "public function save() {\n\t\t\t\n\t\t}", "public function toXML()\n {\n // TODO: Implement toXML() method.\n }", "public function Save()\n {\n }", "public function createXML() {}", "public function save() {\n }", "private static function save()\r\n {\r\n return self::getDoc()->save(self::$XML_SLIDER_SAVE);\r\n }", "public function save() {}", "public function save() {}", "public function save() {}", "function Save();", "public function save() {\n return $this->domDocument->save($this->xmlPath);\n }", "function save()\n {\n }", "function save()\n {\n }", "public function save()\r\n {\r\n \r\n }", "public function storeXML()\n {\n $service = new ExpressionService();\n\n foreach ($service->processFile($_FILES[\"expressions_xml\"]) as $expression) {\n $service->addToDatabase('expressions', $expression);\n }\n\n return redirect('api/expressions');\n }", "public function save_all() {\n\t\t$this->save_api();\n\t\t$this->save_field_map();\n\t\t$this->save_import();\n\t\t$this->save_requirement_set();\n\t}", "public function setData($xml) {}", "public function save() {\n }", "public function save() {\n }", "public function upload_xml()\n {\n $this->upload_xml_file();\n }", "private function getExchangeRates() {\n$values=array();\n$exchangeRateXML=simplexml_load_file($this->xml);\n\n // Increased the DECIMAL(precision, scale) in create.sql to handle weaker currencies, such as the VND\n foreach ($exchangeRateXML->conversion as $conversion) {\n $values[]='(\"' . (string)$conversion->currency . '\", ' . (float)$conversion->rate . ')';\n}\n\n// TO DO: Write ON DUPLICATE KEY UPDATE statement to prevent duplicating rows each time query is performed.\n$this->mysqli->query('INSERT INTO currencyrates (currencyType, currencyRate) VALUES ' . implode(',', $values));\n}", "public function save()\n {\n }", "public final function save() {\n }", "public function save()\n {\n //\n }", "function saveToXML(){\n\t\t$str='<collections>';\n\t\t$str.='<collection>';\n\t\tforeach($this->items as $item){\n\t\t\t$str.=\"<item>\";\n\t\t\t$str.=\"<show>$item[0]</show>\";\n\t\t\t$str.=\"<description>\".htmlspecialchars($item[1]).\"</description>\";\n\t\t\t$str.=\"<url>\".htmlspecialchars($item[2]).\"</url>\";\n\t\t\t$str.=\"</item>\";\n\t\t}\n\t\t$str.='</collection>';\n\t\t$str.='</collections>';\n\t\t$xml = new SimpleXMLElement($str);\n\t\t$filename=$this->filename.\".xml\";\n\t\theader('Content-Type: text/xml');\n\t\theader('Content-Disposition: attachment; filename=\"'.$filename.'\"');\n\t\theader('Content-Transfer-Encoding: binary');\n\t\tdie($xml->asXML());\n\t\theader(\"location:index.php\");\n\t}", "public function save() {\n\n }", "public function getXml() {}", "public function save()\n {\n // For V2.0\n }", "public final function save()\n {\n }", "public function saveFile() {\n return $this->xml->save($this->filename);\n }", "abstract public function save( $data );", "function save($xml = false)\n {\n global $debug;\n global $warn;\n global $userid;\n global $connection;\n\n if (is_string($xml))\n { // string tag name\n $tagname = $xml;\n $xml = true;\n } // string tag name\n else\n if ($xml)\n { // true\n $tagname = 'cmd';\n } // true\n\n if ($this->needInsert)\n { // create new record\n $fldnames = '';\n $comma = '';\n $values = '';\n $parms = array();\n foreach($this->row as $fld => $value)\n {\n $fldnames .= $comma . \"`$fld`\";\n $values .= $comma . '?';\n array_push($parms, $value);\n $comma = \", \";\n } // loop through all fields in record\n\n // construct the SQL INSERT command \n $insert = \"INSERT INTO Languages ($fldnames) VALUES($values)\";\n $insertText = debugPrepQuery($insert, $parms);\n\n // insert the new record into the database\n $stmt = $connection->prepare($insert);\n if ($stmt->execute($parms))\n { // success\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $count = count($result);\n if ($xml)\n print \"<$tagname result='$count'>\" .\n htmlentities($insertText,ENT_XML1) . \n \"</$tagname>\\n\";\n if ($debug)\n {\n $warn .= \"<p>$insertText</p>\\n\";\n $warn .= \"<p>count=$count</p>\\n\";\n }\n\n $this->changed = array(); // reset\n $this->needInsert = false;\n\n // log the update\n logSqlUpdate($insert,\n $parms,\n 0, // compound key\n '',\n $this->toJson(false));\n } // success\n else\n { // error inserting record\n throw new Exception(\"Language::save:\n '$insertText', \" .\n print_r($stmt->errorInfo(),true));\n } // error inserting record\n } // create new record\n else\n { // update existing record\n $update = \"UPDATE Languages SET \";\n $set = '';\n $comma = '';\n $count = 0;\n $parms = array();\n foreach($this->changed as $fld => $value)\n {\n $set .= $comma . \"`$fld`=?\";\n array_push($parms, $value);\n $comma = ', ';\n } // loop through all fields in record\n $this->changed = array(); // reset\n\n if (strlen($set) > 0)\n { // changes made\n // assemble the UPDATE command\n $update .= $set .\" WHERE `Code639_1`=?\";\n if ($this->former)\n array_push($parms, $this->former['code639_1']);\n else\n array_push($parms, $this->row['code639_1']);\n\n // perform the update\n $updateText = debugPrepQuery($update, $parms);\n $stmt = $connection->prepare($update);\n if ($stmt->execute($parms))\n {\n $count = $stmt->rowCount();\n if ($xml)\n print \"<$tagname count='$count'>\" .\n htmlentities($updateText,ENT_XML1) . \"</$tagname>\\n\";\n if ($debug)\n $warn .= \"<p>'$updateText' count=$count</p>\\n\";\n\n // log the update\n logSqlUpdate($update,\n $parms,\n 0, // compound key\n json_encode($this->former),\n $this->toJson(false));\n }\n else\n { // error updating record\n throw new Exception(\"Language::save:\n '$updateText', \" .\n print_r($stmt->errorInfo(),true));\n } // error updating record\n } // changes made\n } // update existing record\n return $count;\n }", "function Save($xml_root, $file_path) \n\t{\n\t\t$this->__xml = fopen($file_path, \"w\");\n\t\tfwrite($this->__xml, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\r\\n\");\n\t\t$this->__SaveChild($xml_root, 0);\n\t\tfclose($this->__xml);\n\t}", "public function saveData()\r\n {\r\n \r\n }", "function master_xml_export()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$entry = array();\n\n\t\t//-----------------------------------------\n\t\t// Get XML class\n\t\t//-----------------------------------------\n\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\n\t\t$xml->doc_type = $this->ipsclass->vars['gb_char_set'];\n\n\t\t$xml->xml_set_root( 'export', array( 'exported' => time() ) );\n\n\t\t//-----------------------------------------\n\t\t// Set group\n\t\t//-----------------------------------------\n\n\t\t$xml->xml_add_group( 'group' );\n\n\t\t//-----------------------------------------\n\t\t// Get templates...\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'components',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"com_section != 'bugtracker'\" ) );\n\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$content = array();\n\n\t\t\t//-----------------------------------------\n\t\t\t// Sort the fields...\n\t\t\t//-----------------------------------------\n\n\t\t\tforeach( $r as $k => $v )\n\t\t\t{\n\t\t\t\t$content[] = $xml->xml_build_simple_tag( $k, $v );\n\t\t\t}\n\n\t\t\t$entry[] = $xml->xml_build_entry( 'row', $content );\n\t\t}\n\n\t\t$xml->xml_add_entry_to_group( 'group', $entry );\n\n\t\t$xml->xml_format_document();\n\n\t\t$doc = $xml->xml_document;\n\n\t\t//-----------------------------------------\n\t\t// Print to browser\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->show_download( $doc, 'components.xml', '', 0 );\n\t}", "public\tfunction\tsave()\n\t\t{\n\t\t}", "abstract protected function save($data);", "public function saveXMLOrder() {\n return false;\n }", "public static function _register()\n {\n self::assignElements([\n 'Action' => ['type' => 'BidActionCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'Currency' => ['type' => 'CurrencyCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'ItemID' => ['type' => 'ItemIDType', 'xmlns' => self::XMLNS],\n 'MaxBid' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'Discounts' => ['type' => 'OfferDiscountsType', 'xmlns' => self::XMLNS],\n 'Quantity' => ['type' => 'int'],\n 'SecondChanceEnabled' => ['type' => 'bool'],\n 'SiteCurrency' => ['type' => 'CurrencyCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'TimeBid' => [],\n 'HighestBid' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'ConvertedPrice' => ['type' => 'AmountType', 'xmlns' => self::XMLNS],\n 'TransactionID' => [],\n 'User' => ['type' => 'UserType', 'xmlns' => self::XMLNS],\n 'UserConsent' => ['type' => 'bool'],\n 'BidCount' => ['type' => 'int'],\n 'Message' => [],\n 'BestOfferID' => ['type' => 'BestOfferIDType', 'xmlns' => self::XMLNS],\n 'MyMaxBid' => ['type' => 'AmountType', 'xmlns' => self::XMLNS]\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "public function savetofile()\n\t\t{\n\t\t\treturn $this->xml->asXML($this->file);\n\t\t}", "function save()\n {\n parent::save();\n }", "function save()\n {\n parent::save();\n }", "function save()\n {\n parent::save();\n }", "public function saveType()\n {\n }", "public function save(){\n }", "public function saveCustomer($customerName = \"Kevin\", $customerNumber = \"734\", $active = \"true\", $address =\"test\", $city=\"amarillo\", $zip=\"12345\", $type=\"Main Office\", $state = 'UT', $phone=\"800-555-5555\", $email=\"email\") {\n // Setup XML\n\t\t$xml = \" <CustomerSaveRq>\\n\".\n\t\t \" <Customer>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<CustomerID>-1</CustomerID>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<AccountID>-1</AccountID>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<Status>Normal</Status>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<DefPaymentTerms>COD</DefPaymentTerms>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<DefShipTerms>Prepaid &amp; Billed</DefShipTerms>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t<TaxRate>None</TaxRate>\\n\".\n\t\t\t\t\" <Name>{$customerName}</Name>\\n\".\n\t\t \" <Number>{$customerNumber}</Number>\\n\".\n\t\t\t\t\" <ActiveFlag>{$active}</ActiveFlag>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t <JobDepth>1</JobDepth>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t<Addresses>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t <Address>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t<ID>-1</ID>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t<AccountId>-1</AccountId>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t<Name>{$customerName}</Name>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t<Attn>{$customerName}</Attn>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t<Street>{$address}</Street>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t<City>{$city}</City>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t<Zip>{$zip}</Zip>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t<Default>true</Default>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t<Residential>false</Residential>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t<Type>{$type}</Type>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t<State>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t <Code>{$state}</Code>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t <CountryID>2</CountryID>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t</State>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t<Country>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t <ID>2</ID>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t <Name>UNITED STATES</Name>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t <Code>US</Code>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t</Country>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t<AddressInformationList>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t <AddressInformation>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t\t<ID>-1</ID>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t\t<Name>{$customerName}</Name>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t\t<Data>{$phone}</Data>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t\t<Default>true</Default>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t\t<Type>Main</Type>\\n\".\t\t\t\t\n\t\t\t\t\"\t\t\t\t\t\t\t\t </AddressInformation>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t <AddressInformation>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t\t<ID>-1</ID>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t\t<Name>{$customerName}</Name>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t\t<Data>{$email}</Data>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t\t<Default>true</Default>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t\t<Type>Email</Type>\\n\".\t\t\t\t\n\t\t\t\t\"\t\t\t\t\t\t\t\t </AddressInformation>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t\t</AddressInformationList>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t </Address>\\n\".\n\t\t\t\t\"\t\t\t\t\t\t\t</Addresses>\\n\".\n\t\t\t\t\" </Customer>\\n\".\n\t\t\t\t\" </CustomerSaveRq>\\n\";\n\n // Create request and pack\n\t\t$this->createRequest($xml);\n $len = strlen($this->xmlRequest);\n $packed = pack(\"N\", $len);\n\n // Send and get the response\n fwrite($this->id, $packed, 4);\n fwrite($this->id, $this->xmlRequest);\n $this->getResponse();\n\n // Set the result\n $this->setResult($this->parseXML($this->xmlResponse));\n }", "public function saveCbXML($cbXMLElement)\n {\n // save the SimpleXMLElement errors as XML file\n $this->saveXML($this->cbXMLName, $cbXMLElement);\n }", "function saveObject($object, $xmlPath)\r\n {\r\n $class_vars = get_object_vars($object);\r\n\r\n $xml = domxml_new_doc(\"1.0\");\r\n $elements = $xml->create_element(get_class($object));\r\n $elementsNode = $xml->append_child($elements);\r\n\r\n foreach ($class_vars as $name => $value)\r\n {\r\n $element = $xml->create_element($name);\r\n $element->set_content($value);\r\n $elementsNode->append_child($element);\r\n }\r\n\r\n $xml->dump_file($xmlPath, false, true);\r\n }", "function save() {\n\n\t\t// calls generic ORM save (insert or update)\n\t\tparent::save();\n\n\t}", "public function saveXml()\n {\n $value = $this->_getXmlRpcReturn();\n $generator = Zend_XmlRpc_Value::getGenerator();\n $generator->openElement('methodResponse')\n ->openElement('params')\n ->openElement('param');\n $value->generateXml();\n $generator->closeElement('param')\n ->closeElement('params')\n ->closeElement('methodResponse');\n\n return $generator->flush();\n }", "public static function exportXML()\n {\n $xml = new \\XMLWriter();\n $xml->openMemory();\n $xml->setIndent(true);\n $xml->setIndentString(\"\t\");\n $xml->startDocument(\"1.0\", \"UTF-8\");\n $xml->startElement(\"productos\");\n $productos = self::findAll();\n foreach ($productos as $producto) {\n $xml->startElement(\"producto\");\n $xml->writeAttribute(\"id\", $producto->getId());\n $xml->writeElement(\"nombre\", $producto->getNombre());\n $xml->writeElement(\"descripcion\", $producto->getDescripcion());\n $urlImagen = $producto->getImagen() ? BASE_URL.\"/productos/{$producto->getId()}?image=1\": \"\";\n $xml->writeElement(\"imagen\", $urlImagen);\n if($categoria = $producto->getCategoria()) {\n $xml->startElement(\"categoria\");\n $xml->writeAttribute(\"id\", $categoria->getId());\n $xml->writeElement(\"nombre\", $categoria->getNombre());\n $xml->writeElement(\"descripcion\", $categoria->getDescripcion());\n $xml->endElement();\n }\n $xml->endElement();\n }\n $xml->endElement();\n return $xml->outputMemory();\n }", "public function __toString(){\r\n return $this->saveXMl();\r\n }", "public function _xml_fields()\n {\n require_code('files');\n $full_path = get_custom_file_base() . '/data_custom/xml_config/fields.xml';\n $xml = post_param_string('xml');\n cms_file_put_contents_safe($full_path, $xml, FILE_WRITE_FIX_PERMISSIONS | FILE_WRITE_SYNC_FILE);\n\n log_it('FIELD_FILTERS');\n\n return inform_screen($this->title, do_lang_tempcode('SUCCESS'));\n }" ]
[ "0.6602003", "0.60516995", "0.59322", "0.59290487", "0.59290487", "0.59290487", "0.59290487", "0.59290487", "0.5848328", "0.5848209", "0.5755934", "0.5752415", "0.57128674", "0.5674834", "0.5648613", "0.55392355", "0.5537048", "0.5531162", "0.55105424", "0.5495702", "0.54951566", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5462769", "0.5452474", "0.5452474", "0.5444386", "0.5444386", "0.5439715", "0.5439457", "0.5426976", "0.5426484", "0.54222584", "0.54112315", "0.54013", "0.5397111", "0.5382273", "0.5381172", "0.53611934", "0.53611934", "0.5359743", "0.53569305", "0.5343855", "0.5319041", "0.5319041", "0.53092504", "0.53033084", "0.5302933", "0.53023195", "0.5291728", "0.5291728", "0.5274455", "0.52724594", "0.52664256", "0.526445", "0.5263542", "0.52527684", "0.52407396", "0.5239458", "0.52386755", "0.5222261", "0.520208", "0.51958823", "0.519159", "0.5183773", "0.5180154", "0.5173036", "0.51722735", "0.51700824", "0.5163993", "0.516013", "0.5142146", "0.5129691", "0.5129691", "0.5129691", "0.51200205", "0.5116803", "0.51034176", "0.50865185", "0.5083457", "0.5073482", "0.5045869", "0.50423265", "0.50316644", "0.50205344" ]
0.67472976
0
permitimos solo letras(aZ), numeros y guiones
private static function limpiar($valor) { return preg_replace('/[^a-zA-Z0-9-_]/', '', $valor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function limpiar($cadena){\n\t\t$cadena=str_replace(\"_\",\" \",$cadena);//alt + 15\n\t\t$cadena=str_replace(\"|\",\"=\",$cadena);//alt + 10\n\t\treturn $cadena=str_replace(\"*\",\"'\",$cadena);//alt + 16\n\t}", "function validaAlfaNum ($Cad) {\n// prueba si la entrada es una cadena alfanumerica\nreturn preg_match(\"/^[a-z 0-9]*$/i\", $Cad );\n}", "function validaValor($cadena)\n{\n\tif(eregi('^[a-zA-Z0-9._αινσϊρ‘!Ώ? -]{1,40}$', $cadena)) return TRUE;\n\telse return FALSE;\n}", "function extrae($cadena,$num_caracteres){\n $cadena_ext = substr($cadena,0, $num_caracteres);\n //Si el extracto ya viene con palabra completa no necesita buscar la siguiente palabra\n if($cadena[$num_caracteres] != \" \"){\n $sub_cadena = substr($cadena,$num_caracteres, ($tam_cadena - $num_caracteres));\n $miarray = explode (' ', $sub_cadena);\n $res_sub_cadena = $miarray[0];\n }\n $cad = $cadena_ext.$res_sub_cadena; \n return $cad; \n }", "function chMajuscule($valeur){\r\n $i=0;\r\n while($i < laTaille($valeur)){\r\n if($valeur[$i]>=\"a\" && $valeur[$i]<=\"z\"){\r\n $codeValeur = ord($valeur[$i]) - 32;\r\n echo chr($codeValeur);\r\n }\r\n else{\r\n echo $valeur[$i];\r\n }\r\n $i=$i+1;\r\n }\r\n }", "function darLetras($solucion){ \r\n $azar = rand(0,strlen($solucion)-1);\r\n $dLetra = $solucion[$azar];\r\n $posicionLetra = $azar.strtoupper($dLetra);\r\n return $posicionLetra;\r\n }", "function arreglar_numero($numero)\n\t\t{\n\t\t\t// \t$numero = str_replace(\".\", \"\",$numero);\n\t\t\t$inicio_coma = strpos($numero, '.');\n\t\t\t//var_dump($inicio_coma);die();\n\t\t\t// if ( is_float($numero) && ($inicio_coma != false))\n\t\t\t// \t$numero .= \"00\";\n\t\t\t// else $numero .= \",00\";\n\t\t\tif( is_numeric( $inicio_coma) && ($inicio_coma >= 1) && ($inicio_coma < strlen($numero) ) )\n\t\t\t\t$numero = substr($numero, 0, ($inicio_coma+3)); \n\t\t\t//return str_replace(\".\", \",\",$numero);\n\t\t\treturn $numero;\n\t\t}", "function testAlphabet($valeurTeste){\r\n $retour = \"faux\";\r\n if(testMinuscle($valeurTeste)==\"vrai\" || testMajuscule($valeurTeste)==\"vrai\"){\r\n $retour = \"vrai\";\r\n }\r\n return $retour;\r\n }", "function dividirPalabraEnLetras($palabra){\n \n /*>>> Completar para generar la estructura de datos b) indicada en el enunciado. \n recuerde que los string pueden ser recorridos como los arreglos. <<<*/\n \n}", "function a_mayusculas($cadena)\n{\n $cadena = strtr(strtoupper($cadena), 'àèìòùáéíóúçñäëïöü', 'ÀÈÌÒÙÁÉÍÓÚÇÑÄËÏÖÜ');\n\n return $cadena;\n}", "function bersih($papar) \n{\n //$papar = mysql_real_escape_string($papar);\n\t# buang ruang kosong (atau aksara lain) dari mula & akhir \n $papar = trim($papar);\n # menghapuskan semua special characters dan cuma tinggalkan aksara dan integer sahaja\n\t//$papar = preg_replace('/[^a-z0-9]/i', '', $papar);\n\t\n return $papar;\n}", "Public function numerico($caneda)\n\t\t{\n\t\t\tif(strlen($caneda) > 0)\n\t\t\t{\n\t\t\t\tif(!preg_match(\"/^(\\d+[\\.]?)+$/\", $caneda))\n\t\t\t\t\treturn true;\n\t\t\t\t// SI longitud, SI caracteres A-z\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t}else\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function mPN_CHARS_BASE(){\n try {\n // Tokenizer11.g:517:3: ( 'a' .. 'z' | '\\\\u00C0' .. '\\\\u00D6' | '\\\\u00D8' .. '\\\\u00F6' | '\\\\u00F8' .. '\\\\u02FF' | '\\\\u0370' .. '\\\\u037D' | '\\\\u037F' .. '\\\\u1FFF' | '\\\\u200C' .. '\\\\u200D' | '\\\\u2070' .. '\\\\u218F' | '\\\\u2C00' .. '\\\\u2FEF' | '\\\\u3001' .. '\\\\uD7FF' | '\\\\uF900' .. '\\\\uFDCF' | '\\\\uFDF0' .. '\\\\uFFFD' ) \n // Tokenizer11.g: \n {\n if ( ($this->input->LA(1)>=$this->getToken('97') && $this->input->LA(1)<=$this->getToken('122'))||($this->input->LA(1)>=$this->getToken('192') && $this->input->LA(1)<=$this->getToken('214'))||($this->input->LA(1)>=$this->getToken('216') && $this->input->LA(1)<=$this->getToken('246'))||($this->input->LA(1)>=$this->getToken('248') && $this->input->LA(1)<=$this->getToken('767'))||($this->input->LA(1)>=$this->getToken('880') && $this->input->LA(1)<=$this->getToken('893'))||($this->input->LA(1)>=$this->getToken('895') && $this->input->LA(1)<=$this->getToken('8191'))||($this->input->LA(1)>=$this->getToken('8204') && $this->input->LA(1)<=$this->getToken('8205'))||($this->input->LA(1)>=$this->getToken('8304') && $this->input->LA(1)<=$this->getToken('8591'))||($this->input->LA(1)>=$this->getToken('11264') && $this->input->LA(1)<=$this->getToken('12271'))||($this->input->LA(1)>=$this->getToken('12289') && $this->input->LA(1)<=$this->getToken('55295'))||($this->input->LA(1)>=$this->getToken('63744') && $this->input->LA(1)<=$this->getToken('64975'))||($this->input->LA(1)>=$this->getToken('65008') && $this->input->LA(1)<=$this->getToken('65533')) ) {\n $this->input->consume();\n\n }\n else {\n $mse = new MismatchedSetException(null,$this->input);\n $this->recover($mse);\n throw $mse;}\n\n\n }\n\n }\n catch(Exception $e){\n throw $e;\n }\n }", "function validaEnteroConSigno ($Cad) {\n// prueba si la entrada es un entero, con un signo opcional\nreturn preg_match(\"/^-?([0-9])+$/\", $Cad );\n}", "function eliminar_acentos($cadena)\n {\n $cadena = str_replace(\n array('Á', 'À', 'Â', 'Ä', 'á', 'à', 'ä', 'â', 'ª'),\n array('A', 'A', 'A', 'A', 'a', 'a', 'a', 'a', 'a'),\n $cadena\n );\n\n //Reemplazamos la E y e\n $cadena = str_replace(\n array('É', 'È', 'Ê', 'Ë', 'é', 'è', 'ë', 'ê'),\n array('E', 'E', 'E', 'E', 'e', 'e', 'e', 'e'),\n $cadena );\n\n //Reemplazamos la I y i\n $cadena = str_replace(\n array('Í', 'Ì', 'Ï', 'Î', 'í', 'ì', 'ï', 'î'),\n array('I', 'I', 'I', 'I', 'i', 'i', 'i', 'i'),\n $cadena );\n\n //Reemplazamos la O y o\n $cadena = str_replace(\n array('Ó', 'Ò', 'Ö', 'Ô', 'ó', 'ò', 'ö', 'ô'),\n array('O', 'O', 'O', 'O', 'o', 'o', 'o', 'o'),\n $cadena );\n\n //Reemplazamos la U y u\n $cadena = str_replace(\n array('Ú', 'Ù', 'Û', 'Ü', 'ú', 'ù', 'ü', 'û'),\n array('U', 'U', 'U', 'U', 'u', 'u', 'u', 'u'),\n $cadena );\n\n //Reemplazamos la N, n, C y c\n $cadena = str_replace(\n array('Ñ', 'ñ', 'Ç', 'ç'),\n array('N', 'n', 'C', 'c'),\n $cadena\n );\n \n return $cadena;\n }", "function Comprobar_nombrecentro()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->NOMBRECENTRO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"NOMBRECENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->NOMBRECENTRO)>50)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"NOMBRECENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ ]+$/\",$this->NOMBRECENTRO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"NOMBRECENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00030\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t\n\treturn $correcto; //se devuelve el resultado\n}", "function mPN_CHARS(){\n try {\n // Tokenizer11.g:557:3: ( PN_CHARS_U | MINUS | ( '0' .. '9' ) | '\\\\u00B7' | '\\\\u0300' .. '\\\\u036F' | '\\\\u203F' .. '\\\\u2040' ) \n $alt29=6;\n $LA29_0 = $this->input->LA(1);\n\n if ( ($LA29_0==$this->getToken('95')||($LA29_0>=$this->getToken('97') && $LA29_0<=$this->getToken('122'))||($LA29_0>=$this->getToken('192') && $LA29_0<=$this->getToken('214'))||($LA29_0>=$this->getToken('216') && $LA29_0<=$this->getToken('246'))||($LA29_0>=$this->getToken('248') && $LA29_0<=$this->getToken('767'))||($LA29_0>=$this->getToken('880') && $LA29_0<=$this->getToken('893'))||($LA29_0>=$this->getToken('895') && $LA29_0<=$this->getToken('8191'))||($LA29_0>=$this->getToken('8204') && $LA29_0<=$this->getToken('8205'))||($LA29_0>=$this->getToken('8304') && $LA29_0<=$this->getToken('8591'))||($LA29_0>=$this->getToken('11264') && $LA29_0<=$this->getToken('12271'))||($LA29_0>=$this->getToken('12289') && $LA29_0<=$this->getToken('55295'))||($LA29_0>=$this->getToken('63744') && $LA29_0<=$this->getToken('64975'))||($LA29_0>=$this->getToken('65008') && $LA29_0<=$this->getToken('65533'))) ) {\n $alt29=1;\n }\n else if ( ($LA29_0==$this->getToken('45')) ) {\n $alt29=2;\n }\n else if ( (($LA29_0>=$this->getToken('48') && $LA29_0<=$this->getToken('57'))) ) {\n $alt29=3;\n }\n else if ( ($LA29_0==$this->getToken('183')) ) {\n $alt29=4;\n }\n else if ( (($LA29_0>=$this->getToken('768') && $LA29_0<=$this->getToken('879'))) ) {\n $alt29=5;\n }\n else if ( (($LA29_0>=$this->getToken('8255') && $LA29_0<=$this->getToken('8256'))) ) {\n $alt29=6;\n }\n else {\n $nvae = new NoViableAltException(\"\", 29, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt29) {\n case 1 :\n // Tokenizer11.g:558:3: PN_CHARS_U \n {\n $this->mPN_CHARS_U(); \n\n }\n break;\n case 2 :\n // Tokenizer11.g:559:5: MINUS \n {\n $this->mMINUS(); \n\n }\n break;\n case 3 :\n // Tokenizer11.g:560:5: ( '0' .. '9' ) \n {\n // Tokenizer11.g:560:5: ( '0' .. '9' ) \n // Tokenizer11.g:560:6: '0' .. '9' \n {\n $this->matchRange(48,57); \n\n }\n\n\n }\n break;\n case 4 :\n // Tokenizer11.g:561:5: '\\\\u00B7' \n {\n $this->matchChar(183); \n\n }\n break;\n case 5 :\n // Tokenizer11.g:562:5: '\\\\u0300' .. '\\\\u036F' \n {\n $this->matchRange(768,879); \n\n }\n break;\n case 6 :\n // Tokenizer11.g:563:5: '\\\\u203F' .. '\\\\u2040' \n {\n $this->matchRange(8255,8256); \n\n }\n break;\n\n }\n }\n catch(Exception $e){\n throw $e;\n }\n }", "function chMinuscule($valeur){\r\n $i=0;\r\n while($i < laTaille($valeur)){\r\n if($valeur[$i]>=\"A\" && $valeur[$i]<=\"Z\"){\r\n $codeValeur = ord($valeur[$i]) + 32;\r\n echo chr($codeValeur);\r\n }\r\n else{\r\n echo $valeur[$i];\r\n }\r\n $i=$i+1;\r\n }\r\n }", "function Comprobar_codcentro()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->CODCENTRO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->CODCENTRO)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->CODCENTRO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t\n\treturn $correcto;//se devuelve el resultado\n}", "function estEntierPositif($valeur) {\r\n\treturn preg_match(\"/[^0-9]/\", $valeur) == 0;\r\n\t\r\n}", "function validaAlfa ($Cad) {\n// prueba si la entrada es una cadena alfabetica\nreturn preg_match(\"/^[a-z]+$/i\", $Cad );\n}", "function esEntero($val){\r\n\t\treturn preg_match_all(\"/[\\D]/\",$val,$l)==0;\r\n\t}", "function valor_extenso($valor=0, $maiusculas=false)\n{\n if (strpos($valor,\",\") > 0)\n {\n // retira o ponto de milhar, se tiver\n $valor = str_replace(\".\",\"\",$valor);\n \n // troca a virgula decimal por ponto decimal\n $valor = str_replace(\",\",\".\",$valor);\n }\n$singular = array(\"centavo\", \"real\", \"mil\", \"milhao\", \"bilhao\", \"trilhao\", \"quatrilhao\");\n$plural = array(\"centavos\", \"reais\", \"mil\", \"milhoes\", \"bilhoes\", \"trilhoes\",\n\"quatrilhões\");\n \n$c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\",\n\"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\n$d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\",\n\"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\n$d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\",\n\"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\n$u = array(\"\", \"um\", \"dois\", \"tres\", \"quatro\", \"cinco\", \"seis\",\n\"sete\", \"oito\", \"nove\");\n \n $z=0;\n \n $valor = number_format($valor, 2, \".\", \".\");\n $inteiro = explode(\".\", $valor);\n\t\t$cont=count($inteiro);\n\t\t for($i=0;$i<$cont;$i++)\n for($ii=strlen($inteiro[$i]);$ii<3;$ii++)\n $inteiro[$i] = \"0\".$inteiro[$i];\n \n $fim = $cont - ($inteiro[$cont-1] > 0 ? 1 : 2);\n for ($i=0;$i<$cont;$i++) {\n $valor = $inteiro[$i];\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\n \n $r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd &&\n$ru) ? \" e \" : \"\").$ru;\n $t = $cont-1-$i;\n $r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\n if ($valor == \"000\")$z++; elseif ($z > 0) $z--;\n if (($t==1) && ($z>0) && ($inteiro[0] > 0)) $r .= (($z>1) ? \" de \" : \"\").$plural[$t];\n if ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) &&\n($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\n }\n \n if(!$maiusculas)\n\t\t {\n return($rt ? $rt : \"zero\");\n } elseif($maiusculas == \"2\") {\n return (strtoupper($rt) ? strtoupper($rt) : \"Zero\");\n } else {\n return (ucwords($rt) ? ucwords($rt) : \"Zero\");\n }\n \n}", "function terbilang($x, $style) {\n // untuk menggunakan gunakan cara berikut\n // terbilang('your_number', 'style_number')\n // style_number [1=> Untuk huruf terbilang besar seluruhnya, 2 => untuk huruf kecil seluruhnya, 3 => untuk huruf awal besar, 4 => untuk huruf pertama besar]\n if($x<0) {\n $hasil = \"minus \". trim(kekata($x));\n } else {\n $hasil = trim(kekata($x));\n } \n switch ($style) {\n case 1:\n $hasil = strtoupper($hasil);\n break;\n case 2:\n $hasil = strtolower($hasil);\n break;\n case 3:\n $hasil = ucwords($hasil);\n break;\n default:\n $hasil = ucfirst($hasil);\n break;\n } \n return $hasil;\n}", "public function validarSoloLetras($var){\n #return preg_match('/[^a-z\\s-]/i', $var);\n return preg_match('/^[a-zA-Z]+$/', $var);\n }", "function sanitize(){\r\n\t\t $outar = Array();\r\n \t $arg_list = func_get_args();\r\n\t\t foreach($arg_list[0] as $key => $value){\r\n\t\t\t\t $data = $value;\r\n\t\t\t\t $data = PREG_REPLACE(\"/[^0-9a-zA-Z]/i\", '', $data);\r\n\t\t\t\t array_push($outar,$data);\r\n\t\t }\r\n\t\treturn $outar;\r\n\t }", "function number_car($number){\n$regexp = '/[a-ż][0-9][0-9][0-9][a-ż][a-ż]/ui';\n//$regexp = '/^[a-ż][0-9][0-9][0-9][a-ż][a-ż]$/ui'; //^$ only reads in between\n//$regexp = '/\\\\w\\\\w\\\\w\\\\w\\\\w\\\\w/ui'; // \\\\w looks for each letter a numeric and underscore\n$matches = array();\nif (preg_match($regexp, $number, $matches)) {\n echo\"number car is {$matches[0]}<br>\";\n //print_r($matches);\n}else {\n echo\"enter the correct car number\\n\";\n}\n\nreturn $matches;\n}", "function testEntier($valeur){\r\n for($i=0;$i<laTaille($valeur);$i++){\r\n if(($valeur[$i]>=0) && !($valeur[$i]>=\"a\" && $valeur[$i]<=\"z\")){\r\n $retour[$i] = \"vrai\";\r\n }\r\n else{\r\n $retour[$i] = \"faux\";\r\n }\r\n }\r\n $j=0;\r\n while($j<laTaille($valeur) && $retour[$j]==\"vrai\"){\r\n $j++;\r\n }\r\n if($j==laTaille($valeur)){\r\n $retourFinal = \"vrai\";\r\n }\r\n else{\r\n $retourFinal = \"faux\";\r\n }\r\n return $retourFinal;\r\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 Comprobar_nombreedificio()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->nombreedificio)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"nombreedificio\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->nombreedificio)>50)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"nombreedificio\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ ]+$/\",$this->nombreedificio)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"nombreedificio\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00030\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\t\n\treturn $correcto;//se devuelve el resultado\n}", "function estEntierPositif($valeur)\r\n{\r\n return preg_match('/[^0-9]/', $valeur) == 0;\r\n}", "function convMajuscule($valeur){\r\n if($valeur>=\"a\" && $valeur<=\"z\"){\r\n $codeValeur = ord($valeur) - 32;\r\n }\r\n return chr($codeValeur);\r\n }", "function validarFlotante ($Cad) {\n// prueba si la entrada es un numero de punto flotante, con un signo opcional\nreturn preg_match(\"/^-?([0-9])+([\\.|,]([0-9])*)?$/\", $Cad );\n}", "function validar_letra($dni){\n\t$letra = substr($dni, -1);\n\t$numeros = substr($dni, 0, -1);\n\t//si se cumple la condicion\n\tif ( substr(\"TRWAGMYFPDXBNJZSQVHLCKE\", $numeros%23, 1) == $letra && strlen($letra) == 1 && strlen ($numeros) == 8 ){\n\t\treturn true;\n\t}//si no\n\telse{\n\t\treturn false;\n\t}\n}", "function es_un_real($string){\r\n// entero es considerado un subconjunto de real\r\n $salida = FALSE;\r\n if(ereg(\"^([0-9]+)$\", $string)){$salida = TRUE;} // 5\r\n if(ereg(\"^([0-9]+)(\\.[0-9]+)?$\", $string)){$salida = TRUE;} // 5 5.560\r\n if(ereg(\"^(\\.[0-9]+)$\", $string)){$salida = TRUE;} // . .54\r\n if(ereg(\"^$\", $string)){$salida = TRUE;}\r\n return $salida;\r\n }", "function noNumber($cadena){\n\n\t$devolvemos = array();\n\n\tif (preg_match(\"/[0-9]/\", $cadena)) {\n\t\t$devolvemos['error'] = 'No se permite numeros';\n\t}else{\n\t\t$devolvemos['success'] = $cadena;\n\t}\n\n\treturn $devolvemos;\n}", "function dinheiroDeBr($valor) {\n\t$valor = str_ireplace(\".\",\"\",$valor);\n $valor = str_ireplace(\",\",\".\",$valor);\n return $valor;\n}", "function estEntierPositif($valeur)\n{\n return preg_match('/[^0-9]/', $valeur) == 0;\n}", "public function NIVEL_ED(){\n $ch12 = $this->caracteristicas->CH12;\n $ch13 = $this->caracteristicas->CH13;\n $ch10 = $this->caracteristicas->CH10;\n if($ch10 == 3)\n {\n return 0;\n }\n if ($ch12 == 1 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 2 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 3 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 4 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 5 && $ch13 == 2) {\n return 1;\n }\n if ($ch12 == 6 && $ch13 == 2) {\n return 1;\n }\n //\n if ($ch12 == 5 && $ch13 == 1) {\n return 2;\n }\n if ($ch12 == 6 && $ch13 == 1) {\n return 2;\n }\n //\n if ($ch12 == 7 && $ch13 == 2) {\n return 3;\n }\n if ($ch12 == 8 && $ch13 == 2) {\n return 3;\n }\n if ($ch12 == 9 && $ch13 == 2) {\n return 3;\n }\n if ($ch12 == 10 && $ch13 == 2) {\n return 3;\n }\n //\n if ($ch12 == 7 && $ch13 == 1) {\n return 4;\n }\n if ($ch12 == 8 && $ch13 == 1) {\n return 4;\n }\n if ($ch12 == 9 && $ch13 == 1) {\n return 4;\n }\n if ($ch12 == 10 && $ch13 == 1) {\n return 4;\n }\n //\n if ($ch12 == 11 && $ch13 == 2) {\n return 5;\n }\n if ($ch12 == 12 && $ch13 == 2) {\n return 5;\n }\n //\n if ($ch12 == 11 && $ch13 == 1) {\n return 6;\n }\n if ($ch12 == 12 && $ch13 == 1) {\n return 6;\n }\n //\n if ($ch12 == 13 && $ch13 == 2) {\n return 7;\n }\n if ($ch12 == 13 && $ch13 == 1) {\n return 8;\n }\n if ($ch13 == 9 || $ch13 == 0) {\n return 9;\n }\n }", "public function run()\n {\n$name=['Абакум',' Абрам',' Абросим',' Аввакум',' Август',' Авдей',' Авдий',' Авель',' Авенир',' Аверий',' Аверкий',' Аверьян',' Авксентий',' Авраам',' Авраамий',' Аврам',' Аврамий',' Аврелиан',' Автоном',' Агап',' Агапий',' Агапит',' Агафангел',' Агафон',' Аггей',' Адам',' Адриан',' Азар',' Азарий',' Акакий',' Акила',' Аким',' Акиндин',' Акинф',' Акинфий',' Аксён',' Аксентий',' Александр',' Алексей',' Алексий',' Альберт',' Альфред',' Амвросий',' Амос',' Амфилохий',' Ананий',' Анастасий',' Анатолий',' Андрей',' Андриан',' Андрон',' Андроний',' Андроник',' Анект',' Анемподист',' Аникей',' Аникий',' Аникита',' Анисий',' Анисим',' Антиох',' Антип',' Антипа',' Антипий',' Антон',' Антонин',' Антроп',' Антропий',' Ануфрий',' Аполлинарий',' Аполлон',' Аполлос',' Ардалион',' Ареф',' Арефий',' Арий',' Аристарх',' Аристид',' Аркадий',' Арнольд',' Арон',' Арсен',' Арсений',' Арсентий',' Артамон',' Артём',' Артемий',' Артур',' Архип',' Асаф',' Асафий',' Аскольд',' Афанасий',' Афиноген',' Афинодор',' Африкан',' Бажен',' Бенедикт',' Богдан',' Болеслав',' Бонифат',' Бонифатий',' Борис',' Борислав',' Бронислав',' Будимир',' Вавила',' Вадим',' Валентин',' Валериан',' Валерий',' Варлам',' Варламий',' Варнава',' Варсоноф',' Варсонофий',' Варфоломей',' Василий',' Вассиан',' Велизар',' Велимир',' Венедикт',' Вениамин',' Венцеслав',' Викентий',' Виктор',' Викторий',' Викул',' Викула',' Вилен',' Виленин',' Вильгельм',' Виссарион',' Вит',' Виталий',' Витовт',' Витольд',' Владилен',' Владимир',' Владислав',' Владлен',' Влас',' Власий',' Вонифат',' Вонифатий',' Всеволод',' Всеслав',' Вукол',' Вышеслав',' Вячеслав',' Гавриил',' Гаврил',' Галактион',' Гедеон',' Гелимин',' Геласий',' Гелий',' Геннадий',' Генрих',' Георгий',' Герасим',' Гервасий',' Герман',' Гермоген',' Геронтий',' Гиацинт',' Глеб',' Гораций',' Горгоний',' Гордей',' Гостомысл',' Гремислав',' Григорий',' Гурий',' Гурьян',' Давид',' Давыд',' Далмат',' Даниил',' Данил',' Деодор',' Дементий',' Демид',' Демьян',' Денис',' Денисий',' Димитрий',' Диомид',' Дионисий',' Дмитрий',' Добромысл',' Добрыня',' Довмонт',' Доминик',' Донат',' Доримедонт',' Дормедонт',' Дормидонт',' Дорофей',' Досифей',' Евгений',' Евграф',' Евграфий',' Евдоким',' Евлампий',' Евлогий',' Евмен',' Евмений',' Евсей',' Евстафий',' Евстахий',' Евстигней',' Евстрат',' Евстратий',' Евтихий',' Евфимий',' Егор',' Егорий',' Елизар',' Елисей',' Елистрат',' Елпидифор',' Емельян',' Епифан',' Епифаний',' Еремей',' Ермий',' Ермил',' Ермила',' Ермилий',' Ермолай',' Ерофей',' Ефим',' Ефимий',' Ефрем',' Ефремий',' Захар',' Захарий',' Зенон',' Зиновий',' Зосим',' Зосима',' Иаким',' Иакинф',' Иван',' Игнат',' Игнатий',' Игорь',' Иероним',' Измаил',' Изосим',' Изот',' Изяслав',' Илиодор',' Илларион',' Илья',' Иннокентий',' Иоанн',' Иов',' Иона',' Иосафат',' Иосиф',' Ипат',' Ипатий',' Ипполит',' Ираклий',' Иринарх',' Ириней',' Иродион',' Исаак',' Исаакий',' Исай',' Исак',' Исакий',' Исидор',' Иустин',' Казимир',' Каллимах',' Каллиник',' Каллиопий',' Каллист',' Каллистрат',' Каллисфен',' Калуф',' Кандидий',' Кантидиан',' Капик',' Капитон',' Карион',' Карл',' Карп',' Кастрихий',' Касьян',' Ким',' Киприан',' Кир',' Кириак',' Кирик',' Кирилл',' Кирсан',' Клавдий',' Клим',' Климент',' Климентий',' Кондрат',' Кондратий',' Конон',' Конрад',' Константин',' Корней',' Корнелий',' Корнил',' Корнилий',' Ксенофонт',' Кузьма',' Куприян',' Лавр',' Лаврентий',' Ладимир',' Лазарь',' Ларион',' Лев',' Леон',' Леонард',' Леонид',' Леонтий',' Леопольд',' Логвин',' Логгин',' Лонгин',' Луарсаб',' Лука',' Лукан',' Лукиан',' Лукьян',' Любим',' Любомир',' Любомысл',' Люциан',' Мавр',' Маврикий',' Мавродий',' Май',' Макар',' Макарий',' Македон',' Македоний',' Максим',' Максимиан',' Максимилиан',' Малх',' Мануил',' Марат',' Мардарий',' Мариан',' Марин',' Марк',' Маркел',' Маркиан',' Марлен',' Мартимьян',' Мартин',' Мартиниан',' Мартирий',' Мартын',' Мартьян',' Матвей',' Мелентий',' Мелетий',' Меркул',' Меркурий',' Мефодий',' Мечислав',' Милан',' Милен',' Милий',' Мина',' Минай',' Мирон',' Мирослав',' Мисаил',' Митрофан',' Митрофаний',' Михаил',' Михей',' Модест',' Моисей',' Мокей',' Мокий',' Мстислав',' Назар',' Назарий',' Наркис',' Натан',' Наум',' Нестер',' Нестор',' Нефёд',' Никандр',' Никанор',' Никита',' Никифор',' Никодим',' Николай',' Никон',' Нил',' Нифонт',' Олег',' Олимпий',' Онисим',' Онисифор',' Онуфрий',' Орест',' Осип',' Оскар',' Остап',' Остромир',' Павел',' Павлин',' Паисий',' Палладий',' Памфил',' Памфилий',' Панкрат',' Панкратий',' Пантелей',' Пантелеймон',' Панфил',' Парамон',' Пармен',' Парфён',' Парфений',' Парфентий',' Патрикей',' Патрикий',' Пафнутий',' Пахом',' Пахомий',' Перфилий',' Пётр',' Пимен',' Питирим',' Платон',' Полиевкт',' Полиект',' Поликарп',' Поликарпий',' Порфир',' Порфирий',' Потап',' Потапий',' Пров',' Прокл',' Прокоп',' Прокопий',' Прокофий',' Протас',' Протасий',' Прохор',' Радий',' Радим',' Радислав',' Радован',' Ратибор',' Ратмир',' Рафаил',' Рем',' Роберт',' Родион',' Роман',' Ростислав',' Рубен',' Рувим',' Рудольф',' Руслан',' Рюрик',' Савва',' Савватей',' Савватий',' Савёл',' Савелий',' Саверий',' Савин',' Савиниан',' Сакердон',' Салтам',' Самойла',' Самсон',' Самсоний',' Самуил',' Светозар',' Свирид',' Святополк',' Святослав',' Себастьян',' Севастьян',' Северин',' Северьян',' Селиван',' Селивёрст',' Селифан',' Семён',' Семион',' Серапион',' Серафим',' Сергей',' Сигизмунд',' Сидор',' Сила',' Силан',' Силантий',' Силуян',' Сильван',' Сильвестр',' Симеон',' Симон',' Смарагд',' Созон',' Созонт',' Созонтий',' Сократ',' Соломон',' Сосипатр',' Софон',' Софоний',' Софрон',' Софроний',' Спартак',' Спиридон',' Спиридоний',' Станимир',' Станислав',' Стахий',' Степан',' Стоян',' Стратоник',' Сысой',' Тарас',' Твердислав',' Творимир',' Терентий',' Тертий',' Тигран',' Тигрий',' Тимофей',' Тимур',' Тит',' Тихон',' Тристан',' Трифилий',' Трифон',' Трофим',' Увар',' Ульян',' Устин',' Фабиан',' Фадей',' Фалалей',' Фатьян',' Фёдор',' Федос',' Федосей',' Федосий',' Федот',' Федотий',' Федул',' Феликс',' Фемистокл',' Феогност',' Феоктист',' Феопемпт',' Феофан',' Феофил',' Феофилакт',' Ферапонт',' Филарет',' Филат',' Филимон',' Филипий',' Филипп',' Филофей',' Фирс',' Флегонт',' Флорентий',' Флорентин',' Флориан',' Фока',' Фома',' Фортунат',' Фотий',' Фридрих',' Фрол',' Харитон',' Харитоний',' Харлам',' Харламп',' Харлампий',' Хрисанф',' Христофор',' Эдуард',' Эмилий',' Эмиль',' Эммануил',' Эразм',' Эраст',' Эрнест',' Эрнст',' Ювеналий',' Юлиан',' Юлий',' Юрий',' Юстин',' Яким',' Яков',' Якуб',' Ян',' Януарий',' Ярополк',' Ярослав',' ЕНСКИЕ',' Августа',' Августина',' Авдотья',' Аврелия',' Аврея',' Аврора',' Агапа',' Агапия',' Агарь',' Агата',' Агафа',' Агафоклия',' Агафоника',' Агафья',' Аглаида',' Аглая',' Агнесса',' Агния',' Аграфена',' Агриппина',' Ада',' Аделаида',' Аделина',' Аделла',' Адель',' Адельфина',' Адина',' Адолия',' Адриана',' Аза',' Азалия',' Азелла',' Аида',' Акилина',' Аксинья',' Акулина',' Алевтина',' Александра',' Александрина',' Алексина',' Алёна',' Алина',' Алиса',' Алла',' Алфея',' Альберта',' Альбертина',' Альбина',' Альвина',' Альфия',' Амалия',' Амата',' Амелфа',' Анастасия',' Анатолия',' Ангела',' Ангелика',' Ангелина',' Анджела',' Андрея',' Андрона',' Андроника',' Анжела',' Анжелика',' Анисья',' Анна',' Антигона',' Антонида',' Антониана',' Антонина',' Антония',' Анфима',' Анфиса',' Анфия',' Анфуса',' Аполлинария',' Аполлония',' Апраксия',' Апрелия',' Апфия',' Аргентея',' Ариадна',' Арина',' Ария',' Арминия',' Арсения',' Артемида',' Артемия',' Аста',' Астра',' Афанасия',' Аэлита',' Беата',' Беатриса',' Белла',' Бенедикта',' Берта',' Бландина',' Богдана',' Божена',' Болеслава',' Борислава',' Бояна',' Бронислава',' Валентина',' Валенсия',' Валерия',' Ванда',' Варвара',' Васёна',' Василида',' Василина',' Василиса',' Василия',' Василла',' Васса',' Вацлава',' Вевея',' Велимира',' Велислава',' Венедикта',' Венера',' Венуста',' Венцеслава',' Вера',' Вереника',' Вероника',' Верония',' Веселина',' Веста',' Вестита',' Вива',' Вивея',' Вивиана',' Видана',' Викентия',' Викторина',' Виктория',' Вила',' Вилена',' Виленина',' Вильгельмина',' Виола',' Виолетта',' Виргиния',' Виринея',' Вита',' Виталика',' Виталина',' Виталия',' Влада',' Владилена',' Владимира',' Владислава',' Владлена',' Власта',' Воислава',' Воля',' Всеслава',' Гаафа',' Гала',' Галата',' Галатея',' Гали',' Галина',' Галла',' Галя',' Гая',' Геласия',' Гемелла',' Гемина',' Гения',' Геннадия',' Геновефа',' Генриетта',' Георгина',' Гера',' Германа',' Гертруда',' Гея',' Глафира',' Гликерия',' Глориоза',' Голиндуха',' Гонеста',' Гонората',' Горгония',' Горислава',' Гортензия',' Градислава',' Грета',' Далила',' Даная',' Дарья',' Дебора',' Деина',' Декабрина',' Денисия',' Диана',' Дигна',' Дина',' Диодора',' Дионина',' Дия',' Доброгнева',' Добромила',' Добромира',' Доброслава',' Доминика',' Домитилла',' Домна',' Домника',' Домникия',' Домнина',' Донара',' Доната',' Дора',' Дорофея',' Доса',' Досифея',' Дросида',' Дуклида',' Ева',' Евангелина',' Еванфия',' Евгения',' Евдокия',' Евдоксия',' Евлалия',' Евлампия',' Евмения',' Евминия',' Евника',' Евникия',' Евномия',' Евпраксия',' Евсевия',' Евстафия',' Евстолия',' Евтихия',' Евтропия',' Евфалия',' Евфимия',' Евфросиния',' Екатерина',' Елена',' Елизавета',' Еликонида',' Епистима',' Епистимия',' Ермиония',' Ефимия',' Ефросиния',' Жанна',' Жозефина',' Зара',' Зарема',' Зарина',' Заря',' Заряна',' Звезда',' Земфира',' Зенона',' Зина',' Зинаида',' Зиновия',' Злата',' Зоя',' Ива',' Иванна',' Ида',' Идея',' Иветта',' Ивонна',' Изабелла',' Изида',' Изольда',' Илария',' Илия',' Илона',' Ильина',' Инга',' Инесса',' Инна',' Иоанна',' Иовилла',' Иола',' Иоланта',' Ипполита',' Ираида',' Ирина',' Ирма',' Исидора',' Ифигения',' Ия',' Каздоя',' Казимира',' Калерия',' Калида',' Калиса',' Каллиникия',' Каллиста',' Кама',' Камилла',' Кандида',' Капитолина',' Карина',' Каролина',' Касиния',' Келестина',' Керкира',' Кетевань',' Киликия',' Кима',' Кира',' Кириакия',' Кириана',' Кирилла',' Клавдия',' Клара',' Клариса',' Клементина',' Клеопатра',' Конкордия',' Констанция',' Корнелия',' Кристина',' Ксанфиппа',' Ксения',' Купава',' Лавиния',' Лавра',' Лада',' Лариса',' Лаура',' Леда',' Лейла',' Лемира',' Ленина',' Леокадия',' Леонида',' Леонила',' Леонина',' Леония',' Лея',' Лиана',' Ливия',' Лидия',' Лилиана',' Лилия',' Лина',' Лира',' Лия',' Лолия',' Лонгина',' Лора',' Лота',' Луиза',' Лукерья',' Лукиана',' Лукия',' Лукреция',' Любава',' Любовь',' Любомила',' Любомира',' Людмила',' Люцина',' Люция',' Мавра',' Магда',' Магдалина',' Магна',' Маина',' Майя',' Макрина',' Максима',' Малания',' Малина',' Мальвина',' Мамелфа',' Манефа',' Маргарита',' Мариам',' Мариамна',' Мариана',' Марианна',' Мариетта',' Марина',' Марионилла',' Мария',' Марка',' Маркеллина',' Маркиана',' Марксина',' Марлена',' Марта',' Мартина',' Мартиниана',' Марфа',' Марья',' Марьяна',' Мастридия',' Матильда',' Матрёна',' Матрона',' Мая',' Медея',' Мелания',' Мелитина',' Меркурия',' Мерона',' Милана',' Милена',' Милица',' Милия',' Милослава',' Милютина',' Мина',' Минна',' Минодора',' Мира',' Миропия',' Мирослава',' Мирра',' Митродора',' Михайлина',' Млада',' Модеста',' Моика',' Моника',' Мстислава',' Муза',' Нада',' Надежда',' Нана',' Наркисса',' Настасия',' Наталия',' Нелли',' Ненила',' Неонила',' Нида',' Ника',' Нимфа',' Нимфодора',' Нина',' Нинель',' Новелла',' Нонна',' Ноэми',' Ноябрина',' Нунехия',' Оксана',' Октавия',' Октябрина',' Олдама',' Олеся',' Оливия',' Олимпиада',' Олимпиодора',' Олимпия',' Ольга',' Ольда',' Офелия',' Павла',' Павлина',' Паисия',' Паллада',' Палладия',' Пальмира',' Параскева',' Патрикия',' Пелагея',' Перегрина',' Перпетуя',' Петра',' Петрина',' Петронилла',' Петрония',' Пиама',' Пинна',' Плакида',' Плакилла',' Платонида',' Поликсена',' Поликсения',' Полина',' Поплия',' Правдина',' Прасковья',' Пропедигна',' Прискилла',' Просдоха',' Пульхерия',' Рада',' Радана',' Радислава',' Радмила',' Радомила',' Радомира',' Радосвета',' Радослава',' Радость',' Раиса',' Рафаила',' Рахиль',' Ревекка',' Ревмира',' Регина',' Рема',' Рената',' Римма',' Рипсимия',' Роберта',' Рогнеда',' Роза',' Розалина',' Розалинда',' Розалия',' Розина',' Роксана',' Романа',' Ростислава',' Русана',' Руслана',' Руфина',' Руфиниана',' Руфь',' Сабина',' Савватия',' Савелла',' Савина',' Саломея',' Сальвия',' Самона',' Сарра',' Сатира',' Светислава',' Светлана',' Светозара',' Святослава',' Севастьяна',' Северина',' Секлетея',' Секлетинья',' Селена',' Селестина',' Селина',' Серафима',' Сибилла',' Сильва',' Сильвана',' Сильвестра',' Сильвия',' Симона',' Синклитикия',' Сира',' Слава',' Снадулия',' Снежана',' Сола',' Соломонида',' Соломония',' Сосипатра',' Софрония',' Софья',' Станислава',' Стелла',' Степанида',' Стефанида',' Стефания',' Сусанна',' Сюзанна',' Тавифа',' Таисия',' Тамара',' Тарасия',' Татьяна',' Текуса',' Тереза',' Тигрия',' Тихомира',' Тихослава',' Тома',' Томила',' Транквиллина',' Трифена',' Трофима',' Улита',' Ульяна',' Урбана',' Урсула',' Устина',' Устиния',' Фабиана',' Фавста',' Фавстина',' Фаина',' Фантина',' Феврония',' Федоза',' Федора',' Федосия',' Федотия',' Федула',' Фёкла',' Фекуса',' Феликса',' Фелица',' Фелицата',' Фелиция',' Феогния',' Феодора',' Феодосия',' Феодота',' Феодотия',' Феодула',' Феодулия',' Феозва',' Феоктиста',' Феона',' Феонилла',' Феония',' Феопистия',' Феосевия',' Феофания',' Феофила',' Фервуфа',' Фессалоника',' Фессалоникия',' Фетиния',' Фея',' Фива',' Фивея',' Филарета',' Филиппа',' Филиппия',' Филомена',' Филонилла',' Филофея',' Фиста',' Флавия',' Флёна',' Флора',' Флорентина',' Флоренция',' Флориана',' Флорида',' Фомаида',' Фортуната',' Фотина',' Фотиния',' Франциска',' Фрида',' Фридерика',' Хаврония',' Хариесса',' Хариса',' Харита',' Харитина',' Хиония',' Хриса',' Хрисия',' Христиана',' Христина',' Цвета',' Цветана',' Целестина',' Цецилия',' Шарлотта',' Шушаника',' Эвелина',' Эгина',' Эдит',' Эдита',' Элеонора',' Элисса',' Элла',' Эллада',' Эллина',' Элоиза',' Эльвира',' Эльза',' Эльмира',' Эмилиана',' Эмилия',' Эмма',' Эннафа',' Эра',' Эрна',' Эрнеста',' Эрнестина',' Эсмеральда',' Эсфирь',' Юдифь',' Юлиана',' Юлиания',' Юлия',' Юния',' Юнона',' Юрия',' Юстина',' Ядвига',' Яна',' Янина' ];\n$post=['Директор','Зам-директор','Главный-инженер','Инженер','Мастер','Прораб','Слесарь','Стажер'];\n$a=0;\n$b=10;\n$g=1;\n$post_id=0;\n $cheif=null;\n\n for($i=0;$i<50000;$i++){\n\n\n $randomDate = '2020-05-06';\n\n if($a==10){\n $cheif++;\n $a=0;\n }\n\n\n\n \\DB::table('workers')->insert([\n\n 'name' => Arr::random($name).' '.Arr::random($name).' '.Arr::random($name),\n 'post' =>$post[$post_id],\n 'device_date'=>$randomDate,\n 'salary'=>random_int(350,3000),\n 'parent_id'=>$cheif,\n ]);\n if($g==$b){\n $g=1;\n $b=$b*10;\n $post_id++;\n }\n else{\n $g++;\n\n }\n $a++;\n }\n\n\n }", "function formatar($string, $tipo = \"\")\n{\n if(empty($string))\n return false;\n \n // Limpa texto deixando somewnte os numeros\n $string = preg_replace(\"#[^0-9]#\", \"\", $string);\n \n // Caso nao informe o tipo, detecta alguns padroes\n if (!$tipo)\n {\n switch (strlen($string))\n {\n case 10: \t$tipo = 'fone'; break;\n case 8: \t$tipo = 'cep'; break;\n case 11: \t$tipo = 'cpf'; break;\n case 14: $tipo = 'cnpj'; break;\n }\n }\n \n // Formata no tipo escolhido\n switch($tipo)\n {\n case 'fone':\n if(strlen($string) == 10)\n $string = '(' . substr($string, 0, 2) . ') ' . substr($string, 2, 4) . '-' . substr($string, 6);\n else\n $string = '(' . substr($string, 0, 2) . ') ' . substr($string, 2, 5) . '-' . substr($string, 7);\n break;\n case 'cep':\n $string = substr($string, 0, 5) . '-' . substr($string, 5, 3);\n break;\n case 'cpf':\n $string = substr($string, 0, 3) . '.' . substr($string, 3, 3) . '.' . substr($string, 6, 3) . '-' . substr($string, 9, 2);\n break;\n case 'cnpj':\n $string = substr($string, 0, 2) . '.' . substr($string, 2, 3) . '.' . substr($string, 5, 3) . '/' . substr($string, 8, 4) . '-' . substr($string, 12, 2);\n break;\n case 'dt2bd':\n $string = substr($string, -4) . '-' . substr($string, 2, 2) . '-' . substr($string, 0, 2);\n break;\n case 'bd2dt':\n $string = substr($string, -2) . '/' . substr($string, 4, 2) . '/' . substr($string, 0, 4);\n break;\n }\n return $string;\n}", "function testFinalNomCoureur($str) {\n // ##### Test charactère par charactère ######\n $str = str_split($str);\n foreach($str as $char) {\n if(!preg_match(\"#[A-Z]|'|-|\\040#\", $char)) {\n //echo \"Charactère interdit : \" . utf8_encode($char) . \"<br>\";\n return false;\n }\n }\n $str = implode($str);\n // ##### Fin test charactère #####\n \n // ##### Test cas bizarre #####\n if(preg_match(\"#^'*$|''+|^' '$|' '$|^' '|^\\\"*$#\", $str) || preg_match(\"#(\\040\\\"\\040)|(\\040''\\040)|(\\040'\\040)#\", $str) || preg_match(\"#--.*--#\", $str)) {\n //echo \"Cas bizarre : \" . utf8_encode($str) . \"<br>\";\n return false;\n }\n // ##### Fin test cas bizarre\n return $str;\n }", "function mPN_CHARS_U(){\n try {\n // Tokenizer11.g:534:3: ( PN_CHARS_BASE | '_' ) \n // Tokenizer11.g: \n {\n if ( $this->input->LA(1)==$this->getToken('95')||($this->input->LA(1)>=$this->getToken('97') && $this->input->LA(1)<=$this->getToken('122'))||($this->input->LA(1)>=$this->getToken('192') && $this->input->LA(1)<=$this->getToken('214'))||($this->input->LA(1)>=$this->getToken('216') && $this->input->LA(1)<=$this->getToken('246'))||($this->input->LA(1)>=$this->getToken('248') && $this->input->LA(1)<=$this->getToken('767'))||($this->input->LA(1)>=$this->getToken('880') && $this->input->LA(1)<=$this->getToken('893'))||($this->input->LA(1)>=$this->getToken('895') && $this->input->LA(1)<=$this->getToken('8191'))||($this->input->LA(1)>=$this->getToken('8204') && $this->input->LA(1)<=$this->getToken('8205'))||($this->input->LA(1)>=$this->getToken('8304') && $this->input->LA(1)<=$this->getToken('8591'))||($this->input->LA(1)>=$this->getToken('11264') && $this->input->LA(1)<=$this->getToken('12271'))||($this->input->LA(1)>=$this->getToken('12289') && $this->input->LA(1)<=$this->getToken('55295'))||($this->input->LA(1)>=$this->getToken('63744') && $this->input->LA(1)<=$this->getToken('64975'))||($this->input->LA(1)>=$this->getToken('65008') && $this->input->LA(1)<=$this->getToken('65533')) ) {\n $this->input->consume();\n\n }\n else {\n $mse = new MismatchedSetException(null,$this->input);\n $this->recover($mse);\n throw $mse;}\n\n\n }\n\n }\n catch(Exception $e){\n throw $e;\n }\n }", "public function alphabetOnlywithspace($data,$required,$min,$max);", "function difundir() {\n\n // La funcion obtener_frase esta heredado del pariente Orador\n $frase = $this->obtener_frase();\n\n // Convirtir a mayusculos\n $frase_mayusculas = strtoupper($frase);\n\n echo $frase_mayusculas;\n\n }", "function getfield(){\r\n // Талбаруудын утгыг авах\r\n }", "function fAlfaNum($string) {\r\n $s = preg_replace(\"[^a-zA-Z0-9_]\", \"\", strtr($string, \"áàãâéêíóôõúüçÁÀÃÂÉÊÍÓÔÕÚÜÇ \", \"aaaaeeiooouucAAAAEEIOOOUUC_\"));\r\n $s = strtr($s, \"_\", \"\");\r\n return $s;\r\n }", "function Comprobar_codedificio()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->codedificio)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->codedificio)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->codedificio)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\t\n\treturn $correcto;//se devuelve el resultado\n}", "function Comprobar_codespacio()\n{\n\t$correcto = true;\n\t//si se cumple la condicion\n\tif (strlen($this->CODESPACIO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODESPACIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->CODESPACIO)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODESPACIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->CODESPACIO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODESPACIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t\n\treturn $correcto; //se devuelve el resultado\n}", "function validaEntero ($texto) {\n// prueba si la entrada es un entero, sin signo\nreturn preg_match(\"/^[0-9]+$/\", $texto );\n}", "function tach_chu_hien_thi($content){\r\n $mang = explode(\" \", $content);\r\n $str = \"\";\r\n $sochu = sizeof($mang);\r\n if($sochu < 10){\r\n for($j = 0; $j < sizeof($mang); $j++){\r\n $str = $str.\" \".$mang[$j];\r\n }\r\n }else{\r\n for($j = 0; $j < 15; $j++){\r\n $str = $str.\" \".$mang[$j];\r\n }\r\n }\r\n return $str;\r\n}", "function Code39 ($Asc)\n{\n switch ($Asc)\n {\n case ' ':\n return \"011000100\"; \n case '$':\n return \"010101000\"; \n case '%':\n return \"000101010\"; \n case '*':\n return \"010010100\"; // * Start/Stop\n case '+':\n return \"010001010\"; \n case '|':\n return \"010000101\"; \n case '.':\n return \"110000100\"; \n case '/':\n return \"010100010\"; \n\t\t\t\tcase '-':\n\t\t\t\t\t\treturn \"010000101\";\n case '0':\n return \"000110100\"; \n case '1':\n return \"100100001\"; \n case '2':\n return \"001100001\"; \n case '3':\n return \"101100000\"; \n case '4':\n return \"000110001\"; \n case '5':\n return \"100110000\"; \n case '6':\n return \"001110000\"; \n case '7':\n return \"000100101\"; \n case '8':\n return \"100100100\"; \n case '9':\n return \"001100100\"; \n case 'A':\n return \"100001001\"; \n case 'B':\n return \"001001001\"; \n case 'C':\n return \"101001000\";\n case 'D':\n return \"000011001\";\n case 'E':\n return \"100011000\";\n case 'F':\n return \"001011000\";\n case 'G':\n return \"000001101\";\n case 'H':\n return \"100001100\";\n case 'I':\n return \"001001100\";\n case 'J':\n return \"000011100\";\n case 'K':\n return \"100000011\";\n case 'L':\n return \"001000011\";\n case 'M':\n return \"101000010\";\n case 'N':\n return \"000010011\";\n case 'O':\n return \"100010010\";\n case 'P':\n return \"001010010\";\n case 'Q':\n return \"000000111\";\n case 'R':\n return \"100000110\";\n case 'S':\n return \"001000110\";\n case 'T':\n return \"000010110\";\n case 'U':\n return \"110000001\";\n case 'V':\n return \"011000001\";\n case 'W':\n return \"111000000\";\n case 'X':\n return \"010010001\";\n case 'Y':\n return \"110010000\";\n case 'Z':\n return \"011010000\";\n default:\n return \"011000100\"; \n }\n}", "function convMinuscule($valeur){\r\n if($valeur>=\"A\" && $valeur<=\"Z\"){\r\n $codeValeur = ord($valeur) + 32;\r\n }\r\n return chr($codeValeur);\r\n }", "static public function words() : array {\n return [\n \"абажур\",\n \"абзац\",\n \"абонент\",\n \"абрикос\",\n \"абсурд\",\n \"авангард\",\n \"август\",\n \"авиация\",\n \"авоська\",\n \"автор\",\n \"агат\",\n \"агент\",\n \"агитатор\",\n \"агнец\",\n \"агония\",\n \"агрегат\",\n \"адвокат\",\n \"адмирал\",\n \"адрес\",\n \"ажиотаж\",\n \"азарт\",\n \"азбука\",\n \"азот\",\n \"аист\",\n \"айсберг\",\n \"академия\",\n \"аквариум\",\n \"аккорд\",\n \"акробат\",\n \"аксиома\",\n \"актер\",\n \"акула\",\n \"акция\",\n \"алгоритм\",\n \"алебарда\",\n \"аллея\",\n \"алмаз\",\n \"алтарь\",\n \"алфавит\",\n \"алхимик\",\n \"алый\",\n \"альбом\",\n \"алюминий\",\n \"амбар\",\n \"аметист\",\n \"амнезия\",\n \"ампула\",\n \"амфора\",\n \"анализ\",\n \"ангел\",\n \"анекдот\",\n \"анимация\",\n \"анкета\",\n \"аномалия\",\n \"ансамбль\",\n \"антенна\",\n \"апатия\",\n \"апельсин\",\n \"апофеоз\",\n \"аппарат\",\n \"апрель\",\n \"аптека\",\n \"арабский\",\n \"арбуз\",\n \"аргумент\",\n \"арест\",\n \"ария\",\n \"арка\",\n \"армия\",\n \"аромат\",\n \"арсенал\",\n \"артист\",\n \"архив\",\n \"аршин\",\n \"асбест\",\n \"аскетизм\",\n \"аспект\",\n \"ассорти\",\n \"астроном\",\n \"асфальт\",\n \"атака\",\n \"ателье\",\n \"атлас\",\n \"атом\",\n \"атрибут\",\n \"аудитор\",\n \"аукцион\",\n \"аура\",\n \"афера\",\n \"афиша\",\n \"ахинея\",\n \"ацетон\",\n \"аэропорт\",\n \"бабушка\",\n \"багаж\",\n \"бадья\",\n \"база\",\n \"баклажан\",\n \"балкон\",\n \"бампер\",\n \"банк\",\n \"барон\",\n \"бассейн\",\n \"батарея\",\n \"бахрома\",\n \"башня\",\n \"баян\",\n \"бегство\",\n \"бедро\",\n \"бездна\",\n \"бекон\",\n \"белый\",\n \"бензин\",\n \"берег\",\n \"беседа\",\n \"бетонный\",\n \"биатлон\",\n \"библия\",\n \"бивень\",\n \"бигуди\",\n \"бидон\",\n \"бизнес\",\n \"бикини\",\n \"билет\",\n \"бинокль\",\n \"биология\",\n \"биржа\",\n \"бисер\",\n \"битва\",\n \"бицепс\",\n \"благо\",\n \"бледный\",\n \"близкий\",\n \"блок\",\n \"блуждать\",\n \"блюдо\",\n \"бляха\",\n \"бобер\",\n \"богатый\",\n \"бодрый\",\n \"боевой\",\n \"бокал\",\n \"большой\",\n \"борьба\",\n \"босой\",\n \"ботинок\",\n \"боцман\",\n \"бочка\",\n \"боярин\",\n \"брать\",\n \"бревно\",\n \"бригада\",\n \"бросать\",\n \"брызги\",\n \"брюки\",\n \"бублик\",\n \"бугор\",\n \"будущее\",\n \"буква\",\n \"бульвар\",\n \"бумага\",\n \"бунт\",\n \"бурный\",\n \"бусы\",\n \"бутылка\",\n \"буфет\",\n \"бухта\",\n \"бушлат\",\n \"бывалый\",\n \"быль\",\n \"быстрый\",\n \"быть\",\n \"бюджет\",\n \"бюро\",\n \"бюст\",\n \"вагон\",\n \"важный\",\n \"ваза\",\n \"вакцина\",\n \"валюта\",\n \"вампир\",\n \"ванная\",\n \"вариант\",\n \"вассал\",\n \"вата\",\n \"вафля\",\n \"вахта\",\n \"вдова\",\n \"вдыхать\",\n \"ведущий\",\n \"веер\",\n \"вежливый\",\n \"везти\",\n \"веко\",\n \"великий\",\n \"вена\",\n \"верить\",\n \"веселый\",\n \"ветер\",\n \"вечер\",\n \"вешать\",\n \"вещь\",\n \"веяние\",\n \"взаимный\",\n \"взбучка\",\n \"взвод\",\n \"взгляд\",\n \"вздыхать\",\n \"взлетать\",\n \"взмах\",\n \"взнос\",\n \"взор\",\n \"взрыв\",\n \"взывать\",\n \"взятка\",\n \"вибрация\",\n \"визит\",\n \"вилка\",\n \"вино\",\n \"вирус\",\n \"висеть\",\n \"витрина\",\n \"вихрь\",\n \"вишневый\",\n \"включать\",\n \"вкус\",\n \"власть\",\n \"влечь\",\n \"влияние\",\n \"влюблять\",\n \"внешний\",\n \"внимание\",\n \"внук\",\n \"внятный\",\n \"вода\",\n \"воевать\",\n \"вождь\",\n \"воздух\",\n \"войти\",\n \"вокзал\",\n \"волос\",\n \"вопрос\",\n \"ворота\",\n \"восток\",\n \"впадать\",\n \"впускать\",\n \"врач\",\n \"время\",\n \"вручать\",\n \"всадник\",\n \"всеобщий\",\n \"вспышка\",\n \"встреча\",\n \"вторник\",\n \"вулкан\",\n \"вурдалак\",\n \"входить\",\n \"въезд\",\n \"выбор\",\n \"вывод\",\n \"выгодный\",\n \"выделять\",\n \"выезжать\",\n \"выживать\",\n \"вызывать\",\n \"выигрыш\",\n \"вылезать\",\n \"выносить\",\n \"выпивать\",\n \"высокий\",\n \"выходить\",\n \"вычет\",\n \"вышка\",\n \"выяснять\",\n \"вязать\",\n \"вялый\",\n \"гавань\",\n \"гадать\",\n \"газета\",\n \"гаишник\",\n \"галстук\",\n \"гамма\",\n \"гарантия\",\n \"гастроли\",\n \"гвардия\",\n \"гвоздь\",\n \"гектар\",\n \"гель\",\n \"генерал\",\n \"геолог\",\n \"герой\",\n \"гешефт\",\n \"гибель\",\n \"гигант\",\n \"гильза\",\n \"гимн\",\n \"гипотеза\",\n \"гитара\",\n \"глаз\",\n \"глина\",\n \"глоток\",\n \"глубокий\",\n \"глыба\",\n \"глядеть\",\n \"гнать\",\n \"гнев\",\n \"гнить\",\n \"гном\",\n \"гнуть\",\n \"говорить\",\n \"годовой\",\n \"голова\",\n \"гонка\",\n \"город\",\n \"гость\",\n \"готовый\",\n \"граница\",\n \"грех\",\n \"гриб\",\n \"громкий\",\n \"группа\",\n \"грызть\",\n \"грязный\",\n \"губа\",\n \"гудеть\",\n \"гулять\",\n \"гуманный\",\n \"густой\",\n \"гуща\",\n \"давать\",\n \"далекий\",\n \"дама\",\n \"данные\",\n \"дарить\",\n \"дать\",\n \"дача\",\n \"дверь\",\n \"движение\",\n \"двор\",\n \"дебют\",\n \"девушка\",\n \"дедушка\",\n \"дежурный\",\n \"дезертир\",\n \"действие\",\n \"декабрь\",\n \"дело\",\n \"демократ\",\n \"день\",\n \"депутат\",\n \"держать\",\n \"десяток\",\n \"детский\",\n \"дефицит\",\n \"дешевый\",\n \"деятель\",\n \"джаз\",\n \"джинсы\",\n \"джунгли\",\n \"диалог\",\n \"диван\",\n \"диета\",\n \"дизайн\",\n \"дикий\",\n \"динамика\",\n \"диплом\",\n \"директор\",\n \"диск\",\n \"дитя\",\n \"дичь\",\n \"длинный\",\n \"дневник\",\n \"добрый\",\n \"доверие\",\n \"договор\",\n \"дождь\",\n \"доза\",\n \"документ\",\n \"должен\",\n \"домашний\",\n \"допрос\",\n \"дорога\",\n \"доход\",\n \"доцент\",\n \"дочь\",\n \"дощатый\",\n \"драка\",\n \"древний\",\n \"дрожать\",\n \"друг\",\n \"дрянь\",\n \"дубовый\",\n \"дуга\",\n \"дудка\",\n \"дукат\",\n \"дуло\",\n \"думать\",\n \"дупло\",\n \"дурак\",\n \"дуть\",\n \"духи\",\n \"душа\",\n \"дуэт\",\n \"дымить\",\n \"дыня\",\n \"дыра\",\n \"дыханье\",\n \"дышать\",\n \"дьявол\",\n \"дюжина\",\n \"дюйм\",\n \"дюна\",\n \"дядя\",\n \"дятел\",\n \"егерь\",\n \"единый\",\n \"едкий\",\n \"ежевика\",\n \"ежик\",\n \"езда\",\n \"елка\",\n \"емкость\",\n \"ерунда\",\n \"ехать\",\n \"жадный\",\n \"жажда\",\n \"жалеть\",\n \"жанр\",\n \"жара\",\n \"жать\",\n \"жгучий\",\n \"ждать\",\n \"жевать\",\n \"желание\",\n \"жемчуг\",\n \"женщина\",\n \"жертва\",\n \"жесткий\",\n \"жечь\",\n \"живой\",\n \"жидкость\",\n \"жизнь\",\n \"жилье\",\n \"жирный\",\n \"житель\",\n \"журнал\",\n \"жюри\",\n \"забывать\",\n \"завод\",\n \"загадка\",\n \"задача\",\n \"зажечь\",\n \"зайти\",\n \"закон\",\n \"замечать\",\n \"занимать\",\n \"западный\",\n \"зарплата\",\n \"засыпать\",\n \"затрата\",\n \"захват\",\n \"зацепка\",\n \"зачет\",\n \"защита\",\n \"заявка\",\n \"звать\",\n \"звезда\",\n \"звонить\",\n \"звук\",\n \"здание\",\n \"здешний\",\n \"здоровье\",\n \"зебра\",\n \"зевать\",\n \"зеленый\",\n \"земля\",\n \"зенит\",\n \"зеркало\",\n \"зефир\",\n \"зигзаг\",\n \"зима\",\n \"зиять\",\n \"злак\",\n \"злой\",\n \"змея\",\n \"знать\",\n \"зной\",\n \"зодчий\",\n \"золотой\",\n \"зомби\",\n \"зона\",\n \"зоопарк\",\n \"зоркий\",\n \"зрачок\",\n \"зрение\",\n \"зритель\",\n \"зубной\",\n \"зыбкий\",\n \"зять\",\n \"игла\",\n \"иголка\",\n \"играть\",\n \"идея\",\n \"идиот\",\n \"идол\",\n \"идти\",\n \"иерархия\",\n \"избрать\",\n \"известие\",\n \"изгонять\",\n \"издание\",\n \"излагать\",\n \"изменять\",\n \"износ\",\n \"изоляция\",\n \"изрядный\",\n \"изучать\",\n \"изымать\",\n \"изящный\",\n \"икона\",\n \"икра\",\n \"иллюзия\",\n \"имбирь\",\n \"иметь\",\n \"имидж\",\n \"иммунный\",\n \"империя\",\n \"инвестор\",\n \"индивид\",\n \"инерция\",\n \"инженер\",\n \"иномарка\",\n \"институт\",\n \"интерес\",\n \"инфекция\",\n \"инцидент\",\n \"ипподром\",\n \"ирис\",\n \"ирония\",\n \"искать\",\n \"история\",\n \"исходить\",\n \"исчезать\",\n \"итог\",\n \"июль\",\n \"июнь\",\n \"кабинет\",\n \"кавалер\",\n \"кадр\",\n \"казарма\",\n \"кайф\",\n \"кактус\",\n \"калитка\",\n \"камень\",\n \"канал\",\n \"капитан\",\n \"картина\",\n \"касса\",\n \"катер\",\n \"кафе\",\n \"качество\",\n \"каша\",\n \"каюта\",\n \"квартира\",\n \"квинтет\",\n \"квота\",\n \"кедр\",\n \"кекс\",\n \"кенгуру\",\n \"кепка\",\n \"керосин\",\n \"кетчуп\",\n \"кефир\",\n \"кибитка\",\n \"кивнуть\",\n \"кидать\",\n \"километр\",\n \"кино\",\n \"киоск\",\n \"кипеть\",\n \"кирпич\",\n \"кисть\",\n \"китаец\",\n \"класс\",\n \"клетка\",\n \"клиент\",\n \"клоун\",\n \"клуб\",\n \"клык\",\n \"ключ\",\n \"клятва\",\n \"книга\",\n \"кнопка\",\n \"кнут\",\n \"князь\",\n \"кобура\",\n \"ковер\",\n \"коготь\",\n \"кодекс\",\n \"кожа\",\n \"козел\",\n \"койка\",\n \"коктейль\",\n \"колено\",\n \"компания\",\n \"конец\",\n \"копейка\",\n \"короткий\",\n \"костюм\",\n \"котел\",\n \"кофе\",\n \"кошка\",\n \"красный\",\n \"кресло\",\n \"кричать\",\n \"кровь\",\n \"крупный\",\n \"крыша\",\n \"крючок\",\n \"кубок\",\n \"кувшин\",\n \"кудрявый\",\n \"кузов\",\n \"кукла\",\n \"культура\",\n \"кумир\",\n \"купить\",\n \"курс\",\n \"кусок\",\n \"кухня\",\n \"куча\",\n \"кушать\",\n \"кювет\",\n \"лабиринт\",\n \"лавка\",\n \"лагерь\",\n \"ладонь\",\n \"лазерный\",\n \"лайнер\",\n \"лакей\",\n \"лампа\",\n \"ландшафт\",\n \"лапа\",\n \"ларек\",\n \"ласковый\",\n \"лауреат\",\n \"лачуга\",\n \"лаять\",\n \"лгать\",\n \"лебедь\",\n \"левый\",\n \"легкий\",\n \"ледяной\",\n \"лежать\",\n \"лекция\",\n \"лента\",\n \"лепесток\",\n \"лесной\",\n \"лето\",\n \"лечь\",\n \"леший\",\n \"лживый\",\n \"либерал\",\n \"ливень\",\n \"лига\",\n \"лидер\",\n \"ликовать\",\n \"лиловый\",\n \"лимон\",\n \"линия\",\n \"липа\",\n \"лирика\",\n \"лист\",\n \"литр\",\n \"лифт\",\n \"лихой\",\n \"лицо\",\n \"личный\",\n \"лишний\",\n \"лобовой\",\n \"ловить\",\n \"логика\",\n \"лодка\",\n \"ложка\",\n \"лозунг\",\n \"локоть\",\n \"ломать\",\n \"лоно\",\n \"лопата\",\n \"лорд\",\n \"лось\",\n \"лоток\",\n \"лохматый\",\n \"лошадь\",\n \"лужа\",\n \"лукавый\",\n \"луна\",\n \"лупить\",\n \"лучший\",\n \"лыжный\",\n \"лысый\",\n \"львиный\",\n \"льгота\",\n \"льдина\",\n \"любить\",\n \"людской\",\n \"люстра\",\n \"лютый\",\n \"лягушка\",\n \"магазин\",\n \"мадам\",\n \"мазать\",\n \"майор\",\n \"максимум\",\n \"мальчик\",\n \"манера\",\n \"март\",\n \"масса\",\n \"мать\",\n \"мафия\",\n \"махать\",\n \"мачта\",\n \"машина\",\n \"маэстро\",\n \"маяк\",\n \"мгла\",\n \"мебель\",\n \"медведь\",\n \"мелкий\",\n \"мемуары\",\n \"менять\",\n \"мера\",\n \"место\",\n \"метод\",\n \"механизм\",\n \"мечтать\",\n \"мешать\",\n \"миграция\",\n \"мизинец\",\n \"микрофон\",\n \"миллион\",\n \"минута\",\n \"мировой\",\n \"миссия\",\n \"митинг\",\n \"мишень\",\n \"младший\",\n \"мнение\",\n \"мнимый\",\n \"могила\",\n \"модель\",\n \"мозг\",\n \"мойка\",\n \"мокрый\",\n \"молодой\",\n \"момент\",\n \"монах\",\n \"море\",\n \"мост\",\n \"мотор\",\n \"мохнатый\",\n \"мочь\",\n \"мошенник\",\n \"мощный\",\n \"мрачный\",\n \"мстить\",\n \"мудрый\",\n \"мужчина\",\n \"музыка\",\n \"мука\",\n \"мумия\",\n \"мундир\",\n \"муравей\",\n \"мусор\",\n \"мутный\",\n \"муфта\",\n \"муха\",\n \"мучить\",\n \"мушкетер\",\n \"мыло\",\n \"мысль\",\n \"мыть\",\n \"мычать\",\n \"мышь\",\n \"мэтр\",\n \"мюзикл\",\n \"мягкий\",\n \"мякиш\",\n \"мясо\",\n \"мятый\",\n \"мячик\",\n \"набор\",\n \"навык\",\n \"нагрузка\",\n \"надежда\",\n \"наемный\",\n \"нажать\",\n \"называть\",\n \"наивный\",\n \"накрыть\",\n \"налог\",\n \"намерен\",\n \"наносить\",\n \"написать\",\n \"народ\",\n \"натура\",\n \"наука\",\n \"нация\",\n \"начать\",\n \"небо\",\n \"невеста\",\n \"негодяй\",\n \"неделя\",\n \"нежный\",\n \"незнание\",\n \"нелепый\",\n \"немалый\",\n \"неправда\",\n \"нервный\",\n \"нести\",\n \"нефть\",\n \"нехватка\",\n \"нечистый\",\n \"неясный\",\n \"нива\",\n \"нижний\",\n \"низкий\",\n \"никель\",\n \"нирвана\",\n \"нить\",\n \"ничья\",\n \"ниша\",\n \"нищий\",\n \"новый\",\n \"нога\",\n \"ножницы\",\n \"ноздря\",\n \"ноль\",\n \"номер\",\n \"норма\",\n \"нота\",\n \"ночь\",\n \"ноша\",\n \"ноябрь\",\n \"нрав\",\n \"нужный\",\n \"нутро\",\n \"нынешний\",\n \"нырнуть\",\n \"ныть\",\n \"нюанс\",\n \"нюхать\",\n \"няня\",\n \"оазис\",\n \"обаяние\",\n \"обвинять\",\n \"обгонять\",\n \"обещать\",\n \"обжигать\",\n \"обзор\",\n \"обида\",\n \"область\",\n \"обмен\",\n \"обнимать\",\n \"оборона\",\n \"образ\",\n \"обучение\",\n \"обходить\",\n \"обширный\",\n \"общий\",\n \"объект\",\n \"обычный\",\n \"обязать\",\n \"овальный\",\n \"овес\",\n \"овощи\",\n \"овраг\",\n \"овца\",\n \"овчарка\",\n \"огненный\",\n \"огонь\",\n \"огромный\",\n \"огурец\",\n \"одежда\",\n \"одинокий\",\n \"одобрить\",\n \"ожидать\",\n \"ожог\",\n \"озарение\",\n \"озеро\",\n \"означать\",\n \"оказать\",\n \"океан\",\n \"оклад\",\n \"окно\",\n \"округ\",\n \"октябрь\",\n \"окурок\",\n \"олень\",\n \"опасный\",\n \"операция\",\n \"описать\",\n \"оплата\",\n \"опора\",\n \"оппонент\",\n \"опрос\",\n \"оптимизм\",\n \"опускать\",\n \"опыт\",\n \"орать\",\n \"орбита\",\n \"орган\",\n \"орден\",\n \"орел\",\n \"оригинал\",\n \"оркестр\",\n \"орнамент\",\n \"оружие\",\n \"осадок\",\n \"освещать\",\n \"осень\",\n \"осина\",\n \"осколок\",\n \"осмотр\",\n \"основной\",\n \"особый\",\n \"осуждать\",\n \"отбор\",\n \"отвечать\",\n \"отдать\",\n \"отец\",\n \"отзыв\",\n \"открытие\",\n \"отмечать\",\n \"относить\",\n \"отпуск\",\n \"отрасль\",\n \"отставка\",\n \"оттенок\",\n \"отходить\",\n \"отчет\",\n \"отъезд\",\n \"офицер\",\n \"охапка\",\n \"охота\",\n \"охрана\",\n \"оценка\",\n \"очаг\",\n \"очередь\",\n \"очищать\",\n \"очки\",\n \"ошейник\",\n \"ошибка\",\n \"ощущение\",\n \"павильон\",\n \"падать\",\n \"паек\",\n \"пакет\",\n \"палец\",\n \"память\",\n \"панель\",\n \"папка\",\n \"партия\",\n \"паспорт\",\n \"патрон\",\n \"пауза\",\n \"пафос\",\n \"пахнуть\",\n \"пациент\",\n \"пачка\",\n \"пашня\",\n \"певец\",\n \"педагог\",\n \"пейзаж\",\n \"пельмень\",\n \"пенсия\",\n \"пепел\",\n \"период\",\n \"песня\",\n \"петля\",\n \"пехота\",\n \"печать\",\n \"пешеход\",\n \"пещера\",\n \"пианист\",\n \"пиво\",\n \"пиджак\",\n \"пиковый\",\n \"пилот\",\n \"пионер\",\n \"пирог\",\n \"писать\",\n \"пить\",\n \"пицца\",\n \"пишущий\",\n \"пища\",\n \"план\",\n \"плечо\",\n \"плита\",\n \"плохой\",\n \"плыть\",\n \"плюс\",\n \"пляж\",\n \"победа\",\n \"повод\",\n \"погода\",\n \"подумать\",\n \"поехать\",\n \"пожимать\",\n \"позиция\",\n \"поиск\",\n \"покой\",\n \"получать\",\n \"помнить\",\n \"пони\",\n \"поощрять\",\n \"попадать\",\n \"порядок\",\n \"пост\",\n \"поток\",\n \"похожий\",\n \"поцелуй\",\n \"почва\",\n \"пощечина\",\n \"поэт\",\n \"пояснить\",\n \"право\",\n \"предмет\",\n \"проблема\",\n \"пруд\",\n \"прыгать\",\n \"прямой\",\n \"психолог\",\n \"птица\",\n \"публика\",\n \"пугать\",\n \"пудра\",\n \"пузырь\",\n \"пуля\",\n \"пункт\",\n \"пурга\",\n \"пустой\",\n \"путь\",\n \"пухлый\",\n \"пучок\",\n \"пушистый\",\n \"пчела\",\n \"пшеница\",\n \"пыль\",\n \"пытка\",\n \"пыхтеть\",\n \"пышный\",\n \"пьеса\",\n \"пьяный\",\n \"пятно\",\n \"работа\",\n \"равный\",\n \"радость\",\n \"развитие\",\n \"район\",\n \"ракета\",\n \"рамка\",\n \"ранний\",\n \"рапорт\",\n \"рассказ\",\n \"раунд\",\n \"рация\",\n \"рвать\",\n \"реальный\",\n \"ребенок\",\n \"реветь\",\n \"регион\",\n \"редакция\",\n \"реестр\",\n \"режим\",\n \"резкий\",\n \"рейтинг\",\n \"река\",\n \"религия\",\n \"ремонт\",\n \"рента\",\n \"реплика\",\n \"ресурс\",\n \"реформа\",\n \"рецепт\",\n \"речь\",\n \"решение\",\n \"ржавый\",\n \"рисунок\",\n \"ритм\",\n \"рифма\",\n \"робкий\",\n \"ровный\",\n \"рогатый\",\n \"родитель\",\n \"рождение\",\n \"розовый\",\n \"роковой\",\n \"роль\",\n \"роман\",\n \"ронять\",\n \"рост\",\n \"рота\",\n \"роща\",\n \"рояль\",\n \"рубль\",\n \"ругать\",\n \"руда\",\n \"ружье\",\n \"руины\",\n \"рука\",\n \"руль\",\n \"румяный\",\n \"русский\",\n \"ручка\",\n \"рыба\",\n \"рывок\",\n \"рыдать\",\n \"рыжий\",\n \"рынок\",\n \"рысь\",\n \"рыть\",\n \"рыхлый\",\n \"рыцарь\",\n \"рычаг\",\n \"рюкзак\",\n \"рюмка\",\n \"рябой\",\n \"рядовой\",\n \"сабля\",\n \"садовый\",\n \"сажать\",\n \"салон\",\n \"самолет\",\n \"сани\",\n \"сапог\",\n \"сарай\",\n \"сатира\",\n \"сауна\",\n \"сахар\",\n \"сбегать\",\n \"сбивать\",\n \"сбор\",\n \"сбыт\",\n \"свадьба\",\n \"свет\",\n \"свидание\",\n \"свобода\",\n \"связь\",\n \"сгорать\",\n \"сдвигать\",\n \"сеанс\",\n \"северный\",\n \"сегмент\",\n \"седой\",\n \"сезон\",\n \"сейф\",\n \"секунда\",\n \"сельский\",\n \"семья\",\n \"сентябрь\",\n \"сердце\",\n \"сеть\",\n \"сечение\",\n \"сеять\",\n \"сигнал\",\n \"сидеть\",\n \"сизый\",\n \"сила\",\n \"символ\",\n \"синий\",\n \"сирота\",\n \"система\",\n \"ситуация\",\n \"сиять\",\n \"сказать\",\n \"скважина\",\n \"скелет\",\n \"скидка\",\n \"склад\",\n \"скорый\",\n \"скрывать\",\n \"скучный\",\n \"слава\",\n \"слеза\",\n \"слияние\",\n \"слово\",\n \"случай\",\n \"слышать\",\n \"слюна\",\n \"смех\",\n \"смирение\",\n \"смотреть\",\n \"смутный\",\n \"смысл\",\n \"смятение\",\n \"снаряд\",\n \"снег\",\n \"снижение\",\n \"сносить\",\n \"снять\",\n \"событие\",\n \"совет\",\n \"согласие\",\n \"сожалеть\",\n \"сойти\",\n \"сокол\",\n \"солнце\",\n \"сомнение\",\n \"сонный\",\n \"сообщать\",\n \"соперник\",\n \"сорт\",\n \"состав\",\n \"сотня\",\n \"соус\",\n \"социолог\",\n \"сочинять\",\n \"союз\",\n \"спать\",\n \"спешить\",\n \"спина\",\n \"сплошной\",\n \"способ\",\n \"спутник\",\n \"средство\",\n \"срок\",\n \"срывать\",\n \"стать\",\n \"ствол\",\n \"стена\",\n \"стихи\",\n \"сторона\",\n \"страна\",\n \"студент\",\n \"стыд\",\n \"субъект\",\n \"сувенир\",\n \"сугроб\",\n \"судьба\",\n \"суета\",\n \"суждение\",\n \"сукно\",\n \"сулить\",\n \"сумма\",\n \"сунуть\",\n \"супруг\",\n \"суровый\",\n \"сустав\",\n \"суть\",\n \"сухой\",\n \"суша\",\n \"существо\",\n \"сфера\",\n \"схема\",\n \"сцена\",\n \"счастье\",\n \"счет\",\n \"считать\",\n \"сшивать\",\n \"съезд\",\n \"сынок\",\n \"сыпать\",\n \"сырье\",\n \"сытый\",\n \"сыщик\",\n \"сюжет\",\n \"сюрприз\",\n \"таблица\",\n \"таежный\",\n \"таинство\",\n \"тайна\",\n \"такси\",\n \"талант\",\n \"таможня\",\n \"танец\",\n \"тарелка\",\n \"таскать\",\n \"тахта\",\n \"тачка\",\n \"таять\",\n \"тварь\",\n \"твердый\",\n \"творить\",\n \"театр\",\n \"тезис\",\n \"текст\",\n \"тело\",\n \"тема\",\n \"тень\",\n \"теория\",\n \"теплый\",\n \"терять\",\n \"тесный\",\n \"тетя\",\n \"техника\",\n \"течение\",\n \"тигр\",\n \"типичный\",\n \"тираж\",\n \"титул\",\n \"тихий\",\n \"тишина\",\n \"ткань\",\n \"товарищ\",\n \"толпа\",\n \"тонкий\",\n \"топливо\",\n \"торговля\",\n \"тоска\",\n \"точка\",\n \"тощий\",\n \"традиция\",\n \"тревога\",\n \"трибуна\",\n \"трогать\",\n \"труд\",\n \"трюк\",\n \"тряпка\",\n \"туалет\",\n \"тугой\",\n \"туловище\",\n \"туман\",\n \"тундра\",\n \"тупой\",\n \"турнир\",\n \"тусклый\",\n \"туфля\",\n \"туча\",\n \"туша\",\n \"тыкать\",\n \"тысяча\",\n \"тьма\",\n \"тюльпан\",\n \"тюрьма\",\n \"тяга\",\n \"тяжелый\",\n \"тянуть\",\n \"убеждать\",\n \"убирать\",\n \"убогий\",\n \"убыток\",\n \"уважение\",\n \"уверять\",\n \"увлекать\",\n \"угнать\",\n \"угол\",\n \"угроза\",\n \"удар\",\n \"удивлять\",\n \"удобный\",\n \"уезд\",\n \"ужас\",\n \"ужин\",\n \"узел\",\n \"узкий\",\n \"узнавать\",\n \"узор\",\n \"уйма\",\n \"уклон\",\n \"укол\",\n \"уксус\",\n \"улетать\",\n \"улица\",\n \"улучшать\",\n \"улыбка\",\n \"уметь\",\n \"умиление\",\n \"умный\",\n \"умолять\",\n \"умысел\",\n \"унижать\",\n \"уносить\",\n \"уныние\",\n \"упасть\",\n \"уплата\",\n \"упор\",\n \"упрекать\",\n \"упускать\",\n \"уран\",\n \"урна\",\n \"уровень\",\n \"усадьба\",\n \"усердие\",\n \"усилие\",\n \"ускорять\",\n \"условие\",\n \"усмешка\",\n \"уснуть\",\n \"успеть\",\n \"усыпать\",\n \"утешать\",\n \"утка\",\n \"уточнять\",\n \"утро\",\n \"утюг\",\n \"уходить\",\n \"уцелеть\",\n \"участие\",\n \"ученый\",\n \"учитель\",\n \"ушко\",\n \"ущерб\",\n \"уютный\",\n \"уяснять\",\n \"фабрика\",\n \"фаворит\",\n \"фаза\",\n \"файл\",\n \"факт\",\n \"фамилия\",\n \"фантазия\",\n \"фара\",\n \"фасад\",\n \"февраль\",\n \"фельдшер\",\n \"феномен\",\n \"ферма\",\n \"фигура\",\n \"физика\",\n \"фильм\",\n \"финал\",\n \"фирма\",\n \"фишка\",\n \"флаг\",\n \"флейта\",\n \"флот\",\n \"фокус\",\n \"фольклор\",\n \"фонд\",\n \"форма\",\n \"фото\",\n \"фраза\",\n \"фреска\",\n \"фронт\",\n \"фрукт\",\n \"функция\",\n \"фуражка\",\n \"футбол\",\n \"фыркать\",\n \"халат\",\n \"хамство\",\n \"хаос\",\n \"характер\",\n \"хата\",\n \"хватать\",\n \"хвост\",\n \"хижина\",\n \"хилый\",\n \"химия\",\n \"хирург\",\n \"хитрый\",\n \"хищник\",\n \"хлам\",\n \"хлеб\",\n \"хлопать\",\n \"хмурый\",\n \"ходить\",\n \"хозяин\",\n \"хоккей\",\n \"холодный\",\n \"хороший\",\n \"хотеть\",\n \"хохотать\",\n \"храм\",\n \"хрен\",\n \"хриплый\",\n \"хроника\",\n \"хрупкий\",\n \"художник\",\n \"хулиган\",\n \"хутор\",\n \"царь\",\n \"цвет\",\n \"цель\",\n \"цемент\",\n \"центр\",\n \"цепь\",\n \"церковь\",\n \"цикл\",\n \"цилиндр\",\n \"циничный\",\n \"цирк\",\n \"цистерна\",\n \"цитата\",\n \"цифра\",\n \"цыпленок\",\n \"чадо\",\n \"чайник\",\n \"часть\",\n \"чашка\",\n \"человек\",\n \"чемодан\",\n \"чепуха\",\n \"черный\",\n \"честь\",\n \"четкий\",\n \"чехол\",\n \"чиновник\",\n \"число\",\n \"читать\",\n \"членство\",\n \"чреватый\",\n \"чтение\",\n \"чувство\",\n \"чугунный\",\n \"чудо\",\n \"чужой\",\n \"чукча\",\n \"чулок\",\n \"чума\",\n \"чуткий\",\n \"чучело\",\n \"чушь\",\n \"шаблон\",\n \"шагать\",\n \"шайка\",\n \"шакал\",\n \"шалаш\",\n \"шампунь\",\n \"шанс\",\n \"шапка\",\n \"шарик\",\n \"шасси\",\n \"шатер\",\n \"шахта\",\n \"шашлык\",\n \"швейный\",\n \"швырять\",\n \"шевелить\",\n \"шедевр\",\n \"шейка\",\n \"шелковый\",\n \"шептать\",\n \"шерсть\",\n \"шестерка\",\n \"шикарный\",\n \"шинель\",\n \"шипеть\",\n \"широкий\",\n \"шить\",\n \"шишка\",\n \"шкаф\",\n \"школа\",\n \"шкура\",\n \"шланг\",\n \"шлем\",\n \"шлюпка\",\n \"шляпа\",\n \"шнур\",\n \"шоколад\",\n \"шорох\",\n \"шоссе\",\n \"шофер\",\n \"шпага\",\n \"шпион\",\n \"шприц\",\n \"шрам\",\n \"шрифт\",\n \"штаб\",\n \"штора\",\n \"штраф\",\n \"штука\",\n \"штык\",\n \"шуба\",\n \"шуметь\",\n \"шуршать\",\n \"шутка\",\n \"щадить\",\n \"щедрый\",\n \"щека\",\n \"щель\",\n \"щенок\",\n \"щепка\",\n \"щетка\",\n \"щука\",\n \"эволюция\",\n \"эгоизм\",\n \"экзамен\",\n \"экипаж\",\n \"экономия\",\n \"экран\",\n \"эксперт\",\n \"элемент\",\n \"элита\",\n \"эмблема\",\n \"эмигрант\",\n \"эмоция\",\n \"энергия\",\n \"эпизод\",\n \"эпоха\",\n \"эскиз\",\n \"эссе\",\n \"эстрада\",\n \"этап\",\n \"этика\",\n \"этюд\",\n \"эфир\",\n \"эффект\",\n \"эшелон\",\n \"юбилей\",\n \"юбка\",\n \"южный\",\n \"юмор\",\n \"юноша\",\n \"юрист\",\n \"яблоко\",\n \"явление\",\n \"ягода\",\n \"ядерный\",\n \"ядовитый\",\n \"ядро\",\n \"язва\",\n \"язык\",\n \"яйцо\",\n \"якорь\",\n \"январь\",\n \"японец\",\n \"яркий\",\n \"ярмарка\",\n \"ярость\",\n \"ярус\",\n \"ясный\",\n \"яхта\",\n \"ячейка\",\n \"ящик\" \n ];\n }", "function checkParanoia(){\necho date(\"d M Y H:i:s\",time()).\"<br>Checking paranoia chars...<br><br>\";\n while(list($d,$r)=each($this->para)){\n echo $d.\".&nbsp;&nbsp; <b>\".$r.\"</b> = <b>\".ord($r).\"</b><br>\";\n }\n\n}", "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 }", "function covertirNumLetras()\r\n{\r\n\r\n\t$number = $this->monto;\r\n\r\n\t//number = number_format (number, 2);\r\n $number1=$number;\r\n\r\n\r\n //settype (number, \"integer\");\r\n $cent = strpos($number1,\".\");\r\n\r\n if($cent > 0){\r\n\t\r\n\t$centavos = substr($number1,$cent+1,2);\r\n\t\r\n }else{\r\n\r\n \t$centavos = \"00\";\r\n\t\r\n\t}\r\n\t/* \r\n\t $cent = split(\".\",$number1,7); \r\n\r\n\t\techo $cent[4];\r\n\t\texit();\r\n\r\n\t $centavos = $cent[1];\r\n\r\n\t if ($centavos == 0 || empty($centavos)){\r\n\t \t$centavos = \"00\";\r\n\t }\r\n\t*/\r\n\t/*\r\n\t \r\n\t if (number == 0 || number == \"\") \r\n\t { // if amount = 0, then forget all about conversions, \r\n\t centenas_final_string=\" cero \"; // amount is zero (cero). handle it externally, to \r\n\t // function breakdown \r\n\t } \r\n\t else \r\n\t { \r\n \r\n \r\n\r\n\t \r\n millions = ObtenerParteEntDiv(number, 1000000); // first, send the millions to the string \r\n number = mod(number, 1000000); // conversion function \r\n \r\n\t alert(millions);\r\n\t \r\n if (millions != 0)\r\n { \r\n // This condition handles the plural case \r\n if (millions == 1) \r\n { // if only 1, use 'millon' (million). if \r\n descriptor= \" millon \"; // > than 1, use 'millones' (millions) as \r\n } \r\n else \r\n { // a descriptor for this triad. \r\n descriptor = \" millones \"; \r\n } \r\n } \r\n else \r\n { \r\n descriptor = \" \"; // if 0 million then use no descriptor. \r\n } \r\n millions_final_string = string_literal_conversion(millions)+descriptor; \r\n */ \r\n\r\n\r\n $thousands = $this->ObtenerParteEntDiv($number, 1000); // now, send the thousands to the string \r\n $number = fmod($number, 1000); // conversion function. \r\n //print \"Th:\".thousands;\r\n if ($thousands != 1) \r\n { // This condition eliminates the descriptor \r\n $thousands_final_string = $this->string_literal_conversion($thousands) . \" mil \"; \r\n // descriptor = \" mil \"; // if there are no thousands on the amount \r\n } \r\n if ($thousands == 1)\r\n {\r\n $thousands_final_string = \" mil \"; \r\n }\r\n if ($thousands < 1) \r\n { \r\n $thousands_final_string = \" \"; \r\n } \r\n \r\n // this will handle numbers between 1 and 999 which \r\n // need no descriptor whatsoever. \r\n\r\n\r\n $centenas = $number; \r\n $centenas_final_string = $this->string_literal_conversion($centenas) ; \r\n \r\n\t// } //end if (number ==0) \r\n\r\n /*if (ereg(\"un\",centenas_final_string))\r\n {\r\n centenas_final_string = ereg_replace(\"\",\"o\",centenas_final_string); \r\n }*/\r\n //finally, print the output. \r\n\r\n /* Concatena los millones, miles y cientos*/\r\n\r\n\r\n $cad = $thousands_final_string.$centenas_final_string; \r\n \r\n /* Convierte la cadena a Mayúsculas*/\r\n $cad = strtoupper($cad); \r\n\r\n\r\n\r\n\t/*\r\n\t if (strlen($centavos) > 2)\r\n\t { \r\n\t if(substr($centavos.substring,2,3) >= 5){\r\n\t $centavos = substr($centavos,0,1).(parseInt(centavos.substring(1,2)).1).toString();\r\n\t }else{\r\n\t centavos = centavos.substring(0,2);\r\n\t }\r\n\t }\r\n\r\n\t*/\r\n\r\n\r\n if (strlen($centavos) == 1)\r\n {\r\n $centavos = $centavos.\"0\";\r\n }\r\n $centavos = $centavos. \"/100\"; \r\n\r\n\r\n if ($number == 1)\r\n {\r\n $moneda = \" PESO \"; \r\n }\r\n else\r\n {\r\n $moneda = \" PESOS \"; \r\n }\r\n \r\n /* Regresa el número en cadena entre paréntesis y con tipo de moneda y la fase M.N.*/\r\n\r\n return $cad.$moneda.\" \".$centavos.\" M.N.\";\r\n \r\n}", "function convertMoeda(&$valorMoeda){\r\n\t\t$valorMoedaAux = explode('.' , $valorMoeda);\r\n\t\tif(isset ($valorMoedaAux[1])){\r\n\t\t\t$valorMoeda= \"R$ \".$valorMoedaAux[0].','.$valorMoedaAux[1];\r\n\t\t}else{\r\n\t\t\t$valorMoeda = \"R$ \".$valorMoedaAux[0].','.'00';\r\n\t\t}\r\n\t\treturn $valorMoeda;\r\n\t}", "public function obtenerViajesplusAbonados();", "function valorPorExtenso($valor = 0) {\r\n \r\n $valor = str_replace(\".\", \"\", $valor);\r\n \r\n $valor = str_replace(\",\", \".\", $valor);\r\n \r\n $singular = array(\"centavo\", \"real\", \"mil\", \"milhão\", \"bilhão\", \"trilhão\", \"quatrilhão\");\r\n \r\n $plural = array(\"centavos\", \"reais\", \"mil\", \"milhões\", \"bilhões\", \"trilhões\", \"quatrilhões\");\r\n \r\n $c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\", \"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\r\n \r\n $d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\", \"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\r\n \r\n $d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\", \"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\r\n \r\n $u = array(\"\", \"um\", \"dois\", \"três\", \"quatro\", \"cinco\", \"seis\", \"sete\", \"oito\", \"nove\");\r\n \r\n $z = 0;\r\n \r\n $valor = number_format($valor, 2, \".\", \".\");\r\n \r\n $inteiro = explode(\".\", $valor);\r\n \r\n for($i = 0; $i < count($inteiro); $i++) {\r\n \r\n for($ii = strlen($inteiro[$i]); $ii < 3; $ii++) {\r\n \r\n $inteiro[$i] = \"0\".$inteiro[$i];\r\n }\r\n }\r\n \r\n $fim = count($inteiro) - ($inteiro[count($inteiro) - 1] > 0 ? 1 : 2);\r\n \r\n for ($i = 0; $i < count($inteiro); $i++) {\r\n \r\n $valor = $inteiro[$i];\r\n \r\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\r\n \r\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\r\n \r\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\r\n \r\n $r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd && $ru) ? \" e \" : \"\").$ru;\r\n \r\n $t = count($inteiro) - 1 - $i;\r\n \r\n $r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\r\n \r\n if ($valor == \"000\") \r\n $z++; \r\n elseif ($z > 0) \r\n $z--;\r\n \r\n if (($t==1) && ($z>0) && ($inteiro[0] > 0)) \r\n $r .= (($z>1) ? \" de \" : \"\").$plural[$t];\r\n \r\n if ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) && ($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\r\n }\r\n\r\n return $rt ? trim($rt) : \"zero\";\r\n }", "function phrasefrancaise($motObjet,$temps,$type,$personne){\n //type = 1affirm - 2neg - 3question;\n //personne = 1;\n $mot = $motObjet->getFrancais();\n $adjectif = $motObjet->getAdjectif();\n $fin = \" \";\n if($adjectif==true){\n $fin=\"s\";\n }\n switch ($temps) {\n // passé\n case 1 :\n switch($type){\n // passe affirm\n case 1:\n \n switch($personne){\n case 1:\n $traduction = \"j'étais \".$mot;\n break;\n case 2:\n $traduction = \"tu étais \".$mot;\n break;\n case 3:\n $traduction = \"il etait \".$mot;\n break;\n case 4:\n $traduction = \"nous étions \".$mot.$fin;\n break;\n case 5:\n $traduction = \"vous étiez \".$mot.$fin;\n break;\n case 6:\n $traduction = \"ils étaient \".$mot.$fin;\n break;\n }\n break;\n // passe neg\n case 2:\n switch($personne){\n case 1:\n $traduction = \"je n'étais pas \".$mot;\n break;\n case 2:\n $traduction = \"tu n'étais pas \".$mot;\n break;\n case 3:\n $traduction = \"il n'était pas \".$mot;\n break;\n case 4:\n $traduction = \"nous n'étions pas \".$mot.$fin;\n break;\n case 5:\n $traduction = \"vous n'étiez pas \".$mot.$fin;\n break;\n case 6:\n $traduction = \"ils n'étaient pas \".$mot.$fin;\n break;\n }\n break;\n // passe quest\n case 3:\n switch($personne){\n case 1:\n $traduction = \"étais je \".$mot.\"?\";\n break;\n case 2:\n $traduction = \"étais tu \".$mot.\"?\";\n break;\n case 3:\n $traduction = \"était il \".$mot.\"?\";\n break;\n case 4:\n $traduction = \"étions nous \".$mot.$fin.\"?\";\n break;\n case 5:\n $traduction = \"étiez vous \".$mot.$fin.\"?\";\n break;\n case 6:\n $traduction = \"étaient ils \".$mot.$fin.\"?\";\n break;\n }\n \n break;\n }\n break;\n \n // présent \n case 0 :\n switch($type){\n // present affirm\n case 1:\n switch($personne){\n case 1:\n $traduction = \"je suis \".$mot;\n break;\n case 2:\n $traduction = \"tu es \".$mot;\n break;\n case 3:\n $traduction = \"il est \".$mot;\n break;\n case 4:\n $traduction = \"nous sommes \".$mot.$fin;\n break;\n case 5:\n $traduction = \"vous êtes \".$mot.$fin;\n break;\n case 6:\n $traduction = \"ils sont \".$mot.$fin;\n break;\n }\n break;\n // present nega\n case 2:\n \n switch($personne){\n case 1:\n $traduction = \"je ne suis pas \".$mot;\n break;\n case 2:\n $traduction = \"tu n'es pas \".$mot;\n break;\n case 3:\n $traduction = \"il n'est pas \".$mot;\n break;\n case 4:\n $traduction = \"nous ne sommes pas \".$mot.$fin;\n break;\n case 5:\n $traduction = \"vous n'etes pas \".$mot.$fin;\n break;\n case 6:\n $traduction = \"ils ne sont pas \".$mot.$fin;\n break;\n }\n break;\n \n //present question\n case 3:\n switch($personne){\n case 1:\n $traduction = \"suis je \".$mot.\"?\";\n break;\n case 2:\n $traduction = \"es tu \".$mot.\"?\";\n break;\n case 3:\n $traduction = \"est il \".$mot.\"?\";\n break;\n case 4:\n $traduction = \"sommes nous \".$mot.$fin.\"?\";\n break;\n case 5:\n $traduction = \"êtes vous \".$mot.$fin.\"?\";\n break;\n case 6:\n $traduction = \"sont ils \".$mot.$fin.\"?\";\n break;\n }\n break;\n }\n break;\n \n //futur\n case 2 :\n switch($type){\n //futur affirm\n case 1:\n switch($personne){\n case 1:\n $traduction = \"je serai \".$mot;\n break;\n case 2:\n $traduction = \"tu seras \".$mot;\n break;\n case 3:\n $traduction = \"il sera \".$mot;\n break;\n case 4:\n $traduction = \"nous serons \".$mot.$fin;\n break;\n case 5:\n $traduction = \"vous serez \".$mot.$fin;\n break;\n case 6:\n $traduction = \"ils seront \".$mot.$fin;\n break;\n }\n break;\n //futur negation\n case 2:\n switch($personne){\n case 1:\n $traduction = \"je ne serai pas \".$mot;\n break;\n case 2:\n $traduction = \"tu ne seras pas \".$mot;\n break;\n case 3:\n $traduction = \"il ne sera pas \".$mot;\n break;\n case 4:\n $traduction = \"nous ne serons pas \".$mot.$fin;\n break;\n case 5:\n $traduction = \"vous ne serez pas \".$mot.$fin;\n break;\n case 6:\n $traduction = \"ils ne seront pas \".$mot.$fin;\n break;\n }\n break;\n case 3:\n switch($personne){\n case 1:\n $traduction = \"serai je \".$mot.\"?\";\n break;\n case 2:\n $traduction = \"seras tu \".$mot.\"?\";\n break;\n case 3:\n $traduction = \"sera-t-il \".$mot.\"?\";\n break;\n case 4:\n $traduction = \"serons nous \".$mot.$fin.\"?\";\n break;\n case 5:\n $traduction = \"serez vous \".$mot.$fin.\"?\";\n break;\n case 6:\n $traduction = \"seront ils \".$mot.$fin.\"?\";\n break;\n \n }\n break;\n }\n break;\n }\n return $traduction;\n }", "function traduire($mot,$temps,$type,$personne){\n //type = 1affirm - 2neg - 3question;\n //personne = 1;\n \n \n \n $fin1 = substr($mot, -1);\n $fin2 = substr($mot,-2,1);\n $liaison = \"\";\n $passe = 'd';\n $kconsonne = false;\n $consonne = false;\n switch ($fin1) {\n case 'a':\n case 'ı':\n $voyelle = 'ı';\n $pvoyelle = 'a';\n $dvoyelle = 'ı';\n $liaison = 'y';\n break;\n case 'e':\n case 'i':\n $voyelle = 'i';\n $pvoyelle = 'e';\n $dvoyelle = 'i';\n $liaison = 'y';\n break;\n case 'o':\n case 'u':\n $voyelle = 'u';\n $pvoyelle = 'a';\n $dvoyelle = 'ı';\n $liaison = 'y';\n break;\n case 'ü':\n case 'ö':\n $voyelle = 'ü';\n $pvoyelle = 'e';\n $dvoyelle = 'i';\n $liaison = 'y';\n break;\n case 'k':\n $passe = 't';\n $consonne = 'true';\n $kconsonne ='true';\n break;\n case 't':\n case 'p':\n case 'ç':\n case 'h':\n case 'f':\n case 's':\n case 'ş':\n $passe = 't';\n $consonne = 'true';\n break;\n default : \n $consonne = 'true';\n break;\n \n }\n \n if($consonne == 'true'){\n \n switch ($fin2) {\n case 'a':\n case 'ı':\n $voyelle = 'ı';\n $pvoyelle = 'a';\n $dvoyelle = 'ı';\n \n break;\n case 'e':\n case 'i':\n $voyelle = 'i';\n $pvoyelle = 'e';\n $dvoyelle = 'i';\n \n break;\n case 'o':\n case 'u':\n $voyelle = 'u';\n $pvoyelle = 'a';\n $dvoyelle = 'ı';\n \n break;\n case 'ü':\n case 'ö':\n $voyelle = 'ü';\n $pvoyelle = 'e';\n $dvoyelle = 'i';\n \n break;\n }\n \n }\n \n \n \n switch ($temps) {\n // passé\n case 1 :\n switch($type){\n // passe affirm\n case 1:\n $traduction = $mot;\n switch($personne){\n case 1:\n $traduction = $traduction.$liaison.$passe.$voyelle.\"m\";\n break;\n case 2:\n $traduction = $traduction.$liaison.$passe.$voyelle.\"n\";\n break;\n case 3:\n $traduction = $traduction.$liaison.$passe.$voyelle;\n break;\n case 4:\n $traduction = $traduction.$liaison.$passe.$voyelle.\"k\";\n break;\n case 5:\n $traduction = $traduction.$liaison.$passe.$voyelle.\"n\".$voyelle.\"z\";\n break;\n case 6:\n $traduction = $traduction.\"l\".$pvoyelle.\"r\".\"d\".$dvoyelle;\n break;\n }\n break;\n // passe neg\n case 2:\n $traduction = $mot.\" değil\";\n switch($personne){\n case 1:\n $traduction = $traduction.\"dim\";\n break;\n case 2:\n $traduction = $traduction.\"din\";\n break;\n case 3:\n $traduction = $traduction.\"di\";\n break;\n case 4:\n $traduction = $traduction.\"dik\";\n break;\n case 5:\n $traduction = $traduction.\"diniz\";\n break;\n case 6:\n $traduction = $traduction.\"diler\";\n break;\n }\n break;\n // passe quest\n case 3:\n $traduction = $mot. \" m\".$voyelle.\"yd\".$voyelle;\n switch($personne){\n case 1:\n $traduction = $traduction.\"m\";\n break;\n case 2:\n $traduction = $traduction.\"n\";\n break;\n case 3:\n $traduction = $traduction;\n break;\n case 4:\n $traduction = $traduction.\"k\";\n break;\n case 5:\n $traduction = $traduction.\"n\".$voyelle.\"z\";\n break;\n case 6:\n $traduction = $traduction.\"l\".$pvoyelle.\"r\";\n break;\n }\n \n break;\n }\n break;\n \n // présent \n case 0 :\n switch($type){\n // present affirm\n case 1:\n $traduction = $mot;\n switch($personne){\n case 1:\n if($kconsonne=='true'){\n $traduction = $traduction.substr($traduction,0,-1);\n $traduction = $traduction.\"ğ\".$voyelle.\"m\";\n }else{\n $traduction = $traduction.$liaison.$voyelle.\"m\";\n }\n \n break;\n case 2:\n $traduction = $traduction.\"s\".$voyelle.\"n\";\n break;\n case 3:\n $traduction = $traduction;\n break;\n case 4:\n if($kconsonne=='true'){\n $traduction = $traduction.substr($traduction,0,-1);\n $traduction = $traduction.\"ğ\".$voyelle.\"z\";\n }else{\n $traduction = $traduction.$liaison.$voyelle.\"z\";\n }\n \n break;\n case 5:\n $traduction = $traduction.\"s\".$voyelle.\"n\".$voyelle.\"z\";\n break;\n case 6:\n $traduction = $traduction.\"l\".$pvoyelle.\"r\";\n break;\n }\n break;\n // present nega\n case 2:\n $traduction = $mot.\" değil\";\n switch($personne){\n case 1:\n $traduction = $traduction.\"im\";\n break;\n case 2:\n $traduction = $traduction.\"sin\";\n break;\n case 3:\n $traduction = $traduction;\n break;\n case 4:\n $traduction = $traduction.\"iz\";\n break;\n case 5:\n $traduction = $traduction.\"siniz\";\n break;\n case 6:\n $traduction = $traduction.\"ler\";\n break;\n }\n break;\n \n //present question\n case 3:\n $traduction = $mot;\n switch($personne){\n case 1:\n $traduction = $traduction. \" m\".$voyelle.\"y\".$voyelle.\"m ?\";\n break;\n case 2:\n $traduction = $traduction. \" m\".$voyelle.\"s\".$voyelle.\"n ?\";\n break;\n case 3:\n $traduction = $traduction. \" m\".$voyelle.\" ?\";\n break;\n case 4:\n $traduction = $traduction. \" m\".$voyelle.\"y\".$voyelle.\"z ?\";\n break;\n case 5:\n $traduction = $traduction. \" m\".$voyelle.\"s\".$voyelle.\"n\".$voyelle.\"z ?\";\n break;\n case 6:\n $traduction = $traduction.\"l\".$pvoyelle.\"r\". \" m\".$voyelle .\" ?\";\n break;\n }\n break;\n }\n break;\n \n //futur\n case 2 :\n switch($type){\n //futur affirm\n case 1:\n $traduction = $mot;\n switch($personne){\n case 1:\n $traduction = $traduction.\" olacağım\";\n break;\n case 2:\n $traduction = $traduction. \" olacaksın\";\n break;\n case 3:\n $traduction = $traduction. \" olacak\";\n break;\n case 4:\n $traduction = $traduction. \" olacağız\";\n break;\n case 5:\n $traduction = $traduction. \" olacaksınız\";\n break;\n case 6:\n $traduction = $traduction. \" olacaklar\";\n break;\n }\n break;\n //futur negation\n case 2:\n $traduction = $mot;\n switch($personne){\n case 1:\n $traduction = $traduction.\" olmayacağım\";\n break;\n case 2:\n $traduction = $traduction. \" olmayacaksın\";\n break;\n case 3:\n $traduction = $traduction. \" olmayacak\";\n break;\n case 4:\n $traduction = $traduction. \" olmayacağız\";\n break;\n case 5:\n $traduction = $traduction. \" olmayacaksınız\";\n break;\n case 6:\n $traduction = $traduction. \" olmayacaklar\";\n break;\n }\n break;\n case 3:\n $traduction = $mot. \" olacak\";\n switch($personne){\n case 1:\n $traduction = $traduction.\" mıyım ?\";\n break;\n case 2:\n $traduction = $traduction. \" mısın ?\";\n break;\n case 3:\n $traduction = $traduction. \" mı ?\";\n break;\n case 4:\n $traduction = $traduction. \" mıyız ?\";\n break;\n case 5:\n $traduction = $traduction. \" mısınız ?\";\n break;\n case 6:\n $traduction = $traduction. \"lar mı ?\";\n break;\n }\n break;\n }\n break;\n }\n return $traduction;\n }", "function delete_caracteres_sobrantes($texto){\n\t\t\n\t\t/*\n\t\t\t1. //Quedarse con letras(incluidas vocales con/sin acentos), espacios, guiones y puntos\n\t\t\t2. //Quedarse solo con los nombres que empiecen por mayuscula compuestos o no\n\t\t*/\n\t\t$n_c = preg_replace(\"/([^A-Za-z0-9[:space:]áéíóúÁÉÍÓÚñÑ.-])/\", \" \", $texto);\t\n\t\t$n_c = quitar_tildes($n_c); \t\t\t\n\t\tpreg_match_all(\"/([A-ZÑ]{1}[A-Za-z0-9Ññ]+)((\\s|\\-|)((\\sde\\s(la\\s|el\\s|las\\s|los\\s){0,1})|(\\sdel\\s)|([0-9])|([A-ZÑ]{1}[A-Za-z0-9Ññ]+)))*/\", $n_c, $coinciden);\n\t\n\n\t\t$arr=array();\n\t\tforeach($coinciden as $r){ \n\t\t\tforeach($r as $n){ \n\t\t\t\t$n = explode(' ',$n);\n\t\t\t\tif(end($n) == ''){\n\t\t\t\t\tarray_pop($n); //quita \"\" del final\n\t\t\t\t\tarray_pop($n);\t//quita \"de\" o \"del\" del final\n\t\t\t\t}\n\t\t\t\t$n = implode(\" \", $n);\n\t\t\t\n\t\t\t\tarray_push($arr,strtoupper(str_replace('ñ', 'Ñ', $n)));//Meter en un array los resultados obtenidos despues de haber filtrado el texto \n\t\t\t}\n\t\t\tbreak;\t// Para quedarnos solo con los valores del primer subarray de coincidencias que son aquellos que cumplen completamente con la expresion regular dada\n\t\t\t\t// el resto de subarrays devueltos solo la cumplen parcialmente\n\t\t}\n\t\treturn $arr;\n\t}", "function eliminar_tildes($cadena){\n\t\t//$cadena = utf8_encode($cadena);\n\n\t\t//Ahora reemplazamos las letras\n\t\t$cadena = str_replace(\n\t\t\tarray('á', 'à', 'ä', 'â', 'ª', 'Á', 'À', 'Â', 'Ä'),\n\t\t\tarray('a', 'a', 'a', 'a', 'a', 'A', 'A', 'A', 'A'),\n\t\t\t$cadena\n\t\t);\n\n\t\t$cadena = str_replace(\n\t\t\tarray('é', 'è', 'ë', 'ê', 'É', 'È', 'Ê', 'Ë'),\n\t\t\tarray('e', 'e', 'e', 'e', 'E', 'E', 'E', 'E'),\n\t\t\t$cadena );\n\n\t\t$cadena = str_replace(\n\t\t\tarray('í', 'ì', 'ï', 'î', 'Í', 'Ì', 'Ï', 'Î'),\n\t\t\tarray('i', 'i', 'i', 'i', 'I', 'I', 'I', 'I'),\n\t\t\t$cadena );\n\n\t\t$cadena = str_replace(\n\t\t\tarray('ó', 'ò', 'ö', 'ô', 'Ó', 'Ò', 'Ö', 'Ô'),\n\t\t\tarray('o', 'o', 'o', 'o', 'O', 'O', 'O', 'O'),\n\t\t\t$cadena );\n\n\t\t$cadena = str_replace(\n\t\t\tarray('ú', 'ù', 'ü', 'û', 'Ú', 'Ù', 'Û', 'Ü'),\n\t\t\tarray('u', 'u', 'u', 'u', 'U', 'U', 'U', 'U'),\n\t\t\t$cadena );\n\n\t\t$cadena = str_replace(\n\t\t\tarray('ñ', 'Ñ', 'ç', 'Ç', '-','_'),\n\t\t\tarray('n', 'N', 'c', 'C', '', ''),\n\t\t\t$cadena\n\t\t);\n\t\t\n\t\t$cadena = preg_replace(\"/[^a-zA-Z\\_\\-]+/\", \"\", $cadena);\n\n\t\treturn $cadena;\n\t}", "public function AggiornaPrezzi(){\n\t}", "static function alphaNum( $st_data )\r\n {\r\n $st_data = preg_replace(\"([[:punct:]]| )\",'',$st_data);\r\n return $st_data;\r\n }", "function valid_codigo_barras_boletos($codigobarras, $tipo){\r\n\t$codigobarras = removeformat($codigobarras);\r\n\tif($tipo == \"B\"){\r\n\t\t$valido = TRUE;\r\n\t\t$bloco1 = substr($codigobarras, 0, 10);\r\n\t\t$bloco2 = substr($codigobarras, 10, 11);\r\n\t\t$bloco3 = substr($codigobarras, 21, 11);\r\n\t\tif(strlen($bloco1) == 10){\r\n\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco1, 0, 9));\r\n\t\t\t$valido = ($digitobloco == substr($bloco1, 9, 1));\r\n\t\t}\r\n\t\tif($valido && strlen($bloco2) == 11){\r\n\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco2, 0, 10));\r\n\t\t\t$valido = ($digitobloco == substr($bloco2, 10, 1));\r\n\t\t}\r\n\t\tif($valido && strlen($bloco3) == 11){\r\n\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco3, 0, 10));\r\n\t\t\t$valido = ($digitobloco == substr($bloco3, 10, 1));\r\n\t\t}\r\n\t\tif($valido && strlen($codigobarras) == 47){\r\n\t\t\t$bancofavorecido = substr($codigobarras, 0, 3);\r\n\t\t\t$moeda = substr($codigobarras, 3, 1);\r\n\t\t\t$fatorvencimento = substr($codigobarras, 33, 4);\r\n\t\t\t$valortitulo = substr($codigobarras, 37, 10);\r\n\t\t\t$campolivre = substr($codigobarras, 4, 5).substr($codigobarras, 10, 10).substr($codigobarras, 21, 10);\r\n\t\t\t$digitogeral = substr($codigobarras, 32, 1);\r\n\t\t\t$digitogeralcalculado = calcula_digito_mod11($bancofavorecido.$moeda.$fatorvencimento.$valortitulo.$campolivre);\r\n\t\t\t$valido = ($digitogeral == $digitogeralcalculado);\r\n\t\t}\r\n\t\treturn $valido;\r\n\t}elseif($tipo == \"C\"){\r\n\t\t$valido = TRUE;\r\n\t\t$bloco1 = substr($codigobarras, 0, 12);\r\n\t\t$bloco2 = substr($codigobarras, 12, 12);\r\n\t\t$bloco3 = substr($codigobarras, 24, 12);\r\n\t\t$bloco4 = substr($codigobarras, 36, 12);\r\n\t\tif(strlen($bloco1) == 12){\r\n\t\t\t$digitobloco = calcula_digito_mod11(substr($bloco1, 0, 11));\r\n\t\t\t$valido = ($digitobloco == substr($bloco1, 11, 1));\r\n\t\t\tif(!$valido){\r\n\t\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco1, 0, 11));\r\n\t\t\t\t$valido = ($digitobloco == substr($bloco1, 11, 1));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($valido && strlen($bloco2) == 12){\r\n\t\t\t$digitobloco = calcula_digito_mod11(substr($bloco2, 0, 11));\r\n\t\t\t$valido = ($digitobloco == substr($bloco2, 11, 1));\r\n\t\t\tif(!$valido){\r\n\t\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco2, 0, 11));\r\n\t\t\t\t$valido = ($digitobloco == substr($bloco2, 11, 1));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($valido && strlen($bloco3) == 12){\r\n\t\t\t$digitobloco = calcula_digito_mod11(substr($bloco3, 0, 11));\r\n\t\t\t$valido = ($digitobloco == substr($bloco3, 11, 1));\r\n\t\t\tif(!$valido){\r\n\t\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco3, 0, 11));\r\n\t\t\t\t$valido = ($digitobloco == substr($bloco3, 11, 1));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($valido && strlen($bloco4) == 12){\r\n\t\t\t$digitobloco = calcula_digito_mod11(substr($bloco4, 0, 11));\r\n\t\t\t$valido = ($digitobloco == substr($bloco4, 11, 1));\r\n\t\t\tif(!$valido){\r\n\t\t\t\t$digitobloco = calcula_digito_mod10(substr($bloco4, 0, 11));\r\n\t\t\t\t$valido = ($digitobloco == substr($bloco4, 11, 1));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $valido;\r\n\t}else{\r\n\t\treturn FALSE;\r\n\t}\r\n}", "function extenso($valor=0, $maiusculas=false) {\n if (strpos($valor, \",\") > 0) {\n // retira o ponto de milhar, se tiver\n $valor = str_replace(\".\", \"\", $valor);\n\n // troca a virgula decimal por ponto decimal\n $valor = str_replace(\",\", \".\", $valor);\n }\n $singular = array(\"centavo\", \"real\", \"mil\", \"milhão\", \"bilhão\", \"trilhão\", \"quatrilhão\");\n $plural = array(\"centavos\", \"reais\", \"mil\", \"milhões\", \"bilhões\", \"trilhões\",\n \"quatrilhões\");\n\n $c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\",\n \"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\n $d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\",\n \"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\n $d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\",\n \"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\n $u = array(\"\", \"um\", \"dois\", \"três\", \"quatro\", \"cinco\", \"seis\",\n \"sete\", \"oito\", \"nove\");\n\n $z = 0;\n\n $valor = number_format($valor, 2, \".\", \".\");\n $inteiro = explode(\".\", $valor);\n $cont = count($inteiro);\n for ($i = 0; $i < $cont; $i++)\n for ($ii = strlen($inteiro[$i]); $ii < 3; $ii++)\n $inteiro[$i] = \"0\" . $inteiro[$i];\n\n $fim = $cont - ($inteiro[$cont - 1] > 0 ? 1 : 2);\n $rt = '';\n for ($i = 0; $i < $cont; $i++) {\n $valor = $inteiro[$i];\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\n\n $r = $rc . (($rc && ($rd || $ru)) ? \" e \" : \"\") . $rd . (($rd &&\n $ru) ? \" e \" : \"\") . $ru;\n $t = $cont - 1 - $i;\n $r .= $r ? \" \" . ($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\n if ($valor == \"000\"\n\n )$z++; elseif ($z > 0)\n $z--;\n if (($t == 1) && ($z > 0) && ($inteiro[0] > 0))\n $r .= ( ($z > 1) ? \" de \" : \"\") . $plural[$t];\n if ($r)\n $rt = $rt . ((($i > 0) && ($i <= $fim) &&\n ($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\n }\n\n if (!$maiusculas) {\n return($rt ? $rt : \"zero\");\n } elseif ($maiusculas == \"2\") {\n return (strtoupper($rt) ? strtoupper($rt) : \"Zero\");\n } else {\n return (ucwords($rt) ? ucwords($rt) : \"Zero\");\n }\n }", "function s_z($ige) {\r\n $s_z = '';\r\n $veg1 = substr($ige,-1);\r\n if ($veg1 === 's') {\r\n $s_z = 's';\r\n }\r\n if ($veg1 === 'z') {\r\n $s_z = 'z';\r\n }\r\n return $s_z;\r\n }", "function setNumAnz($wert) {$this->PhoneNumAnz = trim($wert);}", "function ZerteileRufnummer()\n {\n if (ereg (\"^\\+\", $this->PhoneInput)) // Ein Plus am Anfang = Ländervorwahl\n {\n $NutzFeld = 1; // >>> Ein Feld muss schon mal ausgelassen werden.\n\n $TelFragmente = explode(\" \", $this->PhoneInput); // Trenne die Telefonnummer bei den Leerzeichen\n\n if (count($TelFragmente) > 1) // Wenn die Nummer nicht \"aus einem Guss\" besteht\n {\n $this->Landesvorwahl = $TelFragmente[0]; // Die Ländervorwahl Vorwahl ist im ersten Feld\n\n if (count($TelFragmente) > 2) // Die nationale Vorwahl ist im zweiten Feld. Gibt es diese hier ?\n {\n $this->Ortsnetzkennzahl = \"(0)\".$TelFragmente[1];\n $NutzFeld += 1; // >>> Also sind es 2 Felder, die nachher beim Zusammensetzen ausgelassen werden.\n }\n $this->Teilnehmerkennzahl = \"\";\n for($nn= $NutzFeld ;$nn<count($TelFragmente);$nn++)\n { $this->Teilnehmerkennzahl .= $TelFragmente[$nn]; } // Die Zahlen ohne Vorwahlen zusammenfügen\n\n }\n\n else\n {\n // Pech... Ohne Leerzeichen kann die Rufnummer nur schwer unterteilt werden.\n // Ich versuche wenigstens anhand der Vorwahl etwas zu erkennen.\n\n $l=strlen($this->PhoneInput); // Länge der Telefonnummer ermitteln\n if ($l < 6) {$AnzSuche = $l;} // Ist die Rufnummer kleiner als das Suchmuster muss ich die Länge des Suchmusters kürzen.\n else {$AnzSuche = 6;} // Sonst nehme ich mal die ersten 5 Zahlen sowie das Plus, um zu suchen.\n\n $Feldname = \"Vorwahl\";\n for($n=$AnzSuche;$n>1;$n--)\n {\n $SuchInVorwahl = substr($this->PhoneInput, 0, $n); // Als Suchmuster etwas von Vorderteil der Nummer nehmen\n $x = $this->suche_ID_multi_array($Feldname, $SuchInVorwahl);\n if($x) // Glück gehabt. Die Vohrwahl passt zu einer in der Tabelle.\n {\n $this->Landesvorwahl= $SuchInVorwahl;\n $this->TabID= $x;\n $this->PHONE_WARNUNG .= \"Landesvorwahl wurde erkannt, nicht aber die Ortsvorwahl !<br>\";\n $this->Teilnehmerkennzahl = substr($this->PhoneInput, $n);\n break; // Schleife verlassen\n }\n }\n\n\n if ($x > 1) {$this->Landesvorwahl = $this->LandTabelle[$x][\"Vorwahl\"];} // Es wurde eine passende internationale Vorwahl gefunden\n else {\n // Die Vorwahl kann nicht erraten werden und der Rest klebt an einem Block.\n $this->PHONE_ERROR = \"Kein g&uuml;ltiges Muster in der Rufnummer erkannt.<br>\\n\". // Nummer zur Formatierung unbrauchbar\n \" Bitte benutzen Sie Leerzeichen zur optischen Unterteilung\";\n }\n }\n }\n\n // N A T I O N A L E Schreibweise: ---------------------------------------------------------------------------\n else /// Es hatte kein + am Anfang ...\n {\n\n $TelInlandBereich = explode(\" \", $this->PhoneInput);\n if (trim($TelInlandBereich[1]) != \"\") // Ist im Feld eins nichts, ist die Nummer aus einem Guss. Sonst ...\n {\n $this->Ortsnetzkennzahl = $TelInlandBereich[0]; // Hier ist die Ortsvorwahl zu erwarten\n $this->Teilnehmerkennzahl = \"\";\n for($x=1;$x<count($TelInlandBereich);$x++)\n { $this->Teilnehmerkennzahl .= $TelInlandBereich[$x]; }\n\n $this->Teilnehmerkennzahl = trim(eregi_replace(\"[^0-9]\", null, $this->Teilnehmerkennzahl));\n\n if (!ereg (\"^0\", trim($this->Ortsnetzkennzahl)))\n $this->PHONE_WARNUNG .= \"Ortsvorwahl vermutlich falsch! (Sie beginnt ohne \\\"0\\\") <br>\";\n }\n else\n {\n $this->Teilnehmerkennzahl = $this->PhoneInput;\n $this->PHONE_WARNUNG .= \"Konnte keine Ortsvorwahl ermitteln. Die Nummer wird daher am Stück zurückgegeben !<br>\";\n }\n }\n }", "function c_request($varstipus,$origen,$strict=false)\n{\n\tif (!is_array($origen))\t{$origen=merge_request($origen);} \t//en comptes d'un array, passa PG o similar \n\n\t$pattern=array('REAL'=>\"/[^0-9\\.-]/\",'CHAR'=>\"/[^A-Za-z0-9_\\-\\.]/\",'STRING'=>\"/\\\"|'/\");\n\t$varstipus=explode(\",\",$varstipus);\n\tforeach ($varstipus as $vargrup)\n\t{\n\t\t$vargrup=explode(\"=>\",$vargrup);\n\t\t$vars=explode(\"|\",$vargrup[0]);\n\t\t$tipus=trim(strtoupper($vargrup[1]));\n\n\t\tforeach ($vars as $var)\n\t\t{\n\t\t\t$var=trim($var);\n\t\t\tif (isset($origen[$var]))\n\t\t\t{\n\t\t\t\tswitch($tipus)\n\t\t\t\t{\n\t\t\t\t\tcase 'INT':\t//nomès numeros enters\n\t\t\t\t\t\t$origen[$var]=(int)$origen[$var];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'MQ':\n\t\t\t\t\t\t$origen[$var]=MQ($origen[$var]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'REAL': //numeros decimals i negatius\n\t\t\t\t\tcase 'CHAR': //nomes texte i números\n\t\t\t\t\tcase 'STRING': //eliminar cometes\n\t\t\t\t\t\t$origen[$var]=preg_replace($pattern[$tipus], $strict?\"_\":\"\", $origen[$var]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\n\t\t\t}\n\t\t}\n\t}\n\treturn $origen;\n}", "function comprobar_CODCENTRO(){\n\t$errores = array();\n\t$correcto=true;\n //Compruebo si el valor es null o no es vacio\n if (($this->CODCENTRO == null) || (strlen($this->CODCENTRO) == 0)){\n\n \t$mensajeError = array (\n \"nombreatributo\" => \"CODCENTRO\",\n \"codigoincidencia\" => \"00001\",\n \"mensajeerror\" => \"Atributo vacío\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n }\n\tif(strlen($this->CODCENTRO)<3){\n\t $mensajeError = array (\n \"nombreatributo\" => \"CODCENTRO\",\n \"codigoincidencia\" => \"00003\",\n \"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\t\nif(strlen($this->CODCENTRO)>10){\n\t $mensajeError = array (\n \"nombreatributo\" => 'CODCENTRO',\n \"codigoincidencia\" => \"00002\",\n \"mensajeerror\" => \"Valor de atributo demasiado largo\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\tif (!preg_match(\"/^[a-zA-ZñÑáéíóúÁÉÍÓÚ\\d-]+$/\",$this->CODCENTRO)){\n\t\t $mensajeError = array (\n \"nombreatributo\" => 'CODCENTRO',\n \"codigoincidencia\" => \"00040\",\n \"mensajeerror\" => \"Solo están permitidas alfabéticos, números y el “-”\"\n );\n\t\t$errores[]=$mensajeError;\n\t\treturn $errores;\n\t}\n\tif($correcto==TRUE){\n\t\treturn TRUE;\n\t}else{\n\t\treturn $errores;\n\t}\n}", "public function plus_abonados();", "function ncapicua($numero)\n {\n \n $numeroinver=strrev($numero); //poner\n if($numero==$numeroinver) {\n $mensaje= \"<br> El numero $numero es capicua\";\n }else{\n $mensaje= \"<br> El numero $numero no es capicua\";\n }\n return $mensaje;\n }", "function decortique($data) {\r\n\t\t$taille =\r\n\t\t$ptiBout = explode(' ', $data[0]);\r\n\t\t$appelation[0] = ''; $appelation[1] = '';\r\n\r\n\t\t//Séparation Nom Prenom\r\n\t\t$i=0;\r\n\t\tforeach ($ptiBout as $bout) {\r\n\t\t\tif (lcfirst($bout) != mb_strtolower($bout, 'UTF-8')) {\r\n\t\t\t\tif ($appelation[0] != '') {\r\n\t\t\t\t\t$appelation[0] = $appelation[0] . ' ' . $bout;\r\n\t\t\t\t}\r\n\t\t\t\telse { $appelation[0] = $bout; }\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif ($appelation[1] != '') {\r\n\t\t\t\t\t$appelation[1] = $appelation[1] . ' ' . $bout;\r\n\t\t\t\t}\r\n\t\t\t\telse { $appelation[1] = $bout; }\r\n\t\t\t}\r\n\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\t$appelation[2] = $data[1];\r\n\r\n\t\treturn $appelation;\r\n\t}", "public function apellidosCompletos($apellidos){\n $apeMinuscula = strtolower($this->sanear_string($apellidos));\n //junto el/los apellidos/s del preinscripto\n $ape = str_replace(' ','',$apeMinuscula); \n //$ape = preg_replace('[\\s+]','', $apeMinuscula);\n //devuelvo solo los apellido de los preinscriptos\n return $ape;\n }", "function limpiarcadena($char)\n{\n\t$ban=0;//Bandera para saber si estan ejecutando una Inyeccion SQL\n\t$char_w_replaced = stripslashes($char);//Guardamos la Inyeccion original para informacion a la BD\n\t//Array con las palabras reservadas, para modificar a gusto :D\n\t$hack_array = array(\"'\", '\"', \";\", \"UNION\", \"union\", \"DROP\", \"drop\", \"table\", \"TABLE\", \"SET\", \"set\", \"UPDATE\", \"update\", \"SELECT\", \"select\", \"-\", \"--\", \"MEMB_INFO\", \"memb_info\", \"memb__pwd\", \"memb___id\"); //Caracter por el que será reemplazada cada palabra reservada del sitio\n\t$hack_replace = \"\"; //Separamos la cadena en un Array para poder hacer la comparacion y determinar si estan\n\t//ejecutando o no una Inyeccion SQL\n\t$char1=explode(\" \",$char);\n\tfor($i=0;$i<count($char1);$i++)\n\t{\n\t\tif(in_array($char1[$i],$hack_array))//si se quiere se puede convertir todo a mayusculas para la comprobacion.\n\t\t{\n\t \t\t$ban=1;\n\t\t}\n\t}\n\t\n\tif ($ban==1)\n\t{\n\t\t$add=\"ESTAS HACKEANDO SI SI\"; \t\n\t}\n\telse \n\t{\n\t\t$add=\"NO ESTAS HACKEANDO\"; \n\t\t//seguir con los procesos del POST o GET sin guardar ips ni nada\n\t} \n\t\n\t//reemplazamos las palabras reservadas\n\t$char_replaced = str_replace($hack_array, $hack_replace, $char);\n\t//evitamos codigos html y espacios en blanco\n\t$char_clean=htmlentities(trim($char_replaced)); //retornamos la cadena limpia para usar en nuestra consulta, o podemos devolver segun el resultado de ban\n\t//un die para no ejecutar nada o como se les ocurra\n\treturn $char_clean;\n}", "public function testValidAlphanumString()\n {\n $string = 'dfasfa5425423frg890';\n $this->assertTrue($this->alphanum->execute($string));\n }", "function validar_dni($dni){\n $letra = substr($dni, -1);\n $numeros = substr($dni, 0, -1);\n if ( substr(\"TRWAGMYFPDXBNJZSQVHLCKE\", $numeros%23, 1) == $letra && strlen($letra) == 1 && strlen ($numeros) == 8 ){\n echo 'valido';\n }else{\n echo 'no valido';\n }\n}", "function precioNumero($itemPrecio){ \n $precio = str_replace('$','',$itemPrecio); //Eliminar el símbolo \n $precio = str_replace(',','',$precio); //Eliminar la coma \n return $precio; //Devolver el valor de tipo Numero sin caracteres especiales\n }", "function validateMsn($texto){\n if(strlen($texto) < 10){\n return false;\n // SI longitud, SI caracteres A-z\n } else {\n return true;\n }\n}", "function testMinuscle2($valeurTeste){\r\n return ($valeurTeste>=\"a\" && $valeurTeste<=\"z\");\r\n }", "function desarmarCodigoPrestacion($aux) {\r\n $aux = split(' ', $aux);\r\n $cod_nomenclador['categoria_padre'] = $aux[0];\r\n // no vamos a usar mas $cod_nomenclador['clase'] = substr($aux, 2, 1);\r\n $cod_nomenclador['profesional'] = $aux[1];\r\n $cod_nomenclador['codigo'] = $aux[2];\r\n return $cod_nomenclador;\r\n}", "function non_karakter($a){\n if(preg_match(\"/^[A-Za-z0-9 -]*$/\",$a)){\n return false;\n }\n return true;\n}", "function DurchwahlNummerSucher()\n {\n # Soll diese getrennt von der restlichen Telefonnummer aufbewahrt werden\n # Dazu Zerlege ich den String angand des \"-\".\n # Hat es nur ein Trennzeichen, erhalte ich 2 Arrayfelder.\n # Habe ich mehr Felder erhalten, ersetze ich alle \"-\" durch Leerzeichen, da ich nicht\n # mehr davon ausgehen kann, dass es eine Durchwahlnummer ist.\n\n $DurchwahlTest = array_reverse(explode(\"-\", $this->PhoneInput));\n $AnzTrennzeichen = count($DurchwahlTest);\n\n if ($AnzTrennzeichen > 2)\n { $this->PhoneInput = eregi_replace(\"-\", \" \", $this->PhoneInput); }\n\n else // Nur ein Trennzeichen wurde gefunden.\n {\n if(!preg_match(\"/^[0-9]*$/\",trim($DurchwahlTest[0])))\n { // Besteht das Ergebniss nicht zu 100% aus Zahlenist es keine Durchwahlnummer. Also weg mit den \"-\"\n $this->PhoneInput = eregi_replace(\"-\", \" \", $this->PhoneInput);\n }\n\n else // Es hat vermutlich eine Durchwahlnummer!\n {\n if (trim($DurchwahlTest[1]) != \"\") // Natürlich muss VOR der Durchwahlnummer auch eine Zahl sein ...\n {\n $this->PhoneDurchwahl = trim($DurchwahlTest[0]); // Merke die Durchwahlnummer\n $this->PhoneInput = $DurchwahlTest[1]; // Gib die Telefonnummer OHNE die Durchwahlnummer zurück\n } // (Diese setze ich erst ganz am Schluss wieder ein.)\n }\n }\n }", "static function numeric( $st_data )\r\n {\r\n $st_data = preg_replace(\"([[:punct:]]|[[:alpha:]]| )\",'',$st_data);\r\n return $st_data; \r\n }", "function Comprobar_codedificio()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->CODEDIFICIO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->CODEDIFICIO)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->CODEDIFICIO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\t\n\treturn $correcto;//se devuelve el resultado\n}", "function complementarNombre() {\n\t\tif (strcmp($_SERVER['REQUEST_METHOD'], 'GET') != 0){\n\t\t\tfor ($i = 2; $i < sizeof($this->_parametros); $i++) {\n\t\t\t\tif ($this->_parametros[$i] != '') {\n\t\t\t\t\t$resultado = $resultado . 'Por' .ucfirst($this->_parametros[$i]);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$esLlave = true;\n\t\t\tfor ($i = 2; $i < sizeof($this->_parametros); $i++) {\n\t\t\t\tif ($this->_parametros[$i] != '' && $esLlave) {\n\t\t\t\t\t$resultado = $resultado . 'Por' .ucfirst($this->_parametros[$i]);\n\t\t\t\t\t$esLlave = false;\n\t\t\t\t} else {\n\t\t\t\t\t$esLlave = true;\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn $resultado;\n\t}", "function alphanumeric_dot($str)\n\t{\n\t\t$this->CI->form_validation->set_message('alphanumeric_dot', \"El campo %s solo puede contener caracteres alfanum&eacute;ricos y puntos.\");\n\t\treturn (bool) preg_match(\"/^([a-z0-9.])+$/i\", $str);\n\t}", "function quitar_tildes($cadena) {\r\n $no_permitidas = array (\"à\",\"á\",\"é\",\"í\",\"ó\",\"ú\",\"Á\",\"É\",\"Í\",\"Ó\",\"Ú\",\"À\",\"Ì\",\"Ò\",\"Ù\");\r\n $permitidas = array (\"a\",\"a\",\"e\",\"i\",\"o\",\"u\",\"A\",\"E\",\"I\",\"O\",\"U\",\"A\",\"I\",\"O\",\"U\");\r\n $texto = str_replace($no_permitidas, $permitidas ,$cadena);\r\n return $texto;\r\n }", "function soNumero($str) {\r\nreturn preg_replace(\"/[^0-9]/\", \"\", $str);\r\n\r\n}", "function DIAS_DEL_MES($_FECHA) {\r\n\tlist($dia, $mes, $anio) = SPLIT('[/.-]', $_FECHA);\r\n\t$dias_mes['01'] = 31;\r\n\tif ($anio%4==0) $dias_mes['02']=29; else $dias_mes['02']=28;\r\n\t$dias_mes['03'] = 31;\r\n\t$dias_mes['04'] = 30;\r\n\t$dias_mes['05'] = 31;\r\n\t$dias_mes['06'] = 30;\r\n\t$dias_mes['07'] = 31;\r\n\t$dias_mes['08'] = 31;\r\n\t$dias_mes['09'] = 30;\r\n\t$dias_mes['10'] = 31;\r\n\t$dias_mes['11'] = 30;\r\n\t$dias_mes['12'] = 31;\r\n\treturn $dias_mes[$mes];\r\n}", "function decimales($str, $parms)\n\t{\t\t\n\t\tlist($enteros, $decimales) = explode(\".\", $parms, 2);\n\t\t$this->CI->form_validation->set_message('decimales', \"El campo %s debe contener un valor num&eacute;rico con un m&aacute;ximo de {$enteros} enteros y {$decimales} decimales.\");\n\t\treturn (bool) preg_match( \"/(^\\d{1,$enteros}(\\.\\d{1,$decimales})?$)|^$/\", $str);\n\t}", "private function alphabeticValidation($field) {\r\n\t \t\tif ($field->getMethod() == \"get\")\r\n\t \t\t\treturn Inspekt::isAlpha($_GET[$field->getName()]);\r\n\t \t\telse\r\n\t \t\t\treturn Inspekt::isAlpha($_POST[$field->getName()]);\r\n\t \t}", "function testMajuscule($valeurTeste){\r\n $retour = \"faux\";\r\n if($valeurTeste>=\"A\" && $valeurTeste<=\"Z\"){\r\n $retour = \"vrai\";\r\n }\r\n return $retour;\r\n }", "function testMinuscle($valeurTeste){\r\n $i=1;\r\n for( $x = \"a\"; $i <= 26; $x++ ) {\r\n $tab[]=$x;\r\n $i++;\r\n }\r\n $retour=\"faux\";\r\n for($j=0;$j<26;$j++){\r\n if($valeurTeste==$tab[$j]){\r\n $retour = \"vrai\";\r\n }\r\n }\r\n return $retour;\r\n }", "function nilaiSiswa($nilai) {\nif($nilai==0){ \n\t$nilai = '';\n}\nelseif($nilai==4){ \n\t$nilai = 'SB';\n}\nelseif($nilai==3){ \n\t$nilai = 'B';\n}\nelseif($nilai==2){ \n\t$nilai = 'C';\n}\nelse { \n\t$nilai = 'K';\n}\n\treturn $nilai;\n}", "public function calcula13o()\n {\n }", "public function calcula13o()\n {\n }" ]
[ "0.6268864", "0.613223", "0.61082536", "0.60982776", "0.598355", "0.5912512", "0.59027267", "0.58756995", "0.58041745", "0.58012927", "0.57835203", "0.5765999", "0.5759329", "0.5757059", "0.57447726", "0.57378197", "0.5724783", "0.5721703", "0.57112104", "0.57077694", "0.57070494", "0.5702857", "0.56841326", "0.5681947", "0.56774634", "0.56638134", "0.56584764", "0.56578064", "0.5620483", "0.56031525", "0.5601206", "0.5591942", "0.55881155", "0.5571342", "0.5560524", "0.55481905", "0.55339867", "0.5531604", "0.5529876", "0.5520902", "0.5503255", "0.5501788", "0.5488288", "0.54624975", "0.54615617", "0.5459837", "0.54595083", "0.54495716", "0.5432", "0.5419911", "0.54100347", "0.54096067", "0.5407052", "0.53986865", "0.5397834", "0.53976154", "0.5395802", "0.53841656", "0.5382088", "0.53806084", "0.5374568", "0.5367372", "0.5354058", "0.53533", "0.535109", "0.53464913", "0.5346323", "0.53449136", "0.5344148", "0.5340067", "0.53370625", "0.5331363", "0.53246355", "0.5323004", "0.53188956", "0.5316708", "0.53160346", "0.5312691", "0.53107876", "0.5310657", "0.53033954", "0.53019106", "0.5300493", "0.53003365", "0.529696", "0.5294663", "0.5289851", "0.52845293", "0.52677697", "0.52642703", "0.5258522", "0.52573735", "0.5256553", "0.5250246", "0.52443475", "0.5242246", "0.52420366", "0.5240606", "0.5240192", "0.5240192" ]
0.54401505
48
quitamos la barra del final
private static function obtenerVariablesUrl($url) { $url = preg_replace('/\/$/', '', $url); //separamos las partes/variables de la url y las contamos $variables = explode('/', $url); $cantVariables = count($variables); //limpiamos y acumulamos las variables for ($i = 0; $i < $cantVariables; $i++) { //Acumulamos los valores en un arreglo $variables[$i] = index::limpiar($variables[$i]); } return $variables; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function finaliza()\n {\n $this -> estadoAtual -> finaliza($this);\n }", "function finaliza() {\n\n parent::addComando(chr(27) . chr(64));\n //parent::addComando(chr(02)); \n }", "public function finish()\n\t{\n\t\t\n\t}", "function finalizar(){\n\t\t//destruir cookie e sessao\n\t\t$this->f3->set('SESSION.participante','');\n\t\t$this->f3->set('SESSION.mail','');\n\t\t$this->f3->set('COOKIE','');\n\t\t$header = \"Final da Pesquisa\";\n\t\t$texto = \"Muito obrigada por participar da pesquisa! A sua contribuição será muito\n\t\t\t\t\tvaliosa para a continuidade dos estudos sobre os fatores que favorecem a aprendizagem\n\t\t\t\t\tde estudantes universitários brasileiros. Caso queira saber mais sobre a pesquisa, ou entrar em contato conosco, clique nos links no menu acima. Muito sucesso para você!\";\n\t\tif ($this->f3->get(\"POST.naoaceito\")) {\n\t\t\t$header = \"Prezado estudante,\";\n\t\t\t$texto = \"Agradecemos a sua atenção. Esperamos poder contar com a sua participação em outro momento.\";\n\t\t\t$this->f3->set('cordialmente',\"Cordialmente,\");\t\n\t\t}\n\n\t\t$this->f3->set('header',$header);\n\t\t$this->f3->set('texto',$texto);\n\t\t$this->f3->set('assinado',\"Evely Boruchovitch e equipe.\");\n\t\t$this->f3->set('content','agradecimento.html');\n\t\techo \\Template::instance()->render('tela.htm');\n\n\t}", "function finish(){\r\n\t}", "protected function finish() {}", "public function finished()\n {\n }", "function update_end()\n {\n }", "public function finish() {\r\n\t}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function FinishFila($finalizaFila){\n $update = \"UPDATE tbl_fila SET status = 3 WHERE idFila=\".$finalizaFila->id;\n\n //instancia a classe do banco\n $conex = new Mysql_db();\n //chama o metodo para conectar no BD e guarda o resultado da funcao em uma variavel local($PDOconex)\n $PDOconex = $conex->Conectar();\n\n //executa script no banco\n if ($PDOconex->query($update))\n header('location:'.$voltaUm.'views/administrativo/medico/atendimento_view.php');\n else\n echo \"Erro no update\";\n echo $sql;\n\n //Chama função que encerra conexao no banco\n $conex->Desconectar();\n }", "public function finish(): void\n {\n }", "public function finalizarTransaccion() {\n $this->ejecutar(\"COMMIT\");\n }", "public function after_run(){}", "protected function _after()\n\t{\n\t\t\n\t}", "protected function _after()\n\t{\n\t\t\n\t}", "function guardarReclamo()\n\t\t{\n\t\t}", "public function completed() {\n\t}", "public function Finish() {\n\t\t\t$this->add_missed_values();\n\t\t}", "public function __after()\t{\n\t}", "public static function after() {\n\n\t}", "public function clearFinished();", "public function done(){\n\t\t$this->done=true;\n\t}", "protected function after(){}", "protected function after(){}", "protected function after(){}", "public function traerCualquiera()\n {\n }", "public function after() {}", "public function after()\n\t{\n\t}", "public function doneAction()\n\t{\n\t\n\t}", "public function end_turn()\n\t{\n\t\t//\t\tpropre a la classe\n\t}", "public function after_run() {}", "public function progressFinish() {}", "public function finishedAction()\n {\n }", "public static function _after() : void {\n\t}", "public function finish_database_export() {\n }", "public function finish();", "public function finish();", "protected function _after()\n {\n }", "public function ActualizarArqueoCaja()\n{\n\n\tself::SetNames();\n\tif(empty($_POST[\"codarqueo\"]) or empty($_POST[\"codcaja\"]) or empty($_POST[\"montoinicial\"]) or empty($_POST[\"fechaapertura\"]))\n\t{\n\t\techo \"1\";\n\t\texit;\n\t}\n\t$sql = \" select codcaja from arqueocaja where codarqueo != ? and codcaja = ? and statusarqueo = '1' \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array($_POST[\"codarqueo\"], $_POST[\"codcaja\"]) );\n\t$num = $stmt->rowCount();\n\tif($num == 0)\n\t{\n\t\t$sql = \" update arqueocaja set \"\n\t\t.\" montoinicial = ? \"\n\t\t.\" where \"\n\t\t.\" codarqueo = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $montoinicial);\n\t\t$stmt->bindParam(2, $codarqueo);\n\n\t\t$montoinicial = strip_tags($_POST[\"montoinicial\"]);\n\t\t$codarqueo = strip_tags($_POST[\"codarqueo\"]);\n\t\t$stmt->execute();\n\n\t\techo \"<div class='alert alert-info'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<span class='fa fa-check-square-o'></span> EL ARQUEO DE CAJA FUE ACTUALIZADO EXITOSAMENTE\";\n\t\techo \"</div>\";\t\t\n\t\texit;\n\t}\n\telse\n\t{\n\t\techo \"2\";\n\t\texit;\n\t}\n}", "protected function after_execute() {\n// \t$this->add_related_files('mod_vcubeseminar', 'intro', null);\n// \t$this->add_related_files('mod_vcubeseminar', 'vcubeseminar', null);\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 finalize()\n {\n list($usec, $sec) = explode(' ', microtime());\n $micro = sprintf(\"%06d\", (float) $usec * 1000000);\n $when = new \\DateTime(date('Y-m-d H:i:s.' . $micro));\n $when->setTimezone(new \\DateTimeZone('UTC'));\n $this->finalTime = $when->format('Y-m-d\\TH:i:s.u\\Z');\n $this->isFinalState = true;\n }", "public function done()\n {\n $this->setStatus(self::STATUS_DONE);\n }", "public function extProc_finish() {}", "public function extProc_finish() {}", "protected function _after()\n {\n }", "public function finished() {\n\t\t// Reset the CSS.\n\t\tupdate_option( 'fusion_dynamic_css_posts', [] );\n\t}", "protected function _after() {\n\t\t$this->startup = null;\n\t}", "public static function end_block()\n\t{\n\t\tself::$nivel_cabecalho -= 1;\n\t}", "function finish()\n\t{\n\t\t$type = ( $this->ipsclass->input['un'] == 1 ) ? 'uninstallation' : 'installation';\n\t\t\n\t\tif ( $type == 'installation' )\n\t\t{\n\t\t\t$this->ipsclass->DB->do_update( 'installed_mods', array( 'm_version' => $this->xml_array['mod_info']['version']['VALUE'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'm_author' => $this->xml_array['mod_info']['author']['VALUE'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'm_website' => $this->xml_array['mod_info']['website']['VALUE'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'm_finished' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ), \"m_name='\".$this->xml_array['mod_info']['title']['VALUE'].\"'\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ipsclass->DB->do_delete( 'installed_mods', \"m_name='\".$this->xml_array['mod_info']['title']['VALUE'].\"'\" );\n\t\t\t\n\t\t\t$this->ipsclass->DB->sql_optimize_table( 'installed_mods' );\n\t\t}\n\t\t\n\t\t$this->ipsclass->main_msg = 'Modification '.$type.' complete...';\n\t\t\n\t\t$this->view_mods();\n\t}", "protected function finalize()\n\t{\n\t\tglobal $ilCtrl, $lng;\n\t\t\n\t\t// to make exercise gui load assignment\n\t\t$_GET[\"ass_id\"] = $_REQUEST[\"ass\"];\n\t\t\t\t\n\t\t// #11173 - ref_id is needed for notifications\n\t\t$exc_ref_id = array_shift(ilObject::_getAllReferences($_REQUEST[\"exc\"]));\n\t\n\t\tinclude_once \"Modules/Exercise/classes/class.ilObjExerciseGUI.php\";\n\t\t$exc_gui = new ilObjExerciseGUI(null, $exc_ref_id, true);\n\t\t$exc_gui->submitBlog($this->node_id);\n\t\t\n\t\tilUtil::sendSuccess($lng->txt(\"blog_finalized\"), true);\n\t\t$ilCtrl->redirect($this, \"render\");\n\t}", "public function videoconferenciaBajarVolumen( ) {\n $this->bajarVolumen();\n //$this->setComando(\"BAJAR_VOLUMEN\");\n }", "public function end();", "public function end();", "public function end();", "public function end();", "function end()\n\t{\n\t\t$this->over = true;\n\t}", "public function after()\n {\n }", "public function after()\n {\n }", "public function after()\n {\n }", "public function after()\n {\n }", "public function after()\n {\n }", "public function execute() {\n\t\n\t\techo \"Quantidade de feitiços removidos do \".$this->campo.\" : \".$this->getPetSpells();\n\t}", "function end();", "function FooterRR()\n {\n //Posición: a 2 cm del final\n $this->Ln();\n $this->SetY(-12);\n $this->SetFont('Arial','B',6);\n //Número de página\n $this->Cell(190,4,'Sistema de Control de Ventas y Facturacion \"BOUTIQUE DE ZAPATERIA\"','T',0,'L');\n $this->AliasNbPages();\n $this->Cell(0,4,'Pagina '.$this->PageNo(),'T',1,'R');\n }", "function evt__5__salida()\n\t{\n\t\tunset($this->pant_sel_temp);\n\t\t$this->get_entidad()->tabla('pantallas')->resetear_cursor();\n\t}", "function finalize()\n {\n if ($this->_numbers) {\n $this->_output = preg_replace_callback('~^~m', array($this, 'replaceCallback'), $this->_output);\n }\n $this->_output .= HL_CONSOLE_DEFCOLOR . \"\\n\";\n }", "public function end() {}", "public function end() {}", "public function end() {}", "function shutdown() {\n // Safety for themes not using wp_footer\n SLPlus_Actions::ManageTheScripts();\n\t\t}", "function Footer()\n\t{\n\t\t$this->pie_pred();\n\t \n\t}", "public function end()\n {\n }", "public function tiltUpCamaraPresidencia() {\n\n self::$presidencia->moverArriba();\n\n }", "public function actionQuitar()\n {\n $producto = Productoscarro::findOne(['id' => $_POST['producto']]);\n $uniforme = Uniformes::findOne(['id' => $producto->uniforme_id]);\n $cantidad = $producto->cantidad;\n if ($producto->delete()) {\n $uniforme->cantidad = $uniforme->cantidad + $cantidad;\n $secs = Secstocks::findOne(['uniforme_id' => $uniforme->id]);\n if ($secs !== null && $uniforme->cantidad > $secs->mp) {\n $uniforme->underss = true;\n $uniforme->save();\n }\n if ($uniforme->save()) {\n $carr = Carros::findOne(['id' => $producto->carro_id]);\n $carr->productos = $carr->productos - 1;\n $carr->save();\n }\n }\n // return true;\n }", "function cancelar()\r\n\t{\r\n\t\t$this->_log->debug( $this->get_txt() . \"[ cancelar ]\", 'toba');\r\n\t\t$this->limpiar_memoria();\r\n\t}", "function evt__4__salida()\n\t{\n\t\tunset($this->pant_sel_temp);\n\t\t$this->get_entidad()->tabla('pantallas')->resetear_cursor();\n\t}", "public function Footer(){\n // Posición: a 1,5 cm del final\n $this->SetY(-20);\n // Arial italic 8\n $this->AddFont('Futura-Medium');\n $this->SetFont('Futura-Medium','',10);\n $this->SetTextColor(50,50,50);\n // Número de págin\n $this->Cell(3);\n $this->Cell(0,3,utf8_decode('Generado por GetYourGames'),0,0,\"R\");\n $this->Ln(4);\n $this->Cell(3);\n $this->Cell(0,3,utf8_decode(date(\"d-m-Y g:i a\").' - Página ').$this->PageNo(),0,0,\"R\");\n\n }", "function recuperarFinalistas(){\n\t\t$votopro = new VotaProfesional();\n\t\t$res = $votopro->recuperarFinalistas();\n\t\treturn $res;\n\t}", "public function finish(): int;", "public function finish() {\n $strReturn = \"\";\n\n if(isset($_GET[\"autoInstall\"]) && $_GET[\"autoInstall\"] == \"true\") {\n $this->strLogfile = $this->processAutoInstall();\n }\n\n\n $this->objSession->sessionUnset(\"install_username\");\n $this->objSession->sessionUnset(\"install_password\");\n\n $strReturn .= $this->getLang(\"installer_finish_intro\");\n $strReturn .= $this->getLang(\"installer_finish_hints\");\n $strReturn .= $this->getLang(\"installer_finish_hints_update\");\n $strReturn .= $this->getLang(\"installer_finish_closer\");\n\n $this->strOutput = $strReturn;\n $this->strBackwardLink = $this->getBackwardLink(_webpath_.\"/installer.php?step=samplecontent\");\n }", "function finalizarRegistro(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_FINREGC_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function complete();", "public function complete();", "private function executeAfterSave()\n {\n Logger::getInstance()->po_log(\"Excecute after save \". get_class($this));\n\n foreach ( $this->afterSave as $cb ) $cb->execute();\n\n // Una vez que termino de ejecutar, reseteo los cb's registrados.\n $this->afterSave = array();\n }", "private function finalize()\n {\n $this->temp_files_path[] = L_FRAME_LIST_FILE;\n $this->delete_files();\n }", "abstract protected function doEnd();", "function\tbuche() {\n\t\tFDbg::dumpL( 0x00000100, \"AbKorr.php::AbKorrPosten::buche(): begin\") ;\n\t\t$this->_buche( 1) ;\n\t\tFDbg::dumpL( 0x00000100, \"AbKorr.php::AbKorrPosten::buche(): end\") ;\n\t}", "public function finalize_deployment() : void {\n $deployer = new Deployer();\n $deployer->finalizeDeployment();\n\n echo 'SUCCESS';\n }", "public function ejecutar(){\r\n\t\tmove_uploaded_file($this->carpeta_temporal,$this->carpeta_destino.$this->nuevo_nombre_imagen);\r\n\t\tchmod($this->carpeta_destino.$this->nuevo_nombre_imagen, 0777);\r\n\t\techo $this->carpeta_temporal;\r\n\t\techo \"<br>\";\r\n\t\t$this->carpeta_donde_esta_imagen=$this->carpeta_destino.$this->nuevo_nombre_imagen;\r\n\t\techo $this->carpeta_donde_esta_imagen;\r\n\t}", "public function finish()\n {\n $this->view->dictionary = $this->dictionary;\n $this->view->previousAction = $this->parseActions();\n\n if ($this->view->previousAction == 'introduction') {\n $this->view->action = 'introduction';\n } else {\n $this->view->action = 'search';\n }\n\n $this->view->params = $this->front->params;\n $this->view->isIE = $this->isIE();\n $this->view->domainSubpath = $this->front->config['domain-subpath'];\n\n $this->setLastWordCookies();\n }", "public function cortesia()\n {\n $this->costo = 0;\n }", "function _endpage()\n\t\t{\n\t\t\t$this->state=1;\n\t\t}" ]
[ "0.7029274", "0.69519866", "0.6514763", "0.64936054", "0.63818365", "0.6354013", "0.63319606", "0.63032156", "0.62835944", "0.6279137", "0.6278396", "0.6278303", "0.6278303", "0.6278303", "0.6278303", "0.6278303", "0.6276145", "0.62091255", "0.6180537", "0.617701", "0.6170389", "0.6137097", "0.6137097", "0.6064585", "0.6019544", "0.60124946", "0.6010575", "0.59731424", "0.5951973", "0.5936434", "0.5934198", "0.5934198", "0.5934198", "0.59310806", "0.59071296", "0.5897057", "0.5870072", "0.58585674", "0.58549684", "0.58462656", "0.5841316", "0.5835701", "0.58179325", "0.5791147", "0.5791147", "0.57731384", "0.57445806", "0.5741238", "0.5737979", "0.57224905", "0.5721194", "0.5714419", "0.5713395", "0.5712619", "0.570653", "0.5690919", "0.56870574", "0.5675241", "0.565367", "0.56371045", "0.5636971", "0.5636971", "0.5636971", "0.5636971", "0.56364816", "0.5630855", "0.5630584", "0.5630015", "0.5630015", "0.5629495", "0.5615724", "0.5610466", "0.5599975", "0.55951387", "0.55797136", "0.5574448", "0.5574448", "0.5574448", "0.5561086", "0.555688", "0.5555636", "0.555403", "0.554921", "0.5547801", "0.5545417", "0.5534495", "0.5531681", "0.55291903", "0.5522848", "0.5519013", "0.5517051", "0.5517051", "0.5513874", "0.5512876", "0.5503702", "0.5493609", "0.54919493", "0.54905003", "0.5487961", "0.5487489", "0.5483537" ]
0.0
-1
Retrieves a list of models based on the current search/filter conditions. Typical usecase: Initialize the model fields with values from filter form. Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields. Pass data provider to CGridView, CListView or any similar widget.
public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $criteria=new CDbCriteria; $criteria->compare('id_state',$this->id_state); $criteria->compare('ST_CODE',$this->ST_CODE); $criteria->compare('name',$this->name,true); $criteria->compare('ias_short_code',$this->ias_short_code,true); #$criteria->compare('id_census',$this->id_census); $criteria->compare('eci_ref',$this->eci_ref,true); $criteria->compare('session_from',$this->session_from,true); $criteria->compare('session_to',$this->session_to,true); $criteria->compare('lok_parl_seats',$this->lok_parl_seats); $criteria->compare('amly_seats',$this->amly_seats); $criteria->compare('raj_parl_seats',$this->raj_parl_seats); $criteria->compare('updated',$this->updated,true); $criteria->compare('iso3166',$this->iso3166,true); $criteria->compare('psloc',$this->psloc); $criteria->compare('eci_dist_count',$this->eci_dist_count); $criteria->compare('eci_amly_count',$this->eci_amly_count); $criteria->order = 'name'; return new CActiveDataProvider ( $this, array ( 'criteria' => $criteria, 'pagination' => [ 'pageSize' => 100 ] )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object_type_id);\n\t\t$criteria->compare('data_type_id',$this->data_type_id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('client_ip',$this->client_ip,true);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_origin',$this->url_origin,true);\n\t\t$criteria->compare('device',$this->device,true);\n\t\t$criteria->compare('country_name',$this->country_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('regionName',$this->regionName,true);\n\t\t$criteria->compare('cityName',$this->cityName,true);\n\t\t$criteria->compare('browser',$this->browser,true);\n\t\t$criteria->compare('os',$this->os,true);\n\t\t\t// se agrego el filtro por el usuario actual\n\t\t$idUsuario=Yii::app()->user->getId();\n\t\t$model = Listings::model()->finbyAttributes(array('user_id'=>$idUsuario));\n\t\tif($model->id!=\"\"){\n\t\t\t$criteria->compare('object_id',$model->id);\t\n\t\t}else{\n\t\t\t$criteria->compare('object_id',\"Null\");\t\n\t\t}\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('model_id',$this->model_id,true);\n $criteria->compare('color',$this->color,true);\n $criteria->compare('is_in_pare',$this->is_in_pare);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('generator_id',$this->generator_id,true);\n\t\t$criteria->compare('serial_number',$this->serial_number,true);\n\t\t$criteria->compare('model_number',$this->model_number,true);\n\t\t$criteria->compare('manufacturer_name',$this->manufacturer_name,true);\n\t\t$criteria->compare('manufacture_date',$this->manufacture_date,true);\n\t\t$criteria->compare('supplier_name',$this->supplier_name,true);\n\t\t$criteria->compare('date_of_purchase',$this->date_of_purchase,true);\n\t\t$criteria->compare('date_of_first_use',$this->date_of_first_use,true);\n\t\t$criteria->compare('kva_capacity',$this->kva_capacity);\n\t\t$criteria->compare('current_run_hours',$this->current_run_hours);\n\t\t$criteria->compare('last_serviced_date',$this->last_serviced_date,true);\n\t\t$criteria->compare('engine_make',$this->engine_make,true);\n\t\t$criteria->compare('engine_model',$this->engine_model,true);\n\t\t$criteria->compare('fuel_tank_capacity',$this->fuel_tank_capacity);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('idmodel',$this->idmodel);\n\t\t$criteria->compare('usuario_anterior',$this->usuario_anterior);\n\t\t$criteria->compare('usuario_nuevo',$this->usuario_nuevo);\n\t\t$criteria->compare('estado_anterior',$this->estado_anterior,true);\n\t\t$criteria->compare('estado_nuevo',$this->estado_nuevo,true);\n\t\t$criteria->compare('fecha',$this->fecha,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('brand',$this->brand,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('width',$this->width);\n\t\t$criteria->compare('height',$this->height);\n\t\t$criteria->compare('goods_thumb',$this->goods_thumb,true);\n\t\t$criteria->compare('goods_img',$this->goods_img,true);\n\t\t$criteria->compare('model_search',$this->model_search,true);\n\t\t$criteria->compare('brand_search',$this->brand_search,true);\n\t\t$criteria->compare('brand2',$this->brand2,true);\n\t\t$criteria->compare('brand2_search',$this->brand2_search,true);\n\t\t$criteria->compare('brand3',$this->brand3,true);\n\t\t$criteria->compare('brand3_search',$this->brand3_search,true);\n\t\t$criteria->compare('brand4',$this->brand4,true);\n\t\t$criteria->compare('brand4_search',$this->brand4_search,true);\n\t\t$criteria->compare('model2',$this->model2,true);\n\t\t$criteria->compare('model2_search',$this->model2_search,true);\n\t\t$criteria->compare('model3',$this->model3,true);\n\t\t$criteria->compare('model3_search',$this->model3_search,true);\n\t\t$criteria->compare('model4',$this->model4,true);\n\t\t$criteria->compare('model4_search',$this->model4_search,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('car',$this->car,true);\n\t\t$criteria->compare('source_id',$this->source_id,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('client_type_id',$this->client_type_id,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('other',$this->other,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('UserID',$this->UserID);\n\t\t$criteria->compare('ProviderID',$this->ProviderID);\n\t\t$criteria->compare('Date',$this->Date,true);\n\t\t$criteria->compare('RawID',$this->RawID);\n\t\t$criteria->compare('Document',$this->Document,true);\n\t\t$criteria->compare('State',$this->State,true);\n\t\t$criteria->compare('Temperature',$this->Temperature,true);\n\t\t$criteria->compare('Conditions',$this->Conditions,true);\n\t\t$criteria->compare('Expiration',$this->Expiration,true);\n\t\t$criteria->compare('Comments',$this->Comments,true);\n\t\t$criteria->compare('Quantity',$this->Quantity,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n \t'pageSize'=>Yii::app()->params['defaultPageSize'], \n ),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t// $criteria->compare('text',$this->text,true);\n\t\t// $criteria->compare('record',$this->record,true);\n\t\t$criteria->compare('user',$this->user,true);\n\t\t$criteria->compare('createdBy',$this->createdBy,true);\n\t\t$criteria->compare('viewed',$this->viewed);\n\t\t$criteria->compare('createDate',$this->createDate,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('comparison',$this->comparison,true);\n\t\t// $criteria->compare('value',$this->value,true);\n\t\t$criteria->compare('modelType',$this->modelType,true);\n\t\t$criteria->compare('modelId',$this->modelId,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('Currency_ID',$this->Currency_ID);\n\t\t$criteria->compare('CurrencyNo',$this->CurrencyNo,true);\n\t\t$criteria->compare('ExchangeVND',$this->ExchangeVND,true);\n\t\t$criteria->compare('AppliedDate',$this->AppliedDate,true);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('firm',$this->firm,true);\n\t\t$criteria->compare('change_date',$this->change_date,true);\n\t\t$criteria->compare('item_id',$this->item_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('availability',$this->availability,true);\n\t\t$criteria->compare('price',$this->price,true);\n\t\t$criteria->compare('bonus',$this->bonus,true);\n\t\t$criteria->compare('shipping_cost',$this->shipping_cost,true);\n\t\t$criteria->compare('product_page',$this->product_page,true);\n\t\t$criteria->compare('sourse_page',$this->sourse_page,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('column_id',$this->column_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('condition',$this->condition,true);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('industry',$this->industry,true);\n\t\t$criteria->compare('industry_sub',$this->industry_sub,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('province',$this->province,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('contact_name',$this->contact_name,true);\n\t\t$criteria->compare('contact_tel',$this->contact_tel,true);\n\t\t$criteria->compare('ip',$this->ip,true);\n\t\t$criteria->compare('source',$this->source,true);\n $criteria->compare('status',$this->status);\n\t\t$criteria->compare('update_time',$this->update_time);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('notes',$this->notes);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('university',$this->university,true);\n\t\t$criteria->compare('major',$this->major,true);\n\t\t$criteria->compare('gpa',$this->gpa,true);\n\t\t$criteria->compare('appl_term',$this->appl_term);\n\t\t$criteria->compare('toefl',$this->toefl);\n\t\t$criteria->compare('gre',$this->gre);\n\t\t$criteria->compare('appl_major',$this->appl_major,true);\n\t\t$criteria->compare('appl_degree',$this->appl_degree,true);\n\t\t$criteria->compare('appl_country',$this->appl_country,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new \\CDbCriteria;\n\n\t\tforeach (array_keys($this->defineAttributes()) as $name)\n\t\t{\n\t\t\t$criteria->compare($name, $this->$name);\n\t\t}\n\n\t\treturn new \\CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('goods_code',$this->goods_code,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('brand_id',$this->brand_id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('kind',$this->kind,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('size',$this->size,true);\n\t\t$criteria->compare('material',$this->material,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('purchase_price',$this->purchase_price,true);\n\t\t$criteria->compare('selling_price',$this->selling_price,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('meta_title',$this->meta_title,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ContractsDetailID',$this->ContractsDetailID,true);\n\t\t$criteria->compare('ContractID',$this->ContractID,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\t\t$criteria->compare('CustomerID',$this->CustomerID,true);\n\t\t$criteria->compare('Share',$this->Share);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria = $this->criteriaSearch();\r\n\t\t$criteria->limit = 10;\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria' => $criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('organizationName',$this->organizationName,true);\n\t\t$criteria->compare('contactNo',$this->contactNo,true);\n\t\t$criteria->compare('partnerType',$this->partnerType);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('area',$this->area,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('emailId',$this->emailId,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('firstName',$this->firstName,true);\n\t\t$criteria->compare('lastName',$this->lastName,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_ID,$this->{Globals::FLD_NAME_ACTIVITY_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_TASK_ID,$this->{Globals::FLD_NAME_TASK_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_BY_USER_ID,$this->{Globals::FLD_NAME_BY_USER_ID},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_TYPE,$this->{Globals::FLD_NAME_ACTIVITY_TYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_ACTIVITY_SUBTYPE,$this->{Globals::FLD_NAME_ACTIVITY_SUBTYPE},true);\n\t\t$criteria->compare(Globals::FLD_NAME_COMMENTS,$this->{Globals::FLD_NAME_COMMENTS},true);\n\t\t$criteria->compare(Globals::FLD_NAME_CREATED_AT,$this->{Globals::FLD_NAME_CREATED_AT},true);\n\t\t$criteria->compare(Globals::FLD_NAME_SOURCE_APP,$this->{Globals::FLD_NAME_SOURCE_APP},true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('manufacturers_image',$this->manufacturers_image,true);\n\t\t$criteria->compare('date_added',$this->date_added);\n\t\t$criteria->compare('last_modified',$this->last_modified);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_clicked',$this->url_clicked);\n\t\t$criteria->compare('date_last_click',$this->date_last_click);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('date',$this->date);\n\t\t$criteria->compare('del',$this->del);\n\t\t$criteria->compare('action_id',$this->action_id);\n\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('catalog',$this->catalog,true);\n\t\t$criteria->compare('is_new',$this->is_new);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('case',$this->case);\n\t\t$criteria->compare('basis_doc',$this->basis_doc);\n\t\t$criteria->compare('calc_group',$this->calc_group);\n\t\t$criteria->compare('time',$this->time,true);\n\t\t$criteria->compare('value',$this->value,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('competition',$this->competition);\n\t\t$criteria->compare('partner',$this->partner);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('website',$this->website,true);\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('data_attributes_fields',$this->data_attributes_fields,true);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('created',$this->created,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('skill_id',$this->skill_id);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('account_id',$this->account_id);\n\t\t$criteria->compare('field_name',$this->field_name);\n\t\t$criteria->compare('content',$this->content);\n\t\t$criteria->compare('old_data',$this->old_data,true);\n\t\t$criteria->compare('new_data',$this->new_data,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('type',$this->type);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_updated',$this->date_updated,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('company_id',$this->company_id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('validator',$this->validator,true);\n\t\t$criteria->compare('position',$this->position);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n $criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('display_name',$this->display_name,true);\n $criteria->compare('actionPrice',$this->actionPrice);\n\t\t$criteria->compare('translit',$this->translit,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('display_description',$this->display_description,true);\n\t\t$criteria->compare('meta_keywords',$this->meta_keywords,true);\n\t\t$criteria->compare('meta_description',$this->meta_description,true);\n\t\t$criteria->compare('editing',$this->editing);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array(\n 'pageSize' => 15,\n ),\n\t\t));\n\t}", "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('BrandID', $this->BrandID);\n $criteria->compare('BrandName', $this->BrandName, true);\n $criteria->compare('Pinyin', $this->Pinyin, true);\n $criteria->compare('Remarks', $this->Remarks, true);\n $criteria->compare('OrganID', $this->OrganID);\n $criteria->compare('UserID', $this->UserID);\n $criteria->compare('CreateTime', $this->CreateTime);\n $criteria->compare('UpdateTime', $this->UpdateTime);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('printable_name', $this->printable_name, true);\n\t\t$criteria->compare('iso3', $this->iso3, true);\n\t\t$criteria->compare('numcode', $this->numcode);\n\t\t$criteria->compare('is_default', $this->is_default);\n\t\t$criteria->compare('is_highlight', $this->is_highlight);\n\t\t$criteria->compare('is_active', $this->is_active);\n\t\t$criteria->compare('date_added', $this->date_added);\n\t\t$criteria->compare('date_modified', $this->date_modified);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('componente_id',$this->componente_id);\n\t\t$criteria->compare('tipo_dato',$this->tipo_dato,true);\n\t\t$criteria->compare('descripcion',$this->descripcion,true);\n\t\t$criteria->compare('cruce_automatico',$this->cruce_automatico,true);\n\t\t$criteria->compare('sw_obligatorio',$this->sw_obligatorio,true);\n\t\t$criteria->compare('orden',$this->orden);\n\t\t$criteria->compare('sw_puntaje',$this->sw_puntaje,true);\n\t\t$criteria->compare('sw_estado',$this->sw_estado,true);\n\t\t$criteria->compare('todos_obligatorios',$this->todos_obligatorios,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('real_name',$this->real_name,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('zip_code',$this->zip_code,true);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('city_id',$this->city_id);\n\t\t$criteria->compare('district_id',$this->district_id);\n\t\t$criteria->compare('district_address',$this->district_address,true);\n\t\t$criteria->compare('street_address',$this->street_address,true);\n\t\t$criteria->compare('is_default',$this->is_default);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('update_time',$this->update_time);\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('EMCE_ID',$this->EMCE_ID);\n\t\t$criteria->compare('MOOR_ID',$this->MOOR_ID);\n\t\t$criteria->compare('EVCR_ID',$this->EVCR_ID);\n\t\t$criteria->compare('EVES_ID',$this->EVES_ID);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('customerName',$this->customerName,true);\n\t\t$criteria->compare('agencyHead',$this->agencyHead,true);\n\t\t$criteria->compare('region_id',$this->region_id);\n\t\t$criteria->compare('province_id',$this->province_id);\n\t\t$criteria->compare('municipalityCity_id',$this->municipalityCity_id);\n\t\t$criteria->compare('barangay_id',$this->barangay_id);\n\t\t$criteria->compare('houseNumber',$this->houseNumber,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('type_id',$this->type_id);\n\t\t$criteria->compare('nature_id',$this->nature_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('created_by',$this->created_by);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('update_time',$this->update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->name,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('state',$this->address,true);\n\t\t$criteria->compare('country',$this->address,true);\n\t\t$criteria->compare('contact_number',$this->contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('is_deleted',$this->is_deleted);\n\t\t$criteria->compare('deleted_by',$this->deleted_by,true);\n\t\t$criteria->compare('created_at',$this->created_at,true);\n\t\t$criteria->compare('updated_at',$this->updated_at,true);\n\t\tif(YII::app()->user->getState(\"role\") == \"admin\") {\n\t\t\t$criteria->condition = 'is_deleted = 0';\n\t\t}\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('industry_id',$this->industry_id);\n\t\t$criteria->compare('professional_status_id',$this->professional_status);\n\t\t$criteria->compare('birthday',$this->birthday);\n\t\t$criteria->compare('location',$this->location);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=$this->criteriaSearch();\n $criteria->limit=10;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('memo',$this->memo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\r\r\n\t{\r\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\r\n\r\r\n\t\t$criteria=new CDbCriteria;\r\r\n\r\r\n\t\t$criteria->compare('id',$this->id);\r\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\r\n\t\t$criteria->compare('adds',$this->adds);\r\r\n\t\t$criteria->compare('edits',$this->edits);\r\r\n\t\t$criteria->compare('deletes',$this->deletes);\r\r\n\t\t$criteria->compare('view',$this->view);\r\r\n\t\t$criteria->compare('lists',$this->lists);\r\r\n\t\t$criteria->compare('searches',$this->searches);\r\r\n\t\t$criteria->compare('prints',$this->prints);\r\r\n\r\r\n\t\treturn new CActiveDataProvider($this, array(\r\r\n\t\t\t'criteria'=>$criteria,\r\r\n\t\t));\r\r\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('applyId',$this->applyId);\n\t\t$criteria->compare('stuId',$this->stuId);\n\t\t$criteria->compare('stuName',$this->stuName,true);\n\t\t$criteria->compare('specification',$this->specification,true);\n\t\t$criteria->compare('assetName',$this->assetName,true);\n\t\t$criteria->compare('applyTime',$this->applyTime,true);\n\t\t$criteria->compare('loanTime',$this->loanTime,true);\n\t\t$criteria->compare('returnTime',$this->returnTime,true);\n\t\t$criteria->compare('RFID',$this->RFID,true);\n\t\t$criteria->compare('stuTelNum',$this->stuTelNum,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('verid',$this->verid);\n\t\t$criteria->compare('appversion',$this->appversion,true);\n\t\t$criteria->compare('appfeatures',$this->appfeatures,true);\n\t\t$criteria->compare('createtime',$this->createtime,true);\n\t\t$criteria->compare('baseNum',$this->baseNum);\n\t\t$criteria->compare('slave1Num',$this->slave1Num);\n\t\t$criteria->compare('packagename',$this->packagename,true);\n\t\t$criteria->compare('ostype',$this->ostype);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('itemcode', $this->itemcode, true);\n $criteria->compare('product_id', $this->product_id, true);\n $criteria->compare('delete_flag', $this->delete_flag);\n $criteria->compare('status', $this->status);\n $criteria->compare('expire', $this->expire, true);\n $criteria->compare('date_input', $this->date_input, true);\n $criteria->compare('d_update', $this->d_update, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('client_id',$this->client_id,true);\n\t\t$criteria->compare('extension',$this->extension,true);\n\t\t$criteria->compare('rel_type',$this->rel_type,true);\n\t\t$criteria->compare('rel_id',$this->rel_id,true);\n\t\t$criteria->compare('meta_key',$this->meta_key,true);\n\t\t$criteria->compare('meta_value',$this->meta_value,true);\n\t\t$criteria->compare('date_entry',$this->date_entry,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('column_id',$this->column_id,true);\n\t\t$criteria->compare('research_title',$this->research_title,true);\n\t\t$criteria->compare('research_url',$this->research_url,true);\n\t\t$criteria->compare('column_type',$this->column_type);\n\t\t$criteria->compare('filiale_id',$this->filiale_id,true);\n\t\t$criteria->compare('area_name',$this->area_name,true);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('trigger_config',$this->trigger_config);\n\t\t$criteria->compare('status',$this->status);\n $criteria->compare('terminal_type',$this->terminal_type);\n\t\t$criteria->compare('start_time',$this->start_time,true);\n\t\t$criteria->compare('end_time',$this->end_time,true);\n\t\t$criteria->compare('explain',$this->explain,true);\n\t\t$criteria->compare('_delete',$this->_delete);\n\t\t$criteria->compare('_create_time',$this->_create_time,true);\n\t\t$criteria->compare('_update_time',$this->_update_time,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function backendSearch()\n {\n $criteria = new CDbCriteria();\n\n return new CActiveDataProvider(\n __CLASS__,\n array(\n 'criteria' => $criteria,\n )\n );\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('birthday',$this->birthday,true);\n\t\t$criteria->compare('sex',$this->sex);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('is_get_news',$this->is_get_news);\n\t\t$criteria->compare('user_id',$this->user_id);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('order_id',$this->order_id);\n\t\t$criteria->compare('device_id',$this->device_id,true);\n\t\t$criteria->compare('money',$this->money,true);\n\t\t$criteria->compare('status',$this->status);\n\t\t$criteria->compare('add_time',$this->add_time);\n\t\t$criteria->compare('recharge_type',$this->recharge_type);\n\t\t$criteria->compare('channel',$this->channel,true);\n\t\t$criteria->compare('version_name',$this->version_name,true);\n\t\t$criteria->compare('pay_channel',$this->pay_channel);\n\t\t$criteria->compare('chanel_bid',$this->chanel_bid);\n\t\t$criteria->compare('chanel_sid',$this->chanel_sid);\n\t\t$criteria->compare('versionid',$this->versionid);\n\t\t$criteria->compare('chanel_web',$this->chanel_web);\n\t\t$criteria->compare('dem_num',$this->dem_num);\n\t\t$criteria->compare('last_watching',$this->last_watching,true);\n\t\t$criteria->compare('pay_type',$this->pay_type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('tbl_customer_supplier', $this->tbl_customer_supplier, true);\n $criteria->compare('id_customer', $this->id_customer, true);\n $criteria->compare('id_supplier', $this->id_supplier, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('date_add', $this->date_add, true);\n $criteria->compare('date_upd', $this->date_upd, true);\n $criteria->compare('active', $this->active);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\r\n {\r\n // @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n $criteria = new CDbCriteria;\r\n\r\n $criteria->compare('id', $this->id);\r\n $criteria->compare('country_id', $this->country_id);\r\n $criteria->compare('user_id', $this->user_id);\r\n $criteria->compare('vat', $this->vat);\r\n $criteria->compare('manager_coef', $this->manager_coef);\r\n $criteria->compare('curator_coef', $this->curator_coef);\r\n $criteria->compare('admin_coef', $this->admin_coef);\r\n $criteria->compare('status', $this->status);\r\n\r\n return new CActiveDataProvider($this, array(\r\n 'criteria' => $criteria,\r\n ));\r\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('purchase_price',$this->purchase_price);\n\t\t$criteria->compare('sell_price',$this->sell_price);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('measurement',$this->measurement,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('date_update',$this->date_update,true);\n\t\t$criteria->compare('date_out',$this->date_out,true);\n\t\t$criteria->compare('date_in',$this->date_in,true);\n\t\t$criteria->compare('firma_id',$this->firma_id,true);\n\t\t$criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('instock',$this->instock);\n\t\t$criteria->compare('user_id',$this->user_id);\n $criteria->compare('warning_amount',$this->warning_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('fname',$this->fname,true);\n\t\t$criteria->compare('mname',$this->mname,true);\n\t\t$criteria->compare('lname',$this->lname,true);\n\t\t$criteria->compare('photo',$this->photo,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('date_of_birth',$this->date_of_birth,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('landline',$this->landline,true);\n\t\t$criteria->compare('em_contact_name',$this->em_contact_name,true);\n\t\t$criteria->compare('em_contact_relation',$this->em_contact_relation,true);\n\t\t$criteria->compare('em_contact_number',$this->em_contact_number,true);\n\t\t$criteria->compare('created_by',$this->created_by,true);\n\t\t$criteria->compare('created_date',$this->created_date,true);\n\n return new CActiveDataProvider( $this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => Yii::app()->user->getState( 'pageSize', Yii::app()->params[ 'defaultPageSize' ] ),\n ),\n ) );\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t\n\t\t$criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->compare('COMPETITOR_ID',$this->COMPETITOR_ID);\n\t\t$criteria->compare('WSDC_NO',$this->WSDC_NO);\n\t\t$criteria->compare('FIRST_NAME',$this->FIRST_NAME,true);\n\t\t$criteria->compare('LAST_NAME',$this->LAST_NAME,true);\n\t\t$criteria->compare('COMPETITOR_LEVEL',$this->COMPETITOR_LEVEL);\n\t\t$criteria->compare('REMOVED',$this->REMOVED);\n\t\t$criteria->compare('ADDRESS',$this->ADDRESS,true);\n\t\t$criteria->compare('CITY',$this->CITY,true);\n\t\t$criteria->compare('STATE',$this->STATE,true);\n\t\t$criteria->compare('POSTCODE',$this->POSTCODE);\n\t\t$criteria->compare('COUNTRY',$this->COUNTRY,true);\n\t\t$criteria->compare('PHONE',$this->PHONE,true);\n\t\t$criteria->compare('MOBILE',$this->MOBILE,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('LEADER',$this->LEADER);\n\t\t$criteria->compare('REGISTERED',$this->REGISTERED);\n\t\t$criteria->compare('BIB_STATUS',$this->BIB_STATUS);\n\t\t$criteria->compare('BIB_NUMBER',$this->BIB_NUMBER);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('sys_name',$this->sys_name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('CustomerId',$this->CustomerId,true);\n\t\t$criteria->compare('AddressId',$this->AddressId,true);\n\t\t$criteria->compare('CustomerStatusId',$this->CustomerStatusId,true);\n\t\t$criteria->compare('DateMasterId',$this->DateMasterId,true);\n\t\t$criteria->compare('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('CustomerPhoto',$this->CustomerPhoto,true);\n\t\t$criteria->compare('CustomerCode',$this->CustomerCode);\n\t\t$criteria->compare('Telephone',$this->Telephone,true);\n\t\t$criteria->compare('Mobile',$this->Mobile,true);\n\t\t$criteria->compare('EmailId',$this->EmailId,true);\n\t\t$criteria->compare('Status',$this->Status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$parameters = array('limit'=>ceil(Profile::getResultsPerPage()));\n\t\t$criteria->scopes = array('findAll'=>array($parameters));\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('itemId',$this->itemId);\n\t\t$criteria->compare('changedBy',$this->changedBy,true);\n\t\t$criteria->compare('recordName',$this->recordName,true);\n\t\t$criteria->compare('fieldName',$this->fieldName,true);\n\t\t$criteria->compare('oldValue',$this->oldValue,true);\n\t\t$criteria->compare('newValue',$this->newValue,true);\n\t\t$criteria->compare('diff',$this->diff,true);\n\t\t$criteria->compare('timestamp',$this->timestamp);\n\n\t\treturn new SmartActiveDataProvider(get_class($this), array(\n\t\t\t'sort'=>array(\n\t\t\t\t'defaultOrder'=>'timestamp DESC',\n\t\t\t),\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>Profile::getResultsPerPage(),\n\t\t\t),\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('company_id', $this->company_id);\n\t\t$criteria->compare('productId', $this->productId);\n\t\t$criteria->compare('upTo', $this->upTo);\n\t\t$criteria->compare('fixPrice', $this->fixPrice);\n\t\t$criteria->compare('isActive', $this->isActive);\n\t\t$criteria->order = 'company_id';\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t));\n\t}", "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id',$this->id);\r\n\t\t$criteria->compare('user_id',$this->user_id);\r\n\t\t$criteria->compare('mem_type',$this->mem_type);\r\n\t\t$criteria->compare('business_type',$this->business_type);\r\n\t\t$criteria->compare('product_name',$this->product_name,true);\r\n\t\t$criteria->compare('panit',$this->panit,true);\r\n\t\t$criteria->compare('sex',$this->sex);\r\n\t\t$criteria->compare('tname',$this->tname);\r\n\t\t$criteria->compare('ftname',$this->ftname,true);\r\n\t\t$criteria->compare('ltname',$this->ltname,true);\r\n\t\t$criteria->compare('etname',$this->etname);\r\n\t\t$criteria->compare('fename',$this->fename,true);\r\n\t\t$criteria->compare('lename',$this->lename,true);\r\n\t\t$criteria->compare('birth',$this->birth,true);\r\n\t\t$criteria->compare('email',$this->email,true);\r\n\t\t$criteria->compare('facebook',$this->facebook,true);\r\n\t\t$criteria->compare('twitter',$this->twitter,true);\r\n\t\t$criteria->compare('address',$this->address,true);\r\n\t\t$criteria->compare('province',$this->province);\r\n\t\t$criteria->compare('prefecture',$this->prefecture);\r\n\t\t$criteria->compare('district',$this->district);\r\n\t\t$criteria->compare('postcode',$this->postcode,true);\r\n\t\t$criteria->compare('tel',$this->tel,true);\r\n\t\t$criteria->compare('mobile',$this->mobile,true);\r\n\t\t$criteria->compare('fax',$this->fax,true);\r\n\t\t$criteria->compare('high_education',$this->high_education);\r\n\t\t$criteria->compare('career',$this->career);\r\n\t\t$criteria->compare('skill_com',$this->skill_com);\r\n\t\t$criteria->compare('receive_news',$this->receive_news,true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('city_id',$this->city_id);\n\t\t$criteria->compare('locality',$this->locality,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('item_id',$this->item_id);\n\t\t$criteria->compare('table_id',$this->table_id);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('cou_id',$this->cou_id);\n\t\t$criteria->compare('thm_id',$this->thm_id);\n\t\t$criteria->compare('cou_nom',$this->cou_nom,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=$this->getBaseCDbCriteria();\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n// $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n// $criteria->compare('alias', $this->alias, true);\n// $criteria->compare('module', $this->module, true);\n $criteria->compare('crud', $this->crud, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('idempleo',$this->idempleo);\n\t\t$criteria->compare('administrativo',$this->administrativo,true);\n\t\t$criteria->compare('comercial',$this->comercial,true);\n\t\t$criteria->compare('artes',$this->artes,true);\n\t\t$criteria->compare('informatica',$this->informatica,true);\n\t\t$criteria->compare('salud',$this->salud,true);\n\t\t$criteria->compare('marketing',$this->marketing,true);\n\t\t$criteria->compare('servicio_domestico',$this->servicio_domestico,true);\n\t\t$criteria->compare('construccion',$this->construccion,true);\n\t\t$criteria->compare('agricultura',$this->agricultura,true);\n\t\t$criteria->compare('ganaderia',$this->ganaderia,true);\n\t\t$criteria->compare('telecomunicaciones',$this->telecomunicaciones,true);\n\t\t$criteria->compare('atencion_cliente',$this->atencion_cliente,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID_VALOR',$this->ID_VALOR);\n\t\t$criteria->compare('ID_UBICACION',$this->ID_UBICACION);\n\t\t$criteria->compare('ID_VISITA',$this->ID_VISITA);\n\t\t$criteria->compare('VALOR',$this->VALOR);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t\n\t\t$criteria->compare('id_aspecto',$this->id_aspecto,true);\n\t\t$criteria->compare('tbl_Programa_id_programa',$this->tbl_Programa_id_programa,true);\n\t\t$criteria->compare('tbl_Factor_id_factor',$this->tbl_Factor_id_factor);\n\t\t$criteria->compare('tbl_caracteristica_id_caracteristica',$this->tbl_caracteristica_id_caracteristica,true);\n\t\t$criteria->compare('num_aspecto',$this->num_aspecto,true);\n\t\t$criteria->compare('aspecto',$this->aspecto,true);\n\t\t$criteria->compare('instrumento',$this->instrumento,true);\n\t\t$criteria->compare('fuente',$this->fuente,true);\n\t\t$criteria->compare('documento',$this->documento,true);\n\t\t$criteria->compare('link',$this->link,true);\n\t\t$criteria->compare('Observaciones',$this->Observaciones,true);\n\t\t$criteria->compare('cumple',$this->cumple,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('website_url',$this->website_url,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('user_name',$this->user_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('created_datetime',$this->created_datetime,true);\n\t\t$criteria->compare('icon_src',$this->icon_src,true);\n\t\t$criteria->compare('show_r18',$this->show_r18);\n\t\t$criteria->compare('show_bl',$this->show_bl);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('creationDate',$this->creationDate,true);\n\t\t$criteria->compare('year',$this->year);\n\t\t$criteria->compare('term',$this->term,true);\n\t\t$criteria->compare('activated',$this->activated);\n\t\t$criteria->compare('startingDate',$this->startingDate,true);\n\t\t$criteria->compare('activation_userId',$this->activation_userId);\n\t\t$criteria->compare('parent_catalogId',$this->parent_catalogId);\n $criteria->compare('isProspective', $this->isProspective);\n $criteria->compare('creatorId', $this->creatorId);\n $criteria->compare('isProposed', $this->isProposed);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('FirstName',$this->FirstName,true);\n\t\t$criteria->compare('LastName',$this->LastName,true);\n\t\t$criteria->compare('location',$this->location);\n\t\t$criteria->compare('theripiest',$this->theripiest);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('gender',$this->gender,true);\n\t\t$criteria->compare('dob',$this->dob,true);\n\t\t$criteria->compare('inurancecompany',$this->inurancecompany,true);\n\t\t$criteria->compare('injurydate',$this->injurydate,true);\n\t\t$criteria->compare('therapy_start_date',$this->therapy_start_date,true);\n\t\t$criteria->compare('ASIA',$this->ASIA,true);\n\t\t$criteria->compare('injury',$this->injury,true);\n\t\t$criteria->compare('medication',$this->medication,true);\n\t\t$criteria->compare('notes',$this->notes,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search () {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('formId', $this->formId, true);\n\t\t$criteria->compare('data', $this->data, true);\n\t\t$criteria->compare('ctime', $this->ctime);\n\t\t$criteria->compare('mtime', $this->mtime);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t 'criteria' => $criteria,\n\t\t ));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('imputetype_id',$this->imputetype_id);\n\t\t$criteria->compare('project_id',$this->project_id);\n\n\t\treturn new ActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('category_id',$this->category_id);\n\t\t$criteria->compare('amount',$this->amount);\n\t\t$criteria->compare('price_z',$this->price_z);\n\t\t$criteria->compare('price_s',$this->price_s);\n\t\t$criteria->compare('price_m',$this->price_m);\n\t\t$criteria->compare('dependence',$this->dependence,true);\n\t\t$criteria->compare('barcode',$this->barcode,true);\n\t\t$criteria->compare('unit',$this->unit,true);\n\t\t$criteria->compare('minimal_amount',$this->minimal_amount);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array('pageSize' => 100),\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('image',$this->image,true);\n\t\t$criteria->compare('manager',$this->manager);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('realname',$this->realname,true);\n\t\t$criteria->compare('identity',$this->identity,true);\n\t\t$criteria->compare('mobile',$this->mobile,true);\n\t\t$criteria->compare('bussiness_license',$this->bussiness_license,true);\n\t\t$criteria->compare('bankcode',$this->bankcode,true);\n\t\t$criteria->compare('banktype',$this->banktype,true);\n\t\t$criteria->compare('is_open',$this->is_open,true);\n\t\t$criteria->compare('introduction',$this->introduction,true);\n\t\t$criteria->compare('images_str',$this->images_str,true);\n\t\t$criteria->compare('gmt_created',$this->gmt_created,true);\n\t\t$criteria->compare('gmt_modified',$this->gmt_modified,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('id_user',$this->id_user);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email_admin',$this->email_admin,true);\n\t\t$criteria->compare('password_api',$this->password_api,true);\n\t\t$criteria->compare('url_result_api',$this->url_result_api,true);\n\t\t$criteria->compare('id_currency_2',$this->id_currency_2);\n\t\t$criteria->compare('id_currency_1',$this->id_currency_1,true);\n\t\t$criteria->compare('is_test_mode',$this->is_test_mode);\n\t\t$criteria->compare('is_commission_shop',$this->is_commission_shop);\n\t\t$criteria->compare('commission',$this->commission);\n\t\t$criteria->compare('is_enable',$this->is_enable);\n\t\t$criteria->compare('is_active',$this->is_active);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('mod_date',$this->mod_date,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID,true);\n\t\t$criteria->compare('userID',$this->userID,true);\n\t\t$criteria->compare('mtID',$this->mtID,true);\n\t\t$criteria->compare('fxType',$this->fxType);\n\t\t$criteria->compare('leverage',$this->leverage);\n\t\t$criteria->compare('amount',$this->amount,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t/*\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('percent_discount',$this->percent_discount,true);\n\t\t$criteria->compare('taxable',$this->taxable);\n\t\t$criteria->compare('id_user_created',$this->id_user_created);\n\t\t$criteria->compare('id_user_modified',$this->id_user_modified);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_modified',$this->date_modified,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t*/\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('surname',$this->surname,true);\n\t\t$criteria->compare('comany_name',$this->comany_name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('uuid',$this->uuid,true);\n\t\t$criteria->compare('is_admin',$this->is_admin);\n\t\t$criteria->compare('paid_period_start',$this->paid_period_start,true);\n\t\t$criteria->compare('ftp_pass',$this->ftp_pass,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('price',$this->price,true);\n\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('breed',$this->breed,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('date_birthday',$this->date_birthday,true);\n\t\t$criteria->compare('sex',$this->sex,true);\n\t\t$criteria->compare('color',$this->color,true);\n\t\t$criteria->compare('tattoo',$this->tattoo,true);\n\t\t$criteria->compare('sire',$this->sire,true);\n\t\t$criteria->compare('dame',$this->dame,true);\n\t\t$criteria->compare('owner_type',$this->owner_type,true);\n\t\t$criteria->compare('honors',$this->honors,true);\n\t\t$criteria->compare('photo_preview',$this->photo_preview,true);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('pet_status',$this->pet_status,true);\n\t\t$criteria->compare('about',$this->about,true);\n\t\t$criteria->compare('uid',$this->uid);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('veterinary',$this->veterinary,true);\n\t\t$criteria->compare('vaccinations',$this->vaccinations,true);\n\t\t$criteria->compare('show_class',$this->show_class,true);\n\t\t$criteria->compare('certificate',$this->certificate,true);\n $criteria->compare('neutered_spayed',$this->certificate,true);\n \n\n $criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('city',$this->city,true);\n\n \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('HISTORY',$this->HISTORY,true);\n\t\t$criteria->compare('WELCOME_MESSAGE',$this->WELCOME_MESSAGE,true);\n\t\t$criteria->compare('LOCATION',$this->LOCATION,true);\n\t\t$criteria->compare('PHONES',$this->PHONES,true);\n\t\t$criteria->compare('FAX',$this->FAX,true);\n\t\t$criteria->compare('EMAIL',$this->EMAIL,true);\n\t\t$criteria->compare('MISSION',$this->MISSION,true);\n\t\t$criteria->compare('VISION',$this->VISION,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('company_id', Yii::app()->user->company_id);\n $criteria->compare('zone_id', $this->zone_id, true);\n $criteria->compare('low_qty_threshold', $this->low_qty_threshold);\n $criteria->compare('high_qty_threshold', $this->high_qty_threshold);\n $criteria->compare('created_date', $this->created_date, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('updated_date', $this->updated_date, true);\n $criteria->compare('updated_by', $this->updated_by, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('orgName',$this->orgName,true);\n\t\t$criteria->compare('noEmp',$this->noEmp);\n\t\t$criteria->compare('phone',$this->phone);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('addr1',$this->addr1,true);\n\t\t$criteria->compare('addr2',$this->addr2,true);\n\t\t$criteria->compare('state',$this->state,true);\n\t\t$criteria->compare('country',$this->country,true);\n\t\t$criteria->compare('orgType',$this->orgType,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('fax',$this->fax);\n\t\t$criteria->compare('orgId',$this->orgId,true);\n\t\t$criteria->compare('validity',$this->validity);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n $criteria->with=array('c','b');\n\t\t$criteria->compare('pid',$this->pid,true);\n\t\t$criteria->compare('t.cid',$this->cid,true);\n\t\t$criteria->compare('t.bid',$this->bid,true);\n\n $criteria->compare('c.classify_name',$this->classify,true);\n\t\t$criteria->compare('b.brand_name',$this->brand,true);\n \n $criteria->addCondition('model LIKE :i and model REGEXP :j');\n $criteria->params[':i'] = \"%\".$this->index_search.\"%\";\n $criteria->params[':j'] = \"^\".$this->index_search;\n\n \n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('package',$this->package,true);\n\t\t$criteria->compare('RoHS',$this->RoHS,true);\n\t\t$criteria->compare('datecode',$this->datecode,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('direction',$this->direction,true);\n $criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('category',$this->category,true);\n\t\t$criteria->compare('sortorder',$this->sortorder,true);\n\t\t$criteria->compare('fullname',$this->fullname,true);\n\t\t$criteria->compare('shortname',$this->shortname,true);\n\t\t$criteria->compare('idnumber',$this->idnumber,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('summaryformat',$this->summaryformat);\n\t\t$criteria->compare('format',$this->format,true);\n\t\t$criteria->compare('showgrades',$this->showgrades);\n\t\t$criteria->compare('sectioncache',$this->sectioncache,true);\n\t\t$criteria->compare('modinfo',$this->modinfo,true);\n\t\t$criteria->compare('newsitems',$this->newsitems);\n\t\t$criteria->compare('startdate',$this->startdate,true);\n\t\t$criteria->compare('marker',$this->marker,true);\n\t\t$criteria->compare('maxbytes',$this->maxbytes,true);\n\t\t$criteria->compare('legacyfiles',$this->legacyfiles);\n\t\t$criteria->compare('showreports',$this->showreports);\n\t\t$criteria->compare('visible',$this->visible);\n\t\t$criteria->compare('visibleold',$this->visibleold);\n\t\t$criteria->compare('groupmode',$this->groupmode);\n\t\t$criteria->compare('groupmodeforce',$this->groupmodeforce);\n\t\t$criteria->compare('defaultgroupingid',$this->defaultgroupingid,true);\n\t\t$criteria->compare('lang',$this->lang,true);\n\t\t$criteria->compare('theme',$this->theme,true);\n\t\t$criteria->compare('timecreated',$this->timecreated,true);\n\t\t$criteria->compare('timemodified',$this->timemodified,true);\n\t\t$criteria->compare('requested',$this->requested);\n\t\t$criteria->compare('enablecompletion',$this->enablecompletion);\n\t\t$criteria->compare('completionnotify',$this->completionnotify);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('email',$this->email,true);\n\t\t$criteria->compare('password',$this->password,true);\n\t\t$criteria->compare('address',$this->address,true);\n\t\t$criteria->compare('zipcode',$this->zipcode,true);\n\t\t$criteria->compare('city',$this->city,true);\n\t\t$criteria->compare('phone',$this->phone,true);\n\t\t$criteria->compare('role',$this->role,true);\n\t\t$criteria->compare('active',$this->active);\n\t\t$criteria->compare('camaras',$this->camaras);\n\t\t$criteria->compare('freidoras',$this->freidoras);\n\t\t$criteria->compare('cebos',$this->cebos);\n\t\t$criteria->compare('trampas',$this->trampas);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('cod_venda',$this->cod_venda,true);\n\t\t$criteria->compare('filial_cod_filial',$this->filial_cod_filial,true);\n\t\t$criteria->compare('funcionario_cod_funcionario',$this->funcionario_cod_funcionario,true);\n\t\t$criteria->compare('cliente_cod_cliente',$this->cliente_cod_cliente,true);\n\t\t$criteria->compare('data_2',$this->data_2,true);\n\t\t$criteria->compare('valor_total',$this->valor_total);\n\t\t$criteria->compare('forma_pagamento',$this->forma_pagamento,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('attribute',$this->attribute,true);\n\t\t$criteria->compare('displayName',$this->displayName,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('value_type',$this->value_type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('sex', $this->sex);\n $criteria->compare('mobile', $this->mobile, true);\n $criteria->compare('idcard', $this->idcard, true);\n $criteria->compare('password', $this->password, true);\n $criteria->compare('place_ids', $this->place_ids, true);\n $criteria->compare('depart_id', $this->depart_id);\n $criteria->compare('bank', $this->bank, true);\n $criteria->compare('bank_card', $this->bank_card, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('education', $this->education, true);\n $criteria->compare('created', $this->created);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('state', $this->state);\n $criteria->compare('type','0');\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->buscar,'OR');\n\t\t$criteria->compare('fecha',$this->buscar,true,'OR');\n\t\t$criteria->compare('fechaUpdate',$this->buscar,true,'OR');\n\t\t$criteria->compare('idProfesional',$this->buscar,'OR');\n\t\t$criteria->compare('importe',$this->buscar,'OR');\n\t\t$criteria->compare('idObraSocial',$this->buscar,'OR');\n\t\t$criteria->compare('estado',$this->buscar,true,'OR');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('codop',$this->codop,true);\n\t\t$criteria->compare('codcatval',$this->codcatval,true);\n\t\t$criteria->compare('cuentadebe',$this->cuentadebe,true);\n\t\t$criteria->compare('cuentahaber',$this->cuentahaber,true);\n\t\t$criteria->compare('desop',$this->desop,true);\n\t\t$criteria->compare('descat',$this->descat,true);\n\t\t$criteria->compare('debe',$this->debe,true);\n\t\t$criteria->compare('haber',$this->haber,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array('pagesize'=>100),\n\t\t));\n\t}" ]
[ "0.7212991", "0.7135867", "0.70942134", "0.70935535", "0.69856966", "0.6960888", "0.69482577", "0.6942018", "0.69338185", "0.69240516", "0.69100815", "0.69031453", "0.68983656", "0.68976563", "0.6892922", "0.6882718", "0.6879821", "0.6874269", "0.68497974", "0.68492067", "0.6836127", "0.6826264", "0.6815781", "0.6806842", "0.68037224", "0.6797402", "0.679647", "0.67956775", "0.67953897", "0.6793928", "0.67899936", "0.6785723", "0.6784934", "0.67838705", "0.6781113", "0.6780703", "0.6778745", "0.6777626", "0.6776748", "0.67762333", "0.6775519", "0.6775519", "0.6775519", "0.6775519", "0.6775519", "0.6775519", "0.6775519", "0.6775519", "0.6772856", "0.6768679", "0.67670584", "0.6766211", "0.6762727", "0.6762284", "0.6760905", "0.6760262", "0.6758775", "0.6758663", "0.6753547", "0.67534685", "0.67516536", "0.6748227", "0.6747931", "0.6746244", "0.6745516", "0.6744977", "0.6744589", "0.67440224", "0.6743839", "0.6743654", "0.67421937", "0.67410326", "0.67405576", "0.67390203", "0.6737142", "0.6736754", "0.67347586", "0.67322934", "0.6731216", "0.67254686", "0.672304", "0.6722451", "0.6722028", "0.67130125", "0.67126656", "0.6710855", "0.67088246", "0.67067605", "0.67057335", "0.6705662", "0.67033815", "0.6702869", "0.67006725", "0.6698115", "0.6696619", "0.6695382", "0.6695176", "0.6693123", "0.6693067", "0.6692967", "0.6691494" ]
0.0
-1
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\r\n return parent::model($className);\r\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.7574961", "0.75288117", "0.7273077", "0.72722304", "0.72634643", "0.7216278", "0.72158116", "0.7133548", "0.71305466", "0.71305466", "0.71042204", "0.71042204", "0.7104154", "0.70763636", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985", "0.7065985" ]
0.0
-1
Public Function Data reindex by keys
public static function indexBy(& $data, $keys, $obj2array = false) { // Refactor Array $data structure by $keys return self::_refactorBy($data, $keys, $obj2array, $type = 'indexBy'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function reindex()\n\t{\n\t\t// rebuild the ordered collection\n\t\t$results = array();\n\t\tforeach ($this->_data as $old => $record)\n\t\t{\n\t\t\t$key = $record->{$this->_keyfield};\n\t\t\t$results[$key] = $record;\n\t\t}\n\t\t// sort the collection\n\t\tksort($results);\n\t\t// remember the new collection\n\t\t$this->_data = $results;\n\t\t// reset the cursor\n\t\treset($this->_data);\n\t}", "public function reindex();", "private function rebuildIndex()\n {\n foreach ($this->rows as $id => $row) {\n $label = $row->getColumn('label');\n if ($label !== false) {\n $this->rowsIndexByLabel[$label] = $id;\n }\n }\n $this->indexNotUpToDate = false;\n }", "function change_index(&$tableau, $old_key, $new_key) {\n $changed = FALSE; $temp = 0;\n \n foreach ($tableau as $key => $value) {\n switch ($changed) {\n case FALSE :\n //creates the new key and deletes the old\n if ($key == $old_key) {\n $tableau[$new_key] = $tableau[$old_key];\n unset($tableau[$old_key]);\n $changed = TRUE;\n }\n break;\n\n case TRUE :\n //moves following keys\n if ($key != $new_key){\n $temp= $tableau[$key];\n unset($tableau[$key]);\n $tableau[$key] = $temp;\n break;\n } else {$changed = FALSE;} //stop\n }\n }\n array_values($tableau); //free_memory\n}", "public function reindexAll()\n {\n }", "protected function resetIndex($key)\n {\n if (!array_key_exists($key, $this->mappedData)) {\n $this->index = 0;\n }\n }", "function reindex ()\n {\n $this->A = array_values ($this->A);\n return $this;\n }", "public function rebuildIndex( array $items = [] );", "public function reindexAll()\n {\n $this->_getIndexer()->rebuildIndex();\n }", "public function rebuildIndex()\n {\n $this->elastic->deleteIndex(self::INDEX);\n $this->elastic->addIndexCompanion(self::INDEX);\n }", "public function reIndex() {\n $index = collect([]);\n // Loop through each of the hydrated fields\n $this->getHydrated()->each(function($field,$k) use ($index) {\n // Pass each field through the toPath process\n $field->toPath($index);\n });\n // Replace the current index value\n $this->index = $index;\n // Return for chaining\n return $this;\n }", "function reset_keys($data) {\n\t$new_arr = array();\n\tforeach($data as $key=>$value) {\n\t\t$new_arr[] = $value;\n\t}\n\treturn $new_arr;\n}", "function quiz_report_index_by_keys($datum, $keys, $keysunique=true){\n if (!$datum){\n return $datum;\n }\n $key = array_shift($keys);\n $datumkeyed = array();\n foreach ($datum as $data){\n if ($keys || !$keysunique){\n $datumkeyed[$data->{$key}][]= $data;\n } else {\n $datumkeyed[$data->{$key}]= $data;\n }\n }\n if ($keys){\n foreach ($datumkeyed as $datakey => $datakeyed){\n $datumkeyed[$datakey] = quiz_report_index_by_keys($datakeyed, $keys, $keysunique);\n }\n }\n return $datumkeyed;\n}", "function resetKeys() {\n $this->keys = array_keys($this->records);\n }", "public function triggerReindex()\n {\n if (!$this->owner->ID) {\n return;\n }\n\n $id = $this->owner->ID;\n $class = $this->owner->ClassName;\n $state = SearchVariant::current_state($class);\n $base = DataObject::getSchema()->baseDataClass($class);\n $key = \"$id:$base:\" . serialize($state);\n\n $statefulids = array(array(\n 'id' => $id,\n 'state' => $state\n ));\n\n $writes = array(\n $key => array(\n 'base' => $base,\n 'class' => $class,\n 'id' => $id,\n 'statefulids' => $statefulids,\n 'fields' => array()\n )\n );\n\n SearchUpdater::process_writes($writes);\n }", "protected function regenerateKeyCache()\n {\n if(is_array($this->__data))\n {\n $i=0;\n $this->__keycache = array();\n $this->__keycacheindex = array();\n foreach($this->__data as $key => $value)\n {\n $this->__keycache[$key] = $i;\n $this->__keycacheindex[$i] = $key;\n $i++;\n }\n }\n else\n {\n $this->__keycache = null;\n $this->__keycacheindex = null;\n }\n\n $this->__keycacheinvalid = false;\n }", "protected function doReindexFull()\n {\n foreach ($this->getAllRules() as $rule) {\n $this->updateRuleProductData($rule);\n $this->categoryProductReindexRow($rule->getId());\n }\n }", "protected static function _refactorBy(& $data, $keys, $obj2array = false, $type = 'index')\n {\n // 參數處理\n $keys = (array) $keys;\n \n $result = [];\n \n // 遍歷待處理陣列\n foreach ($data as $row) {\n // 旗標,是否取得索引\n $getIndex = false;\n // 位置初炲化 - 傳址\n $rRefer = & $result;\n // 可用的index清單\n $indexs = [];\n \n // 遍歷$keys陣列 - 建構索引位置\n foreach ($keys as $key) {\n $vKey = null;\n \n // 取得索引資料 - 從$key\n if (is_object($row) && isset($row->{$key})) {\n $vKey = $row->{$key};\n } elseif (is_array($row) && isset($row[$key])) {\n $vKey = $row[$key];\n }\n \n // 有無法取得索引資料,跳出\n if (is_null($vKey)) {\n $getIndex = false;\n break;\n }\n \n // 記錄可用的index\n $indexs[] = $vKey;\n \n // 本次索引完成\n $getIndex = true;\n }\n \n // 略過無法取得索引或索引不完整的資料\n if (! $getIndex) {\n continue;\n }\n \n // 變更位置 - 傳址\n foreach ($indexs as $idx) {\n $rRefer = & $rRefer[$idx];\n }\n \n // 將資料寫入索引位置\n switch ($type) {\n case 'index':\n case 'indexBy':\n default:\n $rRefer = $obj2array ? (array) $row : $row;\n break;\n case 'group':\n case 'groupBy':\n $rRefer[] = $obj2array ? (array) $row : $row;\n break;\n case 'indexOnly':\n case 'noData':\n $rRefer = '';\n break;\n }\n }\n \n return $data = $result;\n }", "abstract public function wipeIndex();", "public function reindex() {\n if (!$this->server || $this->read_only) {\n return TRUE;\n }\n _search_api_index_reindex($this);\n module_invoke_all('search_api_index_reindex', $this, FALSE);\n return TRUE;\n }", "public function reindex(callable $callback): NonEmptyMap;", "public function reindexSearchData(\\Closure $onUpdate = null)\n {\n $db = new SearchDomainDatabase($this->name);\n $db->initialize();\n if ($onUpdate) {\n $db->onUpdate($onUpdate);\n }\n $db->recordData(true);\n }", "public function reindex(&$parentArray=array()) {\n\n\t\t$this->load->model(\"search_model\");\n\n\t\tif(count($parentArray)>5 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->buildCache();\n\n\t\t$this->search_model->addOrUpdate($this);\n\t\t// now find any related items and resave them.\n\t\t//\n\t\t// we build a parent array so we don't recurse\n\n\t\t// we might be rebuilding outside an instance, in which case we don't do this.\n\t\tif(!$this->instance) {\n\t\t\treturn;\n\t\t}\n\t\t$results = $this->search_model->find([\"searchText\"=>$this->getObjectId(), \"searchRelated\"=>true], false);\n\t\t$parentArray[] = $this->getObjectId();\n\n\t\tforeach($results[\"searchResults\"] as $result) {\n\t\t\tif(!in_array($result, $parentArray)) {\n\t\t\t\techo \"subIndex: \" . $result . \"\\n\";\n\t\t\t\t// $this->logging->logError(\"updating\", $result);\n\t\t\t\t$tempAsset = new Asset_model();\n\t\t\t\t$tempAsset->loadAssetById($result);\n\t\t\t\t$tempAsset->reindex($parentArray);\n\t\t\t\tif($this->config->item('enableCaching')) {\n\t\t\t\t\t$this->doctrineCache->setNamespace('searchCache_');\n\t\t\t\t\t$this->doctrineCache->delete($this->getObjectId());\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t}", "function jr_reset_data( $data ) {\r\n\r\n\t$new_data = array();\r\n\tforeach ( $data as $key => $value )\r\n\t\t$new_data[$key] = reset($value);\r\n\r\n\treturn $new_data;\r\n}", "public function reindexAction()\n {\n $form = Ot_Form_Template::delete('reindex', 'search-index-reindex:reindex');\n \n if ($this->_request->isPost() && $form->isValid($_POST)) {\n set_time_limit(0);\n \n $workshop = new Workshop();\n \n $workshops = $workshop->fetchAll();\n \n foreach ($workshops as $w) {\n $workshop->index($w);\n }\n \n $this->_helper->flashMessenger->addMessage('msg-info-reindexed');\n \n $this->_redirect('/');\n \n }\n \n $this->view->form = $form;\n $this->_helper->pageTitle('search-index-reindex:title');\n }", "protected function setCanonicalIndex(): void\n {\n $got = $this->redisConn->hget($this->index, IndexInterface::STRUCTURE);\n $data = (null === $got) ? [] : $this->unser($got);\n if (empty($data)) { // just fill-in new index data\n $data[$this->index] = [\n IndexInterface::ALIASES => [],\n ];\n $this->setMappings($data);\n $this->redisConn->hset($this->index, IndexInterface::STRUCTURE, $this->ser($data));\n } else if (empty($this->indexType) === false\n && empty($data[$this->index][IndexInterface::MAPPINGS][$this->indexType])\n ) {// check for type and update if there is no alike\n $this->setMappings($data);\n $this->redisConn->hset($this->index, IndexInterface::STRUCTURE, $this->ser($data));\n } else { // setting new fields with whitespace type by default\n $this->setMappings($data, true);\n if (true === $this->isNewField) {\n $this->redisConn->hset($this->index, IndexInterface::STRUCTURE, $this->ser($data));\n }\n }\n }", "function dmindex($array, $keys, $preserve_keys = false, $default = null)\n{\n $out = array();\n foreach ($keys as $key) {\n if ($preserve_keys) {\n $out[$key] = dindex($array, $key, $default);\n } else {\n $out[] = dindex($array, $key, $default);\n }\n }\n return $out;\n}", "public function reindex($request)\n {\n return $this->start()->uri(\"/api/system/reindex\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function reindex()\n {\n $this->removeIndex();\n\n return $this->index();\n }", "public function reindex(): static\n {\n $this->iterator = Iterators::reindex($this->iterator);\n return $this;\n }", "public function esReindex()\n {\n $this->esDelete();\n return $this->esIndex();\n }", "function array_reindex(&$array_A) {\n\t$i = 0;\n\tforeach ($array_A as $key_A => $value_A) {\n\t\t$array_B[$i] = $value_A;\n\t\tunset($array_A[$key_A]);\n\t\t$i++;\n\t}\n\treturn $array_B;\n}", "public function reindexAll()\n {\n\n //@todo: indexers should be dynamically injected. Probable via `$this->getIndeces()`\n /** @var St_SphinxSearch_Model_Fulltext $fulltextIndex */\n $fulltextIndex = Mage::getModel('st_sphinxsearch/fulltext');\n\n $fulltextIndex->rebuildIndex();\n\n return;\n /** @var Mage_Core_Model_Resource $resourceSingleton */\n $resourceSingleton = Mage::getSingleton('core/resource');\n\n /** @var Varien_Db_Adapter_Interface $writeAdapater */\n $writeAdapater = $resourceSingleton->getConnection('core_write');\n\n /** @var Varien_Db_Adapter_Interface $readAdapter */\n $readAdapter = $resourceSingleton->getConnection('core_read');\n\n /** @var string $tableName */\n $tableName = $readAdapter->getTableName('st_sphinxsearch_fulltext_tmp');\n\n /** @var Mage_CatalogSearch_Model_Resource_Indexer_Fulltext $indexerFulltext */\n $indexerFulltext = Mage::getResourceModel('catalogsearch/indexer_fulltext');\n\n $fulltextTableName = $indexerFulltext->getTable('fulltext');\n\n $sql = \"CREATE TABLE IF NOT EXISTS `$tableName` LIKE `$fulltextTableName`\";\n\n $writeAdapater->query($sql);\n $t=1;\n }", "public static function reindex(array $data, array $correspondances) {\n\t\t$result = $data;\n\n\t\tforeach ($correspondances as $from => $to) {\n\t\t\tif (isset($data[$from])) {\n\t\t\t\t$result[$to] = $data[$from];\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function index_put(){\n\t\t\n\t\t}", "protected function store()\n\t{\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t\t//---------------------\n\t\t// Your code goes here\n\t\t// --------------------\n\t}", "public function resetUpdateIndex()\n {\n $this->resetIndex(\n ExtconfService::getInstance()->getUpdateIndex()\n );\n }", "public function refreshData($keyArr = null)\n {\n if ($this->offsetSize() > 0) {\n $_data = [];\n $offsets = $this->getOffsets();\n\n foreacH ($offsets as $key => $item) {\n $_data[(!is_null($keyArr) ? (isset($item[$keyArr]) ? $item[$keyArr] : $key) : $key)] = $item;\n }\n\n if (!empty($_data)) {\n $this->clearOffsets();\n $i = 0;\n foreach ($_data as $key => $item) {\n $this->offsetSet($i, $item);\n $i++;\n }\n\n if ($this->offsetSize() > 0) {\n $this->_isRefreshing = true;\n }\n }\n }\n\n return $this;\n }", "public function reindex()\n {\n return new static(array_values($this->elements));\n }", "public function arrayMergeKeepsIndexesAfterMerge() {}", "public static function reindex()\n {\n $slides = Slide::isActive()->inOrder()->get();\n\n $position = 1;\n foreach ($slides as $slide) {\n // Index the slide position\n $slide->position = $position;\n\n // Unset validation rules, and avoid a reindex loop\n $slide->rules = [];\n $slide->reindex = false;\n\n // Save the slide\n $position++;\n $slide->save();\n }\n }", "public function resetData();", "public static function indexOnly(& $data, $keys, $obj2array = false)\n {\n // Refactor Array $data structure by $keys\n return self::_refactorBy($data, $keys, $obj2array, $type = 'indexOnly');\n }", "function updateIndex($index) {\n if (!is_string($index)) throw new IllegalTypeException('Illegal type of parameter $index: '.getType($index));\n if (!strLen($index)) throw new InvalidArgumentException('Invalid parameter $index: \"\"');\n\n global $verbose, $indexes, $saveRawXTradeData;\n\n // (1) Starttag der benoetigten Daten ermitteln\n $startTime = 0;\n $pairs = array_flip($indexes[$index]); // ['AUDUSD', ...] => ['AUDUSD'=>null, ...]\n foreach($pairs as $pair => &$data) {\n $data = []; // $data initialisieren: ['AUDUSD'=>[], ...]\n $startTime = max($startTime, XTrade::$symbols[$pair]['historyStart']['M1']); // GMT-Timestamp\n } unset($data);\n $startTime = fxtTime($startTime);\n $startDay = $startTime - $startTime%DAY; // 00:00 Starttag FXT\n $today = ($today=fxtTime()) - $today%DAY; // 00:00 aktueller Tag FXT\n\n\n // (2) Gesamte Zeitspanne tageweise durchlaufen\n for ($day=$startDay, $lastMonth=-1; $day < $today; $day+=1*DAY) {\n\n if (!isFxtWeekend($day, 'FXT')) { // ausser an Wochenenden\n $shortDate = gmDate('D, d-M-Y', $day);\n\n // Pruefen, ob die History bereits existiert\n if (is_file($file=getVar('fxiTarget.compressed', $index, $day))) {\n if ($verbose > 1) echoPre('[Ok] '.$shortDate.' '.$index.' compressed history file: '.baseName($file));\n }\n else if (is_file($file=getVar('fxiTarget.raw', $index, $day))) {\n if ($verbose > 1) echoPre('[Ok] '.$shortDate.' '.$index.' raw history file: '.baseName($file));\n }\n else {\n $month = (int) gmDate('m', $day);\n if ($month != $lastMonth) {\n echoPre('[Info] '.$index.' '.gmDate('M-Y', $day));\n $lastMonth = $month;\n }\n\n // History aktualisieren: M1-Bars der benoetigten Instrumente dieses Tages einlesen\n foreach($pairs as $pair => $data) {\n if (is_file($file=getVar('fxiSource.compressed', $pair, $day))) {} // komprimierte oder\n else if (is_file($file=getVar('fxiSource.raw' , $pair, $day))) {} // unkomprimierte XTrade-Datei\n else {\n echoPre('[Error] '.$pair.' history for '.$shortDate.' not found');\n return false;\n }\n // M1-Bars zwischenspeichern\n $pairs[$pair]['bars'] = XTrade::readBarFile($file, $pair); // ['AUDUSD'=>array('bars'=>[]), ...]\n }\n\n // Indexdaten fuer diesen Tag berechnen\n $function = 'calculate'.$index;\n $fxiBars = $function($day, $pairs); if (!$fxiBars) return false;\n\n // Indexdaten speichern\n if (!saveBars($index, $day, $fxiBars)) return false;\n }\n }\n if (!WINDOWS) pcntl_signal_dispatch(); // Auf Ctrl-C pruefen, um bei Abbruch die Destruktoren auszufuehren.\n }\n\n echoPre('[Ok] '.$index);\n return true;\n}", "public function reindex($configurationKey, $tableName, $uid)\n {\n $this->removeInvalidConfigurationIndex();\n $this->removeInvalidRecordIndex($tableName);\n $this->updateIndex($configurationKey, $tableName, $uid);\n }", "public function getData($key = '', $index = null);", "public function reindexSearchDataElement(SmartElement $se)\n {\n $db = new SearchDomainDatabase($this->name);\n $db->updateSmartElement($se);\n }", "public static function reset_keys_array($array,$key)\r\n {\r\n if (isset($array[$key])) {\r\n $array[$key] = array_values($array[$key]);\r\n }\r\n return $array;\r\n }", "public function simpleReindex($rows): array\n {\n if (empty($rows)) {\n return [];\n }\n\n // Reindex $rows by this model's primary key and inject related items\n $return = [];\n\n foreach ($rows as $item) {\n // Handle array return types\n $id = is_array($item) ? $item[$this->primaryKey] ?? null : $item->{$this->primaryKey} ?? null;\n\n // If no primary key or an entry already existed then return it as is\n // Probably the former is custom select() and the latter is a join()\n if (empty($id) || isset($return[$id])) {\n return $rows;\n }\n $return[$id] = $item;\n }\n\n return $return;\n }", "public function setKeys($data)\r\n\t{\r\n\t\tforeach ($data as $key => $value)\r\n\t\t\t$this->keys[$key]->data = $value;\r\n\t\treturn $this;\r\n\t}", "public static function change_arrayKeys($data, $new_keys)\n {\n $result = array();\n foreach ($data as $row) {\n foreach ($new_keys as $key => $value) {\n $row = self::change_key($row, $key, $value);\n }\n $result[] = $row;\n }\n return $result;\n }", "function get_table_indexes($db, $table, $cnx='', $reload=false, $mode='mysql'){\n\tif($mode!=='mysql') exit('only mysql index mode developed');\n\tglobal $get_table_indexes, $dbTypeArray;\n\tif(!$cnx)$cnx=C_MASTER;\n\tif($get_table_indexes[$db][$table] && !$reload){\n\t\treturn $get_table_indexes[$db][$table];\n\t}else{\n\t\t$fl=__FILE__;\n\t\t$ln=__LINE__+1;\n\t\tob_start();\n\t\t$result=q(\"SHOW INDEXES FROM `$db`.`$table`\", $cnx, ERR_ECHO, O_DO_NOT_REMEDIATE);\n\t\t$err=ob_get_contents();\n\t\tob_end_clean();\n\t\tif($err)return false;\n\t\t\n\t\t$typeFlip = array_flip($dbTypeArray);\n\t\t$inCompound=false;\n\t\twhile($v=mysqli_fetch_array($result,MYSQLI_ASSOC)){\n\t\t\t$w++;\n\t\t\t@extract($v);\n\t\t\tif($buffer==$Key_name){\n\t\t\t\t//duplicate part of a key\n\t\t\t\tif(!$inCompound){\n\t\t\t\t\t$multiIdx[$Key_name][]=$singleIdx[count($singleIdx)-1];\n\t\t\t\t\tunset($singleIdx[count($singleIdx)-1]);\n\t\t\t\t\t//next two lines overcome \"bug\" in php: just cause I unset the highest element, this will not reset the next index assigned when I say $singleIdx[]=.. later on.\n\t\t\t\t\t$clr=$singleIdx;\n\t\t\t\t\t$singleIdx=$clr;\n\t\t\t\t}\n\t\t\t\t$multiIdx[$Key_name][]=$v;\n\t\t\t\t$inCompound=true;\n\t\t\t}else{\n\t\t\t\t$singleIdx[]=$v;\n\t\t\t\t$buffer=$Key_name;\n\t\t\t\t$inCompound=false;\n\t\t\t}\n\t\t}\n\t\t//set $singleIdx as assoc for reference\n\t\tif(count($singleIdx)){\n\t\t\tforeach($singleIdx as $v) $a[strtolower($v['Column_name'])]=$v;\n\t\t\t$singleIdx=$a;\n\t\t}\n\t\t//store compound keys as XML\n\t\tif($multiIdx){\n\t\t\t$compoundKey='';\n\t\t\tforeach($multiIdx as $n=>$v){\n\t\t\t\t$ci.='<compoundKey Key_name=\"'.$n.'\" Column_count=\"'.count($v).'\"';\n\t\t\t\t$i=0;\n\t\t\t\tforeach($v as $w){\n\t\t\t\t\t$i++;\n\t\t\t\t\tif($i==1)$ci.=' Non_unique=\"'.$w['Non_unique'].'\">'.\"\\n\";\n\t\t\t\t\t$ci.='<keyColumn Seq_in_index=\"'.$w['Seq_in_index'].'\" Column_name=\"'.$w['Column_name'].'\" Sub_part=\"'.$w['Sub_part'].'\" Comment=\"'.htmlentities($w['Comment']).'\">'.\"\\n\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$ci.='</compoundKey>';\n\t\t\t}\n\t\t}\n\t\t$get_table_indexes[$db][$table]=array('singleIdx'=>$singleIdx, 'multiIdx'=>$multiIdx, 'compoundXML'=>$ci);\n\t\treturn $get_table_indexes[$db][$table];\n\t}\n}", "private function resetIndex()\n\t{\n\t\t// remove any non-existant links\n\t\t$sql = sprintf('DELETE FROM crawl_index WHERE last_update < \"%s\"', date('Y-m-d H:i:s', strtotime('-2 weeks')));\n\t\tmysql_query($sql, $this->db);\n\n\t\t// update all inbound link counters to 1\n\t\tmysql_query('UPDATE crawl_index SET `count` = 1');\n\n\t\t// optimize the table due to the deletions\n\t\tmysql_query('OPTIMIZE TABLE crawl_index');\n\t}", "public function resetIndex()\n {\n $this->setIndex(0);\n }", "function array_reindex($array)\n{\n if (array_values($array) === $array) {\n $array = array_flip($array);\n }\n\n return $array;\n}", "public function reIndex() {\n $index = collect([]);\n // Loop through each of the blueprints\n $this->getBlueprints()->each(function($blueprint,$k) use ($index) {\n // Pass each blueprint through the to reference process\n $blueprint->toReference($index);\n });\n // Replace the current index value\n $this->index = $index;\n // Return for chaining\n return $this;\n }", "private function updateAllValuesIfNeeded(&$data)\n {\n foreach ($data as $index => $value) {\n $this->updateValueIfNeeded($data, $index);\n }\n }", "function swapKeyValue($data)\n{\n $rawData = array_flip($data->toArray());\n foreach ($rawData as $key => $value) {\n $data->unset($value);\n $data->set($key, $value);\n }\n return $data;\n}", "public static function resetIndex(){\n\t\t$sql = \"TRUNCATE TABLE `documents`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t$sql = \"TRUNCATE TABLE `terms`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t$sql = \"TRUNCATE TABLE `term_documents`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t// delete all files from documents directory\n\t\tarray_map('unlink', glob('documents/' . '*.txt'));\n\t}", "public function reIndex($args, $assoc_args)\n {\n list($indexName) = $args;\n\n echo $indexName;\n\n // get registered post type\n $indexInstance = $this->get_registered_post_type($indexName);\n\n // echo $indexInstance;\n\n if( !$indexInstance ) {\n WP_CLI::error(sprintf(\"Index for post type '%s' is not a registered index.\", $indexName));\n return;\n }\n\n // run reindex\n $indexInstance->cli_reindex();\n }", "public function rotate_db_data($dbdata){\n\t\t\n\t\t$return = array();\n\t\t$count = count($dbdata);\n\t\t$firstRow = $dbdata[0];\n\n\t\tforeach($firstRow as $f => $v){\n\t\t\t\n\t\t\t// loop through each key\n\t\t\t\n\t\t\t$rowKey = array();\n\t\t\t$sum = 0;\n\t\t\tfor($i = 0; $i < $count; $i++) {\n\t\t\t\t// loop all data\n\t\t\t\t$rowKey[] = $dbdata[$i][$f];\t// add to new row key (auto increase index by 1)\n\t\t\t\t$sum += $dbdata[$i][$f];\n\t\t\t}\n\t\t\t\n\t\t\tif($sum > 0){\n\t\t\t\n\t\t\t\t$return[$f] = $rowKey;\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "public function reindexOrder($id_order)\n {\n $words = [];\n $this->db->delete(\"{$this->table}_search\", '`id_order`=' . $id_order);\n\n\n $order = new JXOneClickOrderOrders($id_order);\n $cart = new Cart($order->id_cart);\n if ($cart->id_customer != 0) {\n $customer = new CustomerCore($cart->id_customer);\n $words = array_merge($words, [\n $customer->firstname,\n $customer->lastname,\n $customer->email\n ]);\n }\n\n if ($order_info = $this->getCustomer($id_order)) {\n $words = array_merge($words, [\n $order_info['number'],\n $order_info['email'],\n $order_info['name']\n ]);\n $words = array_merge($words, Jxoneclickorder::splitString($order_info['message']));\n }\n\n if ($order->id_employee != 0) {\n $employee = new EmployeeCore($order->id_employee);\n $words = array_merge($words, [\n $employee->firstname,\n $employee->lastname,\n $employee->email,\n ]);\n }\n\n\n $words = array_merge($words, [\n $order->id_order,\n $order->id_original_order,\n $order->id_cart\n ]);\n\n $this->multiInsert($words, $id_order);\n }", "protected function invalidateIndex()\n {\n $this->labelIndexer->invalidateIndex();\n }", "protected function load()\n\t{\n\t\t//---------------------\n\t\t// Your code goes here\n\t\t// --------------------\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t}", "function update_all_keys($keys,$file){\n\t\t$this->delete_all_keys($file);\n\t\treturn $this->add_keys($keys,$file);\n\t}", "private function combineKeys()\n {\n if ($this->rows) {\n try {\n foreach ($this->rows as $key => $row) {\n array_unshift($row, $key + 1);\n $this->data[] = array_combine($this->headers, $row);\n }\n } catch (\\ErrorException $e) {\n throw new HeaderRowUnmatchedException();\n }\n }\n }", "protected function rewriteData()\n\t{\n\t\t$db = $this->getDatabase();\n\n\t\t$fields = array('someval_facebook_valid', 'someval_facebook_type', 'someval_facebook_friends_or_likes',\n\t\t\t\t\t\t'someval_twitter_valid', 'someval_twitter_tweets', 'someval_twitter_followers', 'someval_twitter_following');\n\n\t\tforeach ($this->aData AS &$elm)\n\t\t{\n\t\t\t$query = $db->getQuery(true);\n\n\t\t\t$query->update($db->qn('#__accountdata'))\n\t\t\t\t\t->where('bid = ' . $elm->bid);\n\n\t\t\tforeach ($fields as $f)\n\t\t\t{\n\t\t\t\t$query->set($db->qn($f) . ' = ' . $db->q($elm->$f));\n\t\t\t}\n\n\t\t\t$db->setQuery($query);\n\n\t\t\tif (!$db->execute())\n\t\t\t{\n\t\t\t\tLog::add('Something went wrong for bid=:' . $elm->bid);\n\t\t\t}\n\t\t}\n\t}", "public function table_index_edit ( $tname, $field, $value, $key )\n\t{\n\t}", "public function updateData(array $data);", "public function revertIndex($index, $dataType);", "public function reset(array $data);", "final public function rewind(): void\n {\n $this->sort();\n\n reset($this->index);\n }", "protected function clearIndexIfAllKeysValid(): void\n {\n if (is_null($this->index) || $this->lazyTail->valid()) {\n return;\n }\n\n $allKeysValid = true;\n\n foreach ($this->index as $safeKey => $unsafeKey) {\n if ($safeKey !== $unsafeKey) {\n $allKeysValid = false;\n break;\n }\n }\n\n if ($allKeysValid) {\n // this causes $this->areAllKeysValid() to start returning true\n $this->index = null;\n }\n }", "function rewind (){ $this->key = -1; }", "function apachesolr_index_mark_for_reindex($env_id, $entity_type = NULL) {\n foreach (entity_get_info() as $type => $entity_info) {\n if (($type == $entity_type) || ($entity_type == NULL)) {\n if (isset($entity_info['apachesolr']) && ($entity_info['apachesolr']['indexable'])) {\n $reindex_callback = apachesolr_entity_get_callback($type, 'reindex callback');\n if (!empty($reindex_callback)) {\n call_user_func($reindex_callback, $env_id);\n }\n }\n }\n }\n apachesolr_clear_last_index_position($env_id, $entity_type);\n cache_clear_all('*', 'cache_apachesolr', TRUE);\n}", "public function reCacheCustomFields() : void\n {\n foreach ($this->getAll() as $key => $value) {\n $this->setInRedis($key, $value);\n }\n }", "private function removeOldResults($key){\n\t\tSearch::where('key', '=', $key)->delete();\n\t}", "function old_tbl_set_generic_keys($arr_old_tbls)\n\t{\n\t\t$output=$arr_old_tbls;\n\t\tif(is_array($arr_old_tbls))\n\t\t{\n\t\t\t$all_tables_old_empty = array_filter($arr_old_tbls);\n\t\t\tif($all_tables_old_empty != false && !empty($all_tables_old_empty) && is_array($all_tables_old_empty))\n\t\t\t{\n\t\t\t\t$all_tables_old_new_keys=[];\n\t\t\t\tforeach($arr_old_tbls as $single_table)\n\t\t\t\t{\n\t\t\t\t\t$temp_new_keys=[];\n\t\t\t\t\t$arr_keys=array_keys($single_table);\n\t\t\t\t\t$temp_new_keys['tablename']=$single_table[$arr_keys[0]];\n\t\t\t\t\t$temp_new_keys['tablename']= strtolower($temp_new_keys['tablename']);\n\t\t\t\t\t$temp_new_keys['type']=$single_table[$arr_keys[1]];\n\t\t\t\t\t$temp_new_keys['type']= strtolower($temp_new_keys['type']);\n\t\t\t\t\tarray_push($all_tables_old_new_keys, $temp_new_keys);\n\t\t\t\t}\n\t\t\t\tif(array_filter($all_tables_old_new_keys) != false && !empty(array_filter($all_tables_old_new_keys)) && is_array(array_filter($all_tables_old_new_keys)))\n\t\t\t\t{\n\t\t\t\t\t$output=$all_tables_old_new_keys;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}", "private static function sortByKey(&$arr,&$key){\n $newArr=[];\n for($i=0;$i<count($arr);$i++){\n\n $newArr[]=$arr[$key[$i]];\n }\n $arr=$newArr;\n }", "abstract public function updateData();", "public function setData($data, $key = null);", "public function updateIndex()\n {\n if ($this->es_index_helper) {\n call_user_func($this->es_index_helper, $this);\n }\n }", "function shuffle_with_keys(&$array) \n{\n $aux = array();\n /* We work with an array of the keys */\n $keys = array_keys($array);\n /* We shuffle the keys */\n shuffle($keys);\n /* We iterate thru' the new order of the keys */\n foreach($keys as $key) {\n /* We insert the key, value pair in its new order */\n $aux[$key] = $array[$key];\n /* We remove the element from the old array to save memory */\n unset($array[$key]);\n }\n /* The auxiliary array with the new order overwrites the old variable */\n $array = $aux;\n }", "function index() \n\t{\n\t\t/* TODO: This logic can be optimized more */\n\t\t\n\t\t$datevalue = $this->_date;\n\t\t\n\t\tif($_GET['log_file'])\n\t\t\tdefine(\"log_file\", $_GET['log_file']);\n\t\t\n\t\tif($_GET['DEBUG'])\n\t\t\tdefine(\"DEBUG\", $_GET['DEBUG']);\n\n\t\t$this->log_info(log_file, \"CA replaceindex process started\");\n\t\t\n\t\t$finalArray = array ();\n\t\t\n\t\t/* Fetch list of all upcoming indexes with today as the live date */\n\t\t$totalindxxs = $this->db->getResult ( \"select * from tbl_indxx_temp where status='1' and usersignoff='1' and dbusersignoff='1' and submitted='1' and finalsignoff='1' and dateStart='\" . $datevalue . \"' \", true );\n\t\t\n\t\tif (! empty ( $indexdata )) \n\t\t{\n\t\t\tforeach ( $indexdata as $k1 => $oldindxx ) \n\t\t\t{\n\t\t\t\t$finalArray [$k1] = $oldindxx;\n\t\t\t\t\n\t\t\t\t/* Fetch the list of securities for this index */\n\t\t\t\t$oldTickers = $this->db->getResult ( \"Select * from tbl_indxx_ticker_temp where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\t\t\t\t$finalArray [$k1] ['tickers'] = $oldTickers;\n\n\t\t\t\t/* Fetch shares for this index */\n\t\t\t\t$oldShares = $this->db->getResult ( \"Select * from tbl_share_temp where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\t\t\t\t$finalArray [$k1] ['shares'] = $oldShares;\n\n\t\t\t\t/* Fetch the index value */\n\t\t\t\t$oldindxxvalue = $this->db->getResult ( \"Select * from tbl_indxx_value_temp where indxx_id ='\" . $oldindxx ['id'] . \"' order by date desc \", false, 1 );\n\t\t\t\t$finalArray [$k1] ['oldindxxvalue'] = $oldindxxvalue;\n\t\t\t\t\n\t\t\t\t/* Fetch the currency converted prices of various securities for this index */\n\t\t\t\t$oldPrices = $this->db->getResult ( \"Select * from tbl_final_price_temp where indxx_id ='\" . $oldindxx ['id'] . \"' and date='\" . $oldindxxvalue ['date'] . \"'\", true );\n\t\t\t\t$finalArray [$k1] ['prices'] = $oldPrices;\n\t\t\t\t\n\t\t\t\t/* Check if this index is listed in the delist queue */\n\t\t\t\t$delistReq = $this->db->getResult ( \"Select * from tbl_delist_tempindex_req where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\t\t\t\t$delistArray = array ();\n\n\t\t\t\tif (! empty ( $delistReq )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $delistReq as $k2 => $delisting ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$delistArray [$k2] = $delisting;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$delistSec = $this->db->getResult ( \"Select * from tbl_delist_tempsecurity where indxx_id ='\" . $delisting ['indxx_id'] . \"' and req_id='\" . $delisting ['id'] . \"'\", true );\n\t\t\t\t\t\t$delistArray [$k2] ['security'] = $delistSec;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$finalArray [$k1] ['delisting'] = $delistArray;\n\t\t\t\t\n\t\t\t\t// //Replace Security\n\t\t\t\t$replaceReq = $this->db->getResult ( \"Select * from tbl_replace_tempindex_req where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\n\t\t\t\t$replaceArray = array ();\n\t\t\t\tif (! empty ( $replaceReq )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $replaceReq as $k3 => $replacement ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$replaceArray [$k3] = $replacement;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$replaceSec = $this->db->getResult ( \"Select * from tbl_replace_tempsecurity where indxx_id ='\" . $replacement ['indxx_id'] . \"' and req_id='\" . $replacement ['id'] . \"'\", true );\n\t\t\t\t\t\t$replaceArray [$k3] ['selectedsecurity'] = $replaceSec;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$replacedSec = $this->db->getResult ( \"Select * from tbl_tempsecurities_replaced where indxx_id ='\" . $replacement ['indxx_id'] . \"' and req_id='\" . $replacement ['id'] . \"'\", true );\n\t\t\t\t\t\t$replaceArray [$k3] ['replacedsecurity'] = $replacedSec;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$finalArray [$k1] ['replacement'] = $replaceArray;\n\t\t\t\t\n\t\t\t\t$oldAssignedUsers = $this->db->getResult ( \"Select * from tbl_assign_index_temp where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\t\t\t\t$finalArray [$k1] ['oldUsers'] = $oldAssignedUsers;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (! empty ( $finalArray )) \n\t\t{\n\t\t\t$textdata = $this->arr_to_csv ( $finalArray );\n\t\t\t$csv = '';\n\n\t\t\tforeach ( $textdata as $text )\n\t\t\t\t$csv .= $text . \"\\n\";\n\n\t\t\t$output_folder = \"../files/output/ca-index-backup/\";\n\t\t\tif (!file_exists($output_folder))\n\t\t\t\tmkdir($output_folder, 0777, true);\n\t\t\t\n\t\t\t$file = $output_folder. \"backup-upcomming-\" . $datevalue . \".txt\";\n\t\t\t$open = fopen ( $file, \"w+\" );\n\t\t\t\n\t\t\tif ($open) \n\t\t\t{\n\t\t\t\tif (fwrite ( $open, $csv )) \n\t\t\t\t{\n\t\t\t\t\tfclose ( $open );\n\t\t\t\t\t$this->log_info(log_file, \"File written = \" .$file);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->log_error(log_file, \"Unable to write file = \" .$file);\n\t\t\t\t\t$this->mail_exit(log_file, __FILE__, __LINE__);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->log_error(log_file, \"Unable to open file = \" .$file);\n\t\t\t\t$this->mail_exit(log_file, __FILE__, __LINE__);\n\t\t\t}\n\t\t\t\t\n\t\t\t/* Push each upcoming index, with today as live date, into the live index table list */\n\t\t\tforeach ( $finalArray as $skey => $newIndxx ) \n\t\t\t{\n\t\t\t\t$newIndexArray = array ();\n\t\t\t\t\n\t\t\t\t$checkindex = $this->db->getResult ( \"Select * from tbl_indxx where code ='\" . $newIndxx ['code'] . \"'\" );\n\t\t\t\t\n\t\t\t\tif (! empty ( $checkindex ))\n\t\t\t\t{\n\t\t\t\t\t/* TODO: Check with Deepak how this scenario can occur? It should not be in live in list */\n\t\t\t\t\t/* AMIT: case with rebalancing */\n\t\t\t\t\t$newIndexArray ['indexdetails'] = $checkindex;\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx where code ='\" . $newIndxx ['code'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checktickers = $this->db->getResult ( \"Select * from tbl_indxx_ticker where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['tickers'] = $checktickers;\n\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx_ticker where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkindexvalue = $this->db->getResult ( \"Select * from tbl_indxx_value where indxx_id ='\" . $checkindex ['id'] . \"' order by date desc\", false, 1 );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['indexvalue'] = $checkindexvalue;\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx_value where indxx_id ='\" . $checkindex ['id'] . \"' and date='\" . $checkindexvalue ['date'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkprice = $this->db->getResult ( \"Select * from tbl_final_price where indxx_id ='\" . $checkindex ['id'] . \"' and date='\" . $checkindexvalue ['date'] . \"'\", true );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['price'] = $checkprice;\n\t\t\t\t\t$this->db->query ( \"delete from tbl_final_price where indxx_id ='\" . $checkindex ['id'] . \"' and date='\" . $checkindexvalue ['date'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkshares = $this->db->getResult ( \"Select * from tbl_share where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['shares'] = $checkshares;\n\t\t\t\t\t$this->db->query ( \"delete from tbl_share where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkdelistReq = $this->db->getResult ( \"Select * from tbl_delist_runnindex_req where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t\n\t\t\t\t\t$checkdelistArray = array ();\n\t\t\t\t\tif (! empty ( $checkdelistReq )) \n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ( $checkdelistReq as $kch => $checkdelisting ) \n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$checkdelistSec = $this->db->getResult ( \"Select * from tbl_delist_runnsecurity where indxx_id ='\" . $checkdelisting ['indxx_id'] . \"' and req_id='\" . $checkdelisting ['id'] . \"'\", true );\n\t\t\t\t\t\t\t$checkdelistArray [$kch] = $checkdelisting;\n\t\t\t\t\t\t\t$checkdelistArray [$kch] ['security'] = $checkdelistSec;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_delist_runnsecurity where indxx_id ='\" . $checkdelisting ['indxx_id'] . \"' and req_id='\" . $checkdelisting ['id'] . \"'\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['delisting'] = $checkdelistArray;\n\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( \"delete from tbl_delist_runnindex_req where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkreplaceReq = $this->db->getResult ( \"Select * from tbl_replace_runnindex_req where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t$checkreplaceArray = array ();\n\n\t\t\t\t\tif (! empty ( $checkreplaceReq )) \n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ( $checkreplaceReq as $kchk => $checkreplacement ) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$checkreplaceSec = $this->db->getResult ( \"Select * from tbl_replace_runnsecurity where indxx_id ='\" . $checkreplacement ['indxx_id'] . \"' and req_id='\" . $checkreplacement ['id'] . \"'\", true );\n\t\t\t\t\t\t\t$checkreplaceArray [$kchk] = $checkreplacement;\n\t\t\t\t\t\t\t$checkreplaceArray [$kchk] ['selectedsecurity'] = $checkreplaceSec;\n\n\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_replace_runnsecurity where indxx_id ='\" . $checkreplacement ['indxx_id'] . \"' and req_id='\" . $checkreplacement ['id'] . \"'\" );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$checkreplacedSec = $this->db->getResult ( \"Select * from tbl_runnsecurities_replaced where indxx_id ='\" . $checkreplacement ['indxx_id'] . \"' and req_id='\" . $checkreplacement ['id'] . \"'\", true );\n\t\t\t\t\t\t\t$checkreplaceArray [$kchk] ['replacedsecurity'] = $checkreplacedSec;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_runnsecurities_replaced where indxx_id ='\" . $checkreplacement ['indxx_id'] . \"' and req_id='\" . $checkreplacement ['id'] . \"'\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['replacement'] = $checkreplaceArray;\n\t\t\t\t\t$this->db->query ( \"delete from tbl_replace_runnindex_req where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkusers = $this->db->getResult ( \"Select * from tbl_assign_index where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['users'] = $checkusers;\n\n\t\t\t\t\t$this->db->query ( \"delete from tbl_assign_index where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\tif (! empty ( $newIndexArray )) \n\t\t\t\t\t{\n\t\t\t\t\t\t$textdata = $this->arr_to_csv ( $newIndexArray );\n\t\t\t\t\t\t$csv = '';\n\n\t\t\t\t\t\tforeach ( $textdata as $text )\n\t\t\t\t\t\t\t$csv .= $text . \"\\n\";\n\n\t\t\t\t\t\t$file = $output_folder. \"backup-running-\" . $checkindex ['code'] . \"-\" . $datevalue . \".txt\";\n\t\t\t\t\t\t$open = fopen ( $file, \"w+\" );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($open) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (fwrite ( $open, $csv )) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfclose ( $open );\n\t\t\t\t\t\t\t\t$this->info(\"File written for\" . $checkindex ['code']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->log_error(log_file, \"Unable to write file = \" .$file);\n\t\t\t\t\t\t\t\t$this->mail_exit(log_file, __FILE__, __LINE__);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->log_error(log_file, \"Unable to open file = \" .$file);\n\t\t\t\t\t\t\t$this->mail_exit(log_file, __FILE__, __LINE__);\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$insertIndexQuery = \"Insert into tbl_indxx set name='\" . mysql_real_escape_string ( $newIndxx ['name'] ) . \"',code='\" . mysql_real_escape_string ( $newIndxx ['code'] ) . \"',investmentammount='\" . mysql_real_escape_string ( $newIndxx ['investmentammount'] ) . \"',indexvalue='\" . mysql_real_escape_string ( $newIndxx ['indexvalue'] ) . \"',divisor='\" . ($newIndxx ['divisor']) . \"',type='\" . mysql_real_escape_string ( $newIndxx ['type'] ) . \"',cash_adjust='\" . mysql_real_escape_string ( $newIndxx ['cash_adjust'] ) . \"',curr='\" . mysql_real_escape_string ( $newIndxx ['curr'] ) . \"',status='\" . mysql_real_escape_string ( $newIndxx ['status'] ) . \"',dateAdded='\" . mysql_real_escape_string ( $newIndxx ['dateAdded'] ) . \"',lastupdated='\" . mysql_real_escape_string ( $newIndxx ['lastupdated'] ) . \"',dateStart='\" . mysql_real_escape_string ( $newIndxx ['dateStart'] ) . \"',usersignoff='\" . mysql_real_escape_string ( $newIndxx ['usersignoff'] ) . \"',dbusersignoff='\" . mysql_real_escape_string ( $newIndxx ['dbusersignoff'] ) . \"',submitted='\" . mysql_real_escape_string ( $newIndxx ['submitted'] ) . \"',finalsignoff='\" . mysql_real_escape_string ( $newIndxx ['finalsignoff'] ) . \"',runindex='\" . mysql_real_escape_string ( $newIndxx ['runindex'] ) . \"',addtype='\" . mysql_real_escape_string ( $newIndxx ['addtype'] ) . \"',zone='\" . mysql_real_escape_string ( $newIndxx ['zone'] ) . \"',client_id='\" . mysql_real_escape_string ( $newIndxx ['client_id'] ) . \"',display_currency='\" . mysql_real_escape_string ( $newIndxx ['display_currency'] ) . \"' ,ireturn='\" . mysql_real_escape_string ( $newIndxx ['ireturn'] ) . \"',div_type='\" . mysql_real_escape_string ( $newIndxx ['div_type'] ) . \"',currency_hedged='\" . mysql_real_escape_string ( $newIndxx ['currency_hedged'] ) . \"',priority='\" . mysql_real_escape_string ( $newIndxx ['priority'] ) . \"',divpvalue='\" . mysql_real_escape_string ( $newIndxx ['divpvalue'] ) . \"'\";\t\t\t\t\n\t\t\t\t$this->db->query ( $insertIndexQuery );\n\t\t\t\t\n\t\t\t\t$NewIndxxId = mysql_insert_id ();\n\n\t\t\t\t$this->db->query ( \"delete from tbl_indxx_temp where id='\" . $newIndxx ['id'] . \"'\" );\n\t\t\t\t\n\t\t\t\t$tickerTempArray = array ();\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['tickers'] )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $newIndxx ['tickers'] as $k4 => $newTickers ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$insertTickerQuery = \"Insert into tbl_indxx_ticker set name='\" . mysql_real_escape_string ( $newTickers ['name'] ) . \"',isin='\" . mysql_real_escape_string ( $newTickers ['isin'] ) . \"',ticker='\" . mysql_real_escape_string ( $newTickers ['ticker'] ) . \"',weight='\" . mysql_real_escape_string ( $newTickers ['weight'] ) . \"',curr='\" . mysql_real_escape_string ( $newTickers ['curr'] ) . \"',divcurr='\" . mysql_real_escape_string ( $newTickers ['divcurr'] ) . \"',dateAdded='\" . mysql_real_escape_string ( $newTickers ['dateAdded'] ) . \"',status='\" . ($newTickers ['status']) . \"',sedol='\" . mysql_real_escape_string ( $newTickers ['sedol'] ) . \"',cusip='\" . mysql_real_escape_string ( $newTickers ['cusip'] ) . \"',countryname='\" . mysql_real_escape_string ( $newTickers ['countryname'] ) . \"', indxx_id='\" . $NewIndxxId . \"' \";\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertTickerQuery );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$tickerTempArray [$newTickers ['id']] = mysql_insert_id ();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx_ticker_temp where indxx_id='\" . $newIndxx ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['shares'] )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $newIndxx ['shares'] as $k4 => $newShares ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$insertShareQuery = \"Insert into tbl_share set dateAdded='\" . $newShares ['dateAdded'] . \"',isin='\" . $newShares ['isin'] . \"',date='\" . $newShares ['date'] . \"',share='\" . $newShares ['share'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertShareQuery );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_share_temp where indxx_id='\" . $newIndxx ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['oldUsers'] )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $newIndxx ['oldUsers'] as $k4 => $newUsers ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$insertUserQuery = \"Insert into tbl_assign_index set dateAdded='\" . $newUsers ['dateAdded'] . \"',status='\" . $newUsers ['status'] . \"',user_id='\" . $newUsers ['user_id'] . \"',isAdmin='\" . $newUsers ['isAdmin'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertUserQuery );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_assign_index_temp where indxx_id='\" . $newIndxx ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['prices'] )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $newIndxx ['prices'] as $k4 => $newPrices ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$insertPriceQuery = \"Insert into tbl_final_price set dateAdded='\" . $newPrices ['dateAdded'] . \"',isin='\" . $newPrices ['isin'] . \"',date='\" . $newPrices ['date'] . \"',price='\" . $newPrices ['price'] . \"',currencyfactor='\" . $newPrices ['currencyfactor'] . \"', \tlocalprice='\" . $newPrices ['localprice'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertPriceQuery );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_final_price_temp where indxx_id='\" . $newIndxx ['id'] . \"' and date='\" . $newPrices ['date'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['oldindxxvalue'] )) {\n\t\t\t\t\t$insertOldindxxvalueQuery = \"Insert into tbl_indxx_value set dateAdded='\" . $newIndxx ['oldindxxvalue'] ['dateAdded'] . \"',market_value='\" . $newIndxx ['oldindxxvalue'] ['market_value'] . \"',indxx_value='\" . $newIndxx ['oldindxxvalue'] ['indxx_value'] . \"',date='\" . $newIndxx ['oldindxxvalue'] ['date'] . \"',olddivisor='\" . $newIndxx ['oldindxxvalue'] ['olddivisor'] . \"', \tnewdivisor='\" . $newIndxx ['oldindxxvalue'] ['newdivisor'] . \"', \tcode='\" . $newIndxx ['oldindxxvalue'] ['code'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( $insertOldindxxvalueQuery );\n\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx_value_temp where indxx_id='\" . $newIndxx ['id'] . \"' and date='\" . $newIndxx ['oldindxxvalue'] ['date'] . \"'\" );\n\t\t\t\t}\n\t\t\t\t// //Delisting Insert to new\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['delisting'] )) {\n\t\t\t\t\tforeach ( $newIndxx ['delisting'] as $k5 => $newdelist ) {\n\t\t\t\t\t\t$insertDelistReqQuery = \"Insert into tbl_delist_runnindex_req set status='\" . $newdelist ['status'] . \"',dateAdded='\" . $newdelist ['dateAdded'] . \"',startdate='\" . $newdelist ['startdate'] . \"', \tadminapprove='\" . $newdelist ['adminapprove'] . \"',dbapprove='\" . $newdelist ['dbapprove'] . \"',user_id='\" . $newdelist ['user_id'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertDelistReqQuery );\n\t\t\t\t\t\t$newdelistId = mysql_insert_id ();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (! empty ( $newdelist ['security'] )) {\n\t\t\t\t\t\t\tforeach ( $newdelist ['security'] as $newDelistSecurity ) {\n\t\t\t\t\t\t\t\t$insertDelistSecQuery = \"Insert into tbl_delist_runnsecurity set status='\" . $newDelistSecurity ['status'] . \"',dateAdded='\" . $newDelistSecurity ['dateAdded'] . \"',security_id='\" . $tickerTempArray [$newDelistSecurity ['security_id']] . \"',req_id='\" . $newdelistId . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\t\t$this->db->query ( $insertDelistSecQuery );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_delist_tempsecurity where id='\" . $newDelistSecurity ['id'] . \"'\" );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_delist_tempindex_req where indxx_id='\" . $newIndxx ['id'] . \"' and id='\" . $newdelist ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['replacement'] )) {\n\t\t\t\t\tforeach ( $newIndxx ['replacement'] as $k6 => $newReplace ) {\n\t\t\t\t\t\t$insertReplaceReqQuery = \"Insert into tbl_replace_runnindex_req set status='\" . $newReplace ['status'] . \"',dateAdded='\" . $newReplace ['dateAdded'] . \"',startdate='\" . $newReplace ['startdate'] . \"', \tadminapprove='\" . $newReplace ['adminapprove'] . \"',dbapprove='\" . $newReplace ['dbapprove'] . \"',user_id='\" . $newReplace ['user_id'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertReplaceReqQuery );\n\t\t\t\t\t\t$newReplaceId = mysql_insert_id ();\n\t\t\t\t\t\tif (! empty ( $newReplace ['selectedsecurity'] )) {\n\t\t\t\t\t\t\tforeach ( $newReplace ['selectedsecurity'] as $newReplaceSecurity ) {\n\t\t\t\t\t\t\t\t$insertReplaceSecQuery = \"Insert into tbl_replace_runnsecurity set status='\" . $newReplaceSecurity ['status'] . \"',dateAdded='\" . $newReplaceSecurity ['dateAdded'] . \"',security_id='\" . $tickerTempArray [$newReplaceSecurity ['security_id']] . \"',req_id='\" . $newReplaceId . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\t\t$this->db->query ( $insertReplaceSecQuery );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_replace_tempsecurity where id='\" . $newReplaceSecurity ['id'] . \"'\" );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (! empty ( $newReplace ['replacedsecurity'] )) {\n\t\t\t\t\t\t\tforeach ( $newReplace ['replacedsecurity'] as $newReplacedSecurity ) {\n\t\t\t\t\t\t\t\t$insertReplacedQuery = \"Insert into tbl_runnsecurities_replaced set status='\" . $newReplaceSecurity ['status'] . \"',dateAdded='\" . $newReplaceSecurity ['dateAdded'] . \"',name='\" . mysql_real_escape_string ( $newReplacedSecurity ['name'] ) . \"',isin='\" . mysql_real_escape_string ( $newReplacedSecurity ['isin'] ) . \"',ticker='\" . mysql_real_escape_string ( $newReplacedSecurity ['ticker'] ) . \"',weight='\" . mysql_real_escape_string ( $newReplacedSecurity ['weight'] ) . \"',curr='\" . mysql_real_escape_string ( $newReplacedSecurity ['curr'] ) . \"',divcurr='\" . mysql_real_escape_string ( $newReplacedSecurity ['divcurr'] ) . \"',sedol='\" . mysql_real_escape_string ( $newReplacedSecurity ['sedol'] ) . \"',cusip='\" . mysql_real_escape_string ( $newReplacedSecurity ['cusip'] ) . \"',countryname='\" . mysql_real_escape_string ( $newReplacedSecurity ['countryname'] ) . \"',req_id='\" . $newReplaceId . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\t\t$this->db->query ( $insertReplacedQuery );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_tempsecurities_replaced where id='\" . $newReplacedSecurity ['id'] . \"'\" );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_replace_tempindex_req where indxx_id='\" . $newIndxx ['id'] . \"' and id='\" . $newReplace ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->log_info(log_file, \"CA replaceindex process finished\");\n\t\t\n\t\t//$this->saveProcess ( 1 );\n\t\t$this->Redirect(\"index.php?module=replacecash&DEBUG=\" .DEBUG. \"&date=\" .$datevalue. \"&log_file=\" . basename(log_file), \"\", \"\" );\n\t}", "public function rewind() {\n $this->_key = 0;\n }", "public function reset_indices($pub, $author, $journal) {\n\t\t$query = \"ALTER TABLE publication AUTO_INCREMENT $pub\";\n\t\t$this->mysqliconnect($query);\n\t\t$query = \"ALTER TABLE author AUTO_INCREMENT $author\";\n\t\t$this->mysqliconnect($query);\n\t\t$query = \"ALTER TABLE journal AUTO_INCREMENT $journal\";\n\t\t$this->mysqliconnect($query);\n\t}", "function putIndex(){\n\n }", "function putIndex(){\n\n }", "public function refreshSearchIndex()\n {\n $this->artisan('regarch:elastic:migrate');\n $this->app[Kernel::class]->setArtisan(null);\n }", "protected function refreshIndex()\n {\n return $this->index->refresh();\n }", "protected function flushIndex()\n {\n $this->canIndex();\n /**\n * Set indexer to use mview \n */\n $this->indexer->setScheduled(true);\n\n $writeAdapter = $this->resourceConnection->getConnection('core_write');\n\n /**\n * Flush all old data \n */\n $indexTable = $this->resourceConnection->getTableName('bazaarvoice_index_product');\n $writeAdapter->truncateTable($indexTable);\n $changelogTable = $this->resourceConnection->getTableName('bazaarvoice_product_cl');\n $writeAdapter->truncateTable($changelogTable);\n\n /**\n * Setup dummy rows \n */\n $productTable = $this->resourceConnection->getTableName('catalog_product_entity');\n $writeAdapter->query(\"INSERT INTO `$indexTable` (`product_id`, `version_id`) SELECT DISTINCT `entity_id`, '0' FROM `$productTable`;\");\n $writeAdapter->query(\"INSERT INTO `$changelogTable` (`entity_id`) SELECT DISTINCT `entity_id` FROM `$productTable`;\");\n\n /**\n * Reset mview version \n */\n $mviewTable = $this->resourceConnection->getTableName('mview_state');\n $writeAdapter->query(\"UPDATE `$mviewTable` SET `version_id` = NULL, `status` = 'idle' WHERE `view_id` = 'bazaarvoice_product';\");\n $indexCheck = $writeAdapter\n ->query(\n \"SELECT COUNT(1) indexIsThere FROM INFORMATION_SCHEMA.STATISTICS\n WHERE table_schema=DATABASE() AND table_name='$changelogTable' AND index_name='entity_id';\"\n );\n $indexCheck = $indexCheck->fetchObject();\n if ($indexCheck->indexIsThere == 0) {\n $writeAdapter->query(\"ALTER TABLE `$changelogTable` ADD INDEX (`entity_id`);\");\n }\n }", "private function _valueToKeyCombiner($records)\r\n {\r\n foreach ($records as $idx => $record) {\r\n $records[ $record ] = $record;\r\n unset( $records[ $idx ] );\r\n }\r\n\r\n return $records;\r\n }", "function fjm_merce_reindex() {\n module_load_include('inc', 'fedora_repository', 'api/fedora_item');\n\n $query = \"select \\$object from <#ri>\n where \\$object <fedora-model:hasModel> <info:fedora/islandora:sp-audioCModel>\";\n $pids = _process_book_query($query);\n\n foreach ($pids AS $pid) {\n $name_space = explode(':', $pid);\n if ($name_space[0] == 'cam') {\n $item = new Fedora_Item($pid);\n\n $item->set_datastream_state('MODS', 'I', 'Modified by Islandora API');\n $item->set_datastream_state('MODS', 'A', 'Modified by Islandora API');\n\n drush_print_r('MODS updated for PID: ' . $pid);\n }\n }\n}", "public function rebuildSearchKey() {\n\t\t$dbw = $this->table->getWriteDb();\n\n\t\t$rowId = $this->fromId - 1;\n\n\t\t$total = 0;\n\n\t\twhile ( true ) {\n\t\t\t// Make sure we are not running too far ahead of the slaves,\n\t\t\t// as that would cause the site to be rendered read only.\n\t\t\twfWaitForSlaves();\n\n\t\t\t$dbw->begin();\n\n\t\t\t$terms = $dbw->select(\n\t\t\t\t$this->table->getTableName(),\n\t\t\t\tarray(\n\t\t\t\t\t'term_row_id',\n\t\t\t\t\t'term_language',\n\t\t\t\t\t'term_text',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'term_row_id > ' . (int) $rowId,\n\t\t\t\t\t$this->all ? '1' : 'term_search_key = \\'\\'', // if not $all, only set missing keys\n\t\t\t\t),\n\t\t\t\t__METHOD__,\n\t\t\t\tarray(\n\t\t\t\t\t'LIMIT' => $this->batchSize,\n\t\t\t\t\t'ORDER BY' => 'term_row_id ASC',\n\t\t\t\t\t'FOR UPDATE'\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$c = 0;\n\t\t\t$cError = 0;\n\n\t\t\tforeach ( $terms as $row ) {\n\t\t\t\t$key = $this->updateSearchKey( $dbw, $row->term_row_id, $row->term_text );\n\n\t\t\t\tif ( $key === false ) {\n\t\t\t\t\t$this->report( \"Unable to calculate search key for \" . $row->term_text );\n\t\t\t\t\t$cError += 1;\n\t\t\t\t} else {\n\t\t\t\t\t$c += 1;\n\t\t\t\t}\n\n\t\t\t\t$rowId = $row->term_row_id;\n\t\t\t}\n\n\t\t\t$dbw->commit();\n\n\t\t\t$this->report( \"Updated $c search keys (skipped $cError), up to row $rowId.\" );\n\t\t\t$total += $c;\n\n\t\t\tif ( $c < $this->batchSize ) {\n\t\t\t\t// we are done.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $total;\n\t}", "public function cleanupIndex( $timestamp );", "function company_update($table, $data) {\n\n //SELECT * FROM node WHERE nid >= 4490 AND nid <= 4541 ORDER BY nid DESC LIMIT 0, 2500;\n\n global $devel, $tablas, $U;\n\n if (!count($data)) {\n print_r(get_defined_vars());\n throw new Exception(\"ERROR: No existen parámetros para UPDATE en $table\");\n }\n\n $ids = array(\n 'PRIMARY_KEYS' => false,\n 'UNIQUES_KEYS' => false,\n 'INDEXES_KEYS' => false,\n 'COLUMNS_KEYS' => false,\n );\n\n // Buscamos la row por todas sus claves una a una hasta encontrarla\n foreach ($ids as $id => $dummy) {\n\n $keys = keys($table, $id);\n\n // Si la tabla tiene claves por las cuales buscar\n if ($keys) {\n\n // Hacemos otra consulta por dichas claves para buscar algun resultado\n $WHERE = where($keys, $data);\n $query = \"SELECT * FROM `$table` WHERE $WHERE\";\n $result = db_fetch(db_query($devel, $query));\n\n // Si hay resultado buscamos realmente que datos hay que cambiar y paramos\n if ($result) {\n\n // Por cada row obtenida (si no es PRIMARY_KEYS o UNIQUES_KEYS)\n foreach ($result as $row) {\n\n // Seteamos a cero los cambios a realizar\n $UPDATE = array();\n\n // Por cada campo de la row verificamos que los datos no sean iguales\n foreach ($row as $key => $value) {\n\n // Si existe realmente la clave dada en los datos\n if (isset($data[$key])) {\n\n // Si los datos no son iguales que los que hay en la base de datos\n if ($data[$key] != $value) {\n // Agregamos a la lista de actualizar para construir la query\n $UPDATE[$key] = $key;\n }\n }\n }\n\n // Si hemos encontrado campos para los que hay que actualizar\n if ($UPDATE) {\n\n $WHERE = where($keys, $data);\n $SET = set($UPDATE, $data);\n $query = \"UPDATE `$table` SET $SET WHERE $WHERE\";\n sql($query, $table, 'UPDATE');\n $U++;\n }\n }\n\n // Paramos el bucle de los KEYS ya que hemos encontrado dicha row/s\n break;\n }\n }\n }\n}", "public function update(string $key, $newData);", "function tptn_recreate_primary_key() {\n\tglobal $wpdb;\n\n\t$table_name = $wpdb->base_prefix . 'top_ten';\n\t$table_name_daily = $wpdb->base_prefix . 'top_ten_daily';\n\n\t$wpdb->hide_errors();\n\n\tif ( $wpdb->query( $wpdb->prepare( \"SHOW INDEXES FROM {$table_name} WHERE Key_name = %s\", 'PRIMARY' ) ) ) { // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared\n\t\t$wpdb->query( 'ALTER TABLE ' . $table_name . ' DROP PRIMARY KEY ' ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange\n\t}\n\tif ( $wpdb->query( $wpdb->prepare( \"SHOW INDEXES FROM {$table_name_daily} WHERE Key_name = %s\", 'PRIMARY' ) ) ) { // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared\n\t\t$wpdb->query( 'ALTER TABLE ' . $table_name_daily . ' DROP PRIMARY KEY ' ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange\n\t}\n\n\t$wpdb->query( 'ALTER TABLE ' . $table_name . ' ADD PRIMARY KEY(postnumber, blog_id) ' ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange\n\t$wpdb->query( 'ALTER TABLE ' . $table_name_daily . ' ADD PRIMARY KEY(postnumber, dp_date, blog_id) ' ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange\n\n\t$wpdb->show_errors();\n}", "function apachesolr_index_node_solr_reindex($env_id, $bundle = NULL) {\n $indexer_table = apachesolr_get_indexer_table('node');\n $transaction = db_transaction();\n try {\n $indexable_bundles = apachesolr_get_index_bundles($env_id, 'node');\n\n if ($bundle && !empty($indexable_bundles) && !in_array($bundle, $indexable_bundles)) {\n // The bundle specified is not in the indexable bundles list.\n return NULL;\n }\n\n // Leave status 0 rows - those need to be\n // removed from the index later.\n $delete = db_delete($indexer_table);\n $delete->condition('status', 1);\n\n if (!empty($bundle)) {\n $delete->condition('bundle', $bundle);\n }\n elseif (!empty($indexable_bundles)) {\n $delete->condition('bundle', $indexable_bundles, 'IN');\n }\n\n $delete->execute();\n\n $select = db_select('node', 'n');\n $select->condition('status', 1);\n $select->addExpression(\"'node'\", 'entity_type');\n $select->addField('n', 'nid', 'entity_id');\n $select->addField('n', 'type', 'bundle');\n $select->addField('n', 'status', 'status');\n $select->addExpression(REQUEST_TIME, 'changed');\n\n if ($bundle) {\n // Mark all nodes of the specified content type for reindexing.\n $select->condition('n.type', $bundle);\n }\n elseif (!empty($indexable_bundles)) {\n // Restrict reindex to content types in the indexable bundles list.\n $select->condition('n.type', $indexable_bundles, 'IN');\n }\n\n $insert = db_insert($indexer_table)\n ->fields(array('entity_id', 'bundle', 'status', 'entity_type', 'changed'))\n ->from($select)\n ->execute();\n }\n catch (Exception $e) {\n $transaction->rollback();\n throw $e;\n }\n}", "public function reset($keys = NULL)\n\t{\n\t\tif ($keys === NULL)\n\t\t{\n\t\t\t$keys = array_keys($this->_originals);\n\t\t}\n\t\t\n\t\tforeach ((array) $keys as $key)\n\t\t{\n\t\t\t$this->_filters[$this->_path][$key] = $this->_originals[$key];\n\t\t}\n\t\t\n\t\t$this->_save();\n\t\t\n\t\treturn $this;\n\t}" ]
[ "0.7540162", "0.6931192", "0.6666059", "0.6646901", "0.64020395", "0.62247056", "0.6188542", "0.613206", "0.6075144", "0.6037557", "0.5941186", "0.5939979", "0.5888683", "0.5887146", "0.582772", "0.57057446", "0.5664897", "0.5640959", "0.5612578", "0.56118447", "0.55719995", "0.5540933", "0.5500346", "0.54540795", "0.5445244", "0.5442398", "0.5398461", "0.53739244", "0.5367667", "0.53632975", "0.5339388", "0.53354776", "0.5321748", "0.52867585", "0.52674806", "0.52643996", "0.5253448", "0.5232443", "0.52246517", "0.5216127", "0.520725", "0.5187672", "0.5184769", "0.51705444", "0.51645005", "0.51313174", "0.51264", "0.51256627", "0.5122538", "0.5110597", "0.51101583", "0.5104617", "0.5100829", "0.5067762", "0.50482553", "0.5041398", "0.5039061", "0.5001429", "0.50011337", "0.49981403", "0.49853775", "0.49583527", "0.49576253", "0.49574128", "0.4929295", "0.4928644", "0.49282727", "0.49117", "0.49025044", "0.49000895", "0.48957694", "0.48942438", "0.4891539", "0.48828536", "0.48768723", "0.48653308", "0.48591575", "0.48391813", "0.4835966", "0.48267412", "0.48246783", "0.48224702", "0.48116162", "0.4799796", "0.47923088", "0.4790773", "0.47882742", "0.47882742", "0.47881988", "0.47795033", "0.47757563", "0.47612908", "0.4758967", "0.47473636", "0.47431475", "0.47364682", "0.47246164", "0.47240144", "0.47219458", "0.47204146" ]
0.534888
30
Group by keys Data reindex and Group by keys
public static function groupBy(& $data, $keys, $obj2array = false) { // Refactor Array $data structure by $keys return self::_refactorBy($data, $keys, $obj2array, $type = 'groupBy'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function groupByKey($arr, $key){\n\t$groupeItmes = array();\n\tforeach ( $arr as $row ) {\n\t\t$groupeItmes[$row[$key]][] = $row;\n\t}\n\n\t$finalData = array();\n\tforeach ( $groupeItmes as $row ) {\n\t\t$finalData[] = array($key => $row[0][$key], 'items' => $row );\n\t}\n\n\tusort($finalData, sortByOrder($key));\n\n\treturn $finalData;\n}", "protected function reindex()\n\t{\n\t\t// rebuild the ordered collection\n\t\t$results = array();\n\t\tforeach ($this->_data as $old => $record)\n\t\t{\n\t\t\t$key = $record->{$this->_keyfield};\n\t\t\t$results[$key] = $record;\n\t\t}\n\t\t// sort the collection\n\t\tksort($results);\n\t\t// remember the new collection\n\t\t$this->_data = $results;\n\t\t// reset the cursor\n\t\treset($this->_data);\n\t}", "function array_group_by($array, $key)\n {\n $return = array();\n foreach ($array as $val) {\n $return[$val[$key]][] = $val;\n }\n\n array_walk($return, function (&$row) use ($key) {\n $row = array_first($row);\n unset($row[$key]);\n });\n\n return $return;\n }", "function dokan_prepare_chart_data( $data, $date_key, $data_key, $interval, $start_date, $group_by ) {\n $prepared_data = array();\n\n // Ensure all days (or months) have values first in this range\n for ( $i = 0; $i <= $interval; $i ++ ) {\n switch ( $group_by ) {\n case 'day' :\n $time = strtotime( date( 'Ymd', strtotime( \"+{$i} DAY\", $start_date ) ) ) * 1000;\n break;\n case 'month' :\n $time = strtotime( date( 'Ym', strtotime( \"+{$i} MONTH\", $start_date ) ) . '01' ) * 1000;\n break;\n }\n\n if ( ! isset( $prepared_data[ $time ] ) )\n $prepared_data[ $time ] = array( esc_js( $time ), 0 );\n }\n\n foreach ( $data as $d ) {\n switch ( $group_by ) {\n case 'day' :\n $time = strtotime( date( 'Ymd', strtotime( $d->$date_key ) ) ) * 1000;\n break;\n case 'month' :\n $time = strtotime( date( 'Ym', strtotime( $d->$date_key ) ) . '01' ) * 1000;\n break;\n }\n\n if ( ! isset( $prepared_data[ $time ] ) ) {\n continue;\n }\n\n if ( $data_key )\n $prepared_data[ $time ][1] += $d->$data_key;\n else\n $prepared_data[ $time ][1] ++;\n }\n\n return $prepared_data;\n}", "function quiz_report_index_by_keys($datum, $keys, $keysunique=true){\n if (!$datum){\n return $datum;\n }\n $key = array_shift($keys);\n $datumkeyed = array();\n foreach ($datum as $data){\n if ($keys || !$keysunique){\n $datumkeyed[$data->{$key}][]= $data;\n } else {\n $datumkeyed[$data->{$key}]= $data;\n }\n }\n if ($keys){\n foreach ($datumkeyed as $datakey => $datakeyed){\n $datumkeyed[$datakey] = quiz_report_index_by_keys($datakeyed, $keys, $keysunique);\n }\n }\n return $datumkeyed;\n}", "private function rebuildIndex()\n {\n foreach ($this->rows as $id => $row) {\n $label = $row->getColumn('label');\n if ($label !== false) {\n $this->rowsIndexByLabel[$label] = $id;\n }\n }\n $this->indexNotUpToDate = false;\n }", "abstract protected function _buildGroupBy( $group );", "static function groupArray(array $arr, array $keys)\n\t{\n\t\t$newlist = [];\n\t\t\n\t\tforeach($arr as $row){\n\t\t\t$keys1=[];\n\t\t\tforeach($keys as $key)\n\t\t\t\t$keys1[] = $row[$key];\n\t\t\t\n\t\t\tGW_Array_Helper::getPointer2XlevelAssocArr($newlist, $keys1, $row);\n\t\t}\n\t\t\n\t\treturn $newlist;\n\t}", "private function combineKeys()\n {\n if ($this->rows) {\n try {\n foreach ($this->rows as $key => $row) {\n array_unshift($row, $key + 1);\n $this->data[] = array_combine($this->headers, $row);\n }\n } catch (\\ErrorException $e) {\n throw new HeaderRowUnmatchedException();\n }\n }\n }", "public static function _prepareSortable() {\n $data = [];\n $sortableGroupField = static::getSortableGroupField();\n $sortableField = static::getSortableField();\n foreach(static::all() as $row) {\n $keyParts = [];\n foreach ($sortableGroupField as $sgf) {\n $keyParts[] = $row->{$sortableGroupField};\n }\n $key = implode('_',$keyParts);\n if ($sortableGroupField) {\n $data[$key][] = $row;\n } else {\n $data[0][$row];\n }\n }\n\n foreach ($data as $group => $groupData ) {\n $i = 0;\n foreach ($groupData as $row) {\n $row->{$sortableField} = ++$i;\n $row->save();\n echo sprintf(\"row %d was orderer<br>\\n\",$row->id);\n }\n }\n }", "public static function groupArray($array, $model)\n {\n // set blank index for tracking which rows we've already added\n $idx = '';\n // blank array to store all the data\n $master = array();\n // retrieve value of \"key\" for the current iteratin of the data model\n $key = $model['key'];\n // loop over each row in the passed data array\n foreach ($array as $row) {\n // if the value of the current key is not equal to the index value, evaluate row\n if ($row[$key] != $idx) {\n // retrieve data for row based on model definition\n $item = self::makerowdata($row, $model);\n // if current level of model has \"children\" defined, evaluate each child\n if (isset($model['children'])) {\n // loop over array of children\n foreach ($model['children'] as $child => $val) {\n // take current array data, and whittle it down based on the child's data key\n $childarr = self::filterarraybykey($array, $key, $row[$key]);\n // recursively call makenestedarray() with current filtered array in order to retrieve nested data\n $children = self::groupArray($childarr, $val);\n // add nested data to parent array, using the key of the current child array as the key in the parent\n $item[$child] = $children;\n }\n }\n // done with all the looping; add current data item to master array\n array_push($master, $item);\n // update the index so we can skip rows if they have the same index\n $idx = $row[$key];\n }\n }\n // yay! all finished; return the completed data object\n return $master;\n }", "public function reIndex() {\n $index = collect([]);\n // Loop through each of the hydrated fields\n $this->getHydrated()->each(function($field,$k) use ($index) {\n // Pass each field through the toPath process\n $field->toPath($index);\n });\n // Replace the current index value\n $this->index = $index;\n // Return for chaining\n return $this;\n }", "public function get_keyed_rows() {\n\t\tif (!isset($this->keyed_rows)) {\n\t\t\t$this->get_array();\n\t\t\tif (empty($this->header) || empty($this->data)) {\n\t\t\t\t$this->keyed_rows = array();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tforeach ($this->data as $i => $row) {\n\t\t\t\t\tif ($i == 0) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($row as $k => $v) {\n\t\t\t\t\t\t$this->keyed_rows[$i][$this->header[$k]] = $v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->keyed_rows;\n\t}", "public function groupBy($fields, $overwrite = false);", "function array_group_by($arr, $key)\r\n {\r\n $grouped = [];\r\n foreach ($arr as $value) {\r\n $value = (array)$value;\r\n $grouped[$value[$key]][] = $value;\r\n }\r\n // Recursively build a nested grouping if more parameters are supplied\r\n // Each grouped array value is grouped according to the next sequential key\r\n if (func_num_args() > 2) {\r\n $args = func_get_args();\r\n foreach ($grouped as $key => $value) {\r\n $parms = array_merge([$value], array_slice($args, 2, func_num_args()));\r\n $grouped[$key] = call_user_func_array('array_group_by', $parms);\r\n }\r\n }\r\n return $grouped;\r\n }", "function resetKeys() {\n $this->keys = array_keys($this->records);\n }", "function pp_group_array( $array, $key ) {\n\n\t// Bail if the data is bad\n\tif ( ! is_array( $array ) ) {\n\t\treturn $array;\n\t}\n\n\t// Sorted array to build as we go\n\t$sorted_items = array();\n\n\t// If we encounter a bad item, just bail on the whole thing\n\t$should_bail = false;\n\n\t// Loop through itmes\n\tforeach ( $array as $item ) {\n\n\t\t// If this isn't an array or isn't an object, bail\n\t\tif ( ! is_array( $item ) && ! is_object( $item ) ) {\n\t\t\t$should_bail = true;\n\t\t}\n\n\t\t// Create the key to use\n\t\t$key_to_use = is_array( $item ) ? $item[ $key ] : $item->$key;\n\n\t\t// If we don't have a key to use, bail\n\t\tif ( $key_to_use === false ) {\n\t\t\t$should_bail = true;\n\t\t}\n\n\t\t// If this is the firrst time encountering this key, create a new array item in our grouping array\n\t\tif ( ! isset( $sorted_items[ $key_to_use ] ) ) {\n\t\t\t$sorted_items[ $key_to_use ] = array();\n\t\t}\n\n\t\t// Add this item to the appropriate nested array\n\t\t$sorted_items[ $key_to_use ][] = $item;\n\n\t}\n\n\tif ( $should_bail ) {\n\t\treturn $array;\n\t} else {\n\t\treturn $sorted_items;\n\t}\n\n}", "function rebuild_group_cache()\n\t{\n\t\t$this->ipsclass->cache['group_cache'] = array();\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => \"*\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'groups'\n\t\t\t\t\t\t\t\t\t\t\t ) );\n\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile ( $i = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->cache['group_cache'][ $i['g_id'] ] = $i;\n\t\t}\n\n\t\t$this->ipsclass->update_cache( array( 'name' => 'group_cache', 'array' => 1, 'deletefirst' => 1 ) );\n\t}", "private function _valueToKeyCombiner($records)\r\n {\r\n foreach ($records as $idx => $record) {\r\n $records[ $record ] = $record;\r\n unset( $records[ $idx ] );\r\n }\r\n\r\n return $records;\r\n }", "protected function resetIndex($key)\n {\n if (!array_key_exists($key, $this->mappedData)) {\n $this->index = 0;\n }\n }", "function reset_keys($data) {\n\t$new_arr = array();\n\tforeach($data as $key=>$value) {\n\t\t$new_arr[] = $value;\n\t}\n\treturn $new_arr;\n}", "public function fetchGroupedArrayByKey($sql, $key, $arrayMode = true)\n {\n $res = $this->query($sql);\n $out = array();\n while($row = $res->fetch_array(MYSQLI_ASSOC)) {\n if($arrayMode) {\n if(!isset($out[$row[$key]])) {\n $out[$row[$key]] = array();\n }\n $out[$row[$key]][] = $row;\n } else {\n $out[$row[$key]] = $row;\n }\n }\n return $out;\n }", "function groupBy(array $array, array $keys) : array\n {\n $key = array_shift($keys);\n\n $grouped = [];\n\n foreach ($array as $index => $value) { \n $groupKey = null;\n if (!is_string($key) && is_callable($key)) { \n $groupKey = $key($value); \n } else if (is_object($value)) { \n $groupKey = $value->{$key}; \n } else { \n $groupKey = $value[$key]; \n } \n $grouped[$groupKey][$index] = $value; \n }\n\n if (!empty($keys)) { \n foreach ($grouped as $groupKey => $value) { \n $grouped[$groupKey] = call_user_func_array([$this, 'groupBy'], [$value, $keys]); \n } \n } \n\n return $grouped; \n }", "function sortbygroup($col,$groupby) {\n $unique = array();\n $sorted = array();\n foreach ($col as $val) { //get all the unique values\n if (!in_array($val[$groupby],$unique)) {\n $unique[] = $val[$groupby];\n } \n }\n \n foreach($unique as $key) {\n foreach($col as $val) {//reads off the collection\n if($key == $val[$groupby]) {\n $sorted[] = $val;\n }\n }\n }\n return $sorted;\n}", "public function groupBy(array $fields, $order = null);", "public function groupBy($group=null)\n {\n $group = LambdaUtils::toSelectCallable($group);\n\n $result = new ObjectArray(array());\n if($this instanceof ObjectArray)\n {\n $result = $this->newInstance();\n }\n\n foreach($this as $record)\n {\n $key = call_user_func($group, $record);\n\n $data = array();\n if($this->__converter instanceof IListConverter)\n {\n $data = $this->newConverterInstance();\n }\n $newitemtype = new ArrayList($data);\n\n $result->get($key, $newitemtype, true)->add($record);\n }\n\n return $result;\n }", "public function arrayMergeKeepsIndexesAfterMerge() {}", "function ydgdict_group_search_results_by_entry( $groupby, $wp_query ) \n{\n if ( ! $wp_query->is_archive( 'entry' ) || ! $wp_query->is_search() || is_admin() ) return $groupby; // unchanged\n\n global $wpdb;\n\n return \" {$wpdb->posts}.ID \";\n}", "public function build_data() {\n $this->total_collection = (int)count($this->feeds);\n $redis_total_set = (int)$this->redis->hget($this->key_name, 'total:set'); \n \n $key = $this->redis->hgetall($this->key_name);\n $hosted_feeds = $this->group_and_build(); \n\n if(!$key || $redis_total_set !== $this->total_collection) {\n //echo \"Processing: Insert Data into Redis\";\n //insert data into redis\n $this->redis->hset($this->key_name, 'total:set', $this->total_collection);\n $page = 0;\n foreach($hosted_feeds as $feed_group => $feed_list) {\n $page_number = ++$page;\n $spring_data = Array($feed_group => $feed_list);\n $this->redis->hset($this->key_name, \"set:$page_number\", json_encode($spring_data));\n $spring_data = Null;\n }\n } \n \n }", "function change_index(&$tableau, $old_key, $new_key) {\n $changed = FALSE; $temp = 0;\n \n foreach ($tableau as $key => $value) {\n switch ($changed) {\n case FALSE :\n //creates the new key and deletes the old\n if ($key == $old_key) {\n $tableau[$new_key] = $tableau[$old_key];\n unset($tableau[$old_key]);\n $changed = TRUE;\n }\n break;\n\n case TRUE :\n //moves following keys\n if ($key != $new_key){\n $temp= $tableau[$key];\n unset($tableau[$key]);\n $tableau[$key] = $temp;\n break;\n } else {$changed = FALSE;} //stop\n }\n }\n array_values($tableau); //free_memory\n}", "public function refreshData($keyArr = null)\n {\n if ($this->offsetSize() > 0) {\n $_data = [];\n $offsets = $this->getOffsets();\n\n foreacH ($offsets as $key => $item) {\n $_data[(!is_null($keyArr) ? (isset($item[$keyArr]) ? $item[$keyArr] : $key) : $key)] = $item;\n }\n\n if (!empty($_data)) {\n $this->clearOffsets();\n $i = 0;\n foreach ($_data as $key => $item) {\n $this->offsetSet($i, $item);\n $i++;\n }\n\n if ($this->offsetSize() > 0) {\n $this->_isRefreshing = true;\n }\n }\n }\n\n return $this;\n }", "public function groupByProbe()\n {\n return $this\n ->reverse()\n ->reduce(function (Collection $carry, Collection $results) {\n foreach ($results as $result) {\n $carry->push($result);\n }\n return $carry;\n }, new static())\n ->groupBy('id');\n }", "protected function regenerateKeyCache()\n {\n if(is_array($this->__data))\n {\n $i=0;\n $this->__keycache = array();\n $this->__keycacheindex = array();\n foreach($this->__data as $key => $value)\n {\n $this->__keycache[$key] = $i;\n $this->__keycacheindex[$i] = $key;\n $i++;\n }\n }\n else\n {\n $this->__keycache = null;\n $this->__keycacheindex = null;\n }\n\n $this->__keycacheinvalid = false;\n }", "public function testGetGroupedAssocAsArray()\n {\n $array = array(\n 0 => array(\n 'data_source' => 'AttributeDataSource',\n 'attributeid' => 'name',\n 'attribute_type' => 'text',\n ),\n 1 => array(\n 'data_source' => 'AttributeDataSource',\n 'attributeid' => 'page_content',\n 'attribute_type' => 'long_text',\n ),\n 2 => array(\n 'data_source' => 'AttributeDataSource',\n 'attributeid' => 'created_datetime',\n 'attribute_type' => 'datetime',\n ),\n );\n\n $expected = array(\n 'AttributeDataSource' => array(\n array(\n 'attributeid' => 'name',\n 'attribute_type' => 'text',\n ),\n array(\n 'attributeid' => 'page_content',\n 'attribute_type' => 'long_text',\n ),\n array(\n 'attributeid' => 'created_datetime',\n 'attribute_type' => 'datetime',\n ),\n ),\n );\n\n $result = DAL::getGroupedAssoc($array);\n PHPUnit_Framework_Assert::assertEquals($expected, $result);\n\n $result = DAL::getGroupedAssoc($array, 'attribute_type');\n $expected = array(\n 'text' => array(\n 0 => array(\n 'data_source' => 'AttributeDataSource',\n 'attributeid' => 'name',\n ),\n ),\n 'long_text' => array(\n 0 => array(\n 'data_source' => 'AttributeDataSource',\n 'attributeid' => 'page_content',\n ),\n ),\n 'datetime' => array(\n 0 => array(\n 'data_source' => 'AttributeDataSource',\n 'attributeid' => 'created_datetime',\n ),\n ),\n );\n PHPUnit_Framework_Assert::assertEquals($expected, $result);\n\n }", "public function groupBy() {\n $fields = func_get_args();\n\n if (is_array($fields[0])) {\n $fields = $fields[0];\n }\n\n $this->_groupBy = array_unique(array_merge($this->_groupBy, $fields));\n\n return $this;\n }", "function group_totals($data){\n $group_label = $data['record_params']['group_label'];\n $unique_groups = array();\n $sql_records = $data['data'];\n $sub_group_labels = $data['record_params']['sub_group_labels'];\n foreach($sql_records as $record){\n $unique_groups[] = $record->$data['record_params']['group_label'];\n }\n $unique_groups = array_unique($unique_groups);\n $records = array();\n $grand_total = array();\n $grand_total[$group_label] = 'Grand Total';\n foreach($data['record_params']['sub_group_labels'] as $sub_group_label){\n $grand_total[$sub_group_label] = '';\n }\n foreach($data['numeric'] as $numeric_label){\n $grand_total[$numeric_label] = 0;\n }\n foreach($unique_groups as $group){\n $totals = array();\n $totals[$group_label] = ''; \n $record_label = '';\n foreach($data['record_params']['sub_group_labels'] as $sub_group_label){\n $totals[$sub_group_label] = '';\n }\n foreach($data['numeric'] as $numeric_label){\n $totals[$numeric_label] = 0;\n }\n foreach($sql_records as $record){\n if($record->$group_label == $group){\n $records[] = $record;\n foreach($data['numeric'] as $numeric_label){\n if(sizeof($sub_group_labels) > 0)\n $totals[$numeric_label] = $totals[$numeric_label] + $record->$numeric_label;\n $grand_total[$numeric_label] = $grand_total[$numeric_label] + $record->$numeric_label;\n }\n }\n }\n if(sizeof($sub_group_labels) > 0){\n $totals[$group_label] = $group.' Total';\n $records[] = (object)$totals;\n }\n }\n $records[] = (object)$grand_total;\n return $records;\n }", "public function stripGroupByForGroupByKeywordDataProvider() {}", "public function rebuildIndex()\n {\n $this->elastic->deleteIndex(self::INDEX);\n $this->elastic->addIndexCompanion(self::INDEX);\n }", "public function arrayResultsWithKey($key='id'){\n\t\tif(isset($this->arrayedResult)){\n\t\t\tunset($this->arrayedResult);\n\t\t}\n\t\t$this->arrayedResult = array();\n\t\twhile($row = mysqli_fetch_assoc($this->result)){\n\t\t\tforeach($row as $theKey => $theValue){\n\t\t\t\t$this->arrayedResult[$row[$key]][$theKey] = $theValue;\n\t\t\t}\n\t\t}\n\t\treturn $this->arrayedResult;\n\t}", "public function rotate_db_data($dbdata){\n\t\t\n\t\t$return = array();\n\t\t$count = count($dbdata);\n\t\t$firstRow = $dbdata[0];\n\n\t\tforeach($firstRow as $f => $v){\n\t\t\t\n\t\t\t// loop through each key\n\t\t\t\n\t\t\t$rowKey = array();\n\t\t\t$sum = 0;\n\t\t\tfor($i = 0; $i < $count; $i++) {\n\t\t\t\t// loop all data\n\t\t\t\t$rowKey[] = $dbdata[$i][$f];\t// add to new row key (auto increase index by 1)\n\t\t\t\t$sum += $dbdata[$i][$f];\n\t\t\t}\n\t\t\t\n\t\t\tif($sum > 0){\n\t\t\t\n\t\t\t\t$return[$f] = $rowKey;\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "function array_counts($arr,$key,$data = 'rows')\n {\n foreach($arr as $item) {\n $item['rows'] =1;\n if (!isset($res[$item[$key]])) {\n $res[$item[$key]] = $item;\n }else{\n $res[$item[$key]][$data] +=$item['rows'] ;\n }\n }\n return $res;\n }", "function pushToKeyLoop($dataList,$arrayInput,$childKey=\"child\"){ \n foreach ($dataList as $key => $value) {\n foreach ($value as $keyData => $valueData) {\n $arrayInput = self::pushToKey($key,$keyData,$valueData,$arrayInput,$childKey);\n }\n }\n ksort($arrayInput);\n return $arrayInput;\n}", "function groupByHeader(&$conf,$GBCode,$menuRow,&$groupBy,&$lastgroupBy,&$evalGroupBy,$GrpByField,&$lc,&$gc,&$i,&$pagejump,&$sql,$end=false,&$DEBUG,$nbrow) {\n\t\t// group by field handling\n\t\t//if ($end) return;\n\t\t$GBmarkerArray=array();\n\t\t$groupByFields=\"\";\n\t\t$gbflag=0;\n\t\t$newGroupBy=array();\n\t\tif ($conf['list.']['groupByFieldBreaks']) {\n\t\t\t$fNA=t3lib_div::trimexplode(',',$conf['list.']['groupByFieldBreaks']);\n\t\t\tforeach($fNA as $fN) {\n\t\t\t\t$fN2=t3lib_div::trimexplode(':',$fN);\n\t\t\t\t$fN=$fN2[0];\n\t\t\t\t//if ($conf['list.']['hiddenGroupByField.'][$fN]) continue;\n\n\t\t\t\t$GBmarkerArray['###GROUPBY_'.$fN.'###']=\"\";\n\t\t\t\t//error_log(__METHOD__.\": -\".$groupBy[$fN].\"!==\".$this->metafeeditlib->transformGroupByData($fN,$menuRow[$GrpByField[$fN]?$GrpByField[$fN]:$fN],$conf));\n\t\t\t\tif (($groupBy[$fN]!==$this->metafeeditlib->transformGroupByData($fN,$menuRow[$GrpByField[$fN]?$GrpByField[$fN]:$fN],$conf) || $end) && !$conf['list.']['hiddenGroupByField.'][$fN]) {\n\t\t\t\t\t// Group by field change !\n\t\t\t\t\t$GBmarkerArray['###FOOTERSUM_'.$fN.'_FIELD_metafeeditnbelts###']='';\n\t\t\t\t\t//error_log(__METHOD__.\": aa- $nbrow : \".$evalGroupBy[$fN]);\n\t\t\t\t\tif ($nbrow>1) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$GBmarkerArray['###GROUPBYFOOTER_'.$fN.'###']=$evalGroupBy[$fN]; \n\t\t\t\t\t\t$this->metafeeditlib->getGroupByFooterSums($conf,'FOOTERSUM',$GBmarkerArray,$fN,$sql,$lastgroupBy,$end,$DEBUG);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$GBCode=$this->cObj->substituteSubpart($GBCode, '###GROUPBYFOOTERFIELD_'.$fN.'###','');\n\t\t\t\t\t}\n\t\t\t\t\t$std=$menuRow[$fN];\n\n\t\t\t\t\t// Default we get value from std group by field ...\n\t\t\t\t\tif ($GrpByField[$fN]) {\n\t\t\t\t\t $std=$menuRow[$GrpByField[$fN]];\n\t\t\t\t\t if ($menuRow['EVAL_'.str_replace('.','_',$GrpByField[$fN])]) $std=$menuRow['EVAL_'.str_replace('.','_',$GrpByField[$fN])];\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t// stdWrap on group by.\t\t\n\t\t\t\t\t$_fN=str_replace('.','_',$fN);\n\t\t\t\t\tif ($conf['list.']['groupByFields.']['stdWrap.'][$_fN.'.']) {\n\t\t\t\t\t $this->cObj->start($menuRow,$this->theTable);\n\t\t\t\t\t $std=$this->cObj->stdWrap($std,$conf['list.']['groupByFields.']['stdWrap.'][$_fN.'.']);\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t// ??? \t\n\t\t\t\t\t\n\t\t\t\t\tif ($GrpByField[$fN]) {\n\t\t\t\t\t\t$newGroupBy[$fN]=$menuRow[$GrpByField[$fN]];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$newGroupBy[$fN]=$menuRow[$fN];\n\t\t\t\t\t\tif ($menuRow['EVAL_'.$_fN]) $std=$menuRow['EVAL_'.$_fN];\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\t\t// we set group by flag\n\t\t\t\t\t$gbflag=1;\n\t\t\t\t\t$GBmarkerArray['###GROUPBY_'.$fN.'###']=$std;\n\t\t\t\t\t$evalGroupBy[$fN]=$std;\n\t\t\t\t\t// We have to reset all son groupbys so that the headers will be regenerated...\n\t\t\t\t\t$resetgbf=FALSE;\n\t\t\t\t\tif (is_array($groupBy)) foreach ($groupBy as $gbf=>$val) {\n\t\t\t\t\t\tif ( $resetgbf) unset($groupBy[$gbf]);\n\t\t\t\t\t\tif ($gbf==$fN) $resetgbf=TRUE;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// we clear unused group bys \n\t\t\t\t\t$GBCode=$this->cObj->substituteSubpart($GBCode, '###GROUPBYFIELD_'.$fN.'###','');\n\t\t\t\t\t$GBCode=$this->cObj->substituteSubpart($GBCode, '###GROUPBYFOOTERFIELD_'.$fN.'###','');\n\t\t\t\t}\n\t\t\t\t// We clear next group by if end of list is reached\n\t\t\t\tif ($end) $GBCode=$this->cObj->substituteSubpart($GBCode, '###GROUPBYFIELD_'.$fN.'###','');\n\t\t\t}\n\t\t\tforeach($newGroupBy as $fN=>$val) {\n\t\t\t\t$groupBy[$fN]=$this->metafeeditlib->transformGroupByData($fN,$val,$conf);\n\t\t\t\t//$lastgroupBy[$fN]=$menuRow[$GrpByField[$fN]?$GrpByField[$fN]:$fN];\n\t\t\t\t$lastgroupBy[$fN]=$this->metafeeditlib->transformGroupByData($fN,$menuRow[$GrpByField[$fN]?$GrpByField[$fN]:$fN],$conf);\n\t\t\t}\n\t\t}\n\t\tif ($gbflag) {\n\t\t\t$groupByFields=$this->cObj->substituteMarkerArray($GBCode, $GBmarkerArray);\n\t\t\t$gc++;\n\t\t\t// Jump page on group by\n\t\t\tif ($gc>1 && $conf['list.']['jumpPageOnGroupBy']) {\n\t\t\t $pagejump=1;\n\t\t\t}\n\t\t\tif ($conf['list.']['groupBySize']) {\n\t\t\t\t$lc=$lc+$conf['list.']['groupBySize'];\n\t\t\t}\n\t\t\tif ($conf['list.']['no_detail']) $lc++; //MMM\n\n\t\t\tif ($gc>1 && $dispDir=='Right') $lc++;\n\t\t\t$i=0; // pour fin de ligne\n\t\t}\n\t\t//error_log(__METHOD__.\"end: -\".print_r($groupByFields,true)); \n\t\treturn $groupByFields;\n\t}", "function group_repeated_csv_headers() {\n //allow, since we have a dynamic number of cluster levels\n return true;\n }", "public function groupBy($callback);", "public static function regroup ($data, $regroupByColumn, $removeGroupColumn = true, $regroupedColumnKnownUnique = false)\r\n\t{\r\n\t\t# Return the data unmodified if not an array or empty\r\n\t\tif (!is_array ($data) || empty ($data)) {return $data;}\r\n\t\t\r\n\t\t# Rearrange the data\r\n\t\t$rearrangedData = array ();\r\n\t\tforeach ($data as $key => $values) {\r\n\t\t\t$grouping = $values[$regroupByColumn];\r\n\t\t\tif ($removeGroupColumn) {\r\n\t\t\t\tunset ($data[$key][$regroupByColumn]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t# Add the data; if the regroup-by column is known to be unique, then don't create a nested array\r\n\t\t\tif ($regroupedColumnKnownUnique) {\r\n\t\t\t\t$rearrangedData[$grouping] = $data[$key];\r\n\t\t\t} else {\r\n\t\t\t\t$rearrangedData[$grouping][$key] = $data[$key];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t# Return the data\r\n\t\treturn $rearrangedData;\r\n\t}", "function group_data($data_awal_perolehan, $data_akhir_perolehan, $data_hapus_awal, $tgl_akhir = \"\", $tgl_awal = \"\")\n{\n\n //tes\n $data_awal = array();\n\n foreach ($data_awal_perolehan as $arg) {\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Kelompok' ] = $arg[ 'kelompok' ];\n\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'TahunPenyusutan' ] = $arg[ 'TahunPenyusutan' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Aset_ID' ] = $arg[ 'Aset_ID' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Tahun' ] = $arg[ 'Tahun' ];\n\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'TglPembukuan' ] = $arg[ 'TglPembukuan' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Aset_ID' ] = $arg[ 'Aset_ID' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'kodeSatker' ] = \"{$arg['kodeSatker']}\";\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'kodeKelompok' ] = \"{$arg['kelompok']}\";\n\n\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Uraian' ] = $arg[ 'Uraian' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'nilai' ] += $arg[ 'nilai' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'PP' ] += $arg[ 'PP' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'AP' ] += $arg[ 'AP' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'NB' ] += $arg[ 'NB' ];\n $data_awal[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'jml' ] += 1;\n }\n\n $data_akhir = array();\n\n foreach ($data_akhir_perolehan as $arg) {\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Kelompok' ] += $arg[ 'kelompok' ];\n\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'TahunPenyusutan' ] = $arg[ 'TahunPenyusutan' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Aset_ID' ] = $arg[ 'Aset_ID' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Tahun' ] = $arg[ 'Tahun' ];\n\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'TglPembukuan' ] = $arg[ 'TglPembukuan' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Aset_ID' ] = $arg[ 'Aset_ID' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'kodeSatker' ] = \"{$arg['kodeSatker']}\";\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'kodeKelompok' ] = \"{$arg['kelompok']}\";\n\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Uraian' ] = $arg[ 'Uraian' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'nilai' ] += $arg[ 'nilai' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'PP' ] += $arg[ 'PP' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'AP' ] += $arg[ 'AP' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'NB' ] += $arg[ 'NB' ];\n $data_akhir[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'jml' ] += 1;\n }\n\n $data_hapus_tmp = array();\n\n foreach ($data_hapus_awal as $arg) {\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Kelompok' ] += $arg[ 'kelompok' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Uraian' ] += $arg[ 'Uraian' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'nilai' ] += $arg[ 'nilai' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'PP' ] += $arg[ 'PP' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'AP' ] += $arg[ 'AP' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'NB' ] += $arg[ 'NB' ];\n\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Aset_ID' ] = $arg[ 'Tahun' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'TglPembukuan' ] = $arg[ 'TglPembukuan' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'Aset_ID' ] = $arg[ 'Aset_ID' ];\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'kodeSatker' ] = \"{$arg['kodeSatker']}\";\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'kodeKelompok' ] = \"{$arg['kelompok']}\";\n\n $data_hapus_tmp[ $arg[ 'kelompok' ] . '.' . $arg[ 'Tahun' ] . '-' . $arg[ 'noRegister' ] . '-' . $arg[ 'Aset_ID' ] ][ 'jml' ] += 1;\n }\n\n\n $result = array_intersect ($data_awal, $data_akhir);\n//memasukan nilai selisih\n $data_gabungan = array();\n foreach ($result as $key => $value) {\n $tipe = $key;\n $selisih_nilai = $data_akhir[ $tipe ][ 'nilai' ] - $data_awal[ $tipe ][ 'nilai' ];\n $selisih_jml = $data_akhir[ $tipe ][ 'jml' ] - $data_awal[ $tipe ][ 'jml' ];\n $selisih_ap = $data_akhir[ $tipe ][ 'AP' ] - $data_awal[ $tipe ][ 'AP' ];\n $selisih_pp = $data_akhir[ $tipe ][ 'PP' ] - $data_awal[ $tipe ][ 'PP' ];\n $selisih_nb = $data_akhir[ $tipe ][ 'NB' ] - $data_awal[ $tipe ][ 'NB' ];\n\n\n $selisih_nilai_tambah = 0;\n $selisih_nilai_kurang = 0;\n $selisih_jml_tambah = 0;\n $selisih_jml_kurang = 0;\n $selisih_ap_tambah = 0;\n $selisih_ap_kurang = 0;\n $selisih_nb_tambah = 0;\n $selisih_nb_kurang = 0;\n $bp = 0;\n\n /*$selisih_pp_tambah=0;\n $selisih_pp_kurang=0;*/\n if($data_akhir[ $tipe ][ kodeSatker ] == \"\") {\n $data_selisih = $data_awal;\n $selisih_nilai_tambah = 0;\n $selisih_nilai_kurang = $data_awal[ $tipe ][ 'nilai' ];\n $selisih_jml_tambah = 0;\n $selisih_jml_kurang = 1;\n $selisih_ap_tambah = 0;\n $selisih_ap_kurang = $data_awal[ $tipe ][ 'AP' ];\n $selisih_nb_tambah = 0;\n $selisih_nb_kurang = $data_awal[ $tipe ][ 'NB' ];\n $bp = 0;\n\n } else {\n $data_selisih = $data_akhir;\n $kodesatker = $data_selisih[ $tipe ][ kodeSatker ];\n $aset_id = $data_selisih[ $tipe ][ Aset_ID ];\n $kodeKelompok = $data_selisih[ $tipe ][ 'kodeKelompok' ];\n $tglperolehan = $tgl_akhir;\n\n $tglpembukuan = $data_selisih[ $tipe ][ 'TglPembukuan' ];\n list($bp, $selisih_nilai_tambah, $selisih_nilai_kurang, $selisih_ap_tambah, $selisih_ap_kurang) =\n history_aset ($kodesatker, $aset_id, $tglperolehan, $tgl_awal, $tglpembukuan, $kodeKelompok);\n }\n\n\n /*if($selisih_nilai<0)\n $selisih_nilai_kurang=abs($selisih_nilai);\n else $selisih_nilai_tambah=$selisih_nilai;*/\n\n if($selisih_jml < 0)\n $selisih_jml_kurang = abs ($selisih_jml);\n else $selisih_jml_tambah = $selisih_jml;\n\n\n /* if($data_akhir[$tipe]['nilai']!=0 && $data_awal[$tipe]['nilai']!=0 && $selisih_nilai!=0){\n if($selisih_ap<0)\n $selisih_ap_kurang=abs($selisih_ap);\n else $selisih_ap_tambah=$selisih_ap;\n }\n\n if($data_akhir[$tipe]['AP']==\"\"||$data_akhir[$tipe]['AP']==0)\n $selisih_ap_kurang=abs($selisih_ap);\n else if($data_awal[$tipe]['AP']==\"\"||$data_awal[$tipe]['AP']==0)\n $selisih_ap_tambah=$selisih_ap;\n\n $data_gabungan[$tipe]['bp']=$selisih_ap-$selisih_ap_tambah+$selisih_ap_kurang;\n\n if($selisih_nb<0)\n $selisih_nb_kurang=abs($selisih_nb);\n else\n $selisih_nb_tambah=$selisih_nb;\n\n if($selisih_pp<0)\n $selisih_pp_kurang=$selisih_pp;\n else\n $selisih_pp_tambah=$selisih_pp;*/\n\n $data_gabungan[ $tipe ][ 'Kelompok' ] = $tipe;\n $data_gabungan[ $tipe ][ 'Uraian' ] = $data_awal[ $tipe ][ 'Uraian' ];\n $data_gabungan[ $tipe ][ 'nilai' ] = $data_awal[ $tipe ][ 'nilai' ];\n $data_gabungan[ $tipe ][ 'jml' ] = $data_awal[ $tipe ][ 'jml' ];\n $data_gabungan[ $tipe ][ 'ap' ] = $data_awal[ $tipe ][ 'AP' ];\n $data_gabungan[ $tipe ][ 'pp' ] = $data_awal[ $tipe ][ 'PP' ];\n $data_gabungan[ $tipe ][ 'nb' ] = $data_awal[ $tipe ][ 'NB' ];\n\n $data_gabungan[ $tipe ][ 'mutasi_jml_tambah' ] = $selisih_jml_tambah;\n $data_gabungan[ $tipe ][ 'mutasi_jml_kurang' ] = $selisih_jml_kurang;\n\n $data_gabungan[ $tipe ][ 'mutasi_ap_tambah' ] = $selisih_ap_tambah;\n $data_gabungan[ $tipe ][ 'mutasi_ap_kurang' ] = $selisih_ap_kurang;\n\n /* $data_gabungan[$tipe]['mutasi_pp_tambah']=$selisih_pp_tambah;\n $data_gabungan[$tipe]['mutasi_pp_kurang']=$selisih_pp_kurang;*/\n\n $data_gabungan[ $tipe ][ 'mutasi_nb_tambah' ] = $selisih_nb_tambah;\n $data_gabungan[ $tipe ][ 'mutasi_nb_kurang' ] = $selisih_nb_kurang;\n\n $data_gabungan[ $tipe ][ 'bp' ] = $bp;\n\n\n $data_gabungan[ $tipe ][ 'mutasi_nilai_tambah' ] = $selisih_nilai_tambah;\n $data_gabungan[ $tipe ][ 'mutasi_nilai_kurang' ] = $selisih_nilai_kurang;\n\n $data_gabungan[ $tipe ][ 'nilai_akhir' ] = $data_akhir[ $tipe ][ 'nilai' ];\n $data_gabungan[ $tipe ][ 'jml_akhir' ] = $data_akhir[ $tipe ][ 'jml' ];\n $data_gabungan[ $tipe ][ 'ap_akhir' ] = $data_akhir[ $tipe ][ 'AP' ];\n $data_gabungan[ $tipe ][ 'pp_akhir' ] = $data_akhir[ $tipe ][ 'PP' ];\n $data_gabungan[ $tipe ][ 'nb_akhir' ] = $data_akhir[ $tipe ][ 'NB' ];\n\n\n }\n//echo \"array gabungan:<br/><pre>\";\n//print_r($result);\n\n//hitung yang tidak masuk dalam intersection\n $data_awal_alone = array_diff_assoc ($data_awal, $data_gabungan);\n//echo \"array awal sendiri:<br/><pre>\";\n//print_r($data_awal_alone);\n\n $data_awal = array();\n foreach ($data_awal_alone as $tipe => $value) {\n $data_awal[ $tipe ][ 'Kelompok' ] = $tipe;\n $data_awal[ $tipe ][ 'Uraian' ] = $value[ 'Uraian' ];\n $data_awal[ $tipe ][ 'nilai' ] = $value[ 'nilai' ];\n $data_awal[ $tipe ][ 'jml' ] = $value[ 'jml' ];\n $data_awal[ $tipe ][ 'ap' ] = $value[ 'AP' ];\n $data_awal[ $tipe ][ 'pp' ] = $value[ 'PP' ];\n $data_awal[ $tipe ][ 'nb' ] = $value[ 'NB' ];\n $data_awal[ $tipe ][ 'mutasi_nilai_tambah' ] = 0;\n $data_awal[ $tipe ][ 'mutasi_jml_tambah' ] = 0;\n $data_awal[ $tipe ][ 'mutasi_ap_tambah' ] = 0;\n $data_awal[ $tipe ][ 'mutasi_pp_tambah' ] = 0;\n $data_awal[ $tipe ][ 'mutasi_nb_tambah' ] = 0;\n /*\n $data_awal[$tipe]['mutasi_nilai_kurang']=0;\n $data_awal[$tipe]['mutasi_jml_kurang']=0;\n $data_awal[$tipe]['mutasi_ap_kurang']=0;\n $data_awal[$tipe]['mutasi_pp_kurang']=0;\n $data_awal[$tipe]['mutasi_nb_kurang']=0;\n\n $data_awal[$tipe]['nilai_akhir']=$value['nilai'];\n $data_awal[$tipe]['jml_akhir']=$value['jml'];\n $data_awal[$tipe]['ap_akhir']=$value['AP'];\n $data_awal[$tipe]['pp_akhir']=$value['PP'];\n $data_awal[$tipe]['nb_akhir']=$value['NB'];*/\n\n $data_awal[ $tipe ][ 'mutasi_nilai_kurang' ] = $value[ 'nilai' ];\n $data_awal[ $tipe ][ 'mutasi_jml_kurang' ] = $value[ 'jml' ];\n $data_awal[ $tipe ][ 'mutasi_ap_kurang' ] = $value[ 'AP' ];\n $data_awal[ $tipe ][ 'mutasi_pp_kurang' ] = $value[ 'PP' ];\n $data_awal[ $tipe ][ 'mutasi_nb_kurang' ] = $value[ 'NB' ];\n\n $data_awal[ $tipe ][ 'bp' ] = 0;\n\n $data_awal[ $tipe ][ 'nilai_akhir' ] = 0;\n $data_awal[ $tipe ][ 'jml_akhir' ] = 0;\n $data_awal[ $tipe ][ 'ap_akhir' ] = 0;\n $data_awal[ $tipe ][ 'pp_akhir' ] = 0;\n $data_awal[ $tipe ][ 'nb_akhir' ] = 0;\n\n\n }\n\n\n $data_akhir_alone = array_diff_assoc ($data_akhir, $data_gabungan);\n//echo \"array akhir sendiri:<br/><pre>\";\n//print_r($data_akhir_alone);\n\n $data_akhir = array();\n foreach ($data_akhir_alone as $tipe => $value) {\n\n $Aset_ID = $value[ 'Aset_ID' ];\n $TahunPenyusutan = $value[ 'TahunPenyusutan' ];\n $kelompok = $value[ 'Kelompok' ];\n $Tahun = $value[ 'Tahun' ];\n /*$akumulasi_sblm=get_akumulasi_sblm($Aset_ID, $TahunPenyusutan, $kelompok);\n\n if($Tahun==$TahunPenyusutan){\n //pengadaan di tahun berjalan\n $akumulasi_sblm=0;\n $bp=$value['AP'];\n }\n else{\n //transfer dari tempat lain\n if($akumulasi_sblm==0){\n //barang inventarisasi\n $bp=$value['AP'];\n $akumulasi_sblm=0;\n }\n $bp=$value['AP']-$akumulasi_sblm;\n //bila tidak penyusutan lagi\n if($bp==$value['AP'])\n {\n $bp=0;\n $akumulasi_sblm=$value['AP'];\n }\n }*/\n\n $data_akhir[ $tipe ][ 'Kelompok' ] = $tipe;\n $data_akhir[ $tipe ][ 'Uraian' ] = $value[ 'Uraian' ];\n\n $data_akhir[ $tipe ][ 'nilai' ] = 0;\n $data_akhir[ $tipe ][ 'jml' ] = 0;\n $data_akhir[ $tipe ][ 'ap' ] = 0;\n $data_akhir[ $tipe ][ 'pp' ] = 0;\n $data_akhir[ $tipe ][ 'nb' ] = 0;\n\n $selisih_nilai_tambah = 0;\n $selisih_nilai_kurang = 0;\n $selisih_jml_tambah = 0;\n $selisih_jml_kurang = 0;\n $selisih_ap_tambah = 0;\n $selisih_ap_kurang = 0;\n $selisih_nb_tambah = 0;\n $selisih_nb_kurang = 0;\n $bp = 0;\n\n /*$selisih_pp_tambah=0;\n $selisih_pp_kurang=0;*/\n\n $kodesatker = $value[ 'kodeSatker' ];\n $aset_id = $value[ 'Aset_ID' ];\n $kodekelompok = $value[ 'kodeKelompok' ];\n $tglperolehan = $tgl_akhir;\n $tglpembukuan = $value[ 'TglPembukuan' ];\n /* echo \"<pre>\";\n print_r($data_akhir);\n print_r($value);\n echo \"Aset=$tglperolehan==$tipe==$Aset_ID==$tglpembukuan==$kodekelompok<br/>\";\n // exit();*/\n list($bp, $selisih_nilai_tambah, $selisih_nilai_kurang, $selisih_ap_tambah, $selisih_ap_kurang) =\n history_aset ($kodesatker, $Aset_ID, $tglperolehan, $tgl_awal, $tglpembukuan, $kodekelompok);\n if($bp == 0) {\n $selisih_jml_tambah = $value[ 'jml' ];\n $selisih_ap_tambah = $value[ 'AP' ];\n $selisih_nilai_tambah = $value[ 'nilai' ];\n }\n\n /* $data_akhir[$tipe]['mutasi_jml_tambah']=$value['jml'];\n $data_akhir[$tipe]['mutasi_nilai_tambah']=$value['nilai'];\n $data_akhir[$tipe]['mutasi_ap_tambah']=$akumulasi_sblm;//$value['AP'];\n $data_akhir[$tipe]['mutasi_pp_tambah']=$value['PP'];\n $data_akhir[$tipe]['mutasi_nb_tambah']=$value['NB'];\n\n $data_akhir[$tipe]['mutasi_nilai_kurang']=0;\n $data_akhir[$tipe]['mutasi_jml_kurang']=0;\n $data_akhir[$tipe]['mutasi_ap_kurang']=0;\n $data_akhir[$tipe]['mutasi_pp_kurang']=0;\n $data_akhir[$tipe]['mutasi_nb_kurang']=0;\n\n $data_akhir[$tipe]['bp']=$bp;//$value['AP'];*/\n $data_akhir[ $tipe ][ 'mutasi_jml_tambah' ] = $selisih_jml_tambah;\n $data_akhir[ $tipe ][ 'mutasi_jml_kurang' ] = $selisih_jml_kurang;\n\n $data_akhir[ $tipe ][ 'mutasi_ap_tambah' ] = $selisih_ap_tambah;\n $data_akhir[ $tipe ][ 'mutasi_ap_kurang' ] = $selisih_ap_kurang;\n\n /* $data_gabungan[$tipe]['mutasi_pp_tambah']=$selisih_pp_tambah;\n $data_gabungan[$tipe]['mutasi_pp_kurang']=$selisih_pp_kurang;*/\n\n $data_akhir[ $tipe ][ 'mutasi_nilai_tambah' ] = $selisih_nilai_tambah;\n $data_akhir[ $tipe ][ 'mutasi_nilai_kurang' ] = 0;\n\n $data_akhir[ $tipe ][ 'mutasi_nb_tambah' ] = $selisih_nb_tambah;\n $data_akhir[ $tipe ][ 'mutasi_nb_kurang' ] = $selisih_nb_kurang;\n\n $data_akhir[ $tipe ][ 'bp' ] = $bp;\n\n $data_akhir[ $tipe ][ 'nilai_akhir' ] = $value[ 'nilai' ];\n $data_akhir[ $tipe ][ 'jml_akhir' ] = $value[ 'jml' ];\n $data_akhir[ $tipe ][ 'ap_akhir' ] = $value[ 'AP' ];\n $data_akhir[ $tipe ][ 'pp_akhir' ] = $value[ 'PP' ];\n $data_akhir[ $tipe ][ 'nb_akhir' ] = $value[ 'NB' ];\n\n\n }\n\n $data_hapus = array();\n foreach ($data_hapus_tmp as $tipe => $value) {\n $data_hapus[ $tipe ][ 'Kelompok' ] = $tipe;\n $data_hapus[ $tipe ][ 'Uraian' ] = $value[ 'Uraian' ];\n\n $data_hapus[ $tipe ][ 'nilai' ] = 0;\n $data_hapus[ $tipe ][ 'jml' ] = 0;\n $data_hapus[ $tipe ][ 'ap' ] = 0;\n $data_hapus[ $tipe ][ 'pp' ] = 0;\n $data_hapus[ $tipe ][ 'nb' ] = 0;\n $data_hapus[ $tipe ][ 'mutasi_jml_tambah' ] = $value[ 'jml' ];\n $data_hapus[ $tipe ][ 'mutasi_nilai_tambah' ] = $value[ 'nilai' ];\n $data_hapus[ $tipe ][ 'mutasi_ap_tambah' ] = $value[ 'AP' ];\n $data_hapus[ $tipe ][ 'mutasi_pp_tambah' ] = $value[ 'PP' ];\n $data_hapus[ $tipe ][ 'mutasi_nb_tambah' ] = $value[ 'NB' ];\n\n $data_hapus[ $tipe ][ 'mutasi_jml_kurang' ] = $value[ 'jml' ];\n $data_hapus[ $tipe ][ 'mutasi_nilai_kurang' ] = $value[ 'nilai' ];\n $data_hapus[ $tipe ][ 'mutasi_ap_kurang' ] = $value[ 'AP' ];\n $data_hapus[ $tipe ][ 'mutasi_pp_kurang' ] = $value[ 'PP' ];\n $data_hapus[ $tipe ][ 'mutasi_nb_kurang' ] = $value[ 'NB' ];\n\n $data_hapus[ $tipe ][ 'bp' ] = 0;//$value['AP'];\n\n $data_hapus[ $tipe ][ 'nilai_akhir' ] = 0;\n $data_hapus[ $tipe ][ 'jml_akhir' ] = 0;\n $data_hapus[ $tipe ][ 'ap_akhir' ] = 0;\n $data_hapus[ $tipe ][ 'pp_akhir' ] = 0;\n $data_hapus[ $tipe ][ 'nb_akhir' ] = 0;\n\n\n }\n\n\n /*echo \"array akhir:<br/><pre>\";\n print_r($data_akhir);//data-sub-sub\n exit;*/\n $data_gabungan = array_merge ($data_awal, $data_gabungan, $data_akhir, $data_hapus);\n\n//echo \"array gabungan:<br/><pre>\";\n//print_r($data_gabungan);//data-sub-sub\n//\n $data_level5 = array();\n foreach ($data_gabungan as $key => $value) {\n $tmp = explode (\".\", $key);\n $key_baru = \"{$tmp[0]}.{$tmp[1]}.{$tmp[2]}.{$tmp[3]}.{$tmp[4]}\";\n $URAIAN = get_uraian ($key_baru, 5);\n\n $data_level5[ $key_baru ][ 'Uraian' ] = $URAIAN;\n $data_level5[ $key_baru ][ 'Kelompok' ] = $key_baru;\n $data_level5[ $key_baru ][ 'nilai' ] += round($data_gabungan[ $key ][ 'nilai' ],2);\n $data_level5[ $key_baru ][ 'jml' ] += round($data_gabungan[ $key ][ 'jml' ],2);\n $data_level5[ $key_baru ][ 'ap' ] += round($data_gabungan[ $key ][ 'ap' ],2);\n $data_level5[ $key_baru ][ 'pp' ] += round($data_gabungan[ $key ][ 'pp' ],2);\n $data_level5[ $key_baru ][ 'nb' ] += round($data_gabungan[ $key ][ 'nb' ],2);\n $data_level5[ $key_baru ][ 'mutasi_jml_tambah' ] += $data_gabungan[ $key ][ 'mutasi_jml_tambah' ];\n $data_level5[ $key_baru ][ 'mutasi_nilai_tambah' ] += $data_gabungan[ $key ][ 'mutasi_nilai_tambah' ];\n $data_level5[ $key_baru ][ 'mutasi_ap_tambah' ] += $data_gabungan[ $key ][ 'mutasi_ap_tambah' ];\n $data_level5[ $key_baru ][ 'mutasi_pp_tambah' ] += $data_gabungan[ $key ][ 'mutasi_pp_tambah' ];\n $data_level5[ $key_baru ][ 'mutasi_nb_tambah' ] += $data_gabungan[ $key ][ 'mutasi_nb_tambah' ];\n\n $data_level5[ $key_baru ][ 'bp' ] += $data_gabungan[ $key ][ 'bp' ];\n\n $data_level5[ $key_baru ][ 'mutasi_jml_kurang' ] += $data_gabungan[ $key ][ 'mutasi_jml_kurang' ];\n $data_level5[ $key_baru ][ 'mutasi_nilai_kurang' ] += $data_gabungan[ $key ][ 'mutasi_nilai_kurang' ];\n $data_level5[ $key_baru ][ 'mutasi_ap_kurang' ] += $data_gabungan[ $key ][ 'mutasi_ap_kurang' ];\n $data_level5[ $key_baru ][ 'mutasi_pp_kurang' ] += $data_gabungan[ $key ][ 'mutasi_pp_kurang' ];\n $data_level5[ $key_baru ][ 'mutasi_nb_kurang' ] += $data_gabungan[ $key ][ 'mutasi_nb_kurang' ];\n\n $data_level5[ $key_baru ][ 'nilai_akhir' ] += round($data_gabungan[ $key ][ 'nilai_akhir' ],2);\n $data_level5[ $key_baru ][ 'jml_akhir' ] += round($data_gabungan[ $key ][ 'jml_akhir' ],2);\n $data_level5[ $key_baru ][ 'ap_akhir' ] += round($data_gabungan[ $key ][ 'ap_akhir' ],2);\n $data_level5[ $key_baru ][ 'pp_akhir' ] += round($data_gabungan[ $key ][ 'pp_akhir' ],2);\n $data_level5[ $key_baru ][ 'nb_akhir' ] += round($data_gabungan[ $key ][ 'nb_akhir' ],2);\n\n\n }\n //$data_level5 = $data_gabungan;\n $data_level4 = array();\n//Buat array gabungan --> level 4\n foreach ($data_level5 as $key => $value) {\n $tmp = explode (\".\", $key);\n $key_baru = \"{$tmp[0]}.{$tmp[1]}.{$tmp[2]}.{$tmp[3]}\";\n $URAIAN = get_uraian ($key_baru, 4);\n\n $data_level4[ $key_baru ][ 'Uraian' ] = $URAIAN;\n $data_level4[ $key_baru ][ 'Kelompok' ] = $key_baru;\n $data_level4[ $key_baru ][ 'nilai' ] += $data_level5[ $key ][ 'nilai' ];\n $data_level4[ $key_baru ][ 'jml' ] += $data_level5[ $key ][ 'jml' ];\n $data_level4[ $key_baru ][ 'ap' ] += $data_level5[ $key ][ 'ap' ];\n $data_level4[ $key_baru ][ 'pp' ] += $data_level5[ $key ][ 'pp' ];\n $data_level4[ $key_baru ][ 'nb' ] += $data_level5[ $key ][ 'nb' ];\n $data_level4[ $key_baru ][ 'mutasi_jml_tambah' ] += $data_level5[ $key ][ 'mutasi_jml_tambah' ];\n $data_level4[ $key_baru ][ 'mutasi_nilai_tambah' ] += $data_level5[ $key ][ 'mutasi_nilai_tambah' ];\n $data_level4[ $key_baru ][ 'mutasi_ap_tambah' ] += $data_level5[ $key ][ 'mutasi_ap_tambah' ];\n $data_level4[ $key_baru ][ 'mutasi_pp_tambah' ] += $data_level5[ $key ][ 'mutasi_pp_tambah' ];\n $data_level4[ $key_baru ][ 'mutasi_nb_tambah' ] += $data_level5[ $key ][ 'mutasi_nb_tambah' ];\n\n $data_level4[ $key_baru ][ 'bp' ] += $data_level5[ $key ][ 'bp' ];\n\n $data_level4[ $key_baru ][ 'mutasi_jml_kurang' ] += $data_level5[ $key ][ 'mutasi_jml_kurang' ];\n $data_level4[ $key_baru ][ 'mutasi_nilai_kurang' ] += $data_level5[ $key ][ 'mutasi_nilai_kurang' ];\n $data_level4[ $key_baru ][ 'mutasi_ap_kurang' ] += $data_level5[ $key ][ 'mutasi_ap_kurang' ];\n $data_level4[ $key_baru ][ 'mutasi_pp_kurang' ] += $data_level5[ $key ][ 'mutasi_pp_kurang' ];\n $data_level4[ $key_baru ][ 'mutasi_nb_kurang' ] += $data_level5[ $key ][ 'mutasi_nb_kurang' ];\n\n $data_level4[ $key_baru ][ 'nilai_akhir' ] += $data_level5[ $key ][ 'nilai_akhir' ];\n $data_level4[ $key_baru ][ 'jml_akhir' ] += $data_level5[ $key ][ 'jml_akhir' ];\n $data_level4[ $key_baru ][ 'ap_akhir' ] += $data_level5[ $key ][ 'ap_akhir' ];\n $data_level4[ $key_baru ][ 'pp_akhir' ] += $data_level5[ $key ][ 'pp_akhir' ];\n $data_level4[ $key_baru ][ 'nb_akhir' ] += $data_level5[ $key ][ 'nb_akhir' ];\n $data_level4[ $key_baru ][ 'SubSub' ][ $key ] = $data_level5[ $key ];\n\n }\n\n//echo \"array level 4:<br/><pre>\";\n//print_r($data_level4);//data-sub\n\n\n $data_level3 = array();\n//Buat array gabungan --> level 3\n foreach ($data_level4 as $key => $value) {\n $tmp = explode (\".\", $key);\n $key_baru = \"{$tmp[0]}.{$tmp[1]}.{$tmp[2]}\";\n $URAIAN = get_uraian ($key_baru, 3);\n\n $data_level3[ $key_baru ][ 'Uraian' ] = $URAIAN;\n $data_level3[ $key_baru ][ 'Kelompok' ] = $key_baru;\n $data_level3[ $key_baru ][ 'nilai' ] += $data_level4[ $key ][ 'nilai' ];\n $data_level3[ $key_baru ][ 'jml' ] += $data_level4[ $key ][ 'jml' ];\n $data_level3[ $key_baru ][ 'ap' ] += $data_level4[ $key ][ 'ap' ];\n $data_level3[ $key_baru ][ 'pp' ] += $data_level4[ $key ][ 'pp' ];\n $data_level3[ $key_baru ][ 'nb' ] += $data_level4[ $key ][ 'nb' ];\n\n $data_level3[ $key_baru ][ 'mutasi_jml_tambah' ] += $data_level4[ $key ][ 'mutasi_jml_tambah' ];\n $data_level3[ $key_baru ][ 'mutasi_nilai_tambah' ] += $data_level4[ $key ][ 'mutasi_nilai_tambah' ];\n $data_level3[ $key_baru ][ 'mutasi_ap_tambah' ] += $data_level4[ $key ][ 'mutasi_ap_tambah' ];\n $data_level3[ $key_baru ][ 'mutasi_pp_tambah' ] += $data_level4[ $key ][ 'mutasi_pp_tambah' ];\n $data_level3[ $key_baru ][ 'mutasi_nb_tambah' ] += $data_level4[ $key ][ 'mutasi_nb_tambah' ];\n\n $data_level3[ $key_baru ][ 'bp' ] += $data_level4[ $key ][ 'bp' ];\n\n $data_level3[ $key_baru ][ 'mutasi_jml_kurang' ] += $data_level4[ $key ][ 'mutasi_jml_kurang' ];\n $data_level3[ $key_baru ][ 'mutasi_nilai_kurang' ] += $data_level4[ $key ][ 'mutasi_nilai_kurang' ];\n $data_level3[ $key_baru ][ 'mutasi_ap_kurang' ] += $data_level4[ $key ][ 'mutasi_ap_kurang' ];\n $data_level3[ $key_baru ][ 'mutasi_pp_kurang' ] += $data_level4[ $key ][ 'mutasi_pp_kurang' ];\n $data_level3[ $key_baru ][ 'mutasi_nb_kurang' ] += $data_level4[ $key ][ 'mutasi_nb_kurang' ];\n\n\n $data_level3[ $key_baru ][ 'nilai_akhir' ] += $data_level4[ $key ][ 'nilai_akhir' ];\n $data_level3[ $key_baru ][ 'jml_akhir' ] += $data_level4[ $key ][ 'jml_akhir' ];\n $data_level3[ $key_baru ][ 'ap_akhir' ] += $data_level4[ $key ][ 'ap_akhir' ];\n $data_level3[ $key_baru ][ 'pp_akhir' ] += $data_level4[ $key ][ 'pp_akhir' ];\n $data_level3[ $key_baru ][ 'nb_akhir' ] += $data_level4[ $key ][ 'nb_akhir' ];\n $data_level3[ $key_baru ][ 'Sub' ][ $key ] = $data_level4[ $key ];\n\n }\n\n//echo \"array level 3:<br/><pre>\";\n//print_r($data_level3);//data-sub-sub\n\n\n $data_level2 = array();\n//Buat array gabungan --> level 2\n foreach ($data_level3 as $key => $value) {\n $tmp = explode (\".\", $key);\n $key_baru = \"{$tmp[0]}.{$tmp[1]}\";\n $URAIAN = get_uraian ($key_baru, 2);\n\n $data_level2[ $key_baru ][ 'Uraian' ] = $URAIAN;\n $data_level2[ $key_baru ][ 'Kelompok' ] = $key_baru;\n $data_level2[ $key_baru ][ 'nilai' ] += $data_level3[ $key ][ 'nilai' ];\n $data_level2[ $key_baru ][ 'jml' ] += $data_level3[ $key ][ 'jml' ];\n $data_level2[ $key_baru ][ 'ap' ] += $data_level3[ $key ][ 'ap' ];\n $data_level2[ $key_baru ][ 'pp' ] += $data_level3[ $key ][ 'pp' ];\n $data_level2[ $key_baru ][ 'nb' ] += $data_level3[ $key ][ 'nb' ];\n\n $data_level2[ $key_baru ][ 'mutasi_jml_tambah' ] += $data_level3[ $key ][ 'mutasi_jml_tambah' ];\n $data_level2[ $key_baru ][ 'mutasi_nilai_tambah' ] += $data_level3[ $key ][ 'mutasi_nilai_tambah' ];\n $data_level2[ $key_baru ][ 'mutasi_ap_tambah' ] += $data_level3[ $key ][ 'mutasi_ap_tambah' ];\n $data_level2[ $key_baru ][ 'mutasi_pp_tambah' ] += $data_level3[ $key ][ 'mutasi_pp_tambah' ];\n $data_level2[ $key_baru ][ 'mutasi_nb_tambah' ] += $data_level3[ $key ][ 'mutasi_nb_tambah' ];\n\n $data_level2[ $key_baru ][ 'bp' ] += $data_level3[ $key ][ 'bp' ];\n\n $data_level2[ $key_baru ][ 'mutasi_jml_kurang' ] += $data_level3[ $key ][ 'mutasi_jml_kurang' ];\n $data_level2[ $key_baru ][ 'mutasi_nilai_kurang' ] += $data_level3[ $key ][ 'mutasi_nilai_kurang' ];\n $data_level2[ $key_baru ][ 'mutasi_ap_kurang' ] += $data_level3[ $key ][ 'mutasi_ap_kurang' ];\n $data_level2[ $key_baru ][ 'mutasi_pp_kurang' ] += $data_level3[ $key ][ 'mutasi_pp_kurang' ];\n $data_level2[ $key_baru ][ 'mutasi_nb_kurang' ] += $data_level3[ $key ][ 'mutasi_nb_kurang' ];\n\n $data_level2[ $key_baru ][ 'nilai_akhir' ] += $data_level3[ $key ][ 'nilai_akhir' ];\n $data_level2[ $key_baru ][ 'jml_akhir' ] += $data_level3[ $key ][ 'jml_akhir' ];\n $data_level2[ $key_baru ][ 'ap_akhir' ] += $data_level3[ $key ][ 'ap_akhir' ];\n $data_level2[ $key_baru ][ 'pp_akhir' ] += $data_level3[ $key ][ 'pp_akhir' ];\n $data_level2[ $key_baru ][ 'nb_akhir' ] += $data_level3[ $key ][ 'nb_akhir' ];\n $data_level2[ $key_baru ][ 'Kel' ][ $key ] = $data_level3[ $key ];\n // echo \"<pre>\";print_r($data_level3[$key]);\n }\n\n//echo \"array level 2:<br/><pre>\";\n//print_r($data_level2);//data-sub-sub\n\n\n $data_level = array();\n//Buat array gabungan --> level 1\n foreach ($data_level2 as $key => $value) {\n $tmp = explode (\".\", $key);\n $key_baru = \"{$tmp[0]}\";\n $URAIAN = get_uraian ($key_baru, 1);\n\n $data_level[ $key_baru ][ 'Uraian' ] = $URAIAN;\n $data_level[ $key_baru ][ 'Kelompok' ] = $key_baru;\n $data_level[ $key_baru ][ 'nilai' ] += $data_level2[ $key ][ 'nilai' ];\n $data_level[ $key_baru ][ 'jml' ] += $data_level2[ $key ][ 'jml' ];\n $data_level[ $key_baru ][ 'ap' ] += $data_level2[ $key ][ 'ap' ];\n $data_level[ $key_baru ][ 'pp' ] += $data_level2[ $key ][ 'pp' ];\n $data_level[ $key_baru ][ 'nb' ] += $data_level2[ $key ][ 'nb' ];\n\n $data_level[ $key_baru ][ 'mutasi_jml_tambah' ] += $data_level2[ $key ][ 'mutasi_jml_tambah' ];\n $data_level[ $key_baru ][ 'mutasi_nilai_tambah' ] += $data_level2[ $key ][ 'mutasi_nilai_tambah' ];\n $data_level[ $key_baru ][ 'mutasi_ap_tambah' ] += $data_level2[ $key ][ 'mutasi_ap_tambah' ];\n $data_level[ $key_baru ][ 'mutasi_pp_tambah' ] += $data_level2[ $key ][ 'mutasi_pp_tambah' ];\n $data_level[ $key_baru ][ 'mutasi_nb_tambah' ] += $data_level2[ $key ][ 'mutasi_nb_tambah' ];\n\n $data_level[ $key_baru ][ 'bp' ] += $data_level2[ $key ][ 'bp' ];\n\n $data_level[ $key_baru ][ 'mutasi_jml_kurang' ] += $data_level2[ $key ][ 'mutasi_jml_kurang' ];\n $data_level[ $key_baru ][ 'mutasi_nilai_kurang' ] += $data_level2[ $key ][ 'mutasi_nilai_kurang' ];\n $data_level[ $key_baru ][ 'mutasi_ap_kurang' ] += $data_level2[ $key ][ 'mutasi_ap_kurang' ];\n $data_level[ $key_baru ][ 'mutasi_pp_kurang' ] += $data_level2[ $key ][ 'mutasi_pp_kurang' ];\n $data_level[ $key_baru ][ 'mutasi_nb_kurang' ] += $data_level2[ $key ][ 'mutasi_nb_kurang' ];\n\n $data_level[ $key_baru ][ 'nilai_akhir' ] += $data_level2[ $key ][ 'nilai_akhir' ];\n $data_level[ $key_baru ][ 'jml_akhir' ] += $data_level2[ $key ][ 'jml_akhir' ];\n $data_level[ $key_baru ][ 'ap_akhir' ] += $data_level2[ $key ][ 'ap_akhir' ];\n $data_level[ $key_baru ][ 'pp_akhir' ] += $data_level2[ $key ][ 'pp_akhir' ];\n $data_level[ $key_baru ][ 'nb_akhir' ] += $data_level2[ $key ][ 'nb_akhir' ];\n $data_level[ $key_baru ][ 'Bidang' ][ $key ] = $data_level2[ $key ];\n\n }\n\n//echo \"array level :<br/><pre>\";\n//print_r($data_level);//data-sub-sub\n\n return $data_level;\n}", "public function reindexAll()\n {\n $this->_getIndexer()->rebuildIndex();\n }", "public function groupBy($sql);", "public function aggregate( \\Aimeos\\MW\\Criteria\\Iface $search, $key );", "public function aggregate( \\Aimeos\\MW\\Criteria\\Iface $search, $key );", "private function normalize()\n {\n $field_id = isset($this->columns[0]) ? $this->columns[0] : 'id';\n\n $field_text = isset($this->columns[1]) ? $this->columns[1] : $field_id;\n\n $groups = [];\n\n $has_empty_groups = false;\n\n foreach ($this->data as $key => $datum) {\n $has_empty_groups = !is_numeric($key);\n }\n\n foreach ($this->data as $key => $datum) {\n if (is_array($datum) && isset($datum['id']) && isset($datum['text'])) {\n $this->push($datum);\n\n continue;\n }\n\n if (is_numeric($key)) {\n if (is_string($datum)) {\n $datum = [$datum];\n }\n\n $id = multi_dot_call($datum, $field_id);\n $id = $id === null ? (string) multi_dot_call($datum, '0') : (string) $id;\n\n $text = multi_dot_call($datum, $field_text);\n if (is_array($text)) {\n $lang = App::getLocale();\n $text = $text[$lang] ?? implode($this->separator, $text);\n }\n $text = $text === null ? (string) multi_dot_call($datum, '0') : (string) $text;\n\n if ($id && $text) {\n $text = $id . \") \" . $text;\n }\n\n foreach (array_slice($this->columns, 2) as $part) {\n $t = multi_dot_call($datum, $part);\n if ($t) {\n $text .= $this->separator.$t;\n }\n }\n\n $item = ['id' => $id, 'text' => $text];\n\n if ($id == $this->value) {\n $item['selected'] = true;\n }\n\n if (!$has_empty_groups) {\n $this->push($item);\n } else {\n $groups['Other'][] = $item;\n }\n } else {\n $groups[ucfirst($key)] = $datum;\n }\n }\n\n foreach ($groups as $group_name => $group) {\n $this->push([\n 'text' => $group_name,\n 'children' => collect($group)->map(function ($datum) use ($field_id, $field_text) {\n if (is_string($datum)) {\n $datum = [$field_id => $datum, $field_text => $datum];\n }\n\n $id = (string) multi_dot_call($datum, $field_id);\n\n $text = (string) multi_dot_call($datum, $field_text);\n\n foreach (array_slice($this->columns, 2) as $part) {\n $t = multi_dot_call($datum, $part);\n\n if ($t) {\n $text .= ' '.$t;\n }\n }\n\n $item = ['id' => $id, 'text' => $text];\n\n if ($id == $this->value) {\n $item['selected'] = true;\n }\n\n return $item;\n })->toArray()\n ]);\n }\n }", "public function chunkWithKeys($chunkSize, $preserveKeys = true);", "public function groupBy($field);", "public function groupBy($field);", "public function &getGroupBy();", "protected function update(){\n\t\t$this->aggregations = array();\n\t\t\n\t\t// also update any groups\n\t\tforeach($this->getGroups() as $group){\n\t\t\t$group->update();\n\t\t}\n\t}", "function ldap_key_by ($i_array, $key) {\n\t$result = array();\n\tforeach ($i_array as $record) {\n\t\tif (!isset($record[$key]))\n\t\t\tcontinue;\n\t\t$result[$record[$key]] = $record;\n\t}\nreturn($result);\n}", "public function fetchGroupData() {}", "public function fetchGroupData() {}", "public function reset_group_by() {\n\t\t$this->_group_by = array();\n\n\t\treturn $this;\n\t}", "public function group_safe($keys, $initial, $reduce, $options = array())\n {\n if(is_string($keys)) {\n $keys = array($keys => 1);\n }\n if( ! $reduce instanceof MongoCode) {\n $reduce = new MongoCode($reduce);\n }\n $result = $this->__call('group', array($keys, $initial, $reduce, $options));\n if( empty($result['ok'])) {\n $message = json_encode($result); //isset($result['errmsg']) ? $result['errmsg'] : ;\n throw new MongoException($message);\n }\n return $result['retval'];\n }", "function jr_reset_data( $data ) {\r\n\r\n\t$new_data = array();\r\n\tforeach ( $data as $key => $value )\r\n\t\t$new_data[$key] = reset($value);\r\n\r\n\treturn $new_data;\r\n}", "function reindex ()\n {\n $this->A = array_values ($this->A);\n return $this;\n }", "protected function setGrouping(Query $solarium_query, QueryInterface $query, $grouping_options = [], $index_fields = [], $field_names = []) {\n if (!empty($grouping_options['use_grouping'])) {\n\n $group_fields = [];\n\n foreach ($grouping_options['fields'] as $collapse_field) {\n // @todo languages\n $first_name = reset($field_names[$collapse_field]);\n /** @var \\Drupal\\search_api\\Item\\Field $field */\n $field = $index_fields[$collapse_field];\n $type = $field->getType();\n if ($this->dataTypeHelper->isTextType($type) || 's' !== Utility::getSolrFieldCardinality($first_name)) {\n $this->getLogger()->error('Grouping is not supported for field @field. Only single-valued fields not indexed as \"Fulltext\" are supported.',\n ['@field' => $index_fields[$collapse_field]['name']]);\n }\n else {\n $group_fields[] = $first_name;\n }\n }\n\n if (!empty($group_fields)) {\n // Activate grouping on the solarium query.\n $grouping_component = $solarium_query->getGrouping();\n\n $grouping_component->setFields($group_fields)\n // We always want the number of groups returned so that we get pagers\n // done right.\n ->setNumberOfGroups(TRUE)\n ->setTruncate(!empty($grouping_options['truncate']))\n ->setFacet(!empty($grouping_options['group_facet']));\n\n if (!empty($grouping_options['group_limit']) && ($grouping_options['group_limit'] != 1)) {\n $grouping_component->setLimit($grouping_options['group_limit']);\n }\n\n if (!empty($grouping_options['group_sort'])) {\n $sorts = [];\n foreach ($grouping_options['group_sort'] as $group_sort_field => $order) {\n $sorts[] = Utility::getSortableSolrField($group_sort_field, $field_names, $query) . ' ' . strtolower($order);\n }\n\n $grouping_component->setSort(implode(', ', $sorts));\n }\n }\n }\n }", "function acf_delete_json_field_group($key)\n{\n}", "function get_fancy_data($data)\n {\n /*\n * Initialize value\n */\n $collection = array();\n $basemodel = NULL;\n $i = 0;\n\n /*\n * Outer loop to run untill the data array end\n */\n foreach ($data as $k => $v) {\n /* Ndoe generator */\n $node = array();\n\n /*\n * Preserver first instance of the row in to a dummy variable\n */\n foreach ($v as $key => $val) {\n if (!is_numeric($key)) {\n $keys = explode(\".\", $key);\n $basemodel = isset($basemodel) ? $basemodel : $keys[0];\n $node[$keys[0]][$keys[1]] = $val;\n }\n }\n\n /*\n * Collect the first node baded model id\n */\n $key_cur = isset($key_cur) ? $key_cur : $v[\"$basemodel.id\"];\n\n /*\n * Set the values in correct place of the the node array\n */\n foreach ($node as $y => $z) {\n if ($y == $basemodel) {\n /* For princilple model it save in to a single array */\n $collection[$v[\"$basemodel.id\"]][$y] = $z;\n }\n else {\n if (implode(\"\", $z) != \"\") {\n /* For relational model it save in to a nulti dymantional array array */\n $collection[$v[\"$basemodel.id\"]][$y][] = $z;\n }\n else if (!isset($collection[$v[\"$basemodel.id\"]][$y])) {\n /* Create an empty array of no data found in a relational model */\n $collection[$v[\"$basemodel.id\"]][$y] = array();\n }\n }\n }\n\n /*\n * Reset the array index in a normal sequence\n */\n if ($key_cur != $v[\"$basemodel.id\"]) {\n $collection[$i++] = $collection[$key_cur];\n unset($collection[$key_cur]);\n $key_cur = $v[\"$basemodel.id\"];\n }\n }\n\n /* Reset the last node of the array */\n $collection[$i] = $collection[$key_cur];\n unset($collection[$key_cur]);\n\n return $collection;\n }", "function groupBy(callable $grouper, iterable $items) : iterable\n{\n $grouped = [];\n foreach ($items as $key => $value) {\n $group = $grouper($value, $key);\n $grouped[$group] []= $value;\n }\n return $grouped;\n}", "public function groupBy($columns);", "function sum_records_per_field_grouped_by_account($entries_records, $field_name)\n{\n\n $reports = [];\n\n foreach ($entries_records as $entry => $records) {\n\n $entry_loaded = node_load($entry);\n $entry_loaded_wrapper = entity_metadata_wrapper('node', $entry_loaded);\n\n // Getting the name of the indication or the product.\n $account = $entry_loaded_wrapper->field_account->value();\n\n $indication_or_product = $entry_loaded_wrapper->{$field_name}->value();\n if (isset($indication_or_product->name)) {\n $name = $indication_or_product->name;\n } else {\n $name = $indication_or_product[0]->name;\n }\n if (isset($account->title)) {\n $account_name = $account->title;\n } else {\n $account_name = $account[0]->title;\n }\n // If the indication is not init yet so create new array of monthes for it.\n if (!isset($reports[$account_name])) {\n $reports[$account_name] = [];\n $reports[$account_name][\"consumptions\"] = [];\n $reports[$account_name][\"stocks\"] = [];\n }\n if (!isset($reports[$account_name][\"consumptions\"][$name])) {\n $reports[$account_name][\"consumptions\"][$name] = [];\n $months = [\n 'January', 'February', 'March', 'April', 'May', 'June',\n 'July', 'August', 'September', 'October', 'November', 'December',\n ];\n foreach ($months as $month) {\n $reports[$account_name][\"consumptions\"][$name][$month] = [0];\n $reports[$account_name][\"stocks\"][$name][$month] = [0];\n }\n }\n // accounts:{products:{consumption:{months:[value]}}}.\n $records_loaded = entity_load(\"entry_month_record\", $records);\n\n foreach ($records_loaded as $id => $record) {\n $record_loaded_wrapper = entity_metadata_wrapper('entry_month_record', $record);\n $timestamp = $record_loaded_wrapper->field_entry_date->value();\n $date = getdate($timestamp);\n $month = $date['month'];\n $reports[$account_name][\"stocks\"][$name][$month][0] += $record_loaded_wrapper->field_stocks->value();\n $reports[$account_name][\"consumptions\"][$name][$month][0] += $record_loaded_wrapper->field_consumption->value();\n }\n }\n\n return $reports;\n}", "public function fetchKeyedArray()\n\t{\n\t\t$arr = $this->fetchAll(PDO::FETCH_GROUP|PDO::FETCH_ASSOC);\n\t\t$arr = array_map('reset', $arr);\n\t\t$keys = array_keys($arr);\n\t\t// if there's only one item in the lower arrays, we might as well\n\t\t// remove the array element\n\t\tif (count($keys) && count($arr[$keys[0]]) == 1)\n\t\t{\n\t\t\t$arr = array_map('reset', $arr);\n\t\t}\n\n\t\treturn $arr;\n\t}", "public function providerSortByWithGroupBy() {\n return array(\n array('name','ASC','item-01'),\n array('name','DESC','item-39'),\n );\n }", "function split_array($array){\n\n\t\t$groupedArray = array();\n\t\t$ubicacionArray = array();\n\n\t\tforeach($array as $key => $r){\n\n\t\t\t//consigo la ubicacion actual\n\t\t\t$ubicacion = $r->latitud;\n\n\t\t\t//verifico si la ubicacion existe en mi array donde alojo las noticias y su ubicacion //si no existe, lo agrego\n\t\t\tif(!in_array($ubicacion, $ubicacionArray)){\n\t\t\t$ubicacionArray[] = $ubicacion;\n\t\t\t}\n\n\t\t\t//busco la ubicacion actual\n\t\t\t$ubicacionIndex = array_search($ubicacion, $ubicacionArray);\n\n\t\t\t//agrego el registro dentro del array con sus valores\n\t\t\t$titulo \t= quitar_tildes($r->titular);\n\t\t\t$descripcion \t= quitar_tildes($r->descripcion);\n\n\t\t\t$titulo\t\t= preg_replace(\"/([^A-Za-z0-9,[:space:]áéíóúÁÉÍÓÚñÑ.-])\\(\\)/\", \"\", $titulo);\n\t\t\t$descripcion \t= preg_replace(\"/([^A-Za-z0-9,[:space:]áéíóúÁÉÍÓÚñÑ.-])\\(\\)/\", \"\", $descripcion);\n\n\t\t\t$arr = array(\n\t\t\t\t'_id'\t\t=> $r->_id,\n\t\t\t\t'PERIODICO'\t=> quitar_tildes($r->periodico),\n\t\t\t\t'TITULO'\t=> $titulo,\n\t\t\t\t'DESCRIPCION'\t=> $descripcion,\n\t\t\t\t'LINK'\t\t=> $r->link,\n\t\t\t\t'RSS'\t\t=> $r->rss,\n\t\t\t\t'FECHA'\t\t=> (new MongoDB\\BSON\\UTCDateTime((string)$r->fecha))->toDateTime()->format('d-m-Y'),\n\t\t\t\t'UBICACION'\t=> $r->ubicacion,\n\t\t\t\t'LATITUD'\t=> $r->latitud,\n\t\t\t\t'LONGITUD'\t=> $r->longitud,\n\t\t\t);\n\n\t\t\t$groupedArray[$ubicacionIndex][] = $arr;\n\t\t}\n\n\t\treturn $groupedArray;\n\t}", "private function groupBy() {\n $this->sql .= 'GROUP BY inv_agent_id ';\n }", "public function assoc($key = 'id')\n {\n if(!$this->result || $this->count > 1000)\n {\n // No result to work on or data set too large\n return false;\n }\n \n // Compile in to associative array\n $resultArray = array();\n \n while($current = $this->next(true))\n {\n foreach($current as $currentKey => $currentValue)\n {\n // Copy in to result set\n $resultArray[$current[$key]][$currentKey] = $currentValue;\n }\n }\n \n // Rewind\n $this->rewind();\n \n return $resultArray;\n }", "protected function sortDataArray() {}", "function stackGroupBy(array $argArray, array $groupKeys) : array\n{\n $result = &$argArray;\n $stack = [[&$argArray, 0]];\n $sp = 0;\n \n while ($sp >= 0) {\n [&$array, $depth] = $stack[$sp];\n $sp--;\n\n $group = [];\n foreach ($array as $index => $value) {\n $groupKey = $groupKeys[$depth];\n $group[$value[$groupKey]][$index] = $value;\n }\n \n $array = $group;\n\n if (++$depth !== count($groupKeys)) {\n foreach ($array as &$v) {\n $sp++;\n $stack[$sp] = [&$v, $depth];\n }\n }\n }\n\n return $result;\n}", "public function refreshGroups()\n {\n $this->sortedAttributeGroups = AttributeGroup::whereAttributableType($this->typeClass)\n ->orderBy('position')->get();\n\n $this->showGroupCreate = false;\n }", "function variadicGroupBy(array $array, $key, ...$otherKeys) : array\n{\n $grouped = [];\n\n foreach ($array as $index => $value) { \n $groupKey = null;\n if (!is_string($key) && is_callable($key)) { \n $groupKey = $key($value);\n } else if (is_object($value)) {\n $groupKey = $value->{$key};\n } else {\n $groupKey = $value[$key];\n }\n $grouped[$groupKey][$index] = $value;\n }\n\n if (!empty($otherKeys)) {\n foreach ($grouped as $groupKey => $value) {\n $grouped[$groupKey] = call_user_func_array([$this, 'groupBy'], [\n $value,\n ...$otherKeys\n ]);\n }\n }\n\n return $grouped;\n}", "public function mergeData($data) {\n if (empty($data)) return $this;\n\t\tforeach($data as $key=>$value) {\n\t\t\tif ((!array_key_exists($key, $this->_data) && ($key != $this->_key_field)) ||\n ($key != $this->_key_field) &&\n ($value != $this->_data[$key]) &&\n (isset($this->_structure['columns'][$key])\n || isset($this->_structure['relations'][$key])\n || isset($this->_structure['abilities'][$key]))) {\n $this->offsetSet($key, $value);\n } else {\n unset($data[$key]);\n }\n\t\t}\n return $this;\n\t}", "private function getItemsGroupedByStorage(array $items) {\n\t\t$grouped_items = [];\n\n\t\tforeach ($items as $item) {\n\t\t\t$source = self::getDataSourceType($item['value_type']);\n\t\t\t$grouped_items[$source][] = $item;\n\t\t}\n\n\t\treturn $grouped_items;\n\t}", "function dmindex($array, $keys, $preserve_keys = false, $default = null)\n{\n $out = array();\n foreach ($keys as $key) {\n if ($preserve_keys) {\n $out[$key] = dindex($array, $key, $default);\n } else {\n $out[] = dindex($array, $key, $default);\n }\n }\n return $out;\n}", "public static function pivot(array $source, $key = null)\n {\n \t$result = array();\n \t$counter = array();\n \n \tforeach ($source as $index => $value)\n \t{\n \t\t// Determine the name of the pivot key, and its value.\n \t\tif (is_array($value))\n \t\t{\n \t\t\t// If the key does not exist, ignore it.\n \t\t\tif (!isset($value[$key]))\n \t\t\t{\n \t\t\t\tcontinue;\n \t\t\t}\n \n \t\t\t$resultKey = $value[$key];\n \t\t\t$resultValue = $source[$index];\n \t\t}\n \t\telseif (is_object($value))\n \t\t{\n \t\t\t// If the key does not exist, ignore it.\n \t\t\tif (!isset($value->$key))\n \t\t\t{\n \t\t\t\tcontinue;\n \t\t\t}\n \n \t\t\t$resultKey = $value->$key;\n \t\t\t$resultValue = $source[$index];\n \t\t}\n \t\telse\n \t\t{\n \t\t\t// Just a scalar value.\n \t\t\t$resultKey = $value;\n \t\t\t$resultValue = $index;\n \t\t}\n \n \t\t// The counter tracks how many times a key has been used.\n \t\tif (empty($counter[$resultKey]))\n \t\t{\n \t\t\t// The first time around we just assign the value to the key.\n \t\t\t$result[$resultKey] = $resultValue;\n \t\t\t$counter[$resultKey] = 1;\n \t\t}\n \t\telseif ($counter[$resultKey] == 1)\n \t\t{\n \t\t\t// If there is a second time, we convert the value into an array.\n \t\t\t$result[$resultKey] = array(\n \t\t\t\t\t$result[$resultKey],\n \t\t\t\t\t$resultValue,\n \t\t\t);\n \t\t\t$counter[$resultKey]++;\n \t\t}\n \t\telse\n \t\t{\n \t\t\t// After the second time, no need to track any more. Just append to the existing array.\n \t\t\t$result[$resultKey][] = $resultValue;\n \t\t}\n \t}\n \n \tunset($counter);\n \n \treturn $result;\n }", "function traff_agrupate_subtotals( &$agrupation, $traff_all, $offset, $groupby, $countby)\n{\n\tif( !is_array($countby) ||( count($countby) != 1 && count($countby) != 2))\n\t\treturn false;\n\n\t// Reseteo los contadores de $agrupation.\n\t$agrupation->count = count($countby)==2 ? array(0, 0) : array(0);\n\t$agrupation->subtotal = 0;\n\n\t$c_groupby = $traff_all[ $offset][ $groupby];\n\t\n\tfor( $n = $offset; $n >= 0; $n --)\n\t{\n\t\t$item = $traff_all[ $n];\n\t\n\t\tif( $c_groupby != $item[ $groupby])\n\t\t{\n\t\t\t// Cambio la agrupacion. Este elemento ya no lo consideramos.\n\t\t\tbreak;\n\t\t}\n\n\t\t// Sumamos los contadores.\n\t\t$agrupation->subtotal += ( float)$item['importe'];\n\t\t$agrupation->count[0] += ( float)$item[$countby[0]];\n\t\tif(count($countby) == 2)\n\t\t\t$agrupation->count[1] += ( float)$item[$countby[1]];\n\t}\n\n\treturn true;\n}", "public function reorderShowGroup(string $group, array $keys): void;", "public function get_records_by_group($table, $groupKeyName, $groupID, $orderKeyName = '', $order = 'ASC', $fields = '*',$limit=10){\n $orderSql = ' LIMIT $limit';\n if($orderKeyName != '') $orderSql = \" ORDER BY $orderKeyName $order LIMIT $limit\";\n $sql = \"SELECT * FROM $table WHERE $groupKeyName = '$groupID'\" . $orderSql;\n $result = mysql_query($sql);\n while($row = mysql_fetch_assoc($result)) {\n\n $records[] = $row;\n\n }\n return $records;\n }", "public function clearGroupBy() {\r\n $this->groupBy = \"\";\r\n return $this;\r\n }", "public function group($keys, $initial, $reduce, $options = array())\n {\n return $this->__call(__FUNCTION__, func_get_args());\n }", "function get_keyed_import_items($fields,$table){\r\n\t\t\r\n\t\t$output = array();\r\n\t\t$c = count($fields);\r\n\t\t\r\n\t\t$result = db_query(\"SELECT \" . implode(',',$fields) . \",$this->sql_item_id FROM $table\");\r\n\t\tif (db_has_rows($result))\r\n\t\t\twhile ($row = db_fetch_row($result)){\r\n\t\t\t\t// last item is always the id\r\n\t\t\t\t$id = $row[$c];\r\n\t\r\n\t\t\t\t// pick the items to hash, and use the hash as the key\r\n\t\t\t\t$row = array_splice($row,0,$c);\r\n\t\t\t\tarray_walk($row,'trim');\r\n\t\t\t\t$output[ md5(implode(':',$row)) ] = $id;\r\n\t\t\t}\t\r\n\t\treturn $output;\r\n\t}", "public function mapList(ResultIterator $result, $index = null, $indexType = null, $group = null, $groupType = null) {\n\t\t//check numer of rows returned\n\t\tif ($result->countRows() == 0)\n\t\t\treturn [];\n\t\n\t\t//get result column types\n\t\t$this->columnTypes = $result->getColumnTypes();\n\t\n\t\t//build type handler list\n\t\tif ($this->defaultClass != 'stdClass' || !is_null($this->resultMap))\n\t\t\t$this->buildTypeHandlerList();\n\t\t\n\t\t$list = [];\n\t\t\n\t\tif (isset($index) || isset($group)) {\n\t\t\t//validate index column\n\t\t\tif (isset($index) && $indexType != 'callable')\n\t\t\t\tlist($indexColumn, $indexTypeHandler) = $this->validateIndex($index, $indexType);\n\t\t\t\n\t\t\t//validate group\n\t\t\tif (isset($group) && $groupType != 'callable')\n\t\t\t\tlist($groupColumn, $groupTypeHandler) = $this->validateGroup($group, $groupType);\n\t\t\t\n\t\t\tif (isset($index) && isset($group)) {\n\t\t\t\t$this->groupKeys = [];\n\t\t\t\t\n\t\t\t\twhile ($result->valid()) {\n\t\t\t\t\t///get row\n\t\t\t\t\t$row = $result->fetchObject();\n\t\t\t\t\t$mappedRow = $this->map($row);\n\t\t\t\t\t\n\t\t\t\t\tif ($groupType == 'callable') {\n\t\t\t\t\t\t$key = call_user_func($group, $mappedRow);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (is_null($key))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Group callback returned a NULL value\");\n\t\t\t\t\t\telseif (!is_int($key) && !is_string($key))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Group callback returned a value that is neither an integer or string\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//validate group value\n\t\t\t\t\t\t$key = $row->$groupColumn;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (is_null($key))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Null value found when grouping by column '$groupColumn'\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//obtain group value\n\t\t\t\t\t\t$key = $groupTypeHandler->getValue($key);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!is_int($key) && !is_string($key))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Obtained group key in column '$groupColumn' is neither an integer or string\");\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tif ($indexType == 'callable') {\n\t\t\t\t\t\t$idx = call_user_func($index, $mappedRow);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (is_null($idx))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Index callback returned a NULL value\");\n\t\t\t\t\t\telseif (!is_int($idx) && !is_string($idx))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Index callback returned a value that is neither an integer or string\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//validate index value\n\t\t\t\t\t\t$idx = $row->$indexColumn;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (is_null($idx))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Null value found when indexing by column '$indexColumn'\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t//obtain index value\n\t\t\t\t\t\t$idx = $indexTypeHandler->getValue($idx);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!is_int($idx) && !is_string($idx))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Obtained index key in column '$indexColumn' is neither an integer or string\");\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t//store value\n\t\t\t\t\tif (isset($list[$key]))\n\t\t\t\t\t\t$list[$key][$idx] = $mappedRow;\n\t\t\t\t\telse {\n\t\t\t\t\t\t$list[$key] = [$idx => $mappedRow];\n\t\t\t\t\t\t$this->groupKeys[] = $key;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$result->next();\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif (isset($index)) {\n\t\t\t\twhile ($result->valid()) {\n\t\t\t\t\t///get row\n\t\t\t\t\t$row = $result->fetchObject();\n\t\t\t\t\t$mappedRow = $this->map($row);\n\t\t\t\t\t\n\t\t\t\t\tif ($indexType == 'callable') {\n\t\t\t\t\t\t$idx = call_user_func($index, $mappedRow);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (is_null($idx))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Index callback returned a NULL value\");\n\t\t\t\t\t\telseif (!is_int($idx) && !is_string($idx))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Index callback returned a value that is neither an integer or string\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//validate index value\n\t\t\t\t\t\t$idx = $row->$indexColumn;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (is_null($idx))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Null value found when indexing by column '$indexColumn'\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t//obtain index value\n\t\t\t\t\t\t$idx = $indexTypeHandler->getValue($idx);\n\n\t\t\t\t\t\tif (!is_int($idx) && !is_string($idx))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Obtained index key in column '$indexColumn' is neither an integer or string\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//store value and get next one\n\t\t\t\t\t$list[$idx] = $mappedRow;\n\t\t\t\t\t$result->next();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->groupKeys = [];\n\t\t\t\t\n\t\t\t\twhile ($result->valid()) {\n\t\t\t\t\t///get row\n\t\t\t\t\t$row = $result->fetchObject();\n\t\t\t\t\t$mappedRow = $this->map($row);\n\t\t\t\t\t\n\t\t\t\t\tif ($groupType == 'callable') {\n\t\t\t\t\t\t$key = call_user_func($group, $mappedRow);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (is_null($key))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Group callback returned a NULL value\");\n\t\t\t\t\t\telseif (!is_int($key) && !is_string($key))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Group callback returned a value that is neither an integer or string\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t//store value\n\t\t\t\t\t\tif (isset($list[$key]))\n\t\t\t\t\t\t\t$list[$key][] = $row;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$list[$key] = [$row];\n\t\t\t\t\t\t\t$this->groupKeys[] = $key;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//validate group value\n\t\t\t\t\t\t$key = $row->$groupColumn;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (is_null($key))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Null value found when grouping by column '$groupColumn'\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//obtain group value\n\t\t\t\t\t\t$key = $groupTypeHandler->getValue($key);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!is_int($key) && !is_string($key))\n\t\t\t\t\t\t\tthrow new \\UnexpectedValueException(\"Obtained group key in column '$groupColumn' is neither an integer or string\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t//store value\n\t\t\t\t\t\tif (isset($list[$key]))\n\t\t\t\t\t\t\t$list[$key][] = $this->map($row);\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$list[$key] = [$this->map($row)];\n\t\t\t\t\t\t\t$this->groupKeys[] = $key;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$result->next();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\twhile ($result->valid()) {\n\t\t\t\t$list[] = $this->map($result->fetchObject());\n\t\t\t\t$result->next();\n\t\t\t}\n\t\t}\n\t\n\t\treturn $list;\n\t}", "public function rebuild($group_id);", "public function getAllChunksAsKey()\n {\n return array_fill_keys(array_keys($this->entries), true);\n }", "public function implicitGroupby() {\n\t\treturn true;\n\t}", "private function _associate_results($resultset, $key, $sort = FALSE)\n\t{\n\t\t$array = array();\n\n\t\tforeach ($resultset AS $row)\n\t\t{\n\t\t\tif (array_key_exists($key, $row) && ! array_key_exists($row[$key], $array))\n\t\t\t{\n\t\t\t\t$array[$row[$key]] = $row;\n\t\t\t}\n\t\t}\n\n\t\tif ($sort === TRUE)\n\t\t{\n\t\t\tksort($array);\n\t\t}\n\n\t\treturn $array;\n\t}", "public function group_sources($key_function)\r\n {\r\n // `key_function`.\r\n //\r\n // `key_function` takes a source and returns the value from the source to\r\n // group by (see examples in the group_sources_by_* methods below).\r\n //\r\n // The return value is an array, a key in this array is a key returned by\r\n // `key_function` and the value is a list of all the sources with this key.\r\n $new_groups = array();\r\n foreach ($this->sources as $rec) {\r\n $grp = $key_function($rec);\r\n $new_groups[$grp][] = $rec;\r\n }\r\n return $new_groups;\r\n }", "function group_by($columns = array())\n {\n if (!is_array($columns)) {\n $columns = array($columns);\n }\n $this->object->_group_by_columns = array_merge($this->object->_group_by_columns, $columns);\n return $this->object;\n }", "function get_grouping_fields() {\n //field that is used to compare one record from the next\n $compare_field = sql_concat('user.lastname', \"'_'\", 'user.firstname', \"'_'\", 'user.id');\n\n //field used to order for groupings\n $order_field = sql_concat('lastname', \"'_'\", 'firstname', \"'_'\", 'userid');\n\n $cluster_label = get_string('grouping_cluster', 'rlreport_course_completion_by_cluster');\n $cluster_grouping = new table_report_grouping('cluster', 'cluster.id', $cluster_label, 'ASC',\n array('cluster.name'), 'above', 'path');\n \n $user_grouping_fields = array(\n 'user.idnumber AS useridnumber', 'user.firstname');\n $user_grouping = new table_report_grouping('groupuseridnumber', $compare_field, '', 'ASC', \n $user_grouping_fields, 'below', $order_field);\n\n //these groupings will always be used\n $result = array(\n $cluster_grouping, $user_grouping);\n\n //determine whether or not we should use the curriculum grouping\n $preferences = php_report_filtering_get_active_filter_values($this->get_report_shortname(),\n 'columns'.'_curriculum', $this->filter);\n\n $show_curriculum = true;\n if (isset($preferences['0']['value'])) {\n $show_curriculum = $preferences['0']['value'];\n }\n\n if ($show_curriculum) {\n $curriculum_label = get_string('grouping_curriculum', 'rlreport_course_completion_by_cluster');\n $result[] = new table_report_grouping('groupcurriculumid', 'curriculum.id', $curriculum_label, 'ASC', array(),\n 'below', 'curriculumname, curriculumid');\n }\n\n return $result;\n }", "function sum_salarii_moth_group_emp($id)\n{\n $query = \"SELECT count(platit) AS plati, sum(platit) AS suma, DATE_FORMAT(data, '%m') AS data, sum(motiv) AS motivat\n FROM cozagro_db.salarii WHERE deleted = 0 AND id_angajat= $id\n GROUP BY MONTH(data)\";\n $result = Database::getInstance()->getConnection()->query($query);\n if (!$result) {\n die(\"Nu s-a reusit conexiunea la DB selectarea salariilor platite\" . Database::getInstance()->getConnection()->error);\n }\n $creante_luna = [];\n while ($x = $result->fetch_assoc()) {\n $creante_luna[$x['data']] = array(\"nr\" => $x['plati'], \"sum\" => $x['suma'], \"mot\" => $x['motivat']);\n }\n $result->free_result();\n return $creante_luna;\n}", "protected function getFormatedRows(array $data) : array{\n\n foreach($data as $k => $v){\n\t\t\t$data[$k] = array_values($v);\n\t\t}\n return $data;\n }", "public function buildAndFetchAll( $data, $arrayIndex=null );" ]
[ "0.6311146", "0.6176815", "0.5661191", "0.5614936", "0.5600822", "0.54383105", "0.53864914", "0.52644354", "0.5262973", "0.5120855", "0.511125", "0.5081716", "0.50815266", "0.5070722", "0.50638366", "0.5047465", "0.502507", "0.5023945", "0.4961393", "0.49416143", "0.4929425", "0.49240828", "0.48982236", "0.48696706", "0.48674786", "0.48620173", "0.48157233", "0.48092103", "0.48061505", "0.4805625", "0.4778447", "0.47694993", "0.47689298", "0.47641617", "0.47394532", "0.47385052", "0.47142842", "0.47085854", "0.47085592", "0.46777627", "0.46618977", "0.46553192", "0.46459496", "0.46439466", "0.46075806", "0.46039915", "0.46015006", "0.45883337", "0.45872328", "0.45849788", "0.45849788", "0.45766068", "0.4574418", "0.4569466", "0.4569466", "0.45440528", "0.45337856", "0.45291525", "0.45218518", "0.45218518", "0.45203304", "0.45083538", "0.44995025", "0.4496678", "0.44888395", "0.44844857", "0.4480474", "0.4477694", "0.44709498", "0.44707543", "0.44655126", "0.44646344", "0.4454793", "0.4454305", "0.44536853", "0.44511378", "0.44442773", "0.44352362", "0.44346544", "0.44328874", "0.4420536", "0.44187802", "0.44135693", "0.43929332", "0.43896323", "0.43884394", "0.43852404", "0.43770623", "0.43742904", "0.43741822", "0.43693554", "0.43620428", "0.43523145", "0.43339187", "0.43321818", "0.43284804", "0.43225312", "0.43224445", "0.4321945", "0.43187585" ]
0.5440107
5
Data reindex by keys, No Data
public static function indexOnly(& $data, $keys, $obj2array = false) { // Refactor Array $data structure by $keys return self::_refactorBy($data, $keys, $obj2array, $type = 'indexOnly'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function reindex()\n\t{\n\t\t// rebuild the ordered collection\n\t\t$results = array();\n\t\tforeach ($this->_data as $old => $record)\n\t\t{\n\t\t\t$key = $record->{$this->_keyfield};\n\t\t\t$results[$key] = $record;\n\t\t}\n\t\t// sort the collection\n\t\tksort($results);\n\t\t// remember the new collection\n\t\t$this->_data = $results;\n\t\t// reset the cursor\n\t\treset($this->_data);\n\t}", "private function rebuildIndex()\n {\n foreach ($this->rows as $id => $row) {\n $label = $row->getColumn('label');\n if ($label !== false) {\n $this->rowsIndexByLabel[$label] = $id;\n }\n }\n $this->indexNotUpToDate = false;\n }", "protected function resetIndex($key)\n {\n if (!array_key_exists($key, $this->mappedData)) {\n $this->index = 0;\n }\n }", "public function reindex();", "function change_index(&$tableau, $old_key, $new_key) {\n $changed = FALSE; $temp = 0;\n \n foreach ($tableau as $key => $value) {\n switch ($changed) {\n case FALSE :\n //creates the new key and deletes the old\n if ($key == $old_key) {\n $tableau[$new_key] = $tableau[$old_key];\n unset($tableau[$old_key]);\n $changed = TRUE;\n }\n break;\n\n case TRUE :\n //moves following keys\n if ($key != $new_key){\n $temp= $tableau[$key];\n unset($tableau[$key]);\n $tableau[$key] = $temp;\n break;\n } else {$changed = FALSE;} //stop\n }\n }\n array_values($tableau); //free_memory\n}", "public function reIndex() {\n $index = collect([]);\n // Loop through each of the hydrated fields\n $this->getHydrated()->each(function($field,$k) use ($index) {\n // Pass each field through the toPath process\n $field->toPath($index);\n });\n // Replace the current index value\n $this->index = $index;\n // Return for chaining\n return $this;\n }", "public function rebuildIndex()\n {\n $this->elastic->deleteIndex(self::INDEX);\n $this->elastic->addIndexCompanion(self::INDEX);\n }", "public function reindexAll()\n {\n }", "function reindex ()\n {\n $this->A = array_values ($this->A);\n return $this;\n }", "function resetKeys() {\n $this->keys = array_keys($this->records);\n }", "public function reindexAll()\n {\n $this->_getIndexer()->rebuildIndex();\n }", "public function rebuildIndex( array $items = [] );", "public function triggerReindex()\n {\n if (!$this->owner->ID) {\n return;\n }\n\n $id = $this->owner->ID;\n $class = $this->owner->ClassName;\n $state = SearchVariant::current_state($class);\n $base = DataObject::getSchema()->baseDataClass($class);\n $key = \"$id:$base:\" . serialize($state);\n\n $statefulids = array(array(\n 'id' => $id,\n 'state' => $state\n ));\n\n $writes = array(\n $key => array(\n 'base' => $base,\n 'class' => $class,\n 'id' => $id,\n 'statefulids' => $statefulids,\n 'fields' => array()\n )\n );\n\n SearchUpdater::process_writes($writes);\n }", "protected function setCanonicalIndex(): void\n {\n $got = $this->redisConn->hget($this->index, IndexInterface::STRUCTURE);\n $data = (null === $got) ? [] : $this->unser($got);\n if (empty($data)) { // just fill-in new index data\n $data[$this->index] = [\n IndexInterface::ALIASES => [],\n ];\n $this->setMappings($data);\n $this->redisConn->hset($this->index, IndexInterface::STRUCTURE, $this->ser($data));\n } else if (empty($this->indexType) === false\n && empty($data[$this->index][IndexInterface::MAPPINGS][$this->indexType])\n ) {// check for type and update if there is no alike\n $this->setMappings($data);\n $this->redisConn->hset($this->index, IndexInterface::STRUCTURE, $this->ser($data));\n } else { // setting new fields with whitespace type by default\n $this->setMappings($data, true);\n if (true === $this->isNewField) {\n $this->redisConn->hset($this->index, IndexInterface::STRUCTURE, $this->ser($data));\n }\n }\n }", "function quiz_report_index_by_keys($datum, $keys, $keysunique=true){\n if (!$datum){\n return $datum;\n }\n $key = array_shift($keys);\n $datumkeyed = array();\n foreach ($datum as $data){\n if ($keys || !$keysunique){\n $datumkeyed[$data->{$key}][]= $data;\n } else {\n $datumkeyed[$data->{$key}]= $data;\n }\n }\n if ($keys){\n foreach ($datumkeyed as $datakey => $datakeyed){\n $datumkeyed[$datakey] = quiz_report_index_by_keys($datakeyed, $keys, $keysunique);\n }\n }\n return $datumkeyed;\n}", "public function reindex(callable $callback): NonEmptyMap;", "protected function doReindexFull()\n {\n foreach ($this->getAllRules() as $rule) {\n $this->updateRuleProductData($rule);\n $this->categoryProductReindexRow($rule->getId());\n }\n }", "public function arrayMergeKeepsIndexesAfterMerge() {}", "function reset_keys($data) {\n\t$new_arr = array();\n\tforeach($data as $key=>$value) {\n\t\t$new_arr[] = $value;\n\t}\n\treturn $new_arr;\n}", "abstract public function wipeIndex();", "protected function regenerateKeyCache()\n {\n if(is_array($this->__data))\n {\n $i=0;\n $this->__keycache = array();\n $this->__keycacheindex = array();\n foreach($this->__data as $key => $value)\n {\n $this->__keycache[$key] = $i;\n $this->__keycacheindex[$i] = $key;\n $i++;\n }\n }\n else\n {\n $this->__keycache = null;\n $this->__keycacheindex = null;\n }\n\n $this->__keycacheinvalid = false;\n }", "public function reindexSearchData(\\Closure $onUpdate = null)\n {\n $db = new SearchDomainDatabase($this->name);\n $db->initialize();\n if ($onUpdate) {\n $db->onUpdate($onUpdate);\n }\n $db->recordData(true);\n }", "public function reindexAll()\n {\n\n //@todo: indexers should be dynamically injected. Probable via `$this->getIndeces()`\n /** @var St_SphinxSearch_Model_Fulltext $fulltextIndex */\n $fulltextIndex = Mage::getModel('st_sphinxsearch/fulltext');\n\n $fulltextIndex->rebuildIndex();\n\n return;\n /** @var Mage_Core_Model_Resource $resourceSingleton */\n $resourceSingleton = Mage::getSingleton('core/resource');\n\n /** @var Varien_Db_Adapter_Interface $writeAdapater */\n $writeAdapater = $resourceSingleton->getConnection('core_write');\n\n /** @var Varien_Db_Adapter_Interface $readAdapter */\n $readAdapter = $resourceSingleton->getConnection('core_read');\n\n /** @var string $tableName */\n $tableName = $readAdapter->getTableName('st_sphinxsearch_fulltext_tmp');\n\n /** @var Mage_CatalogSearch_Model_Resource_Indexer_Fulltext $indexerFulltext */\n $indexerFulltext = Mage::getResourceModel('catalogsearch/indexer_fulltext');\n\n $fulltextTableName = $indexerFulltext->getTable('fulltext');\n\n $sql = \"CREATE TABLE IF NOT EXISTS `$tableName` LIKE `$fulltextTableName`\";\n\n $writeAdapater->query($sql);\n $t=1;\n }", "public function reindex() {\n if (!$this->server || $this->read_only) {\n return TRUE;\n }\n _search_api_index_reindex($this);\n module_invoke_all('search_api_index_reindex', $this, FALSE);\n return TRUE;\n }", "function jr_reset_data( $data ) {\r\n\r\n\t$new_data = array();\r\n\tforeach ( $data as $key => $value )\r\n\t\t$new_data[$key] = reset($value);\r\n\r\n\treturn $new_data;\r\n}", "protected function store()\n\t{\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t\t//---------------------\n\t\t// Your code goes here\n\t\t// --------------------\n\t}", "private function combineKeys()\n {\n if ($this->rows) {\n try {\n foreach ($this->rows as $key => $row) {\n array_unshift($row, $key + 1);\n $this->data[] = array_combine($this->headers, $row);\n }\n } catch (\\ErrorException $e) {\n throw new HeaderRowUnmatchedException();\n }\n }\n }", "public function reindex(&$parentArray=array()) {\n\n\t\t$this->load->model(\"search_model\");\n\n\t\tif(count($parentArray)>5 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->buildCache();\n\n\t\t$this->search_model->addOrUpdate($this);\n\t\t// now find any related items and resave them.\n\t\t//\n\t\t// we build a parent array so we don't recurse\n\n\t\t// we might be rebuilding outside an instance, in which case we don't do this.\n\t\tif(!$this->instance) {\n\t\t\treturn;\n\t\t}\n\t\t$results = $this->search_model->find([\"searchText\"=>$this->getObjectId(), \"searchRelated\"=>true], false);\n\t\t$parentArray[] = $this->getObjectId();\n\n\t\tforeach($results[\"searchResults\"] as $result) {\n\t\t\tif(!in_array($result, $parentArray)) {\n\t\t\t\techo \"subIndex: \" . $result . \"\\n\";\n\t\t\t\t// $this->logging->logError(\"updating\", $result);\n\t\t\t\t$tempAsset = new Asset_model();\n\t\t\t\t$tempAsset->loadAssetById($result);\n\t\t\t\t$tempAsset->reindex($parentArray);\n\t\t\t\tif($this->config->item('enableCaching')) {\n\t\t\t\t\t$this->doctrineCache->setNamespace('searchCache_');\n\t\t\t\t\t$this->doctrineCache->delete($this->getObjectId());\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t}", "final public function rewind(): void\n {\n $this->sort();\n\n reset($this->index);\n }", "protected static function _refactorBy(& $data, $keys, $obj2array = false, $type = 'index')\n {\n // 參數處理\n $keys = (array) $keys;\n \n $result = [];\n \n // 遍歷待處理陣列\n foreach ($data as $row) {\n // 旗標,是否取得索引\n $getIndex = false;\n // 位置初炲化 - 傳址\n $rRefer = & $result;\n // 可用的index清單\n $indexs = [];\n \n // 遍歷$keys陣列 - 建構索引位置\n foreach ($keys as $key) {\n $vKey = null;\n \n // 取得索引資料 - 從$key\n if (is_object($row) && isset($row->{$key})) {\n $vKey = $row->{$key};\n } elseif (is_array($row) && isset($row[$key])) {\n $vKey = $row[$key];\n }\n \n // 有無法取得索引資料,跳出\n if (is_null($vKey)) {\n $getIndex = false;\n break;\n }\n \n // 記錄可用的index\n $indexs[] = $vKey;\n \n // 本次索引完成\n $getIndex = true;\n }\n \n // 略過無法取得索引或索引不完整的資料\n if (! $getIndex) {\n continue;\n }\n \n // 變更位置 - 傳址\n foreach ($indexs as $idx) {\n $rRefer = & $rRefer[$idx];\n }\n \n // 將資料寫入索引位置\n switch ($type) {\n case 'index':\n case 'indexBy':\n default:\n $rRefer = $obj2array ? (array) $row : $row;\n break;\n case 'group':\n case 'groupBy':\n $rRefer[] = $obj2array ? (array) $row : $row;\n break;\n case 'indexOnly':\n case 'noData':\n $rRefer = '';\n break;\n }\n }\n \n return $data = $result;\n }", "public function reindex()\n {\n $this->removeIndex();\n\n return $this->index();\n }", "protected function clearIndexIfAllKeysValid(): void\n {\n if (is_null($this->index) || $this->lazyTail->valid()) {\n return;\n }\n\n $allKeysValid = true;\n\n foreach ($this->index as $safeKey => $unsafeKey) {\n if ($safeKey !== $unsafeKey) {\n $allKeysValid = false;\n break;\n }\n }\n\n if ($allKeysValid) {\n // this causes $this->areAllKeysValid() to start returning true\n $this->index = null;\n }\n }", "public function reindex(): static\n {\n $this->iterator = Iterators::reindex($this->iterator);\n return $this;\n }", "public function __reFill(){\n foreach ($this->data as $key=>$datum) {\n $name = @$this->struct['fieldsDB'][$key];\n if ($name!==null) $this->filled[$name] = true;\n }\n }", "public function simpleReindex($rows): array\n {\n if (empty($rows)) {\n return [];\n }\n\n // Reindex $rows by this model's primary key and inject related items\n $return = [];\n\n foreach ($rows as $item) {\n // Handle array return types\n $id = is_array($item) ? $item[$this->primaryKey] ?? null : $item->{$this->primaryKey} ?? null;\n\n // If no primary key or an entry already existed then return it as is\n // Probably the former is custom select() and the latter is a join()\n if (empty($id) || isset($return[$id])) {\n return $rows;\n }\n $return[$id] = $item;\n }\n\n return $return;\n }", "public function refreshData($keyArr = null)\n {\n if ($this->offsetSize() > 0) {\n $_data = [];\n $offsets = $this->getOffsets();\n\n foreacH ($offsets as $key => $item) {\n $_data[(!is_null($keyArr) ? (isset($item[$keyArr]) ? $item[$keyArr] : $key) : $key)] = $item;\n }\n\n if (!empty($_data)) {\n $this->clearOffsets();\n $i = 0;\n foreach ($_data as $key => $item) {\n $this->offsetSet($i, $item);\n $i++;\n }\n\n if ($this->offsetSize() > 0) {\n $this->_isRefreshing = true;\n }\n }\n }\n\n return $this;\n }", "public function reindex()\n {\n return new static(array_values($this->elements));\n }", "public function resetIndex()\n {\n $this->setIndex(0);\n }", "public function esReindex()\n {\n $this->esDelete();\n return $this->esIndex();\n }", "protected function flushIndex()\n {\n $this->canIndex();\n /**\n * Set indexer to use mview \n */\n $this->indexer->setScheduled(true);\n\n $writeAdapter = $this->resourceConnection->getConnection('core_write');\n\n /**\n * Flush all old data \n */\n $indexTable = $this->resourceConnection->getTableName('bazaarvoice_index_product');\n $writeAdapter->truncateTable($indexTable);\n $changelogTable = $this->resourceConnection->getTableName('bazaarvoice_product_cl');\n $writeAdapter->truncateTable($changelogTable);\n\n /**\n * Setup dummy rows \n */\n $productTable = $this->resourceConnection->getTableName('catalog_product_entity');\n $writeAdapter->query(\"INSERT INTO `$indexTable` (`product_id`, `version_id`) SELECT DISTINCT `entity_id`, '0' FROM `$productTable`;\");\n $writeAdapter->query(\"INSERT INTO `$changelogTable` (`entity_id`) SELECT DISTINCT `entity_id` FROM `$productTable`;\");\n\n /**\n * Reset mview version \n */\n $mviewTable = $this->resourceConnection->getTableName('mview_state');\n $writeAdapter->query(\"UPDATE `$mviewTable` SET `version_id` = NULL, `status` = 'idle' WHERE `view_id` = 'bazaarvoice_product';\");\n $indexCheck = $writeAdapter\n ->query(\n \"SELECT COUNT(1) indexIsThere FROM INFORMATION_SCHEMA.STATISTICS\n WHERE table_schema=DATABASE() AND table_name='$changelogTable' AND index_name='entity_id';\"\n );\n $indexCheck = $indexCheck->fetchObject();\n if ($indexCheck->indexIsThere == 0) {\n $writeAdapter->query(\"ALTER TABLE `$changelogTable` ADD INDEX (`entity_id`);\");\n }\n }", "public function resetData();", "public function resetUpdateIndex()\n {\n $this->resetIndex(\n ExtconfService::getInstance()->getUpdateIndex()\n );\n }", "public function reindexAction()\n {\n $form = Ot_Form_Template::delete('reindex', 'search-index-reindex:reindex');\n \n if ($this->_request->isPost() && $form->isValid($_POST)) {\n set_time_limit(0);\n \n $workshop = new Workshop();\n \n $workshops = $workshop->fetchAll();\n \n foreach ($workshops as $w) {\n $workshop->index($w);\n }\n \n $this->_helper->flashMessenger->addMessage('msg-info-reindexed');\n \n $this->_redirect('/');\n \n }\n \n $this->view->form = $form;\n $this->_helper->pageTitle('search-index-reindex:title');\n }", "function rewind (){ $this->key = -1; }", "private function resetIndex()\n\t{\n\t\t// remove any non-existant links\n\t\t$sql = sprintf('DELETE FROM crawl_index WHERE last_update < \"%s\"', date('Y-m-d H:i:s', strtotime('-2 weeks')));\n\t\tmysql_query($sql, $this->db);\n\n\t\t// update all inbound link counters to 1\n\t\tmysql_query('UPDATE crawl_index SET `count` = 1');\n\n\t\t// optimize the table due to the deletions\n\t\tmysql_query('OPTIMIZE TABLE crawl_index');\n\t}", "function store() {\r\n $this->reindex();\r\n //---------------------\r\n if (($handle = fopen($this->_origin, \"w\")) !== FALSE) {\r\n fputcsv($handle, $this->_fields);\r\n foreach ($this->_data as $key => $record)\r\n fputcsv($handle, array_values((array) $record));\r\n fclose($handle);\r\n }\r\n }", "public static function reindex(array $data, array $correspondances) {\n\t\t$result = $data;\n\n\t\tforeach ($correspondances as $from => $to) {\n\t\t\tif (isset($data[$from])) {\n\t\t\t\t$result[$to] = $data[$from];\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "function get_table_indexes($db, $table, $cnx='', $reload=false, $mode='mysql'){\n\tif($mode!=='mysql') exit('only mysql index mode developed');\n\tglobal $get_table_indexes, $dbTypeArray;\n\tif(!$cnx)$cnx=C_MASTER;\n\tif($get_table_indexes[$db][$table] && !$reload){\n\t\treturn $get_table_indexes[$db][$table];\n\t}else{\n\t\t$fl=__FILE__;\n\t\t$ln=__LINE__+1;\n\t\tob_start();\n\t\t$result=q(\"SHOW INDEXES FROM `$db`.`$table`\", $cnx, ERR_ECHO, O_DO_NOT_REMEDIATE);\n\t\t$err=ob_get_contents();\n\t\tob_end_clean();\n\t\tif($err)return false;\n\t\t\n\t\t$typeFlip = array_flip($dbTypeArray);\n\t\t$inCompound=false;\n\t\twhile($v=mysqli_fetch_array($result,MYSQLI_ASSOC)){\n\t\t\t$w++;\n\t\t\t@extract($v);\n\t\t\tif($buffer==$Key_name){\n\t\t\t\t//duplicate part of a key\n\t\t\t\tif(!$inCompound){\n\t\t\t\t\t$multiIdx[$Key_name][]=$singleIdx[count($singleIdx)-1];\n\t\t\t\t\tunset($singleIdx[count($singleIdx)-1]);\n\t\t\t\t\t//next two lines overcome \"bug\" in php: just cause I unset the highest element, this will not reset the next index assigned when I say $singleIdx[]=.. later on.\n\t\t\t\t\t$clr=$singleIdx;\n\t\t\t\t\t$singleIdx=$clr;\n\t\t\t\t}\n\t\t\t\t$multiIdx[$Key_name][]=$v;\n\t\t\t\t$inCompound=true;\n\t\t\t}else{\n\t\t\t\t$singleIdx[]=$v;\n\t\t\t\t$buffer=$Key_name;\n\t\t\t\t$inCompound=false;\n\t\t\t}\n\t\t}\n\t\t//set $singleIdx as assoc for reference\n\t\tif(count($singleIdx)){\n\t\t\tforeach($singleIdx as $v) $a[strtolower($v['Column_name'])]=$v;\n\t\t\t$singleIdx=$a;\n\t\t}\n\t\t//store compound keys as XML\n\t\tif($multiIdx){\n\t\t\t$compoundKey='';\n\t\t\tforeach($multiIdx as $n=>$v){\n\t\t\t\t$ci.='<compoundKey Key_name=\"'.$n.'\" Column_count=\"'.count($v).'\"';\n\t\t\t\t$i=0;\n\t\t\t\tforeach($v as $w){\n\t\t\t\t\t$i++;\n\t\t\t\t\tif($i==1)$ci.=' Non_unique=\"'.$w['Non_unique'].'\">'.\"\\n\";\n\t\t\t\t\t$ci.='<keyColumn Seq_in_index=\"'.$w['Seq_in_index'].'\" Column_name=\"'.$w['Column_name'].'\" Sub_part=\"'.$w['Sub_part'].'\" Comment=\"'.htmlentities($w['Comment']).'\">'.\"\\n\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$ci.='</compoundKey>';\n\t\t\t}\n\t\t}\n\t\t$get_table_indexes[$db][$table]=array('singleIdx'=>$singleIdx, 'multiIdx'=>$multiIdx, 'compoundXML'=>$ci);\n\t\treturn $get_table_indexes[$db][$table];\n\t}\n}", "function dmindex($array, $keys, $preserve_keys = false, $default = null)\n{\n $out = array();\n foreach ($keys as $key) {\n if ($preserve_keys) {\n $out[$key] = dindex($array, $key, $default);\n } else {\n $out[] = dindex($array, $key, $default);\n }\n }\n return $out;\n}", "public function rewind() {\n $this->_key = 0;\n }", "protected function rewriteData()\n\t{\n\t\t$db = $this->getDatabase();\n\n\t\t$fields = array('someval_facebook_valid', 'someval_facebook_type', 'someval_facebook_friends_or_likes',\n\t\t\t\t\t\t'someval_twitter_valid', 'someval_twitter_tweets', 'someval_twitter_followers', 'someval_twitter_following');\n\n\t\tforeach ($this->aData AS &$elm)\n\t\t{\n\t\t\t$query = $db->getQuery(true);\n\n\t\t\t$query->update($db->qn('#__accountdata'))\n\t\t\t\t\t->where('bid = ' . $elm->bid);\n\n\t\t\tforeach ($fields as $f)\n\t\t\t{\n\t\t\t\t$query->set($db->qn($f) . ' = ' . $db->q($elm->$f));\n\t\t\t}\n\n\t\t\t$db->setQuery($query);\n\n\t\t\tif (!$db->execute())\n\t\t\t{\n\t\t\t\tLog::add('Something went wrong for bid=:' . $elm->bid);\n\t\t\t}\n\t\t}\n\t}", "function array_reindex(&$array_A) {\n\t$i = 0;\n\tforeach ($array_A as $key_A => $value_A) {\n\t\t$array_B[$i] = $value_A;\n\t\tunset($array_A[$key_A]);\n\t\t$i++;\n\t}\n\treturn $array_B;\n}", "protected function load()\n\t{\n\t\t//---------------------\n\t\t// Your code goes here\n\t\t// --------------------\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t}", "public function getData($key = '', $index = null);", "public function updateIndexState() {\n $query = $this->database->select('help_search_items', 'hsi');\n $query->addExpression('COUNT(DISTINCT(hsi.sid))');\n $query->leftJoin('search_dataset', 'sd', 'hsi.sid = sd.sid AND sd.type = :type', [':type' => $this->getType()]);\n $query->isNull('sd.sid');\n $never_indexed = $query->execute()->fetchField();\n $this->state->set('help_search_unindexed_count', $never_indexed);\n }", "public function reset()\n {\n $this->values[self::_INDEX] = null;\n $this->values[self::_ITEM_ID] = null;\n $this->values[self::_EXP] = null;\n }", "public function reset() {\r\n\t\tforeach ($this->_metadata->getNames() as $name){\r\n\t\t\tif($this->isPrimaryKey($name)){\r\n\t\t\t\t$this->_record[$name] = $this->getPrimaryKey() ;\r\n\t\t\t}else{\r\n\t\t\t\t$this->_record[$name] = $this->{$name} ;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->_record ;\r\n\t}", "function updateIndex($index) {\n if (!is_string($index)) throw new IllegalTypeException('Illegal type of parameter $index: '.getType($index));\n if (!strLen($index)) throw new InvalidArgumentException('Invalid parameter $index: \"\"');\n\n global $verbose, $indexes, $saveRawXTradeData;\n\n // (1) Starttag der benoetigten Daten ermitteln\n $startTime = 0;\n $pairs = array_flip($indexes[$index]); // ['AUDUSD', ...] => ['AUDUSD'=>null, ...]\n foreach($pairs as $pair => &$data) {\n $data = []; // $data initialisieren: ['AUDUSD'=>[], ...]\n $startTime = max($startTime, XTrade::$symbols[$pair]['historyStart']['M1']); // GMT-Timestamp\n } unset($data);\n $startTime = fxtTime($startTime);\n $startDay = $startTime - $startTime%DAY; // 00:00 Starttag FXT\n $today = ($today=fxtTime()) - $today%DAY; // 00:00 aktueller Tag FXT\n\n\n // (2) Gesamte Zeitspanne tageweise durchlaufen\n for ($day=$startDay, $lastMonth=-1; $day < $today; $day+=1*DAY) {\n\n if (!isFxtWeekend($day, 'FXT')) { // ausser an Wochenenden\n $shortDate = gmDate('D, d-M-Y', $day);\n\n // Pruefen, ob die History bereits existiert\n if (is_file($file=getVar('fxiTarget.compressed', $index, $day))) {\n if ($verbose > 1) echoPre('[Ok] '.$shortDate.' '.$index.' compressed history file: '.baseName($file));\n }\n else if (is_file($file=getVar('fxiTarget.raw', $index, $day))) {\n if ($verbose > 1) echoPre('[Ok] '.$shortDate.' '.$index.' raw history file: '.baseName($file));\n }\n else {\n $month = (int) gmDate('m', $day);\n if ($month != $lastMonth) {\n echoPre('[Info] '.$index.' '.gmDate('M-Y', $day));\n $lastMonth = $month;\n }\n\n // History aktualisieren: M1-Bars der benoetigten Instrumente dieses Tages einlesen\n foreach($pairs as $pair => $data) {\n if (is_file($file=getVar('fxiSource.compressed', $pair, $day))) {} // komprimierte oder\n else if (is_file($file=getVar('fxiSource.raw' , $pair, $day))) {} // unkomprimierte XTrade-Datei\n else {\n echoPre('[Error] '.$pair.' history for '.$shortDate.' not found');\n return false;\n }\n // M1-Bars zwischenspeichern\n $pairs[$pair]['bars'] = XTrade::readBarFile($file, $pair); // ['AUDUSD'=>array('bars'=>[]), ...]\n }\n\n // Indexdaten fuer diesen Tag berechnen\n $function = 'calculate'.$index;\n $fxiBars = $function($day, $pairs); if (!$fxiBars) return false;\n\n // Indexdaten speichern\n if (!saveBars($index, $day, $fxiBars)) return false;\n }\n }\n if (!WINDOWS) pcntl_signal_dispatch(); // Auf Ctrl-C pruefen, um bei Abbruch die Destruktoren auszufuehren.\n }\n\n echoPre('[Ok] '.$index);\n return true;\n}", "public function reindex($request)\n {\n return $this->start()->uri(\"/api/system/reindex\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function rotate_db_data($dbdata){\n\t\t\n\t\t$return = array();\n\t\t$count = count($dbdata);\n\t\t$firstRow = $dbdata[0];\n\n\t\tforeach($firstRow as $f => $v){\n\t\t\t\n\t\t\t// loop through each key\n\t\t\t\n\t\t\t$rowKey = array();\n\t\t\t$sum = 0;\n\t\t\tfor($i = 0; $i < $count; $i++) {\n\t\t\t\t// loop all data\n\t\t\t\t$rowKey[] = $dbdata[$i][$f];\t// add to new row key (auto increase index by 1)\n\t\t\t\t$sum += $dbdata[$i][$f];\n\t\t\t}\n\t\t\t\n\t\t\tif($sum > 0){\n\t\t\t\n\t\t\t\t$return[$f] = $rowKey;\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "public function index_put(){\n\t\t\n\t\t}", "private function updateAllValuesIfNeeded(&$data)\n {\n foreach ($data as $index => $value) {\n $this->updateValueIfNeeded($data, $index);\n }\n }", "public function mergeData($data) {\n if (empty($data)) return $this;\n\t\tforeach($data as $key=>$value) {\n\t\t\tif ((!array_key_exists($key, $this->_data) && ($key != $this->_key_field)) ||\n ($key != $this->_key_field) &&\n ($value != $this->_data[$key]) &&\n (isset($this->_structure['columns'][$key])\n || isset($this->_structure['relations'][$key])\n || isset($this->_structure['abilities'][$key]))) {\n $this->offsetSet($key, $value);\n } else {\n unset($data[$key]);\n }\n\t\t}\n return $this;\n\t}", "function _loadIndex () \n {\n $this->_enterSection('_loadIndex');\n \n $index = array();\n \n $a = strcspn ($this->_options['dsn'], ':');\n $proto = substr ($this->_options['dsn'], 0, $a);\n $path = substr ($this->_options['dsn'], $a + 3);\n\n switch ($proto) {\n case 'file' : \n $f = sprintf($path, $this->_indexName);\n $data = '';\n if ($fp = @fopen ($f,'r')) {\n $this->_enterSection('_loadIndex (acquiring read lock)');\n flock($fp, LOCK_SH);\n $this->_leaveSection('_loadIndex (acquiring read lock)');\n $this->_enterSection('_loadIndex (reading data)');\n while (!feof($fp)) {\n $data .= fread ($fp, 0xFFFF);\n }\n fclose ($fp);\n $this->_leaveSection('_loadIndex (reading data)');\n }\n \n $this->_enterSection('_loadIndex (unserializing/uncompressing)');\n if ($data) {\n if ($this->_options['gz_level']) {\n $index = unserialize(gzuncompress($data));\n } else {\n $index = unserialize($data);\n }\n }\n $this->_leaveSection('_loadIndex (unserializing/uncompressing)');\n break;\n }\n $this->_index = $index;\n \n $this->_leaveSection('_loadIndex');\n }", "function apachesolr_index_mark_for_reindex($env_id, $entity_type = NULL) {\n foreach (entity_get_info() as $type => $entity_info) {\n if (($type == $entity_type) || ($entity_type == NULL)) {\n if (isset($entity_info['apachesolr']) && ($entity_info['apachesolr']['indexable'])) {\n $reindex_callback = apachesolr_entity_get_callback($type, 'reindex callback');\n if (!empty($reindex_callback)) {\n call_user_func($reindex_callback, $env_id);\n }\n }\n }\n }\n apachesolr_clear_last_index_position($env_id, $entity_type);\n cache_clear_all('*', 'cache_apachesolr', TRUE);\n}", "public static function reindex()\n {\n $slides = Slide::isActive()->inOrder()->get();\n\n $position = 1;\n foreach ($slides as $slide) {\n // Index the slide position\n $slide->position = $position;\n\n // Unset validation rules, and avoid a reindex loop\n $slide->rules = [];\n $slide->reindex = false;\n\n // Save the slide\n $position++;\n $slide->save();\n }\n }", "protected function invalidateIndex()\n {\n $this->labelIndexer->invalidateIndex();\n }", "public function rewind()\n {\n $this->key = 0;\n }", "public function rewind()\n {\n $this->key = 0;\n }", "public function reset() {\n $cacheFile = $this->getCacheFile();\n if ($cacheFile->isLocked()) {\n $this->initialize();\n return;\n }\n\n $cacheFile->lock();\n\n parent::reset();\n\n $this->includePaths = $this->getIncludePaths();\n $this->index = array();\n\n foreach ($this->includePaths as $includePath) {\n $this->indexDirectory($includePath);\n }\n\n foreach ($this->index as $key => $value) {\n sort($this->index[$key]);\n }\n\n $cacheParent = $cacheFile->getParent();\n $cacheParent->create();\n\n $cacheFile->write(serialize($this->index));\n $cacheFile->unlock();\n }", "function array_reindex($array)\n{\n if (array_values($array) === $array) {\n $array = array_flip($array);\n }\n\n return $array;\n}", "public static function resetIndex(){\n\t\t$sql = \"TRUNCATE TABLE `documents`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t$sql = \"TRUNCATE TABLE `terms`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t$sql = \"TRUNCATE TABLE `term_documents`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t// delete all files from documents directory\n\t\tarray_map('unlink', glob('documents/' . '*.txt'));\n\t}", "public static function indexBy(& $data, $keys, $obj2array = false)\n {\n // Refactor Array $data structure by $keys\n return self::_refactorBy($data, $keys, $obj2array, $type = 'indexBy');\n }", "public function fetchAndReindex($sql)\n {\n $query = $this->query($sql);\n if (!$query) {\n return false;\n }\n $result = [];\n while ($row = $query->fetch_assoc()) {\n $key = reset($row);\n $value = count($row) == 2 ? next($row) : $row;\n if (count($row) > 2) {\n array_shift($value);\n }\n if (isset($result[$key])) {\n if (is_array($value)) {\n if (!is_array(reset($result[$key]))) {\n $result[$key] = [$result[$key]];\n }\n $result[$key] [] = $value;\n } else {\n $result[$key] = array_merge((array) $result[$key], (array) $value);\n }\n } else {\n $result[$key] = $value;\n }\n }\n return $result;\n }", "public function reIndex() {\n $index = collect([]);\n // Loop through each of the blueprints\n $this->getBlueprints()->each(function($blueprint,$k) use ($index) {\n // Pass each blueprint through the to reference process\n $blueprint->toReference($index);\n });\n // Replace the current index value\n $this->index = $index;\n // Return for chaining\n return $this;\n }", "public function reindexSearchDataElement(SmartElement $se)\n {\n $db = new SearchDomainDatabase($this->name);\n $db->updateSmartElement($se);\n }", "public function rewind()\n\t{\n\t\t$this->_array = $this->_model->getData();\n\t\t$this->_keys = array_keys($this->_array);\n\t\t$this->_idx = 0;\n\t}", "public static function reset_keys_array($array,$key)\r\n {\r\n if (isset($array[$key])) {\r\n $array[$key] = array_values($array[$key]);\r\n }\r\n return $array;\r\n }", "function restore_empty($data, $filed)\n {\n return array_merge(array_fill_keys($filed, ''), $data);\n }", "public function reset(array $data);", "public function buildIndex();", "public function rewind()\n {\n $this->currentKey = 0;\n }", "public function reset()\n {\n $this->values[self::_IDX] = null;\n $this->values[self::_TYPE] = null;\n $this->values[self::_VALUE] = null;\n }", "function rebuildLocalizationIndex() {\n return true; // @TODO When we have index build for localization, implement this\n }", "public function reindex($configurationKey, $tableName, $uid)\n {\n $this->removeInvalidConfigurationIndex();\n $this->removeInvalidRecordIndex($tableName);\n $this->updateIndex($configurationKey, $tableName, $uid);\n }", "public function setKeysFromInserted()\n\t{\n\t\t$keys = $this->database->getNewKeys();\n\n\t\t$this->data = Arr::mergeDeep($this->data, $keys);\n\n\t\t$this->key = $keys[$this->primaryKey] ?? null;\n\t}", "public function refreshSearchIndex()\n {\n $this->artisan('regarch:elastic:migrate');\n $this->app[Kernel::class]->setArtisan(null);\n }", "public function reindexOrder($id_order)\n {\n $words = [];\n $this->db->delete(\"{$this->table}_search\", '`id_order`=' . $id_order);\n\n\n $order = new JXOneClickOrderOrders($id_order);\n $cart = new Cart($order->id_cart);\n if ($cart->id_customer != 0) {\n $customer = new CustomerCore($cart->id_customer);\n $words = array_merge($words, [\n $customer->firstname,\n $customer->lastname,\n $customer->email\n ]);\n }\n\n if ($order_info = $this->getCustomer($id_order)) {\n $words = array_merge($words, [\n $order_info['number'],\n $order_info['email'],\n $order_info['name']\n ]);\n $words = array_merge($words, Jxoneclickorder::splitString($order_info['message']));\n }\n\n if ($order->id_employee != 0) {\n $employee = new EmployeeCore($order->id_employee);\n $words = array_merge($words, [\n $employee->firstname,\n $employee->lastname,\n $employee->email,\n ]);\n }\n\n\n $words = array_merge($words, [\n $order->id_order,\n $order->id_original_order,\n $order->id_cart\n ]);\n\n $this->multiInsert($words, $id_order);\n }", "protected function refreshIndex()\n {\n return $this->index->refresh();\n }", "function rewind() {\n $this->resetKeys();\n $this->position = 0;\n }", "function swapKeyValue($data)\n{\n $rawData = array_flip($data->toArray());\n foreach ($rawData as $key => $value) {\n $data->unset($value);\n $data->set($key, $value);\n }\n return $data;\n}", "function prepareData(){\n $this->ref = array();\n foreach($this->getIterator() as $junk=>$item){\n // current values\n $id = $item[$this->id_field];\n \n // save item\n $this->items[$id] = $item;\n \n // save relation\n if(isset($item[$this->parent_id_field])) {\n $this->ref[$item[$this->parent_id_field]][] = $id;\n } else {\n $this->ref[undefined][] = $id;\n }\n }\n }", "function fjm_merce_reindex() {\n module_load_include('inc', 'fedora_repository', 'api/fedora_item');\n\n $query = \"select \\$object from <#ri>\n where \\$object <fedora-model:hasModel> <info:fedora/islandora:sp-audioCModel>\";\n $pids = _process_book_query($query);\n\n foreach ($pids AS $pid) {\n $name_space = explode(':', $pid);\n if ($name_space[0] == 'cam') {\n $item = new Fedora_Item($pid);\n\n $item->set_datastream_state('MODS', 'I', 'Modified by Islandora API');\n $item->set_datastream_state('MODS', 'A', 'Modified by Islandora API');\n\n drush_print_r('MODS updated for PID: ' . $pid);\n }\n }\n}", "private function removeOldResults($key){\n\t\tSearch::where('key', '=', $key)->delete();\n\t}", "public function reCacheCustomFields() : void\n {\n foreach ($this->getAll() as $key => $value) {\n $this->setInRedis($key, $value);\n }\n }", "protected function applyTransformation() {\n // no transformation for index\n }", "public function assoc($key = 'id')\n {\n if(!$this->result || $this->count > 1000)\n {\n // No result to work on or data set too large\n return false;\n }\n \n // Compile in to associative array\n $resultArray = array();\n \n while($current = $this->next(true))\n {\n foreach($current as $currentKey => $currentValue)\n {\n // Copy in to result set\n $resultArray[$current[$key]][$currentKey] = $currentValue;\n }\n }\n \n // Rewind\n $this->rewind();\n \n return $resultArray;\n }", "public function buildAndFetchAll( $data, $arrayIndex=null );", "public function reset()\n {\n $this->values[self::_ITEM_IDS] = array();\n $this->values[self::_NEW_HEROES] = array();\n $this->values[self::_SMASH_IDX] = array();\n }", "public function rewind(): void\n {\n $this->_skipNextIteration = false;\n reset($this->_data);\n $this->_index = 0;\n }" ]
[ "0.7551741", "0.6748716", "0.63718957", "0.63622284", "0.60192287", "0.6006558", "0.5930858", "0.5915996", "0.5907629", "0.5867597", "0.5804352", "0.5706515", "0.56815094", "0.5662718", "0.5585666", "0.5578113", "0.55686116", "0.5568238", "0.55447555", "0.55118865", "0.5395929", "0.5371431", "0.5369635", "0.5340683", "0.53129417", "0.52133524", "0.52014303", "0.52003545", "0.519655", "0.5151354", "0.5140687", "0.513362", "0.5133276", "0.5121606", "0.5118832", "0.51090187", "0.51032305", "0.5096981", "0.50762844", "0.50723386", "0.5068699", "0.50625235", "0.505688", "0.5052741", "0.5047914", "0.5034825", "0.50030774", "0.50025535", "0.4991789", "0.4983917", "0.49755406", "0.49657178", "0.49654064", "0.49583992", "0.49379262", "0.49363062", "0.49191073", "0.49176046", "0.49128866", "0.48939937", "0.48938388", "0.48866686", "0.48786876", "0.48757395", "0.48724186", "0.48628843", "0.4859737", "0.48597103", "0.48597103", "0.4850134", "0.4845472", "0.48440912", "0.48414204", "0.48395073", "0.48370317", "0.48367223", "0.48209178", "0.47884992", "0.47679764", "0.47533166", "0.4738653", "0.4738085", "0.4732052", "0.47317734", "0.47306347", "0.47302607", "0.47271183", "0.47164214", "0.47016838", "0.46910408", "0.46903506", "0.46817002", "0.4676672", "0.46747983", "0.46667993", "0.46531537", "0.4652182", "0.46499014", "0.4647656", "0.4644808" ]
0.5046023
45
Get Data content by index Pay attention to the return value, If no $indexTo target will return the empty array, When the target may be 0 or null, you need to pay attention to the judgment. Usage: $data = ['user' => ['name' => 'Mars', 'birthday' => '20000101']]; var_export(ArrayHelper::getContent($data)); // full $data content var_export(ArrayHelper::getContent($data, 'user')); // ['name' => 'Mars', 'birthday' => '20000101'] var_export(ArrayHelper::getContent($data, ['user', 'name'])); // Mars var_export(ArrayHelper::getContent($data, 'user, name')); // Mars var_export(ArrayHelper::getContent($data, ['user', 'name', 'aaa'])); // []
public static function getContent(Array $data, $indexTo = [], $exception = false) { /* Arguments prepare */ if (is_string($indexTo)) { $indexTo = array_map('trim', explode(',', $indexTo)); } $indexed = []; foreach ($indexTo as $idx) { // save runed index $indexed[] = $idx; if (is_array($data) && array_key_exists($idx, $data)) { // If exists, Get values by recursion $data = $data[$idx]; } else { // Not exists, Exception or return [] if ($exception) { throw new \Exception('Error index: ' . implode(' => ', $indexed), 400); } else { $data = []; break; } } } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getData($key = '', $index = null);", "function getContents($index=null) {\n\t\tif($index===null) {\n\t\t\treturn $this->_dataobjects;\n\t\t}\n\t\tif(!isset($this->_dataobjects[$index])) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->_dataobjects[$index];\n\n\t}", "function data_get($target, $key, $default = null)\n {\n if (is_null($key)) {\n return $target;\n }\n\n $key = is_array($key) ? $key : explode('.', is_int($key) ? (string) $key : $key);\n while (!is_null($segment = array_shift($key))) {\n if ('*' === $segment) {\n if ($target instanceof Collection) {\n $target = $target->all();\n } elseif (!is_array($target)) {\n return value($default);\n }\n $result = [];\n foreach ($target as $item) {\n $result[] = data_get($item, $key);\n }\n\n return in_array('*', $key) ? Arr::collapse($result) : $result;\n }\n if (Arr::accessible($target) && Arr::exists($target, $segment)) {\n $target = $target[$segment];\n } elseif (is_object($target) && isset($target->{$segment})) {\n $target = $target->{$segment};\n } else {\n return value($default);\n }\n }\n\n return $target;\n }", "public function getData($key = '', $index = null)\n {\n if ('' === $key) {\n return $this->_data;\n }\n \n $default = null;\n \n // accept a/b/c as ['a']['b']['c']\n if (strpos ( $key, '/' )) {\n $keyArr = explode ( '/', $key );\n $data = $this->_data;\n foreach ( $keyArr as $i => $k ) {\n if ($k === '') {\n return $default;\n }\n if (is_array ( $data )) {\n if (! isset ( $data [$k] )) {\n return $default;\n }\n $data = $data [$k];\n } elseif ($data instanceof Object) {\n $data = $data->getData ( $k );\n } else {\n return $default;\n }\n }\n return $data;\n }\n \n // legacy functionality for $index\n if (isset ( $this->_data [$key] )) {\n if (is_null ( $index )) {\n return $this->_data [$key];\n }\n \n $value = $this->_data [$key];\n if (is_array ( $value )) {\n /**\n * If we have any data, even if it empty - we should use it, anyway\n */\n if (isset ( $value [$index] )) {\n return $value [$index];\n }\n return null;\n } elseif (is_string ( $value )) {\n $arr = explode ( \"\\n\", $value );\n return (isset ( $arr [$index] ) && (! empty ( $arr [$index] ) || strlen ( $arr [$index] ) > 0)) ? $arr [$index] : null;\n } elseif ($value instanceof Object) {\n return $value->getData ( $index );\n } else {\n return $default;\n }\n }\n return $default;\n }", "function data_get($target, $key, $default = null)\n {\n if (is_null($key)) {\n return $target;\n }\n\n $key = is_array($key) ? $key : explode('.', $key);\n\n while (!is_null($segment = array_shift($key))) {\n if ($segment === '*') {\n if (!is_array($target)) {\n return value($default);\n }\n\n $result = [];\n\n foreach ($target as $item) {\n $result[] = data_get($item, $key);\n }\n\n return in_array('*', $key) ? PhandArr::flatten($result) : $result;\n }\n\n if (PhandArr::accessible($target) && PhandArr::exists($target, $segment)) {\n $target = $target[$segment];\n } elseif (is_object($target) && isset($target->{$segment})) {\n $target = $target->{$segment};\n } else {\n return value($default);\n }\n }\n\n return $target;\n }", "function data_get($target, $key, $default = null)\n {\n if (is_null($key)) {\n return $target;\n }\n\n $key = is_array($key) ? $key : explode('.', $key);\n\n while (!is_null($segment = array_shift($key))) {\n if ($segment === '*') {\n if ($target instanceof Collection) {\n $target = $target->all();\n } elseif (!is_array($target)) {\n return value($default);\n }\n\n $result = Arr::pluck($target, $key);\n\n return in_array('*', $key) ? Arr::collapse($result) : $result;\n }\n\n if (Arr::accessible($target) && Arr::exists($target, $segment)) {\n $target = $target[$segment];\n } elseif (is_object($target) && isset($target->{$segment})) {\n $target = $target->{$segment};\n } else {\n return value($default);\n }\n }\n\n return $target;\n }", "public function buildAndFetchAll( $data, $arrayIndex=null );", "public function get($position = null)\n {\n return $this->getArray('content', $position);\n }", "public function get($position = null)\n {\n return $this->getArray('content', $position);\n }", "function asdb_data_get($target, $key, $default = null)\n\t{\n\t\tif (is_null($key)) {\n\t\t\treturn $target;\n\t\t}\n\n\t\t$key = is_array($key) ? $key : explode('.', $key);\n\n\t\tforeach ($key as $i => $segment) {\n\t\t\tunset($key[$i]);\n\n\t\t\tif (is_null($segment)) {\n\t\t\t\treturn $target;\n\t\t\t}\n\n\t\t\tif ($segment === '*') {\n\t\t\t\tif ($target instanceof Collection) {\n\t\t\t\t\t$target = $target->all();\n\t\t\t\t} elseif (! is_array($target)) {\n\t\t\t\t\treturn asdb_value($default);\n\t\t\t\t}\n\n\t\t\t\t$result = [];\n\n\t\t\t\tforeach ($target as $item) {\n\t\t\t\t\t$result[] = asdb_data_get($item, $key);\n\t\t\t\t}\n\n\t\t\t\treturn in_array('*', $key) ? Arr::collapse($result) : $result;\n\t\t\t}\n\n\t\t\tif (Arr::accessible($target) && Arr::exists($target, $segment)) {\n\t\t\t\t$target = $target[$segment];\n\t\t\t} elseif (is_object($target) && isset($target->{$segment})) {\n\t\t\t\t$target = $target->{$segment};\n\t\t\t} else {\n\t\t\t\treturn asdb_value($default);\n\t\t\t}\n\t\t}\n\n\t\treturn $target;\n\t}", "public function getContentSubs($content_id = 0, $toarray=false) {\n\t\t$criteria = $this->getContentsCriteria();\n\t\t$criteria->add(new icms_db_criteria_Item('content_pid', $content_id));\n\t\t$crit = new icms_db_criteria_Compo(new icms_db_criteria_Item('content_visibility', 2));\n\t\t$crit->add(new icms_db_criteria_Item('content_visibility', 3),'OR');\n\t\t$criteria->add($crit);\n\t\t$contents = $this->getObjects($criteria);\n\t\tif (!$toarray) return $contents;\n\t\t$ret = array();\n\t\tforeach(array_keys($contents) as $i) {\n\t\t\tif ($contents[$i]->accessGranted()){\n\t\t\t\t$ret[$i] = $contents[$i]->toArray();\n\t\t\t\t$ret[$i]['content_body'] = icms_core_DataFilter::icms_substr(icms_cleanTags($contents[$i]->getVar('content_body','n'),array()),0,300);\n\t\t\t\t$ret[$i]['content_url'] = $contents[$i]->getItemLink();\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "private function getAllContent() {\n $allContent = [];\n\n // Get all of the contents\n if($this->postData->getContents()) $allContent = array_merge($allContent, $this->postData->getContents());\n if($this->postData->getListContents()) $allContent = array_merge($allContent, $this->postData->getListContents());\n if($this->postData->getShortCodeData()) $allContent = array_merge($allContent, $this->postData->getShortCodeData());\n\n return $allContent;\n }", "public function data_get($target, $key, $default = null)\n {\n if (is_null($key)) {\n return $target;\n }\n\n $key = is_array($key) ? $key : explode('.', $key);\n\n while (! is_null($segment = array_shift($key))) {\n if ($segment === '*') {\n if ($target instanceof CollectionProxy) {\n $target = $target->all();\n } elseif (! is_array($target)) {\n return $this->value($default);\n }\n\n $result = Arr::pluck($target, $key);\n\n return in_array('*', $key) ? Arr::collapse($result) : $result;\n }\n\n if (Arr::accessible($target) && Arr::exists($target, $segment)) {\n $target = $target[$segment];\n } elseif (is_object($target) && isset($target->{$segment})) {\n $target = $target->{$segment};\n } else {\n return $this->value($default);\n }\n }\n\n return $target;\n }", "public function getContent($format = null);", "public function getSearchableContent()\n\t{\n\t\treturn [\n\t\t\t$this->Title,\n\t\t\t$this->Content\n\t\t];\n\t}", "public function getIndex();", "public function getIndex();", "public function getIndex();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent($id);", "public function getContent(){\n $table = new Application_Model_Table_Content();\n $content = array();\n \n \n $rowset = $table->fetchAll(\"parent = {$this->id}\");\n foreach($rowset as $row){\n $content[] = new Application_Model_Content($row);\n }\n return $content;\n }", "function getContents($offset = 0, $limit = null) {\n\t\t$i = $this->_query->join('synd_issue','i');\n\t\t$query = clone $this->_query;\n\t\t$query->column(\"DISTINCT $i.node_id\");\n\t\t\n\t\t// Add issue ordering\n\t\tforeach ($columns = array_values((array)$this->_order) as $key => $column) {\n\t\t\tif (is_string($column) && !empty($column) && !is_numeric($column)) {\n\t\t\t\t$query->column(\"$i.$column\");\n\t\t\t\t$query->order($column, !isset($columns[$key+1]) || !empty($columns[$key+1]));\n\t\t\t}\n\t\t}\n\n\t\t$persistent = $this->_storage->getPersistentStorage();\n\t\t$database = $persistent->getDatabase();\n\t\treturn $this->_storage->getInstances($database->getCol($query->toString(), 0, $offset, $limit));\n\t}", "function doIndex() {\n $ret = array();\n if( $this->statement->rowCount() > 0 ) {\n $data = $this->statement->fetchAll($this->fetch_style);\n } else {\n $data = array();\n }\n\n foreach( $data as $line ) {\n if( !isset($line[$this->index[0]]) ) {\n throw new Exception(\n \"Index '\" . $this->index[0] . \"' does not exist in data.\"\n );\n }\n $key = $line[$this->index[0]];\n\n if( count($this->index) == 1 ) {\n $ret[$key] = $line;\n } else {\n $key2 = $line[$this->index[1]];\n if( !isset($ret[$key]) ) $ret[$key] = array();\n $ret[$key][$key2] = $line;\n }\n }\n if( $this->sticky == false ) $this->setDefaults();\n return( $ret );\n }", "function chat_get_content_for_index(&$chat) {\n $documents = array();\n $course = get_record('course', 'id', $chat->course);\n $coursemodule = get_field('modules', 'id', 'name', 'chat');\n $cm = get_record('course_modules', 'course', $chat->course, 'module', $coursemodule, 'instance', $chat->id);\n if ($cm){\n $context = get_context_instance(CONTEXT_MODULE, $cm->id);\n \n // getting records for indexing\n $sessionTracks = chat_get_session_tracks($chat->id);\n if ($sessionTracks){\n foreach($sessionTracks as $aTrackId => $aTrack) {\n foreach($aTrack->sessionusers as $aUserId){\n $user = get_record('user', 'id', $aUserId);\n $aTrack->authors = ($user) ? fullname($user) : '' ;\n $documents[] = new ChatTrackSearchDocument(get_object_vars($aTrack), $cm->id, $chat->course, $aTrack->groupid, $context->id);\n }\n }\n }\n return $documents;\n }\n return array();\n}", "public function getContentAt($offset) {\n return $this->get(self::CONTENT, $offset);\n }", "function getData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_data = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit'));\n\t\t}\n\n\t\treturn $this->_data;\n\t}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "function getData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_data = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit'));\n\n\t\t\t$total = count($this->_data);\n\t\t\tfor($i = 0; $i < $total; $i++)\n\t\t\t{\n\t\t\t\t$item =& $this->_data[$i];\n\t\t\t\t$item->slug = $item->id.':'.$item->alias;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_data;\n\t}", "function getData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_data = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit'));\n\n\t\t\t$total = count($this->_data);\n\t\t\tfor($i = 0; $i < $total; $i++)\n\t\t\t{\n\t\t\t\t$item =& $this->_data[$i];\n\t\t\t\t$item->slug = $item->id.':'.$item->alias;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_data;\n\t}", "public abstract function get($index);", "public function getContent() : array\n {\n return $this->content;\n }", "abstract public function getContents($offset, $length);", "private function buildTargetContent($target, &$content)\n {\n return array(\n 'target' => $target,\n 'content' => $content\n );\n }", "public function getContent(): ArrayObject\n {\n $this->content = new ArrayObject;\n\n $allowedKeys = array_filter($this->keys, function ($v) {\n return $v !== self::NOT_ALLOWED;\n });\n $inflector = InflectorFactory::create()->build();\n foreach (array_keys($allowedKeys) as $key) {\n $method = $inflector->camelize(str_replace('@', '', $key));\n if (method_exists($this, $method)) {\n $this->content[$key] = $this->$method();\n }\n }\n\n return $this->content;\n }", "public function get_content() {\n\t\t$content = array();\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['val'] !== ''\n\t\t\t\t\tAND $item['name'] != 'Name'\n\t\t\t\t\t AND $item['name'] != 'Thumbnail'\n\t\t\t\t\t AND $item['name'] != 'Preview'\n\t\t\t\t\t AND $item['name'] != 'Global Component Rules'\n\t\t\t\t) {\n\t\t\t\t\tarray_push( $content, $item );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $content;\n\t}", "public function getContentDetailAction()\n {\n //get input\n $inputs = $this->getAllUrlParam();\n\n //define default\n $default = [];\n \n // Validate input\n $params = $this->validateApi($this->getContentDetail, $default, $inputs);\n \n if (isset($params['msgError']))\n {\n //Validate error\n return $this->validateError($params['fieldError'], $params['msgError']);\n }\n \n //get content repository\n $contentRepo = $this->getContentRepository();\n \n //get user data by id\n $result = $contentRepo->getContentDetail($params);\n\n //Check response error\n if (!$result['success'])\n {\n return $this->validateBussinessError($result['message']);\n }\n\n return $this->output($result['data']);\n }", "public function get(int $index);", "public function get(int $index);", "public function getContent() {}", "public function getContent() {}", "function data_get($target, $key, $default = null)\n {\n if ( is_null($key) )\n return $target;\n\n foreach (explode('.', $key) as $segment)\n {\n if (is_array($target)) {\n if ( ! array_key_exists($segment, $target)) {\n return value($default);\n }\n\n $target = $target[$segment];\n }\n elseif (is_object($target)) {\n if ( ! isset($target->{$segment})) {\n return value($default);\n }\n\n $target = $target->{$segment};\n }\n else {\n return value($default);\n }\n }\n\n return $target;\n }", "public static function GetContent($ids, $orderby = null) {\n $logger = \\Swiftriver\\Core\\Setup::GetLogger();\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [Method invoked]\", \\PEAR_LOG_DEBUG);\n\n //if no $orderby is sent\n if(!$orderby || $orderby == null) {\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [No Order By clause set, setting to 'date desc']\", \\PEAR_LOG_DEBUG);\n //Set it to the default - date DESC\n $orderby = \"date desc\";\n }\n\n //set up the return array\n $content = array();\n\n //If the $ids array is blank or empty, return the empty array\n if(!isset($ids) || !is_array($ids) || count($ids) < 1) {\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [No IDs sent to method]\", \\PEAR_LOG_DEBUG);\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [Method finsiehd]\", \\PEAR_LOG_DEBUG);\n return $content;\n }\n\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [START: Building the RedBean Query]\", \\PEAR_LOG_DEBUG);\n\n //set up the array to hold the ids\n $queryIds = array();\n\n //start to build the sql\n $query = \"textId in (\";\n\n /*//for each content item, add to the query and the ids array\n for($i=0; $i<count($ids); $i++) {\n $query .= \":id$i,\";\n $queryIds[\":id$i\"] = $ids[$i];\n }*/\n\n $counter = 0;\n foreach($ids as $id) {\n $query .= \":id$counter,\";\n $queryIds[\":id$counter\"] = $id;\n $counter++;\n }\n\n //tidy up the query\n $query = rtrim($query, \",\").\") order by \".$orderby;\n\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [END: Building the RedBean Query]\", \\PEAR_LOG_DEBUG);\n\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [START: Running RedBean Query]\", \\PEAR_LOG_DEBUG);\n\n //Get the finder\n $finder = RedBeanController::Finder();\n\n //Find the content\n $dbContent = $finder->where(\"content\", $query, $queryIds);\n\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [FINISHED: Running RedBean Query]\", \\PEAR_LOG_DEBUG);\n\n //set up the return array\n $content = array();\n\n //set up the red bean\n $rb = RedBeanController::RedBean();\n\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [START: Constructing Content and Source items]\", \\PEAR_LOG_DEBUG);\n\n //loop through the db content\n foreach($dbContent as $key => $dbItem) {\n //get the associated source\n $s = reset($rb->batch(\"source\", RedBeanController::GetRelatedBeans($dbItem, \"source\")));\n\n //Create the source from the db json\n $source = \\Swiftriver\\Core\\ObjectModel\\ObjectFactories\\SourceFactory::CreateSourceFromJSON($s->json);\n\n //get the json for the content\n $json = $dbItem->json;\n\n //create the content\n $item = \\Swiftriver\\Core\\ObjectModel\\ObjectFactories\\ContentFactory::CreateContent($source, $json);\n\n //add it to the array\n $content[] = $item;\n }\n\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [END: Constructing Content and Source items]\", \\PEAR_LOG_DEBUG);\n\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [Method finished]\", \\PEAR_LOG_DEBUG);\n\n //return the content\n return $content;\n }", "function jgantt_dashboard_get_contents() {\n $output = array();\n\n // Get all allowed content types and its settings\n $types = jgantt_dashboard_get_content_types();\n\n foreach ($types as $type => $config) {\n $configuration = unserialize($config->configuration);\n $grouping = explode(':', $configuration['grouping']);\n switch ($grouping[0]) {\n case 'n':\n $output[] = jgantt_dashboard_get_content_by_nodequeue($type, $configuration['date'], $grouping[1], $configuration['color'], $grouping[2], $configuration['title']);\n break;\n case 't':\n $output[] = jgantt_dashboard_get_content_by_taxonomy($type, $configuration['date'], $grouping[1], $configuration['color'], $configuration['title']);\n break;\n }\n }\n return $output;\n}", "protected abstract function getData(): array;", "public function getContent()\n {\n return $this->data;\n }", "public function get_data();", "public function getData(): array;", "public function getData(): array;", "public function getData(): array;", "public function getData(): array;", "public abstract function getContent();", "private function getContentBetween2Patterns($content, $begin, $end, $index = 0)\n {\n $items = array();\n\n if ($begin === '') {\n $resultElements = explode($end, $content);\n $start = 0;\n } else {\n $separator = $begin;\n $resultElements = explode($separator, $content);\n $start = 1;\n }\n\n for ($i = $start; $i < count($resultElements); $i++) {\n $separator = $end;\n if ($end === '') {\n $items[] = $resultElements[$i];\n } else {\n $subItems = explode($separator, $resultElements[$i]);\n $subItem = $subItems[0];\n $items[] = $subItem;\n }\n }\n\n if ($index !== false) {\n if (isset($items[$index])) {\n return $items[$index];\n } else {\n return false;\n }\n } else {\n return $items;\n }\n }", "public static function get_content_for_index(&$instance) {\n global $DB;\n\n $documents = array();\n $course = $DB->get_record('course', array('id' => $instance->course));\n $coursemodule = $DB->get_field('modules', 'id', array('name' => 'chat'));\n $params = array('course' => $instance->course, 'module' => $coursemodule, 'instance' => $instance->id);\n $cm = $DB->get_record('course_modules', $params);\n if ($cm) {\n $context = context_module::instance($cm->id);\n\n // Getting records for indexing.\n $sessiontracks = self::get_session_tracks($instance->id);\n if ($sessiontracks) {\n foreach ($sessiontracks as $atrackid => $atrack) {\n foreach ($atrack->sessionusers as $auserid) {\n $user = $DB->get_record('user', array('id' => $auserid));\n $atrack->authors = ($user) ? fullname($user) : '';\n $trackarr = get_object_vars($atrack);\n $documents[] = new ChatTrackSearchDocument($trackarr, $instance->id, $cm->id, $instance->course, $atrack->groupid, $context->id);\n }\n }\n }\n return $documents;\n }\n return array();\n }", "abstract function getContent();", "public function get(int $index): mixed;", "public function get($id = null)\n\t{\n\t\tif ($id === null)\n\t\t{\n\t\t\t$this->content = array('result' => $this->table->all()->toArray());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->content = array('result' => $this->table->get($id)->toArray());\n\t\t}\n\t}", "public function get_data(): array;", "public function get_data(): array;", "public function all_content()\n \t{\n \t\t$result='';\n \t\tforeach($this->content as $target)\n \t\t\tforeach($target as $content)\n \t\t\t\t$result.=$content;\n\n \t\treturn $result;\n \t}", "public function getContentElements()\n\t{\n\t\treturn $this->getOptionData('tl_content');\n\t}", "public function getContent(): array\n {\n return [\n 'type' => self::getType(),\n 'payload' => self::getPayload(),\n ];\n\n }", "function get_data($deep_search = false)\n {\n $content = $this->get_content();\n\n // Get article links form the main website\n $links = $this->get_article_links($content, $deep_search);\n $articles_by_author = [];\n $ignore_list = ['directories'];\n\n foreach ($links as $link) {\n // Skip blog entries for now\n if (preg_match('/.*' . join('|', $ignore_list) . '.*/', $link)) {\n continue;\n }\n\n if (preg_match('/.*article.*/', $link)) {\n $article = $this->scrape_article($link);\n }\n if (preg_match('/.*blog.*/', $link)) {\n $article = $this->scrape_blog($link);\n }\n\n $author = $article['author']['name'];\n if (empty($author))\n continue;\n\n if (!array_key_exists($author, $articles_by_author))\n $articles_by_author[$author] = [];\n $articles_by_author[$author][] = $article;\n }\n\n return $articles_by_author;\n }", "public function getMultipleData();", "public function getData() : array;", "public function getData() : array;", "public function getContentData()\n {\n return array(\n '%lounge%' => $this->lounge->getName(),\n );\n }", "public static function get_content_for_index(&$instance) {\n global $DB;\n\n // Get context.\n $coursemodule = $DB->get_field('modules', 'id', array('name' => 'book'));\n $params = array('course' => $instance->course, 'module' => $coursemodule, 'instance' => $instance->id);\n $cm = $DB->get_record('course_modules', $params);\n $context = context_module::instance($cm->id);\n\n $documents = array();\n\n // Index entries.\n $entries = $DB->get_records('book_chapters', array('bookid' => $instance->id));\n if ($entries) {\n foreach ($entries as $entry) {\n if (strlen($entry->content) > 0) {\n $arr = get_object_vars($entry);\n $documents[] = new BookPageSearchDocument($arr, $instance->course, $context->id);\n }\n }\n }\n\n return $documents;\n }", "abstract protected function getIndex();", "public function buildIndexes() {\n\t\t$return = array();\n\t\t$indexes = array(\n\t\t\t\"work\" => __DIR__.'/../content/work',\n\t\t\t\"authors\" => __DIR__.'/../content/authors',\n\t\t\t\"tags\" => __DIR__.'/../content/tags'\n\t\t);\n\t\tforeach ($indexes as $type => $location) {\n\t\t\tforeach(glob($location . '/*.json') as $file) {\n\t\t\t\t$entry = json_decode(file_get_contents($file),true);\n\t\t\t\tif ($entry) {\n\t\t\t\t\t$key = str_replace(array('.json',$location.'/'),'',$file);\n\t\t\t\t\t$return[$type][$key] = $entry;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// move author details\n\t\t$details = $return['authors'];\n\t\tunset($return['authors']);\n\t\t$return['authors']['details'] = $details;\n\n\t\t// add author details and permalink to work\n\t\tforeach ($return['work'] as $key => &$entry) {\n\t\t\t$entry['permalink'] = $this->root_url . '/view/' . $entry['id'];\n\t\t\tif (is_array($return['authors']['details'][$entry['author_id']])) {\n\t\t\t\t$entry['author_name'] = $return['authors']['details'][$entry['author_id']]['name'];\n\t\t\t\t$entry['author_byline'] = $return['authors']['details'][$entry['author_id']]['byline'];\n\t\t\t}\n\t\t}\n\n\t\t// sort work to newest-first\n\t\tuasort($return['work'], array(\"Harvard\", \"sortIndex\"));\n\n\t\t// do tag stuff\n\t\t$details = $return['tags'];\n\t\tunset($return['tags']);\n\t\t$return['tags']['details'] = $details;\n\t\t$tag_list = array();\n\t\t$tag_index = array();\n\t\t$author_index = array();\n\t\tif (is_array($return['work'])) {\n\t\t\tforeach ($return['work'] as $work) {\n\t\t\t\t$author_index[$work['author_id']][] = $work['id'];\n\t\t\t\tif (is_array($work['tags'])) {\n\t\t\t\t\tif (count($work['tags'])) {\n\t\t\t\t\t\tforeach ($work['tags'] as $tag) {\n\t\t\t\t\t\t\t$tag_index[$tag][] = $work['id'];\n\t\t\t\t\t\t\t$tag_list[] = $tag;\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$tag_list = array_unique($tag_list); // trim tags to unique\n\t\tsort($tag_list); // alphabetize\n\n\t\t// format the tag list for mustache iteration\n\t\t$tmp_array = array();\n\t\tforeach ($tag_list as $tag) {\n\t\t\t$tmp_array[]['tag'] = $tag;\n\t\t}\n\t\t$tag_list = $tmp_array;\n\n\t\t$return['tags']['count'] = count($tag_list);\n\t\t$return['tags']['list'] = $tag_list;\n\t\t$return['tags']['index'] = $tag_index;\n\n\t\t$return['authors']['index'] = $author_index;\n\n\t\tforeach ($return as $type => $data) {\n\t\t\tfile_put_contents(__DIR__.'/../content/_generated_'.$type.'.json',json_encode($data));\n\t\t}\n\t\treturn $return;\n\t}", "protected function getContentObject($uid) {\n\t\treturn $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', 'tt_content', 'uid=' . $uid);\n\t}", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();" ]
[ "0.55672264", "0.5444089", "0.52943254", "0.52768844", "0.5165288", "0.5115654", "0.508357", "0.506074", "0.506074", "0.504804", "0.5003804", "0.49891353", "0.49476627", "0.49091896", "0.49020645", "0.48923212", "0.48923212", "0.48923212", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48905784", "0.48824203", "0.4858318", "0.4856025", "0.48551688", "0.485258", "0.48428208", "0.48401645", "0.48289922", "0.48289922", "0.4828886", "0.4828371", "0.4828371", "0.4828371", "0.4828036", "0.4828036", "0.4828036", "0.48170394", "0.48170394", "0.4809149", "0.48073116", "0.48056495", "0.4798778", "0.47954294", "0.47849432", "0.47792992", "0.4747124", "0.4747124", "0.47366166", "0.47366166", "0.47345424", "0.46957207", "0.46770796", "0.46711355", "0.46587482", "0.46546975", "0.46535143", "0.46535143", "0.46535143", "0.46535143", "0.46510312", "0.4650566", "0.46446034", "0.46391234", "0.4632693", "0.4622358", "0.459473", "0.459473", "0.4590794", "0.45898017", "0.45830604", "0.45793658", "0.45733973", "0.45640165", "0.45640165", "0.4548018", "0.4547774", "0.45476237", "0.45298192", "0.45225748", "0.45177895", "0.45177895", "0.45177895", "0.45177895", "0.45177895" ]
0.7320773
0
Get fall point content 1. Get the data in an ordered noncontiguous index array. Such as: $data = ['20190501' => '20', '20190601' => '30', '20190615' => '50']; $value = ArrayHelper::getFallContent($data, '20190611', false); // $value = 30; 2. If there is no fall point, return null. 3. Ensure performance by sorting $data ahead of time: a. Sorting $data (ASC) b. Close $sortOut c. Use function ArrayHelper::getFallContent()
public static function getFallContent(Array $data, $referKey, $sortOut = 'default') { /*** Arguments prepare ***/ // Data sorting out $sortOut = $sortOut === 'default' ? self::getSortOut() : ! ! $sortOut; if ($sortOut) { ksort($data); } // Fall point content $opt = null; foreach ($data as $key => $value) { if ($key > $referKey) { break; } $opt = $value; } return $opt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function habit_risk_banner_data($data, $key = 'healthian_price', $limit = 3) {\n\n $temp_data = $data;\n array_multisort(array_column($temp_data, $key), SORT_ASC, $temp_data);\n $temp_data = array_slice($temp_data,0,$limit);\n \n return $temp_data;\n }", "function getEvent($data_fighter){\n \n $date_lim = date (\"Y-m-d H:i:s\", mktime(date(\"H\"),date(\"i\"),date(\"s\"),date(\"m\"),date(\"d\")-1,date(\"Y\")));\n \n $data = $this->find('all', array('conditions' => array (\"date >\" => $date_lim))); \n \n $x = $data_fighter['Fighter']['coordinate_x'];\n $y = $data_fighter['Fighter']['coordinate_y'];\n \n \n $nb = 0;\n $tab = array();\n foreach($data as $key){\n \n $sight_x = $key['Event']['coordinate_x']-$x;\n if ($sight_x<0)\n $sight_x = $sight_x*(-1);\n $sight_y = $key['Event']['coordinate_y']-$y;\n if ($sight_y<0)\n $sight_y = $sight_y*(-1);\n $total = $sight_x+$sight_y;\n \n if ($total<=$data_fighter['Fighter']['skill_sight']){\n $tab[$nb]=$key;\n $nb++;\n }\n \n }\n \n return $tab;\n \n }", "function get_content_stories() {\r\n\t\tglobal $wpdb;\r\n\t\t\r\n\t\t$sql = \"SELECT story_id AS id, story_title AS title, story_content AS content, timeline_date AS date, featured FROM {$this->table_mf_timeline_stories}\";\r\n\t\t$results = $wpdb->get_results( $sql, 'ARRAY_A' );\r\n\t\t\r\n\t\tif( !empty( $results ) ) {\r\n\t\t\tforeach( $results as $story ) {\r\n\t\t\t\t$date_group = date( 'F Y', strtotime( $story['date'] ) );\r\n\t\t\t\t$story['source'] = 'timeline_stories';\r\n\t\t\t\t$stories[$date_group][] = $story;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $stories;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "function getData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t $config = EventBookingHelper::getConfig() ;\t\t \n\t\t $user = & JFactory::getUser();\n\t\t $nullDate = $this->_db->getNullDate() ;\n\t\t\t$query = $this->_buildQuery();\t\t\t\t\t\t\n\t\t\t$this->_db->setQuery($query);\t\t\t\t\t\t\n\t\t\t$rows = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit'));\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tif ($user->get('id')) {\n\t\t\t\t$userId = $user->get('id');\t\t\t\t\n\t\t\t\tfor ($i = 0 , $n = count($rows) ; $i < $n ; $i++) {\n\t\t\t\t\t$row = $rows[$i] ;\n\t\t\t\t\t$sql = 'SELECT COUNT(id) FROM #__eb_registrants WHERE user_id='.$userId.' AND event_id='.$row->id.' AND (published=1 OR (payment_method=\"os_offline\" AND published != 2))';\n\t\t\t\t\t$this->_db->setQuery($sql) ;\n\t\t\t\t\t$row->user_registered = $this->_db->loadResult() ;\t\t\t\t\t\n\t\t\t\t\t//Canculate discount price\t\t\t\t\t\n\t\t\t\t\tif ($config->show_discounted_price) {\n\t\t\t\t\t $discount = 0 ;\n\t\t\t\t\t if (($row->early_bird_discount_date != $nullDate) && ($row->date_diff >=0)) {\n \t\t if ($row->early_bird_discount_type == 1) { \t\t \t\t \n \t\t\t\t\t$discount += $row->individual_price*$row->early_bird_discount_amount/100 ;\t\t\t\t\t\t\n \t\t\t\t} else { \t\t\t\t \n \t\t\t\t\t$discount += $row->early_bird_discount_amount ;\n \t\t\t\t} \t\t\t\t\n\t\t\t\t\t }\n\t\t\t\t\t if ($row->discount > 0) {\t\t\t\t\t \n \t\t\t\tif ($row->discount_type == 1) { \t\t\t\t \n \t\t\t\t\t$discount += $row->individual_price*$row->discount/100 ;\t\t\t\t\t\t\n \t\t\t\t} else { \t\t\t\t \n \t\t\t\t\t$discount += $row->discount ;\n \t\t\t\t}\n \t\t\t} \t\t\t \t\t\t \n \t\t\t$row->discounted_price = $row->individual_price - $discount ; \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\t\t\t\n\t\t\t} else {\n\t\t\t //Calculate discounted price\n\t\t\t if ($config->show_discounted_price) {\t\t\t \n \t\t\t for ($i = 0 , $n = count($rows) ; $i < $n ; $i++) {\n \t\t\t\t\t$row = $rows[$i] ; \t\t\t\t\t\t\t\t\t \t\t\t\t\t\n \t\t\t\t\tif ($config->show_discounted_price) {\n \t\t\t\t\t $discount = 0 ;\n \t\t\t\t\t if (($row->early_bird_discount_date != $nullDate) && ($row->date_diff >=0)) {\n \t\t if ($row->early_bird_discount_type == 1) { \t\t \t\t \n \t\t\t\t\t$discount += $row->individual_price*$row->early_bird_discount_amount/100 ;\t\t\t\t\t\t\n \t\t\t\t} else { \t\t\t\t \n \t\t\t\t\t$discount += $row->early_bird_discount_amount ;\n \t\t\t\t} \t\t\t\t\n \t\t\t\t\t } \t\t\t\t\t \t\t\t\n \t\t\t$row->discounted_price = $row->individual_price - $discount ; \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\t\t \t\t\t \t\t\t \t\t\t \t\t\t \n\t\t\t }\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->_data = $rows ;\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->_data;\n\t}", "public function getData()\n {\n if ($this->today == $this->first_day) {\n $data = $this->getAllData();\n }\n\n if (!empty($data)) {\n foreach ($data as $datum) {\n $this->handleData($datum);\n }\n }\n\n }", "function &getLocalizedData($key) {\n\t\t$localePrecedence = AppLocale::getLocalePrecedence();\n\t\tforeach ($localePrecedence as $locale) {\n\t\t\t$value =& $this->getData($key, $locale);\n\t\t\tif (!empty($value)) return $value;\n\t\t\tunset($value);\n\t\t}\n\n\t\t// Fallback: Get the first available piece of data.\n\t\t$data =& $this->getData($key, null);\n\t\tif (!empty($data)) {\n\t\t\t// WARNING: Collapsing the following into a single line causes PHP 5.0.5 to die.\n\t\t\t$locales = array_keys($data);\n\t\t\t$firstLocale = array_shift($locales);\n\t\t\treturn $data[$firstLocale];\n\t\t}\n\n\t\t// No data available; return null.\n\t\tunset($data);\n\t\t$data = null;\n\t\treturn $data;\n\t}", "private function _getPosData($sweres) {\n $swearr = explode(\"\\n\",$sweres);\n $points = array();\n $points['sun'] = $swearr[0]; //7\n $points['earth'] = fmod($swearr[0] + 180.0, 360.0); //5\n $points['moon'] = $swearr[1]; //4\n $points['lil'] = $swearr[2]; //2\n $points['nnode'] = $swearr[3]; //6\n $points['snode'] = fmod($swearr[3] + 180.0, 360.0); //8\n $points['asc'] = $swearr[4]; // 3\n $minuslil = $swearr[2] - 30.0;\n if ($minuslil < 0) {\n $minuslil += 360.0;\n }\n $points['prevlil'] = $minuslil; //1\n\n asort($points, SORT_NUMERIC);\n foreach (array_keys($points) as $key) {\n if ($key == 'asc') {\n break;\n } else {\n $points[$key] = array_shift($points);\n }\n }\n $order = array('prevlil' => 'I', 'lil' => 'II', 'asc' => 'III', 'moon' => 'IV', 'earth' => 'V',\n 'nnode' => 'VI', 'sun' => 'VII', 'snode' => 'VIII');\n $seq = array();\n foreach (array_keys($points) as $key) {\n $seq[] = $order[$key];\n }\n return $seq;\n }", "function oda_ordenanza_columns_content($column_name, $post_ID){\n\n if ( $_GET['post_type'] == 'ordenanza' ){\n\n if ( $column_name == 'ciudad'){\n $ciudad_ID = get_post_meta( $post_ID, ODA_PREFIX . 'ciudad_owner', true);\n $ciudad_color = get_post_meta( $ciudad_ID, ODA_PREFIX . 'ciudad_color', true);\n if ( empty( $ciudad_ID ) ){\n echo '<span class=\"label-status no-relation\">Sin ciudad</span>';\n }else{\n echo '<span class=\"label-status\" style=\"border-color:'. $ciudad_color .';\">' . get_the_title($ciudad_ID) . '</span>';\n }\n }\n\n if ( $column_name == 'tramite'){\n $nro_tramite = get_post_meta( $post_ID, ODA_PREFIX . 'resolucion_nro_tramite', true);\n if ($nro_tramite != '') {\n echo $nro_tramite;\n } else {\n _e('Sin número', 'oda');\n }\n }\n\n if ( $column_name == 'presentacion'){\n $fecha_presentacion = get_post_meta( $post_ID, ODA_PREFIX . 'resolucion_fecha', true);\n if ($fecha_presentacion != '') {\n echo $fecha_presentacion;\n } else {\n _e('Sin Fecha', 'oda');\n }\n }\n\n if ( $column_name == 'iniciativa'){\n $iniciativa_value = get_post_meta( $post_ID, ODA_PREFIX . 'ordenanza_iniciativa', true);\n\n $iniciativa_array = array(\n 'alcalde' => __( 'Alcalde', 'oda' ),\n 'concejal' => __( 'Concejal', 'oda' ),\n 'comisiones' => __( 'Comisiones', 'oda' ),\n 'ciudadania' => __( 'Ciudadanía', 'oda' ),\n );\n\n $ciudad_color = get_post_meta( $ciudad_ID, ODA_PREFIX . 'ciudad_color', true);\n if ( empty( $iniciativa_value ) ){\n echo '<span class=\"label-status no-relation\">Sin Iniciativa</span>';\n }else{\n echo '<span class=\"label-status\" style=\"border-color:'. $ciudad_color .';\">' . $iniciativa_array[$iniciativa_value] . '</span>';\n }\n }\n }\n\n}", "public function get_debit_data($i, $object, $highestRow, $worksheet) {\n $tax_debit_value = array();\n $data_arr4 = array();\n for ($j = $i; $j <= $highestRow; $j++) {\n if ($object->getActiveSheet()->getCell('B' . $j)->getValue() == \"Total\") {\n $highestColumn_dr = $worksheet->getHighestColumn($j);\n for ($k = 0; $k < 4; $k++) {\n $a11 = strlen($highestColumn_dr);\n $index1 = strlen($highestColumn_dr) - 1;\n $ord1 = ord($highestColumn_dr[$index1]);\n $a1 = substr($highestColumn_dr, 0, 1);\n $a2 = substr($highestColumn_dr, 1);\n if ($a1 != $a2 and $a2 == \"A\") {\n $ord = ord($highestColumn_dr[1]);\n $index = 1;\n $o1 = ord($a1);\n $o2 = chr($o1 - 1);\n $highestColumn_row_pp = $o2 . \"Z\";\n } else {\n $highestColumn_row_pp = $this->getAlpha($highestColumn_dr, $ord1, $a11, $index1);\n }\n $highestColumn_dr = $highestColumn_row_pp;\n }\n\n $highest_value_without_DR = $highestColumn_dr; //hightest cloumn till where we have to find our data\n $char = 'G';\n while ($char !== $highest_value_without_DR) {\n $values_DR[] = $object->getActiveSheet()->getCell($char . $j)->getValue();\n $char++;\n }\n $cnt = count($values_DR);\n\n//get the value for tax debit value\n\n $data_debit_value_tax = array();\n\n for ($a_dr = 0; $a_dr < $cnt; $a_dr++) {\n $Dr_values = $values_DR[$a_dr];\n $data_debit_value_tax[] = $values_DR[$a_dr];\n }\n\n $aa2 = array();\n for ($a_dr = 1; $a_dr < sizeof($values_DR); $a_dr++) {\n\n if ($a_dr % 5 != 0) {\n\n $aa2[] = $values_DR[$a_dr];\n }\n// var_dump($aa2);\n }\n $a1 = sizeof($aa2);\n $a2 = $a1 % 4;\n $a3 = $a1 - $a2;\n\n for ($k = 0; $k < $a3; $k = $k + 4) {\n $tax_debit_value[] = $aa2[$k] + $aa2[$k + 1] + $aa2[$k + 2] + $aa2[$k + 3];\n }\n\n for ($a_dr = 0; $a_dr < $cnt; $a_dr++) {\n// $Dr_values = $values_DR[$a_dr];\n $data_arr4[] = $values_DR[$a_dr];\n $a_dr = ($a_dr * 1 + 4);\n }\n }\n }\n\n return array($data_arr4, $tax_debit_value);\n }", "public function preProcessIndex($data): ?string\n {\n if ($data === null) {\n return null;\n }\n\n $fmt = App::make(NumberFormatter::class, ['iso' => $this->getIso()]);\n return $fmt->formatCurrency($data, $this->getIso());\n }", "public function applyData($data): ?array;", "public function getDataTypeContent()\n {\n // Next Get or Paginate the actual content from the MODEL that corresponds to the slug DataType\n if (strlen($this->dataType->model_name) != 0) {\n $this->model = app($this->dataType->model_name);\n\n if ($this->dataType->scope && $this->dataType->scope != '' && method_exists($this->model, 'scope'.ucfirst($this->dataType->scope))) {\n $query = $this->model->{$this->dataType->scope}();\n } else {\n $query = $this->model::select('*');\n }\n\n // Use withTrashed() if model uses SoftDeletes and if toggle is selected\n // @todo retirar comentario e so funcionar com usuario ativado \n // if ($this->model && in_array(SoftDeletes::class, class_uses($this->model)) && Auth::user()->can('delete', app($this->dataType->model_name))) {\n $usesSoftDeletes = true;\n\n if ($this->request->get('showSoftDeleted')) {\n $showSoftDeleted = true;\n $query = $query->withTrashed();\n }\n // }\n\n // If a column has a relationship associated with it, we do not want to show that field\n $this->removeRelationshipField($this->dataType, 'browse');\n\n if ($this->search->value != '' && $this->search->key && $this->search->filter) {\n $this->search_filter = ($this->search->filter == 'equals') ? '=' : 'LIKE';\n $this->search_value = ($this->search->filter == 'equals') ? $this->search->value : '%'.$this->search->value.'%';\n $query->where($this->search->key, $this->search_filter, $this->search_value);\n }\n\n if ($this->orderBy && in_array($this->orderBy, $this->dataType->fields())) {\n $querySortOrder = (!empty($sortOrder)) ? $sortOrder : 'desc';\n $this->dataTypeContent = call_user_func(\n [\n $query->orderBy($this->orderBy, $querySortOrder),\n $this->getter,\n ]\n );\n } elseif ($this->model->timestamps) {\n $this->dataTypeContent = call_user_func([$query->latest($this->model::CREATED_AT), $this->getter]);\n } else {\n $this->dataTypeContent = call_user_func([$query->orderBy($this->model->getKeyName(), 'DESC'), $this->getter]);\n }\n\n // Replace relationships' keys for labels and create READ links if a slug is provided.\n return $this->resolveRelations($this->dataTypeContent, $this->dataType);\n }\n\n $this->setModel(false);\n // If Model doesn't exist, get data from table name\n return call_user_func([DB::table($this->dataType->name), $this->getter]);\n }", "function data()\n {\n $arr = json_decode($this->jsonText, true);\n $ritit = new RecursiveIteratorIterator(new RecursiveArrayIterator($arr), RecursiveIteratorIterator::SELF_FIRST);\n $r = [];\n foreach ($ritit as $k => $v) {\n if (isset($v['points'])) {\n extract($v);\n $r[] = [\n 'id' => $id\n , 'title' => $title\n , 'account_wide' => $accountWide\n , 'faction_id' => $factionId\n ];\n }\n }\n\n return $r;\n }", "public function formatData() {\n $raw_data = $this->getRawData();\n $formatted_data = array();\n // Format the data based on tracking method.\n switch ($this->getTrackingMethod()) {\n case 'rest':\n // Replace marketo_id with value of MARKETO_REST_LEAD_FIELD_REST_KEY.\n foreach ($raw_data as $id => $value) {\n // Get the row corresponding to the marketo id.\n $result = db_select(MARKETO_REST_SCHEMA_LEAD_FIELDS)\n ->fields(MARKETO_REST_SCHEMA_LEAD_FIELDS)\n ->condition(MARKETO_REST_LEAD_FIELD_ID, $id)\n ->execute()\n ->fetchAll();\n // Cycle through the result row(s) and set the new rest field key.\n foreach ($result as $field) {\n if (isset($field->{MARKETO_REST_LEAD_FIELD_REST_KEY})) {\n $formatted_data[$field->{MARKETO_REST_LEAD_FIELD_REST_KEY}] = $value;\n }\n }\n }\n break;\n case 'munchkin':\n default:\n // Replace marketo_id with value of MARKETO_REST_LEAD_FIELD_MUNCHKIN_KEY.\n foreach ($raw_data as $id => $value) {\n // Get the row corresponding to the marketo id.\n $result = db_select(MARKETO_REST_SCHEMA_LEAD_FIELDS)\n ->fields(MARKETO_REST_SCHEMA_LEAD_FIELDS)\n ->condition(MARKETO_REST_LEAD_FIELD_ID, $id)\n ->execute()\n ->fetchAll();\n // Cycle through the result row(s) and set the new munchkin field key.\n foreach ($result as $field) {\n if (isset($field->{MARKETO_REST_LEAD_FIELD_MUNCHKIN_KEY})) {\n $formatted_data[$field->{MARKETO_REST_LEAD_FIELD_MUNCHKIN_KEY}] = $value;\n }\n }\n }\n break;\n }\n return $formatted_data;\n }", "public function getNonNull($content) {\n\t\tif (!is_array(current($content))) {\n\t\t\tthrow new Exception('Please use a multi-dimensional array'.\n\t\t\t\t'from '.$this->className.'->'.__FUNCTION__.'() line '.\n\t\t\t\t__LINE__\n\t\t\t);\n\t\t} else {\n\t\t\ttry {\t\t\t\n\t\t\t\t// loop through each array\n\t\t\t\t$count = count($content);\n\t\t\t\t\n\t\t\t\tfor ($i = 0; $i < $count; $i++) {\n\t\t\t\t\t$lastkey = array_pop(array_keys($content[$i]));\n\n\t\t\t\t\tforeach ($content[$i] as $subKey => $subValue) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (is_null($subValue)) {\n\t\t\t\t\t\t\tcontinue 2; // go to next array\n\t\t\t\t\t\t} \n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($subKey == $lastkey) {\n\t\t\t\t\t\t\treturn $content[$i];\n\t\t\t\t\t\t}\n\t\t\t\t\t} //<-- end foreach -->\n\t\t\t\t\t\n\t\t\t\t\treturn $content[0];\n\t\t\t\t} //<-- end foreach -->\n\t\t\t\t \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}", "public function getFormattedData();", "public function provideData()\n {\n if ($this->computedData !== false) {\n return $this->computedData;\n }\n\n $data = array();\n\n foreach ($this->dataProvider->provideData() as $post) {\n $date = \\DateTime::createFromFormat('U', 0);\n if ($post->date() !== \"\") {\n $date = \\DateTime::createFromFormat('U', $post->date());\n }\n\n $year = $date->format('Y');\n $month = $date->format('m');\n $keyDate = \\DateTime::createFromFormat('Y-m',$year.'-'.$month);\n\n if (!isset($data[$year])) {\n $data[$year] = array(\n 'posts' => array(),\n 'months' => array(),\n 'date' => $keyDate\n );\n }\n\n if (!isset($data[$year]['months'])) {\n $data[$year]['months'] = array('posts' => array(), 'date' => $keyDate);\n }\n\n $data[$year]['posts'][] = $post;\n $data[$year]['months'][$month]['posts'][] = $post;\n }\n\n $this->computedData = $data;\n\n return $data;\n }", "function _resolveData($value, $colname){\n // resolve pre and postfixes\n $column = $this->_column($colname);\n $value = $this->_addPrePostFixes($column['type'], $value);\n\n // for pages, resolve title\n $type = $column['type'];\n if(is_array($type)) $type = $type['type'];\n if($type == 'title' || ($type == 'page' && useHeading('content'))){\n $value = p_get_first_heading($value);\n }\n return $value;\n }", "public function get_data();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "protected function _getValueForDate($data = null, $returnTableRow = true) {\n\t\treturn $this->_getValueForDateTimeBase($data, $returnTableRow, '%x');\n\t}", "protected function getData()\n\t{\n\t\t$today = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", time())\n\t\t));\n\n\t\t$tomorrow = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", strtotime(\"+1 day\"))\n\t\t));\n\n\t\t// if it's not friday, return\n\t\tif (date(\"N\", time()) != 5) {\n\t\t\treturn $this->combineData(array($today, $tomorrow));\n\t\t}\n\n\n\t\t// if today is friday, also get sunday and monday's events\n\t\t$sunday = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", strtotime(\"+2 days\"))\n\t\t));\n\n\t\t$monday = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", strtotime(\"+3 days\"))\n\t\t));\n\n\t\treturn $this->combineData(array($today, $tomorrow, $sunday, $monday));\n\t}", "public function anyData()\n {\n return $this->conditionService->datatableData();\n }", "private function getContentWall($content)\n {\n $contentWall = [];\n $leaderContent = array_slice($content, 0, self::defaultContentBlocks);\n $recommendedContent = array_slice($content, self::defaultContentBlocks);\n\n $section = 0;\n $rowNumber = 0;\n foreach ($recommendedContent as $key => $eachSoldierContent) {\n $contentWall[$section]['recommendedContent'][$rowNumber][] = $eachSoldierContent;\n\n /* increase row number when number of content blocks reaches 3 */\n if(($key+1) % self::defaultContentBlocks == 0) {\n $rowNumber++;\n }\n\n /* set the row number back to 1 and increase section when number of content blocks reaches 6 */\n if(($key+1) % self::defaultRecommendedContentSize == 0)\n {\n $contentWall[$section]['leaderContent'] = $leaderContent[$section];\n $section++;\n $rowNumber = 0;\n }\n }\n return $contentWall;\n }", "public function getData()\n\t{\n $data = [];\n\n $temperatures = new WorldTemperatures;\n\n foreach ($this->cities as $city) {\n $temperateInCelsius = $temperatures->fromLatLng($city['name'], $city['lat'], $city['long']);\n\n $celsius = round($temperateInCelsius);\n $fahrenheit = round(($temperateInCelsius * 1.8) + 32);\n\n $data[\"{$city['name']}\"] = \"{$celsius}/{$fahrenheit}\";\n }\n\n $data['dallas_season'] = $this->currentSeason();\n\n return $data;\n\t}", "public function dataImpossibleCases()\n {\n return array(\n array('12345', RegionCode::US),\n array('23456789', RegionCode::US),\n array('234567890112', RegionCode::US),\n array('650+253+1234', RegionCode::US),\n array('3/10/1984', RegionCode::CA),\n array('03/27/2011', RegionCode::US),\n array('31/8/2011', RegionCode::US),\n array('1/12/2011', RegionCode::US),\n array('10/12/82', RegionCode::DE),\n array('650x2531234', RegionCode::US),\n array('2012-01-02 08:00', RegionCode::US),\n array('2012/01/02 08:00', RegionCode::US),\n array('20120102 08:00', RegionCode::US),\n array('2014-04-12 04:04 PM', RegionCode::US),\n array('2014-04-12 &nbsp;04:04 PM', RegionCode::US),\n array('2014-04-12 &nbsp;04:04 PM', RegionCode::US),\n array('2014-04-12 04:04 PM', RegionCode::US),\n );\n }", "public function ProcessData($data=null) {\n if($data !== null) $this->data = $data;\n\n $curMax = null;\n $curMin = null;\n\n if(empty($this->data)) {\n return;\n }\n\n foreach($this->data as $datum) {\n if($curMax === null || $curMax < $datum) {\n $curMax = $datum;\n }\n if($curMin === null || $curMin > $datum) {\n $curMin = $datum;\n }\n }\n\n $this->dataMin = $curMin;\n $this->dataMax = $curMax;\n }", "public function getTheadData(): ?array {\n return $this->theadData;\n }", "private function getStatistik() {\n $SHOW_DAYS = 365;\n self::$today = new DateTime();\n $resultHtml = \"\";\n\n // Jetzt Berechnungen pro Budget:\n $budgets = Persistence::getInstances(\"BUD\", \"name\", false);\n $werte = array();\n $jahre = array();\n $budgetNames = array();\n $budgetAmount = array();\n foreach ($budgets as $budget) {\n $budgetName = $budget->getProperty(\"name\", \"unbekannt\");\n $budgetNames[\"\" . $budgetName] = \"$budgetName\";\n $budgetZeitraum = $budget->getProperty(\"zeitraum\", \"\") == \"\" ? \"\" : \" \" . $budget->getProperty(\"zeitraum\", \"\");\n $budgetAmount[\"\" . $budgetName] = $budget->getProperty(\"btotal\", \"\") . $budgetZeitraum;\n if (!isset($werte[\"$budgetName\"])) {\n $werte[\"$budgetName\"] = array();\n }\n $instances = Persistence::getInstances(\"ARB\", \"datum\", false, $budget->getId(), true);\n $resultData = array();\n foreach ($instances as $instance) {\n $h = $instance->getProperty(ARB::PROPERTY_STUNDEN, 0);\n $kaz = $instance->getProperty(ARB::PROPERTY_KAZ, 0);\n list($tag, $monat, $jahr) = explode(\".\", $instance->getProperty(ARB::PROPERTY_DATUM, \"01.01.1800\"));\n if ($jahr >= \"2017\") {\n $jahre[\"\" . $jahr] = \"\" . \"$jahr\";\n if (!isset($werte[\"$budgetName\"][\"\" . $jahr])) {\n $werte[\"$budgetName\"][\"\" . $jahr][\"Jahr\"] = 0;\n $werte[\"$budgetName\"][\"\" . $jahr][\"monate\"] = array();\n }\n if (!isset($werte[\"$budgetName\"][\"\" . $jahr][\"monate\"][\"\" . $monat])) {\n $werte[\"$budgetName\"][\"\" . $jahr][\"monate\"][\"\" . $monat] = 0;\n }\n $wert = $kaz != \"\" && $h != \"\" ? ($kaz > $h ? $kaz : $h) : ($kaz != \"\" ? $kaz : ($h != \"\" ? $h : 0));\n $werte[\"$budgetName\"][\"\" . $jahr][\"monate\"][\"\" . $monat] += $wert;\n $werte[\"$budgetName\"][\"\" . $jahr][\"Jahr\"] += $wert;\n }\n }\n }\n ksort($jahre);\n $monatWerte = array();\n $jahresWerte = array();\n foreach ($budgetNames as $budgetName) {\n $budgetWert[$budgetName] = array();\n foreach ($jahre as $jahr) {\n foreach (array(\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\") as $monat) {\n // Monatswerte nur fuer die letzten 365 Tage aufnehmen:\n if (!self::isOlder($jahr, $monat, $SHOW_DAYS)) {\n $monatWerte[$budgetName][$jahr . \"\"][\"\" . $monat] = 0;\n }\n }\n $jahresWerte[$budgetName][$jahr . \"\"] = 0;\n }\n }\n foreach ($werte as $budgetName => $jahrWerte) {\n foreach ($jahrWerte as $jahr => $jahrUndMonatWerte) {\n $jahresWerte[$budgetName][$jahr . \"\"] = $jahrUndMonatWerte[\"Jahr\"];\n foreach ($jahrUndMonatWerte[\"monate\"] as $monat => $wert) {\n // Monatswerte nur fuer die letzten 365 Tage aufnehmen:\n if (!self::isOlder($jahr, $monat, $SHOW_DAYS)) {\n $monatWerte[$budgetName][\"\" . $jahr][\"\" . $monat] = $wert;\n }\n }\n }\n }\n\n // Summen über alle ARB Instanzen berechnen (Budget unabhaengig, da ARB Instanzen\n // mehreren Budgets gleichzeitig zugeordnet sein koennen\n $monatSumme = array();\n $jahrSumme = array();\n foreach ($jahre as $jahr) {\n foreach (array(\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\") as $monat) {\n // Monatswerte nur fuer die letzten 365 Tage aufnehmen:\n $monatSumme[\"$jahr-$monat\"] = 0;\n }\n $jahrSumme[\"$jahr\"] = 0;\n }\n $arbInstances = Persistence::getInstances(\"ARB\", \"datum\", false, \"\", true);\n foreach ($arbInstances as $instance) {\n $h = $instance->getProperty(ARB::PROPERTY_STUNDEN, 0);\n list($tag, $monat, $jahr) = explode(\".\", $instance->getProperty(ARB::PROPERTY_DATUM, \"01.01.1800\"));\n if ($jahr >= 2017 && is_numeric($h)) {\n $jahrSumme[\"$jahr\"] += $h;\n $monatSumme[\"$jahr-$monat\"] += $h;\n }\n }\n\n // Darstellung:\n $table = \"<table>\";\n foreach ($monatWerte as $budgetName => $jahrWerte) {\n $table .= \"<tr><td>Budget</td><td style='width: 90px;'>Max</td>\";\n foreach ($jahrWerte as $jahr => $monate) {\n foreach ($monate as $monat => $wert) {\n $table .= \"<td>\" . $monat . \"/\" . ($jahr - 2000) . \"</td>\";\n }\n }\n foreach ($jahresWerte[$budgetName] as $jahr => $wert) {\n $table .= \"<td>$jahr</td>\";\n }\n break;\n }\n $table .= \"</tr>\";\n\n $trclass = \"odd\";\n foreach ($monatWerte as $budgetName => $jahrWerte) {\n $trclass = $trclass == \"odd\" ? \"even\" : \"odd\";\n $strong = \"\";\n foreach (array(\"#022\", \"#028\", \"#030\", \"#034\", \"#039\", \"400059\", \"412622\") as $s) {\n if (strpos($budgetName, $s) !== false) {\n $strong = \"strong\";\n }\n }\n $tr = \"<tr class='$trclass $strong'><td><span title='$budgetName'><span style='padding-right: 20px;'>\" . substr($budgetName, 0, 80) . \"</span></td>\";\n $tr .= \"<td>\" . $budgetAmount[\"\" . $budgetName] . \"</td>\";\n foreach ($jahrWerte as $jahr => $monate) {\n foreach ($monate as $monat => $wert) {\n // fuer unproduktive auch die % darstellen:\n $prozentm= (stripos($budgetName, \"unproduktiv\") !== false && $monatSumme[\"$jahr-$monat\"] > 0) ? round(($wert / $monatSumme[\"$jahr-$monat\"]) * 100, 0) . \"%\" : \"\";\n $title = \"$prozentm = $wert/\" . $monatSumme[\"$jahr-$monat\"] . \" h @ \";\n $title .= \"$jahr-$monat: $budgetName\";\n $tr .= \"<td title='$title' style='width: 60px;'>$wert<br><strong>$prozentm</strong></td>\";\n }\n }\n foreach ($jahresWerte[$budgetName] as $jahr => $wert) {\n // fuer unproduktive auch die % darstellen:\n $prozent = $jahrSumme[\"$jahr\"] > 0 ? round((($wert / $jahrSumme[\"$jahr\"]) * 100), 1) . \"%\" : \"\";\n $title = (stripos($budgetName, \"unproduktiv\") !== false ? \"$prozent = $wert/\" . $jahrSumme[\"$jahr\"] . \" h\" : \"\");\n $text = $title == \"\" ? \"\" : \"<br><strong>$prozent</strong>\";\n $tr .= \"<td title='$title' style='width: 80px;'>$wert$text</td>\";\n }\n $tr .= \"</tr>\";\n $table .= \"$tr\";\n }\n $table .= \"</table>\";\n\n return \"$table\";\n }", "private function getOverBudgetList() {\r\n\t\t$sql = \"SELECT TOP 10 summary, TicketNbr, status_description AS status, Hours_Actual, \";\r\n\t\t$sql .= \"Hours_Budget, company_name, (Hours_Budget - Hours_Actual) AS hours_remaining \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE status_description NOT LIKE '>%' \";\r\n\t\t$sql .= \"AND status_description NOT LIKE 'Completed' \";\r\n\t\t$sql .= \"AND Hours_Budget > 0 \";\r\n\t\t$sql .= \"AND (Hours_Budget - Hours_Actual) < 0 \";\r\n\t\t$sql .= \"ORDER BY hours_remaining\";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$r = null;\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['summary'] = $row['summary'];\r\n\t\t\t$r[$i]['status'] = $row['status'];\r\n\t\t\t$r[$i]['ticket'] = $row['TicketNbr'];\r\n\t\t\t$r[$i]['client'] = $row['company_name'];\r\n\t\t\t$r[$i]['hremaining'] = (float)$row['hours_remaining'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function getData() : ?Collection;", "public function getData(): ?array\n {\n return $this->result;\n }", "public function getData(){\n\t\tglobal $database;\n\t\t$depts \t\t\t= Department::find_all();\n\t\t$role\t\t\t= Roles::find_all();\n\t\t$country \t\t= Country::find_all();\n $items \t\t= Items::find_all();\n\t\t$zone \t\t\t= Zone::find_by_sql(\"SELECT * FROM zone WHERE country_id=156\");\n\t\t$startups \t\t= array(\"departs\"=>$depts,\"country\"=>$country,\"state\"=>$zone,\"items\"=>$items,\"role\"=>$role);\n\t\treturn $startups;\t\t\n\t}", "public function getDailyForecast() : array\n {\n $data = $this->getForecast();\n return $data[self::DAILY_KEY] ?? [];\n }", "function getData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_data = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit'));\n\t\t}\n\n\t\treturn $this->_data;\n\t}", "public function getData(){\n\t\t$sql = \"SELECT * FROM hr_score_content\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result_array();\n\t}", "public function dataProviderForMidrange(): array\n {\n return [\n [ [ 1, 1, 1 ], 1 ],\n [ [ 1, 1, 2 ], 1.5 ],\n [ [ 1, 2, 1 ], 1.5 ],\n [ [ 8, 4, 3 ], 5.5 ],\n [ [ 9, 7, 8 ], 8 ],\n [ [ 13, 18, 13, 14, 13, 16, 14, 21, 13 ], 17 ],\n [ [ 1, 2, 4, 7 ], 4 ],\n [ [ 8, 9, 10, 10, 10, 11, 11, 11, 12, 13 ], 10.5 ],\n [ [ 6, 7, 8, 10, 12, 14, 14, 15, 16, 20 ], 13 ],\n [ [ 9, 10, 11, 13, 15, 17, 17, 18, 19, 23 ], 16 ],\n [ [ 12, 14, 16, 20, 24, 28, 28, 30, 32, 40 ], 26 ],\n ];\n }", "public function getMinutelyForecast() : array\n {\n $data = $this->getForecast();\n return $data[self::MINUTELY_KEY] ?? [];\n }", "public function getData() : ?array\n {\n $rtn = $this->data['data'];\n\n $rtn = json_decode($rtn, true);\n\n if ($rtn === false) {\n $rtn = null;\n }\n\n return $rtn;\n }", "public function get_all_past()\n\t{\n\t\t// Clean cache for testing\n\t\t//@$this->cache->delete('active_deals');\n\t\t\n\t\tif ($past_deals = $this->cache->get('past_deals'))\n\t\t{\n\t\t\t// Prepare the data\n\t\t\tforeach ($past_deals as $key=>$past_deal)\n\t\t\t{\n\t\t\t\t$past_deals[$key] = $this->prepare($past_deal);\n\t\t\t}\n\t\t\t\n\t\t\treturn $past_deals;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Get 'em \n\t\t\t$past_deals = $this->db->from($this->deal_table.' AS e')\n\t\t\t ->where('e.f_expires_at < UNIX_TIMESTAMP()')\n\t\t\t\t\t\t\t ->where('published_at <=', now())\n\t\t\t ->order_by('published_at', 'DESC')\n\t\t\t ->get()->result()\n\t\t\t ;\n\t\t\t\n\t\t\t// Prepare the data\n\t\t\tif ($past_deals)\n\t\t\t{\n\t\t\t\tforeach ($past_deals as $key=>$past_deal)\n\t\t\t\t{\n\t\t\t\t\t$past_deals[$key] = $this->prepare($past_deal);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $past_deals;\n\t\t}\n\t\t\n\t\treturn null;\n\t\t\t\n\t}", "private function daysDefault(){\n $data = array();\n\n for($i=1; $i<=31; $i++){\n $data['day_'.$i] = 0;\n }\n\n return $data;\n }", "function PrintData($key,$region)\n{\n\n $data = GetTheDataArray(array('theme','data',$key,$region));\n $returnData = '';\n if(is_array($data))\n {\n foreach($data as $key => $d)\n {\n if(!isset($data[0]) && !isset($data[1]))\n {\n $returnData .= '';\n } else {\n $returnData .= $d;\n }\n\n }\n } else {\n\n $returnData = $data;\n }\n\n return $returnData;\n\n\n}", "function dateContent() {\n\t\t//printvar(func_get_arg());\n\t\tif (func_num_args() >= 2) {\n\t\t\t$day = intval(func_get_arg(0));\n\t\t\t$content = trim(func_get_arg(1));\n\t\t\t\n\t\t\tif ($day >= 1 && $day <= 31) {\n\t\t\t\t$this->_dateArray[$day] = $content;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telseif (func_num_args() == 1) {\n\t\t\t$day = intval(func_get_arg(0));\n\t\t\t\n\t\t\tif (array_key_exists($day,$this->_dateArray)) {\n\t\t\t\treturn $this->_fillContent($this->_dateArray[$day]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t} \n\t\telse {\n\t\t\treturn $this->_dateArray;\n\t\t\t//user_error(\"You must pass at least one argument to the dateContent function of the Calendar class\", E_NOTICE);\n\t\t}\n\t}", "function getVacationData($pid) {\n $vacation_fields = array('user_id',\n 'start_date_1', 'end_date_1', 'start_date_2', 'end_date_2', 'start_date_3', 'end_date_3',\n 'ill_start_date_1', 'ill_end_date_1', 'ill_start_date_2', 'ill_end_date_2', 'ill_start_date_3', 'ill_end_date_3',\n 'future_start_1', 'future_end_1', 'future_start_2', 'future_end_2', 'future_start_3', 'future_end_3');\n $v = REDCap::getData($pid, 'json',null, $vacation_fields);\n $vacation_data = json_decode($v, true);\n\n //separate out vacation / illness / future vacation into separate arrays\n $exclude_days = array();\n foreach ($vacation_data as $key => $val) {\n\n $exclude_days[$val['user_id']]['vacation'][$val['start_date_1']] = $val['end_date_1'];\n $exclude_days[$val['user_id']]['vacation'][$val['start_date_2']] = $val['end_date_2'];\n $exclude_days[$val['user_id']]['vacation'][$val['start_date_3']] = $val['end_date_3'];\n\n $exclude_days[$val['user_id']]['illness'][$val['ill_start_date_1']] = $val['ill_end_date_1'];\n $exclude_days[$val['user_id']]['illness'][$val['ill_start_date_2']] = $val['ill_end_date_2'];\n $exclude_days[$val['user_id']]['illness'][$val['ill_start_date_3']] = $val['ill_end_date_3'];\n\n $exclude_days[$val['user_id']]['future'][$val['future_start_1']] = $val['future_end_1'];\n $exclude_days[$val['user_id']]['future'][$val['future_start_2']] = $val['future_end_2'];\n $exclude_days[$val['user_id']]['future'][$val['future_start_3']] = $val['future_end_3'];\n }\n\n return $exclude_days;\n\n }", "function getMonthPixels( &$data ) {\n\t\t$month_total_edits = array();\n\t\tforeach( $data as $year => $tmp ) {\n\t\t\tforeach( $tmp['months'] as $month => $newdata ) {\n\t\t\t\t$month_total_edits[ $month.'/'.$year ] = $newdata['all'];\n\t\t\t}\n\t\t}\n\t\n\t\t$max_width = max( $month_total_edits );\n\t\t\n\t\t$pixels = array();\n\t\tforeach( $data as $year => $tmp ) {\n\t\t\tforeach( $tmp['months'] as $month => $newdata ) {\n\t\t\t\tif( $tmp['all'] == 0 ) $pixels[$year][$month] = array();\n\t\t\t\t\n\t\t\t\t$processarray = array( 'all' => $newdata['all'], 'anon' => $newdata['anon'], 'minor' => $newdata['minor'] );\n\t\t\t\t\n\t\t\t\tasort( $processarray );\n\t\t\t\t\n\t\t\t\tforeach( $processarray as $type => $count ) {\n\t\t\t\t\t$newtmp = ceil( ( 500 * ( $count ) / $max_width ) );\n\t\t\t\t\t$pixels[$year][$month][$type] = $newtmp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $pixels;\n\t}", "function getData($data = null){\r\n\t\treturn $this->fields->getData($data);\r\n\t}", "public function dataProvider()\n {\n $data = [];\n\n $data[] = ['26-JAN-15 10:43:27', '2015-01-26 10:43:27'];\n $data[] = ['26-Jan-15 10:43:27', '2015-01-26 10:43:27'];\n $data[] = ['04-JAN-15 10:43:27', '2015-01-04 10:43:27'];\n $data[] = ['4-JAN-15 10:43:27', '2015-01-04 10:43:27'];\n\n $data[] = ['46-JAN-15 10:43:27', false];\n $data[] = ['26-ABC-15 10:43:27', false];\n $data[] = ['04-JAN-AB 10:43:27', false];\n $data[] = ['04-JAN-15 40:43:27', false];\n $data[] = ['04-JAN-15 10:79:27', false];\n $data[] = ['04-JAN-15 10:43:93', false];\n\n return $data;\n }", "protected function getData()\n {\n //prepare labels\n $labels = array('labels' => array(\n 'SESSION ID', 'TIMESTAMP', 'SEARCH TERMS', 'GEOFILTER USED', 'NUMBER OF RESULTS',\n '1ST SCORE', '2ND SCORE',\n '1ST UDI', '1ST TITLE', '1ST LINK',\n '2ND UDI', '2ND TITLE', '2ND LINK',\n 'GEOFILTER WKT'\n )\n );\n\n //prepare body's data\n $dataArray = array();\n $entityManager = $this->getDoctrine()->getManager();\n //Query\n $queryString = 'SELECT log.creationTimeStamp, log.payLoad from ' .\n LogActionItem::class . ' log where log.actionName = :actionName order by log.creationTimeStamp DESC';\n $query = $entityManager->createQuery($queryString);\n $query->setParameters(['actionName' => 'Search']);\n $results = $query->getResult();\n $griidcArray = $this->getGriidcStaff();\n\n //process result query into an array with organized data\n foreach ($results as $result) {\n //skip the row if the search is done by a Griidc Staff\n if (\n isset($result['payLoad']['clientInfo']['userId']) &&\n in_array($result['payLoad']['clientInfo']['userId'], $griidcArray)\n ) {\n continue;\n }\n\n $searchResults = array\n (\n '1stScore' => '',\n '2ndScore' => '',\n '1stUDI' => '',\n '1stTitle' => '',\n '1stLink' => '',\n '2ndUDI' => '',\n '2ndTitle' => '',\n '2ndLink' => ''\n );\n\n $numResults = $result['payLoad']['numResults'];\n if ($numResults > 0) {\n $searchResults['1stScore'] = $result['payLoad']['results'][0]['score'];\n $searchResults['1stUDI'] = $result['payLoad']['results'][0]['udi'];\n $searchResults['1stTitle'] = $result['payLoad']['results'][0]['title'];\n $searchResults['1stLink'] = $this->container->get('router')\n ->generate(\n 'pelagos_app_ui_dataland_default',\n array('udi' => $searchResults['1stUDI']),\n UrlGenerator::ABSOLUTE_URL\n );\n }\n if ($numResults > 2) {\n $searchResults['2ndScore'] = $result['payLoad']['results'][1]['score'];\n $searchResults['2ndUDI'] = $result['payLoad']['results'][1]['udi'];\n $searchResults['2ndTitle'] = $result['payLoad']['results'][1]['title'];\n $searchResults['2ndLink'] = $this->container->get('router')\n ->generate(\n 'pelagos_app_ui_dataland_default',\n array('udi' => $searchResults['2ndUDI']),\n UrlGenerator::ABSOLUTE_URL\n );\n }\n\n $dataArray[] = array_merge(\n array\n (\n 'sessionID' => $result['payLoad']['clientInfo']['sessionId'],\n 'timeStamp' => $result['creationTimeStamp']->format(parent::INREPORT_TIMESTAMPFORMAT),\n 'searchTerms' => $result['payLoad']['filters']['textFilter'],\n 'geofilterUsed' => $result['payLoad']['filters']['geoFilter'] !== null ? 1 : 0,\n 'numResults' => $numResults\n ),\n $searchResults,\n array\n (\n 'geofilterWkt' => $result['payLoad']['filters']['geoFilter'] !== null ? $result['payLoad']['filters']['geoFilter'] : ''\n )\n );\n }\n return array_merge($labels, $dataArray);\n }", "public function crawl()\n {\n if (!isset($this->date)) {\n return null;\n }\n\n $url = 'http://pt.euro-millions.com/resultados/'.date('d-m-Y', $this->date);\n $domDomcument = $this->getContentFrom($url, true);\n\n $numberWraperDomNode = $domDomcument->getElementById('jsBallOrderCell');\n $numbersDomNodes = $numberWraperDomNode->getElementsByTagName('li');\n\n $crawlResults = array(\n 'numbers' => array(),\n 'stars' => array(),\n );\n foreach ($numbersDomNodes as $key => $numberDomNode) {\n if ($key < 5) {\n $crawlResults['numbers'][] = $numberDomNode->nodeValue;\n } else {\n $crawlResults['stars'][] = $numberDomNode->nodeValue;\n }\n }\n\n $this->hasCrawled = true;\n\n return $crawlResults;\n }", "public function getBrodcastData() { \n die('Amit');\n }", "function getData();", "function getAllDataValues() {\n\t\t$conn = Doctrine_Manager::connection(); \n\t\t$resultvalues = $conn->fetchAll(\"SELECT * FROM lookuptypevalue WHERE lookuptypeid = '\".$this->getID().\"' order by lookupvaluedescription asc \");\n\t\treturn $resultvalues;\t\n\t}", "public function fetchDataToFront()\n\t{\n\t\t$this->db->order_by($this->id,$this->order);\n\t\t$this->db->limit(4);\n\t\treturn $this->db->get($this->table)->result();\n\t}", "private function _getDataProviderEmpty3()\n {\n return [\n [\n 'containerDesignBlockId' => ' ',\n 'titleDesignBlockId' => ' ',\n 'titleDesignTextId' => ' ',\n 'descriptionDesignBlockId' => ' ',\n 'descriptionDesignTextId' => ' ',\n 'paginationDesignBlockId' => ' ',\n 'paginationItemDesignBlockId' => ' ',\n 'paginationItemDesignTextId' => ' ',\n ],\n [\n 'containerDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignTextModel' => [\n 'size' => 0\n ],\n 'descriptionDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'descriptionDesignTextModel' => [\n 'size' => 0\n ],\n 'paginationDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignTextModel' => [\n 'size' => 0\n ],\n ],\n [\n 'containerDesignBlockId' => null,\n 'titleDesignBlockId' => null,\n 'titleDesignTextId' => null,\n 'descriptionDesignBlockId' => null,\n 'descriptionDesignTextId' => null,\n 'paginationDesignBlockId' => null,\n 'paginationItemDesignBlockId' => null,\n 'paginationItemDesignTextId' => null,\n ],\n [\n 'containerDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignTextModel' => [\n 'size' => 0\n ],\n 'descriptionDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'descriptionDesignTextModel' => [\n 'size' => 0\n ],\n 'paginationDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignTextModel' => [\n 'size' => 0\n ],\n ],\n ];\n }", "private function getSensorDefectiveDate($sensorID, $startDayDate, $endDayDate) {\n \t$displayType = \"0\";\n \t$generateAllSensors = \"false\";\n \t$dateList = $this->processDataRanges($displayType, $generateAllSensors, \n \t\t\t\t\t\t\t\t\t $startDayDate, $endDayDate);\n \t$fileDirectory = \"null\";\n \t$sensors = DB::table('tbl_sensors')->get();\n \t$categories = DB::table('tbl_categories')->get();\n \t$tempFileName = \"\";\n \t$sensorDefectiveDate = array();\n \t$categoryID = \"\";\n \t$categoryName = \"\";\n \t$dateToday = date(\"Y\") . \"/\" . sprintf(\"%02d\", date(\"m\")) . \"/\" . sprintf(\"%02d\", date(\"d\"));\n\n \tforeach ($dateList as $_date) {\n \t\t$date = explode(\"/\", $_date);\n\t\t\t$fileDir = \"data/\" . $date[0] . \"/\" . sprintf(\"%02d\", $date[1]) . \"/\" . \n\t\t\t\t\t sprintf(\"%02d\", $date[2]) . \"/\";\t\t\n\n\t\t\tforeach ($sensors as $sensor) {\n\t\t\t\tif ($sensor->id == $sensorID){\n\t\t\t\t\t$tempFileName = $sensor->assoc_file;\n\t\t\t\t\t$categoryID = $sensor->category_id;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($categories as $category) {\n\t\t\t\tif ($categoryID == $category->id) {\n\t\t\t\t\t$categoryName = $category->name;\n\t\t\t\t\t$categoryName = strtoupper($categoryName);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (is_dir($fileDir)) {\n\t\t\t\t$fileNames = scandir($fileDir);\n\t\t\t\t$fileDirectory = \"null\";\n\n\t\t\t\tforeach ($fileNames as $fileName) {\n\t\t\t\t\tif(stripos($fileName, $tempFileName) !== false){\n\t\t\t\t\t\t$fileDirectory = $fileDir . $fileName;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($fileDirectory == \"null\") {\n\t\t\t\t\t$sensorDefectiveDate[] = \"$_date - No sensor data was transmitted.\";\n\t\t\t\t} else if ($fileDirectory != \"null\") {\n\t\t\t\t\t$file = fopen($fileDirectory, \"r\");\n\n\t\t\t\t\twhile(! feof($file)){\n\t\t\t\t\t\t$tempData[] = fgetcsv($file);\n\t\t\t\t\t}\n\n\t\t\t\t\tfclose($file);\n\n\t\t\t\t\t$countData = count($tempData) - 7;\n\t\t\t\t\tunset($tempData);\n\n\t\t\t\t\tif ($countData == 0) {\n\t\t\t\t\t\t$sensorDefectiveDate[] = \"$_date - No sensor data was transmitted.\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($categoryName == \"AUTOMATED RAIN GAUGES\" && $_date != $dateToday) {\n\t\t\t\t\t\t\tif ($countData > 0 && $countData < 96) {\n\t\t\t\t\t\t\t\t$sensorDefectiveDate[] = \"$_date - There is transmitted sensor data but incomplete.\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ($categoryName == \"AUTOMATED STREAM GAUGES\" || \n\t\t\t\t\t\t\t\t $categoryName == \"AUTOMATED RAIN AND STREAM GAUGES\" && \n\t\t\t\t\t\t\t\t $_date != $dateToday) {\n\n\t\t\t\t\t\t\tif ($countData > 0 && $countData < 144) {\n\t\t\t\t\t\t\t\t$sensorDefectiveDate[] = \"$_date - There is transmitted sensor data but incomplete.\";\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} else {\n\t\t\t\t$sensorDefectiveDate[] = \"$_date - No sensor data was transmitted.\";\n\t\t\t}\n \t}\n\n \treturn $sensorDefectiveDate;\n }", "protected function _exportData() {\n\t\t$data = $this->_entity ? $this->_entity->export() : $this->_data;\n\n\t\tif (!$list = $this->_config['whitelist']) {\n\t\t\treturn $data;\n\t\t}\n\t\t$list = array_combine($list, $list);\n\n\t\tif (!$this->_entity) {\n\t\t\treturn array_intersect_key($data, $list);\n\t\t}\n\n\t\tforeach ($data as $type => $values) {\n\t\t\tif (!is_array($values)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$data[$type] = array_intersect_key($values, $list);\n\t\t}\n\t\treturn $data;\n\t}", "public function getLeaderboardTableData()\n {\n $data = [];\n $categories = ['bohurts','profights', 'sword_shield', 'sword_buckler', 'longswords', 'polearm', 'triathlon'];\n foreach ($categories as $category){\n $data[$category] = (array)$this->fighter->getMaxPointsPerCategory($category);\n $data[$category]['category'] = $category;\n }\n\n $data = array_map(function($data){\n return[\n 'id' => $data['id'],\n 'club' => $data['club'],\n 'image' => $data['image'],\n 'fb_image' => $data['facebook_picture'],\n 'created_at' => $data['created_at'],\n 'name' => $data['name'],\n 'max_points' => $data['max_points'],\n 'category' => ucfirst(str_replace('_',' ',$data['category']))\n ];\n },$data);\n\n $data['The Rock'] = $this->fighter->getBestBohurtStandingRatio();\n $data['The Rock']->fb_picture = $data['The Rock']->facebook_picture;\n unset($data['The Rock']->facebook_picture);\n $data['The Rock']->max_points = substr($data['The Rock']->max_points,0,2).' %';\n $data['The Rock']->category = 'The Rock';\n\n return $this->respond($data);\n }", "public function getBestSeasonFinale();", "public function daily()\n {\n $days = [];\n if ($this->daily) {\n setlocale(LC_ALL, 'sv_SV');\n $comingDays = array_slice($this->daily[\"data\"], 1, 30);\n foreach ($comingDays as $i => $data) {\n if ($data[\"time\"]) {\n $this->parseDate(\"daily\", $i, $data[\"time\"]);\n $days[$i] = $this->pushInfo(\n $this->daily[\"data\"][$i],\n [\n \"weekday\",\n \"date\",\n \"icon\",\n \"summary\",\n \"temperatureMax\",\n \"apparentTemperatureMax\",\n \"temperatureMin\",\n \"apparentTemperatureMin\",\n \"time\"\n ]\n );\n }\n }\n }\n return $days;\n }", "public function getSliceSettingsDefaultData()\n {\n $settings = array(\n 'slice_1' => array(\n 'label' => '10% OFF',\n 'discount_type' => 'percent',\n 'value' => 10,\n 'gravity' => '20',\n ),\n 'slice_2' => array(\n 'label' => 'Not Lucky Today',\n 'discount_type' => 'fixed',\n 'value' => 0,\n 'gravity' => '5',\n ),\n 'slice_3' => array(\n 'label' => '35% OFF',\n 'discount_type' => 'percent',\n 'value' => 35,\n 'gravity' => '0',\n ),\n 'slice_4' => array(\n 'label' => 'Opps! Sorry',\n 'discount_type' => 'fixed',\n 'value' => 0,\n 'gravity' => '5',\n ),\n 'slice_5' => array(\n 'label' => '15% OFF',\n 'discount_type' => 'percent',\n 'value' => 15,\n 'gravity' => '10',\n ),\n 'slice_6' => array(\n 'label' => 'Better Luck Next Time',\n 'discount_type' => 'fixed',\n 'value' => 0,\n 'gravity' => '10',\n ),\n 'slice_7' => array(\n 'label' => '50% OFF',\n 'discount_type' => 'percent',\n 'value' => 50,\n 'gravity' => '0',\n ),\n 'slice_8' => array(\n 'label' => 'Try Next Time',\n 'discount_type' => 'fixed',\n 'value' => 0,\n 'gravity' => '10',\n ),\n 'slice_9' => array(\n 'label' => 'Free Shipping',\n 'discount_type' => 'freeship',\n 'value' => 0,\n 'gravity' => '10',\n ),\n 'slice_10' => array(\n 'label' => 'Come Again',\n 'discount_type' => 'fixed',\n 'value' => 0,\n 'gravity' => '10',\n ),\n 'slice_11' => array(\n 'label' => '5% OFF',\n 'discount_type' => 'percent',\n 'value' => 5,\n 'gravity' => '10',\n ),\n 'slice_12' => array(\n 'label' => 'Try Again',\n 'discount_type' => 'fixed',\n 'value' => 0,\n 'gravity' => '10',\n )\n );\n return $settings;\n }", "private function getData()\n {\n $data = array();\n\n $data = array_merge($data,\n $this->services->CalendarData->currentUserData(),\n $this->services->Common->subPageName( $this->timber->translator->trans('Calendar') . \" | \" ),\n $this->services->Common->runtimeScripts( 'calendar' ),\n $this->services->Common->injectScripts(array(\n 'projectsEvents' => $this->services->CalendarData->projectsEvents(),\n 'tasksEvents' => $this->services->CalendarData->tasksEvents(),\n 'projectsEventsColor' => '#ecf0f1',\n 'projectsEventsTextColor' => '#2c3e50',\n 'tasksEventsColor' => '#bdc3c7',\n 'tasksEventsTextColor' => '#2980b9',\n 'calEvent_id' => $this->timber->translator->trans('ID'),\n 'calEvent_iden' => $this->timber->translator->trans('Identifier'),\n 'calEvent_type' => $this->timber->translator->trans('Type'),\n 'calEvent_mi_id' => $this->timber->translator->trans('Milestone ID'),\n 'calEvent_mi_title' => $this->timber->translator->trans('Milestone Title'),\n 'calEvent_pr_id' => $this->timber->translator->trans('Project ID'),\n 'calEvent_owner_id' => $this->timber->translator->trans('Owner ID'),\n 'calEvent_assign_to' => $this->timber->translator->trans('Assignee ID'),\n 'calEvent_assign_to_name' => $this->timber->translator->trans('Assignee Name'),\n 'calEvent_assign_to_email' => $this->timber->translator->trans('Assignee Email'),\n 'calEvent_title' => $this->timber->translator->trans('Title'),\n 'calEvent_description' => $this->timber->translator->trans('Description'),\n 'calEvent_status' => $this->timber->translator->trans('Status'),\n 'calEvent_progress' => $this->timber->translator->trans('Progress'),\n 'calEvent_priority' => $this->timber->translator->trans('Priority'),\n 'calEvent_start_at' => $this->timber->translator->trans('Start at'),\n 'calEvent_end_at' => $this->timber->translator->trans('End at'),\n 'calEvent_created_at' => $this->timber->translator->trans('Created at'),\n 'calEvent_updated_at' => $this->timber->translator->trans('Updated at'),\n 'calEvent_currency' => $this->timber->translator->trans('Currency'),\n 'calEvent_reference' => $this->timber->translator->trans('Reference'),\n 'calEvent_ref_id' => $this->timber->translator->trans('Reference ID'),\n 'calEvent_version' => $this->timber->translator->trans('Version'),\n 'calEvent_budget' => $this->timber->translator->trans('Budget'),\n 'calEvent_tax_value' => $this->timber->translator->trans('Tax Value'),\n 'calEvent_tax_type' => $this->timber->translator->trans('Tax Type'),\n 'calEvent_discount_value' => $this->timber->translator->trans('Discount Value'),\n 'calEvent_discount_type' => $this->timber->translator->trans('Discount Type'),\n 'calEvent_attach' => $this->timber->translator->trans('Attachments'),\n 'calEvent_owners' => $this->timber->translator->trans('Owners'),\n 'calEvent_staff' => $this->timber->translator->trans('Staff'),\n 'calEvent_clients' => $this->timber->translator->trans('Clients'),\n 'calEvent_staff_ids' => $this->timber->translator->trans('Staff IDs'),\n 'calEvent_clients_ids' => $this->timber->translator->trans('Clients IDs'),\n ))\n );\n\n return $data;\n }", "function showDataBySedeArea($SEDE, $AREA)\n{\n global $mysqli;\n $query = new Query($mysqli, \"SELECT nombre,apellido,sede,area_i FROM inscritos2017 where sede = ? and area_i = ? \");\n $parametros = array(\"ii\", &$SEDE, &$AREA);\n $data = $query->getresults($parametros);\n\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}", "function get_holidays() {\n $arr_holidays = array(\n 0 => array(\n 'day' => 1,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 1 => array(\n 'day' => 2,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 2 => array(\n 'day' => 3,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 3 => array(\n 'day' => 4,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 4 => array(\n 'day' => 5,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 5 => array(\n 'day' => 6,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 6 => array(\n 'day' => 7,\n 'month' => 1,\n 'holiday_name' => 'Рождество Христово',\n ),\n 7 => array(\n 'day' => 8,\n 'month' => 1,\n 'holiday_name' => 'Новогодние каникулы',\n ),\n 8 => array(\n 'day' => 23,\n 'month' => 2,\n 'holiday_name' => 'День защитника отечества',\n ),\n 9 => array(\n 'day' => 8,\n 'month' => 3,\n 'holiday_name' => 'Международный женский день',\n ),\n );\n\n return $arr_holidays;\n}", "public function Content() {\n /**\n * No ACF by default. Uncomment this and delete the regular get post line.\n * $data = \\DustPress\\Query::get_acf_post( get_the_ID() );\n */\n $data = \\DustPress\\Query::get_post( get_the_ID() );\n\n return $data;\n }", "public function Content() {\n /**\n * No ACF by default. Uncomment this and delete the regular get post line.\n * $data = \\DustPress\\Query::get_acf_post( get_the_ID() );\n */\n $data = \\DustPress\\Query::get_post( get_the_ID() );\n\n return $data;\n }", "abstract public function getData(): ?object;", "public function menor_data_emissao()\n {\n\n \t$respuesta = false;\n\t\t$factura = $this->obtener_fecha_minima_factura();\n\n if (isset($factura) && $factura['status'] == 200)\n {\n\t\t\t$respuesta = $factura['data'][0][\"data_emissao\"];\n }\t\t\n\t\n \treturn $respuesta;\n }", "public function getData(): mixed;", "private function _getDataProviderEmpty1()\n {\n return [\n [],\n [\n 'containerDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignTextModel' => [\n 'size' => 0\n ],\n 'descriptionDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'descriptionDesignTextModel' => [\n 'size' => 0\n ],\n 'paginationDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignTextModel' => [\n 'size' => 0\n ],\n ],\n [\n 'containerDesignBlockModel' => '',\n 'titleDesignBlockModel' => '',\n 'titleDesignTextModel' => '',\n 'descriptionDesignBlockModel' => '',\n 'descriptionDesignTextModel' => '',\n 'paginationDesignBlockModel' => '',\n 'paginationItemDesignBlockModel' => '',\n 'paginationItemDesignTextModel' => '',\n ],\n [\n 'containerDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignTextModel' => [\n 'size' => 0\n ],\n 'descriptionDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'descriptionDesignTextModel' => [\n 'size' => 0\n ],\n 'paginationDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignTextModel' => [\n 'size' => 0\n ],\n ],\n ];\n }", "public function data(): ?array;", "public function getDataPagamento()\n {\n return $this->dataPagamento ?? date('Y-m-d');\n }", "public static function list_columns_content( $column, $post_id ) {\n\t\tswitch ( $column ) {\n\t\t\tcase 'drsa_timing_start':\n\t\t\t\t$date = get_post_meta( $post_id, '_drsa_ad_timing_start_date', true );\n\n\t\t\t\tif ( ! empty( $date ) ) {\n\t\t\t\t\techo date_i18n( 'd.m.Y H:i', $date );\n }\n\t\t\t\tbreak;\n\n\t\t\tcase 'drsa_timing_end':\n if ( true === Dude_Really_Simple_Ads::ad_visibility_by_show_count() ) {\n $count = get_post_meta( $post_id, '_drsa_ad_timing_end_view_count', true );\n\n echo esc_html( empty( $count ) ? '-' : $count );\n break;\n } else {\n $date = get_post_meta( $post_id, '_drsa_ad_timing_end_date', true );\n\n if ( ! empty( $date ) ) {\n echo date_i18n( 'd.m.Y H:i', $date );\n }\n break;\n }\n\n\t\t\tcase 'drsa_placement':\n\t\t\t\t$place = get_post_meta( $post_id, '_drsa_ad_placement', true );\n\t\t\t\t$places = DRSA_Places::get_ad_placement_options( false );\n\n\t\t\t\tif ( ! empty( $place ) && array_key_exists( $place, $places ) ) {\n\t\t\t\t\techo $places[ $place ];\n }\n\t\t\t\tbreak;\n\n\t\t\tcase 'drsa_stats':\n\t\t\t\t$show_count = get_post_meta( $post_id, '_drsa_campaing_show_counter', true );\n\t\t\t\t$show_count = ( $show_count ) ? $show_count : '0';\n\t\t\t\t$click_count = get_post_meta( $post_id, '_drsa_campaing_click_counter', true );\n\t\t\t\t$click_count = ( $click_count ) ? $click_count : '0';\n\t\t\t\tprintf( __( '%1$s näyttöä<br />%2$s avausta', 'dude-really-simple-ads' ), $show_count, $click_count );\n\t\t\t\tbreak;\n\n\t\t\tcase 'drsa_src':\n\t\t\t\t$src = wp_get_attachment_url( get_post_thumbnail_id() );\n\t\t\t\t$target = get_post_meta( $post_id, '_drsa_ad_target_url', true );\n\n\t\t\t\tif ( ! empty( $src ) && ! empty( $target ) ) :\n\t\t\t\t\techo \"<a href='{$target}' target='_blank'><img src='{$src}' width='150' /></a>\";\n\t\t\t\telseif ( ! empty( $src ) ) :\n\t\t\t\t\techo \"<img src='{$src}' width='100' />\";\n\t\t\t\tendif;\n\n\t\t\t\tbreak;\n\t\t}\n\t}", "private function grab_data(){\n\t\t$y=0;\n\t\tfor($i=$this->startingmonth;$i>=0;$i--){\n\t\t\t$this->searchmonth = date(\"n\")-$i;\n\t\t\t$this->searchyear = date(\"Y\");\n\t\t\tif(0 >= $this->searchmonth){\n\t\t\t\twhile(0 >= $this->searchmonth){\n\t\t\t\t\t$this->searchmonth += 12;\n\t\t\t\t\t$this->searchyear--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->count_chrono_records();\n\t\t\t$this->monthlyrecordvolume[$i] = intval($this->volume_of_records_in_timerange);\n\t\t\tif(0==$this->max_month_value or $this->monthlyrecordvolume[$i] > $this->max_month_value){\n\t\t\t\t$this->max_month_value = $this->monthlyrecordvolume[$i];\n\t\t\t}\n\t\t\t$this->monthaggregator += $this->monthlyrecordvolume[$i];\n\t\t\t\n\t\t\t$this->count_months_recorded_this_year++;\n\t\t\tif(12 == $this->searchmonth or 0 == $i ){\n\t\t\t\t$this->ave_this_year[$y]['volume'] = intval($this->monthaggregator / $this->count_months_recorded_this_year);\n\t\t\t\t$this->ave_this_year[$y]['month'] = $i;\n\t\t\t\t$this->ave_this_year[$y]['year'] = $this->searchyear;\n\t\t\t\t$this->monthaggregator = 0;\n\t\t\t\t$this->count_months_recorded_this_year = 0;\n\t\t\t\t$y++;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public function dataProviderForRange(): array\n {\n return [\n [ [ 1, 1, 1 ], 0 ],\n [ [ 1, 1, 2 ], 1 ],\n [ [ 1, 2, 1 ], 1 ],\n [ [ 8, 4, 3 ], 5 ],\n [ [ 9, 7, 8 ], 2 ],\n [ [ 13, 18, 13, 14, 13, 16, 14, 21, 13 ], 8 ],\n [ [ 1, 2, 4, 7 ], 6 ],\n [ [ 8, 9, 10, 10, 10, 11, 11, 11, 12, 13 ], 5 ],\n [ [ 6, 7, 8, 10, 12, 14, 14, 15, 16, 20 ], 14 ],\n [ [ 9, 10, 11, 13, 15, 17, 17, 18, 19, 23 ], 14 ],\n [ [ 12, 14, 16, 20, 24, 28, 28, 30, 32, 40 ], 28 ],\n ];\n }", "public function getDefaultSearchData()\n {\n return array(\n self::DATE_FACTOR => 0,\n self::DATE_GROUP => null,\n self::DATE_TYPE => 'W');\n }", "public function sensorRecentReadings($sensorId, $datapoint)\n {\n $sensorDetail = Device::where('unique_id', '=', floatval($sensorId))->first();\n foreach($sensorDetail->data_points as $data_point){\n if($data_point['point'] == $datapoint){\n $minT = $data_point['minT'];\n $maxT = $data_point['maxT'];\n }\n }\n $reading = 0;\n //date_default_timezone_set(\"Europe/London\");\n $date = new DateTime(date(\"Y-m-d\"));\n $sensordataToday = array();\n $today = str_replace(\"+\",\".000+\", $date->format(DateTime::ATOM));\n $this_record = MongoSensorData::where('sensor_id', '=', floatval($sensorId))\n ->where('recordDay', '=', new DateTime($today))->first();\n\n if($this_record){\n $sensorDs = $this_record->dataSamples;\n for (end($sensorDs); key($sensorDs)!==null; prev($sensorDs)){\n $sensordata = current($sensorDs);\n // ...\n if(isset($sensordata[$datapoint])){\n $reading = $sensordata[$datapoint];\n //var_dump($reading);\n\n if($sensordata[$datapoint.'-minV'] == 1 || $sensordata[$datapoint.'-maxV'] == 1){\n $status = 'danger';\n }\n elseif($sensordata[$datapoint.'-minV'] == -1 || $sensordata[$datapoint.'-maxV'] == -1){\n $status = 'warning';\n }\n else{\n $status = 'success';\n }\n\n $min_T = $sensordata[$datapoint.'-minT'];\n $max_T = $sensordata[$datapoint.'-maxT'];\n }\n else{\n $reading = 0;\n $status = 'danger';\n $min_T = 0;\n $max_T = 0;\n }\n //var_dump($status);\n array_push($sensordataToday,\n array(\n 'sensorName' => $sensorDetail->name,\n 'sensorID' => $sensorId,\n 'dateTime' => $sensordata['recordDate']->toDateTime()->format('Y-m-d H:i:s'),\n 'reading' => round($reading, 2),\n 'status' => $status,\n 'min_threshold' => $min_T,\n 'max_threshold' => $max_T,\n 'n_min_violation' => 0,\n 'n_max_violation' => 0,\n\n )\n );\n\n if(key($sensorDs) == count($sensorDs) - 10)\n break;\n }\n }\n else{\n\n array_push($sensordataToday,\n array(\n 'sensorName' => $sensorDetail->name,\n 'sensorID' => $sensorId,\n 'dateTime' => date('Y-m-d H:i:s'),\n 'reading' => round($reading, 2),\n 'status' => 'danger',\n 'min_threshold' => isset($minT) ? $minT : 0,\n 'max_threshold' => isset($maxT) ? $maxT : 0,\n 'n_min_violation' => 0,\n 'n_max_violation' => 0,\n\n )\n );\n }\n\n\n\n\n\n\n\n $sensordataRecents = array();\n\n $sensorDRs = MongoSensorData::where('sensor_id', '=', floatval($sensorId))\n ->orderBy('recordDay', 'DESC')->take(10)->get();\n\n\n foreach($sensorDRs as $sensordata){\n $reading = $sensordata->$datapoint['average'];\n if($reading < $minT || $reading > $maxT){\n $status = 'danger';\n }\n elseif($reading == $minT || $reading == $maxT){\n $status = 'warning';\n }\n else{\n $status = 'success';\n }\n //var_dump(date_format(new DateTime($sensordata->recordDay), 'd-m-Y H:i:s'));\n //var_dump($sensordata->maxTime);\n //var_dump(date_format($sensordata->recordDay->toDateTime(), 'Y-m-d'));\n array_push($sensordataRecents,\n array(\n 'sensorName' => $sensorDetail->name,\n 'sensorID' => $sensordata->sensorId,\n 'dateTime' => date_format($sensordata->recordDay->toDateTime(), 'Y-m-d H:i:s'),\n 'reading' => round($reading, 2),\n 'status' => $status,\n 'min_threshold' => $minT,\n 'max_threshold' => $maxT,\n 'n_min_violation' => $sensordata->$datapoint['n-minV'],\n 'n_max_violation' => $sensordata->$datapoint['n-maxV'],\n )\n );\n //var_dump($sensordataRecents);\n\n }\n\n\n\n\n return response()->json(['today' => $sensordataToday, 'recents' => $sensordataRecents, 'reading' => $reading]);\n }", "public function getDataDefinition();", "public function getData(): ?string;", "function dataset0 ( ) // 允許外界直接[接觸]到內部的_dataset (可能反向排序)\n{\n return $this->_dataset;\n}", "public function hidden_data_show(){\n\n global $post;\n\n $transient_name = 'search_page';\n $cacheTime = 10; // 10 min\n\n\n\n $something = get_post_meta( $post->ID , 'search_page', true);\n\n $meta_data = json_decode($something);\n\n if( isset($meta_data->list) ){\n\n $post_type = $meta_data->search_post_type;\n $meta_data->list = $this->process_search_sidebar( $meta_data->list , $post_type );\n }\n\n $get_all_post = $this->get_all_post( $meta_data , $post_type );\n\n\n $search_page = array();\n\n $search_page = array(\n 'post_id' => $post->ID,\n 'metadata' => $meta_data,\n 'post' => $get_all_post\n );\n\n // $transient_data = json_encode( $search_page , JSON_NUMERIC_CHECK);\n\n return $search_page;\n }" ]
[ "0.47837684", "0.46918723", "0.46049055", "0.45817983", "0.45672053", "0.45473844", "0.4514903", "0.4512982", "0.45057955", "0.44910568", "0.44807276", "0.44619802", "0.44608885", "0.44560912", "0.4444486", "0.44078937", "0.43826428", "0.43641728", "0.43401757", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.43365127", "0.4325366", "0.4311591", "0.43110994", "0.4310665", "0.43033263", "0.42977288", "0.42893457", "0.42818442", "0.42763895", "0.4275234", "0.42626414", "0.42552942", "0.4251316", "0.42405608", "0.42391455", "0.42327547", "0.4227316", "0.42195985", "0.42110518", "0.42033964", "0.41981065", "0.41976124", "0.41958848", "0.41915485", "0.41914344", "0.41906494", "0.41887093", "0.41836035", "0.4183446", "0.41812673", "0.41805115", "0.4178358", "0.41734707", "0.4169079", "0.4161666", "0.4159772", "0.4158146", "0.41518968", "0.41502574", "0.41486", "0.4147167", "0.41464335", "0.41424954", "0.4142196", "0.4142196", "0.41396347", "0.41355687", "0.41332537", "0.41280445", "0.41260856", "0.41255382", "0.4123639", "0.4122894", "0.4121166", "0.4121152", "0.4120115", "0.41192988", "0.4109481", "0.41034424", "0.4099711" ]
0.57255435
0
Array Deff Recursive Compare $srcArray with $contrast and display it if something on $srcArray is not on $contrast.
public static function diffRecursive(Array $srcArray, $contrast) { $diffArray = []; foreach ($srcArray as $key => $value) { if (is_array($contrast) && array_key_exists($key, $contrast)) { if (is_array($value)) { $aRecursiveDiff = self::diffRecursive($value, $contrast[$key]); if (! empty($aRecursiveDiff)) { $diffArray[$key] = $aRecursiveDiff; } } elseif ($value != $contrast[$key]) { $diffArray[$key] = $value; } } else { $diffArray[$key] = $value; } } return $diffArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function __remarkFlow($array1, $array2){\r\n return array_diff($array1, $array2);\r\n }", "function multi_array_diff($array1, $array2)\n{\n\t$diff = array();\n\t\n\t#Do a foreach only if there are more than one levels of array below the current value (first value in array)\n\tif(contains_an_array($array1))#is_array(current($array1))\n\t{\n\t\t\n\t\tforeach($array1 AS $key_1=>$array1_1)\n\t\t{\n\t\t\tif(contains_an_array($array1_1))#is_array(current($array1_1))\n\t\t\t{\n\t\t\t\t#3 DIMENSIONAL ARRAYS \n\t\t\t\tforeach($array1_1 AS $key_1_2=>$array1_1_2)\n\t\t\t\t{\n\t\t\t\t\t#echo \"<br>KEY: \".$key_1_2.\" --- \"; print_r($array1_1_2);\n\t\t\t\t\tif(array_key_exists($key_1, $array2) && array_key_exists($key_1_2, $array2[$key_1])){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(is_array($array1_1_2) && is_array($array2[$key_1][$key_1_2])){\n\t\t\t\t\t\t\tif(count(array_diff_assoc($array1_1_2, $array2[$key_1][$key_1_2])) != 0){\n\t\t\t\t\t\t\t\t$diff[$key_1][$key_1_2] = array_diff_assoc($array1_1_2, $array2[$key_1][$key_1_2]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(strcasecmp($array1_1_2, $array2[$key_1][$key_1_2]) != 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$diff[$key_1][$key_1_2] = $array1_1_2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$diff[$key_1][$key_1_2] = $array1_1_2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t#2 DIMENSIONAL ARRAYS\n\t\t\telse\n\t\t\t{\n\t\t\t\t#echo \"<br>KEY: \".$key_1.\" --- \"; print_r($array1_1);\n\t\t\t\tif(array_key_exists($key_1, $array2)){\n\t\t\t\t\t\n\t\t\t\t\tif(is_array($array1_1) && is_array($array2[$key_1])){\n\t\t\t\t\t\tif(count(array_diff($array1_1, $array2[$key_1])) != 0){\n\t\t\t\t\t\t\t$diff[$key_1] = array_diff($array1_1, $array2[$key_1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(strcasecmp($array1_1, $array2[$key_1]) != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$diff[$key_1] = $array1_1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$diff[$key_1] = $array1_1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t#1 DIMENSIONAL ARRAYS\n\telse\n\t{\n\t\t$diff = array_diff($array1, $array2);\n\t}\n\t#echo \"<br><br><br><br>\";\n\t\n\treturn $diff;\n}", "abstract public function diffWith(array $array);", "public function test_attribute_copy_array()\n {\n $src = [\n \"1\" => \"shallow\",\n \"2\" => \"shallow\",\n \"3\" => [\n \"1\" => \"notshallow\",\n \"2\" => \"notshallow\",\n ],\n \"4\" => \"shallow\",\n \"5\" => [],\n ];\n $dist = shallow_copy_array($src);\n $expect = [\n \"1\" => \"shallow\",\n \"2\" => \"shallow\",\n \"4\" => \"shallow\"\n ];\n $this->assertTrue($this->arrays_are_similar($dist, $expect));\n }", "public function inferContrastFromPhrase($phrase)\n {\n $haystack = strtoupper($phrase);\n\n //Look for indication of both\n $both_contrast = FALSE; //Assume not both\n $both_contrast_ind[] = 'W&WO CONT';\n $both_contrast_ind[] = 'W&W/O CONT';\n $both_contrast_ind[] = 'WITH AND WITHOUT CONT';\n $both_contrast_ind[] = 'WITHOUT AND WITH CONT';\n $both_contrast_ind[] = 'WITH & WITHOUT CONT';\n $both_contrast_ind[] = 'WITHOUT & WITH CONT';\n foreach($both_contrast_ind as $needle)\n {\n $p = strpos($haystack, $needle);\n if($p !== FALSE)\n {\n $both_contrast = TRUE;\n break;\n }\n }\n if(!$both_contrast)\n {\n //Look for the NO indicators\n $no_contrast = NULL;\n $no_contrast_ind = array();\n $no_contrast_ind[] = 'WO CONT';\n $no_contrast_ind[] = 'W/O CONT';\n $no_contrast_ind[] = 'WN CONT';\n $no_contrast_ind[] = 'W/N CONT';\n $no_contrast_ind[] = 'NO CONT';\n $no_contrast_ind[] = 'WITHOUT CONT';\n $no_contrast_ind[] = 'NON-CONT';\n foreach($no_contrast_ind as $needle)\n {\n $p = strpos($haystack, $needle);\n if($p !== FALSE)\n {\n $no_contrast = TRUE;\n break;\n }\n }\n\n //Look for the YES indicators\n $yes_contrast = NULL;\n $yes_contrast_ind = array();\n $yes_contrast_ind[] = 'W CONT';\n $yes_contrast_ind[] = 'WITH CONT';\n $yes_contrast_ind[] = 'W/IV CONT';\n $yes_contrast_ind[] = 'INCLUDE CONT';\n $yes_contrast_ind[] = 'INC CONT';\n foreach($yes_contrast_ind as $needle)\n {\n $p = strpos($haystack, $needle);\n if($p !== FALSE)\n {\n $yes_contrast = TRUE;\n break;\n }\n }\n\n //Return our analysis result.\n if($no_contrast === TRUE && $yes_contrast === NULL)\n {\n return FALSE;\n }\n if($no_contrast === NULL && $yes_contrast === TRUE)\n {\n return TRUE;\n }\n }\n \n //No clues or confusing indications.\n return NULL;\n }", "function atkArrayDiff($array1, $array2)\n{\n\tforeach($array1 as $key => $value)\n\t{\n\t\tif(is_array($value))\n\t\t{\n\t\t\tif(!is_array($array2[$key]))\n\t\t\t{\n\t\t\t\t$difference[$key] = $value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_diff = atkArrayDiff($value, $array2[$key]);\n\t\t\t\tif($new_diff != FALSE)\n\t\t\t\t{\n\t\t\t\t\t$difference[$key] = $new_diff;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif(!isset($array2[$key]) || $array2[$key] != $value)\n\t\t{\n\t\t\t$difference[$key] = $value;\n\t\t}\n\t}\n\n\treturn !isset($difference) ? false : $difference;\n}", "public function contrast($factor)\n {\n if (imagefilter($this->sourceImage, IMG_FILTER_CONTRAST, $factor))\n $this->objet->setSource($this->sourceImage);\n }", "public function myRevert(array $array);", "static function DisplayArray($array)\r\n {\r\n $depth = 0;\r\n if (is_array($array))\r\n {\r\n echo \"Array (<br />\";\r\n for($i = 0; $i < count($array); $i ++)\r\n {\r\n if (is_array($array[$i]))\r\n {\r\n DisplayInlineArray($array[$i], $depth + 1, $i);\r\n }\r\n else\r\n {\r\n echo \"[\" . $i . \"] => \" . $array[$i];\r\n echo \"<br />\";\r\n $depth = 0;\r\n }\r\n }\r\n echo \")<br />\";\r\n }\r\n else\r\n {\r\n echo \"Variabele is geen array\";\r\n }\r\n }", "public static function raiseAll($inputArray){\n\t\t//Syllables come to us courtesy of the chart at http://bit.ly/2hc2MlQ\n\t\t//Function takes in an array of syllables. Function returns a modified array.\n\t\t$outputArray = $inputArray;\n\t\tforeach($outputArray as $key=>$value){\n\t\t\tswitch($value){\n\t\t\t\tcase 'ra':\n\t\t\t\t\t$outputArray[$key] = 'di';\tbreak;\n\t\t\t\tcase 'me':\n\t\t\t\t\t$outputArray[$key] = 'ri'; break;\n\t\t\t\tcase 'se':\n\t\t\t\t\t$outputArray[$key] = 'fi'; break;\n\t\t\t\tcase 'le':\n\t\t\t\t\t$outputArray[$key] = 'si'; break;\n\t\t\t\tcase 'te':\n\t\t\t\t\t$outputArray[$key] = 'li'; break;\n\t\t\t}\t\n\t\t}\n\t\treturn($outputArray);\t\n\t}", "function de($arr, $backtrace_depth=1) {\n if (!DEV_MODE) {return; }\n\n $msg = array();\n $msg[] = \"<div class='debug'><code><pre>\";\n $msg[] = get_caller($backtrace_depth);\n $msg[] = '<br/>';\n $var_name = get_var_name($arr);\n $msg[] = ($var_name !== false) ? $var_name.' ' : '';\n $msg[] = var_export($arr, true);\n //$msg[] = nl2br(var_export($arr, true));\n $msg[] = \"</pre></code></div>\";\n echo join('', $msg);\n }", "function DisplayArray($array) {\n foreach ($array as $value) {\n if (is_array($value)) {\n DisplayArray($value);\n } else {\n echo $value . \"<br>\";\n }\n }\n }", "function compare_settings_arrays( $settings_array, $array2 ){\n $new = array();\n $this->settings_array_changes = 0;\n\n //do a count comparsion to check for removed values\n if( count($settings_array) != count($array2) ){\n ++$this->settings_array_changes;//count mismatch - something changed\n }\n\n //compare each setting against array2 and look for matches\n reset($settings_array);\n foreach( $settings_array as $array_key => $array_setting ){\n\n if( is_array($array2) === true ){\n reset($array2);\n foreach( $array2 as $array2_key => $array2_inside ){\n if( $array2_inside[1] != $array_setting[1] ){\n ++$this->settings_array_changes;\n }\n $new[] = $array2_inside[1];\n unset($array2[$array2_key]); //remove as it has been processed\n unset($settings_array[$array_key]); //remove as it has been processed\n break;\n }\n }else{\n //no values posted so this value should be deleted, unset settings\n unset($settings_array[$array_key]); //remove as it has been processed\n }\n }\n\n //now check for leftovers in array2, these are new settings so just store them\n if( is_array($array2) === true ){\n reset($array2);\n foreach( $array2 as $array2_key => $array2_inside ){\n ++$this->settings_array_changes;\n $new[] = $array2_inside[1];\n unset($array2[$array2_key]); //remove as it has been processed\n\n }\n }\n\n return $new;\n }", "function arrayRecursiveDiff($a1, $a2) {\n $result = array();\n\n foreach($a1 as $va1) {\n $found = false;\n foreach($a2 as $va2) {\n try{\n //echo \"va1: \".$va1.\" va2: \".$va2.\"<br>\";\n // if its a single value we need to convert to a singleton array \n if (!is_array($va1)){\n $va1 = compact($va1);\n }\n if (!is_array($va2)){\n $va2 = compact($va2);\n } \n\n $x = array_diff($va1, $va2);\n if (empty($x)) {\n $found = true;\n } \n }\n catch (Exception $e){\n echo \"va1: \".$va1.\" va2: \".$va2.\", Exception Line 45: \".$e->getMessage();\n }\n }\n if (!$found) { \n $result[] = $va1;\n }\n }\n\n foreach($a2 as $va2) {\n $found = false;\n foreach($a1 as $va1) {\n try{\n //echo \"va1: \".$va1.\" va2: \".$va2.\"<br>\";\n // if its a single value we need to convert to a singleton array \n if (!is_array($va1)){\n $va1 = compact($va1);\n }\n if (!is_array($va2)){\n $va2 = compact($va2);\n } \n\n $x = array_diff($va2, $va1);\n if (empty($x)) {\n $found = true;\n } \n }\n catch (Exception $e){\n echo \"va1: \".$va1.\" va2: \".$va2.\", Exception Line 63: \".$e->getMessage();\n }\n }\n if (!$found) { \n $result[] = $va2;\n }\n }\n \n return $result;\n }", "public static function getPermutations($inputArray){\n\t\t//Function adds all possible sharp/flat combinations and returns a nested array of the permutations.\n\t\t$outputArray = Array($inputArray);\t\n\t\t$syllablesToLower = Array('di','ri','fi','si','li');\n\t\tforeach($inputArray as $position=>$value){\n\t\t\tif(in_array($value,$syllablesToLower)){\n\t\t\t\tforeach(Adams::branch($outputArray,$position) as $lowered){\n\t\t\t\t\t$outputArray[] = $lowered;\t\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn($outputArray);\n\t}", "protected function checkArrayEntries($array, ...$entries) {\n $missing = '';\n foreach ($entries as $e) {\n if (!isset($array[$e]))\n $missing .= $e . ', ';\n }\n if ($missing != '')\n return rtrim($missing, ', ');\n }", "function printArray($tempArray)\n{\n\tfor ($i = 0; $i < count($tempArray); $i++)\n\t{\n\t\tfor ($j = 0; $j < count($tempArray[$i]); $j++)\n\t\t{\n\t\t\tif ($tempArray[$i][$j] == $tempArray[$i][\"0\"])\n\t\t\t{\n\t\t\t\techo \"<h2>\" . \"----=\" . $tempArray[$i][$j] . \"=----<br>\" . \"</h2>\" ;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo $j . \". \" . $tempArray[$i][$j]. \"<br>\";\n\t\t\t}\n\t\t}\n\t\techo \"<br>\";\n\t}\n}", "public function test_attribute_copy_array_of_array()\n {\n $src = [\n [\n \"1\" => \"shallow\",\n \"2\" => \"shallow\",\n \"3\" => [\n \"1\" => \"notshallow\",\n \"2\" => \"notshallow\",\n ],\n \"4\" => \"shallow\",\n \"5\" => [],\n ],\n [\n \"1\" => \"shallow\",\n \"2\" => \"shallow\",\n \"3\" => [\n \"1\" => \"notshallow\",\n \"2\" => \"notshallow\",\n ],\n \"4\" => \"shallow\",\n \"5\" => [],\n ],\n ];\n $dist = shallow_copy_array_of_array($src);\n $expect = [\n [\n \"1\" => \"shallow\",\n \"2\" => \"shallow\",\n \"4\" => \"shallow\",\n ],\n [\n \"1\" => \"shallow\",\n \"2\" => \"shallow\",\n \"4\" => \"shallow\",\n ],\n ];\n $this->assertTrue($this->arrays_are_similar($dist, $expect));\n }", "function consolidateRelatedURIs($persArray){\n\t\t \n\t\t if(is_array($persArray)){\n\t\t\t\t$newPersArray = array();\n\t\t\t\t$doneURIs = array();\n\t\t\t\tforeach($persArray as $uriKey => $person){\n\t\t\t\t\t $doneRelURIs = array();\n\t\t\t\t\t $uriEx = explode(\"/\",$uriKey);\n\t\t\t\t\t $personUUID = $uriEx[count($uriEx) -1];\n\t\t\t\t\t $actName = $person[\"name\"];\n\t\t\t\t\t $actCount = $person[\"count\"];\n\t\t\t\t\t $linkedPersonURIs = $this->getLinkedPerson($personUUID);\n\t\t\t\t\t \n\t\t\t\t\t if(isset($person[\"rel\"]) || is_array($linkedPersonURIs)){\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(!isset($person[\"rel\"]) && is_array($linkedPersonURIs)){\n\t\t\t\t\t\t\t\t$person[\"rel\"] = $linkedPersonURIs;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(is_array($person[\"rel\"])){\n\t\t\t\t\t\t\t\t$maxCount = $actCount;\n\t\t\t\t\t\t\t\tforeach($person[\"rel\"] as $relURI){\n\t\t\t\t\t\t\t\t\t if(array_key_exists($relURI, $persArray) && !in_array($relURI, $doneURIs)){\n\t\t\t\t\t\t\t\t\t\t $relCount = $persArray[$relURI][\"count\"];\n\t\t\t\t\t\t\t\t\t\t if($relCount > $maxCount){\n\t\t\t\t\t\t\t\t\t\t\t\t$doneURIs[] = $uriKey;\n\t\t\t\t\t\t\t\t\t\t\t\t$uriKey = $relURI;\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t $actCount = $actCount + $relCount;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t $doneRelURIs[] = $relURI;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t if(!in_array($uriKey, $doneURIs)){\n\t\t\t\t\t\t $doneURIs[] = $uriKey;\n\t\t\t\t\t\t $newPersArray[$uriKey] = array(\"name\" => $actName, \"count\" => $actCount);\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t foreach($doneRelURIs as $doneRel){\n\t\t\t\t\t\t if(!in_array($doneRel, $doneURIs)){\n\t\t\t\t\t\t\t\t$doneURIs[] = $doneRel;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t }\n\t\t else{\n\t\t\t\t$newPersArray = $persArray;\n\t\t }\n\t\t \n\t\t \n\t\t return $newPersArray;\n\t\t //return $persArray;\n\t }", "static function printr($array)\n {\n echo '<pre>' . print_r($array, true) . '</pre>';\n }", "public function array_sanitize($array){\n\n\t\t\treturn htmlentities(mysql_real_escape_string($array));\n\n\t\t}", "function nonBlacklistedDistunguishednameArray($array,$refused=\"\"){\n $cleanArray = array();\n foreach ($array as $dn) {\n if(blacklistedDistinguishedname($dn,$refused)==FALSE){\n array_push($cleanArray,$dn);\n }\n }\n return $cleanArray;\n}", "public static function compareAnswerColorsIndexedByAnswerIdArraysToExistingAnswers($arrAnswerColors, $arrPossibleAnswers)\n {\n return (count( $arrAnswerColors) == count( $arrPossibleAnswers ) && !array_diff( array_keys($arrAnswerColors), array_keys($arrPossibleAnswers)));\n }", "public function advpngProvider() {\n $cases = [];\n\n $cases[] = [[], ['--quiet', '--recompress', '-3']];\n $cases[] = [['recompress' => FALSE], ['--quiet', '-3']];\n $cases[] = [['recompress' => FALSE, 'mode' => 1], ['--quiet', '-1']];\n $cases[] = [['mode' => 0], ['--quiet', '--recompress', '-0']];\n $cases[] = [['mode' => 4], ['--quiet', '--recompress', '-4']];\n\n return $cases;\n }", "public function difference(array $array, $options = []) {\n\t\tif ($options instanceof Closure) {\n\t\t\t$options = array('callback' => $options);\n\n\t\t} else if (is_bool($options)) {\n\t\t\t$options = array('strict' => $options);\n\t\t}\n\n\t\t$options = (array) $options + array(\n\t\t\t'strict' => true,\n\t\t\t'callback' => null,\n\t\t\t'valueCallback' => null,\n\t\t\t'on' => 'values'\n\t\t);\n\n\t\t$callback = $options['callback'];\n\t\t$valueCallback = $options['valueCallback'];\n\n\t\t// Prepare array\n\t\t$value = Hash::filter($this->_value, false, function($val) {\n\t\t\treturn !is_array($val);\n\t\t});\n\n\t\t// Values\n\t\tif ($options['on'] === 'values') {\n\n\t\t\t// Compare with callback\n\t\t\tif ($valueCallback instanceof Closure) {\n\t\t\t\tif ($callback instanceof Closure) {\n\t\t\t\t\treturn array_udiff_uassoc($value, $array, $valueCallback, $callback);\n\n\t\t\t\t} else if ($options['strict']) {\n\t\t\t\t\treturn array_udiff_assoc($value, $array, $valueCallback);\n\n\t\t\t\t} else {\n\t\t\t\t\treturn array_udiff($value, $array, $valueCallback);\n\t\t\t\t}\n\n\t\t\t// Compare regular\n\t\t\t} else {\n\t\t\t\tif ($options['strict']) {\n\t\t\t\t\tif ($callback instanceof Closure) {\n\t\t\t\t\t\treturn array_diff_uassoc($value, $array, $callback);\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn array_diff_assoc($value, $array);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn array_diff($value, $array);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Keys\n\t\t} else {\n\t\t\tif ($callback instanceof Closure) {\n\t\t\t\treturn array_diff_ukey($value, $array, $callback);\n\n\t\t\t} else {\n\t\t\t\treturn array_diff_key($value, $array);\n\t\t\t}\n\t\t}\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}", "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 static function branch($inputArray,$position){\n\t\t//It returns an array of variations that have the specified position toggled (lowered).\n\t\t$outputArray = Array();\n\t\tforeach($inputArray as $subArray){\n\t\t\t$subArrayLowered = Adams::lowerSingle($subArray,$position);\n\t\t\t$outputArray[] = $subArrayLowered;\n\t\t}\t\n\t\treturn($outputArray);\n\t}", "function ary_diff( $ary_1, $ary_2 ) {\n // get differences that in ary_1 but not in ary_2\n // get difference that in ary_2 but not in ary_1\n // return the unique difference between value of 2 array\n $diff = array();\n\n // get differences that in ary_1 but not in ary_2\n foreach ( $ary_1 as $v1 ) {\n $flag = 0;\n foreach ( $ary_2 as $v2 ) {\n $flag |= ( $v1 == $v2 );\n if ( $flag ) break;\n }\n if ( !$flag ) array_push( $diff, $v1 );\n }\n\n return $diff;\n }", "function isWinner($values, $answer, $num)\n{\n $newArr = [];\n $ans = [];\n // clear js array from html tags and conver to low \n foreach ($values as $val) {\n $newArr[] = strtolower(strip_tags($val));\n }\n unset($val);\n\n // Convert stored array to the simple view\n for ($i = 0; $i < 16; $i++) {\n for ($j = 0; $j < 4; $j++) {\n for ($k = 0; $k < 4; $k++) {\n if (is_array($answer[$i][$j][$k])) {\n $ans[] = $answer[$i][$j][$k][0];\n } else {\n $ans[] = $answer[$i][$j][$k];\n }\n }\n }\n }\n // Compare two arrays\n for ($i = 0; $i < count($newArr); $i++) {\n if ($newArr[$i] != $ans[$i]) {\n if ($ans[$i] != $num) return 0; \n }\n }\n return 1;\n}", "public function contrast($value=-10)\n\t{\n\t\tif (!function_exists('imagefilter')) {\n\t\t\tthrow new Exception('imagefilter function is only available if PHP is compiled with the bundled version of the GD library.');\n\t\t}\n\t\t$this->checkImage();\n\t\t$value = max(-255, min($value, 255));\n\t\timagefilter($this->imageResized, IMG_FILTER_CONTRAST, $value);\n\n\t\treturn $this;\n\t}", "function compareValues($data_array, $sql_records) {\n\t$changes = array();\n\tforeach ($data_array as $key => $val) {\n\t\t$diff = array_diff_assoc($data_array[$key], $sql_records[$key]);\n\t\tif ($diff) {\n\t\t\t$changes[$key] = $diff;\n\t\t}\n\t}\n\n\treturn $changes;\n}", "function displayResults($arrayName) \n{\n //Display Non-aggregated results: \n //(Non-Aggregated Arrays have the following elements:\n //value[0]Trimmed URL, value[1] Title, value[2] Snippet, value[3] Score, \n //value[4] Y/N Seen, value[5] Original URL, value[6] Cleaned Snippet placeholder)\n if ($_POST['result_type']==='Non-Aggregated' ) {\n //Loop through Array and check that values have been stored in it:\n foreach ($arrayName as $key => $value) {\n echo \"<p style=\\\"text-align:justify\\\">\n <a href=\\\"$value[5]\\\">$value[1]</a><br />\" \n . $value[2] //snippet\n . \"<br />Score: <strong>\" \n . number_format($value[3], 2, '.', '') //score\n . \"</strong>\" \n . \"<br /><a href=\\\"#top\\\"><small>new search</small></a></p>\";\n }\n } else if ($_POST['result_type']==='Aggregated'\n || $_POST['result_type']==='Weighted'\n ) {\n //Display Aggregated or Weighted results:\n //(Aggregated Arrays have the following elements:\n //value[0]Trimmed URL, value[1] Title, value[2] Snippet, value[3] Score, \n //value[4] Y/N Seen, value[5] Original URL, \n //value[6] Cleaned Snippet placeholder, value[7] coordinate placeholder)\n foreach ($arrayName as $key => $value) {\n echo \"<p class=\\\"text-center\\\">\n <a href=\\\"$value[4]\\\">$value[1]</a><br />\"\n . $value[2] //snippet\n . \"<br />Score: <strong>\" . number_format($value[3], 2, '.', '') \n . \"</strong>\"\n . \"<br /><a href=\\\"#top\\\"><small>new search</small></a></p>\";\n }\n } else {\n //Display Clustered Results\n //(Clustered Arrays have the following elements:\n //value[0]Trimmed URL, value[1] Title, value[2] Snippet, value[3] Score, \n //value[4] Original URL, value[5] Cleaned Snippet, \n //value[6] Coordinate)\n foreach ($arrayName as $key => $value) {\n echo \"<p style=\\\"text-align:justify\\\">\n <a href=\\\"$value[4]\\\">$value[1]</a><br />\"\n . $value[2] //snippet\n . \"<br />Score: <strong>\" . number_format($value[3], 2, '.', '') \n . \"</strong>\"\n . \"<br /><a href=\\\"#top\\\"><small>new search</small></a></p>\";\n }\n }\n}", "public function getFiltred(array &$data);", "function atkArrayCompare($array1, $array2)\n{\n\t$difference = atkArrayDiff($array1, $array2);\n\n\treturn !is_array($difference) ? false : true;\n}", "public function testEvaluateFailsWhenArrayNotSame(): void\n {\n $actual = [\n 'random' => 'value',\n 'date' => new DateTime('2019-10-10T01:01:01Z'),\n 'deep' => [\n 'deeper' => [\n 'date' => new DateTime('2019-10-10T00:00:00+0000'),\n ]\n ]\n ];\n\n $expected = [\n 'random' => 'value',\n 'date' => new DateTime('2019-10-10T00:00:00Z'),\n 'deep' => [\n 'deeper' => [\n 'date' => new DateTime('2019-10-10T00:00:00+0000'),\n ]\n ]\n ];\n\n $constraint = new ArraySameWithDates($expected);\n $result = $constraint->evaluate($actual, '', true);\n\n self::assertFalse($result);\n }", "function feedback($array)\r\n{\r\n\r\n\tforeach ($array as $key=>$value)\r\n\t{\r\n\t\t$output.=format_feedback($value);\r\n\t}\r\n\t$output.=feedback_form();\r\n\treturn $output;\r\n}", "function diff($array1,$array2,$options=array('strict'=>false,'numberChange'=>false)) {\n\t\t$changes=array();\n\n\t\tforeach ($array2 as $columnName=>$columnValue) {\n\t\t\t$oldColumnValue=$array1[$columnName];\n\t\t\tif ($columnValue!=$oldColumnValue) {\n\t\t\t\tif ($options['numberChange']===true and (is_numeric($columnValue) or empty($columnValue)) and \n\t\t\t\t\t(is_numeric($oldColumnValue) or empty($oldColumnValue))) {\n\t\t\t\t\t$changes[$columnName]=intval($columnValue)-intval($oldColumnValue);\n\t\t\t\t} else {\n\t\t\t\t\t$changes[$columnName]=$columnValue;\n\t\t\t\t}\n\t\t\t\t// $columnName.'='.$changes[$columnName].'|'.$oldColumnValue.' -> '.$columnValue.'<br/>';\n\t\t\t}\n\t\t}\n\n\t\treturn $changes;\n\t}", "public function getFeedback(): array\n {\n $feedback = [];\n $suites = $this->isSingle ? $this->suites : $this->suites[0]->suites;\n foreach ($suites as $suite) {\n foreach ($suite->cases as $case) {\n if (count($case->errors) > 0) {\n $feedback[] = 'E';\n } elseif (count($case->warnings) > 0) {\n $feedback[] = 'W';\n } elseif (count($case->failures) > 0) {\n $feedback[] = 'F';\n } elseif (count($case->risky) > 0) {\n $feedback[] = 'R';\n } elseif (count($case->skipped) > 0) {\n $feedback[] = 'S';\n } else {\n $feedback[] = '.';\n }\n }\n }\n\n return $feedback;\n }", "function da( $TheArray ){ // Note: the function is recursive\r\n\tif(!is_array($TheArray)){\r\n\t\treturn \"no array\";\r\n\t}\r\n\techo \"<table border=0>\\n\";\r\n\t$Keys = array_keys( $TheArray );\r\n\tforeach( $Keys as $OneKey ){\r\n\t\techo \"<tr>\\n\";\r\n\t\techo \"<td bgcolor='#727450'>\";\r\n\t\techo \"<B>\" . $OneKey . \"</B>\";\r\n\t\techo \"</td>\\n\";\r\n\t\techo \"<td bgcolor='#C4C2A6'>\";\r\n\t\tif ( is_array($TheArray[$OneKey]) ){\r\n\t\t\tda($TheArray[$OneKey]);\r\n\t\t}else{\r\n\t\t\techo $TheArray[$OneKey];\r\n\t\t}\r\n\t\techo \"</td>\\n\";\r\n\t\techo \"</tr>\\n\";\r\n\t}\r\n\techo \"</table>\\n\";\r\n}", "function printArray($objArray) {\r\n\t\tglobal $global_config;\r\n\t\tif($global_config[\"debug_mode\"] == \"1\"){\r\n\t\t\tif(is_array($objArray)) {\r\n\t\t\t\tprint \"<PRE>\";\r\n\t\t\t\tprint_r($objArray);\r\n\t\t\t\tprint \"</PRE>\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tprint $objArray.\" <br> \";\r\n\t\t}\t\r\n\t}", "public function Contrast(int $contrast)\n {\n return $this->setOption('con', $contrast);\n }", "function handle_person_answers_color($arr){\n\t\tif(!is_array($arr)){\n\t\t\t$arr = unserialize($arr);\n\t\t}\n\t\t$res = array();\n\t\t$question_count = count($arr);\n\t\tif(is_array($arr)){\t\t\n\t\t\t$correct_answer = array();\n\t\t\t$answer_match_result = array();\n\t\t\t$question_ids = null; // 题目id串,comma seperated\n\t\t\tforeach ($arr as $key=>$val){\n\t\t\t\tif(!isset($val['answer'])){\n\t\t\t\t\t\t$val['answer'] = null;\n\t\t\t\t}\n\t\t\t\tif(strtolower($val['answer'])==strtolower($val['input']) && $val['answer']!=null){\n\t\t\t\t\t$correct_answer[] =$val['answer'];// $val['question_order'];\n\t\t\t\t\t$answer_match_result[] = 'green'; // 为了展示颜色,匹配前端的class 名称\n\t\t\t\t}elseif($val['input']==null){\n\t\t\t\t\t$answer_match_result[] = 'gray';// 为了展示颜色,匹配前端的class 名称\n\t\t\t\t}else{\n\t\t\t\t\t$answer_match_result[] = 'red';// 为了展示颜色,匹配前端的class 名称\n\t\t\t\t}\n\t\t\t\t$question_ids .= $val['question_id'].',';\n\t\t\t}\n\t\t\t// var_dump($answer_match_result);die;\n\t\t\t$res['answer_match_result'] = $answer_match_result;\n\t\t\t$res['question_ids'] = rtrim($question_ids,',');\n\t\t\t$res['question_arr'] = explode(',', $res['question_ids']);\n\t\t\t$res['correct_answer'] = $correct_answer;\n\t\t\t$res['correct_answer_count'] = count($correct_answer);\n\t\t\t$res['correct_answer_string'] = implode(',', $correct_answer);\n\t\t\t$res['question_count'] = $question_count;\n\t\t\tif(!$question_count){\n\t\t\t\t$res['score'] = 0;\n\t\t\t}else{\n\t\t\t\t$res['score'] = 100*$res['correct_answer_count']/$question_count;\n\t\t\t}\n\t\t}else{\n\t\t\t$res['answer_match_result'] = array();\n\t\t\t$res['question_ids'] = '';\n\t\t\t$res['question_arr'] = array();\n\t\t\t$res['correct_answer'] = array();\n\t\t\t$res['correct_answer_count'] = 0;\n\t\t\t$res['correct_answer_string'] = '';\n\t\t\t$res['question_count'] = $question_count;\n\t\t\t$res['score'] = 0;\n\t\t}\n\t\treturn $res;\n\t}", "function rectify_wordArray($wordArray)\n\t{\n\t\t$allWords = array();\n\t\tforeach ($wordArray as $file => $array) {\n\t\t\t$frequencies = $array[\"frequencies\"];\n\t\t\t$allWords = array_merge($allWords, array_keys($frequencies));\n\t\t}\n\t\t$allWords = array_unique($allWords);\n\t\t\n\t\tforeach ($wordArray as $file => $array) {\n\t\t\t$frequencies = $array[\"frequencies\"];\n\t\t\t$newArray = array();\n\t\t\tforeach ($allWords as $word) {\n\t\t\t\tif (isset($frequencys[$word])) {\n\t\t\t\t\t$newArray[$word] = $frequencys[$word];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$newArray[$word] = NULL;\n\t\t\t\t}\n\t\t\t\t$wordArray[$file] = $newArray;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $wordArray;\n\t}", "function show_array($array, $die=true){\n echo \"<pre>\";\n print_r($array);\n echo \"</pre>\";\n if($die){\n die();\n }\n}", "public function getContrastColours() {\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);\n\t}", "function immunCheck ($immId, $pid, $ageDays, $hivStatus, $immArray, $symptomatic = null, $pcr = null) {\n $immunSymp = immunSymp ($hivStatus, $symptomatic, $pcr, $ageDays);\n\n if (DEBUG_FLAG) {\n echo \"<BR />Checking patient $pid, age $ageDays, immunSymp $immunSymp, hivStatus: \";\n if (isset ($hivStatus[\"exp\"])) sort ($hivStatus[\"exp\"]);\n if (isset ($hivStatus[\"inf\"])) sort ($hivStatus[\"inf\"]);\n print_r ($hivStatus);\n echo \", immunizations: \";\n print_r ($immArray);\n if (isset ($symptomatic)) {\n echo \", symptomatic: \";\n if (isset ($symptomatic[\"symp\"])) sort ($symptomatic[\"symp\"]);\n if (isset ($symptomatic[\"asymp\"])) sort ($symptomatic[\"asymp\"]);\n print_r ($symptomatic);\n }\n if (isset ($pcr)) {\n echo \", PCR: \";\n if (isset ($pcr[\"pos\"])) sort ($pcr[\"pos\"]);\n if (isset ($pcr[\"neg\"])) sort ($pcr[\"neg\"]);\n print_r ($pcr);\n }\n echo \"<BR />\\n\";\n }\n\n switch ($immId) {\n case 1: // BCG\n if (isset ($immArray[$immId])) {\n sort ($immArray[$immId]);\n }\n if (isset ($pcr[\"neg\"])) {\n sort ($pcr[\"neg\"]);\n }\n if (DEBUG_FLAG) echo count ($immArray[$immId]) . \" doses of BCG<BR />\\n\";\n if (\n (\n isset ($pcr[\"neg\"]) &&\n !isset ($pcr[\"pos\"]) &&\n isset ($immArray[$immId]) &&\n $immArray[$immId][0] >= $pcr[\"neg\"][0]\n ) ||\n (\n !isset ($pcr[\"neg\"]) &&\n !isset ($immArray[$immId])\n )\n ) { if (DEBUG_FLAG) echo \"Passed BCG<BR />\\n\"; return true; }\n else { if (DEBUG_FLAG) echo \"Failed BCG<BR />\\n\"; return false; }\n break;\n case 2: // Hep B\n if (DEBUG_FLAG) echo count ($immArray[$immId]) . \" doses of HepB<BR />\\n\";\n if (($ageDays < 30 && count ($immArray[$immId]) >= 1) ||\n ($ageDays >= 30 && $ageDays < 180 && count ($immArray[$immId]) >= 2) ||\n ($ageDays >= 180 && count ($immArray[$immId]) >= 3)) {\n if (DEBUG_FLAG) echo \"Passed HepB<BR />\\n\";\n return true;\n } else {\n if (DEBUG_FLAG) echo \"Failed HepB<BR />\\n\";\n return false;\n }\n break;\n case 3: // Polio\n if (DEBUG_FLAG) echo count ($immArray[$immId]) . \" doses of Polio<BR />\\n\";\n if (($ageDays < 42 && count ($immArray[$immId]) == 0) ||\n ($ageDays >= 42 && $ageDays < 70 && count ($immArray[$immId]) >= 1 && !$immunSymp) ||\n ($ageDays >= 70 && $ageDays < 98 && count ($immArray[$immId]) >= 2 && !$immunSymp) ||\n ($ageDays >= 98 && count ($immArray[$immId]) >= 3 && !$immunSymp) ||\n ($ageDays >= 42 && count ($immArray[$immId]) == 0 && $immunSymp)) {\n if (DEBUG_FLAG) echo \"Passed Polio<BR />\\n\";\n return true;\n } else {\n if (DEBUG_FLAG) echo \"Failed Polio<BR />\\n\";\n return false;\n }\n break;\n case 4: // DTP\n case 5: // HIB\n if (DEBUG_FLAG) echo count ($immArray[$immId]) . \" doses of DTP/HIB<BR />\\n\";\n if (($ageDays < 42 && count ($immArray[$immId]) == 0) ||\n ($ageDays >= 42 && $ageDays < 70 && count ($immArray[$immId]) >= 1) ||\n ($ageDays >= 70 && $ageDays < 98 && count ($immArray[$immId]) >= 2) ||\n ($ageDays >= 98 && count ($immArray[$immId]) >= 3)) {\n if (DEBUG_FLAG) echo \"Passed DTP/HIB<BR />\\n\";\n return true;\n } else {\n if (DEBUG_FLAG) echo \"Failed DTP/HIB<BR />\\n\";\n return false;\n }\n break;\n case 6: // ROR\n case 7: // Measles\n if (DEBUG_FLAG) echo count ($immArray[$immId]) . \" doses of ROR<BR />\\n\";\n if (($ageDays < DAYS_IN_YEAR && count ($immArray[$immId]) == 0) ||\n ($ageDays >= DAYS_IN_YEAR && count ($immArray[$immId]) >= 1 && !$immunSymp) ||\n ($ageDays >= DAYS_IN_YEAR && count ($immArray[$immId]) == 0 && $immunSymp)) {\n if (DEBUG_FLAG) echo \"Passed ROR<BR />\\n\";\n return true;\n } else {\n if (DEBUG_FLAG) echo \"Failed ROR<BR />\\n\";\n return false;\n }\n break;\n default:\n if (DEBUG_FLAG) echo \"Unknown id $immId<BR />\\n\";\n return false;\n break;\n }\n}", "static function array_clean($array) {\n\t\treturn array_diff($array,array(null,'',\"\\n\",\"\\s\",\"\\r\",\"\\r\\n\",\"\\n\\r\"));\n\t}", "function cellchecks($Array){\n\tglobal $Groups,$runs,$log;\n\t$finished=false;\n\twhile($finished==false){\n\t\t$Backup=$Array;\n\t\t$log.= 'start cellchecks:<div class=\"note\">';\n\t\t//check rows, columns and blocks for single numbers\n\t\tforeach($Groups as $Group){\n\t\t\t$Array=singles($Group, $Array);\n\t\t}\n\t\t$log.= '</div><div class=\"note\">';\n\t\t//check rows, coluns and blocks for numbers in one cell only\n\t\tforeach($Groups as $Group){\n\t\t\t$Array=oneplace($Group, $Array);\n\t\t}\n\t\t$log.='</div>';\n\t\tif($Array==$Backup){\n//if array hasn't changed yet, check rows, coluns and blocks for the same two numbers in two cells\n\t\t\t$log.= '<div class=\"note\">';\n\t\t\tforeach($Groups as $Group){\n\t\t\t\t$Array=doubles($Group,$Array);\n\t\t\t}\n\t\t\t$log.='</div>';\n\t\t}\n\n\t\tif($Array==$Backup){\n//if array hasn't changed yet, check rows, columns and blocks for two numbers appearing only in the same two cells\n\t\t\t$log.= '<div class=\"note\">';\n\t\t\tforeach($Groups as $Group){\n\t\t\t\t$Array=twoplaces($Group,$Array);\n\t\t\t}\n\t\t\t$log.='</div>';\n\t\t}\n\t\t//has array changed?\n\t\tif($Array==$Backup){\n\t\t\t$finished=true;\n\t\t\t$log.='array unchanged'.minitable($Array);\n\t\t}\n\t\telse{\n\t\t\t$runs++;\n\t\t}\n\n\t}\n\treturn $Array;\n}", "public function diffAssoc($array1)\n {\n return $this->combineCallback('array_diff_assoc', func_get_args());\n }", "private function printArray($array){\n\t\techo \"<pre>\".print_r($array,true).\"</pre>\";\n\t}", "public function formatApplicantArray(array $answers);", "function array_compare($array1, $array2)\n {\n return empty(array_diff($array1, $array2));\n }", "public function printSourceArray()\n {\n $this->show($this->SourceCodeArray);\n }", "public function array_compare( $array1, $array2 )\n {\n $diff = false;\n\n foreach( $array1 as $key => $value )\n {\n if( ! array_key_exists( $key, $array2 ) )\n {\n $diff[0][$key] = $value;\n } elseif ( is_array( $value ) )\n {\n if ( ! is_array( $array2[$key] ) )\n {\n $diff[0][$key] = $value;\n $diff[1][$key] = $array2[$key];\n } else\n {\n $new = self::array_compare( $value, $array2[$key] );\n\n if ( $new !== false )\n {\n if ( isset( $new[0] ) )\n $diff[0][$key] = $new[0];\n\n if ( isset( $new[1] ) )\n $diff[1][$key] = $new[1];\n }\n }\n } elseif ( $array2[$key] !== $value )\n {\n $diff[0][$key] = $value;\n $diff[1][$key] = $array2[$key];\n }\n }\n\n foreach ( $array2 as $key => $value )\n {\n if ( ! array_key_exists( $key, $array1 ) )\n $diff[1][$key] = $value;\n }\n\n return $diff;\n }", "public function summary(array $array);", "function d2d_check_array(&$array, $checks) {\n if (!is_array($array)) {\n return FALSE;\n }\n if (array_keys($array) !== array_keys($checks)) {\n return FALSE;\n }\n $tmp_array = $array;\n foreach ($tmp_array as $key => &$value) {\n if (!call_user_func_array($checks[$key], array(&$value))) {\n return FALSE;\n }\n }\n $array = $tmp_array;\n return TRUE;\n}", "public abstract function retain_array(Array $array);", "public function easyPrint($array, $die = 0) {\n\t\tprint \"<pre>\";\n\t\tprint_r($array);\n\t\tprint \"</pre>\";\t\n $die == 1 ? die() : \"\";\n\t}", "function diff($arr1, $arr2)\n{\n $res = array();\n $r = 0;\n foreach ($arr1 as & $av) {\n if (!in_array($av, $arr2)) {\n $res[$r] = $av;\n $r++;\n }\n }\n\n return $res;\n}", "function checkRecursivity($name, $array) {\n\t\t\n\t\t$isRecursive = 0;\n\t\t\n\t\tfor($i = 0; $i <= count($array); $i++) {\n\t\t\tif($name == $array[$i]) {\n\t\t\t\t$isRecursive = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($isRecursive != 0) {\n\t\t\tprintf('<b>CRITICAL:</b> Stylesheet for element \"%s\" has recursive dependencies!<br>', $name);\n\t\t}\n\t}", "static public function myArrayfunc()\n{\n$array=array(1,2,3,4,5,6,7);\necho '<h1>***10 ARRAY FUNCTIONS***</br></br></h1>';\necho '<h2>ARRAY COUNT FUNCTION</h2>';\necho 'INPUT ARRAY=A,A,B,C,D,D</br>';\n$array1=array(A,A,B,C,D,D);\n$var=array_count_values($array1);\nstringFunctions::printThisarr($var);\n\necho '<h2>ARRAY SEARCH FUNCTION</h2>';\necho 'INPUT ARRAY=A,A,B,C,D,D</br>Search for C</br>';\n$var=array_search('C',$array1);\nstringFunctions::printThisarr($var);\n\necho '<h2>ARRAY POP FUNCTION</h2>';\necho 'INPUT ARRAY=1,2,3,4,5,6,7</br>';\n$var=array_pop($array);\nstringFunctions::printThisarr($var);\n\necho '<h2>ARRAY SLICE FUNCTION</h2>';\necho 'INPUT ARRAY=A,B,C,D,E</br>';\n$array2=array(A,B,C,D,E);\n$var=array_slice($array2,4);\nstringFunctions::printThisarr($var);\n\necho '<h2>ARRAY REVERSE FUNCTION</h2>';\necho 'INPUT ARRAY=A,B,C,D,E</br>';\n$array2=array(A,B,C,D,E);\n$var=array_reverse($array2);\nstringFunctions::printThisarr($var);\n\necho '<h2>ARRAY FLIP FUNCTION WHERE KEY VALUE PAIRS ARE FLIPPED</h2>';\necho 'INPUT ARRAY=A,B,C,D,E</br>';\n$array2=array(A,B,C,D,E);\n$var=array_flip($array2);\nstringFunctions::printThisarr($var);\n\necho '<h2>ARRAY UNIQUE FUNCTION(Removes redundant value)</h2>';\necho 'INPUT ARRAY=A,A,B,C,D,D</br>';\n$array1=array(A,A,B,C,D,D);\n$var=array_unique($array1);\nstringFunctions::printThisarr($var);\n\necho '<h2>ARRAY PRODUCT FUNCTION</h2>';\necho 'INPUT ARRAY=1,2,3,4,5,6,7</br>';\n$var=array_product($array);\nstringFunctions::printThisarr($var);\n\necho '<h2>ARRAY SUM FUNCTION</h2>';\necho 'INPUT ARRAY=1,2,3,4,5,6,7</br>';\n$var=array_sum($array);\nstringFunctions::printThisarr($var);\n\necho '<h2>ARRAY VALUES FUNCTION</h2>';\necho 'INPUT ARRAY: SIZE=>XL, COLOR=PINK</br>';\n$array3=array(\"size\"=>\"XL\",\"color\"=>\"pink\");\n$var=array_values($array3);\nstringFunctions::printThisarr($var);\n }", "public function testDisplayNotArray(): void\n {\n VarDumperHandler::enable();\n\n (new Keys('not.array'))->display();\n\n VarDumperHandler::disable();\n\n $this->assertSame(Keys::MESSAGE, VarDumperHandler::value());\n }", "public function preferred(): array;", "function dump_array($the_array)\n{\n echo \"<ul>\";\n\n foreach ($the_array as $key1 => $value1) {\n echo \"<li><span class='key'>$key1</span>\";\n\n # If the value is itself an array, then print that as well.\n if (is_array($value1)) {\n echo \"<ul>\";\n foreach ($value1 as $key2 => $value2) {\n $pvalue = $value2;\n if (is_array($value2)) {\n $pvalue = \"&lt;an array&gt;\";\n }\n echo \"<li><span class='key'>$key2</span><span class='value'> $pvalue</span></li>\\n\";\n } # end inner foreach ($value1 as $key2 => $value2)\n echo \"</ul></li>\\n\";\n } else {\n echo \"<span class='value'> $value1</span></li>\\n\";\n }\n } # end outer foreach ($the_array as $key1 => $value1)\n echo \"</ul>\\n\";\n}", "function reduceDependencies( $array1, $array2 )\r\n {\r\n $result = array();\r\n foreach ($array1 as $key => $value) {\r\n if ((!isset( $array2[$key] )) || ($array2[$key]['version'] < $value['version'])) {\r\n $result[$key] = $value;\r\n }\r\n }\r\n \r\n return $result;\r\n }", "function arr_diff($a1,$a2){\n\t\t\tforeach($a1 as $k=>$v){\n\t\t\t\tunset($dv);\n\t\t\t\tif(is_int($k)){\n\t\t\t\t\t// Compare values\n\t\t\t\t\tif(array_search($v,$a2)===false) $dv=$v;\n\t\t\t\t\telse if(is_array($v)) $dv=arr_diff($v,$a2[$k]);\n\t\t\t\t\tif($dv) $diff[]=$dv;\n\t\t\t\t} else {\n\t\t\t\t\t// Compare noninteger keys\n\t\t\t\t\tif(!$a2[$k]) $dv=$v;\n\t\t\t\t\telse if(is_array($v)) $dv=arr_diff($v,$a2[$k]);\n\t\t\t\t\tif($dv) $diff[$k]=$dv;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $diff;\n\t\t}", "public function diffProvider()\n {\n return array(\n 'AA' => array( // both sides add but there are no content differences, drops file\n array('AA' => 'add'),\n array('AA' => 'add', \"AANew\" => 'add'), // need to ensure shelves differ for version to be created\n array(\n 'cc' => array('AANew' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => '#1')),\n 'cs' => array('AANew' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => 'v2')),\n 'sc' => array('AANew' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => '#1')),\n 'ss' => array('AANew' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => 'v2')),\n )\n ),\n 'AA2' => array( // both sides add but content differs, change to an edit\n array('AA2' => 'add'),\n array('AA2' => array('action' => 'add', 'content' => 'changed!')),\n array(\n 'cc' => array('AA2' => array('action' => 'edit', 'diffLeft' => '#1', 'diffRight' => '#3')),\n 'cs' => array('AA2' => array('action' => 'edit', 'diffLeft' => '#1', 'diffRight' => 'v2')),\n 'sc' => array('AA2' => array('action' => 'edit', 'diffLeft' => 'v1', 'diffRight' => '#1')),\n 'ss' => array('AA2' => array('action' => 'edit', 'diffLeft' => 'v1', 'diffRight' => 'v2')),\n )\n ),\n 'AE' => array( // add on left, edit of same file on right but content is same, drops file\n array('AE' => array('action' => 'add', 'content' => 'same!')),\n array('AE' => array('action' => 'edit', 'content' => 'same!')),\n array(\n 'cc' => array(),\n 'cs' => array(),\n 'sc' => array(),\n 'ss' => array()\n )\n ),\n 'AE2' => array( // add on left, edit of same file on right and content differs, shows as edit\n array('AE2' => 'add'),\n array('AE2' => 'edit'),\n array(\n 'cc' => array('AE2' => array('action' => 'edit', 'diffLeft' => '#1', 'diffRight' => '#2')),\n 'cs' => array('AE2' => array('action' => 'edit', 'diffLeft' => '#1', 'diffRight' => 'v2')),\n 'sc' => array('AE2' => array('action' => 'edit', 'diffLeft' => 'v1', 'diffRight' => '#2')),\n 'ss' => array('AE2' => array('action' => 'edit', 'diffLeft' => 'v1', 'diffRight' => 'v2')),\n )\n ),\n 'AD' => array( // add on left, delete on right, shows as delete\n array('AD' => 'add'),\n array('AD' => 'delete'),\n array(\n 'cc' => array('AD' => array('action' => 'delete', 'diffLeft' => '#1', 'diffRight' => '#2')),\n 'cs' => array('AD' => array('action' => 'delete', 'diffLeft' => '#1', 'diffRight' => 'v2')),\n 'sc' => array('AD' => array('action' => 'delete', 'diffLeft' => 'v1', 'diffRight' => '#2')),\n 'ss' => array('AD' => array('action' => 'delete', 'diffLeft' => 'v1', 'diffRight' => 'v2')),\n )\n ),\n 'AX' => array( // add on left, file not present on right. shows as delete if left shelved otherwise drops\n array('AXOther' => 'add', 'AX' => 'add'),\n array('AXOther' => 'add'),\n array(\n 'cc' => array(),\n 'cs' => array(),\n 'sc' => array('AX' => array('action' => 'delete', 'diffLeft' => 'v1', 'diffRight' => null)),\n 'ss' => array('AX' => array('action' => 'delete', 'diffLeft' => 'v1', 'diffRight' => null)),\n )\n ),\n 'EA' => array( // edit on left, add on right, shows as edit\n array('EA' => 'edit'),\n array('EA' => 'add'),\n array(\n 'cc' => array('EA' => array('action' => 'edit', 'diffLeft' => '#2', 'diffRight' => '#4')),\n 'cs' => array('EA' => array('action' => 'edit', 'diffLeft' => '#2', 'diffRight' => 'v2')),\n 'sc' => array('EA' => array('action' => 'edit', 'diffLeft' => 'v1', 'diffRight' => '#3')),\n 'ss' => array('EA' => array('action' => 'edit', 'diffLeft' => 'v1', 'diffRight' => 'v2')),\n )\n ),\n 'EE' => array( // edit on both sides but same content, drop file\n array('EE' => 'edit'),\n array('EE' => 'edit', 'EENew' => 'add'),\n array(\n 'cc' => array('EENew' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => '#1')),\n 'cs' => array('EENew' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => 'v2')),\n 'sc' => array('EENew' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => '#1')),\n 'ss' => array('EENew' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => 'v2')),\n )\n ),\n 'EE2' => array( // edit on both sides but different content, shows as edit\n array('EE2' => 'edit'),\n array('EE2' => array('action' => 'edit', 'content' => 'edited!')),\n array(\n 'cc' => array('EE2' => array('action' => 'edit', 'diffLeft' => '#2', 'diffRight' => '#3')),\n 'cs' => array('EE2' => array('action' => 'edit', 'diffLeft' => '#2', 'diffRight' => 'v2')),\n 'sc' => array('EE2' => array('action' => 'edit', 'diffLeft' => 'v1', 'diffRight' => '#2')),\n 'ss' => array('EE2' => array('action' => 'edit', 'diffLeft' => 'v1', 'diffRight' => 'v2')),\n )\n ),\n 'ED' => array( // edit on left, delete on right shows as delete\n array('ED' => 'edit'),\n array('ED' => 'delete'),\n array(\n 'cc' => array('ED' => array('action' => 'delete', 'diffLeft' => '#2', 'diffRight' => '#3')),\n 'cs' => array('ED' => array('action' => 'delete', 'diffLeft' => '#2', 'diffRight' => 'v2')),\n 'sc' => array('ED' => array('action' => 'delete', 'diffLeft' => 'v1', 'diffRight' => '#2')),\n 'ss' => array('ED' => array('action' => 'delete', 'diffLeft' => 'v1', 'diffRight' => 'v2')),\n )\n ),\n 'EX' => array( // edit on left, missing on right, shows as reverse edit if left shelved otherwise drops\n array('EXOther' => 'add', 'EX' => 'edit'),\n array('EXOther' => 'add'),\n array(\n 'cc' => array(),\n 'cs' => array(),\n 'sc' => array('EX' => array('action' => 'edit', 'diffLeft' => 'v1', 'diffRight' => '#1')),\n 'ss' => array('EX' => array('action' => 'edit', 'diffLeft' => 'v1', 'diffRight' => '#1')),\n )\n ),\n 'DA' => array( // delete on left add on right, shows as add\n array('DA' => 'delete'),\n array('DA' => 'add'),\n array(\n 'cc' => array('DA' => array('action' => 'add', 'diffLeft' => '#2', 'diffRight' => '#3')),\n 'cs' => array('DA' => array('action' => 'add', 'diffLeft' => '#2', 'diffRight' => 'v2')),\n 'sc' => array('DA' => array('action' => 'add', 'diffLeft' => 'v1', 'diffRight' => '#3')),\n 'ss' => array('DA' => array('action' => 'add', 'diffLeft' => 'v1', 'diffRight' => 'v2')),\n )\n ),\n 'DE' => array( // delete on left edit on right, shows as add\n array('DE' => 'delete'),\n array('DE' => 'edit'),\n array(\n 'cc' => array('DE' => array('action' => 'add', 'diffLeft' => '#2', 'diffRight' => '#4')),\n 'cs' => array('DE' => array('action' => 'add', 'diffLeft' => '#2', 'diffRight' => 'v2')),\n 'sc' => array('DE' => array('action' => 'add', 'diffLeft' => 'v1', 'diffRight' => '#2')),\n 'ss' => array('DE' => array('action' => 'add', 'diffLeft' => 'v1', 'diffRight' => 'v2')),\n )\n ),\n 'DD' => array( // delete on both sides, file dropped\n array('DD' => 'delete'),\n array('DD' => 'delete', 'DDNew' => 'add'),\n array(\n 'cc' => array('DDNew' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => '#1')),\n 'cs' => array('DDNew' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => 'v2')),\n 'sc' => array('DDNew' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => '#1')),\n 'ss' => array('DDNew' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => 'v2')),\n )\n ),\n 'DX' => array( // delete on left missing on right, shows as add if left shelved otherwise drops\n array('DXOther' => 'add', 'DX' => 'delete'),\n array('DXOther' => 'add'),\n array(\n 'cc' => array(),\n 'cs' => array(),\n 'sc' => array('DX' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => '#1')),\n 'ss' => array('DX' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => '#1')),\n )\n ),\n 'XA' => array( // missing on left, add on right, shows as add\n array('XAOther' => 'add'),\n array('XAOther' => 'add', 'XA' => 'add'),\n array(\n 'cc' => array('XA' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => '#1')),\n 'cs' => array('XA' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => 'v2')),\n 'sc' => array('XA' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => '#1')),\n 'ss' => array('XA' => array('action' => 'add', 'diffLeft' => null, 'diffRight' => 'v2')),\n )\n ),\n 'XE' => array( // missing on left, edit on right, shows as edit\n array('XEOther' => 'add'),\n array('XEOther' => 'add', 'XE' => 'edit'),\n array(\n 'cc' => array('XE' => array('action' => 'edit', 'diffLeft' => '#1', 'diffRight' => '#2')),\n 'cs' => array('XE' => array('action' => 'edit', 'diffLeft' => '#1', 'diffRight' => 'v2')),\n 'sc' => array('XE' => array('action' => 'edit', 'diffLeft' => '#1', 'diffRight' => '#2')),\n 'ss' => array('XE' => array('action' => 'edit', 'diffLeft' => '#1', 'diffRight' => 'v2')),\n )\n ),\n 'XD' => array( // missing on left, delete on right, shows as delete\n array('XDOther' => 'add'),\n array('XDOther' => 'add', 'XD' => 'delete'),\n array(\n 'cc' => array('XD' => array('action' => 'delete', 'diffLeft' => '#1', 'diffRight' => '#2')),\n 'cs' => array('XD' => array('action' => 'delete', 'diffLeft' => '#1', 'diffRight' => 'v2')),\n 'sc' => array('XD' => array('action' => 'delete', 'diffLeft' => '#1', 'diffRight' => '#2')),\n 'ss' => array('XD' => array('action' => 'delete', 'diffLeft' => '#1', 'diffRight' => 'v2')),\n )\n )\n );\n }", "function array_process($action,$array,$new) {\n\t//return $array[$new];\n\t$exist = false;\n\t$array = ($array !== null AND is_array($array))? $array : [];\n\t//IF ASSOCIATIVE\n\tif(count(array_filter(array_keys($array), 'is_string')) > 0){\n\t\t//ACTION\n\t\tif($action == 'add'){\n\t\t\t$array = array_merge($array, $new);\n\t\t} elseif($action == 'remove'){\n\t\t\tforeach($new as $kew => $value) {\n\t\t\t\tunset($array[$kew]);\n\t\t\t}\n\t\t//INVERT\n\t\t} elseif($action == 'invert'){\n\t\t\t//check first\n\t\t\tif(array_key_exists($new,$array)){\n\t\t\t\tforeach($new as $kew => $value) {\n\t\t\t\t\tunset($array[$kew]);\n\t\t\t\t}\n\t\t\t\treturn \"removed\";\n\t\t\t} else {\n\t\t\t\t$array = array_merge($array, $new);\n\t\t\t\treturn \"added\";\n\t\t\t}\n\t\t//CHECK\n\t\t} else {\n\t\t\tif(array_key_exists($new,$array)){\n\t\t\t\t$exist = true;\n\t\t\t}\n\t\t\treturn $exist;\n\t\t}\n\n\t} else {\n\t\t//CHECK DUPLICATE\n\t\tforeach($array as $value) {\n\t\t\tif($value == $new){ $exist = true; break; }\n\t\t}\n\t\t//ACTION\n\t\tif($action == 'add'){\n\t\t\tif($exist) { return $array; }\n\t\t\tarray_unshift($array, $new);\n\t\t} elseif($action == 'remove'){\n\t\t\tif($exist){\n\t\t\t\tforeach (array_keys($array, $new, true) as $key) {\n\t\t\t\t\tunset($array[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif($action == 'invert'){\n\t\t\tif($exist){\n\t\t\t\tforeach (array_keys($array, $new, true) as $key) {\n\t\t\t\t\tunset($array[$key]);\n\t\t\t\t}\n\t\t\t\treturn \"removed\";\n\t\t\t} else {\n\t\t\t\tarray_unshift($array, $new);\n\t\t\t\treturn \"added\";\n\t\t\t}\n\t\t} else {\n\t\t\treturn $exist;\n\t\t}\n\t}\n\treturn $array;\n}", "protected function removeAbsenceTeams($date, $personArray, $teamArray)\n {\n foreach ($personArray as $person) {\n if (isset($person['datumAbsent'][$date]) === false) {\n continue;\n }\n $teamArray = $this->RemoveTeam($person['id'], $teamArray);\n }\n return array_values($teamArray);\n }", "public function compare_response_with_answer(array $response, question_answer $answer) {\n global $question;\n $autofeedback = $this->autofeedback;\n // Check to see if correct or not.\n if (self::compare_string_with_wildcard($response['answer'], $answer->answer, false)) {\n return true;\n }\n if ($this->autofeedback == 0) {\n return false;\n }\n // Must be wrong answer....lets see where they went wrong.\n $anssmiles = $answer->answer;\n $usrsmiles = $response['answer'];\n $eofeedback = '';\n // Check to see if user submitted correct type (reaction or not reaction).\n if (self::smiles_is_reaction($anssmiles)) {\n if (!self::smiles_is_reaction($usrsmiles)) {\n $this->usecase = \"<ol><li>You were asked to draw a reaction, but you neglected to add a reaction arrow!</li></ol>\";\n return false;\n }\n } else {\n if (self::smiles_is_reaction($usrsmiles)) {\n $this->usecase = \"<ol><li>You were asked to draw structures, but you drew a reaction!</li></ol>\";\n return false;\n }\n\n }\n\n // Breakdown into reactions and not reactions and analyze each!\n\n if (self::smiles_is_reaction($anssmiles)) { // Reaction!\n\n // Split into reactants and products.\n $reactantsandproducts = explode('>>', $anssmiles);\n $ansreactants = $reactantsandproducts[0];\n $ansproducts = $reactantsandproducts[1];\n\n $reactantsandproducts = explode('>>', $usrsmiles);\n $usrreactants = $reactantsandproducts[0];\n $usrproducts = $reactantsandproducts[1];\n\n $numincorrect = false;\n $usecasestring = '';\n $usrreactnumincorrect = count(explode(\".\", $ansreactants)) - count(explode(\".\", $usrreactants));\n\n if ($usrreactnumincorrect != '0') {\n if ($usrreactnumincorrect > 0) {\n $usecasestring .= \"<li>You are missing $usrreactnumincorrect reactant molecules in your answer!</li>\";\n }\n if ($usrreactnumincorrect < 0) {\n $usecasestring .= \"<li>You have $usrreactnumincorrect too many reactant molecules in your answer!</li>\";\n }\n $numincorrect = true;\n }\n\n $usrprodnumincorrect = count(explode(\".\", $ansproducts)) - count(explode(\".\", $usrproducts));\n\n if ($usrprodnumincorrect != '0') {\n if ($usrprodnumincorrect > 0) {\n $usecasestring .= \"<li>You are missing $usrprodnumincorrect product molecules in your answer!</li>\";\n }\n if ($usrprodnumincorrect < 0) {\n $usecasestring .= \"<li>You have $usrprodnumincorrect too many product molecules in your answer!</li>\";\n }\n $numincorrect = true;\n }\n if ($numincorrect == true) {\n $this->usecase = $usecasestring;\n return false;\n }\n // End of reaction analysis!\n } else { // Not reaction.\n\n $ansnumofmole = $this->smiles_num_of_molecules($anssmiles);\n $usrnumofmole = self::smiles_num_of_molecules($usrsmiles);\n\n // Check to see if correct number of molecules.\n\n if ($ansnumofmole !== $usrnumofmole) {\n // Must have wrong num of molecules.\n if ($ansnumofmole > $usrnumofmole) {\n $this->usecase = \"<li>You are missing \".($ansnumofmole - $usrnumofmole).\" molecules in your answer!</li>\";\n return false;\n } else {\n $this->usecase = \"<li>You have \".($usrnumofmole - $ansnumofmole).\" molecule(s) more than are required!</li>\";\n return false;\n }\n\n }\n\n // Combine all feedback from here on out!\n $usecasestring = '';\n // Check to see if stereochemistry is required and if user has add stereochem - just looking for @ !\n\n // Quik check first.\n if (self::smiles_ischiral1($anssmiles)) {\n if (!self::smiles_ischiral1($usrsmiles)) {\n $usecasestring .= \"<li>You did not indicate the required R/S stereochemistry!</li>\";\n }\n } else {\n if (self::smiles_ischiral($usrsmiles)) {\n $usecasestring .= \"<li>You showed stereochemistry in your answer .\n but it was not required for this problem!</li>\";\n }\n }\n // Check to see if wrong enantiomer of entire string!\n if (self::smiles_ischiral1($anssmiles) && self::smiles_ischiral1($usrsmiles)) {\n $anstemp = str_replace(\"@\", \"\", $anssmiles);\n $usrtemp = str_replace(\"@\", \"\", $usrsmiles);\n if ($anstemp == $usrtemp) {\n $usecasestring .= \"<li>You likely have the wrong stereochemistry!</li>\";\n $this->usecase = $usecasestring;\n return false;\n }\n }\n\n // Check to see if E/Z correct.\n\n // Quik check first.\n if (strpos($anssmiles, '/') !== false || strpos($anssmiles, '\\\\') !== false) {\n if (strpos($usrsmiles, '/') == false && strpos($usrsmiles, '\\\\') == false) {\n $usecasestring .= \"<li>You did not indicate the required E/Z stereochemistry!</li>\";\n }\n } else {\n if (strpos($usrsmiles, '/') !== false || strpos($usrsmiles, '\\\\') !== false) {\n $usecasestring .= \"<li>You showed E/Z stereochemistry in your answer but .\n it was not required for this problem!</li>\";\n }\n }\n // Check for lone pairs.\n\n if (strpos($anssmiles, 'lp') !== false) {\n if (strpos($usrsmiles, 'lp') == false) {\n $usecasestring .= \"<li>You are missing lone pair electrons!</li>\";\n }\n } else {\n if (strpos($usrsmiles, 'lp') !== false) {\n $usecasestring .= \"<li>You showed lone pairs in your answer but they were not required!</li>\";\n }\n }\n\n // Check for radicals.\n if (strpos($anssmiles, '^') !== false) {\n if (strpos($usrsmiles, '^') == false) {\n $usecasestring .= \"<li>You are missing radical electrons!</li>\";\n }\n } else {\n if (strpos($usrsmiles, '^') !== false) {\n $usecasestring .= \"<li>You showed radical electrons in your answer but they were not required!</li>\";\n }\n }\n\n // Check for charge.\n if (strpos($anssmiles, '+') !== false || strpos($anssmiles, '-') !== false) {\n if (strpos($usrsmiles, '+') == false && strpos($usrsmiles, '-') == false) {\n $usecasestring .= \"<li>You are missing charges on atoms!</li>\";\n }\n } else {\n if (strpos($usrsmiles, '^') !== false) {\n $usecasestring .= \"<li>You showed charges in your answer but they were not required!</li>\";\n }\n }\n\n $this->usecase = $usecasestring;\n } // End of not reaction analysis.\n\n return false;\n }", "function DumpArray($String,$Array)\r\n{\r\n\t$Result=print_r($Array,true);\r\n\r\n\tif ($f = @fopen(DUMP_FILE_FULL_PATH_NAME,\"a\")){\r\n\t\t@fwrite($f,$String);\r\n\t\t@fwrite($f,\"\\n\\n\");\r\n\t\tif(@fwrite($f,$Result)){\r\n\t\t\t@fclose($f);\r\n\t\t}\r\n\t}\r\n\t$Array.reset();\r\n}", "private function init_consolidationAndSelect_isFilterArray()\n {\n // RETURN: true, there is a filter array\n if ( is_array( $this->conf_view[ 'filter.' ] ) )\n {\n return true;\n }\n // RETURN: true, there is a filter array\n // DRS\n if ( $this->pObj->b_drs_filter )\n {\n $viewWiDot = $this->view . '.';\n $prompt = $viewWiDot . $this->mode . ' . filters isn\\'t an array. There isn\\'t any filter for processing.';\n t3lib_div :: devlog( '[INFO/FILTER] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n // RETURN: true, there is a filter array\n return false;\n }", "private function arrayClean($array)\n {\n foreach ($array as $key=>$value) {\n if(is_array($value))\n $this->arrayClean($value);\n else if($value!==null)\n unset($value);\n }\n }", "function\teeps_printr($a, $level)\t{\n if (is_array($a))\t{\n $name = key($a);\n echo\t\"<br>\";\n for ($i = 0; $i < $level*2; $i++)\techo \"&nbsp;&nbsp;\";\n echo \"<strong>ARRAY $name</strong>\";\n foreach ($a as $e)\t{\n eeps_printr($e, $level + 1);\n }\n }\n else {\n if (strlen($a) != 0)\t{\n echo\t\"<br>\";\n for ($i = 0; $i < $level*2; $i++)\techo \"&nbsp;&nbsp;\";\n echo \"$a\";\n }\n }\n}", "function process_nonmatches(&$output, &$text_old, &$text_new)\n\t{\n\t\t$s1 = sizeof($text_old);\n\t\t$s2 = sizeof($text_new);\n\n\t\tif ($s1 > 0 AND $s2 == 0)\n\t\t{\n\t\t\t// lines deleted\n\t\t\tarray_unshift($output, new vB_Text_Diff_Entry(implode(\"\\n\", $text_old), ''));\n\t\t}\n\t\telse if ($s2 > 0 AND $s1 == 0)\n\t\t{\n\t\t\t// lines added\n\t\t\tarray_unshift($output, new vB_Text_Diff_Entry('', implode(\"\\n\", $text_new)));\n\t\t}\n\t\telse if ($s1 > 0 AND $s2 > 0)\n\t\t{\n\t\t\t// substitution\n\t\t\tarray_unshift($output, new vB_Text_Diff_Entry(implode(\"\\n\", $text_old), implode(\"\\n\", $text_new)));\n\t\t}\n\n\t\t$text_old = array();\n\t\t$text_new = array();\n\t}", "function printr($array, $print = true) { //imprime o devuelve la cadena\n if ($print)\n return print_r($array, true);\n else\n echo '<pre>' . print_r($array, true) . '</pre>'; //tabula bien gracias a los <pre>\n }", "function types_liaisons_existent($array){\n\tif (empty($array) or $array==array(''=>'')){\n\t\treturn '';\n\t}\n\treturn ' ';\n}", "private function arrayMergeDeep(array $array1, array $array2) : array\n {\n }", "function dump($array) {\n\treturn \"<pre>\" . htmlentities(print_r($array, 1)) . \"</pre>\";\n}", "function recurse_array_HTML_safe(&$arr) {\n foreach ($arr as $key => $val)\n if (is_array($val))\n recurse_array_HTML_safe($arr[$key]);\n else\n $arr[$key] = htmlspecialchars($val, ENT_QUOTES);\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 clearXss(array &$array, AntiXSS $antiXSS)\n{\n foreach ($array as &$value) {\n if (\\is_array($value)) {\n clearXss($value, $antiXSS);\n } else {\n $value = $antiXSS->xss_clean($value);\n }\n }\n}", "public static function nvooy_isset($ArrayToBeChecked, $TargetArray){\n //RETURNS TRUE IF EVERY ELEMENT IS TRUE\n //RETURNS AN ARRAY WITH ALL THE ELEMENTS WHICH ARE NOT SET\n /*\n * Profiling Details with xdebug\n * ----------------------------------------------------\n * Execution time => 0.8-1.3 ms when tried with 5 Elements in Target Array and\n * 3 Elements on ArrayToBeChecked, and when Elements are all set\n * Execution time => 1.7-2.0 ms when tried with 5 Elements in TargetArray and\n * 4 Elements on the ArrayToBeChecked, and when 1 Element is not Set.\n *\n * */\n\n $Boolean_Element_Set_Flag = true;\n $NotSetElementsArray = array();\n\n foreach($TargetArray as $ToBeCheckedElement){\n //Check if all the Elements Are Set\n if(!isset($ArrayToBeChecked[$ToBeCheckedElement])){\n $Boolean_Element_Set_Flag = false;\n array_push($NotSetElementsArray,$ToBeCheckedElement);\n }\n }\n\n return (($Boolean_Element_Set_Flag==true)?true:$NotSetElementsArray);\n\n }", "private function diffFavoriteSkill(?array $array, ?Partner $partner, bool $inverse = false): array\n {\n $partnerFavorites = $partner->getFavorites()->toArray();\n $favoriteTransformed = $this->transformer->favoriteSkillTransformer($array['favorites']);\n\n return array_udiff(\n !$inverse ? $favoriteTransformed : $partnerFavorites,\n !$inverse ? $partnerFavorites : $favoriteTransformed,\n function ($skill_a, $skill_b) {\n return $skill_a->getId() - $skill_b->getId();\n }\n );\n }", "function _pre($array) { echo '<pre>'; print_r ($array); echo '</pre>'; }", "function displayNarrow($arr)\n\t{\n\t\t\n\t\tif((count($arr))>0)\n\t\t{\n\t\t\t$id=(int)$_GET['subcatid'];\n\t\t\t$cnt=count($arr);\n\t\t\tfor($i=0;$i<$cnt;$i++)\n\t\t\t{\n\t\t\t\t$val=count($arr[$i]);\n\t\t\t\tif(!array_key_exists($arr[$i][0]['attrib_name'],$_SESSION['search_option']))\n\t\t\t\t{\n\t\t\t\t\t$output.='<ul><span>'.$arr[$i][0]['attrib_name'].'</span>';\n\t\t\t\t\tfor($j=0;$j<$val;$j++)\n\t\t\t\t\t{\n\t\t\t\t\tif($arr[$i][$j]['products_count'] > 0 ) \n\t\t\t\t\t\t$output.='<li><a href=\"'.$_SESSION['base_url'].'/index.php?do=featured&action=showfeaturedproduct&subcatid='.$id.'&type='.$arr[$i][0]['attrib_name'].'&val='.$arr[$i][$j]['attrib_value_id'].'\">'.$arr[$i][$j]['attrib_value'].' ('.$arr[$i][$j]['products_count'].')</a></li>';\n\t\t\t\t}\n\t\t\t\t\t$output.='</ul>';\n\t\t\t\t}\n\t\t\t}\n\t\t\n \t\t}\n \t\treturn $output;\n\t}", "protected function get_equivalences_description() {\n $equivalences = array();\n\n if ($this->options->is_check_equivalences == true) {\n $i = 0;\n $rules_names = $this->get_equivalences_hints_names();\n\n foreach($rules_names as $rule_name) {\n $rule = new $rule_name($this->get_dst_root());\n $rhr = $rule->check_hint();\n\n if (count($rhr->problem_ids) > 0) {\n $equivalences[$i] = array();\n\n $equivalences[$i][\"problem\"] = $rhr->problem;\n $equivalences[$i][\"solve\"] = $rhr->solve;\n $equivalences[$i][\"problem_ids\"] = $rhr->problem_ids;\n $equivalences[$i][\"problem_type\"] = $rhr->problem_type;\n $equivalences[$i][\"problem_indfirst\"] = $rhr->problem_indfirst;\n $equivalences[$i][\"problem_indlast\"] = $rhr->problem_indlast;\n\n ++$i;\n }\n }\n }\n\n return $equivalences;\n }", "function diplayArray($array){\n echo '<pre>';\n var_dump($array);\n echo'</pre>';\n}", "function dde($arr){\n\techo \"<pre>\"; print_r($arr);die;\n}", "public function removeValuesFromOutputArray(){\n\t\ttry{\n\t\t\t$this->filteredOutput = array();\n\t\t} catch (Exception $e) {\n\t\t\terror_log($e->getMessage(),3,\"/var/tmp/error.log\");\n\t\t\terror_log(\"\\n\");\n\t\t}\n\t}", "function &fetch_diff()\n\t{\n\t\t$table =& $this->fetch_table();\n\t\t$output = array();\n\n\t\t$match = array();\n\t\t$nonmatch1 = array();\n\t\t$nonmatch2 = array();\n\n\t\t$data_old_key = $this->data_old_len - 1;\n\t\t$data_new_key = $this->data_new_len - 1;\n\n\t\t$this_row = $this->decompress_row($table[$data_old_key]);\n\t\t$above_row = $this->decompress_row($table[$data_old_key - 1]);\n\n\t\twhile ($data_old_key >= 0 AND $data_new_key >= 0)\n\t\t{\n\t\t\tif ($this_row[$data_new_key] != $above_row[$data_new_key - 1] AND $this->data_old[$data_old_key] == $this->data_new[$data_new_key])\n\t\t\t{\n\t\t\t\t// this is a non changed entry\n\t\t\t\t$this->process_nonmatches($output, $nonmatch1, $nonmatch2);\n\t\t\t\tarray_unshift($match, $this->data_old[$data_old_key]);\n\n\t\t\t\t$data_old_key--;\n\t\t\t\t$data_new_key--;\n\n\t\t\t\t$this_row = $above_row;\n\t\t\t\t$above_row = $this->decompress_row($table[$data_old_key - 1]);\n\t\t\t}\n\t\t\telse if ($above_row[$data_new_key] > $this_row[$data_new_key - 1])\n\t\t\t{\n\t\t\t\t$this->process_matches($output, $match);\n\t\t\t\tarray_unshift($nonmatch1, $this->data_old[$data_old_key]);\n\n\t\t\t\t$data_old_key--;\n\n\t\t\t\t$this_row = $above_row;\n\t\t\t\t$above_row = $this->decompress_row($table[$data_old_key - 1]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->process_matches($output, $match);\n\t\t\t\tarray_unshift($nonmatch2, $this->data_new[$data_new_key]);\n\n\t\t\t\t$data_new_key--;\n\t\t\t}\n\t\t}\n\n\t\t$this->process_matches($output, $match);\n\t\tif ($data_old_key > -1 OR $data_new_key > -1)\n\t\t{\n\t\t\tfor (; $data_old_key > -1; $data_old_key--)\n\t\t\t{\n\t\t\t\tarray_unshift($nonmatch1, $this->data_old[$data_old_key]);\n\t\t\t}\n\t\t\tfor (; $data_new_key > -1; $data_new_key--)\n\t\t\t{\n\t\t\t\tarray_unshift($nonmatch2, $this->data_new[$data_new_key]);\n\t\t\t}\n\t\t\t$this->process_nonmatches($output, $nonmatch1, $nonmatch2);\n\t\t}\n\n\t\treturn $output;\n\t}", "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 printArray($array)\n\t{\n\t\tif (empty($array) and !is_array($array) ){\n\t\t\treturn FALSE;\n\t\t}else{\n\t\t\techo \"<pre>\";\n\t\t\tprint_r( $array );\n\t\t\techo \"</pre>\";\n\t\t}\n\t\t\n\t}", "function pre_r ( $array ) {\n\t\t\t\t\techo '<pre>';\n\t\t\t\t\tprint_r($array);\n\t\t\t\t\techo'</pre>';\n\n\t\t\t\t\t//hhahahahahahahhahahahah borges\n\t\t\t\t}", "function RBsortColors($unsortedArray, $class) {\n\tfunction RGBtoHSV($r, $g, $b) {\n\t\t$r = ($r / 255);\n\t\t$g = ($g / 255);\n\t\t$b = ($b / 255);\n\n\t\t$maxRGB = max($r, $g, $b);\n\t\t$minRGB = min($r, $g, $b);\n\t\t$chroma = $maxRGB - $minRGB;\n\n\t\t$computedV = 100 * $maxRGB;\n\n\t\tif ($chroma == 0) {\n\t\t\t$computedH = 0;\n\t\t\t$computedS = 0;\n\t\t} else {\n\t\t\t$computedS = 100 * ($chroma / $maxRGB);\n\n\t\t\tif ($r == $minRGB) {\n\t\t\t\t$h = 3 - (($g - $b) / $chroma);\n\t\t\t}\n\t\t\telseif ($b == $minRGB) {\n\t\t\t\t$h = 1 - (($r - $g) / $chroma);\n\t\t\t} else {\n\t\t\t\t$h = 5 - (($b - $r) / $chroma);\n\t\t\t}\n\n\t\t\t$computedH = 60 * $h;\n\t\t}\n\t\treturn array('h' => $computedH, 's' => $computedS, 'v' => $computedV);\n\t}\n\n\tfunction perLightness($r, $g, $b) {\n\t\treturn ($r*0.21)+($g*0.72)+($b*0.07);\n\t}\n\n\n\tusort($unsortedArray, function($a, $b) {\n\t\t$aLig = perLightness($a['r'], $a['g'], $a['b']);\n\t\t$bLig = perLightness($b['r'], $b['g'], $b['b']);\n\n\t\treturn $aLig < $bLig ? 1 : -1 ;\n\t});\n\n\t$sorted = array();\n\tforeach($unsortedArray as $color) {\n\t\t$hsv = RGBtoHSV($color['r'], $color['g'], $color['b']);\n\t\t$hue = round($hsv['h'], 2);\n\t\t$sat = round($hsv['s'], 2);\n\t\t$val = round($hsv['v'], 2);\n\n\t\tif($sat < 10) { //grays\n\t\t\t$sorted['grays'][] = array('r'=>$color['r'], 'g'=>$color['g'], 'b'=>$color['b']);\n\t\t}\n\t\telseif(($hue < 20) || (($hue >= 345) && ($hue <= 360))) { //reds\n\t\t\t$sorted['reds'][] = array('r'=>$color['r'], 'g'=>$color['g'], 'b'=>$color['b']);\n\t\t} \n\t\telseif(($hue >= 20) && ($hue < 60)) { //oranges n yellows\n\t\t\t$sorted['yellows'][] = array('r'=>$color['r'], 'g'=>$color['g'], 'b'=>$color['b']);\n\t\t}\n\t\telseif(($hue >= 60) && ($hue < 175)) { //greens\n\t\t\t$sorted['greens'][] = array('r'=>$color['r'], 'g'=>$color['g'], 'b'=>$color['b']);\n\t\t}\n\t\telseif(($hue >= 175) && ($hue < 250)) { //blues\n\t\t\t$sorted['blues'][] = array('r'=>$color['r'], 'g'=>$color['g'], 'b'=>$color['b']);\n\t\t}\n\t\telseif(($hue >= 250) && ($hue < 345)) { //purples\n\t\t\t$sorted['purples'][] = array('r'=>$color['r'], 'g'=>$color['g'], 'b'=>$color['b']);\n\t\t}\n\t}\n\n\t$sorted = array_merge($sorted['grays'], $sorted['reds'], $sorted['yellows'], $sorted['greens'], $sorted['blues'], $sorted['purples']);\n\n\n\tforeach($sorted as $color) {\n\t\techo '<div class=\"'.$class.'\" style=\"background-color: rgb('.$color['r'].', '.$color['g'].', '.$color['b'].');\"></div>';\n\t}\n\n}", "private function checkForDoubts($solutions){\n\t\t$keys=array_keys($solutions);\n\t\t$message=\"warning ! Possible contradiction between two available tracks : \";\n\t\tif(in_array(DecPol::afterEqual,$keys )&&(in_array(DecPol::computed, $keys))){\n\t\t\tif($solutions[DecPol::afterEqual]!=$solutions[DecPol::computed]){\n\t\t\t\t$this->possibleAnomalies[]=$message.\"After equal and computed\"; //TODO: Turn this into enum whenever possible\n\t\t\t}\t\t\n\t\t}\n\t\tif(in_array(DecPol::afterEqual, $keys)&&(in_array(DecPol::problem, $keys))){\n\t\t\tif($solutions[DecPol::afterEqual]!=$solutions[DecPol::problem]){\n\t\t\t\t$this->possibleAnomalies[]=$message.\"after equal and problem numbers\";\t\n\t\t\t}\n\t\t}\n\t\tif(in_array(DecPol::computed, $keys)&&(in_array(DecPol::problem, $keys))){\n\t\t\tif($solutions[DecPol::computed]!=$solutions[DecPol::problem]){\n\t\t\t\t$this->possibleAnomalies[]=$message.\"number computed and problem numbers\";\n\t\t\t}\n\t\t}\n\t}", "public static function convert_multi_array($array) {\n return implode(\"&\",array_map(function($a) {return implode(\"~\",$a);},$array));\n }", "protected function sortImage(&$array) {\n usort($array, function($a, $b) {\n if ($a['level'] == $b['level']) {\n return 0;\n }\n return ($a['level'] < $b['level']) ? -1 : 1;\n });\n }", "public function cases_higher()\n\t{\n\t\treturn array(\n\t\t\tarray(2, 7, false, true, 9, null, true),\n\t\t\tarray(2, 7, false, true, 2, 3, false),\n\t\t\tarray(2, 7, false, true, 1, 3, false),\n\t\t\tarray(2, 7, true, true, 9, null, true),\n\t\t\tarray(2, 7, true, true, 7, null, true),\n\t\t\tarray(2, 7, true, true, 6, 7, false),\n\t\t\tarray(2, 7, true, true, 3, 4, false),\n\t\t\tarray(2, 7, true, true, 2, 3, false),\n\t\t\tarray(2, 7, true, true, 1, 2, false),\n\t\t\tarray(2, 7, true, true, 0, 2, false),\n\t\t\tarray(2, 7, false, false, 9, null, true),\n\t\t\tarray(2, 7, false, false, 7, null, true),\n\t\t\tarray(2, 7, false, false, 6, null, true),\n\t\t\tarray(2, 7, false, false, 5, 6, false),\n\t\t\tarray(2, 7, false, false, 3, 4, false),\n\t\t\tarray(2, 7, false, false, 2, 3, false),\n\t\t\tarray(2, 7, false, false, 1, 3, false),\n\t\t\tarray(2, null, true, null, 10, null, true),\n\t\t\tarray(2, null, true, null, 9, null, true),\n\t\t\tarray(2, null, true, null, 8, 9, false),\n\t\t\tarray(2, null, true, null, 2, 3, false),\n\t\t\tarray(2, null, true, null, 1, 2, false),\n\t\t\tarray(2, null, false, null, 2, 3, false),\n\t\t\tarray(2, null, false, null, 1, 3, false),\n\t\t\tarray(9, -1, true, false, 0, null, true),\n\t\t\tarray(9, -1, true, false, 6, null, true),\n\t\t);\n\t}" ]
[ "0.47898644", "0.46050486", "0.4549538", "0.44723508", "0.4381586", "0.4353555", "0.4328056", "0.43077257", "0.43019485", "0.42559448", "0.4249547", "0.4248624", "0.4238721", "0.42297322", "0.4105353", "0.4098338", "0.40856826", "0.40750143", "0.40749344", "0.406409", "0.4056068", "0.40487882", "0.40434843", "0.40275213", "0.40257466", "0.40242252", "0.40078256", "0.40069142", "0.3990584", "0.3986657", "0.39809325", "0.39685377", "0.39651623", "0.3964054", "0.39482024", "0.394715", "0.39370713", "0.3932936", "0.39292857", "0.39269102", "0.39155027", "0.39106026", "0.39077696", "0.3905021", "0.39034942", "0.38893822", "0.38745725", "0.38742957", "0.38688433", "0.3860802", "0.3857267", "0.38441655", "0.3842991", "0.38296583", "0.3824973", "0.38216186", "0.38208595", "0.3814545", "0.38103357", "0.38070515", "0.38058335", "0.38051644", "0.38041675", "0.380389", "0.37973362", "0.3795571", "0.37914667", "0.37890905", "0.37870765", "0.37863827", "0.37847984", "0.37807277", "0.37805688", "0.37787986", "0.37748164", "0.37676132", "0.3764816", "0.37578154", "0.37551394", "0.37517655", "0.37463883", "0.37455326", "0.3743001", "0.37419578", "0.37414977", "0.37367672", "0.37346226", "0.37326396", "0.37301168", "0.37266988", "0.37254483", "0.37215", "0.37203884", "0.37186345", "0.37179562", "0.3716164", "0.3713917", "0.37118542", "0.37109107", "0.37092093" ]
0.7281569
0
Filter array according to the allowed keys $nArray = ArrayHelper::filterKey($array, ['id', 'firstName', 'lastName', 'gender']); $nArray = ArrayHelper::filterKey($array, 'id, firstName, lastName, gender');
public static function filterKey(Array $array, $keys, $fillKey = true) { /*** Arguments prepare ***/ // keys prepare if (is_string($keys)) { $keys = array_map('trim', explode(',', $keys)); } $keysFlip = array_fill_keys($keys, ''); // Fill the key if ($fillKey) { $array = $array + $keysFlip; } return array_intersect_key($array, $keysFlip); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayFilterByKeys($array, $allowedKeys)\n{\n if (version_compare(PHP_VERSION, '5.6.0', '<')) {\n return array_intersect_key($array, array_flip($allowedKeys));\n } else {\n return array_filter(\n $array,\n function($k) use ($allowedKeys) {\n return in_array($k, $allowedKeys);\n },\n ARRAY_FILTER_USE_KEY\n );\n }\n}", "public function testFilterByKeys()\n {\n $array = ['bar' => 'baz', 'controller' => 'Groups', 'action' => 'index'];\n $allowed = ['plugin', 'controller', 'action'];\n $expected = ['plugin' => null, 'controller' => 'Groups', 'action' => 'index'];\n\n $result = Hash::filterByKeys($array, $allowed);\n $this->assertEquals($expected, $result);\n }", "function elit_array_filter_key( $arr, $callback ) {\n $matched_keys = array_filter( array_keys( $arr ), $callback );\n return array_intersect_key( $arr, array_flip( $matched_keys ) );\n}", "function array_keys_whitelist( array $array, array $keys ) {\n return array_intersect_key( $array, array_flip( $keys ) );\n}", "function where(array $array = [], array $key = [], $keepKeys = false)\n{\n $result = [];\n\n foreach ($array as $k => $v) {\n $not = false;\n\n foreach ($key as $j => $w) {\n if (\\objects\\isArray($w)) {\n if (count(array_intersect($w, $v[$j])) == 0) {\n $not = true;\n break;\n }\n } else {\n if (!isset($v[$j]) || $v[$j] != $w) {\n $not = true;\n break;\n }\n }\n }\n\n if ($not == false) {\n if ($keepKeys) {\n $result[$k] = $v;\n } else {\n $result[] = $v;\n }\n }\n }\n\n return $result;\n}", "function filter_by_keys($values, array $allowed)\n {\n if (is_object($values) && method_exists($values, 'toArray')) {\n $values = $values->toArray();\n } else if ($values instanceof \\stdClass) {\n $values = (array) $values;\n }\n\n return array_filter(\n $values,\n function ($key) use ($allowed) {\n return in_array($key, $allowed);\n },\n ARRAY_FILTER_USE_KEY\n );\n }", "function array_filter_key(array $array, $callback)\n{\n $matchedKeys = array_filter(array_keys($array), $callback);\n\n return array_intersect_key($array, array_flip($matchedKeys));\n}", "function filter_field($data, $field)\n {\n return array_intersect_key($data, array_fill_keys($field, ''));\n }", "function array_only($array, $keys)\n\t{\n\t\treturn array_intersect_key($array, array_flip((array) $keys));\n\t}", "public function getFilterKeys() {\n\t\t$keyList = $this->typoScriptConfiguration->getSetting('filters', 'string');\n\t\t$keys = explode(\",\", $keyList);\n\t\tif (FALSE === is_array($keys) || sizeof($keys) < 1) {\n\t\t\treturn array();\n\t\t}\n\t\t$filterKeys = array();\n\t\tforeach ($keys as $key) {\n\t\t\t$filterKeys[] = trim($key);\n\t\t}\n\t\treturn $filterKeys;\n\t}", "public function testFilterByKeysDefault()\n {\n $array = ['bar' => 'baz', 'controller' => 'Groups', 'action' => 'index'];\n $allowed = ['plugin', 'controller', 'action', 0];\n $expected = ['plugin' => null, 'controller' => 'Groups', 'action' => 'index', 0 => null];\n\n $result = Hash::filterByKeys($array, $allowed);\n $this->assertEquals($expected, $result);\n }", "public function filter($key)\n {\n $all = is_array($key) ? $key : array($key);\n $values = array();\n foreach($all as $key) {\n $values[$key] = $this->get($key);\n }\n return $values;\n }", "static function only(array $array, $keys) {\n return array_intersect_key($array, array_flip((array) $keys));\n }", "function sub_array($array,$keys=[])\n{\n return array_filter($array,function($k)use($keys){ return in_array($k,$keys); },ARRAY_FILTER_USE_KEY);\n}", "public static function filterKeys(array $array, array $keys) {\n $out = array();\n foreach ($keys as $key) {\n $out[$key] = $array[$key];\n }\n return $out;\n }", "public static function only($array, $keys)\n {\n \n return array_intersect_key($array, array_flip((array)$keys));\n \n }", "protected function filter_item_keys(): array {\n\t\t$items = array_keys($this->items);\n\n\t\t// Filter out keys, if keys are specified\n\t\tif ( isset( $this->filter_args[ Filter::in->key() ] ) ) {\n\t\t\t$items = Array_Helper::intersect( $items, $this->filter_args[ Filter::in->key() ] );\n\t\t\tunset( $this->filter_args[ Filter::in->key() ] );\n\t\t}\n\n\t\tif ( isset( $this->filter_args[ Filter::not_in->key() ] ) ) {\n\t\t\t$items = Array_Helper::diff( $items, $this->filter_args[ Filter::not_in->key() ] );\n\t\t\tunset( $this->filter_args[ Filter::not_in->key() ] );\n\t\t}\n\n\t\treturn $items;\n\t}", "public function only($keys)\n\t{\n\t\treturn array_filter($this->toArray(), function ($value, $key) use ($keys) {\n\t\t\treturn in_array($key, $keys);\n\t\t}, ARRAY_FILTER_USE_BOTH);\n\t}", "function array_only($array, $keys)\n {\n return Arr::only($array, $keys);\n }", "function array_only($array, $keys)\n {\n return Arr::only($array, $keys);\n }", "private static function _filterData($data, $key_value)\n {\n $filtered = array();\n foreach ($data as $field => $value) {\n if (is_int($value) || is_float($value)) {\n //ok\n } elseif (is_numeric($value) && $value === strval($value + 0)) {\n $value += 0;\n } elseif (is_null($value)) {\n $value = 'NULL';\n } else {\n $value = \"'\" . self::$_db->escape($value) . \"'\";\n }\n\n if ($key_value == true) {\n $filtered['`' . self::_field($field) . '`'] = $value;\n } else {\n $filtered[] = '`' . self::_field($field) . '` = ' . $value;\n }\n\n }\n\n return $filtered;\n }", "public static function array_filter_keys ($array, $keys)\r\n\t{\r\n\t\t# Return unamended if not an array\r\n\t\tif (!is_array ($array)) {return $array;}\r\n\t\t\r\n\t\t# Ensure the keys list is an array\r\n\t\t$keys = self::ensureArray ($keys);\r\n\t\t\r\n\t\t# Add those values of the $array whose key is in $keys\r\n\t\t$result = array ();\r\n\t\tforeach ($array as $key => $value) {\r\n\t\t\tif (in_array ($key, $keys)) {\r\n\t\t\t\t$result[$key] = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t# Return the resulting array\r\n\t\treturn $result;\r\n\t}", "function array_limit_keys(array $keys = [], array $input = []): array\n {\n if(empty($keys)) {\n return [];\n }\n\n //return array_filter($input, function($item) use ($keys) {\n // return in_array($item, $keys);\n //}, ARRAY_FILTER_USE_KEY);\n\n $out = [];\n foreach ($keys as $key) {\n if (array_key_exists($key, $input)) {\n $out[$key] = $input[$key];\n }\n }\n\n return $out;\n }", "public static function only( array $array, array $keys ): array {\n\t\t\treturn array_intersect_key( $array, array_flip( $keys ) );\n\t\t}", "public function filter(array $keys): array\n {\n return array_filter($keys, function ($key) {\n return is_string($key) && !empty($key);\n });\n }", "function ywccp_get_custom_fields_key_filtered( $section = 'billing' ){\r\n\r\n\t\tglobal $pagenow;\r\n\r\n\t\t$fields = get_option( 'ywccp_fields_' . $section . '_options', array() );\r\n\r\n\t\tif( empty( $fields ) ) {\r\n\t\t\treturn array();\r\n\t\t}\r\n\r\n\t\t// check where I am\r\n\t\tif( ( is_admin() &&\r\n\t\t ( ( $pagenow == 'edit.php' && isset( $_GET['post_type'] ) && $_GET['post_type'] == 'shop_order' )\r\n\t\t || ( $pagenow == 'post.php' && isset( $_GET['action'] ) && $_GET['action'] == 'edit' ) ) ) || is_account_page() ) {\r\n\r\n\t\t\t$where_im = '';\r\n\t\t}\r\n\t\telseif( is_order_received_page() ) {\r\n\t\t\t$where_im = 'show_in_order';\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$where_im = 'show_in_email';\r\n\t\t}\r\n\t\t// remove fields based on where I am\r\n\t\tif( $where_im ) {\r\n\t\t\tforeach ( $fields as $key => $value ) {\r\n\t\t\t\tif( isset( $value[ $where_im ] ) && ! $value[ $where_im ] ) {\r\n\t\t\t\t\tunset( $fields[$key] );\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// default section keys\r\n\t\t$default_keys = ywccp_get_default_fields_key( $section );\r\n\t\t// fields keys\r\n\t\t$fields_keys = array_keys( $fields );\r\n\t\t// custom keys\r\n\t\t$fields_custom = array_diff( $fields_keys, $default_keys );\r\n\t\t// remove section\r\n\t\tforeach ( $fields_custom as &$value ) {\r\n\t\t\t$value = str_replace( $section . '_', '', $value );\r\n\t\t}\r\n\r\n\t\treturn $fields_custom;\r\n\t}", "public function only(array $keys, $key = null)\n {\n $items = (null !== $key) ? $this->get($key) : $this->items;\n\n return array_intersect_key((array)$items, array_flip($keys));\n }", "private function filterInput($data)\n {\n $filtered = array_intersect_key($data, array_flip($this->fields));\n if ( ! isset($filtered['active']) ) $filtered['active'] = true;\n return $filtered;\n }", "protected function setFilterArray() {\n $primary_keys = getPrimaryKeys($this->table_name);\n foreach ($primary_keys as $pk) {\n if (isset($_GET[$pk])) {\n $this->filter[$pk] = Mysql::SQLValue($_GET[$pk]);\n }\n }\n }", "public static function getFilterableFields(): array\n {\n return ['name', 'accessCode'];\n }", "function array_remove_keys($array, $keys = array()) {\n // doing anything else.\n if(empty($array) || (! is_array($array))) {\n return $array;\n }\n\n // If $keys is a comma-separated list, convert to an array.\n if(is_string($keys)) {\n $keys = explode(',', $keys);\n }\n\n // At this point if $keys is not an array, we can't do anything with it.\n if(! is_array($keys)) {\n return $array;\n }\n\n // array_diff_key() expected an associative array.\n $assocKeys = array();\n foreach($keys as $key) {\n $assocKeys[$key] = true;\n }\n\n return array_diff_key($array, $assocKeys);\n }", "public static function only($array, $keys)\n {\n return array_intersect_key($array, array_flip((array) $keys));\n }", "public static function only($array, $keys)\n {\n return array_intersect_key($array, array_flip((array) $keys));\n }", "public static function only($array, $keys)\n {\n return array_intersect_key($array, array_flip((array) $keys));\n }", "public static function filterKeys( array $array, $keyWhitelist )\n\t{\n\t\tif ( !is_array( $keyWhitelist ) ) {\n\t\t\t$keyWhitelist = func_get_args();\n\t\t\tunset( $keyWhitelist[0] );\n\t\t}\n\n\t\tforeach ( $array as $key => $_ ) {\n\n\t\t\tif ( !in_array( $key, $keyWhitelist, true ) ) {\n\t\t\t\tunset( $array[$key] );\n\t\t\t}\n\n\t\t}\n\n\t\treturn $array;\n\t}", "public static function only( $array, $keys )\n {\n return array_intersect_key( $array, array_flip( (array)$keys ) );\n }", "public static function only() {\n $args = func_get_args();\n if(count($args) == 0) {\n throw new Exception(\"Must to supply at least one key\", 1);\n\n }\n $filteredInputs = [];\n foreach ($args as $key) {\n if(self::has($key)) {\n $filteredInputs[$key] = $_REQUEST[$key];\n }\n }\n return $filteredInputs;\n }", "public static function filterKeys(array $array, array $keys): array\n {\n $result = [];\n\n foreach ($keys as $key) {\n if (isset($array[$key])) {\n $result[$key] = $array[$key];\n }\n }\n\n return $result;\n }", "public static function only(array $array, array|string $keys): array\n {\n return array_intersect_key($array, array_flip((array)$keys));\n }", "protected function filter(array $array)\n {\n $fields = $this->fields;\n $filtered = array_filter($array, function($key) use ($fields){\n return in_array($key, $fields);\n }, ARRAY_FILTER_USE_KEY);\n return $filtered;\n }", "public function only(...$keys): self;", "private function getKeysFilter ($item) {\n $filter = array();\n foreach ($this->keys as $key) {\n $filter[$key] = eq($item->$key);\n }\n return $filter;\n }", "private static function space_filter_keys($array, &$keys, $ancestor_key = \"\")\n {\t\t\t\n foreach($array as $key => $value){\n \n // skip the numerical indices\n if(!is_numeric($key))\n $new_key = $ancestor_key\n . ((!empty($ancestor_key)) ? \".\" : \"\")\n . $key;\n else\n $new_key = $ancestor_key;\n \n // don't push the key if it is already present\n if(!in_array($new_key, $keys))\t\t\t\t\t\t\t\t\t\n array_push($keys, $new_key);\n \n if(is_array($value))\n self::space_filter_keys($value, $keys, $new_key);\t\t\t\t\t\t\t\t\t\n }\t\t\t\t\n }", "private function multiSelectArray($array,$keys) {\n $result = array();\n foreach ($keys as $key) {\n if(array_key_exists($key, $array)) {\n $result[$key] = $array[$key];\n }\n else {\n $result[$key] = \"\";\n }\n\n }\n return $result;\n }", "public function only($keys): array\n\t{\n\t\t$keys = is_array($keys) ? $keys : func_get_args();\n\t\t$results = [];\n\t\t$input = $this->all();\n\n\t\tforeach ($keys as $key) {\n\t\t\tArr::set($results, $key, Data::get($input, $key));\n\t\t}\n\n\t\treturn $results;\n\t}", "protected function _filterArray($values, $required_fields)\r\n\t{\r\n\t\t$data = array();\r\n\t\tforeach ($required_fields as $key) {\r\n\t\t\tif (!array_key_exists($key, $values)) {\r\n\t\t\t\tthrow new Exception('Value `'.$key.'` not found!');\r\n\t\t\t}\r\n\t\t\t$data[$key] = $values[$key];\r\n\t\t}\r\n\t\treturn $data;\r\n\t}", "abstract public function filterFields();", "function dePlucks($array, $key_array){\n $out =[];\n foreach($array as $row){\n $temp = $row;\n foreach ($key_array as $key) {\n unset($temp[$key]);\n }\n $out[] = $temp;\n }\n return $out;\n }", "function authArrayFilter($columns, $items, $operation)\n{\n return GAuthHelper::operation_filter_array($columns, $items, $operation);\n}", "private static function filterUser($arr) {\n \t$result = array();\n\n \tforeach ($arr as $key => $value) {\n \t\tif (!is_numeric($key)) {\n \t\t\tcontinue;\n \t\t}\n\n\t\t\tif ($value == \"objectclass\" or $value == \"userpassword\" or $value == \"ou\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$result[$value] = $arr[$value][0];\n\t\t}\n\n\t\treturn $result;\n\t}", "public static function filterKeys(array $data, array $exclude){\n\t\treturn array_diff_key($data, $exclude);\n\t}", "function array_remove_keys($array, $keys) {\n $assocKeys = array();\n foreach($keys as $key) {\n $assocKeys[$key] = true;\n }\n\n return array_diff_key($array, $assocKeys);\n }", "public function filterAllowedFields(array $fields = array()) {\n $allowedFields = $this->controller->getProperty('allowedFields','');\n if (!empty($allowedFields)) {\n $allowedFields = is_array($allowedFields) ? $allowedFields : explode(',',$allowedFields);\n $userGroupField = $this->controller->getProperty('usergroupsField','');\n $usernameField = $this->controller->getProperty('usernameField','username');\n $fullnameField = $this->controller->getProperty('fullnameField','fullname');\n $passwordField = $this->controller->getProperty('passwordField','password');\n $emailField = $this->controller->getProperty('emailField','email');\n array_push($allowedFields,$usernameField,$fullnameField,$passwordField,'password_confirm',$emailField,'class_key');\n if (!empty($userGroupField)) array_push($allowedFields,$userGroupField);\n $allowedFields = array_unique($allowedFields);\n foreach ($fields as $k => $v) {\n if (!in_array($k,$allowedFields)) unset($fields[$k]);\n }\n }\n return $fields;\n }", "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}", "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'thnkurikulum': return \"p.thnkurikulum = '$key'\";\n\t\t\t\tcase 'unit': return \"p.kodeunit = '$key'\";\n\t\t\t\tcase 'matkul': return \"p.kodemk1 = '$key'\";\n\t\t\t\tcase 'matkul': return \"p.kodemk2 = '$key'\";\n\t\t\t\t\n\t\t\t}\n\t\t}", "function wp_array_slice_assoc($input_array, $keys)\n {\n }", "function filterFields ( $fields )\n\t{\n\t\tif (!is_array($fields) )\n\t\t{\n\t\t\treturn array() ;\n\t\t}\n\t\t\n\t\tif ( empty($fields) )\n\t\t{\n\t\t\treturn $fields ;\n\t\t}\n\t\t$ffields = array () ;\n\t\tforeach ( $fields as &$f )\n\t\t{\n\t\t\tif ( ake ( $f , $this->_fields ) )\n\t\t\t{\n\t\t\t\t$ffields[] = $f ;\n\t\t\t}\n\t\t}\n\t\treturn $ffields ;\n\t}", "public static function filterKeys(array $data, $keyArrayOrKey1, $keys2 = null)\n {\n if (is_array($keyArrayOrKey1)) {\n $keys = $keyArrayOrKey1;\n } else {\n $keys = func_get_args();\n array_shift($keys);\n }\n\n return array_intersect_key($data, array_fill_keys($keys, null));\n }", "function pp_filter_license_keys( $license_keys, $user_id ) {\n\n\tforeach ( $license_keys as $index => $license_key ) {\n\t\tif ( 'private' === $license_key->post_status ) {\n\t\t\tunset( $license_keys[ $index ] );\n\t\t}\n\t}\n\n\treturn $license_keys;\n\n}", "function array_empty_keys($var,$string_only = 1) {\n $output = array();\n \n if(is_array($var)) {\n foreach($var as $key => $val) {\n if(is_array($val)) {\n $arr = array_empty_keys($val, $string_only);\n $output = array_merge($output,$arr);\n }\n else {\n if(trim($val) == '') {\n $output[] = $key;\n }\n }\n }\n }\n \n return $output;\n }", "static function except(array $array, $keys) {\n return array_diff_key($array, array_flip((array) $keys));\n }", "function mandatoryArray($requestArray,$mandatoryKeys,$nonMandatoryValueKeys)\n{\n\t\n\tif(isset($requestArray['sort']) || isset($requestArray['search']))\n\t{\n\t\tunset($requestArray['sort']);\n\t\tunset($requestArray['search']);\n\t}\n\t\n\t\n $requestArray=array_map('trim',$requestArray);\n\n\t $error= array();\t\n\n\t \n\n\t foreach ($mandatoryKeys as $key => $val){\t\t \n\n\t\t if(!array_key_exists($key,$requestArray)) {\n\n\t\t\t $error[\"msg\"] = \"Request must contain \".$key;\n\n\t\t\t $error[\"statusCode\"] = 406; \t\n\n\t\t\t break;\t\t \n\n\t\t }\t \n\t\t \n\t\t if( (empty($requestArray[$key])) && (!in_array($key,$nonMandatoryValueKeys)) && ($requestArray[$key]!='0') )\n\t\t {\n\t\t \t\n\t\t\t \t\t$error[\"msg\"] = $val.\" should not be empty\";\t\t\t \t\t \n\t\t\t \t\t$error[\"statusCode\"] = 422;\n\t\t\t\t break; \n\n\t\t } \n\t\t \n\t \n\n\t }\n\n\t \n\n\t return $error;\n\n }", "function _prepareFilter(&$controller){\n \t\n\t\t$filter = array();\n if(isset($controller->data)){\n foreach($controller->data as $model=>$fields){\n foreach($fields as $key=>$field){\n if($field == ''){\n unset($controller->data[$model][$key]);\n }\n }\n }\n \n App::import('Sanitize');\n $sanit = new Sanitize();\n $controller->data = $sanit->clean($controller->data);\n $filter = $controller->data;\n }\n \n if (empty($filter)){\n \t\t$filter = $this->_checkParams($controller); \t\n }\n $controller->data = $filter;\n }", "function advanced_settings_fields_filter1($fields) {\n $model_config = WYSIJA::get('config', 'model');\n if ($model_config->getValue('premium_key')) {\n unset($fields['bounce_email']);\n }\n return $fields;\n }", "public function getEmptyKeyArray(){\n\t$emptyKeyArray = array();\n\t$emptyKeyArray[\"id\"] = \"\";\n\t$emptyKeyArray[\"codice_categoria\"] = \"\";\n\t$emptyKeyArray[\"codice\"] = \"\";\n\t$emptyKeyArray[\"descrizione\"] = \"\";\n\treturn $emptyKeyArray;\n}", "private function cleanData(array $data) {\n $options = $this->getOptions();\n\n $disallowedDataKeys = array(\n $options->getIdColumnName(),\n $options->getLeftColumnName(),\n $options->getRightColumnName(),\n $options->getLevelColumnName(),\n $options->getParentIdColumnName(),\n );\n\n return array_diff_key($data, array_flip($disallowedDataKeys));\n }", "public function filterFields(array $data, string $action): array\n {\n $fields = $this->getConfig($action);\n $data = array_intersect_key($data, array_flip($fields));\n\n return $data;\n }", "function removekeys($src, $keys){\n return array_diff_key($src, array_flip($keys));\n}", "public static function cleanInput($input, $keys)\r\n { \r\n \r\n $array = array_intersect_key($input, $keys); \r\n //ignoreInput and accept default values\r\n foreach ($keys as $key => $value) {\r\n if(!empty($value)) {\r\n $array[$key] = $value;\r\n }\r\n }\r\n\r\n return $array; \r\n }", "function array_except($array, $keys)\n\t{\n\t\treturn array_diff_key($array, array_flip((array) $keys));\n\t}", "function _checkParams($controller){\n \tif (empty($controller->params['named'])){\n \t\t$filter = array();\n \t}\n \t\n App::import('Sanitize');\n $sanit = new Sanitize();\n $controller->params['named'] = $sanit->clean($controller->params['named']);\n\n \n \tforeach($controller->params['named'] as $field => $value){\n \t\t\n \t\tif(!in_array($field, $this->paginatorParams)){\n\t\t\t\t$fields = explode('.',$field);\n\t\t\t\tif (sizeof($fields) == 1)\n\t \t\t\t$filter[$controller->modelClass][$field] = $value;\n\t \t\telse\n\t \t\t\t$filter[$fields[0]][$fields[1]] = $value; \t\t\t\n \t\t}\n \t}\n \t\t\n \tif (!empty($filter))\n \t\treturn $filter;\n \telse\n \t\treturn array(); \t\n }", "public function getSearchFields(): array {\n # TODO move this to database\n $ignoreValues = ['SortNum' => '', 'Accession Numerical' => '', 'Imaged' => '', 'IIFRNo' => '',\n 'Photographs::photoFileName' => '', 'Event::eventDate' => '', 'card01' => '', 'Has Image' => '', 'imaged' => ''];\n return array_diff_key($this->search_layout->getFields(), $ignoreValues);\n }", "public function except($keys)\n\t{\n\t\treturn array_filter($this->toArray(), function ($value, $key) use ($keys) {\n\t\t\treturn ! in_array($key, $keys);\n\t\t}, ARRAY_FILTER_USE_BOTH);\n\t}", "function BuildKeyFilter() {\n\t\tglobal $objForm;\n\t\t$sWrkFilter = \"\";\n\n\t\t// Update row index and get row key\n\t\t$rowindex = 1;\n\t\t$objForm->Index = $rowindex;\n\t\t$sThisKey = strval($objForm->GetValue(\"k_key\"));\n\t\twhile ($sThisKey <> \"\") {\n\t\t\tif ($this->SetupKeyValues($sThisKey)) {\n\t\t\t\t$sFilter = $this->KeyFilter();\n\t\t\t\tif ($sWrkFilter <> \"\") $sWrkFilter .= \" OR \";\n\t\t\t\t$sWrkFilter .= $sFilter;\n\t\t\t} else {\n\t\t\t\t$sWrkFilter = \"0=1\";\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Update row index and get row key\n\t\t\t$rowindex++; // next row\n\t\t\t$objForm->Index = $rowindex;\n\t\t\t$sThisKey = strval($objForm->GetValue(\"k_key\"));\n\t\t}\n\t\treturn $sWrkFilter;\n\t}", "function BuildKeyFilter() {\r\n\t\tglobal $objForm, $rekeningju;\r\n\t\t$sWrkFilter = \"\";\r\n\r\n\t\t// Update row index and get row key\r\n\t\t$rowindex = 1;\r\n\t\t$objForm->Index = $rowindex;\r\n\t\t$sThisKey = strval($objForm->GetValue(\"k_key\"));\r\n\t\twhile ($sThisKey <> \"\") {\r\n\t\t\tif ($this->SetupKeyValues($sThisKey)) {\r\n\t\t\t\t$sFilter = $rekeningju->KeyFilter();\r\n\t\t\t\tif ($sWrkFilter <> \"\") $sWrkFilter .= \" OR \";\r\n\t\t\t\t$sWrkFilter .= $sFilter;\r\n\t\t\t} else {\r\n\t\t\t\t$sWrkFilter = \"0=1\";\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// Update row index and get row key\r\n\t\t\t$rowindex++; // next row\r\n\t\t\t$objForm->Index = $rowindex;\r\n\t\t\t$sThisKey = strval($objForm->GetValue(\"k_key\"));\r\n\t\t}\r\n\t\treturn $sWrkFilter;\r\n\t}", "function BuildKeyFilter() {\r\n\t\tglobal $objForm;\r\n\t\t$sWrkFilter = \"\";\r\n\r\n\t\t// Update row index and get row key\r\n\t\t$rowindex = 1;\r\n\t\t$objForm->Index = $rowindex;\r\n\t\t$sThisKey = strval($objForm->GetValue(\"k_key\"));\r\n\t\twhile ($sThisKey <> \"\") {\r\n\t\t\tif ($this->SetupKeyValues($sThisKey)) {\r\n\t\t\t\t$sFilter = $this->KeyFilter();\r\n\t\t\t\tif ($sWrkFilter <> \"\") $sWrkFilter .= \" OR \";\r\n\t\t\t\t$sWrkFilter .= $sFilter;\r\n\t\t\t} else {\r\n\t\t\t\t$sWrkFilter = \"0=1\";\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// Update row index and get row key\r\n\t\t\t$rowindex++; // next row\r\n\t\t\t$objForm->Index = $rowindex;\r\n\t\t\t$sThisKey = strval($objForm->GetValue(\"k_key\"));\r\n\t\t}\r\n\t\treturn $sWrkFilter;\r\n\t}", "function BuildKeyFilter() {\r\n\t\tglobal $objForm;\r\n\t\t$sWrkFilter = \"\";\r\n\r\n\t\t// Update row index and get row key\r\n\t\t$rowindex = 1;\r\n\t\t$objForm->Index = $rowindex;\r\n\t\t$sThisKey = strval($objForm->GetValue(\"k_key\"));\r\n\t\twhile ($sThisKey <> \"\") {\r\n\t\t\tif ($this->SetupKeyValues($sThisKey)) {\r\n\t\t\t\t$sFilter = $this->KeyFilter();\r\n\t\t\t\tif ($sWrkFilter <> \"\") $sWrkFilter .= \" OR \";\r\n\t\t\t\t$sWrkFilter .= $sFilter;\r\n\t\t\t} else {\r\n\t\t\t\t$sWrkFilter = \"0=1\";\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// Update row index and get row key\r\n\t\t\t$rowindex++; // next row\r\n\t\t\t$objForm->Index = $rowindex;\r\n\t\t\t$sThisKey = strval($objForm->GetValue(\"k_key\"));\r\n\t\t}\r\n\t\treturn $sWrkFilter;\r\n\t}", "function BuildKeyFilter() {\r\n\t\tglobal $objForm;\r\n\t\t$sWrkFilter = \"\";\r\n\r\n\t\t// Update row index and get row key\r\n\t\t$rowindex = 1;\r\n\t\t$objForm->Index = $rowindex;\r\n\t\t$sThisKey = strval($objForm->GetValue(\"k_key\"));\r\n\t\twhile ($sThisKey <> \"\") {\r\n\t\t\tif ($this->SetupKeyValues($sThisKey)) {\r\n\t\t\t\t$sFilter = $this->KeyFilter();\r\n\t\t\t\tif ($sWrkFilter <> \"\") $sWrkFilter .= \" OR \";\r\n\t\t\t\t$sWrkFilter .= $sFilter;\r\n\t\t\t} else {\r\n\t\t\t\t$sWrkFilter = \"0=1\";\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// Update row index and get row key\r\n\t\t\t$rowindex++; // next row\r\n\t\t\t$objForm->Index = $rowindex;\r\n\t\t\t$sThisKey = strval($objForm->GetValue(\"k_key\"));\r\n\t\t}\r\n\t\treturn $sWrkFilter;\r\n\t}", "function array_select_keys(array $array, iterable $keys): array\n{\n return array_reduce(\n $keys,\n function (array $acc, $k) use ($array): array {\n if (array_key_exists($k, $array)) {\n $acc[$k] = $array[$k];\n }\n\n return $acc;\n },\n []\n );\n}", "function getArrFieldValue_Filter( $array_values, $arr_field_id, $field_prefix = FALSE, $skipchar = 0) {\n\t\t$result = array();\n\t\tif( $field_prefix !== FALSE ) {\n\t\t\tif( isset( $array_values[$field_prefix] ) )\n\t\t\t\t$array_values = $array_values[$field_prefix];\n\t\t\telse\n\t\t\t\treturn $result;\n\t\t}\n\t\tif( isset( $array_values['field_filter']) ) {\n\t\t\tforeach( $array_values['field_filter'] as $fname => $fval ) {\n\t\t\t\tif( is_numeric( $skipchar ) )\n\t\t\t\t\t$search_key = substr( $fname, $skipchar );\n\t\t\t\telse {\n\t\t\t\t\t$pos = strpos($fname,$skipchar);\n\t\t\t\t\tif( $pos !== FALSE )\n\t\t\t\t\t\t$search_key = substr( $fname, $pos+1 );\n\t\t\t\t\telse\n\t\t\t\t\t\t$search_key = $fname;\n\t\t\t\t}\n\t\t\t\tif( isset($arr_field_id[$search_key]) ) {\n\t\t\t\t\t$result[$fname] = $arr_field_id[$search_key];\n\t\t\t\t\t$result[$fname]['value'] = $fval;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "function ldap_key_by ($i_array, $key) {\n\t$result = array();\n\tforeach ($i_array as $record) {\n\t\tif (!isset($record[$key]))\n\t\t\tcontinue;\n\t\t$result[$record[$key]] = $record;\n\t}\nreturn($result);\n}", "public function array_only($array, $keys)\n {\n return Arr::only($array, $keys);\n }", "function array_remove_keys($array, $keys)\n{\n $assocKeys = array();\n foreach ($keys as $key) {\n $assocKeys[$key] = true;\n }\n\n return array_diff_key($array, $assocKeys);\n}", "protected function getWhereKeys(){\n\t\t\t$whereKeys = \"1\";\n\t\t\tif($this->keys){\n\t\t\t\t$whereKeys = array();\n\t\t\t\tforeach ($this->keys as $key) {\n\t\t\t\t\t$whereKeys[] = \"$key = :$key\";\n\t\t\t\t}\n\t\t\t\t$whereKeys = implode(\" AND \", $whereKeys);\n\t\t\t}\n\t\t\treturn $whereKeys;\n\t\t}", "function getFieldNameByTag($key)\n {\n\n $array = [\n 'NameTitle' => ['field' => 'name_title', 'fieldType' => 'string'],\n 'FirstName' => ['field' => 'persona_fname', 'fieldType' => 'string'],\n 'LastName' => ['field' => 'persona_lname', 'fieldType' => 'string'],\n 'RefreeName' => ['field' => 'persona_fname', 'fieldType' => 'string'],\n 'ReferredUser' => ['field' => 'persona_fname', 'fieldType' => 'string'],\n 'ReferralCode' => ['field' => 'referral_code', 'fieldType' => 'string'],\n 'ActivationCode' => ['field' => 'activation_code', 'fieldType' => 'string'],\n 'MiddleInitial' => ['field' => 'middle_initial', 'fieldType' => 'string'],\n 'OtherName' => ['field' => 'other_name', 'fieldType' => 'string'],\n\n 'Balance' => ['field' => 'balance', 'fieldType' => 'integer'],\n 'MembershipId' => ['field' => 'membership_id', 'fieldType' => 'integer'],\n 'year' => ['field' => 'year', 'fieldType' => 'integer'],\n 'month' => ['field' => 'month', 'fieldType' => 'integer'],\n 'date' => ['field' => 'date', 'fieldType' => 'integer'],\n 'ExpiryDatetime' => ['field' => 'expiry_datetime', 'fieldType' => 'date'],\n 'Id' => ['field' => '_routing', 'fieldType' => 'integer'],\n 'MembershipTypeId' => ['field' => 'membership_type_id', 'fieldType' => 'integer'],\n 'Status' => ['field' => 'status', 'fieldType' => 'string'],\n 'RatingGradeId' => ['field' => 'rating_grade_id', 'fieldType' => 'integer'],\n 'PointTypeId' => ['field' => 'point_type_id', 'fieldType' => 'integer'],\n 'TicketCount' => ['field' => 'ticket_count', 'fieldType' => 'integer'],\n\n 'Email' => ['field' => 'persona_email', 'fieldType' => 'string'],\n 'HomeTelephone' => ['field' => 'phone_numbers', 'fieldType' => 'integer'],\n 'Mobile' => ['field' => 'phone_numbers', 'fieldType' => 'integer'],\n 'ContactOnEmail' => ['field' => 'email_subscribed_flag', 'fieldType' => 'string'],\n 'ContactOnMobile' => ['field' => 'sms_subscribed_flag', 'fieldType' => 'string'],\n 'ContactOnMail' => ['field' => 'mail_subscribed_flag', 'fieldType' => 'string'],\n 'Country' => ['field' => 'residential_address.country', 'fieldType' => 'string'],\n 'PostalCode' => ['field' => 'postal_address.postal_code', 'fieldType' => 'integer'],\n 'Locality' => ['field' => 'residential_address.suburb', 'fieldType' => 'string'],\n 'PostalAddress1' => ['field' => 'postal_address.address_1', 'fieldType' => 'string'],\n 'ResPostalCode' => ['field' => 'residential_address.postal_code', 'fieldType' => 'string'],\n 'ResLocality' => ['field' => 'residential_address.suburb', 'fieldType' => 'string'],\n 'ResStateProvince' => ['field' => 'residential_address.state', 'fieldType' => 'string'],\n 'ResAddress1' => ['field' => 'residential_address.address_1', 'fieldType' => 'string'],\n 'WorkTelephone' => ['field' => 'phone_numbers.work_phone', 'fieldType' => 'integer'],\n\n 'VenueAddress' => ['field' => 'address', 'fieldType' => 'string'],\n 'VenueName' => ['field' => 'venue_name', 'fieldType' => 'string'],\n 'VenuePhoneNo' => ['field' => 'telephone', 'fieldType' => 'integer'],\n 'VenuePhoneNumber' => ['field' => 'telephone', 'fieldType' => 'integer'],\n\n 'LastVisit' => ['field' => 'date_added', 'fieldType' => 'date'],\n 'LastPOSEntry' => ['field' => 'sale_datetime', 'fieldType' => 'date'],\n 'LastKioskEntry' => ['field' => 'entry_datetime', 'fieldType' => 'date'],\n 'LastGamePlay' => ['field' => 'transaction_datetime', 'fieldType' => 'date'],\n 'CreationDatetime' => ['field' => 'creation_datetime', 'fieldType' => 'date'],\n\n 'MycashExpiry' => ['field' => 'latest_transaction_date_time', 'fieldType' => 'string'],\n 'MycashBalance' => ['field' => 'balance', 'fieldType' => 'integer'],\n\n 'POS' => ['field' => 'item_description', 'fieldType' => 'string'],\n 'BarrelDraw' => ['field' => 'description', 'fieldType' => 'string'],\n\n\n 'VenueNameDesign' => ['field' => 'venue_name', 'fieldType' => 'string'],\n 'VenueAddressDesign' => ['field' => 'address', 'fieldType' => 'string'],\n 'discount' => ['field' => 'discount', 'fieldType' => 'string'],\n 'DiscountPrice' => ['field' => 'DiscountPrice', 'fieldType' => 'string'],\n 'Discount' => ['field' => 'Discount', 'fieldType' => 'string'],\n\n 'facebook' => ['field' => 'facebook_id', 'fieldType' => 'string'],\n 'twitter' => ['field' => 'twitter_id', 'fieldType' => 'string'],\n 'instagram' => ['field' => 'instagram_id', 'fieldType' => 'string']\n ];\n\n foreach ($this->custom_fields as $key2 => $value2){\n $array[\"custom_\".$value2->field_name] = ['field' => $value2->field_name, 'fieldType' => 'string'];\n }\n\n\n\n\n return (array_key_exists($key, $array)) ? $array[$key] : '';\n }", "public function getfilterColumns()\n\t{\n\t\treturn array(\"name\",\"last_name\", \"country\");\n\t}", "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 show_keys($ar) {\r\n $temp = array();\r\n foreach ($ar as $k => $v ) {\r\n $temp[] = $k;\r\n if (is_array($v)) {\r\n $temp = array_merge($temp, $this->show_keys($v));\r\n }\r\n }\r\n return $temp;\r\n }", "function unset_array_keys($array, $keys) {\n $new_array = array();\n foreach($array as $arr) {\n foreach($arr as $key => $val) {\n if(in_array($key, $keys)) {\n unset($arr[$key]);\n }\n }\n array_push($new_array, $arr);\n }\n return $new_array;\n}", "function sanitizeArray( &$data, $whatToKeep )\n{\n $data = array_intersect_key( $data, $whatToKeep ); \n \n foreach ($data as $key => $value) {\n\n $data[$key] = sanitizeOne( $data[$key] , $whatToKeep[$key] );\n\n }\n}", "protected function filterDropdownFields(): array\n {\n return [];\n }", "protected function filteredFields($fields, $data) \n\t{\n\t\t$filtered = array();\n\t\tforeach ($fields as $field) {\n\t\t\tif (in_array($field, array_keys($data))) {\n\t\t\t\t$filtered[$field] = $data[$field];\n\t\t\t} else {\n\t\t\t\tthrow new \\Exception(\"A required field \\\"{$field}\\\" does not exist in the given array!\");\n\t\t\t}\n\t\t}\n\t\treturn $filtered;\n\t}", "public function filterProtectedData($data)\n {\n if ($data && isset($this['fields']) && isset($this['protected_fields']) && $this['protected_fields']) {\n if (isset($data[0]) || is_numeric(key($data))) {\n foreach ($data as $k => $v) {\n $data[$k] = static::filterProtectedData($v);\n }\n } else {\n $fields = array_keys($this['fields']);\n $pfields = StringHelper::toArray($this['protected_fields']);\n foreach ($data as $k => $v) {\n if (in_array($k, $fields) && in_array($k, $pfields)) {\n unset($data[$k]);\n }\n }\n }\n }\n \n return $data;\n }", "protected function filterFields($array)\n {\n return collect($array)->forget($this->withoutFields)->toArray();\n }", "function filterArrayKeyByPattern($array, $pattern) {\n if (!$array) {\n return false;\n }\n\n foreach ($array as $k => $item) {\n\t\t$pos = strpos($k, $pattern);\n\t\t\n\t\tif ($pos !== false) {\n\t\t\t$newArray[$k] = $item;\n\t\t}\t\t \n }\n \n return $newArray;\n}", "function array_except($array, $keys)\n {\n return Arr::except($array, $keys);\n }", "function array_except($array, $keys)\n {\n return Arr::except($array, $keys);\n }", "public static function except($array, $keys)\n {\n return array_diff_key($array, array_flip((array) $keys));\n }", "static public function filterKeyStartsWith(&$arr, $startwith)\n {\n $results = array();\n foreach ($arr as $key => $value) {\n if (Str::startsWith($key, $startwith) === true) {\n $results[$key] = $value;\n }\n }\n\n return $results;\n }", "public static function except(array $array, array|string $keys): array\n {\n return array_diff_key($array, array_flip((array)$keys));\n }" ]
[ "0.6789739", "0.6335679", "0.62719756", "0.6157563", "0.59718394", "0.5955368", "0.5954215", "0.59444463", "0.5938357", "0.5895812", "0.58785456", "0.5829276", "0.5782823", "0.5740188", "0.57395107", "0.5703622", "0.570123", "0.5677246", "0.5676221", "0.5676221", "0.5658916", "0.56529295", "0.5645277", "0.5615177", "0.5604617", "0.5595587", "0.5585999", "0.5541397", "0.55381423", "0.5523067", "0.55210614", "0.5520844", "0.5520844", "0.5520844", "0.55124635", "0.54950094", "0.54791325", "0.54776967", "0.54676265", "0.5456916", "0.54490125", "0.5420927", "0.54148006", "0.53538865", "0.5350699", "0.5342762", "0.5331857", "0.53292143", "0.5303878", "0.52930874", "0.527642", "0.5263847", "0.5263704", "0.52615136", "0.5254368", "0.525026", "0.5244904", "0.524464", "0.5240456", "0.5238107", "0.52098083", "0.52047753", "0.51988965", "0.5182989", "0.51796854", "0.51787174", "0.5163921", "0.5156993", "0.51564807", "0.5154158", "0.5150625", "0.51385975", "0.51329297", "0.51315147", "0.5129222", "0.5128493", "0.5128493", "0.5128493", "0.51277196", "0.51230043", "0.5122098", "0.5103214", "0.5101506", "0.50945884", "0.50824285", "0.5079853", "0.5072162", "0.50672275", "0.50616634", "0.5054112", "0.50461596", "0.5039504", "0.5037889", "0.50239146", "0.50207883", "0.5012369", "0.5012369", "0.50089574", "0.5007149", "0.50003517" ]
0.5627148
23
Options Function Auto sort out : Set option 1. Scope: Global
public static function setSortOut($bool = true) { self::$_options['sortOut'] = !!$bool; return new static(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOptions() ;", "protected function get_options()\n\t{}", "abstract function options();", "public function options();", "public function options();", "public function options();", "public function options();", "public function options();", "function populate_options(array $options = array())\n {\n }", "function getOptions();", "function propanel_of_reset_options($options,$page = ''){\n\n\t\t\t//@since 2.0 mod by denzel, reset defaults\n\t\t\t//replace of_reset_options() function..\t\t\t\n\t\t\t$template = get_option('of_template');\n\n\t\t\tforeach($template as $t):\n\t\t\t\t@$option_name = $t['id'];\n\t\t\t\t@$default_value = $t['std'];\n\t\t\t\tupdate_option(\"$option_name\",\"$default_value\");\n\t\t\tendforeach;\t\t\n\t\t\t//end of mod\t\n\n}", "function asp_parse_options() {\r\r\n foreach ( wd_asp()->o as $def_k => $o ) {\r\r\n if ( preg_match(\"/\\_def$/\", $def_k) ) {\r\r\n $ok = preg_replace(\"/\\_def$/\", '', $def_k);\r\r\n\r\r\n // Dang, I messed up this elegant solution..\r\r\n if ( $ok == \"asp_it\")\r\r\n $ok = \"asp_it_options\";\r\r\n\r\r\n wd_asp()->o[$ok] = asp_decode_params( get_option($ok, wd_asp()->o[$def_k]) );\r\r\n wd_asp()->o[$ok] = array_merge(wd_asp()->o[$def_k], wd_asp()->o[$ok]);\r\r\n }\r\r\n }\r\r\n // Long previous version compatibility\r\r\n if ( wd_asp()->o['asp_caching'] === false )\r\r\n wd_asp()->o['asp_caching'] = wd_asp()->o['asp_caching_def'];\r\r\n\r\r\n // The globals are a sitewide options\r\r\n wd_asp()->o['asp_glob'] = get_site_option('asp_glob', wd_asp()->o['asp_glob_d']);\r\r\n wd_asp()->o['asp_glob'] = array_merge(wd_asp()->o['asp_glob_d'], wd_asp()->o['asp_glob']);\r\r\n}", "function cg_activate() {\n\tadd_option('cg-option_3', 'any_value');\n}", "public function get_options()\n {\n }", "public function options() {}", "private function options($dataset) {\n\t\n\t\t// Shortcut to the current params:\n\t\t$params = $this->controller->params;\n\t\t\n\t\t// Check if any options are set, else set an empty array to prevent errors when merging with defaults:\n\t\t$options = isset($this->options[$dataset]) ? $this->options[$dataset] : array();\n\t\t\n\t\t// Merge the options with the defaults, so all needed keys are set:\n\t\t$options = array_merge($this->defaults, $options);\n\t\t\n\t\t// Check if the session needs to be used and if the session contains a set of options:\n\t\tif ($options['session'] && $session = $this->session->read('DataSort.' . $dataset)) {\n\t\t\t\n\t\t\t// The session contains options, use these instead:\n\t\t\t$options = $session;\n\n\t\t}\n\t\t\n\t\t// Check if the fields option is set and whether it contains the primary key:\n\t\tif (isset($options['fields']) && !in_array($this->model->primaryKey, $options['fields']) && !in_array($this->model->alias . '.' . $this->model->primaryKey, $options['fields'])) {\n\t\t\n\t\t\t// The primary key isn't set in field, appending it:\n\t\t\t$options['fields'][] = $this->model->alias . '.' . $this->model->primaryKey;\n\t\t\t\n\t\t}\n\t\t\n\t\t// Check if the page matches the current option set and if the direction is set:\n\t\tif (isset($params['named']['dataset']) && isset($params['named']['datasort']) && $dataset == $params['named']['dataset']) {\n\t\t\t\n\t\t\t// Check if the named parameter for the sort value is set:\n\t\t\tif (isset($params['named']['datafield'])) {\n\t\t\t\t\n\t\t\t\t// Change the order to what is given in the named parameters:\n\t\t\t\t$options['order'] = array($params['named']['datafield'] => $params['named']['datasort']);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Check if the named parameter for limit is set and if it contains an array of ids:\n\t\t\tif (isset($params['named']['datascope']) && is_array($ids = explode('|', $params['named']['datascope'])) ) {\n\t\t\t\n\t\t\t\t// Replace the conditions to only get the ids in the limit:\n\t\t\t\t$options['conditions'] = array($this->model->alias . '.' . $this->model->primaryKey => $ids);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Check if the session needs to be used:\n\t\t\tif ($options['session']) {\n\t\t\t\n\t\t\t\t// Write the options to the session:\n\t\t\t\t$this->session->write('DataSort.' . $dataset, $options);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// Return the ajusted array of options:\n\t\treturn $options;\n\t\t\n\t}", "public static function es_admin_option() {\n\t}", "public function register_options(){\n\t\tparent::register_options();\n\t\t//$orgzr = \\WBF\\modules\\options\\Organizer::getInstance();\n\t\t//Do stuff...\n\t}", "protected function getOptions() {}", "protected function getOptions() {}", "protected function getOptions() {}", "public function process_admin_options() {\n\t\t$method_order = isset( $_POST['method_order'] ) ? $_POST['method_order'] : '';\n\t\t$method_priority = isset( $_POST['method_priority'] ) ? $_POST['method_priority'] : '';\n\t\t$order = array();\n\t\t$selection_priority = array();\n\n\t\tif ( is_array( $method_order ) && sizeof( $method_order ) > 0 ) {\n\t\t\t$loop = 0;\n\t\t\tforeach ( $method_order as $method_id ) {\n\t\t\t\t$order[ $method_id ] = $loop;\n\t\t\t\t$selection_priority[ $method_id ] = absint( $method_priority[ $method_id ] );\n\t\t\t\t$loop ++;\n\t\t\t}\n\t\t}\n\n\t\tupdate_option( 'woocommerce_shipping_method_selection_priority', $selection_priority );\n\t\tupdate_option( 'woocommerce_shipping_method_order', $order );\n\t}", "public function options()\n\t{\n\n\t $tr = new GoogleTranslate('tr');\n\t $tr->setTarget('ru');\n\n\t $options = \\App\\Option::all();\n\t $text = '';\n\n\t foreach ($options as $option) {\n\t $text .= ' | '.$option->id.'=='.$option->title;\n\t }\n\n\t $ru = $tr->translate($text);\n\t $options2 = [];\n\t $options2 = explode(' | ', $ru);\n\t unset($options2[0]);\n\n\t foreach ($options2 as $option2) {\n\t list($id, $title) = explode('==', $option2);\n\t $option_data = $options->firstWhere('id', $id);\n\t $option_data->title = trim($title);\n\t $option_data->slug = str_slug(trim($title));\n\t $option_data->save();\n\t }\n\n\t echo 'The End!';\n\t}", "function get_settings($option)\n {\n }", "function wassupoptions() {\n\t\t//# initialize class variables with current options \n\t\t//# or with defaults if none\n\t\t$this->loadSettings();\n\t}", "protected function get_registered_options()\n {\n }", "static function optionsIns();", "function opting($opt) {\n\t$opt['table']=ascheck(@$opt['table'],'');\n\t$opt['subject']=ascheck(@$opt['subject'],array());\n\t$opt['subject_str']=ar2str(@$opt['subject'],\"_\");\n\t$opt['topic_in']=ascheck(@$opt['topic_in'],array());\n\t$opt['topic_out']=ascheck(@$opt['topic_out'],array());\n\t$opt['name']=ascheck(@$opt['name'],$opt['subject_str'].ac::$nth);\n\t$opt['title']=ascheck(@$opt['title'],$opt['name']);\n\t$opt['id']=ascheck(@$opt['id'],'');\n\t$opt['bucket']=ascheck(@$opt['bucket'],false);\n\t$opt['list']=ascheck(@$opt['list'],false);\n\t$opt['debug']=ascheck(@$opt['debug'],false);\n\t$opt['class']=ascheck(@$opt['class'],'p');\n\t$opt['modal']=ascheck(@$opt['modal'],true);\n\t$opt['scope']=ascheck(@$opt['scope'],'');\n\t$opt['prepend']=ascheck(@$opt['prepend'],'');\n\t$opt['append']=ascheck(@$opt['append'],'');\n\t$opt['order']=ascheck(@$opt['order'],'');\n\treturn $opt;\n}", "public function screen_option() {\r\n\t\t$option = 'per_page';\r\n\t\t$args = [\r\n\t\t\t'label' => 'Files',\r\n\t\t\t'default' => 5,\r\n\t\t\t'option' => 'file_per_page'\r\n\t\t];\r\n\r\n\t\tadd_screen_option( $option, $args );\r\n\t\t\r\n\t}", "function select_option()\r\n{}", "public function options_init() {\n\t\t\tglobal $allowedtags;\n\t\t\t$allowedtags['p'] = array();\n\t\t\t$this->allowedtags = $allowedtags;\n\n\t\t // set options equal to defaults\n\t\t $this->_options = get_option( $this->options_group[0]['options_name'] );\n\t\t if ( false === $this->_options ) {\n\t\t\t\t$this->_options = $this->get_defaults();\n\t\t }\n\t\t if ( isset( $_GET['undo'] ) && !isset( $_GET['settings-updated'] ) && is_array( $this->get_option('previous') ) ) {\n\t\t \t$this->_options = $this->get_option('previous');\n\t\t }\n\t\t update_option( $this->options_group[0]['options_name'], $this->_options );\t\t\n\t\t \n\t\t}", "protected function initOptions()\n {\n }", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "function dupeoffoptions_add_page_fn() {\n\tadd_options_page('DupeOff', 'DupeOff', 'administrator', __FILE__, 'dupeoff_options_page');\n}", "abstract public function getOptions();", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "function inkpro_create_options() {\r\n\treturn array();\r\n}", "function of_options()\n\t{\n\t\t$of_categories \t\t= array(); \n\t\t$of_categories_obj \t= get_categories('hide_empty=0');\n\t\tforeach ($of_categories_obj as $of_cat) {\n\t\t $of_categories[$of_cat->cat_ID] = $of_cat->cat_name;}\n\t\t$categories_tmp \t= array_unshift($of_categories, \"Select a category:\"); \n\t \n\t\t//Access the WordPress Pages via an Array\n\t\t$of_pages \t\t\t= array();\n\t\t$of_pages_obj \t\t= get_pages('sort_column=post_parent,menu_order'); \n\t\tforeach ($of_pages_obj as $of_page) {\n\t\t $of_pages[$of_page->ID] = $of_page->post_name; }\n\t\t$of_pages_tmp \t\t= array_unshift($of_pages, \"Select a page:\"); \n\t\n\t\t//Testing \n\t\t$of_options_select \t= array(\"one\",\"two\",\"three\",\"four\",\"five\"); \n\t\t$of_options_radio \t= array(\"one\" => \"One\",\"two\" => \"Two\",\"three\" => \"Three\",\"four\" => \"Four\",\"five\" => \"Five\");\n\n\t\t/************************************************************************\n\t\t* Google Subsets\n\t\t*************************************************************************/\n\n\t\t$google_lang_options = array(\"latin\" => \"Latin\", \"latin-ext\" => \"Latin Extended\",\"cyrillic\" => \"Cyrillic\" , \"cyrillic-ext\" => \"Cyrillic Extended\", \"greek\" => \"Greek\", \"greek-ext\" => \"Greek Extended\",\"vietnamese\" => \"Vietnamese\");\n\n\t\t/************************************************************************\n\t\t* Parallax Selects\n\t\t*************************************************************************/\n\n\t\t$nzs_parallax = array();\n\t\t$nzs_parallax['none'] = __('Attach Parallax','framework');\n\n\t\t$test_select = new WP_Query( array( 'post_type' => 'parallax-sections', 'posts_per_page' => -1, 'order' => 'ASC' ));\n\n\t\t if($test_select->have_posts()): while($test_select->have_posts()) : $test_select->the_post();\n\n\t\t $nzs_parallax[get_the_ID()] = get_the_title();\n\n\t\t endwhile;\n\t\t endif;\n\n\n\t\t$nzs_page_section = array();\n\t\t$nzs_page_section['none'] = __('Attach Section','framework');\n\n\n\t\t$test_select = new WP_Query( array( 'post_type' => 'page-sections', 'posts_per_page' => -1, 'order' => 'ASC' ));\n\n\t\t if($test_select->have_posts()): while($test_select->have_posts()) : $test_select->the_post();\n\n\t\t $nzs_page_section[get_the_ID()] = get_the_title();\n\n\t\t endwhile;\n\t\t endif;\n\t\t\n\t\t//Sample Homepage blocks for the layout manager (sorter)\n\t\t$of_options_homepage_blocks = array\n\t\t( \n\t\t\t\"disabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_one\"\t\t=> \"Block One\",\n\t\t\t\t\"block_two\"\t\t=> \"Block Two\",\n\t\t\t\t\"block_three\"\t=> \"Block Three\",\n\t\t\t), \n\t\t\t\"enabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_four\"\t=> \"Block Four\",\n\t\t\t),\n\t\t);\n\n\n\t\t//Stylesheets Reader\n\t\t$alt_stylesheet_path = LAYOUT_PATH;\n\t\t$alt_stylesheets = array();\n\t\t\n\t\tif ( is_dir($alt_stylesheet_path) ) \n\t\t{\n\t\t if ($alt_stylesheet_dir = opendir($alt_stylesheet_path) ) \n\t\t { \n\t\t while ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false ) \n\t\t {\n\t\t if(stristr($alt_stylesheet_file, \".css\") !== false)\n\t\t {\n\t\t $alt_stylesheets[] = $alt_stylesheet_file;\n\t\t }\n\t\t } \n\t\t }\n\t\t}\n\n\n\t\t//Background Images Reader\n\t\t$bg_images_path = get_stylesheet_directory(). '/images/bg/'; // change this to where you store your bg images\n\t\t$bg_images_url = get_template_directory_uri().'/images/bg/'; // change this to where you store your bg images\n\t\t$bg_images = array();\n\t\t\n\t\tif ( is_dir($bg_images_path) ) {\n\t\t if ($bg_images_dir = opendir($bg_images_path) ) { \n\t\t while ( ($bg_images_file = readdir($bg_images_dir)) !== false ) {\n\t\t if(stristr($bg_images_file, \".png\") !== false || stristr($bg_images_file, \".jpg\") !== false) {\n\t\t $bg_images[] = $bg_images_url . $bg_images_file;\n\t\t }\n\t\t } \n\t\t }\n\t\t}\n\n\t\tglobal $smof_data;\n\t\t// SideBars\n\t\t// print_r($smof_data);\n\t\t$nzs_side_bars = array();\n\t\t$nzs_side_bars['sidebar-1'] = __('Default Sidebar','framework');\n\n\t\tif(isset($smof_data['nzs_side_bars']) && is_array($smof_data['nzs_side_bars'])){\n\n\t\t\tforeach ($smof_data['nzs_side_bars'] as $key => $value) {\n\t\t\t\t$nzs_side_bars[\"$key\"] = \"$value\";\n\t\t\t}\n\t\t}\n\t\t\n\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t/* TO DO: Add options/functions that use these */\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t\n\t\t//More Options\n\t\t$uploads_arr \t\t= wp_upload_dir();\n\t\t$all_uploads_path \t= $uploads_arr['path'];\n\t\t$all_uploads \t\t= get_option('of_uploads');\n\t\t$other_entries \t\t= array(\"Select a number:\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\");\n\t\t$body_repeat \t\t= array(\"no-repeat\",\"repeat-x\",\"repeat-y\",\"repeat\");\n\t\t$body_pos \t\t\t= array(\"top left\",\"top center\",\"top right\",\"center left\",\"center center\",\"center right\",\"bottom left\",\"bottom center\",\"bottom right\");\n\t\t\n\t\t// Image Alignment radio box\n\t\t$of_options_thumb_align = array(\"alignleft\" => \"Left\",\"alignright\" => \"Right\",\"aligncenter\" => \"Center\"); \n\t\t\n\t\t// Image Links to Options\n\t\t$of_options_image_link_to = array(\"image\" => \"The Image\",\"post\" => \"The Post\"); \n\n\n/*-----------------------------------------------------------------------------------*/\n/* The Options Array */\n/*-----------------------------------------------------------------------------------*/\n\n$prefix = \"nzs_\";\n\n// Set the Options Array\nglobal $of_options;\n$of_options = array();\n\n/************************************************************************\n* HOME SETTINGS\n*************************************************************************/\n\n$of_options[] = array( \"name\" => \"Home Settings\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Use Plain Text Logo\",\n\t\t\t\t\t\"desc\" => \"If you want to use plain text instead of image logo, then check this option.\",\n\t\t\t\t\t\"id\" => $prefix.\"plain_text_logo\",\n\t\t\t\t\t\"std\" => 0,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\t\t\t\t\t\t\t\t\n$of_options[] = array( \"name\" => \"Site Logo Upload\",\n\t\t\t\t\t\"desc\" => \"Upload a logo using the upload button or enter a url (ie: http://www.yoursite.com/logo.png).\",\n\t\t\t\t\t\"id\" => $prefix.\"logo\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"media\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Custom Logo Width\",\n\t\t\t\t\t\"id\" => $prefix.\"logo_width\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"class\" => \"mini\"); \n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Custom Logo Height\",\n\t\t\t\t\t\"id\" => $prefix.\"logo_height\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"class\" => \"mini\"); \n\n$of_options[] = array( \"name\" => \"Custom Favicon\",\n\t\t\t\t\t\"desc\" => \"Upload a 16px x 16px Png/Gif image that will represent your website's favicon.\",\n\t\t\t\t\t\"id\" => $prefix.\"custom_favicon\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"upload\"); \n\n$of_options[] = array( \"name\" => \"Alternating Background 1\",\n\t\t\t\t\t\"desc\" => \"Upload a background image to alternate. You can override this when creating page sections.\",\n\t\t\t\t\t\"id\" => $prefix.\"alternate_bg1\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"media\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Or Choose a color.\",\n\t\t\t\t\t\"id\" => $prefix.\"alternate_bg1_color\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"Alternating Background 2\",\n\t\t\t\t\t\"desc\" => \"Upload a background image to alternate. You can override this when creating page sections.\",\n\t\t\t\t\t\"id\" => $prefix.\"alternate_bg2\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"media\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Or Choose a color.\",\n\t\t\t\t\t\"id\" => $prefix.\"alternate_bg2_color\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n\n\n/************************************************************************\n* HEADER OPTIONS\n*************************************************************************/\n\n$of_options[] = array( \"name\" => \"Header Options\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n\n$url = ADMIN_DIR . 'assets/images/';\n\n\n$of_options[] = array( \"name\" => \"Header Options\",\n\t\t\t\t\t\"desc\" => \"Use the drop down to select the header you'd like to use.\",\n\t\t\t\t\t\"id\" => $prefix.\"header_options\",\n\t\t\t\t\t\"std\" => \"fullscreen\",\n\t\t\t\t\t\"type\" => \"select-custom\",\n\t\t\t\t\t\"options\" => \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'fullscreen' => 'Full Screen Slider',\n\t\t\t\t\t\t\t'parallax' => 'Parallax',\n\t\t\t\t\t\t\t'flexslider' => 'FlexSlider',\n\t\t\t\t\t\t\t'video-header' => 'Video Header',\n\t\t\t\t\t\t\t'customheader' => 'Custom Header',\n\n\t\t\t\t\t\t\t)\n\n\t\t\t\t\t);\n\n\n$of_options[] = array( \"name\" => \"Menu Bar Position\",\n\t\t\t\t\t\"desc\" => \"Select if you'd like nav on top or bottom\",\n\t\t\t\t\t\"id\" => $prefix.\"nav_position\",\n\t\t\t\t\t\"std\" => \"bottom\",\n\t\t\t\t\t\"type\" => \"select-custom\",\n\t\t\t\t\t\"options\" => \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'top' => 'Top',\n\t\t\t\t\t\t\t'bottom' => 'Bottom',\n\n\t\t\t\t\t\t\t)\n\n\t\t\t\t\t);\n\n/************************************************************************\n* Video header\t\n*************************************************************************/\n$of_options[] = array( \"name\" => \"videoheader\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Video Type\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Select Youtube or Vimeo option\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"full_video_type\",\n\t\t\t\t\t\t\"std\" \t\t=> 0,\n\t\t\t\t\t\t\"on\" \t\t=> \"Youtube\",\n\t\t\t\t\t\t\"off\" \t\t=> \"Vimeo\",\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"youtubeheader\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Youtube Embed Video Link\",\n\t\t\t\t\t\"desc\" => \"This should look like http://www.youtube.com/embed/pTTkTN_IIck\",\n\t\t\t\t\t\"id\" => $prefix.\"youtube_video_embed\",\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \t\"name\" \t\t=> \"Repeat Video(loop)\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Option to have video loop\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"youtube_video_repeat\",\n\t\t\t\t\t\t\"std\" \t\t=> 0,\n\t\t\t\t\t\t\"on\" \t\t=> \"Enabled\",\n\t\t\t\t\t\t\"off\" \t\t=> \"Disabled\",\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Volume Setting\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Change the volume on starting. Set to 0 to mute on start.\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"youtube_volume\",\n\t\t\t\t\t\t\"std\" \t\t=> \"30\",\n\t\t\t\t\t\t\"min\" \t\t=> \"0\",\n\t\t\t\t\t\t\"step\"\t\t=> \"10\",\n\t\t\t\t\t\t\"max\" \t\t=> \"100\",\n\t\t\t\t\t\t\"type\" \t\t=> \"sliderui\" \n\t\t\t\t); \n\n$of_options[] = array( \"name\" => \"Cover Image\",\n\t\t\t\t\t\"desc\" => \"This image is shown before video load and unsupported devices.\",\n\t\t\t\t\t\"id\" => $prefix.\"youtube_image\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"upload\"); \n\n$of_options[] = array( \"name\" => \"Heading Text\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"youtube_heading_text\",\n\t\t\t\t\t\"std\" => 'Parallax',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"Description Text\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"youtube_description_text\",\n\t\t\t\t\t\"std\" => 'Great one page theme with tons of possibilities and options!',\n\t\t\t\t\t\"type\" => \"text\"); \n\n$of_options[] = array( \"name\" => \"Header Logo (optional)\",\n\t\t\t\t\t\"desc\" => \"You can use this image upload to insert a logo in the header.\",\n\t\t\t\t\t\"id\" => $prefix.\"youtube_logo_image\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"media\"); \n\n$of_options[] = array( \"name\" => \"Font Colors\",\n\t\t\t\t\t\"desc\" => \"Heading Font\",\n\t\t\t\t\t\"id\" => $prefix.\"heading_font_youtube\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Description font color.\",\n\t\t\t\t\t\"id\" => $prefix.\"desc_font_youtube\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\"); \n\n\n/************************************************************************\n* Vimeo Header\n*************************************************************************/\n\n$of_options[] = array( \"name\" => \"vimeoheader\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n$of_options[] = array( \"name\" => \"Vimeo Embed Video Link\",\n\t\t\t\t\t\"desc\" => \"This should look like http://player.vimeo.com/video/7449107\",\n\t\t\t\t\t\"id\" => $prefix.\"vimeo_video_embed\",\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \t\"name\" \t\t=> \"Repeat Video(loop)\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Option to have video loop\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"vimeo_video_repeat\",\n\t\t\t\t\t\t\"std\" \t\t=> 0,\n\t\t\t\t\t\t\"on\" \t\t=> \"Enabled\",\n\t\t\t\t\t\t\"off\" \t\t=> \"Disabled\",\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n$of_options[] = array( \t\"name\" \t\t=> \"Volume Setting\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Change the volume on starting. Set to 0 to mute on start.\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"vimeo_volume\",\n\t\t\t\t\t\t\"std\" \t\t=> \"30\",\n\t\t\t\t\t\t\"min\" \t\t=> \"0\",\n\t\t\t\t\t\t\"step\"\t\t=> \"10\",\n\t\t\t\t\t\t\"max\" \t\t=> \"100\",\n\t\t\t\t\t\t\"type\" \t\t=> \"sliderui\" \n\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Cover Image\",\n\t\t\t\t\t\"desc\" => \"This image is shown before video load and unsupported devices.\",\n\t\t\t\t\t\"id\" => $prefix.\"vimeo_image\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"upload\"); \n$of_options[] = array( \"name\" => \"Heading Text\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"vimeo_heading_text\",\n\t\t\t\t\t\"std\" => 'Vimeo',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"Description Text\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"vimeo_description_text\",\n\t\t\t\t\t\"std\" => 'Great one page theme with tons of possibilities and options!',\n\t\t\t\t\t\"type\" => \"text\"); \n\n$of_options[] = array( \"name\" => \"Header Logo (optional)\",\n\t\t\t\t\t\"desc\" => \"You can use this image upload to insert a logo in the header.\",\n\t\t\t\t\t\"id\" => $prefix.\"vimeo_logo_image\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"media\"); \n\n$of_options[] = array( \"name\" => \"Font Colors\",\n\t\t\t\t\t\"desc\" => \"Heading Font\",\n\t\t\t\t\t\"id\" => $prefix.\"heading_font_vimeo\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Description font color.\",\n\t\t\t\t\t\"id\" => $prefix.\"desc_font_vimeo\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\"); \n\n/************************************************************************\n* Custom Header Option\n*************************************************************************/\n$of_options[] = array( \"name\" => \"customheader\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Custom Header Code\",\n\t\t\t\t\t\"desc\" => \"Insert custom header code/shortcodes in here.\",\n\t\t\t\t\t\"id\" => $prefix.\"custom_header_code\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"textarea\"); \n\n$of_options[] = array( \"name\" => \"Background Image\",\n\t\t\t\t\t\"desc\" => \"Upload a repeatable background image.\",\n\t\t\t\t\t\"id\" => $prefix.\"custom_slider_bg_image\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"upload\"); \n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Repeat Options\",\n\t\t\t\t\t\"id\" => $prefix.\"custom_bg_repeat\",\n\t\t\t\t\t\"std\" => \"repeat\",\n\t\t\t\t\t\"type\" => \"select-custom\",\n\t\t\t\t\t\"options\" => \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'repeat' => 'Repeat',\n\t\t\t\t\t\t\t'repeat-x' => 'Repeat X',\n\t\t\t\t\t\t\t'repeat-y' => 'Repeat y',\n\t\t\t\t\t\t\t'no-repeat' => 'No Repeat',\n\n\t\t\t\t\t\t\t)\n\n\t\t\t\t\t);\n\n\n/************************************************************************\n* Flex Header\n*************************************************************************/\n$of_options[] = array( \"name\" => \"flexslider\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n\n\n$of_options[] = array( \"name\" => \"FlexSlider Slides\",\n\t\t\t\t\t\"desc\" => \"Unlimited slider with drag and drop sortings.\",\n\t\t\t\t\t\"id\" => $prefix.\"flex_slider\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"slider\");\n\n$of_options[] = array( \"name\" => \"Background Image\",\n\t\t\t\t\t\"desc\" => \"Upload a repeatable background image.\",\n\t\t\t\t\t\"id\" => $prefix.\"flex_slider_bg_image\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"upload\"); \n\n$of_options[] = array( \"name\" => \"Color Options\",\n\t\t\t\t\t\"desc\" => \"Heading Font\",\n\t\t\t\t\t\"id\" => $prefix.\"heading_font_flexslider\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Description font color.\",\n\t\t\t\t\t\"id\" => $prefix.\"desc_font_flexslider\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\"); \n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Slider frame color.\",\n\t\t\t\t\t\"id\" => $prefix.\"frame_flexslider\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\"); \n\n\n/************************************************************************\n* PArallax Header\n*************************************************************************/\n$of_options[] = array( \"name\" => \"parallax\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Heading Text\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"parallax_heading_text\",\n\t\t\t\t\t\"std\" => 'Parallax',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"Description Text\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"parallax_description_text\",\n\t\t\t\t\t\"std\" => 'Great one page theme with tons of possibilities and options!',\n\t\t\t\t\t\"type\" => \"text\"); \n\n$of_options[] = array( \"name\" => \"Upload Image for Parallax header\",\n\t\t\t\t\t\"desc\" => \"This image is used in header.\",\n\t\t\t\t\t\"id\" => $prefix.\"parallax_image\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"upload\"); \n\n$of_options[] = array( \"name\" => \"Header Logo (optional)\",\n\t\t\t\t\t\"desc\" => \"You can use this image upload to insert a logo in the header.\",\n\t\t\t\t\t\"id\" => $prefix.\"parallax_logo_image\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"media\"); \n\n$of_options[] = array( \"name\" => \"Parallax Speed\",\n\t\t\t\t\t\"desc\" => \"Speed of parallax effect. Default 0.3\",\n\t\t\t\t\t\"id\" => $prefix.\"parallax_header_speed\",\n\t\t\t\t\t\"std\" => \"0.3\",\n\t\t\t\t\t\"type\" => \"select-custom\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t '0.0' => '0.0',\n\t\t\t '0.1' => '0.1',\n\t\t\t '0.2' =>'0.2',\n\t\t\t '0.3' => '0.3',\n\t\t\t '0.4' => '0.4',\n\t\t\t '0.5' => '0.5',\n\t\t\t '0.6' => '0.6',\n\t\t\t '0.7' => '0.7',\n\t\t\t '0.8' => '0.8',\n\t\t\t '0.9' => '0.9',\n\t\t\t '1' => '1',\n\t\t\t '1.1' => '1.1',\n\t\t\t '1.2' =>'1.2',\n\t\t\t '1.3' => '1.3',\n\t\t\t '1.4' => '1.4',\n\t\t\t '1.5' => '1.5',\n\t\t\t '1.6' => '1.6',\n\t\t\t '1.7' => '1.7',\n\t\t\t '1.8' => '1.8',\n\t\t\t '1.9' => '1.9'\n\t\t\t )\n\n\t\t\t\t\t); \n\n$of_options[] = array( \"name\" => \"Font Colors\",\n\t\t\t\t\t\"desc\" => \"Heading Font\",\n\t\t\t\t\t\"id\" => $prefix.\"heading_font_parallax\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Description font color.\",\n\t\t\t\t\t\"id\" => $prefix.\"desc_font_parallax\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\"); \n\n/************************************************************************\n* Full Screen SLider\n*************************************************************************/\n\n$of_options[] = array( \"name\" => \"FullScreen\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Full Screen Slides\",\n\t\t\t\t\t\"desc\" => \"Unlimited slider with drag and drop sortings.\",\n\t\t\t\t\t\"id\" => $prefix.\"full_screen_slider\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"slider\");\n\n$of_options[] = array( \"name\" => \"Header Logo (optional)\",\n\t\t\t\t\t\"desc\" => \"You can use this image upload to insert a logo in the header.\",\n\t\t\t\t\t\"id\" => $prefix.\"fullscreen_logo_image\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"media\"); \n\n\n$of_options[] = array( \t\"name\" \t\t=> \"Slide Speed\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Change slide speed. default 4000\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"fullscreen_speed\",\n\t\t\t\t\t\t\"std\" \t\t=> \"4000\",\n\t\t\t\t\t\t\"min\" \t\t=> \"4000\",\n\t\t\t\t\t\t\"step\"\t\t=> \"3\",\n\t\t\t\t\t\t\"max\" \t\t=> \"20000\",\n\t\t\t\t\t\t\"type\" \t\t=> \"sliderui\" \n\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Slide Transition\",\n\t\t\t\t\t\"desc\" => \"Choose transition effect for between slides.\",\n\t\t\t\t\t\"id\" => $prefix.\"fullscreen_trans\",\n\t\t\t\t\t\"std\" => \"1\",\n\t\t\t\t\t\"type\" => \"select-custom\",\n\t\t\t\t\t\"options\" => \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'0' => 'None',\n\t\t\t\t\t\t\t'1' => 'Fade',\n\t\t\t\t\t\t\t'2' => 'Slide Top',\n\t\t\t\t\t\t\t'3' => 'Slide Right',\n\t\t\t\t\t\t\t'4' => 'Slide Bottom',\n\t\t\t\t\t\t\t'5' => 'Slide Left',\n\t\t\t\t\t\t\t'6' => 'Carousel Right',\n\t\t\t\t\t\t\t'7' => 'Carousel Left',\n\t\t\t\t\t\t)\n\n\t\t\t\t\t); \n$of_options[] = array( \"name\" => \"Open Links In\",\n\t\t\t\t\t\"desc\" => \"Optional open links in new or same window\",\n\t\t\t\t\t\"id\" => $prefix.\"full_slider_target\",\n\t\t\t\t\t\"std\" => 1,\n\t\t\t\t\t\"type\" => \"select-custom\",\n\t\t\t\t\t\"class\" => \"tiny\", //mini, tiny, small\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t\"0\" => \"_self\",\n\t\t\t\t\t\t\"1\" => \"_blank\",\n\t\t\t\t\t)); \n\n$of_options[] = array( \"name\" => \"Font Colors\",\n\t\t\t\t\t\"desc\" => \"Heading Font\",\n\t\t\t\t\t\"id\" => $prefix.\"heading_font_fullscreen\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Description font color.\",\n\t\t\t\t\t\"id\" => $prefix.\"desc_font_fullscreen\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\"); \n\n\n/************************************************************************\n* GENERAL SETTINGS\n*************************************************************************/\n\n$of_options[] = array( \"name\" => \"General Settings\",\n \"type\" => \"heading\");\n\n\n$of_options[] = array( \t\"name\" \t\t=> \"Responsive Layout\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Disable Responsive Layout?\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"responsive_layout\",\n\t\t\t\t\t\t\"std\" \t\t=> 0,\n\t\t\t\t\t\t\"on\" \t\t=> \"Enabled\",\n\t\t\t\t\t\t\"off\" \t\t=> \"Disabled\",\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n\n\n$of_options[] = array( \"name\" => \"Default Parallax\",\n\t\t\t\t\t\"desc\" => \"Optional Choose a default parallax for pages, post, etc. This is shown at bottom of pages.\",\n\t\t\t\t\t\"id\" => $prefix.\"default_parallax\",\n\t\t\t\t\t\"std\" => \"none\",\n\t\t\t\t\t\"type\" => \"select-custom\",\n\t\t\t\t\t\"options\" =>$nzs_parallax,\n\n\t\t\t\t\t); \n\n$of_options[] = array( \"name\" => \"Default Page Section\",\n\t\t\t\t\t\"desc\" => \"Optional Choose a default page section for pages, post, etc. This is shown at bottom of pages.\",\n\t\t\t\t\t\"id\" => $prefix.\"default_page_section\",\n\t\t\t\t\t\"std\" => \"none\",\n\t\t\t\t\t\"type\" => \"select-custom\",\n\t\t\t\t\t\"options\" =>$nzs_page_section,\n\n\t\t\t\t\t); \n \n$of_options[] = array( \"name\" => \"Tracking Code/Custom JS\",\n\t\t\t\t\t\"desc\" => \"Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.\",\n\t\t\t\t\t\"id\" => $prefix.\"google_analytics\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"textarea\"); \n\n\n$of_options[] = array( \"name\" => \"Footer Text\",\n \"desc\" => \"You can use the following shortcodes in your footer text: [theme-link] [the-year]\",\n \"id\" => $prefix.\"footer_text\",\n \"std\" => \"\",\n \"type\" => \"textarea\"); \n\n\n/************************************************************************\n* Typography OPTIONS\n*************************************************************************/\n\n \n$of_options[] = array( \"name\" => \"Typography\",\n\t\t\t\t\t\"type\" => \"heading\");\n\n$of_options[] = array( \"name\" => \"Body Font\",\n\t\t\t\t\t\"desc\" => \"Specify the body font properties\",\n\t\t\t\t\t\"id\" => $prefix.\"body_font\",\n\t\t\t\t\t\"std\" => array('size' => '13px','face' => 'Open Sans','color' => '#303030'),\n\t\t\t\t\t\"type\" => \"typography\"); \n\n$of_options[] = array( \"name\" => \"Heading Font\",\n\t\t\t\t\t\"desc\" => \"Specify the heading font properties\",\n\t\t\t\t\t\"id\" => $prefix.\"heading_face_font\",\n\t\t\t\t\t\"std\" => array('face' => 'Oswald','color' => '#cc6633'),\n\t\t\t\t\t\"type\" => \"typography\");\n\n$of_options[] = array( \"name\" => \"Menu Font\",\n\t\t\t\t\t\"desc\" => \"Specify the menu font face\",\n\t\t\t\t\t\"id\" => $prefix.\"menu_face_font\",\n\t\t\t\t\t\"std\" => array('size' => '15px','face' => 'Oswald'),\n\t\t\t\t\t\"type\" => \"typography\");\n\n$of_options[] = array( \"name\" => \"Heading 1\",\n\t\t\t\t\t\"desc\" => \"Font size for H1 tags. Default size: 46px\",\n\t\t\t\t\t\"id\" => $prefix.\"heading_one\",\n\t\t\t\t\t\"std\" => array('size' => '46px'),\n\t\t\t\t\t\"type\" => \"typography\"); \n\n$of_options[] = array( \"name\" => \"Heading 2\",\n\t\t\t\t\t\"desc\" => \"Font size for H2 tags. Default size: 35px\",\n\t\t\t\t\t\"id\" => $prefix.\"heading_two\",\n\t\t\t\t\t\"std\" => array('size' => '35px'),\n\t\t\t\t\t\"type\" => \"typography\"); \n\n$of_options[] = array( \"name\" => \"Heading 3\",\n\t\t\t\t\t\"desc\" => \"Font size for H3 tags. Default size: 28px\",\n\t\t\t\t\t\"id\" => $prefix.\"heading_three\",\n\t\t\t\t\t\"std\" => array('size' => '28px'),\n\t\t\t\t\t\"type\" => \"typography\"); \n\n$of_options[] = array( \"name\" => \"Heading 4\",\n\t\t\t\t\t\"desc\" => \"Font size for H4 tags. Default size: 21px\",\n\t\t\t\t\t\"id\" => $prefix.\"heading_four\",\n\t\t\t\t\t\"std\" => array('size' => '21px'),\n\t\t\t\t\t\"type\" => \"typography\"); \n\n$of_options[] = array( \"name\" => \"Heading 5\",\n\t\t\t\t\t\"desc\" => \"Font size for H5 tags. Default size: 17px\",\n\t\t\t\t\t\"id\" => $prefix.\"heading_five\",\n\t\t\t\t\t\"std\" => array('size' => '17px'),\n\t\t\t\t\t\"type\" => \"typography\"); \n\n$of_options[] = array( \"name\" => \"Heading 6\",\n\t\t\t\t\t\"desc\" => \"Font size for H6 tags. Default size: 14px\",\n\t\t\t\t\t\"id\" => $prefix.\"heading_six\",\n\t\t\t\t\t\"std\" => array('size' => '14px'),\n\t\t\t\t\t\"type\" => \"typography\"); \n\n$of_options[] = array( \"name\" => \"Google Character Sets (optional)\",\n\t\t\t\t\t\"desc\" => \"Please note this doesn't check the font on Google Webfonts to see if the subset is available.\",\n\t\t\t\t\t\"id\" => $prefix.\"body_font_options\",\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t \t\"type\" => \"multicheck\",\n\t\t\t\t\t\"options\" => $google_lang_options); \n/************************************************************************\n* Styling Options\n*************************************************************************/ \t\t\t\n$of_options[] = array( \"name\" => \"Styling Options\",\n\t\t\t\t\t\"type\" => \"heading\");\n\n$of_options[] = array( \"name\" => \"Navigation Styling\",\n\t\t\t\t\t\"desc\" => \"Upload a image for navigation background image.\",\n\t\t\t\t\t\"id\" => $prefix.\"nav_bg_image\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"media\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Background Color\",\n\t\t\t\t\t\"id\" => $prefix.\"nav_bg_color\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Border Color\",\n\t\t\t\t\t\"id\" => $prefix.\"nav_border_color\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Link Color\",\n\t\t\t\t\t\"id\" => $prefix.\"nav_link_color\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Link Hover Color\",\n\t\t\t\t\t\"id\" => $prefix.\"nav_link_hover\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Sub Menu Background Color\",\n\t\t\t\t\t\"id\" => $prefix.\"nav_subbg\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Sub Menu Hover Background Color\",\n\t\t\t\t\t\"id\" => $prefix.\"nav_subbg_hover\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Sub Menu Border Color\",\n\t\t\t\t\t\"id\" => $prefix.\"nav_subborder\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n\n$of_options[] = array( \t\"name\" \t\t=> \"Mobile Menu Option\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Select Dropdown or Mobile Menu\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"mobile_menu_type\",\n\t\t\t\t\t\t\"std\" \t\t=> 0,\n\t\t\t\t\t\t\"on\" \t\t=> \"DropDown\",\n\t\t\t\t\t\t\"off\" \t\t=> \"Mobile Menu\",\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Mobile Menu BG Color\",\n\t\t\t\t\t\"id\" => $prefix.\"mobile_bg_color\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Mobile Icon Color\",\n\t\t\t\t\t\"id\" => $prefix.\"mobile_icon\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Mobile Icon Active\",\n\t\t\t\t\t\"id\" => $prefix.\"mobile_icon_open\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \t\"name\" \t\t=> \"Load Font Awesome Icons\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Set to Enable to load font awesome.\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"load_font_awesome\",\n\t\t\t\t\t\t\"std\" \t\t=> 1,\n\t\t\t\t\t\t\"on\" \t\t=> \"Enable\",\n\t\t\t\t\t\t\"off\" \t\t=> \"Disabled\",\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n\n\n$of_options[] = array( \"name\" => \"Image Hover Styling\",\n\t\t\t\t\t\"desc\" => \"Image Overlay Color\",\n\t\t\t\t\t\"id\" => $prefix.\"overlay_color\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Icon BG Color\",\n\t\t\t\t\t\"id\" => $prefix.\"bg_icon_color\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\"); \n\n$of_options[] = array( \"name\" => \"Link Styling\",\n\t\t\t\t\t\"desc\" => \"Link Color\",\n\t\t\t\t\t\"id\" => $prefix.\"link_color\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Hover Color\",\n\t\t\t\t\t\"id\" => $prefix.\"link_hover\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\"); \n\n$of_options[] = array( \"name\" => \"Button Styling\",\n\t\t\t\t\t\"desc\" => \"Background Color\",\n\t\t\t\t\t\"id\" => $prefix.\"button_background\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Border Color\",\n\t\t\t\t\t\"id\" => $prefix.\"button_border\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Font Color\",\n\t\t\t\t\t\"id\" => $prefix.\"button_font_color\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\"); \n\t\t\t\t\t\n$of_options[] = array( \"name\" => \"Footer Styling\",\n\t\t\t\t\t\"desc\" => \"Background Color\",\n\t\t\t\t\t\"id\" => $prefix.\"footer_background\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Border Color\",\n\t\t\t\t\t\"id\" => $prefix.\"footer_border\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Font Color\",\n\t\t\t\t\t\"id\" => $prefix.\"footer_font_color\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\"); \n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Link Color\",\n\t\t\t\t\t\"id\" => $prefix.\"footer_link_color\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Link Hover Color\",\n\t\t\t\t\t\"id\" => $prefix.\"footer_link_hover_color\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\"); \n\t\t\t\t\t\n$of_options[] = array( \"name\" => \"Custom CSS\",\n \"desc\" => \"Quickly add some CSS to your theme by adding it to this block.\",\n \"id\" => $prefix.\"custom_css\",\n \"std\" => \"\",\n \"type\" => \"textarea\");\n\n\n/************************************************************************\n* HOME SETTINGS\n*************************************************************************/\n\n$of_options[] = array( \"name\" => \"Image Settings\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"FlexSlider Speed\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Change transition speed\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"flex_speed\",\n\t\t\t\t\t\t\"std\" \t\t=> \"3500\",\n\t\t\t\t\t\t\"min\" \t\t=> \"0\",\n\t\t\t\t\t\t\"step\"\t\t=> \"100\",\n\t\t\t\t\t\t\"max\" \t\t=> \"20000\",\n\t\t\t\t\t\t\"type\" \t\t=> \"sliderui\" \n\t\t\t\t); \n\n$of_options[] = array( \t\"name\" \t\t=> \"FlexSlider AutoPlay\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Set to Enable to autoplay/start slider\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"flex_auto_start\",\n\t\t\t\t\t\t\"std\" \t\t=> 0,\n\t\t\t\t\t\t\"on\" \t\t=> \"Enable\",\n\t\t\t\t\t\t\"off\" \t\t=> \"Disabled\",\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Portfolio Thumbnail\",\n\t\t\t\t\t\"desc\" => \"Check box to override theme's default sizes\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_thumb_enable\",\n\t\t\t\t\t\"std\" => 0,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Width\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_thumb_width\",\n\t\t\t\t\t\"std\" => '410',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Height\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_thumb_height\",\n\t\t\t\t\t\"std\" => '230',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Uncheck box for soft crop mode.\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_crop_mode\",\n\t\t\t\t\t\"std\" => 1,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"Portfolio Single Page Thumbnail\",\n\t\t\t\t\t\"desc\" => \"Check box to override theme's default sizes\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_single_thumb_enable\",\n\t\t\t\t\t\"std\" => 0,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Width\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_single_thumb_width\",\n\t\t\t\t\t\"std\" => '610',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Height\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_single_thumb_height\",\n\t\t\t\t\t\"std\" => '230',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Uncheck box for soft crop mode.\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_single_crop_mode\",\n\t\t\t\t\t\"std\" => 1,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"Portfolio Single Full Width Page Thumbnail\",\n\t\t\t\t\t\"desc\" => \"Check box to override theme's default sizes\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_single_full_thumb_enable\",\n\t\t\t\t\t\"std\" => 0,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Width\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_single_full_thumb_width\",\n\t\t\t\t\t\"std\" => '925',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Height\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_single_full_thumb_height\",\n\t\t\t\t\t\"std\" => '350',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Uncheck box for soft crop mode.\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_single_full_crop_mode\",\n\t\t\t\t\t\"std\" => 1,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n\n/*WORKS IMAGEs*/\n\n$of_options[] = array( \"name\" => \"Works Thumbnail\",\n\t\t\t\t\t\"desc\" => \"Check box to override theme's default sizes\",\n\t\t\t\t\t\"id\" => $prefix.\"works_thumb_enable\",\n\t\t\t\t\t\"std\" => 0,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Width\",\n\t\t\t\t\t\"id\" => $prefix.\"works_thumb_width\",\n\t\t\t\t\t\"std\" => '410',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Height\",\n\t\t\t\t\t\"id\" => $prefix.\"works_thumb_height\",\n\t\t\t\t\t\"std\" => '160',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Uncheck box for soft crop mode.\",\n\t\t\t\t\t\"id\" => $prefix.\"works_crop_mode\",\n\t\t\t\t\t\"std\" => 1,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"Works Single Page Thumbnail\",\n\t\t\t\t\t\"desc\" => \"Check box to override theme's default sizes\",\n\t\t\t\t\t\"id\" => $prefix.\"works_single_thumb_enable\",\n\t\t\t\t\t\"std\" => 0,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Width\",\n\t\t\t\t\t\"id\" => $prefix.\"works_single_thumb_width\",\n\t\t\t\t\t\"std\" => '610',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Height\",\n\t\t\t\t\t\"id\" => $prefix.\"works_single_thumb_height\",\n\t\t\t\t\t\"std\" => '230',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Uncheck box for soft crop mode.\",\n\t\t\t\t\t\"id\" => $prefix.\"works_single_crop_mode\",\n\t\t\t\t\t\"std\" => 1,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"Works Single Full Width Page Thumbnail\",\n\t\t\t\t\t\"desc\" => \"Check box to override theme's default sizes\",\n\t\t\t\t\t\"id\" => $prefix.\"works_single_full_thumb_enable\",\n\t\t\t\t\t\"std\" => 0,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Width\",\n\t\t\t\t\t\"id\" => $prefix.\"works_single_full_thumb_width\",\n\t\t\t\t\t\"std\" => '925',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Height\",\n\t\t\t\t\t\"id\" => $prefix.\"works_single_full_thumb_height\",\n\t\t\t\t\t\"std\" => '350',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Uncheck box for soft crop mode.\",\n\t\t\t\t\t\"id\" => $prefix.\"works_single_full_crop_mode\",\n\t\t\t\t\t\"std\" => 1,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n/*BLOG POST*/\n\n// $of_options[] = array( \"name\" => \"Posts Thumbnail\",\n// \t\t\t\t\t\"desc\" => \"Check box to override theme's default sizes\",\n// \t\t\t\t\t\"id\" => $prefix.\"post_thumb_enable\",\n// \t\t\t\t\t\"std\" => 0,\n// \t\t\t\t\t\"type\" => \"checkbox\");\n\n// $of_options[] = array( \"name\" => \"\",\n// \t\t\t\t\t\"desc\" => \"px Width\",\n// \t\t\t\t\t\"id\" => $prefix.\"post_thumb_width\",\n// \t\t\t\t\t\"std\" => '410',\n// \t\t\t\t\t\"class\" => 'mini',\n// \t\t\t\t\t\"type\" => \"text\");\n\n// $of_options[] = array( \"name\" => \"\",\n// \t\t\t\t\t\"desc\" => \"px Height\",\n// \t\t\t\t\t\"id\" => $prefix.\"post_thumb_height\",\n// \t\t\t\t\t\"std\" => '160',\n// \t\t\t\t\t\"class\" => 'mini',\n// \t\t\t\t\t\"type\" => \"text\");\n\n// $of_options[] = array( \"name\" => \"\",\n// \t\t\t\t\t\"desc\" => \"Uncheck box for soft crop mode.\",\n// \t\t\t\t\t\"id\" => $prefix.\"post_crop_mode\",\n// \t\t\t\t\t\"std\" => 1,\n// \t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"Posts Thumbnail\",\n\t\t\t\t\t\"desc\" => \"Check box to override theme's default sizes\",\n\t\t\t\t\t\"id\" => $prefix.\"post_single_thumb_enable\",\n\t\t\t\t\t\"std\" => 0,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Width\",\n\t\t\t\t\t\"id\" => $prefix.\"post_single_thumb_width\",\n\t\t\t\t\t\"std\" => '610',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Height\",\n\t\t\t\t\t\"id\" => $prefix.\"post_single_thumb_height\",\n\t\t\t\t\t\"std\" => '230',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Uncheck box for soft crop mode.\",\n\t\t\t\t\t\"id\" => $prefix.\"post_single_crop_mode\",\n\t\t\t\t\t\"std\" => 1,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"Posts Single Full Width Page Thumbnail\",\n\t\t\t\t\t\"desc\" => \"Check box to override theme's default sizes\",\n\t\t\t\t\t\"id\" => $prefix.\"post_single_full_thumb_enable\",\n\t\t\t\t\t\"std\" => 0,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Width\",\n\t\t\t\t\t\"id\" => $prefix.\"post_single_full_thumb_width\",\n\t\t\t\t\t\"std\" => '925',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Height\",\n\t\t\t\t\t\"id\" => $prefix.\"post_single_full_thumb_height\",\n\t\t\t\t\t\"std\" => '350',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Uncheck box for soft crop mode.\",\n\t\t\t\t\t\"id\" => $prefix.\"post_single_full_crop_mode\",\n\t\t\t\t\t\"std\" => 1,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n/*Team*/\n\n$of_options[] = array( \"name\" => \"Team Thumbnail\",\n\t\t\t\t\t\"desc\" => \"Check box to override theme's default sizes\",\n\t\t\t\t\t\"id\" => $prefix.\"team_thumb_enable\",\n\t\t\t\t\t\"std\" => 0,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Width\",\n\t\t\t\t\t\"id\" => $prefix.\"team_thumb_width\",\n\t\t\t\t\t\"std\" => '250',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"px Height\",\n\t\t\t\t\t\"id\" => $prefix.\"team_thumb_height\",\n\t\t\t\t\t\"std\" => '250',\n\t\t\t\t\t\"class\" => 'mini',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Uncheck box for soft crop mode.\",\n\t\t\t\t\t\"id\" => $prefix.\"team_crop_mode\",\n\t\t\t\t\t\"std\" => 1,\n\t\t\t\t\t\"type\" => \"checkbox\");\n\n/************************************************************************\n* Recent Works\n*************************************************************************/\t\t\t\n$of_options[] = array( \"name\" => \"Works Options\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Excerpt Length\",\n\t\t\t\t\t\"desc\" => \"Custom Excerpt Length\",\n\t\t\t\t\t\"id\" => $prefix.\"works_excerpt_length\",\n\t\t\t\t\t\"std\" => \"85\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"class\" => \"mini\"); \n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Mouseover Icons\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Show page link icon?\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"hide_works_link\",\n\t\t\t\t\t\t\"std\" \t\t=> 0,\n\t\t\t\t\t\t\"on\" \t\t=> \"Show\",\n\t\t\t\t\t\t\"off\" \t\t=> \"Hide\",\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Show photo popup icon?\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"hide_works_photo_link\",\n\t\t\t\t\t\t\"std\" \t\t=> 0,\n\t\t\t\t\t\t\"on\" \t\t=> \"Show\",\n\t\t\t\t\t\t\"off\" \t\t=> \"Hide\",\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Masonry Layout\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Isotype masonry layout option\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"iso_works_option\",\n\t\t\t\t\t\t\"std\" \t\t=> 1,\n\t\t\t\t\t\t\"on\" \t\t=> \"Enabled\",\n\t\t\t\t\t\t\"off\" \t\t=> \"Disabled\",\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Works Display Order Options\",\n\t\t\t\t\t\"desc\" => \"Use the drop down to select orderby value\",\n\t\t\t\t\t\"id\" => $prefix.\"works_orderby\",\n\t\t\t\t\t\"std\" => \"ID\",\n\t\t\t\t\t\"type\" => \"select-custom\",\n\t\t\t\t\t\"options\" => \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => 'Title',\n\t\t\t\t\t\t\t'ID' => 'Default',\n\t\t\t\t\t\t\t'date' => 'Date',\n\t\t\t\t\t\t\t'rand' => 'Random',\n\n\t\t\t\t\t\t\t)\n\n\t\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Use the drop down to select to ascend order or descend.\",\n\t\t\t\t\t\"id\" => $prefix.\"works_order\",\n\t\t\t\t\t\"std\" => \"DESC\",\n\t\t\t\t\t\"type\" => \"select-custom\",\n\t\t\t\t\t\"options\" => \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'ASC' => 'Ascending',\n\t\t\t\t\t\t\t'DESC' => 'Decending',\n\n\t\t\t\t\t\t\t)\n\n\t\t\t\t\t);\n\n$url = ADMIN_DIR . 'assets/images/';\n$of_options[] = array( \"name\" => \"Recent Works Columns\",\n\t\t\t\t\t\"desc\" => \"Select if you'd like 3 or 4 per row by clicking one of the images.\",\n\t\t\t\t\t\"id\" => $prefix.\"works_cols\",\n\t\t\t\t\t\"std\" => '3',\n\t\t\t\t\t\"type\" => \"images\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t'3' => $url . '3-col-portfolio.png',\n\t\t\t\t\t\t'4' => $url . '4-col-portfolio.png')); \n\n\n$of_options[] = array( \t\"name\" \t\t=> \"Works Single Page Layout\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Select layout for recent works single page view\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"works_page_layout\",\n\t\t\t\t\t\t\"std\" \t\t=> \"2cr\",\n\t\t\t\t\t\t\"type\" \t\t=> \"images\",\n\t\t\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t\t\t'1c' \t=> $url . '1col.png',\n\t\t\t\t\t\t\t'2cr' \t=> $url . '2cr.png',\n\t\t\t\t\t\t\t'2cl' \t=> $url . '2cl.png'\n\t\t\t\t\t\t)\n\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Image Frame Background\",\n\t\t\t\t\t\"desc\" => \"Can choose a background color for image frame/box.\",\n\t\t\t\t\t\"id\" => $prefix.\"working_frame_bg\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n\n$of_options[] = array( \"name\" => \"Heading Font\",\n\t\t\t\t\t\"desc\" => \"Options for heading font.\",\n\t\t\t\t\t\"id\" => $prefix.\"works_heading\",\n\t\t\t\t\t\"std\" => array('size' => '12px','color' => ''),\n\t\t\t\t\t\"type\" => \"typography\");\n\n$of_options[] = array( \"name\" => \"Description Font\",\n\t\t\t\t\t\"desc\" => \"Options for description font.\",\n\t\t\t\t\t\"id\" => $prefix.\"works_desc\",\n\t\t\t\t\t\"std\" => array('size' => '12px','color' => ''),\n\t\t\t\t\t\"type\" => \"typography\"); \n\n/************************************************************************\n* Portfolio\n*************************************************************************/\n$of_options[] = array( \"name\" => \"Portfolio Options\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Excerpt Length\",\n\t\t\t\t\t\"desc\" => \"Custom Excerpt Length\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_excerpt_length\",\n\t\t\t\t\t\"std\" => \"55\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"class\" => \"mini\"); \n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Mouseover Icons\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Show page link icon?\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"hide_portfolio_link\",\n\t\t\t\t\t\t\"std\" \t\t=> 0,\n\t\t\t\t\t\t\"on\" \t\t=> \"Show\",\n\t\t\t\t\t\t\"off\" \t\t=> \"Hide\",\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Show photo popup icon?\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"hide_portfolio_photo_link\",\n\t\t\t\t\t\t\"std\" \t\t=> 0,\n\t\t\t\t\t\t\"on\" \t\t=> \"Show\",\n\t\t\t\t\t\t\"off\" \t\t=> \"Hide\",\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Masonry Layout\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Isotype masonry layout option\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"iso_portfolio_option\",\n\t\t\t\t\t\t\"std\" \t\t=> 1,\n\t\t\t\t\t\t\"on\" \t\t=> \"Enabled\",\n\t\t\t\t\t\t\"off\" \t\t=> \"Disabled\",\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n\n\n$of_options[] = array( \"name\" => \"Portfolio Display Order Options\",\n\t\t\t\t\t\"desc\" => \"Use the drop down to select orderby value\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_orderby\",\n\t\t\t\t\t\"std\" => \"ID\",\n\t\t\t\t\t\"type\" => \"select-custom\",\n\t\t\t\t\t\"options\" => \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => 'Title',\n\t\t\t\t\t\t\t'ID' => 'Default',\n\t\t\t\t\t\t\t'date' => 'Date',\n\t\t\t\t\t\t\t'rand' => 'Random',\n\n\t\t\t\t\t\t\t)\n\n\t\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"\",\n\t\t\t\t\t\"desc\" => \"Use the drop down to select to ascend order or descend.\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_order\",\n\t\t\t\t\t\"std\" => \"DESC\",\n\t\t\t\t\t\"type\" => \"select-custom\",\n\t\t\t\t\t\"options\" => \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'ASC' => 'Ascending',\n\t\t\t\t\t\t\t'DESC' => 'Decending',\n\n\t\t\t\t\t\t\t)\n\n\t\t\t\t\t);\n\n\n$url = ADMIN_DIR . 'assets/images/';\n$of_options[] = array( \"name\" => \"Portfolio Columns\",\n\t\t\t\t\t\"desc\" => \"Select if you'd like 3 or 4 per row by clicking one of the images.\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_cols\",\n\t\t\t\t\t\"std\" => '4',\n\t\t\t\t\t\"type\" => \"images\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t'3' => $url . '3-col-portfolio.png',\n\t\t\t\t\t\t'4' => $url . '4-col-portfolio.png')); \n\n$of_options[] = array( \t\"name\" \t\t=> \"Portfolio Single Page Layout\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Select layout for portfolio single page view\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"portfolio_page_layout\",\n\t\t\t\t\t\t\"std\" \t\t=> \"2cr\",\n\t\t\t\t\t\t\"type\" \t\t=> \"images\",\n\t\t\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t\t\t'1c' \t=> $url . '1col.png',\n\t\t\t\t\t\t\t'2cr' \t=> $url . '2cr.png',\n\t\t\t\t\t\t\t'2cl' \t=> $url . '2cl.png'\n\t\t\t\t\t\t)\n\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Image Frame Background\",\n\t\t\t\t\t\"desc\" => \"Can choose a background color for image frame/box.\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_frame_bg\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"Heading Font\",\n\t\t\t\t\t\"desc\" => \"Options for heading font.\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_heading\",\n\t\t\t\t\t\"std\" => array('size' => '12px','color' => ''),\n\t\t\t\t\t\"type\" => \"typography\");\n\n$of_options[] = array( \"name\" => \"Description Font\",\n\t\t\t\t\t\"desc\" => \"Options for description font.\",\n\t\t\t\t\t\"id\" => $prefix.\"portfolio_desc\",\n\t\t\t\t\t\"std\" => array('size' => '12px','color' => ''),\n\t\t\t\t\t\"type\" => \"typography\");\n\n/************************************************************************\n* Team\n*************************************************************************/\n$of_options[] = array( \"name\" => \"Team Options\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n// $url = ADMIN_DIR . 'assets/images/';\n\n$of_options[] = array( \"name\" => \"Team Member Columns\",\n\t\t\t\t\t\"desc\" => \"Select if you'd like 2,3 or 4 per row by clicking one of the images.\",\n\t\t\t\t\t\"id\" => $prefix.\"team_cols\",\n\t\t\t\t\t\"std\" => '4',\n\t\t\t\t\t\"type\" => \"images\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t'2' => $url . '2-col-portfolio.png',\n\t\t\t\t\t\t'3' => $url . '3-col-portfolio.png',\n\t\t\t\t\t\t'4' => $url . '4-col-portfolio.png')); \n\n$of_options[] = array( \"name\" => \"Image Frame Background\",\n\t\t\t\t\t\"desc\" => \"Can choose a background color for image frame/box.\",\n\t\t\t\t\t\"id\" => $prefix.\"team_frame_bg\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"Image Frame Background Hover\",\n\t\t\t\t\t\"desc\" => \"Can choose a background hover color for image frame/box.\",\n\t\t\t\t\t\"id\" => $prefix.\"team_hover_bg\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"Team Name Font\",\n\t\t\t\t\t\"desc\" => \"Font size and color for members name.\",\n\t\t\t\t\t\"id\" => $prefix.\"team_name\",\n\t\t\t\t\t\"std\" => array('size' => '12px','color' => ''),\n\t\t\t\t\t\"type\" => \"typography\");\n\n$of_options[] = array( \"name\" => \"Last Name Font Color\",\n\t\t\t\t\t\"desc\" => \"Font Color for members last name (optional).\",\n\t\t\t\t\t\"id\" => $prefix.\"team_name_last\",\n\t\t\t\t\t\"std\" =>\"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"Position Font\",\n\t\t\t\t\t\"desc\" => \"Font size and color for members position.\",\n\t\t\t\t\t\"id\" => $prefix.\"team_position\",\n\t\t\t\t\t\"std\" => array('size' => '12px','color' => ''),\n\t\t\t\t\t\"type\" => \"typography\");\n\n$of_options[] = array( \"name\" => \"Description Font\",\n\t\t\t\t\t\"desc\" => \"Font size for members info text\",\n\t\t\t\t\t\"id\" => $prefix.\"team_desc\",\n\t\t\t\t\t\"std\" => array('size' => '12px','color' => ''),\n\t\t\t\t\t\"type\" => \"typography\");\n/************************************************************************\n* Blog\n*************************************************************************/\n\n$of_options[] = array( \"name\" => \"Blog Options\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n$of_options[] = array( \t\"name\" \t\t=> \"Single Post Page Layout\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Select layout for single post page view\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"single_page_layout\",\n\t\t\t\t\t\t\"std\" \t\t=> \"2cr\",\n\t\t\t\t\t\t\"type\" \t\t=> \"images\",\n\t\t\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t\t\t'1c' \t=> $url . '1col.png',\n\t\t\t\t\t\t\t'2cr' \t=> $url . '2cr.png',\n\t\t\t\t\t\t\t'2cl' \t=> $url . '2cl.png'\n\t\t\t\t\t\t)\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Front Blog Layout\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Select layout for front page blog shortcode\",\n\t\t\t\t\t\t\"id\" \t\t=> $prefix.\"blog_page_layout\",\n\t\t\t\t\t\t\"std\" \t\t=> \"2cr\",\n\t\t\t\t\t\t\"type\" \t\t=> \"images\",\n\t\t\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t\t\t'1c' \t=> $url . '1col.png',\n\t\t\t\t\t\t\t'2cr' \t=> $url . '2cr.png',\n\t\t\t\t\t\t\t'2cl' \t=> $url . '2cl.png'\n\t\t\t\t\t\t)\n\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Image Frame Background\",\n\t\t\t\t\t\"desc\" => \"Can choose a background color for image frame/box.\",\n\t\t\t\t\t\"id\" => $prefix.\"blog_frame_bg\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"Blog Title Font\",\n\t\t\t\t\t\"desc\" => \"Size and color option for post titles.\",\n\t\t\t\t\t\"id\" => $prefix.\"blog_heading\",\n\t\t\t\t\t\"std\" => array('size' => '12px','color' => ''),\n\t\t\t\t\t\"type\" => \"typography\");\n\n$of_options[] = array( \"name\" => \"Description Font\",\n\t\t\t\t\t\"desc\" => \"Size and color option for general post text.\",\n\t\t\t\t\t\"id\" => $prefix.\"blog_desc\",\n\t\t\t\t\t\"std\" => array('size' => '12px','color' => ''),\n\t\t\t\t\t\"type\" => \"typography\");\n\n$of_options[] = array( \"name\" => \"Link Color\",\n\t\t\t\t\t\"desc\" => \"Link color within posts/blog section.\",\n\t\t\t\t\t\"id\" => $prefix.\"blog_link\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n$of_options[] = array( \"name\" => \"Link Hover Color\",\n\t\t\t\t\t\"desc\" => \"Link hover color within posts/blog section.\",\n\t\t\t\t\t\"id\" => $prefix.\"blog_hover_link\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$of_options[] = array( \"name\" => \"Widget Heading Font\",\n\t\t\t\t\t\"desc\" => \"Widget headings font size and color.\",\n\t\t\t\t\t\"id\" => $prefix.\"widget_heading\",\n\t\t\t\t\t\"std\" => array('size' => '12px','color' => ''),\n\t\t\t\t\t\"type\" => \"typography\"); \n\n$of_options[] = array( \"name\" => \"Widget Font\",\n\t\t\t\t\t\"desc\" => \"Font size and color for text within widgets.\",\n\t\t\t\t\t\"id\" => $prefix.\"widget_desc\",\n\t\t\t\t\t\"std\" => array('size' => '12px','color' => ''),\n\t\t\t\t\t\"type\" => \"typography\");\n\n$of_options[] = array( \"name\" => \"Meta Font\",\n\t\t\t\t\t\"desc\" => \"Font size and color for post meta.\",\n\t\t\t\t\t\"id\" => $prefix.\"meta_desc\",\n\t\t\t\t\t\"std\" => array('size' => '10px','color' => ''),\n\t\t\t\t\t\"type\" => \"typography\"); \n\n/************************************************************************\n* SOCIAL OPTIONS\n*************************************************************************/\n\n$of_options[] = array( \"name\" => \"Social\",\n\t\t\t\t\t\"type\" => \"heading\"\n\t\t\t\t\t);\n$of_options[] = array( \"name\" => \"Open Social In\",\n\t\t\t\t\t\"desc\" => \"You can select to open social links in a new window.\",\n\t\t\t\t\t\"id\" => $prefix.\"social_target\",\n\t\t\t\t\t\"std\" => \"_blank\",\n\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\"class\" => \"tiny\", //mini, tiny, small\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t\"_self\" => \"_self\",\n\t\t\t\t\t\t\"_blank\" => \"_blank\",\n\t\t\t\t\t)); \n\t\t\t\t\t\n$of_options[] = array( \"name\" => \"Twitter Link\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"social_twitter\",\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"type\" => \"text\"); \n$of_options[] = array( \"name\" => \"Facebook Link\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"social_facebook\",\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"type\" => \"text\"); \n$of_options[] = array( \"name\" => \"Google+ Link\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"social_google\",\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"type\" => \"text\"); \n$of_options[] = array( \"name\" => \"Flickr Link\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"social_flickr\",\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => \"LinkedIn Link\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"social_linkedin\",\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => \"Pinterest Link\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"social_pinterest\",\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"type\" => \"text\"); \n$of_options[] = array( \"name\" => \"Dribbble Link\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"social_dribbble\",\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"type\" => \"text\"); \n$of_options[] = array( \"name\" => \"DeviantArt Link\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"social_deviantart\",\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"type\" => \"text\");\n\n$of_options[] = array( \"name\" => \"Youtube Link\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => $prefix.\"social_youtube\",\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => \"Vimeo Link\",\n\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\"id\" => $prefix.\"social_vimeo\",\n\t\t\t\t\"std\" => '',\n\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => \"Instagram Link\",\n\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\"id\" => $prefix.\"social_instagram\",\n\t\t\t\t\"std\" => '',\n\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => \"Email Address\",\n\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\"id\" => $prefix.\"social_email\",\n\t\t\t\t\"std\" => '',\n\t\t\t\t\"type\" => \"text\");\n$of_options[] = array( \"name\" => \"SoundCloud Link\",\n\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\"id\" => $prefix.\"social_soundcloud\",\n\t\t\t\t\"std\" => '',\n\t\t\t\t\"type\" => \"text\"); \n$of_options[] = array( \"name\" => \"Behance Link\",\n\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\"id\" => $prefix.\"social_behance\",\n\t\t\t\t\"std\" => '',\n\t\t\t\t\"type\" => \"text\"); \n$of_options[] = array( \"name\" => \"Ustream Link\",\n\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\"id\" => $prefix.\"social_ustream\",\n\t\t\t\t\"std\" => '',\n\t\t\t\t\"type\" => \"text\"); \n$of_options[] = array( \"name\" => \"RSS Link\",\n\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\"id\" => $prefix.\"social_rss\",\n\t\t\t\t\"std\" => '',\n\t\t\t\t\"type\" => \"text\"); \n\n/************************************************************************\n* SideBars\n*************************************************************************/\n\n\n$of_options[] = array( \"name\" => \"Sidebars\",\n\t\t\t\t\t\"type\" => \"heading\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => \"Create Unlimted Sidebars\",\n \"id\" => $prefix.\"side_bars\",\n \"desc\" => \"\",\n \"std\" => \"\",\n \"type\" => \"side-bars\",\n\t\t\t\t\t\"options\" => $nzs_side_bars); \n\n/************************************************************************\n* BACKUP OPTIONS\n*************************************************************************/\n\n\n$of_options[] = array( \"name\" => \"Backup Options\",\n\t\t\t\t\t\"type\" => \"heading\");\n\t\t\t\t\t\n$of_options[] = array( \"name\" => \"Backup and Restore Options\",\n \"id\" => \"of_backup\",\n \"std\" => \"\",\n \"type\" => \"backup\",\n\t\t\t\t\t\"desc\" => 'You can use the two buttons below to backup your current options, and then restore it back at a later time. This is useful if you want to experiment on the options but would like to keep the old settings in case you need it back.',\n\t\t\t\t\t);\n\t\t\t\t\t\n$of_options[] = array( \"name\" => \"Transfer Theme Options Data\",\n \"id\" => \"of_transfer\",\n \"std\" => \"\",\n \"type\" => \"transfer\",\n\t\t\t\t\t\"desc\" => 'You can tranfer the saved options data between different installs by copying the text inside the text box. To import data from another install, replace the data in the text box with the one from another install and click \"Import Options\".\n\t\t\t\t\t\t',\n\t\t\t\t\t);\n\t\t\t\t\n\t}", "protected function getOptions()\n\t{\n\t\t$this->options['USE_ACCOUNT_NUMBER'] = (Config\\Option::get(\"sale\", \"account_number_template\", \"\") !== \"\") ? true : false;\n\t}", "function option_definition() {\n //$options = parent::option_definition();\n $options = array();\n return $options;\n }", "function print_options(){\n\t\tforeach ($this->options as $value) {\n\t\t\t$this->print_option($value);\n\t\t}\n\t}", "public function run()\n {\n// Options are settings\n\n if ($this->command) $this->command->info('Creating Option Settings');\n\n\n $options_array = array(\n [\n 'key' => 'Landing Title',\n 'default' => \"What is trending in Kenya.\",\n 'value_type' =>Option::TYPE_STR\n ],\n [\n 'key' => 'Landing Description',\n 'default' => \"Getting all the news that are trending in Kenya.\",\n 'value_type' =>Option::TYPE_STR\n ],\n\n [\n 'key' => 'Contact Title',\n 'default' => \"Talk to us.\",\n 'value_type' =>Option::TYPE_STR\n ],\n [\n 'key' => 'Contact Description',\n 'default' => \"Find our contact information and contact form.\",\n 'value_type' =>Option::TYPE_STR\n ],\n\n [\n 'key' => 'Footer Title',\n 'default' => \"Welcome to Inatrend Kenya\",\n 'value_type' =>Option::TYPE_STR\n ],\n\n [\n 'key' => 'Footer Description',\n 'default' => \"\n <p>\n <small>We are here to get you the latest that is trending in Kenya.</small>\n </p>\n <div class=\\\"social-list\\\">\n <a class=\\\"social-list-item\\\" href=\\\"http://twitter.com\\\">\n <span class=\\\"icon icon-twitter\\\"></span>\n </a>\n <a class=\\\"social-list-item\\\" href=\\\"http://facebook.com\\\">\n <span class=\\\"icon icon-facebook\\\"></span>\n </a>\n <a class=\\\"social-list-item\\\" href=\\\"http://linkedin.com\\\">\n <span class=\\\"icon icon-linkedin\\\"></span>\n </a>\n </div>\n \",\n 'value_type' =>Option::TYPE_LON\n ],\n\n [\n 'key' => 'Latest Post Count',\n 'default' => 4,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Trending Post Count',\n 'default' => 4,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Trending Days Limit',\n 'default' => 30,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Limit Latest Post Per Category',\n 'default' => 6,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Primary Color',\n 'default' => '#56c8f3',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Primary Text Color',\n 'default' => '#111111',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Secondary Color',\n 'default' => '#0D325B',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Secondary Text Color',\n 'default' => '#EEEEEE',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Primary Button Color',\n 'default' => '#029ACF',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Secondary Button Color',\n 'default' => '#0D325B',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Danger Button Color',\n 'default' => '#ff0000',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Maximum Rating',\n 'default' => 10,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Default Font Size',\n 'default' => 16,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n );\n\n foreach ($options_array as $option) {\n Option::create([\n 'key' => $option['key'],\n 'default' => $option['default'],\n 'value_type' =>$option['value_type']\n ]);\n }\n }", "function of_options()\n\t{\n\t\t$of_categories \t\t= array(); \n\t\t$of_categories_obj \t= get_categories('hide_empty=0');\n\t\tforeach ($of_categories_obj as $of_cat) {\n\t\t $of_categories[$of_cat->cat_ID] = $of_cat->cat_name;}\n\t\t$categories_tmp \t= array_unshift($of_categories, \"Select a category:\"); \n\t \n\t\t//Access the WordPress Pages via an Array\n\t\t$of_pages \t\t\t= array();\n\t\t$of_pages_obj \t\t= get_pages('sort_column=post_parent,menu_order'); \n\t\tforeach ($of_pages_obj as $of_page) {\n\t\t $of_pages[$of_page->ID] = $of_page->post_name; }\n\t\t$of_pages_tmp \t\t= array_unshift($of_pages, \"Select a page:\"); \n\t\n\t\t//Testing\n\t\tfunction my_list_cats() {\n\t\t\t\t\t\t\t\t $cats = get_categories();\n\t\t\t\t\t\t\t\t foreach($cats as $cat) {\n\t\t\t\t\t\t\t\t\t $catsArray[] = __('' . $cat->cat_name . '','hs_textdomain') . \"\";\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t return $catsArray;\n\t\t\t\t\t\t\t\t}\n\t\t$of_options_select \t= array(\"one\",\"two\",\"three\",\"four\",\"five\"); \n\t\t$of_options_select_list \t= array(5,10,15);\n\t\t$of_options_radio \t= array(\"one\" => \"One\",\"two\" => \"Two\",\"three\" => \"Three\",\"four\" => \"Four\",\"five\" => \"Five\");\n\t\t\n\t\t//Sample Homepage blocks for the layout manager (sorter)\n\t\t$of_options_homepage_blocks = array\n\t\t( \n\t\t\t\"disabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_one\"\t\t=> \"Block One\",\n\t\t\t\t\"block_two\"\t\t=> \"Block Two\",\n\t\t\t\t\"block_three\"\t=> \"Block Three\",\n\t\t\t), \n\t\t\t\"enabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_four\"\t=> \"Block Four\",\n\t\t\t),\n\t\t);\n\n\n\t\t//Stylesheets Reader\n\t\t$alt_stylesheet_path = LAYOUT_PATH;\n\t\t$alt_stylesheets = array();\n\t\t\n\t\tif ( is_dir($alt_stylesheet_path) ) \n\t\t{\n\t\t if ($alt_stylesheet_dir = opendir($alt_stylesheet_path) ) \n\t\t { \n\t\t while ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false ) \n\t\t {\n\t\t if(stristr($alt_stylesheet_file, \".css\") !== false)\n\t\t {\n\t\t $alt_stylesheets[] = $alt_stylesheet_file;\n\t\t }\n\t\t } \n\t\t }\n\t\t}\n\n\n\t\t//Background Images Reader\n\t\t$bg_images_path = get_stylesheet_directory(). '/images/bg/'; // change this to where you store your bg images\n\t\t$bg_images_url = get_template_directory_uri().'/images/bg/'; // change this to where you store your bg images\n\t\t$bg_images = array();\n\t\t\n\t\tif ( is_dir($bg_images_path) ) {\n\t\t if ($bg_images_dir = opendir($bg_images_path) ) { \n\t\t while ( ($bg_images_file = readdir($bg_images_dir)) !== false ) {\n\t\t if(stristr($bg_images_file, \".png\") !== false || stristr($bg_images_file, \".jpg\") !== false) {\n\t\t \tnatsort($bg_images); //Sorts the array into a natural order\n\t\t $bg_images[] = $bg_images_url . $bg_images_file;\n\t\t }\n\t\t } \n\t\t }\n\t\t}\n\t\t\n\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t/* TO DO: Add options/functions that use these */\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t\n\t\t//More Options\n\t\t$uploads_arr \t\t= wp_upload_dir();\n\t\t$all_uploads_path \t= $uploads_arr['path'];\n\t\t$all_uploads \t\t= get_option('of_uploads');\n\t\t$other_entries \t\t= array(\"Select a number:\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\");\n\t\t$body_repeat \t\t= array(\"no-repeat\",\"repeat-x\",\"repeat-y\",\"repeat\");\n\t\t$body_pos \t\t\t= array(\"top left\",\"top center\",\"top right\",\"center left\",\"center center\",\"center right\",\"bottom left\",\"bottom center\",\"bottom right\");\n\t\t\n\t\t// Image Alignment radio box\n\t\t$of_options_thumb_align = array(\"alignleft\" => \"Left\",\"alignright\" => \"Right\",\"aligncenter\" => \"Center\"); \n\t\t\n\t\t// Image Links to Options\n\t\t$of_options_image_link_to = array(\"image\" => \"The Image\",\"post\" => \"The Post\"); \n\n\n/*-----------------------------------------------------------------------------------*/\n/* The Options Array */\n/*-----------------------------------------------------------------------------------*/\n\n// Set the Options Array\nglobal $of_options;\n$of_options = array();\n\n$of_options[] = array( \t\"name\" \t\t=> \"Home Settings\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Upload your website logo\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Choose logo (size must be 300px * 80px)\",\n\t\t\t\t\t\t\"id\" \t\t=> \"site_logo\",\n\t\t\t\t\t\t// Use the shortcodes [site_url] or [site_url_secure] for setting default URLs\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"mod\"\t\t=> \"min\",\n\t\t\t\t\t\t\"type\" \t\t=> \"media\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Upload your website favicon logo\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Choose logo (size must be 16px * 16px)\",\n\t\t\t\t\t\t\"id\" \t\t=> \"site_favicon\",\n\t\t\t\t\t\t// Use the shortcodes [site_url] or [site_url_secure] for setting default URLs\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"mod\"\t\t=> \"min\",\n\t\t\t\t\t\t\"type\" \t\t=> \"media\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Upload your website banner\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Choose banner\",\n\t\t\t\t\t\t\"id\" \t\t=> \"site_bnr\",\n\t\t\t\t\t\t// Use the shortcodes [site_url] or [site_url_secure] for setting default URLs\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"mod\"\t\t=> \"min\",\n\t\t\t\t\t\t\"type\" \t\t=> \"media\"\n\t\t\t\t);\n\t\t\t\t\n// Advertisement settings\n$of_options[] = array(\"name\"=> \"Ads manager\", \"type\"=> \"heading\", \"icon\"=> ADMIN_IMAGES . \"icon-slider.png\");\n\n$of_options[] = array(\t\"name\" => \"Advertise place: 1\",\n\t\t\t\t\t\t\"desc\" => \"Paste your ads code here\",\n\t\t\t\t\t\t\"id\" => \"ads_1\",\n\t\t\t\t\t\t\"std\" => \"Place your ads here\",\n\t\t\t\t\t\t\"type\" => \"textarea\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array(\t\"name\" => \"Advertise place: 2\",\n\t\t\t\t\t\t\"desc\" => \"Paste your ads code here\",\n\t\t\t\t\t\t\"id\" => \"ads_2\",\n\t\t\t\t\t\t\"std\" => \"Place your ads here\",\n\t\t\t\t\t\t\"type\" => \"textarea\"\n\t\t\t\t);\n\n$of_options[] = array(\t\"name\" => \"Advertise place: 3\",\n\t\t\t\t\t\t\"desc\" => \"Paste your ads code here\",\n\t\t\t\t\t\t\"id\" => \"ads_3\",\n\t\t\t\t\t\t\"std\" => \"Place your ads here\",\n\t\t\t\t\t\t\"type\" => \"textarea\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array(\t\"name\" => \"Advertise place: 4\",\n\t\t\t\t\t\t\"desc\" => \"Paste your ads code here\",\n\t\t\t\t\t\t\"id\" => \"ads_4\",\n\t\t\t\t\t\t\"std\" => \"Place your ads here\",\n\t\t\t\t\t\t\"type\" => \"textarea\"\n\t\t\t\t);\n\n// sharing option\n$of_options[] = array(\"name\"=> \"sharing options\", \"type\"=> \"heading\", \"icon\"=> ADMIN_IMAGES . \"icon-slider.png\");\n\t\t\t\t\n$of_options[] = array(\t\"name\" => \"Change share this text\",\n\t\t\t\t\t\t\"desc\" => \"Translate share this text\",\n\t\t\t\t\t\t\"id\" => \"share_area\",\n\t\t\t\t\t\t\"std\" => \"Share this\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t);\n\t\t\t\t\n// Translation options\n$of_options[] = array(\"name\"=> \"Translation option\", \"type\"=> \"heading\", \"icon\"=> ADMIN_IMAGES . \"icon-slider.png\");\n\n\n$of_options[] = array(\t\"name\" => \"notice\",\n\t\t\t\t\t\t\"desc\" => \"Your desired information\",\n\t\t\t\t\t\t\"id\" => \"notice\",\n\t\t\t\t\t\t\"std\" => \"notice here\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array(\t\"name\" => \"Scroller news\",\n\t\t\t\t\t\t\"desc\" => \"Your desired information\",\n\t\t\t\t\t\t\"id\" => \"notice_here\",\n\t\t\t\t\t\t\"std\" => \"Display full notice which scroll\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array(\t\"name\" => \"Read more\",\n\t\t\t\t\t\t\"desc\" => \"Your desired information\",\n\t\t\t\t\t\t\"id\" => \"r_more\",\n\t\t\t\t\t\t\"std\" => \"Read more\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t);\n\n$of_options[] = array(\t\"name\" => \"by\",\n\t\t\t\t\t\t\"desc\" => \"Your desired information\",\n\t\t\t\t\t\t\"id\" => \"b_y\",\n\t\t\t\t\t\t\"std\" => \"writen by\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t);\n\n$of_options[] = array(\t\"name\" => \"date\",\n\t\t\t\t\t\t\"desc\" => \"Your desired information\",\n\t\t\t\t\t\t\"id\" => \"date_here\",\n\t\t\t\t\t\t\"std\" => \"date\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array(\t\"name\" => \"Category\",\n\t\t\t\t\t\t\"desc\" => \"Your desired information\",\n\t\t\t\t\t\t\"id\" => \"cat_name\",\n\t\t\t\t\t\t\"std\" => \"date\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array(\t\"name\" => \"Author home\",\n\t\t\t\t\t\t\"desc\" => \"Your desired information\",\n\t\t\t\t\t\t\"id\" => \"auth_home\",\n\t\t\t\t\t\t\"std\" => \"Author home\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array(\t\"name\" => \"Full name\",\n\t\t\t\t\t\t\"desc\" => \"Your desired information\",\n\t\t\t\t\t\t\"id\" => \"auth_name\",\n\t\t\t\t\t\t\"std\" => \"Full name\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array(\t\"name\" => \"Registration\",\n\t\t\t\t\t\t\"desc\" => \"Your desired information\",\n\t\t\t\t\t\t\"id\" => \"auth_reg\",\n\t\t\t\t\t\t\"std\" => \"Registration\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array(\t\"name\" => \"Short Bio\",\n\t\t\t\t\t\t\"desc\" => \"Your desired information\",\n\t\t\t\t\t\t\"id\" => \"auth_bio\",\n\t\t\t\t\t\t\"std\" => \"Short Bio\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array(\t\"name\" => \"Total post\",\n\t\t\t\t\t\t\"desc\" => \"Your desired information\",\n\t\t\t\t\t\t\"id\" => \"tot_post\",\n\t\t\t\t\t\t\"std\" => \"Total post\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array(\t\"name\" => \"Total comment\",\n\t\t\t\t\t\t\"desc\" => \"Your desired information\",\n\t\t\t\t\t\t\"id\" => \"tot_com\",\n\t\t\t\t\t\t\"std\" => \"Total comment\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t);\n\t\t\t\t\n// Footer options\n$of_options[] = array(\"name\"=> \"Footer options\", \"type\"=> \"heading\", \"icon\"=> ADMIN_IMAGES . \"icon-slider.png\");\n\n$of_options[] = array(\t\"name\" => \"Footer text\",\n\t\t\t\t\t\t\"desc\" => \"Your sitename/ copyright information\",\n\t\t\t\t\t\t\"id\" => \"copyright\",\n\t\t\t\t\t\t\"std\" => \"Copyright info here\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t);\n\n// Backup Options\n$of_options[] = array( \t\"name\" \t\t=> \"Backup Options\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\",\n\t\t\t\t\t\t\"icon\"\t\t=> ADMIN_IMAGES . \"icon-slider.png\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Backup and Restore Options\",\n\t\t\t\t\t\t\"id\" \t\t=> \"of_backup\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"backup\",\n\t\t\t\t\t\t\"desc\" \t\t=> 'You can use the two buttons below to backup your current options, and then restore it back at a later time. This is useful if you want to experiment on the options but would like to keep the old settings in case you need it back.',\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Transfer Theme Options Data\",\n\t\t\t\t\t\t\"id\" \t\t=> \"of_transfer\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"transfer\",\n\t\t\t\t\t\t\"desc\" \t\t=> 'You can tranfer the saved options data between different installs by copying the text inside the text box. To import data from another install, replace the data in the text box with the one from another install and click \"Import Options\".',\n\t\t\t\t);\n\t\t\t\t\n\t}", "public static function set_options() {\r\n\t\tself::add_option(\"my_option\", \"foo\");\r\n\t}", "public function hookConfig()\n {\n set_option('collection_tree_alpha_order', $_POST['collection_tree_alpha_order']);\n }", "function tfuse_page_options($option_name = null, $default = null, $post_id = null) {\r\n global $post, $tfuse_options;\r\n $max_cache_size = 100;\r\n \r\n if (!isset($post_id) && isset($post))\r\n $post_id = $post->ID;\r\n if (!isset($post_id))\r\n return;\r\n \r\n if (!isset($tfuse_options['post'][$post_id])) {\r\n if (!empty($tfuse_options['post']) && count($tfuse_options['post']) > $max_cache_size) // if cache limit exceeded, remove first element from cache\r\n array_shift($tfuse_options['post']);\r\n \r\n $tfuse_options['post'][$post_id] = decode_tfuse_options(get_post_meta($post_id, TF_THEME_PREFIX .'_tfuse_post_options', true), true);\r\n }\r\n \r\n if ($option_name === null) {\r\n return $tfuse_options['post'][$post_id];\r\n } else {\r\n // optiunile sunt slavate cu PREFIX in fata, dar extragem scrim fara PREFIX\r\n // pentru a obtine PREFIX_logo vom folosi tfuse_page_options('logo')\r\n $option_name = TF_THEME_PREFIX . '_' . $option_name;\r\n \r\n if (isset($tfuse_options['post'][$post_id][$option_name]))\r\n $value = $tfuse_options['post'][$post_id][$option_name];\r\n }\r\n \r\n if (isset($value) && $value !== '')\r\n return $value;\r\n else\r\n return $default;\r\n }", "function eventspractice_options() {\n\n $options = array (\n 'Option 1' => 'A',\n 'Option 2' => 'B',\n 'Option 3' => 'C'\n );\n\n if ( !get_option( 'eventspractice_options' ) ){\n add_option( 'eventspractice_option', $options );\n }\n update_option( 'eventspractice_option', $options );\n\n\n // add_option( 'eventspractice_option', 'My NEW Plugin Options' );\n // update_option( 'eventspractice_option', 'This is a test with the Options API' );\n // delete_option( 'eventspractice_option' );\n\n}", "function it_option($option){\n\techo get_it_option($option);\n}", "function get_data_request_options()\r\n{\r\n\t//kijk wat het abstractie niveau is van de huidige opties\r\n\t$current_abstraction_level_query = 'select option_type from Requestable_data where option_name == \":current_selected_option\"';\r\n\t$current_abstraction_level = execute_sql_extract_data($current_abstraction_level_query);\r\n\t\r\n\t//haal de opties maar op uit de DB\r\n\t$requestable_data_descriptions = 'select option_name from Requestable_data where option_type = ' . $current_abstraction_level;\r\n\texecute_sql_extract_data($requestable_data_descriptions);\r\n}", "function of_options()\n\t{\n\t\t$of_categories \t\t= array(); \n\t\t$of_categories_obj \t= get_categories('hide_empty=0');\n\t\tforeach ($of_categories_obj as $of_cat) {\n\t\t $of_categories[$of_cat->cat_ID] = $of_cat->cat_name;}\n\t\t$categories_tmp \t= array_unshift($of_categories, \"Select a category:\"); \n\t \n\t\t//Access the WordPress Pages via an Array\n\t\t$of_pages \t\t\t= array();\n\t\t$of_pages_obj \t\t= get_pages('sort_column=post_parent,menu_order'); \n\t\tforeach ($of_pages_obj as $of_page) {\n\t\t $of_pages[$of_page->ID] = $of_page->post_title; }\n\t\t$of_pages_tmp \t\t= array_unshift($of_pages, \"Select a page:\"); \n\t\n\t\t//Testing \n\t\t$of_options_select \t= array(\"one\",\"two\",\"three\",\"four\",\"five\"); \n\t\t$of_options_radio \t= array(\"one\" => \"One\",\"two\" => \"Two\",\"three\" => \"Three\",\"four\" => \"Four\",\"five\" => \"Five\");\n\t\t\n\t\t//Sample Homepage blocks for the layout manager (sorter)\n\t\t$of_options_homepage_blocks = array\n\t\t( \n\t\t\t\"disabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_one\"\t\t=> \"Block One\",\n\t\t\t\t\"block_two\"\t\t=> \"Block Two\",\n\t\t\t\t\"block_three\"\t=> \"Block Three\",\n\t\t\t), \n\t\t\t\"enabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_four\"\t=> \"Block Four\",\n\t\t\t),\n\t\t);\n\n\n\t\t//Stylesheets Reader\n\t\t$alt_stylesheet_path = LAYOUT_PATH;\n\t\t$alt_stylesheets = array();\n\t\t\n\t\tif ( is_dir($alt_stylesheet_path) ) \n\t\t{\n\t\t if ($alt_stylesheet_dir = opendir($alt_stylesheet_path) ) \n\t\t { \n\t\t while ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false ) \n\t\t {\n\t\t if(stristr($alt_stylesheet_file, \".css\") !== false)\n\t\t {\n\t\t $alt_stylesheets[] = $alt_stylesheet_file;\n\t\t }\n\t\t } \n\t\t }\n\t\t}\n\n\n\t\t//Background Images Reader\n\t\t$bg_images_path = get_stylesheet_directory(). '/images/bg/'; // change this to where you store your bg images\n\t\t$bg_images_url = get_template_directory_uri().'/images/bg/'; // change this to where you store your bg images\n\t\t$bg_images = array();\n\t\t\n\t\tif ( is_dir($bg_images_path) ) {\n\t\t if ($bg_images_dir = opendir($bg_images_path) ) { \n\t\t while ( ($bg_images_file = readdir($bg_images_dir)) !== false ) {\n\t\t if(stristr($bg_images_file, \".png\") !== false || stristr($bg_images_file, \".jpg\") !== false) {\n\t\t $bg_images[] = $bg_images_url . $bg_images_file;\n\t\t }\n\t\t } \n\t\t }\n\t\t}\n\t\t\n\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t/* TO DO: Add options/functions that use these */\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t\n\t\t//More Options\n\t\t$uploads_arr \t\t= wp_upload_dir();\n\t\t$all_uploads_path \t= $uploads_arr['path'];\n\t\t$all_uploads \t\t= get_option('of_uploads');\n\t\t$other_entries \t\t= array(\"Select a number:\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\");\n\t\t$body_repeat \t\t= array(\"no-repeat\",\"repeat-x\",\"repeat-y\",\"repeat\");\n\t\t$body_pos \t\t\t= array(\"top left\",\"top center\",\"top right\",\"center left\",\"center center\",\"center right\",\"bottom left\",\"bottom center\",\"bottom right\");\n\t\t\n\t\t// Image Alignment radio box\n\t\t$of_options_thumb_align = array(\"alignleft\" => \"Left\",\"alignright\" => \"Right\",\"aligncenter\" => \"Center\"); \n\t\t\n\t\t// Image Links to Options\n\t\t$of_options_image_link_to = array(\"image\" => \"The Image\",\"post\" => \"The Post\"); \n\n\n/*-----------------------------------------------------------------------------------*/\n/* The Options Array */\n/*-----------------------------------------------------------------------------------*/\n\n// Set the Options Array\nglobal $of_options;\n$of_options = array();\n\n//General Setting\n$of_options[] = array( \t\"name\" \t\t=> \"General Settings\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\n\t\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Enable Prettyphoto\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Check to disable PrettyPhoto on this theme.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"is_prettyphoto\",\n\t\t\t\t\t\t\"std\" \t\t=> 0,\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\t\t\t\t \t\t\t\t\t\t\t\t\n\n$of_options[] = array( \t\"name\" \t\t=> \"Main Custom Logo\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload a Png/Gif image that will represent your website's logo.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"theme_logo\",\n\t\t\t\t\t\t\"std\" \t\t=> SP_ASSETS_THEME . \"images/logo.png\",\n\t\t\t\t\t\t\"type\" \t\t=> \"upload\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Custom Favicon\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload a 16px x 16px Png/Gif image that will represent your website's favicon.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"theme_favico\",\n\t\t\t\t\t\t\"std\" \t\t=> SP_BASE_URL . \"favicon.ico\",\n\t\t\t\t\t\t\"type\" \t\t=> \"upload\"\n\t\t\t\t); \t\t\t\t\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Footer Text\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"You can use the following shortcodes in your footer text: [wp-link] [theme-link] [loginout-link] [blog-title] [blog-link] [the-year]\",\n\t\t\t\t\t\t\"id\" \t\t=> \"footer_text\",\n\t\t\t\t\t\t\"std\" \t\t=> \"GEOLINK DISTRIBUTION. Owned by GEOLINK GROUP. © 2013 All Right Reserved.\",\n\t\t\t\t\t\t\"type\" \t\t=> \"textarea\"\n\t\t\t\t);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n//Homepage\n$of_options[] = array( \t\"name\" \t\t=> \"Home Settings\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Cover Homepage\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload a Png/Gif/JPG image that will show under menu of homepage. Good size is 960px by 390px\",\n\t\t\t\t\t\t\"id\" \t\t=> \"home_cover\",\n\t\t\t\t\t\t\"std\" \t\t=> SP_ASSETS_THEME . \"images/cover-homepage.jpg\",\n\t\t\t\t\t\t\"type\" \t\t=> \"upload\"\n\t\t\t\t);\t\t\t\t\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> 'Select Homepage Content',\n\t\t\t\t\t\t\"desc\" \t\t=> \"Select page that talk about welcome message to show on homepage\",\n\t\t\t\t\t\t\"id\" \t\t=> \"home_select\",\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\t\t\"options\" \t=> $of_pages\n\t\t\t\t);\t\t\t\t\n\t\t\t\t\n/*\n$of_options[] = array( \t\"name\" \t\t=> 'Title for Owned by',\n\t\t\t\t\t\t\"desc\" \t\t=> \"Write title message to show above logo bellow\",\n\t\t\t\t\t\t\"id\" \t\t=> \"owned_by_title\",\n\t\t\t\t\t\t\"std\"\t\t=> \"<h5>Geolink Distribution</h5> <small>is owned by Geolink Group</small>\",\n\t\t\t\t\t\t\"type\" \t\t=> \"textarea\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Geolink group Logo\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload a Png/Gif image that will represent with title above and show them all on homepage.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"goelink_group_logo\",\n\t\t\t\t\t\t\"std\" \t\t=> SP_ASSETS_THEME . \"images/geolink-group-logo.png\",\n\t\t\t\t\t\t\"type\" \t\t=> \"upload\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \"name\" => \"Geolink Group Link\",\n\t\t\t\t\t\t\"desc\" => \"e.g: http://www.geolinkgroup.com/\",\n\t\t\t\t\t\t\"id\" => \"geolink_group_link\",\n\t\t\t\t\t\t\"std\" => \"http://www.geolinkgroup.com/\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t\t);\t\n*/\n\t\t\t\t\t\t\n$of_options[] = array( \"name\" => \"Section Client Title\",\n\t\t\t\t\t\t\"desc\" => \"e.g: Some our past and current clients\",\n\t\t\t\t\t\t\"id\" => \"client_title\",\n\t\t\t\t\t\t\"std\" => \"Some our past and current clients\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t\t);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> 'Select Services Page',\n\t\t\t\t\t\t\"desc\" \t\t=> \"Select page that present about services to show on homepage\",\n\t\t\t\t\t\t\"id\" \t\t=> \"service_select\",\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\t\t\"options\" \t=> $of_pages\n\t\t\t\t);\n\n//Social Networking\n$of_options[] = array( \t\"name\" \t\t=> \"Products\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\n\t\t\t\t\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> 'Select Product Page',\n\t\t\t\t\t\t\"desc\" \t\t=> \"Select page products\",\n\t\t\t\t\t\t\"id\" \t\t=> \"product_select\",\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\t\t\"options\" \t=> $of_pages\n\t\t\t\t);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n//Social Networking\n$of_options[] = array( \t\"name\" \t\t=> \"Social Networking\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\n\n$of_options[] = array( \t\"name\" \t\t=> \"Mini social networking on top\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Show/Hide mini social networking on top bar\",\n\t\t\t\t\t\t\"id\" \t\t=> \"topbar_social\",\n\t\t\t\t\t\t\"std\" \t\t=> 1,\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\t\t\t\t\n\n$of_options[] = array( \"name\" => 'Custom Feed URL',\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => \"introduction\",\n\t\t\t\t\t\"std\" => \"<h3>Custom Feed URL</h3>\",\n\t\t\t\t\t\"icon\" => true,\n\t\t\t\t\t\"type\" => \"info\",\n\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\n\t$of_options[] = array( \"name\" => \"Hide Rss Icon\",\n\t\t\t\t\t\t\"desc\" => \"Hide rss icon in social widget\",\n\t\t\t\t\t\t\"id\" => \"rss_icon\",\n\t\t\t\t\t\t\"std\" => 0,\n\t\t\t\t\t\t\"type\" => \"switch\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t$of_options[] = array( \"name\" => \"Custom Feed URL\",\n\t\t\t\t\t\t\"desc\" => \"e.g: http://www.feedburner.com/userid\",\n\t\t\t\t\t\t\"id\" => \"rss_url\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t\t);\t\n\t\t\t\t\t\t\n$of_options[] = array( \"name\" => 'Social Networking',\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => \"introduction\",\n\t\t\t\t\t\"std\" => \"<h3>Social Networking</h3>\",\n\t\t\t\t\t\"icon\" => true,\n\t\t\t\t\t\"type\" => \"info\",\n\t\t\t\t\t);\n\n\t$of_options[] = array( \"name\" => \"Facebook URL\",\n\t\t\t\t\t\t\"id\" => \"social_facebook\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t\t);\t\n\t\n\t$of_options[] = array( \"name\" => \"Twitter URL\",\n\t\t\t\t\t\t\"id\" => \"social_twitter\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t$of_options[] = array( \"name\" => \"Google+ URL\",\n\t\t\t\t\t\t\"id\" => \"social_google_plus\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\n\t$of_options[] = array( \"name\" => \"LinkedIn URL\",\n\t\t\t\t\t\t\"id\" => \"social_linkedin\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\n\t$of_options[] = array( \"name\" => \"YouTube URL\",\n\t\t\t\t\t\t\"id\" => \"social_youtube\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\n\t$of_options[] = array( \"name\" => \"Vimeo URL\",\n\t\t\t\t\t\t\"id\" => \"social_vimeo\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\n\t$of_options[] = array( \"name\" => \"Skype URL\",\n\t\t\t\t\t\t\"id\" => \"social_skype\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\n\t$of_options[] = array( \"name\" => \"Delicious URL\",\n\t\t\t\t\t\t\"id\" => \"social_delicious\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\n\t$of_options[] = array( \"name\" => \"Instagram URL\",\n\t\t\t\t\t\t\"id\" => \"social_instagram\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t\t);\t\n\t\t\t\t\t\t\n\t$of_options[] = array( \"name\" => \"Pinterest URL\",\n\t\t\t\t\t\t\"id\" => \"social_pinterest\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t\t);\t\t\n\n// Contact\n$of_options[] = array( \"name\" => \"Contact\",\n\t\t\t\t\t\"type\" => \"heading\");\n\n$of_options[] = array( \t\"name\" \t\t=> \"Contact cover\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload a Png/Gif/JPG image that will show on the top of content of contact page. Good size is 960px by 200px\",\n\t\t\t\t\t\t\"id\" \t\t=> \"contact_cover\",\n\t\t\t\t\t\t\"std\" \t\t=> SP_ASSETS_THEME . \"images/cover-contact.jpg\",\n\t\t\t\t\t\t\"type\" \t\t=> \"upload\"\n\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\n$of_options[] = array( \"name\" => \"Latitude\",\n\t\t\t\t\t\"desc\" => \"Latitude of google map see <a href='http://itouchmap.com'>itouchmap.com</a>\",\n\t\t\t\t\t\"id\" => \"map_lat\",\n\t\t\t\t\t\"std\" => \"11.569589\",\n\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t);\n\n$of_options[] = array( \"name\" => \"Longitude\",\n\t\t\t\t\t\"desc\" => \"Longitude of google map see <a href='http://itouchmap.com'>itouchmap.com</a>\",\n\t\t\t\t\t\"id\" => \"map_long\",\n\t\t\t\t\t\"std\" => \"104.924315\",\n\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t);\n\t\t\t\t\t\n$of_options[] = array( \"name\" => \"Email\",\n\t\t\t\t\t\"desc\" => \"\",\n\t\t\t\t\t\"id\" => \"email\",\n\t\t\t\t\t\"std\" => \"[email protected]\",\n\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t);\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n//Footer\n$of_options[] = array( \t\"name\" \t\t=> \"Footer Layout\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\t\n\t\t\t\t\n$url = ADMIN_DIR . 'assets/images/';\n$of_options[] = array( \t\"name\" \t\t=> \"Footer Columns\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Select footer columns to place widgets.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"footer_layout\",\n\t\t\t\t\t\t\"std\" \t\t=> \"col-3\",\n\t\t\t\t\t\t\"type\" \t\t=> \"images\",\n\t\t\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t\t\t'col-3' \t=> $url . '3c-footer.png',\n\t\t\t\t\t\t\t'col-4' \t=> $url . '4c-footer.png'\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n// Backup Options\n$of_options[] = array( \t\"name\" \t\t=> \"Backup Options\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\",\n\t\t\t\t\t\t\"icon\"\t\t=> ADMIN_IMAGES . \"icon-slider.png\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Backup and Restore Options\",\n\t\t\t\t\t\t\"id\" \t\t=> \"of_backup\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"backup\",\n\t\t\t\t\t\t\"desc\" \t\t=> 'You can use the two buttons below to backup your current options, and then restore it back at a later time. This is useful if you want to experiment on the options but would like to keep the old settings in case you need it back.',\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Transfer Theme Options Data\",\n\t\t\t\t\t\t\"id\" \t\t=> \"of_transfer\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"transfer\",\n\t\t\t\t\t\t\"desc\" \t\t=> 'You can tranfer the saved options data between different installs by copying the text inside the text box. To import data from another install, replace the data in the text box with the one from another install and click \"Import Options\".',\n\t\t\t\t);\n\t\t\t\t\n\t}", "protected static abstract function getOptions();", "function initialize_options()\n\t\t{\n\t\t\tglobal $config;\n\n\t\t\t$defaults = array(\n\t\t\t\t'minimum_age' => 4,\n\t\t\t\t'maximum_age' => 0,\n\t\t\t);\n\t\t\tforeach ($defaults as $option => $default)\n\t\t\t{\n\t\t\t\tif (!isset($config[$option]))\n\t\t\t\t{\n\t\t\t\t\tset_config($option, $default);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function get_options() {\r\n\t\t\t$set_options = array(\r\n\t\t\t\t'plugin_css' => true, \r\n\t\t\t\t'home' => true,\r\n\t\t\t\t'single' => true,\r\n\t\t\t\t'page' => true,\r\n\t\t\t\t'archive' => true,\r\n\t\t\t\t'search' => true,\r\n\t\t\t\t'feed' => true,\r\n\t\t\t\t'attachment' => true,\r\n\t\t\t\t'tag' => true,\r\n\t\t\t\t'category' => true,\r\n\t\t\t\t'date' => true,\r\n\t\t\t\t'author' => true,\r\n\t\t\t\t'the_content' => true,\r\n\t\t\t\t'the_excerpt' => true,\r\n\t\t\t\t'the_comment' => false,\r\n\t\t\t\t'excluded_cats' => array(),\r\n\t\t\t\t'excluded_ids' => array()\r\n\t\t\t\t);\r\n\t\t\t$options = get_option($this->options_name);\r\n\t\t\tif (!empty($options)) {\r\n\t\t\t\tforeach ($options as $key => $option)\r\n\t\t\t\t\t$set_options[$key] = $option;\r\n\t\t\t}else{\r\n\t\t\t\tupdate_option($this->options_name, $set_options);\r\n\t\t\t}\r\n\t\t\treturn $set_options;\r\n\t\t}", "function of_options()\n\t{\n\t\t$of_categories \t\t= array(); \n\t\t$of_categories_obj \t= get_categories('hide_empty=0');\n\t\tforeach ($of_categories_obj as $of_cat) {\n\t\t $of_categories[$of_cat->cat_ID] = $of_cat->cat_name;}\n\t\t$categories_tmp \t= array_unshift($of_categories, \"Select a category:\"); \n\t \n\t\t//Access the WordPress Pages via an Array\n\t\t$of_pages \t\t\t= array();\n\t\t$of_pages_obj \t\t= get_pages('sort_column=post_parent,menu_order'); \n\t\tforeach ($of_pages_obj as $of_page) {\n\t\t $of_pages[$of_page->ID] = $of_page->post_name; }\n\t\t$of_pages_tmp \t\t= array_unshift($of_pages, \"Select a page:\"); \n\t\n\t\t//Testing \n\t\t$of_options_select \t= array(\"one\",\"two\",\"three\",\"four\",\"five\"); \n\t\t$of_options_radio \t= array(\"one\" => \"One\",\"two\" => \"Two\",\"three\" => \"Three\",\"four\" => \"Four\",\"five\" => \"Five\");\n\t\t\n\t\t//Sample Homepage blocks for the layout manager (sorter)\n\t\t$of_options_homepage_blocks = array\n\t\t( \n\t\t\t\"disabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_one\"\t\t=> \"Block One\",\n\t\t\t\t\"block_two\"\t\t=> \"Block Two\",\n\t\t\t\t\"block_three\"\t=> \"Block Three\",\n\t\t\t), \n\t\t\t\"enabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_four\"\t=> \"Block Four\",\n\t\t\t),\n\t\t);\n\n\n\t\t//Stylesheets Reader\n\t\t$alt_stylesheet_path = LAYOUT_PATH;\n\t\t$alt_stylesheets = array();\n\t\t\n\t\tif ( is_dir($alt_stylesheet_path) ) \n\t\t{\n\t\t if ($alt_stylesheet_dir = opendir($alt_stylesheet_path) ) \n\t\t { \n\t\t while ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false ) \n\t\t {\n\t\t if(stristr($alt_stylesheet_file, \".css\") !== false)\n\t\t {\n\t\t $alt_stylesheets[] = $alt_stylesheet_file;\n\t\t }\n\t\t } \n\t\t }\n\t\t}\n\n\t\t//Background Images Reader for header and footer\n\t\t$bg_images_path = get_template_directory() . '/img/patterns/'; // change this to where you store your bg images\n\t\t$bg_images_url = get_template_directory_uri() .'/img/patterns/'; // change this to where you store your bg images\n\t\t$bg_images = array();\n\t\t\n\t\tif ( is_dir($bg_images_path) ) {\n\t\t if ($bg_images_dir = opendir($bg_images_path) ) { \n\t\t while ( ($bg_images_file = readdir($bg_images_dir)) !== false ) {\n\t\t if(stristr($bg_images_file, \".png\") !== false || stristr($bg_images_file, \".jpg\") !== false) {\n\t\t \tnatsort($bg_images); //Sorts the array into a natural order\n\t\t $bg_images[] = $bg_images_url . $bg_images_file;\n\t\t }\n\t\t } \n\t\t }\n\t\t}\n\t\t\n\t\t//Background Images Reader for page header and body\n\t\t$body_bg_images_path = get_template_directory() . '/img/patterns/pat-body/'; // change this to where you store your bg images\n\t\t$body_bg_images_url = get_template_directory_uri() .'/img/patterns/pat-body/'; // change this to where you store your bg images\n\t\t$body_bg_images = array();\n\t\t\n\t\tif ( is_dir($body_bg_images_path) ) {\n\t\t if ($body_bg_images_dir = opendir($body_bg_images_path) ) { \n\t\t while ( ($body_bg_images_file = readdir($body_bg_images_dir)) !== false ) {\n\t\t if(stristr($body_bg_images_file, \".png\") !== false || stristr($body_bg_images_file, \".jpg\") !== false) {\n\t\t \tnatsort($body_bg_images); //Sorts the array into a natural order\n\t\t $body_bg_images[] = $body_bg_images_url . $body_bg_images_file;\n\t\t }\n\t\t } \n\t\t }\n\t\t}\n\t\t\n\t\t//Background Images Reader for slider\n\t\t$slider_bg_images_path = get_template_directory() . '/img/slider-bg/'; // change this to where you store your slider bg images\n\t\t$slider_bg_images_url = get_template_directory_uri() .'/img/slider-bg/'; // change this to where you store your slider bg images\n\t\t$slider_bg_images = array();\n\t\t\n\t\tif ( is_dir($slider_bg_images_path) ) {\n\t\t if ($slider_bg_images_dir = opendir($slider_bg_images_path) ) { \n\t\t while ( ($slider_bg_images_file = readdir($slider_bg_images_dir)) !== false ) {\n\t\t if(stristr($slider_bg_images_file, \".png\") !== false || stristr($slider_bg_images_file, \".jpg\") !== false) {\n\t\t \tnatsort($slider_bg_images); //Sorts the array into a natural order\n\t\t $slider_bg_images[] = $slider_bg_images_url . $slider_bg_images_file;\n\t\t }\n\t\t } \n\t\t }\n\t\t}\n\t\t\n\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t/* TO DO: Add options/functions that use these */\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t\n\t\t//More Options\n\t\t$uploads_arr \t\t= wp_upload_dir();\n\t\t$all_uploads_path \t= $uploads_arr['path'];\n\t\t$all_uploads \t\t= get_option('of_uploads');\n\t\t$other_entries \t\t= array(\"Select a number:\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\");\n\t\t$body_repeat \t\t= array(\"no-repeat\",\"repeat-x\",\"repeat-y\",\"repeat\");\n\t\t$body_pos \t\t\t= array(\"top left\",\"top center\",\"top right\",\"center left\",\"center center\",\"center right\",\"bottom left\",\"bottom center\",\"bottom right\");\n\t\t\n\t\t// Image Alignment radio box\n\t\t$of_options_thumb_align = array(\"alignleft\" => \"Left\",\"alignright\" => \"Right\",\"aligncenter\" => \"Center\"); \n\t\t\n\t\t// Image Links to Options\n\t\t$of_options_image_link_to = array(\"image\" => \"The Image\",\"post\" => \"The Post\"); \n\t\t\n/*-----------------------------------------------------------------------------------*/\n/* The Options Array */\n/*-----------------------------------------------------------------------------------*/\n\n// Prefix\n$prefix = \"tcsn_\";\n\t\n// Set the Options Array\nglobal $of_options;\n$of_options = array();\n\n/**\n * General Options\n *\n */\n$of_options[] = array( \n\t\"name\" => \"General\",\n\t\"type\" => \"heading\",\n\t);\n\t\t\t\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Favicon / Touch Icons\",\n\t\"type\" => \"info\",\n\t);\n\n$of_options[] = array( \t\n\t\"name\" => \"Favicon\",\n\t\"desc\" => __( \"Upload Favicon ( 16px x 16px ico/png/jpg ).\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"favicon\",\n\t\"std\" => \"\",\n\t\"type\" => \"upload\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Standard iPhone Touch Icon\",\n\t\"desc\" => __( \"Upload Icon ( 57px x 57px png ).\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"favicon_iphone\",\n\t\"std\" => \"\",\n\t\"type\" => \"upload\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Retina iPhone Touch Icon\",\n\t\"desc\" => __( \"Upload Icon ( 114px x 114px png ).\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"favicon_iphone_retina\",\n\t\"std\" => \"\",\n\t\"type\" => \"upload\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Standard iPad Touch Icon\",\n\t\"desc\" => __( \"Upload Icon ( 72px x 72px png ).\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"favicon_ipad\",\n\t\"std\" => \"\",\n\t\"type\" => \"upload\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Retina iPad Touch Icon\",\n\t\"desc\" => __( \"Upload Icon ( 144px x 144px png ).\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"favicon_ipad_retina\",\n\t\"std\" => \"\",\n\t\"type\" => \"upload\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Responsive\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Check to enable responsiveness.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"layout_responsive\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t); \n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Tracking Code\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Paste Google Analytics (or other) tracking code here. This will be added into the footer of theme.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"tracking\",\n\t\"std\" => \"\",\n\t\"type\" => \"textarea\"\n\t); \n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Comments on Pages (other than posts)\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Check to enable comments on pages.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"page_comments\",\n\t\"std\" => 0,\n\t\"type\" => \"checkbox\",\n\t); \n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Icon for Title\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Icon for Archives Title\",\n\t\"desc\" => __( \"Check to enable icon for Archives title.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_archives_icon\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t); \n\n$of_options[] = array( \n\t\"name\" => \"Icon for Blog Title\",\n\t\"desc\" => __( \"Check to enable icon for blog title.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_blog_icon\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t); \n\n$of_options[] = array( \n\t\"name\" => \"Icon for Portfolio Title\",\n\t\"desc\" => __( \"Check to enable icon for portfolio page title and porfolio details page title\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_portfolio_icon\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t);\n\t\n/**\n * Typography and Styling options\n *\n */\n$of_options[] = array( \n\t\"name\" => \"Typography and Styling\",\n\t\"type\" => \"heading\",\n\t);\n\n// Color scheme\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Predefined Color Schemes\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Select color skin.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"color_scheme\",\n\t\"std\" => \"yellow\",\n\t\"type\" => \"select\",\n\t\"options\" => array( \n\t\t'cyan' => 'Cyan', \n\t\t'green' => 'Green', \n\t\t'orange' => 'Orange', \n\t\t'purple' => 'Purple', \t\n\t\t'red' => 'Red', \n\t\t'yellow' => 'Yellow', \n\t\t),\n\t);\n\n// Body typography\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Body Typography\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Set body text. <br/> ( Defaults: 14px, Raleway, normal, #767676 )\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_body\",\n\t\"std\" => array( \n\t\t'size' => '14px', \n\t\t'face' => 'Raleway', \n\t\t'style' => 'normal', \n\t\t'color' => '#767676',\n\t\t),\n\t\"type\" => \"typography\",\n\t);\n\t\n// Headings typography\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Headings\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"H1\",\n\t\"desc\" => __( \"Set H1. <br/> ( Defaults: 36px, Raleway, normal, #646464 )\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_h1\",\n\t\"std\" => array( \n\t\t'size' => '36px', \n\t\t'face' => 'Raleway', \n\t\t'style' => 'normal', \n\t\t'color' => '#646464',\n\t\t),\n\t\"type\" => \"typography\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"H2\",\n\t\"desc\" => __( \"Set H2. <br/> ( Defaults: 24px, Raleway, bold, #646464 )\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_h2\",\n\t\"std\" => array( \n\t\t'size' => '24px', \n\t\t'face' => 'Raleway', \n\t\t'style' => 'bold', \n\t\t'color' => '#646464',\n\t\t),\n\t\"type\" => \"typography\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"H3\",\n\t\"desc\" => __( \"Set H3. <br/> ( Defaults: 20px, Raleway, bold, #646464 )\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_h3\",\n\t\"std\" => array( \n\t'size' => '20px', \n\t\t'face' => 'Raleway', \n\t\t'style' => 'bold', \n\t\t'color' => '#646464',\n\t\t),\n\t\"type\" => \"typography\",\n);\n\t\n$of_options[] = array( \n\t\"name\" => \"H4\",\n\t\"desc\" => __( \"Set H4. <br/> ( Defaults: 18px, Raleway, bold, #646464 )\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_h4\",\n\t\"std\" => array( \n\t\t'size' => '18px', \n\t\t'face' => 'Raleway', \n\t\t'style' => 'bold', \n\t\t'color' => '#646464',\n\t\t),\n\t\"type\" => \"typography\",\n);\n\t\n$of_options[] = array( \n\t\"name\" => \"H5\",\n\t\"desc\" => __( \"Set H5. <br/> ( Defaults: 14px, Raleway, bold, #646464 )\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_h5\",\n\t\"std\" => array( \n\t\t'size' => '14px', \n\t\t'face' => 'Raleway', \n\t\t'style' => 'bold', \n\t\t'color' => '#646464',\n\t\t),\n\t\"type\" => \"typography\",\n);\n\t\n$of_options[] = array( \n\t\"name\" => \"H6\",\n\t\"desc\" => __( \"Set H6. <br/> ( Defaults: 12px, Raleway, bold, #646464 )\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_h6\",\n\t\"std\" => array( \n\t\t'size' => '12px', \n\t\t'face' => 'Raleway', \n\t\t'style' => 'bold', \n\t\t'color' => '#646464',\n\t\t),\n\t\"type\" => \"typography\",\n);\n\n// Page header typography\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Page Header Typography\",\n\t\"type\" => \"info\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Page Title / Heading\",\n\t\"desc\" => __( \"Set heading / page title. <br/> ( Defaults: 18px, Raleway, bold, #727272 ).\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_title\",\n\t\"std\" => array(\n\t\t'size' => '18px',\n\t\t'face' => 'Raleway',\n\t\t'style' => 'bold',\n\t\t'color' => '#727272',\n\t\t),\n\t\"type\" => \"typography\",\n\t);\n\t\t\t\n$of_options[] = array( \n\t\"name\" => \"Page Header / Breadcrumb\",\n\t\"desc\" => __( \"Set page header text. <br/> ( Defaults: 12px, Raleway, normal, #727272 ). Will work for breadcrumb text.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_header_btm\",\n\t\"std\" => array(\n\t\t'size' => '12px',\n\t\t'face' => 'Raleway',\n\t\t'style' => 'normal',\n\t\t'color' => '#727272',\n\t\t),\n\t\"type\" => \"typography\",\n\t);\n\n$of_options[] = array( \t\n\t\"name\" => \"Link Color\",\n\t\"desc\" => __( \"Page header link color.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"link_color_header_btm\",\n\t\"std\" => \"#727272\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \t\n\t\"name\" => \"Link Hover Color\",\n\t\"desc\" => __( \"Page header link hover color.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"link_hover_header_btm\",\n\t\"std\" => \"#d9b444\",\n\t\"type\" => \"color\",\n\t);\n\t\n// Footer typography\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Footer Typography\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Set footer text. <br/> ( Defaults : 14px, Raleway, normal, #767676 )\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_footer\",\n\t\"std\" => array( \n\t\t'size' => '14px', \n\t\t'face' => 'Raleway', \n\t\t'style' => 'normal', \n\t\t'color' => '#767676', \n\t\t),\n\t\"type\" => \"typography\",\n\t);\n\n$of_options[] = array( \t\n\t\"name\" => \"Headings Color\",\n\t\"desc\" => __( \"Color of headings in footer (h1 to h6).\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"color_footer_headings\",\n\t\"std\" => \"#646464\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \t\n\t\"name\" => \"Links Color\",\n\t\"desc\" => __( \"Color of links in footer.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"color_footer_link\",\n\t\"std\" => \"#d9b444\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \t\n\t\"name\" => \"Links Color\",\n\t\"desc\" => __( \"Link hover color.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"color_footer_link_hover\",\n\t\"std\" => \"#767676\",\n\t\"type\" => \"color\",\n\t);\n\n// Copyright typography\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Copyright Typography\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Set copyright text. <br/> ( Defaults : 11px, Raleway, normal, #242424 )\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_copyright\",\n\t\"std\" => array(\n\t\t'size' => '11px',\n\t\t'face' => 'Raleway',\n\t\t'style' => 'normal',\n\t\t'color' => '#242424',\n\t\t),\n\t\"type\" => \"typography\",\n\t);\n\t\n$of_options[] = array( \t\n\t\"name\" => \"Link Color\",\n\t\"desc\" => __( \"Link color.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"link_color_copyright\",\n\t\"std\" => \"#242424\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \t\n\t\"name\" => \"Link Hover Color\",\n\t\"desc\" => __( \"Link hover color.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"link_hover_copyright\",\n\t\"std\" => \"#fff\",\n\t\"type\" => \"color\",\n\t);\n\n// General typography and Styling\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"General Typography and Styling\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Link Color\",\n\t\"desc\" => \"\",\n\t\"id\" => $prefix . \"link_color\",\n\t\"std\" => \"#d9b444\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Link Hover Color\",\n\t\"desc\" => \"\",\n\t\"id\" => $prefix . \"link_hover_color\",\n\t\"std\" => \"#767676\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Text highlight color\",\n\t\"desc\" => \"Colored text\",\n\t\"id\" => $prefix . \"text_color\",\n\t\"std\" => \"#d9b444\",\n\t\"type\" => \"color\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Icon Background Color\",\n\t\"desc\" => \"\",\n\t\"id\" => $prefix . \"icon_bg\",\n\t\"std\" => \"#d9b444\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Blockquote Border and Text Color\",\n\t\"desc\" => \"Blockquote border and text color\",\n\t\"id\" => $prefix . \"blockquote_color\",\n\t\"std\" => \"#d9b444\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Tag Background Color\",\n\t\"desc\" => \"Tag background color\",\n\t\"id\" => $prefix . \"tag_bg_color\",\n\t\"std\" => \"#d9b444\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Pricing table\",\n\t\"desc\" => \"Price and focused table slug color\",\n\t\"id\" => $prefix . \"pricing_color\",\n\t\"std\" => \"#d9b444\",\n\t\"type\" => \"color\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Text Shadow\",\n\t\"desc\" => __( \"Check to enable text shadow\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_text_shadow\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t); \n\t\n$of_options[] = array( \n\t\"name\" => \"Button\",\n\t\"desc\" => __( \"Set button font family.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_button\",\n\t\"std\" => array(\n\t\t'face' => 'Raleway',\n\t\t'style' => 'normal', \n\t\t),\n\t\"type\" => \"typography\",\n\t);\n\t\t\t\t\t\t\n/**\n * Body Options\n *\n */\n$of_options[] = array( \n\t\"name\" => \"Body\",\n\t\"type\" => \"heading\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Body Background\",\n\t\"type\" => \"info\",\n\t);\n\t\t\t\t\t\n$of_options[] = array( \n\t\"name\" => \"Background Color\",\n\t\"desc\" => __( \"Body background color.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"bg_color_body\",\n\t\"std\" => \"#f2f2f2\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Background Image\",\n\t\"desc\" => __( \"Check to enable background pattern.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_pattern_body\",\n\t\"std\" => 0,\n\t\"type\" => \"checkbox\",\n\t); \n\t\t\n$of_options[] = array( \t\n\t\"name\" => \"\",\n\t\"desc\" => __( \"Select a background pattern. <br> To add more patterns just upload your pattern here : Theme folder > img > patterns > pat-body\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"pattern_body\",\n\t\"std\" \t => \"\",\n\t\"type\" \t => \"tiles\",\n\t\"options\" => $body_bg_images,\n\t);\n\t\t\t\t\t\t\n$of_options[] = array( \n\t\"name\" => \"Background Repeat\",\n\t\"desc\" => \"\",\n\t\"id\" => $prefix . \"pattern_repeat_body\",\n\t\"std\" => \"repeat\",\n\t\"type\" => \"select\",\n\t\"options\" => array(\n\t\t'repeat' => 'repeat', \n\t\t'repeat-x' => 'repeat-x', \n\t\t'repeat-y' => 'repeat-y', \n\t\t'no-repeat' => 'no-repeat',\n\t\t),\n\t); \n\t\t\t\t\t\n$of_options[] = array( \n\t\"name\" => \"Background Attachment\",\t\t\t\n\t\"desc\" => \"\",\n\t\"id\" => $prefix . \"attachment_body\",\n\t\"std\" => \"scroll\",\n\t\"type\" => \"select\",\n\t\"options\" => array( \n\t\t'scroll' => 'scroll', \n\t\t'fixed' => 'fixed', \n\t\t),\n\t); \n\n/**\n * Header Options\n *\n */\n$of_options[] = array( \n\t\"name\" => \"Header\",\n\t\"type\" => \"heading\",\n\t);\n\n// Header layout\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Select a Header Layout\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => $prefix. \"layout_header\",\n\t\"std\" => \"\",\n\t\"type\" => \"images\",\n\t\"options\" => array(\n\t\t\"v1\" => get_template_directory_uri() . \"/includes/img/header1.jpg\",\n\t\t\"v2\" => get_template_directory_uri() . \"/includes/img/header2.jpg\",\n\t\t\"v3\" => get_template_directory_uri() . \"/includes/img/header3.jpg\",\n\t\t),\n\t);\n\n// Header Background\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Header Background\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Background Color\",\n\t\"desc\" => __( \"Background color.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"bg_color_header\",\n\t\"std\" => \"#000\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Background Image\",\n\t\"desc\" => __( \"Check to enable background pattern.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_pattern_header\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t); \n\t\t\n$of_options[] = array( \t\n\t\"name\" => \"\",\n\t\"desc\" => __( \"Select a background pattern. <br> To add more patterns just upload your pattern here : Theme folder > img > patterns\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"pattern_header\",\n\t\"std\" \t => $bg_images_url . \"pat1.jpg\",\n\t\"type\" \t => \"tiles\",\n\t\"options\" => $bg_images,\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Background Repeat\",\n\t\"desc\" => \"\",\n\t\"id\" => $prefix . \"pattern_repeat_header\",\n\t\"std\" => \"repeat\",\n\t\"type\" => \"select\",\n\t\"options\" => array( \n\t\t'repeat' => 'repeat', \n\t\t'repeat-x' => 'repeat-x', \n\t\t'repeat-y' => 'repeat-y', \n\t\t'no-repeat' => 'no-repeat', \n\t\t),\n\t); \t\t\n\n// Top bar Background\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Top Bar Background\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Background Color\",\n\t\"desc\" => __( \"Background color.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"bg_color_topbar\",\n\t\"std\" => \"#0e0e0e\",\n\t\"type\" => \"color\",\n\t);\n\n// Logo\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Logo\",\n\t\"type\" => \"info\",\n\t);\n\t\t\n$of_options[] = array( \n\t\"name\" => \"Select Logo Type\",\n\t\"desc\" => __( \"If Image Logo : Upload logo image using field below. <br/><br/> If text logo : Provide text using field below.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"logo_type\",\n\t\"std\" => $prefix . \"show_text_logo\",\n\t\"type\" => \"images\",\n\t\"options\" => array(\n\t\t$prefix . \"show_image_logo\" => get_template_directory_uri() . \"/includes/img/image-logo.png\",\n\t\t$prefix . \"show_text_logo\" => get_template_directory_uri() . \"/includes/img/text-logo.png\",\n\t\t),\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"For Image Logo\",\n\t\"desc\" => __( \"Upload logo.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"image_logo\",\n\t\"std\" => \"\",\n\t\"type\" => \"upload\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"For Text Logo\",\n\t\"desc\" => __( \"Enter text for logo and set font.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"text_logo\",\n\t\"std\" => \"Mylogo\",\n\t\"type\" => \"text\",\n\t); \n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Set font. ( Defaults : 32px, Arial, normal, #d9b444 )\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_logo\",\n\t\"std\" => array( \n\t\t'size' => '32px', \n\t\t'face' => 'Arial', \n\t\t'style' => 'normal', \n\t\t'color' => '#d9b444',\n\t\t),\n\t\"type\" => \"typography\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"<<----- Logo hover color. If text logo, it will change color on hover. <br/> Keep it same as logo text color or change as per liking.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"hover_logo\",\n\t\"std\" => \"#d9b444\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Logo Top Margin\",\n\t\"desc\" => __( \"Logo top margin ( in 'px' ).\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"top_margin_logo\",\n\t\"std\" => \"0px\",\n\t\"type\" => \"text\",\n\t); \n\n// Social icons\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Social Icons\",\n\t\"type\" => \"info\",\n\t);\n\t\t\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Check to enable widget area for <br/> 'Social Icons' in header. <br/><br/> Please visit the widgets settings page to configure 'Social Network' widget.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_social_network\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t);\n\n// Phone number\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Phone Nunber\",\n\t\"type\" => \"info\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Check to enable phone number.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_phone_number\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Enter phone number.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"phone_number\",\n\t\"std\" => \"+(99) 123 345 5678\",\n\t\"type\" => \"text\",\n\t); \n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Set font. ( Defaults : 14px, Raleway, bold, #727272 )\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_phone\",\n\t\"std\" => array( \n\t\t'size' => '14px',\n\t\t'face' => 'Raleway',\n\t\t'style' => 'bold',\n\t\t'color' => '#727272', \n\t\t),\n\t\"type\" => \"typography\",\n\t);\n\n// Tagline \n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Top bar / Tagline\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Check to enable tagline in topbar.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_tagline\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Enter tagline.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"tagline\",\n\t\"std\" => \"This is a tagline\",\n\t\"type\" => \"text\",\n\t); \n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Set font. ( Defaults : 14px, Raleway, bold, #727272 )\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"font_tagline\",\n\t\"std\" => array( \n\t\t'size' => '14px',\n\t\t'face' => 'Raleway',\n\t\t'style' => 'bold',\n\t\t'color' => '#727272', \n\t\t),\n\t\"type\" => \"typography\",\n\t);\n\n// Menu \n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Menu / Navigation\",\n\t\"type\" => \"info\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __(\"Set font. ( Defaults: 12px, Raleway, bold, #a7a7a7 )\", \"tcsn_theme\"),\n\t\"id\" => $prefix . \"font_menu\",\n\t\"std\" => array( \n\t\t'size' => '12px',\n\t\t'face' => 'Raleway',\n\t\t'style' => 'bold',\n\t\t'color' => '#a7a7a7', \n\t\t),\n\t\"type\" => \"typography\",\n\t);\n\n\n$of_options[] = array( \n\t\"name\" => \"Menu : Link Hover Background Color\",\n\t\"desc\" => __(\"Hover background color.\", \"tcsn_theme\"),\n\t\"id\" => $prefix . \"bg_color_hover_menu\",\n\t\"std\" => \"#484848\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Dropdown : Background Color\",\n\t\"desc\" => __(\"Dropdown background color.\", \"tcsn_theme\"),\n\t\"id\" => $prefix . \"bg_color_dropdown_menu\",\n\t\"std\" => \"#484848\",\n\t\"type\" => \"color\",\n\t);\n\t\t\n$of_options[] = array( \n\t\"name\" => \"Dropdown : Link Hover Color\",\n\t\"desc\" => __(\"Dropdown link hover color.\", \"tcsn_theme\"),\n\t\"id\" => $prefix . \"link_hover_dropdown\",\n\t\"std\" => \"#fff\",\n\t\"type\" => \"color\",\n\t);\t\n\n$of_options[] = array( \n\t\"name\" => \"Colored Link in Menu\",\n\t\"desc\" => __(\"Colored link in menu\", \"tcsn_theme\"),\n\t\"id\" => $prefix . \"menu_link_color\",\n\t\"std\" => \"#d9b444\",\n\t\"type\" => \"color\",\n\t);\t\n\n/**\n * Page Header Options\n *\n */\n$of_options[] = array( \n\t\"name\" => \"Page Header\",\n\t\"type\" => \"heading\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Page Header On / Off\",\n\t\"desc\" => __( \"Check to enable page header\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_page_header\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t); \n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Page Header Background\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Background Color\",\n\t\"desc\" => __( \"Background color.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"bg_color_header_btm\",\n\t\"std\" => \"#e3e3e3\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Background Image\",\n\t\"desc\" => __( \"Check to enable background pattern.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_pattern_header_btm\",\n\t\"std\" => 0,\n\t\"type\" => \"checkbox\",\n\t); \n\t\t\n$of_options[] = array( \t\n\t\"name\" => \"\",\n\t\"desc\" => __( \"Select a background pattern. <br> To add more patterns just upload your pattern here : Theme folder > img > patterns > pat-body\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"pattern_header_btm\",\n\t\"std\" \t => \"\",\n\t\"type\" \t => \"tiles\",\n\t\"options\" => $body_bg_images,\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Background Repeat\",\n\t\"desc\" => \"\",\n\t\"id\" => $prefix . \"pattern_repeat_header_btm\",\n\t\"std\" => \"repeat\",\n\t\"type\" => \"select\",\n\t\"options\" => array( \n\t\t'repeat' => 'repeat', \n\t\t'repeat-x' => 'repeat-x', \n\t\t'repeat-y' => 'repeat-y', \n\t\t'no-repeat' => 'no-repeat', \n\t\t),\n\t); \t\t\n\n$of_options[] = array( \t\n\t\"name\" => \"Border Bottom Color\",\n\t\"desc\" => \"Border bottom color.\",\n\t\"id\" => $prefix . \"border_bottom_headerbtm\",\n\t\"std\" => \"#fff\",\n\t\"type\" => \"color\",\n\t);\t\t\t\t\t\n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Breadcrumb or Search\",\n\t\"type\" => \"info\",\n\t);\n\n$of_options[] = array( \t\n\t\"name\" \t\t=> \"\",\n\t\"desc\" \t\t=> \"\",\n\t\"id\" \t\t=> $prefix . \"show_breadcrumb_search\",\n\t\"std\" \t\t=> \"breadcrumb\",\n\t\"type\" \t\t=> \"radio\",\n\t\"options\" => array( \n\t\t'breadcrumb' => 'Breadcrumb', \n\t\t'search' => 'Search', \n\t\t'none' => 'None', \n\t\t),\n\t); \t\t\n\t\t\t\t\n$of_options[] = array( \t\n\t\"name\" => \"Breadcrumb Active link color\",\n\t\"desc\" => \"Breadcrumb active link color.\",\n\t\"id\" => $prefix . \"color_active_breadcrumb\",\n\t\"std\" => \"#999\",\n\t\"type\" => \"color\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Breadcrumb Top Margin\",\n\t\"desc\" => __(\"Breadcrumb top margin ( in 'px' ).\", \"tcsn_theme\"),\n\t\"id\" => $prefix . \"top_margin_breadcrumb\",\n\t\"std\" => \"0px\",\n\t\"type\" => \"text\",\n\t); \n\n\n/**\n * Slider Options\n *\n */\t\t\n$of_options[] = array( \n\t\"name\" => \"Slider\",\n\t\"type\" => \"heading\",\n\t);\t\n\n$of_options[] = array( \n\t\"name\" => \"Background Image\",\n\t\"desc\" => __( \"Check to enable background pattern.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_pattern_slider_bg\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t); \n\n$of_options[] = array( \t\n\t\"name\" => \"Slider Background Image\",\n\t\"desc\" => __( \"Select a background image for slider. <br> To add your custom image upload your background image here : Theme folder > img > slider-bg\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"pattern_slider_bg\",\n\t\"std\" \t => $slider_bg_images_url . \"slider-background1.jpg\",\n\t\"type\" \t => \"tiles\",\n\t\"options\" => $slider_bg_images,\n\t);\n\n$of_options[] = array( \t\n\t\"name\" => \"Slider Background Color\",\n\t\"desc\" => \"Slider background color.\",\n\t\"id\" => $prefix . \"color_slider_bg\",\n\t\"std\" => \"\",\n\t\"type\" => \"color\",\n\t);\t\n\t\n/**\n * Footer Options\n *\n */\t\t\n$of_options[] = array( \n\t\"name\" => \"Footer\",\n\t\"type\" => \"heading\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Number of Footer Columns\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array(\n\t\"name\" => \"\",\n\t\"desc\" => __( \"Select number of columns.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"columns_footer\",\n\t\"std\" => \"3\",\n\t\"type\" => \"images\",\n\t\"options\" => array(\n\t\t\"1\" => get_template_directory_uri() . \"/includes/img/col1.png\",\n\t\t\"2\" => get_template_directory_uri() . \"/includes/img/col2.png\",\n\t\t\"3\" => get_template_directory_uri() . \"/includes/img/col3.png\",\n\t\t\"4\" => get_template_directory_uri() . \"/includes/img/col4.png\",\n\t\t),\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Footer Background\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Background Color\",\n\t\"desc\" => __( \"Background color.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"bg_color_footer\",\n\t\"std\" => \"#000\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Background Image\",\n\t\"desc\" => __( \"Check to enable background pattern.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_pattern_footer\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t); \n\t\n$of_options[] = array( \t\n\t\"name\" => \"\",\n\t\"desc\" => __( \"Select a background pattern. <br> To add more patterns just upload your pattern here : Theme folder > img > patterns\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"pattern_footer\",\n\t\"std\" \t => $bg_images_url . \"pat1.jpg\",\n\t\"type\" \t => \"tiles\",\n\t\"options\" => $bg_images,\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Background Repeat\",\n\t\"desc\" => \"\",\n\t\"id\" => $prefix . \"pattern_repeat_footer\",\n\t\"std\" \t => \"repeat\",\n\t\"type\" => \"select\",\n\t\"options\" => array(\n\t\t'repeat' => 'repeat', \n\t\t'repeat-x' => 'repeat-x', \n\t\t'repeat-y' => 'repeat-y', \n\t\t'no-repeat' => 'no-repeat',\n\t\t),\n\t); \t\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Social Icons & Twitter Feed setup\",\n\t\"type\" => \"info\",\n\t);\n\t\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Check to enable row for Twiiter feed and Social icons above main footer columns.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_social_row\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t); \n\n$of_options[] = array( \n\t\"name\" => \"Background Color for Twitter Box\",\n\t\"desc\" => __( \"Background color.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"bg_color_twitter_box\",\n\t\"std\" => \"#282828\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Border Color for Twitter Box\",\n\t\"desc\" => __( \"Border color.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"border_color_twitter_box\",\n\t\"std\" => \"#161616\",\n\t\"type\" => \"color\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"Twitter Feed\",\n\t\"desc\" => __( \"<----- Twitter username with link to the left side of twitter feed box. <br/><br/> Default : &lt;a href='#' target='_blank'&gt;Grepfrut&lt;/a&gt <br/><br/> Please visit the widgets settings page to configure 'Twitter Feed Widget'.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"twitter_username\",\n\t\"std\" => \"<a href='https://twitter.com/tanshcreative' target='_blank'>Grepfrut</a>\",\n\t\"type\" => \"textarea\",\n\t); \n\n$of_options[] = array( \n\t\"name\" => \"Footer Social Icons\",\n\t\"desc\" => __( \"Check to enable widget area for 'Social Icons' in footer. <br/><br/> If disabled, will display only twitter feed. <br/><br/> Please visit the widgets settings page to configure 'Social Network' widget for footer.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_footer_social\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t); \n\n/**\n * Copyright Options\n *\n */\t\n$of_options[] = array( \n\t\"name\" => \"Copyright\",\n\t\"type\" => \"heading\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Copyright Text\",\n\t\"desc\" => __( \"Enter copyright text (HTML allowed)\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"copyright\",\n\t\"std\" => \"&copy; Copyright 2013\",\n\t\"type\" => \"textarea\",\n\t); \n\t\n$of_options[] = array( \n\t\"name\" => \"Check to Enable Menu in Copyright\",\n\t\"desc\" => __( \"Enable secondary menu in copyright\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"show_secondary_menu\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => \"\",\n\t\"id\" => \"info_heading\",\n\t\"std\" => \"Copyright Background\",\n\t\"type\" => \"info\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Background Color\",\n\t\"desc\" => __( \"Background color.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"bg_color_copyright\",\n\t\"std\" => \"#484848\",\n\t\"type\" => \"color\",\n\t);\n\t\n$of_options[] = array( \t\n\t\"name\" => \"Border Top Color\",\n\t\"desc\" => __( \"Border top color.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"border_top_copyright\",\n\t\"std\" => \"#5b5c5d\",\n\t\"type\" => \"color\",\n\t);\n\n/**\n * Blog Options\n *\n */\t\n$of_options[] = array( \t\n\t\"name\" => \"Blog\",\n\t\"type\" => \"heading\",\n);\n\n$of_options[] = array(\n\t\"name\" => \"Blog Layout\",\n\t\"desc\" => __( \"Select blog layout.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"blog_layout\",\n\t\"std\" => \"with-sidebar\",\n\t\"type\" => \"select\",\n\t\"options\" => array(\n\t\t'full-width' => 'Full Width', \n\t\t'with-sidebar' => 'With Sidebar',\n\t\t),\n\t);\t\n\n$of_options[] = array(\n\t\"name\" => \"Blog Sidebar Position\",\n\t\"desc\" => __( \"Select blog sidebar position.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"blog_sidebar\",\n\t\"std\" => \"sidebar-right\",\n\t\"type\" => \"select\",\n\t\"options\" => array(\n\t\t'sidebar-left' => 'Sidebar Left', \n\t\t'sidebar-right' => 'Sidebar Right',\n\t\t),\n\t);\t\n\n$of_options[] = array( \n\t\"name\" => \"Blog Title\",\n\t\"desc\" => __( \"Blog page title.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"blog_title\",\n\t\"std\" => \"Blogpost\",\n\t\"type\" => \"text\",\n\t); \n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Check to enable social share box on single post.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"post_social_share\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t); \n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Check to enable facebook in social share box.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"post_social_share_facebook\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t);\n\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Check to enable twitter in social share box.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"post_social_share_twitter\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Check to enable googleplus in social share box.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"post_social_share_googleplus\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Check to enable linkedin in social share box.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"post_social_share_linkedin\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Check to enable pinterest in social share box.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"post_social_share_pinterest\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"\",\n\t\"desc\" => __( \"Check to enable mail in social share box.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"post_social_share_mail\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n\t);\n\n/**\n * Portfolio Options\n *\n */\t\n$of_options[] = array( \t\n\t\"name\" => \"Portfolio\",\n\t\"type\" => \"heading\",\n);\n\n$of_options[] = array( \n\t\"name\" => \"Portfolio items per page\",\n\t\"desc\" => __( \"Specify the number of portfolio items to display per page.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"portfolio_items_per_page\",\n\t\"std\" => \"9\",\n\t\"type\" => \"text\",\n\t);\n\t\n$of_options[] = array( \n\t\"name\" => \"Enable Portfolio Filter\",\n\t\"desc\" => __( \"Check to enable portfolio filter.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"portfolio_filter\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n); \n\t\n$of_options[] = array( \n\t\"name\" => \"Enable Heading to Portfolio Item\",\n\t\"desc\" => __( \"Check to enable heading of portfolio item.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"portfolio_heading\",\n\t\"std\" => 1,\n\t\"type\" => \"checkbox\",\n); \n\n$of_options[] = array( \n\t\"name\" => \"Enable Excerpt to Portfolio Item\",\n\t\"desc\" => __( \"Check to enable excerpt of portfolio item.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"portfolio_excerpt\",\n\t\"std\" => 0,\n\t\"type\" => \"checkbox\",\n); \n\n/**\n * Custom CSS\n *\n */\t \n$of_options[] = array( \n\t\"name\" => \"Custom CSS\",\n\t\"type\" => \"heading\",\n);\n\t\t\t\t\t\n$of_options[] = array( \n\t\"name\" => \"Custom CSS\",\n\t\"desc\" => __( \"Paste your CSS Code.\", \"tcsn_theme\" ),\n\t\"id\" => $prefix . \"custom_css\",\n\t\"std\" => \"\",\n\t\"type\" => \"textarea\",\n\t); \n\n/**\n * Backup Options\n *\n */\t \t\t\t\t\t\t\t\n$of_options[] = array( \t\n\t\"name\" => \"Backup Options\",\n\t\"type\" => \"heading\",\n);\n\t\t\t\t\n$of_options[] = array( \t\n\t\"name\" => \"Backup and Restore Options\",\n\t\"desc\" => __( \"You can use the two buttons below to backup your current options, and then restore it back at a later time. This is useful if you want to experiment on the options but would like to keep the old settings in case you need it back.\", \"tcsn_theme\" ),\n\t\"id\" => \"of_backup\",\n\t\"std\" => \"\",\n\t\"type\" => \"backup\",\n\t);\n\t\t\t\t\n$of_options[] = array( \t\n\t\"name\" => \"Transfer Theme Options Data\",\n\t\"desc\" => __( \"You can tranfer the saved options data between different installs by copying the text inside the text box. To import data from another install, replace the data in the text box with the one from another install and click \\\"Import Options\\\".\", \"tcsn_theme\" ),\n\t\"id\" => \"of_transfer\",\n\t\"std\" => \"\",\n\t\"type\" => \"transfer\",\n\t);\n\t\t\t\t\n\t}", "function screen_options($screen)\n {\n }", "protected function getAllAvailableSortOrderOptions() {}", "function form_options($options) {\n }", "function osa_options_class_types() {\r\n\r\n $options = array();\r\n // $options['cello'] = 'Cello';\r\n $options['bass'] = 'Double Bass';\r\n $options['guitar'] = 'Guitar';\r\n $options['koday'] = 'Koday Only';\r\n $options['ecm'] = 'Suzuki Baby';\r\n $options['theory'] = 'Theory';\r\n $options['viace'] = 'Violin - Advanced';\r\n $options['violin'] = 'Violin';\r\n\r\n return $options;\r\n}", "function cmh_add_defaults() {\r\n\t$tmp = get_option('cmh_options');\r\n if( !is_array($tmp) ) {\r\n\t\tdelete_option('cmh_options'); // so we don't have to reset all the 'off' checkboxes too! (don't think this is needed but leave for now)\r\n\t\t$arr = array(\t\r\n\t\t\t\"rdo_group_one\" => \"h2\"\r\n\t\t);\r\n\t\tupdate_option('cmh_options', $arr);\r\n\t}\r\n}", "function bf_flush_options() {\r\n\tglobal $bf_options;\r\n\t\r\n\t$bf_options = new BF_Options();\r\n\t$bf_options->get_options();\r\n\t\r\n\tif ( !get_option(THEME_ID . '_options') ) $bf_options->default_options();\r\n}", "function of_option_setup()\t{\n\t\n\tglobal $of_options, $options_machine;\n\t\n\t$options_machine = new Options_Machine($of_options);\n\t\t\n\tif (!get_option(OPTIONS)){\n\t\t\n\t\t$defaults = (array) $options_machine->Defaults;\n\t\tupdate_option(OPTIONS,$defaults);\n\t\tgenerate_options_css($defaults); \n\t\t\n\t}\n\t\n\t\n}", "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;", "protected function setOptions() {\n\t\t$this->_options->setHelpText(\"This tool provides a mechanism to run recurring workflow tasks.\");\n\n\t\t$text = \"This option triggers the execution of all known workflows.\\n\";\n\t\t$text.= \"You may filter the execution using option '--workflow'.\";\n\t\t$this->_options->addOption(Option::EasyFactory(self::OPTION_RUN, array('--run', '-r'), Option::TYPE_NO_VALUE, $text, 'value'));\n\n\t\t$text = \"This options provides a way to filter a specific workflow.\";\n\t\t$this->_options->addOption(Option::EasyFactory(self::OPTION_WORKFLOW, array('--workflow', '-w'), Option::TYPE_VALUE, $text, 'value'));\n\t}", "abstract protected function options(): array;", "protected function _options() {\n\t\t\treturn array();\n\t\t}", "public function get_options_list() {\n\t\treturn array(\n\t\t\t'ring_logger_limit' => __('How many last records store?', 'wp-optimize')\n\t\t);\n\t}", "public function Option1()\n {\n $this->CallJqUiMethod(\"option\");\n }", "function driver_clean($option = array());", "static function onActivate() {\n $options = get_option(self::$optionsKey);\n if (!is_null($options)) {\n // write default options into database\n $options = array();\n $options['allowedTags'] = self::$allowedTags;\n $options['remoteStoreUrl'] = self::$remoteStoreUrl;\n $options['rteWebpackage'] = self::$rteWebpackage;\n add_option(self::$optionsKey, $options);\n }\n }", "function yaz_set_option($id, $options)\n{\n}", "public function view_option()\n{\n\t//option included, excluded\n\treturn \"excluded\";\n}", "public function view_option()\n{\n\t//option included, excluded\n\treturn \"excluded\";\n}", "function getOpts(){\n $q = getPublicQ();\n $q = Question::find($q[rand(0,sizeof($q) > 1 ? sizeof($q)-1 : 0)]);\n\n if($q->type == \"open\"){\n return [$q, null];\n }\n\n $ans = Option::all()->where('question_id', $q->id)->pluck('id');\n return sizeof($ans) > 1 ? [$q, Option::find($ans[0])->option] : getOpts();\n}", "function dblions_general_options() {\n\techo 'Edit general features';\n}", "public function prepareOptions()\r\n\t\t{\r\n\t\t\t$mysqli = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME);\r\n\t\t\t$query = 'SELECT name FROM options WHERE id_votes =\"'.$this->voteId.'\" ORDER BY id_option ASC ';\r\n\t\t\tif ($result = $mysqli->query($query))\r\n\t\t\t{\r\n\t\t\t\twhile($obj = $result->fetch_object())\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_push($this->optionList,$obj->name);\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\r\n\t\t\t}\r\n\t\t\t$mysqli->close(); \r\n\t\t}", "function ahr_menu() {\r\n \r\n\tglobal $AHR_SLUG;\r\n\t\r\n add_options_page( 'Advanced Https Redirection', 'Advanced Https Redirection', 'manage_options', $AHR_SLUG, 'ahr_render_options_page' );\r\n \r\n}", "public static function add_options(){\n\n \t\t$settings = array(\n \t\t\t'foundation' => 0\n \t\t);\n\n \t\tadd_option( 'zip_downloads', $settings ); \n\t}" ]
[ "0.65046877", "0.6355935", "0.6299488", "0.618942", "0.618942", "0.618942", "0.618942", "0.618942", "0.61844105", "0.60979044", "0.60975796", "0.6093492", "0.6082485", "0.607466", "0.604834", "0.6044038", "0.6007455", "0.60001105", "0.5982721", "0.5982721", "0.5982653", "0.5971221", "0.59699476", "0.59364235", "0.5930333", "0.5909173", "0.59063894", "0.58959246", "0.58900875", "0.5885489", "0.58475596", "0.5845547", "0.58275205", "0.58275205", "0.58275205", "0.58275205", "0.58275205", "0.58275205", "0.58275205", "0.58275205", "0.58275205", "0.58275205", "0.58275205", "0.58275205", "0.58275205", "0.58275205", "0.58275205", "0.58275205", "0.5824343", "0.58241355", "0.5817857", "0.5817857", "0.58152795", "0.58046037", "0.5797639", "0.5791646", "0.5784074", "0.5781815", "0.577805", "0.5766513", "0.57596534", "0.5758871", "0.5747086", "0.5746223", "0.5730521", "0.5721689", "0.5713622", "0.5709046", "0.5706084", "0.5697111", "0.56912166", "0.5684144", "0.5684009", "0.56811446", "0.5679551", "0.5675811", "0.5664757", "0.56638235", "0.5660901", "0.56597567", "0.56597567", "0.56597567", "0.56597567", "0.56597567", "0.56597567", "0.56597567", "0.56596357", "0.56595975", "0.5655918", "0.56558436", "0.565447", "0.5651583", "0.5649548", "0.56464595", "0.5638215", "0.5638215", "0.56365186", "0.5636233", "0.5633159", "0.5630129", "0.56290334" ]
0.0
-1
Auto sort out : Get option
public static function getSortOut() { return self::$_options['sortOut']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOptions() ;", "protected function getAllAvailableSortDescendingOptions() {}", "private function sortOptions()\r\n {\r\n $pageActions = array(); // For the result\r\n // Sort changes by file\r\n usort($this->changeAr, \"cmp\");\r\n\r\n foreach ($this->changeAr as $line) {\r\n $file = $line['file'];\r\n $action = $line['action'];\r\n if (array_key_exists($file, $pageActions)) {\r\n continue;\r\n }\r\n $pageActions[$file] = $action;\r\n }\r\n// print_r($pageActions);\r\n return $pageActions;\r\n }", "function _sf_get_list_of_sort_options() {\n\t\t\n\t\t$options = array('relevant', 'oldest', 'newest', 'closest');\n\t\t\n\t\t///// IF WE HAVE RATING\n\t\tif(ddp('rating') == 'on' && ddp('rating_sortby') == 'on') { $options[] = 'ratingdesc'; $options[] = 'ratingasc'; }\n\t\t\n\t\t///// WE NEED TO GO THROUGH OUR FIELDS TO SEE IF ANY OF THEM IS A VALID OPTION\n\t\t$args = array(\n\t\t\t\t\t\t\t\n\t\t\t'post_type' => 'search_field',\n\t\t\t'meta_query' => array(\n\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\n\t\t\t\t\t'key' => 'enable_sort',\n\t\t\t\t\t'value' => 'on',\n\t\t\t\t\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\n\t\t\t\t\t'key' => 'field_type',\n\t\t\t\t\t'value' => array('range', 'min_val', 'max_val'),\n\t\t\t\t\t'compare' => 'IN',\n\t\t\t\t\n\t\t\t\t)\n\t\t\t\n\t\t\t),\n\t\t\t'posts_per_page' => -1,\n\t\t\n\t\t);\n\t\t\n\t\t$sortQ = new WP_Query($args);\n\t\t\n\t\tif($sortQ->have_posts()) {\n\t\t\t\n\t\t\tforeach($sortQ->posts as $search_field) {\n\t\t\t\t\n\t\t\t\t$options[] = $search_field->post_name.'_low';\n\t\t\t\t$options[] = $search_field->post_name.'_high';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $options;\n\t\t\n\t}", "function elm_admin_get_order_by_options() {\n\t$options = array(\n\t\t'asc' => __('ASC', 'elm'),\n\t\t'desc' => __('DESC', 'elm')\n\t);\n\t\n\treturn $options;\n}", "function _sf_get_list_sort_url($option) {\n\t\t\n\t\t//// RETURNS THE URL\n\t\t$url = add_query_arg(array('sort' => $option));\n\t\treturn $url;\n\t\t\n\t}", "function printSortOptions ($url) {\n print \"<p align='center'><b>Sort by:</b> \";\n foreach ($this->sort_opts as $s) {\n if ($s != $this->sort_opts[0]) {\n\t// print a separator between terms\n\tprint \" | \";\n }\n if ($s == $this->sort) {\n\tprint \"&nbsp;\" . $this->pretty_sort_opts[$s] . \"&nbsp;\";\n } else {\n\tprint \"&nbsp;<a href='$url?sort=$s'>\" . \n\t $this->pretty_sort_opts[$s] . \"</a>&nbsp;\";\n }\n }\n print \"</p>\";\n }", "protected function getAllAvailableSortOrderOptions() {}", "function ui_sortable_get_option($selector,$option){\n return jquery_support($selector,'sortable', \"'option' , '$option'\");\n}", "function getSort(){ return 301; }", "function getOptionValuesAndDescription($orderby = \"optiontext\") {\t\t\n\t\t$optionvaluesquery = \"SELECT lv.lookupvaluedescription 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 \".$orderby;\n\t\treturn getOptionValuesFromDatabaseQuery($optionvaluesquery);\n\t}", "function _sf_is_sort_by($option) {\n\t\t\n\t\t$options = _sf_get_list_of_sort_options();\n\t\t\n\t\t//// GETS GET FIRST AND MAKES SUREITS A VALID OPTION\n\t\tif(isset($_GET['sort']) && in_array($_GET['sort'], $options)) {\n\t\t\t\n\t\t\t//// IF IT'S A VALID OPTION\n\t\t\tif(in_array($option, $options)) {\n\t\t\t\t\n\t\t\t\t//// IF ITS THE CURRENT ONE\n\t\t\t\tif($_GET['sort'] == $option) {\n\t\t\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\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} else {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t//// IF ITS A VALID OPTION\n\t\t\tif(in_array($option, $options)) {\n\t\t\t\t\t\n\t\t\t\t//// CHECKS AGAINST COOKIE FIRST\n\t\t\t\tif(isset($_COOKIE['sort'])) {\n\t\t\t\t\t\n\t\t\t\t\tif($_COOKIE['sort'] == $option) {\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\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} else {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t}", "function getSort(){\n\treturn 281;\n}", "function getOptions();", "public function getSorting();", "public function getOpt($option) {}", "function getSort(){\n return 301;\n }", "function getSort(){\n $sort = $_GET[\"sort\"];\n if ($sort != 'on') {\n $sort = 'off';\n }\n return $sort;\n}", "public function getOptions()\n {\n return $this->where(array('is_del' => array('neq', -1)))->getField('id, name');\n }", "public function getSortValue() {}", "function getOptions()\n\t{\n\t\t\n\t\treturn $this->getAssoc(Array('id','title')/*, $cond*/);\n\t}", "function get_abook_sort() {\n global $data_dir, $username;\n\n /* get sorting order */\n if(sqgetGlobalVar('abook_sort_order', $temp, SQ_GET)) {\n $abook_sort_order = (int) $temp;\n\n if ($abook_sort_order < 0 or $abook_sort_order > 8)\n $abook_sort_order=8;\n\n setPref($data_dir, $username, 'abook_sort_order', $abook_sort_order);\n } else {\n /* get previous sorting options. default to unsorted */\n $abook_sort_order = getPref($data_dir, $username, 'abook_sort_order', 8);\n }\n\n return $abook_sort_order;\n}", "public function getSortMenu();", "function getSort(){\n return 188;\n }", "public function getOptions()\n {\n return $this->where(array('is_del' => array('neq', 1)))->getField('id, name');\n }", "function getSort() {\n return 999;\n }", "function getSort(){\n return 999;\n }", "function getSort(){\n return 999;\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}", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "function getSort(){\n return 155;\n }", "function getSort(){\n return 155;\n }", "function getSort(){\n return 155;\n }", "protected function get_options()\n\t{}", "function getSort(){\n return 100;\n }", "function mfcs_get_publicity_details_list_options($option = NULL, $hidden = FALSE, $disabled = FALSE) {\n $options = array();\n $options_all = array();\n\n if ($hidden) {\n $options_all[MFCS_REQUEST_PUBLICITY_NONE] = 'None';\n }\n\n $options_all[MFCS_REQUEST_PUBLICITY_CAMPUS_DIGEST] = 'Campus Digest';\n $options_all[MFCS_REQUEST_PUBLICITY_STUDENT_DIGEST] = 'Student Digest';\n $options_all[MFCS_REQUEST_PUBLICITY_WEBSITE] = 'Website';\n $options_all[MFCS_REQUEST_PUBLICITY_SOCIAL_MEDIA] = 'Social Media';\n $options_all[MFCS_REQUEST_PUBLICITY_AXIS_TVS] = 'Axis TV\\'s';\n $options_all[MFCS_REQUEST_PUBLICITY_PRESS_RELEASE] = 'Press Release';\n\n if ($option == 'select') {\n $options[''] = '- Select -';\n }\n elseif ($option == 'column_name') {\n $options_all[MFCS_REQUEST_PUBLICITY_CAMPUS_DIGEST] = 'campus_digest';\n $options_all[MFCS_REQUEST_PUBLICITY_STUDENT_DIGEST] = 'student_digest';\n $options_all[MFCS_REQUEST_PUBLICITY_WEBSITE] = 'website';\n $options_all[MFCS_REQUEST_PUBLICITY_SOCIAL_MEDIA] = 'social_media';\n $options_all[MFCS_REQUEST_PUBLICITY_AXIS_TVS] = 'axis_tv';\n $options_all[MFCS_REQUEST_PUBLICITY_PRESS_RELEASE] = 'press_release';\n }\n\n foreach ($options_all as $option_id => $option_name) {\n $options[$option_id] = $option_name;\n }\n\n asort($options);\n\n return $options;\n}", "public function get_options()\n {\n }", "public function options() {\n return $this->model->orderBy('name')->lists('name', 'id');\n }", "function getOptions($id){ \r\n\t\tif($this->getQuestionType($id)==4 || $this->getQuestionType($id)==5 || $this->getQuestionType($id)==9 || $this->getQuestionType($id)==2 || $this->getQuestionType($id)==10){\r\n\t\t\t$query= \"SELECT tbl_option.option,tbl_option.option_id,tbl_option.superOf,tbl_option.number FROM tbl_option WHERE tbl_option.question_id = $id ORDER BY `number` ASC;\";\r\n\t\t\t$result = $this->mdb2->query($query) or die('An unknown error occurred while checking the data');\r\n\t\t\tif(MDB2::isError($result)){\r\n\t\t\t\treturn \"SelectError\";\r\n\t\t\t}else{\r\n\t\t\t\t$native_result = $result->getResource();\r\n\t\t\t\treturn $native_result;\t\t\t\t\t\t//Returns the option text\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//as a Mysql native result type.\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t \treturn $this->getQuestionType($id);\r\n\t\t}\r\n\t}", "function opting($opt) {\n\t$opt['table']=ascheck(@$opt['table'],'');\n\t$opt['subject']=ascheck(@$opt['subject'],array());\n\t$opt['subject_str']=ar2str(@$opt['subject'],\"_\");\n\t$opt['topic_in']=ascheck(@$opt['topic_in'],array());\n\t$opt['topic_out']=ascheck(@$opt['topic_out'],array());\n\t$opt['name']=ascheck(@$opt['name'],$opt['subject_str'].ac::$nth);\n\t$opt['title']=ascheck(@$opt['title'],$opt['name']);\n\t$opt['id']=ascheck(@$opt['id'],'');\n\t$opt['bucket']=ascheck(@$opt['bucket'],false);\n\t$opt['list']=ascheck(@$opt['list'],false);\n\t$opt['debug']=ascheck(@$opt['debug'],false);\n\t$opt['class']=ascheck(@$opt['class'],'p');\n\t$opt['modal']=ascheck(@$opt['modal'],true);\n\t$opt['scope']=ascheck(@$opt['scope'],'');\n\t$opt['prepend']=ascheck(@$opt['prepend'],'');\n\t$opt['append']=ascheck(@$opt['append'],'');\n\t$opt['order']=ascheck(@$opt['order'],'');\n\treturn $opt;\n}", "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 }", "abstract public function getOptions();", "function printOptionSections(){\n\t$sql = \"select distinct substring_index(section, '/', -1) sec from package order by sec\";\n\t\n\t$section = isset($_GET['section']) ? $_GET['section'] : '';\n\t\n\t$res = mysql_query($sql);\n\twhile($row = mysql_fetch_array($res)){\n\t\t$selected = '';\n\t\tif($section == $row['sec'])\n\t\t\t$selected = 'selected=\"true\"';\n\t\techo '<option value=\"' . $row['sec'] . '\" ' . $selected . '>' . $row['sec'] . '</option>' . \"\\n\";\n\t}\n}", "function load_option()\n {\n $op = array();\n \t// $query = $this->db->get('option');\n $query = $this->db->query('SELECT `var`,`value` FROM `option`');\n foreach ( $query->result_array() as $o )\n {\n \t$op[$o['var']] = $o['value'];\n }\n \n return $op;\n \n }", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "protected function getOptions()\n {\n return [\n ['force', null, InputOption::VALUE_NONE, 'Create the class even if the sort field already exists'],\n ];\n }", "function sort_options( $options, $params ) {\n\n if ( FWP()->helper->facet_setting_exists( 'type', 'proximity' ) ) {\n $options['distance'] = [\n 'label' => __( 'Distance', 'fwp-front' ),\n 'query_args' => [\n 'orderby' => 'post__in',\n 'order' => 'ASC',\n ],\n ];\n }\n\n return $options;\n }", "function getOpts(){\n $q = getPublicQ();\n $q = Question::find($q[rand(0,sizeof($q) > 1 ? sizeof($q)-1 : 0)]);\n\n if($q->type == \"open\"){\n return [$q, null];\n }\n\n $ans = Option::all()->where('question_id', $q->id)->pluck('id');\n return sizeof($ans) > 1 ? [$q, Option::find($ans[0])->option] : getOpts();\n}", "private function get_option() {\n\t\t$default = [\n\t\t\tself::STATUS => self::NOT_FETCHED,\n\t\t\tself::LAST_FETCH => 0,\n\t\t];\n\n\t\treturn get_option( self::OPTION_NAME, $default );\n\t}", "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;", "function get_data_request_options()\r\n{\r\n\t//kijk wat het abstractie niveau is van de huidige opties\r\n\t$current_abstraction_level_query = 'select option_type from Requestable_data where option_name == \":current_selected_option\"';\r\n\t$current_abstraction_level = execute_sql_extract_data($current_abstraction_level_query);\r\n\t\r\n\t//haal de opties maar op uit de DB\r\n\t$requestable_data_descriptions = 'select option_name from Requestable_data where option_type = ' . $current_abstraction_level;\r\n\texecute_sql_extract_data($requestable_data_descriptions);\r\n}", "function dp_selected_sort_types() {\n\t$selected_types = get_option('dp_sort_types');\n\tif(empty($selected_types))\n\t\treturn array();\n\n\t$supported_types = dp_supported_sort_types();\n\tforeach($selected_types as $key => $value)\n\t\t$selected_types[$key] = $supported_types[$key];\n\n\treturn apply_filters('dp_selected_sort_types', $selected_types);\n}", "protected function getOptions() {}", "protected function getOptions() {}", "protected function getOptions() {}", "function get_control_order() {\n $this->control_order_by->OP_[option]->set(array_merge(array(\n '' => ''\n ), $this->caption_fields));\n return $this->control_order_by->get_tag();\n }", "protected function CatalogOptionsList() {\n\treturn $this->GetFieldValue('ItOptions');\n }", "public function getSort() { return ''; }", "public function get_sorting_options() {\n\n $instance = Envira_Gallery_Common::get_instance();\n return $instance->get_sorting_options();\n\n }", "function get_options()\n{\n\n $options = getopt(\"a:\");\n\n return $options;\n}", "function get_options(){\n\t\treturn $this->options;\n\t}", "public function Sort(){\r\n\t\treturn self::get_sort();\r\n\t}", "public function optionList(){\n $this->layout = null;\n\n\t $this->set('chamados',\n $this->Chamado->find('list', array(\n 'fields' => array('Chamado.id', 'Chamado.numero'),\n 'conditions' => array('Chamado.servico_id' => $this->params['url']['servico']))));\n }", "public function sortOptions() {\n $options = array();\n\n foreach($this->options as $key => $option) {\n $optionTitle = $option['optionTitle'];\n $options[$optionTitle] = $option;\n }\n\n ksort($options);\n reset($options);\n\n $this->options = $options;\n }", "function getOptionNm($opt_no = \"\"){\n\t\t\t\n\t\t\t// オプション名配列\n\t\t\t$list[] = array(\"1\",\"とことん24取扱い\");\n\t\t\t$list[] = array(\"2\",\"整備保証付\");\n\t\t\t$list[] = array(\"3\",\"夜間受付OK\");\n\t\t\t$list[] = array(\"4\",\"土日対応OK\");\n\t\t\t$list[] = array(\"5\",\"代車あり\");\n\t\t\t$list[] = array(\"6\",\"引取・納車OK\");\n\t\t\t$list[] = array(\"7\",\"キャッシュレスOK\");\n\t\t\t$list[] = array(\"8\",\"クレジットカード利用OK\");\n\t\t\t$list[] = array(\"9\",\"グルメプレゼント\");\n\t\t\t$list[] = array(\"10\",\"グッズプレゼント\");\n\t\t\t$list[] = array(\"11\",\"ガソリンプレゼント\");\n\t\t\t$list[] = array(\"12\",\"抽選でプレゼント\");\n\t\t\t$list[] = array(\"13\",\"オイル交換サービス\");\n\t\t\t$list[] = array(\"14\",\"車検時限定割引サービス\");\n\t\t\t$list[] = array(\"15\",\"即日完了OK\");\n\t\t\t$list[] = array(\"16\",\"ロードサービス取扱い\");\n\t\t\t\n\t\t\tfor($i=0;$i<count($list);$i++){\n\t\t\t\t$item_nm[$list[$i][0]] = $list[$i][1];\n\t\t\t}\n\t\t\t\n\t\t\tif($opt_no != \"\"){\n\t\t\t\t\n\t\t\t\t/*SEO対策 [PUBLIC_TOKOTON-5] 不正なURLはエラーページ表示 20170228 ST*/\n\t\t\t\t//不正な値はfalseで返す\n\t\t\t\tif(isset($item_nm[$opt_no]) == false){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t/*SEO対策 [PUBLIC_TOKOTON-5] 不正なURLはエラーページ表示 20170228 ED*/\n\t\t\t\t\t\n\t\t\t\treturn $item_nm[$opt_no];\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t}", "private function GetSortField()\r\n\t\t{\r\n\t\t\tif (isset($_GET['sort'])) {\r\n\t\t\t\t$this->_sort = $_GET['sort'];\r\n\t\t\t} else {\r\n\t\t\t\t$this->_sort = \"featured\";\r\n\t\t\t}\r\n\r\n\t\t\t$priceColumn = 'p.prodcalculatedprice';\r\n\r\n\t\t\tswitch ($this->_sort) {\r\n\t\t\t\tcase \"featured\": {\r\n\t\t\t\t\t$GLOBALS['SortFeaturedSelected'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn \"p.prodsortorder asc\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"newest\": {\r\n\t\t\t\t\t$GLOBALS['SortNewestSelected'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn \"p.productid desc\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"bestselling\": {\r\n\t\t\t\t\t$GLOBALS['SortBestSellingSelected'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn \"p.prodnumsold desc\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"alphaasc\": {\r\n\t\t\t\t\t$GLOBALS['SortAlphaAsc'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn \"p.prodname asc\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"alphadesc\": {\r\n\t\t\t\t\t$GLOBALS['SortAlphaDesc'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn \"p.prodname desc\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"avgcustomerreview\": {\r\n\t\t\t\t\t$GLOBALS['SortAvgReview'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn \"prodavgrating desc\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"priceasc\": {\r\n\t\t\t\t\t$GLOBALS['SortPriceAsc'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn $priceColumn.' ASC';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase \"pricedesc\": {\r\n\t\t\t\t\t$GLOBALS['SortPriceDesc'] = 'selected=\"selected\"';\r\n\t\t\t\t\treturn $priceColumn.' DESC';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "protected function get_option_name()\n {\n }", "protected function _getSortType() {}", "protected function _getSortType() {}", "public function getProductOption();", "public function getOptions()\r\n {\r\n }", "function mfcs_get_insurance_list_options($option = NULL, $hidden = FALSE, $disabled = FALSE) {\n $options = array();\n $options_all = array();\n\n if ($hidden) {\n $options_all[MFCS_INSURANCE_NONE] = 'None';\n }\n\n $options_all[MFCS_INSURANCE_REQUIRED_NOT] = 'Not Required';\n $options_all[MFCS_INSURANCE_REQUIRED] = 'Required';\n $options_all[MFCS_INSURANCE_PROVIDED] = 'Provided';\n $options_all[MFCS_INSURANCE_PROVIDED_NOT] = 'Not Provided';\n\n foreach ($options_all as $option_id => $option_name) {\n $options[$option_id] = $option_name;\n }\n\n asort($options);\n\n return $options;\n}", "public function getSelectSortType()\n {\n return $this->_rootElement->find(\"#sorter\")->getElements('option[selected]')[0]->getText();\n }", "function getOption($name);", "public function fetchOptions()\n\t{\n\t\t$result = $this->dibi->query(\"\n\t\t\tSELECT \n\t\t\t\tid, CONCAT_WS(' ',title, CONCAT_WS('/',year,volume)) AS journal\n\t\t\tFROM \n\t\t\t\tjournal\n\t\t\tORDER BY\n\t\t\t\tyear DESC, volume DESC\n\t\t\");\n\t\t\n\t\treturn $result->fetchPairs($key='id', $value='journal');\n\t}", "function getOrder();", "public function view_option()\n{\n\t//option included, excluded\n\treturn \"excluded\";\n}" ]
[ "0.6416963", "0.62562066", "0.62425476", "0.6211569", "0.6204801", "0.62027436", "0.61914593", "0.6186539", "0.6149563", "0.6095961", "0.6093745", "0.6065136", "0.605975", "0.60163313", "0.6014878", "0.60054713", "0.59631884", "0.5953354", "0.5947752", "0.59414846", "0.59390247", "0.58799726", "0.5879368", "0.5877891", "0.5869804", "0.58545995", "0.5847453", "0.5847453", "0.58421206", "0.58373386", "0.58373386", "0.58373386", "0.58373386", "0.58373386", "0.58373386", "0.58373386", "0.58373386", "0.58373386", "0.58373386", "0.58373386", "0.58373386", "0.58373386", "0.58373386", "0.58373386", "0.58373386", "0.5829854", "0.5829854", "0.5829854", "0.58247125", "0.58181715", "0.5803412", "0.578989", "0.57881564", "0.5760928", "0.5757098", "0.5736798", "0.5731547", "0.57311", "0.5717568", "0.57063574", "0.57063574", "0.5705181", "0.56920254", "0.5690824", "0.5670601", "0.5664369", "0.5662338", "0.5662338", "0.5662338", "0.5662338", "0.5662338", "0.5662338", "0.5662338", "0.56606114", "0.56510526", "0.56501055", "0.56501055", "0.56490123", "0.56486124", "0.56427777", "0.56410545", "0.5624177", "0.56217813", "0.5619601", "0.5609862", "0.5608185", "0.5605239", "0.55927026", "0.55871975", "0.5572007", "0.5567987", "0.5567987", "0.555006", "0.55478483", "0.5534598", "0.55323017", "0.553079", "0.5524466", "0.5521979", "0.5520814" ]
0.64855856
0
Private Function Refactor Array $data structure by $keys
protected static function _refactorBy(& $data, $keys, $obj2array = false, $type = 'index') { // 參數處理 $keys = (array) $keys; $result = []; // 遍歷待處理陣列 foreach ($data as $row) { // 旗標,是否取得索引 $getIndex = false; // 位置初炲化 - 傳址 $rRefer = & $result; // 可用的index清單 $indexs = []; // 遍歷$keys陣列 - 建構索引位置 foreach ($keys as $key) { $vKey = null; // 取得索引資料 - 從$key if (is_object($row) && isset($row->{$key})) { $vKey = $row->{$key}; } elseif (is_array($row) && isset($row[$key])) { $vKey = $row[$key]; } // 有無法取得索引資料,跳出 if (is_null($vKey)) { $getIndex = false; break; } // 記錄可用的index $indexs[] = $vKey; // 本次索引完成 $getIndex = true; } // 略過無法取得索引或索引不完整的資料 if (! $getIndex) { continue; } // 變更位置 - 傳址 foreach ($indexs as $idx) { $rRefer = & $rRefer[$idx]; } // 將資料寫入索引位置 switch ($type) { case 'index': case 'indexBy': default: $rRefer = $obj2array ? (array) $row : $row; break; case 'group': case 'groupBy': $rRefer[] = $obj2array ? (array) $row : $row; break; case 'indexOnly': case 'noData': $rRefer = ''; break; } } return $data = $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refactor(array $source, string ...$keys)\n{\n\t$result = [];\n\t$keyset = array_keys($source);\n\tif (count($keys)) {\n\t\t$keyset = array_intersect($keyset, $keys);\n\t}\n\n\twhile ($key = array_shift($keyset)) {\n\t\tforeach ($source[$key] as $index => $value) {\n\t\t\tif (!isset($result[$index])) {\n\t\t\t\t$result[$index] = [];\n\t\t\t}\n\t\t\t$result[$index][$key] = $value;\n\t\t}\n\t}\n\n\treturn $result;\n}", "function changeDataKeysId2Name($data){\n\t\t/*\n\t\t$res = array();\n\t\tforeach ($this->OnlyById as $aid=>$attribute) {\n\t\t\tif(!isset($data[$aid])) continue;\n\t\t\t$res[$attribute['name']] = $data[$aid];\n\t\t}\n\t\treturn $res;\n\t\t*/\n\t\t\n\t\t$res = array();\n\t\tforeach ($data as $aid=>$val){\n\t\t\tif(isset($this->OnlyById[$aid])){\n\t\t\t\t$res[$this->OnlyById[$aid]->fieldName] = $val;\n\t\t\t} else {\n\t\t\t\t$res[$aid] = $val;\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}", "public static function change_arrayKeys($data, $new_keys)\n {\n $result = array();\n foreach ($data as $row) {\n foreach ($new_keys as $key => $value) {\n $row = self::change_key($row, $key, $value);\n }\n $result[] = $row;\n }\n return $result;\n }", "function reset_keys($data) {\n\t$new_arr = array();\n\tforeach($data as $key=>$value) {\n\t\t$new_arr[] = $value;\n\t}\n\treturn $new_arr;\n}", "protected static function prepareData(array $data)\n\t{\n\t\t$newData = array();\n\n\t\tforeach ($data as $code => $val)\n\t\t{\n\t\t\tif (mb_strpos($code, '_') !== false)\n\t\t\t{\n\t\t\t\t$codeHook = mb_substr($code, 0, mb_strpos($code, '_'));\n\t\t\t\t$codeVal = mb_substr($code, mb_strpos($code, '_') + 1);\n\t\t\t\tif (!isset($newData[$codeHook]))\n\t\t\t\t{\n\t\t\t\t\t$newData[$codeHook] = array();\n\t\t\t\t}\n\t\t\t\t$newData[$codeHook][$codeVal] = $val;\n\t\t\t}\n\t\t}\n\n\t\treturn $newData;\n\t}", "private function cleanupFieldNames($data)\r\n\t{\r\n\t\tforeach ($data as $key => $value)\r\n\t\t{\r\n\t\t\t// Translate field name to lower case\r\n\t\t\t$newKey = $this->makeLowerCaseName($key);\r\n\t\t\tif ($newKey != $key)\r\n\t\t\t{\r\n\t\t\t\t$data[$newKey] = $value;\r\n\t\t\t\tunset($data[$key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $data;\r\n\t}", "protected function _hardTraverseDataKeys(array $keys)\n {\n $data =& $this->_data;\n $isDataUntouched = true;\n \n foreach ($keys as $key) {\n if (!isset($data[$key])\n || !(is_array($data[$key]) || ($data[$key] instanceof Varien_Object))) {\n $isDataUntouched = false;\n $data[$key] = array();\n }\n if ($data[$key] instanceof Varien_Object) {\n $data =& $data[$key]->_data;\n } else {\n $data =& $data[$key];\n }\n }\n \n return array($isDataUntouched, &$data);\n }", "public static function arrayKeysToSnake(array $data): array {\n\n foreach ($data as $key => $value) {\n if (!self::isInteger($key)) {\n\n $newKey = strtolower(preg_replace(\"/([a-z])([A-Z])/\", \"$1_$2\", $key));\n $data[$newKey] = $value;\n\n if ($key !== $newKey) {\n unset($data[$key]);\n }\n\n }\n }\n\n return $data;\n\n }", "function quiz_report_index_by_keys($datum, $keys, $keysunique=true){\n if (!$datum){\n return $datum;\n }\n $key = array_shift($keys);\n $datumkeyed = array();\n foreach ($datum as $data){\n if ($keys || !$keysunique){\n $datumkeyed[$data->{$key}][]= $data;\n } else {\n $datumkeyed[$data->{$key}]= $data;\n }\n }\n if ($keys){\n foreach ($datumkeyed as $datakey => $datakeyed){\n $datumkeyed[$datakey] = quiz_report_index_by_keys($datakeyed, $keys, $keysunique);\n }\n }\n return $datumkeyed;\n}", "function old_tbl_set_generic_keys($arr_old_tbls)\n\t{\n\t\t$output=$arr_old_tbls;\n\t\tif(is_array($arr_old_tbls))\n\t\t{\n\t\t\t$all_tables_old_empty = array_filter($arr_old_tbls);\n\t\t\tif($all_tables_old_empty != false && !empty($all_tables_old_empty) && is_array($all_tables_old_empty))\n\t\t\t{\n\t\t\t\t$all_tables_old_new_keys=[];\n\t\t\t\tforeach($arr_old_tbls as $single_table)\n\t\t\t\t{\n\t\t\t\t\t$temp_new_keys=[];\n\t\t\t\t\t$arr_keys=array_keys($single_table);\n\t\t\t\t\t$temp_new_keys['tablename']=$single_table[$arr_keys[0]];\n\t\t\t\t\t$temp_new_keys['tablename']= strtolower($temp_new_keys['tablename']);\n\t\t\t\t\t$temp_new_keys['type']=$single_table[$arr_keys[1]];\n\t\t\t\t\t$temp_new_keys['type']= strtolower($temp_new_keys['type']);\n\t\t\t\t\tarray_push($all_tables_old_new_keys, $temp_new_keys);\n\t\t\t\t}\n\t\t\t\tif(array_filter($all_tables_old_new_keys) != false && !empty(array_filter($all_tables_old_new_keys)) && is_array(array_filter($all_tables_old_new_keys)))\n\t\t\t\t{\n\t\t\t\t\t$output=$all_tables_old_new_keys;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}", "function GetTheDataArray($keys = array())\n{\n $ReturnData = '';\n $key1 = isset($keys[0]) && !empty($keys[0]) ? $keys[0] :null;\n $key2 = isset($keys[1]) && !empty($keys[1]) ? $keys[1] :null;\n $key3 = isset($keys[2]) && !empty($keys[2]) ? $keys[2] :null;\n $key4 = isset($keys[3]) && !empty($keys[3]) ? $keys[3] :null;\n\n if(!is_null($key1) && is_null($key2))\n {\n $ReturnData = iteraxcontroller::Instance()->it->data[$key1];\n } elseif(!is_null($key1) && !is_null($key2) && is_null($key3)){\n $ReturnData = iteraxcontroller::Instance()->it->data[$key1][$key2];\n } elseif(!is_null($key1) && !is_null($key2) && !is_null($key3) && is_null($key4)){\n $ReturnData = iteraxcontroller::Instance()->it->data[$key1][$key2][$key3];\n\n } elseif(!is_null($key1) && !is_null($key2) && !is_null($key3) && !is_null($key4)){\n $ReturnData = iteraxcontroller::Instance()->it->data[$key1][$key2][$key3][$key4];\n } else {\n $ReturnData = '';\n }\n\n\n return $ReturnData;\n\n\n}", "static function groupArray(array $arr, array $keys)\n\t{\n\t\t$newlist = [];\n\t\t\n\t\tforeach($arr as $row){\n\t\t\t$keys1=[];\n\t\t\tforeach($keys as $key)\n\t\t\t\t$keys1[] = $row[$key];\n\t\t\t\n\t\t\tGW_Array_Helper::getPointer2XlevelAssocArr($newlist, $keys1, $row);\n\t\t}\n\t\t\n\t\treturn $newlist;\n\t}", "protected function _softTraverseDataKeys(array $keys)\n {\n $key = null;\n $data =& $this->_data;\n $isLastKeyFound = true;\n \n foreach ($keys as $key) {\n if (isset($data[$key])\n && (is_array($data[$key]) || ($data[$key] instanceof Varien_Object))) {\n if ($data[$key] instanceof Varien_Object) {\n $data =& $data[$key]->_data;\n } else {\n $data =& $data[$key];\n }\n } else {\n $isLastKeyFound = false;\n break;\n }\n }\n \n return array($isLastKeyFound, $key, &$data);\n }", "abstract function prepare_data(&$data_arr);", "private function _split_data(array $data = array())\n\t{\n\t\tif (empty($data))\n\t\t{\n\t\t\treturn $data;\n\t\t}\n\n\t\t$_data = array();\n\n\t\tforeach ($data as $key => $val)\n\t\t{\n\t\t\t// Entities table.\n\t\t\tif (in_array($key, $this->_parent->entities->fields()))\n\t\t\t{\n\t\t\t\t$_data[0][$key] = $val;\n\t\t\t}\n\t\t\t// Groups table.\n\t\t\telseif (in_array($key, $this->fields()))\n\t\t\t{\n\t\t\t\t$_data[1][$key] = $val;\n\t\t\t}\n\t\t\t// The rest are metadata.\n\t\t\telse\n\t\t\t{\n\t\t\t\t$_data[2][$key] = $val;\n\t\t\t}\n\t\t}\n\n\t\tif (empty($_data))\n\t\t{\n\t\t\treturn $data;\n\t\t}\n\n\t\t// Make sure all three elements are set.\n\t\t(isset($_data[0])) OR $_data[0] = array();\n\t\t(isset($_data[1])) OR $_data[1] = array();\n\t\t(isset($_data[2])) OR $_data[2] = array();\n\n\t\t// Sort things up.\n\t\tksort($_data);\n\n\t\treturn $_data;\n\t}", "function wp_array_slice_assoc($input_array, $keys)\n {\n }", "function groupByKey($arr, $key){\n\t$groupeItmes = array();\n\tforeach ( $arr as $row ) {\n\t\t$groupeItmes[$row[$key]][] = $row;\n\t}\n\n\t$finalData = array();\n\tforeach ( $groupeItmes as $row ) {\n\t\t$finalData[] = array($key => $row[0][$key], 'items' => $row );\n\t}\n\n\tusort($finalData, sortByOrder($key));\n\n\treturn $finalData;\n}", "public static function buildDataUsers($list_keys,$data,$Controller) {\n\n $data_by_keys = [];\n\n for($i = 0; $i < count($list_keys); $i++) {\n\n $key_val = trim($list_keys[$i]);\n\n if($key_val == 'id') {\n\n $data_by_keys['id'] = $data->id;\n\n }\n\n if($key_val == 'status_approve') {\n\n $data_by_keys['status_approve'] = $data->status_approve;\n\n }\n\n if($key_val == 'user_level') {\n\n $data_by_keys['user_level'] = $data->user_level;\n\n }\n\n if($key_val == 'system_id') {\n\n $data_by_keys['system_id'] = $data->system_id;\n\n }\n\n\n\n\n\n\n if($key_val == 'api_id') {\n\n $data_by_keys['api_id'] = '';\n\n if($data->api_id != '') {\n\n $connects = JSON::decode($data->api_id);\n\n $connect_data = [];\n $i2 = 0;\n\n foreach ($connects as $val) {\n\n $connect = Gem_api_connect::findFirstById($val->crm_id);\n\n\n $connect_data[$i2]['crm_id'] = $connect->id;\n $connect_data[$i2]['uid'] = $val->uid;\n $connect_data[$i2]['crm_custom_name'] = $connect->custom_name;\n\n $i2++;\n\n }\n\n\n $data_by_keys['api_id'] = $connect_data;\n\n\n }\n\n\n }\n\n if($key_val == 'all_teams') {\n\n $data_by_keys['all_teams'] = Teams::getAllTeams($Controller->App, $Controller->api, $data->team_id);\n\n }\n\n if($key_val == 'dep_list') {\n\n $data_by_keys['dep_list'] = Departments::getDepartments($Controller->App, $Controller->api);\n\n }\n\n if($key_val == 'team_list') {\n\n $data_by_keys['team_list'] = Teams::getTeams($Controller->App, $Controller->api);\n\n }\n\n if($key_val == 'dir_section') {\n\n $data_by_keys['dir_section'] = $data->dir_section;\n\n }\n\n if($key_val == 'session_id') {\n\n $data_by_keys['session_id'] = $data->session_id;\n\n }\n\n if($key_val == 'hash') {\n\n $data_by_keys['hash'] = $data->hash;\n\n }\n\n if($key_val == 'oauth_id') {\n\n $data_by_keys['oauth_id'] = $data->oauth_id;\n\n }\n\n if($key_val == 'oauth_name') {\n\n $data_by_keys['oauth_name'] = $data->oauth_name;\n\n }\n\n if($key_val == 'user_agent') {\n\n $data_by_keys['user_agent'] = $data->user_agent;\n\n }\n\n if($key_val == 'name') {\n\n $data_by_keys['name'] = $data->name.' '.$data->full_name;\n\n }\n\n if($key_val == 'first_name') {\n\n $data_by_keys['first_name'] = $data->name;\n\n }\n\n if($key_val == 'last_name') {\n\n $data_by_keys['last_name'] = $data->full_name;\n\n }\n\n if($key_val == 'third_name') {\n\n $data_by_keys['third_name'] = $data->third_name;\n\n }\n\n if($key_val == 'full_name') {\n\n $data_by_keys['full_name'] = $data->full_name;\n\n }\n\n if($key_val == 'email') {\n\n $data_by_keys['email'] = $data->email;\n\n }\n\n if($key_val == 'phone') {\n\n $data_by_keys['phone'] = $data->phone;\n\n }\n\n if($key_val == 'messanger') {\n\n $data_by_keys['messenger'] = $data->messanger;\n\n }\n\n if($key_val == 'birthday') {\n\n $data_by_keys['birthday'] = $data->birthday;\n\n }\n\n if($key_val == 'work_position') {\n\n $data_by_keys['work_position'] = $data->work_position;\n\n }\n\n\n if($key_val == 'photo') {\n\n $data_by_keys['photo'] = System::getImageUrl($data->photo);\n\n\n\n }\n\n if($key_val == 'achieves') {\n\n $data_by_keys['achieves'] = Gem_user_achieves::get($data->id);\n }\n\n if($key_val == 'gender') {\n\n $data_by_keys['gender'] = $data->gender;\n\n }\n\n if($key_val == 'date_reg') {\n\n $data_by_keys['date_reg'] = $data->date_reg;\n\n }\n\n if($key_val == 'date_reg') {\n\n $data_by_keys['date_reg'] = $data->date_reg;\n\n }\n\n if($key_val == 'date_visit') {\n\n $data_by_keys['date_visit'] = $data->date_visit;\n\n }\n\n if($key_val == 'rating') {\n\n $data_by_keys['rating'] = $data->rating;\n\n }\n\n if($key_val == 'game_level') {\n\n if($data->game_level < 1) {\n\n $data->game_level = 1;\n\n }\n\n $data_by_keys['game_level'] = $data->game_level;\n\n }\n\n\n\n if($key_val == 'balance') {\n\n $data_by_keys['balance'] = $data->balance;\n\n }\n\n if($key_val == 'balance_free') {\n\n $data_by_keys['balance_free'] = $data->balance_free;\n\n }\n\n\n\n if($key_val == 'settings') {\n\n $data_by_keys['settings'] = $data->settings;\n\n }\n\n if($key_val == 'company_id') {\n\n $data_by_keys['company_id'] = $data->company_id;\n\n }\n\n if($key_val == 'department') {\n\n $dep = Departments::findFirstById($data->dep_id);\n\n $data_by_keys['dep_name'] = '';\n\n if(isset($dep->id)) {\n\n $data_by_keys['dep_name'] = $dep->dep_name;\n\n }\n\n\n $data_by_keys['dep_id'] = $data->dep_id;\n\n }\n\n if($key_val == 'dep_id') {\n\n $data_by_keys['dep_id'] = $data->dep_id;\n }\n\n\n if($key_val == 'tasks') {\n\n\n $user_tasks = [];\n $user_tasks['selected'] = [];\n $user_tasks['all'] = [];\n\n\n $tasks = JSON::decode($data->tasks);\n\n if(count($tasks) > 0) {\n\n $sql = '';\n\n $ni = 0;\n\n $bind = [];\n\n foreach($tasks as $task) {\n\n if($sql != '') {\n\n $sql .= \" OR \";\n\n }\n\n $sql .= \"id = :id_\".$ni.\":\";\n\n $bind['id_'.$ni] = $task['id'];\n\n $ni++;\n\n }\n\n $tasks_data = Gem_tasks::find(\n [\n $sql,\n \"bind\" => $bind,\n \"order\" => \"date_add DESC\",\n\n ]\n );\n\n\n\n if(count($tasks_data) > 0) {\n\n $nc = 0;\n foreach($tasks_data as $task) {\n\n $user_tasks['selected'][$nc] = [];\n $user_tasks['selected'][$nc]['id'] = $task->id;\n $user_tasks['selected'][$nc]['title'] = $task->title;\n $nc++;\n }\n\n }\n\n\n }\n\n\n\n $sql = \"company_id = :company_id:\";\n $bind = [];\n $bind['company_id'] = $data->company_id;\n\n $tasks_data = Gem_tasks::find(\n [\n $sql,\n \"bind\" => $bind,\n \"order\" => \"date_add DESC\",\n\n ]\n );\n\n $nc = 0;\n\n if(count($tasks_data) > 0) {\n\n foreach($tasks_data as $task) {\n\n $user_tasks['all'][$nc] = [];\n $user_tasks['all'][$nc]['id'] = $task->id;\n $user_tasks['all'][$nc]['title'] = $task->title;\n $nc++;\n }\n\n }\n\n\n\n\n $data_by_keys['tasks'] = $user_tasks;\n\n }\n\n if($key_val == 'team') {\n\n $team = Teams::findFirstById($data->team_id);\n\n $data_by_keys['team_name'] = '';\n\n if(isset($team->id)) {\n\n $data_by_keys['team_name'] = $team->team_name;\n\n }\n\n\n $data_by_keys['team_id'] = $data->team_id;\n\n }\n\n if($key_val == 'reminder_day') {\n\n $data_by_keys['reminder_day'] = JSON::decode($data->reminder_day);\n\n }\n\n if($key_val == 'reminder_month') {\n\n $data_by_keys['reminder_month'] = JSON::decode($data->reminder_month);\n\n }\n\n if($key_val == 'team_id') {\n\n $data_by_keys['team_id'] = $data->team_id;\n\n }\n\n if($key_val == 'start_work') {\n\n $data_by_keys['start_work'] = $data->start_work;\n\n }\n\n }\n\n return $data_by_keys;\n\n }", "function pushToKeyLoop($dataList,$arrayInput,$childKey=\"child\"){ \n foreach ($dataList as $key => $value) {\n foreach ($value as $keyData => $valueData) {\n $arrayInput = self::pushToKey($key,$keyData,$valueData,$arrayInput,$childKey);\n }\n }\n ksort($arrayInput);\n return $arrayInput;\n}", "private function _standardise_data($data)\n\t{\n\t\t// Empty array\n\t\t$arr = array();\n\t\t$dir_fields = array();\n\n\t\tforeach ($data as $key => $value)\n\t\t{\n\t\t\t// Do we have a directory associated with this input\n\t\t\tif(isset($data[$key.'_directory']))\n\t\t\t{\n\t\t\t\tarray_push($dir_fields, $key.'_directory');\n\t\t\t\t$directory = $data[$key.'_directory'];\n\t\t\t\t$value = '{filedir_'.$directory.'}'.$value;\n\t\t\t}\n\n\t\t\t// If this field is in the dir_fields array, we don't want it\n\t\t\tif(!in_array($key, $dir_fields))\n\t\t\t{\n\t\t\t\t$arr[$key] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $arr;\n\t}", "private function arrKeyVal2NewArr($arr){\n $ret = array();\n foreach($arr as $key=>$val){\n $ret[] = array(\n 'key'=>$key,\n 'val'=>$val,\n );\n }\n return $ret;\n }", "public static function groupBy(& $data, $keys, $obj2array = false)\n {\n // Refactor Array $data structure by $keys\n return self::_refactorBy($data, $keys, $obj2array, $type = 'groupBy');\n }", "protected function fillTypes(array $datakeys): array\n {\n $searchTypes = [];\n foreach ($datakeys as $name => $key) {\n\n if (isset($key['searchable']) && $key['searchable'] == 'false') {\n $searchTypes[] = [];\n } else {\n if (isset($key['searchInput'])) {\n $searchTypes[] = [\n 'type' => $key['searchInput']['type'],\n 'data' => (isset($key['searchInput']['options'])?$key['searchInput']['options']:[]),\n ];\n } else {\n $searchTypes[] = ['type' => 'input', 'data' => []];\n }\n }\n }\n\n return $searchTypes;\n }", "function isi_key($dataset)\n {\n global $ATRIBUT;\n $keys = array_keys($ATRIBUT);\n $arr = array();\n foreach ($dataset as $key => $val) {\n foreach ($val as $k => $v) {\n $arr[$key][$keys[$k - 1]] = strtolower($v);\n }\n }\n\n //echo '<pre>'.print_r($arr, 1).'</pre>'; \n return $arr;\n }", "private function _normalizeData($data)\n\t{\n\t\t$ret = array();\n\t\tforeach($data as $key=>$val)\n\t\t{\n\t\t\tif($val instanceof \\Framework\\Interfaces\\IModelDataType)\n\t\t\t\t$val = $this->_driver->convertModelDataTypeToNativeDataType($val);\n\t\t\telseif(is_array($val))\n\t\t\t\t$val = $this->_normalizeData($val);\n\n\t\t\t//Set value\n\t\t\t$ret[$key] = $val;\n\t\t}\n\n\t\treturn $ret;\n\t}", "public function only($keys, $data)\n {\n # code...\n $placeholder = new stdClass;\n $results = [];\n\n foreach ($data as $d) {\n foreach ($keys as $key) {\n $value = data_get($d, $key, $placeholder);\n if ($value !== $placeholder) {\n $arr[$key] = $value;\n }\n }\n array_push($results, $arr);\n }\n\n return $results;\n }", "function acf_get_sub_array($array, $keys)\n{\n}", "public function changeFieldName($data, $u0, $u1) {\n $dataChanged = array();\n foreach ($data as $key => $value) {\n if ($key === $u0) {\n $dataChanged[$u1] = $value;\n }else {\n $dataChanged[$key] = $value;\n }\n }\n return $dataChanged;\n }", "private function fix_array( $response, $keys ) {\n\t\t$a = &$response;\n\n\t\tfor ( $n = 0; $n < count( $keys ) - 1; $n++ ) {\n\t\t\t$key = $keys[$n];\n\t\t\tif ( !isset( $a[$key] ) )\n\t\t\t\tbreak;\n\t\t\t$a = &$a[$key];\n\t\t}\n\n\t\t$last_key = $keys[count( $keys ) - 1];\n\t\tif ( isset( $a[$last_key] ) ) {\n\t\t\tif ( !isset( $a[$last_key][0] ) || is_string( $a[$last_key] ) ) {\n\t\t\t\t$a[$last_key] = array(\n\t\t\t\t\t$a[$last_key]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $response;\n\t}", "function camel_to_underscore($input, $keys = false)\n{\n if ( ! is_array($input)) {\n return strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $input));\n }\n\n $output = [];\n\n foreach ($input as $key => $value) {\n\n if ($keys) {\n $output[camel_to_underscore($key)] = is_array($value) ? camel_to_underscore($value, $keys) : $value;\n } else {\n $output[$key] = is_array($value) ? camel_to_underscore($value, $keys) : camel_to_underscore($value);\n }\n\n }\n\n return $output;\n}", "function unserialize_keys($keys)\n\t{\n\t\t// ignore if $keys is already an array\n\t\tif(is_array($keys)) return $keys;\n\n\t\tif(ACCESS_MODEL == \"discrete\") {\n\t\t\t// since only keys (and not module/group names) are stored, we\n\t\t\t// know each key from the DB will be a sub-item\n\t\t\t$ak = array();\n\t\t\tforeach(explode(',', $keys) as $k) $ak[] = \"-- $k\";\n\t\t} else if(ACCESS_MODEL == \"roles\") {\n\t\t\t$ak = explode(',', $keys);\n\t\t}\n\t\treturn $ak;\n\t}", "private function sortColumns($data)\n\t{\n\t\t$result = array();\n\t\tforeach ($data as $cell)\n\t\t{\n\t\t\t$row = $cell->key->row;\n\t\t\tif (!isset($result[$row])) {\n\t\t\t\t$result[$row] = new \\stdClass;\n\t\t\t\t$result[$row]->row = $cell->key->row;\n\t\t\t\tforeach ($this->columns as $col) {\n\t\t\t\t\t$pos = strpos($col, ':') ;\n\t\t\t\t\t$qualifier = ($pos) ? substr($col, $pos + 1) : NULL;\n\t\t\t\t\t$col = !$pos ? $col : substr($col, 0, $pos);\n\t\t\t\t\tif (!$qualifier)\n\t\t\t\t\t\t$result[$row]->{$col} = NULL;\n\t\t\t\t\telse if ($qualifier[0] != '/')\n\t\t\t\t\t\t$result[$row]->{$col}[$qualifier] = NULL;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$result[$row]->{$cell->key->column_family}[$cell->key->column_qualifier] = $cell->value;\n\t\t}\n\t\treturn $result;\n\t}", "function dePlucks($array, $key_array){\n $out =[];\n foreach($array as $row){\n $temp = $row;\n foreach ($key_array as $key) {\n unset($temp[$key]);\n }\n $out[] = $temp;\n }\n return $out;\n }", "function get_fancy_data($data)\n {\n /*\n * Initialize value\n */\n $collection = array();\n $basemodel = NULL;\n $i = 0;\n\n /*\n * Outer loop to run untill the data array end\n */\n foreach ($data as $k => $v) {\n /* Ndoe generator */\n $node = array();\n\n /*\n * Preserver first instance of the row in to a dummy variable\n */\n foreach ($v as $key => $val) {\n if (!is_numeric($key)) {\n $keys = explode(\".\", $key);\n $basemodel = isset($basemodel) ? $basemodel : $keys[0];\n $node[$keys[0]][$keys[1]] = $val;\n }\n }\n\n /*\n * Collect the first node baded model id\n */\n $key_cur = isset($key_cur) ? $key_cur : $v[\"$basemodel.id\"];\n\n /*\n * Set the values in correct place of the the node array\n */\n foreach ($node as $y => $z) {\n if ($y == $basemodel) {\n /* For princilple model it save in to a single array */\n $collection[$v[\"$basemodel.id\"]][$y] = $z;\n }\n else {\n if (implode(\"\", $z) != \"\") {\n /* For relational model it save in to a nulti dymantional array array */\n $collection[$v[\"$basemodel.id\"]][$y][] = $z;\n }\n else if (!isset($collection[$v[\"$basemodel.id\"]][$y])) {\n /* Create an empty array of no data found in a relational model */\n $collection[$v[\"$basemodel.id\"]][$y] = array();\n }\n }\n }\n\n /*\n * Reset the array index in a normal sequence\n */\n if ($key_cur != $v[\"$basemodel.id\"]) {\n $collection[$i++] = $collection[$key_cur];\n unset($collection[$key_cur]);\n $key_cur = $v[\"$basemodel.id\"];\n }\n }\n\n /* Reset the last node of the array */\n $collection[$i] = $collection[$key_cur];\n unset($collection[$key_cur]);\n\n return $collection;\n }", "private function prefixValues(array &$keys)\n {\n foreach ($keys as &$key) {\n $this->prefixValue($key);\n }\n }", "protected function process($data)\n {\n $data = array_filter($data, function($el) { return count($el) > 2; });\n $data = array_map('array_filter', $data);\n $data = array_map('array_values', $data);\n\n $result = [];\n foreach ($data as $row) {\n $key = null;\n\n if (count($row) < 3 or count($row) > 4) {\n continue;\n }\n\n if (preg_match('/Polévka/ui', $row[0]))\n $key = static::KEY_SOUPS;\n else if (preg_match('/(Menu|Minutka|Klasika)/ui', $row[0])) {\n unset($row[1]);\n $row = array_values($row);\n $key = static::KEY_MAIN;\n }\n else if (preg_match('/(Food Market)/ui', $row[0])) {\n $row[2] .= ' ' . $row[1];\n unset($row[1]);\n $row = array_values($row);\n $key = 'Teplý pult';\n }\n\n if ($key !== null && isset($row[1]) && isset($row[2])) {\n $result[$key][] = [\n $row[1],\n intval($row[2])\n ];\n }\n }\n return $result;\n }", "private static function space_filter_keys($array, &$keys, $ancestor_key = \"\")\n {\t\t\t\n foreach($array as $key => $value){\n \n // skip the numerical indices\n if(!is_numeric($key))\n $new_key = $ancestor_key\n . ((!empty($ancestor_key)) ? \".\" : \"\")\n . $key;\n else\n $new_key = $ancestor_key;\n \n // don't push the key if it is already present\n if(!in_array($new_key, $keys))\t\t\t\t\t\t\t\t\t\n array_push($keys, $new_key);\n \n if(is_array($value))\n self::space_filter_keys($value, $keys, $new_key);\t\t\t\t\t\t\t\t\t\n }\t\t\t\t\n }", "function explodeUpdate($data_arr)\n\t{\n\t\t$ret=\"\";\n\t\twhile(list($key,$value)=each($data_arr))\n\t\t{\n\t\t\tif(!is_numeric($key))\n\t\t\t{\n\t\t\t\tif($ret)\n\t\t\t\t{\n\t\t\t\t\t$ret.=\",\" . $key . \"=\" . $this->sqlFormatField($value);\n\t\t\t\t}else{\n\t\t\t\t\t$ret=$key . \"=\" . $this->sqlFormatField($value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "function jr_reset_data( $data ) {\r\n\r\n\t$new_data = array();\r\n\tforeach ( $data as $key => $value )\r\n\t\t$new_data[$key] = reset($value);\r\n\r\n\treturn $new_data;\r\n}", "private function prepare($data)\n {\n foreach ($data as $code => &$item) {\n $item = $this->prepareItem($code, $item);\n }\n return $data;\n }", "private function fixFilesArray(array $data): array\n {\n $output = [];\n\n foreach ($data as $name => $array) {\n foreach ($array as $field => $value) {\n $pointer = &$output[$name];\n\n if (! is_array($value)) {\n $pointer[$field] = $value;\n\n continue;\n }\n\n $stack = [&$pointer];\n $iterator = new RecursiveIteratorIterator(\n new RecursiveArrayIterator($value),\n RecursiveIteratorIterator::SELF_FIRST\n );\n\n foreach ($iterator as $key => $val) {\n array_splice($stack, $iterator->getDepth() + 1);\n $pointer = &$stack[count($stack) - 1];\n $pointer = &$pointer[$key];\n $stack[] = &$pointer;\n if (! $iterator->hasChildren()) {\n $pointer[$field] = $val;\n }\n }\n }\n }\n\n return $output;\n }", "public function preprocessData()\n {\n $data = $this->getData();\n $preData = [\n 'replace' => null,\n 'remove' => null,\n 'append' => null,\n ];\n\n // Set the data to change and data to remove.\n if (!empty($data['role'])) {\n $preData['remove']['o:role'] = $data['role'];\n }\n if (array_key_exists('is_active', $data) && in_array($data['is_active'], ['0', '1'])) {\n $preData['remove']['o:is_active'] = $data['is_active'];\n }\n\n // Set remaining elements according to attribute data-collection-action.\n $processeds = [\n 'role', 'is_active',\n 'csrf', 'id', 'o:id',\n ];\n foreach ($data as $key => $value) {\n if (is_numeric($key) || in_array($key, $processeds)\n || is_null($value) || $value === ''\n ) {\n continue;\n }\n $collectionAction = $this->has($key)\n ? $this->get($key)->getAttribute('data-collection-action')\n : 'replace';\n $preData[$collectionAction][$key] = $value;\n }\n\n return array_filter($preData);\n }", "private static function normalize($data)\n {\n $normalized = array();\n foreach ($data as $key => $value) {\n if (in_array($key, self::$documentInfoFields)) {\n $normalized['Info'][$key] = $value;\n } elseif (is_array($value)) {\n if (!isset($normalized[$key])) {\n $normalized[$key] = array();\n }\n $normalized[$key] = array_merge($normalized[$key], $value);\n }\n }\n return $normalized;\n }", "function GetOldData($TableName,$FieldNames) {\n $Query = \"SELECT * FROM `\".$TableName.\"`;\";\n $Result = mysql_query($Query) or die(\"Error in query: $query \".mysql_error());\n $NumResults = mysql_num_rows($Result);\n if ($NumResults > 0) {\n while ($row = mysql_fetch_array($Result,MYSQL_ASSOC)) {\n foreach ($FieldNames as $FieldName) {\n $array[$row[DmrID]][$FieldName] = $row[$FieldName]; //AM I OVERTHINKING THIS?\n }\n }\n }\n if (is_null($array))\n {\n return array();\n }\n else\n {\n return $array;\n }\n}", "function sort_array_by_other_array($arr, $keys_arr, $num_field) {\n\t$new_arr = array();\n\t$left_arr = $arr;\n\t\n\tforeach($keys_arr as $key=>$value) {\n\t\tforeach($arr as $key2=>$value2) {\n\t\t\tif($value2[$num_field] == $value) {\n\t\t\t\t$new_arr[] = $value2;\n\t\t\t\tunset($left_arr[$key2]);\n\t\t\t}\t\n\t\t}\n\t}\t\n\t$new_arr = array_merge($new_arr, $left_arr);\n\treturn $new_arr;\n}", "function _delete_array($array, $keys, $key = '')\n{\n\t// loop through array\n\tforeach($array as $k => $value)\n\t{\n\t\t// get current key\n\t\t$key = trim($key.'/'.$k,'/');\n\t\t// check if key is supposed to stay & $value is not an array\n\t\tif( !in_array($key, $keys) && !is_array($value) )\n\t\t{\n\t\t\t$new_array[$k] = $value;\n\t\t}\n\t\t// if value is array go deeper\n\t\telseif(!in_array($key, $keys))\n\t\t{\n\t\t\t$new_array[$k] = _delete_array($value, $keys, $key);\n\t\t}\n\t\t$key = str_replace($k, '', $key);\n\t\t$key = trim($key, '/');\n\t}\n\t// return new array\n\treturn variable($new_array);\n}", "protected function getFormatedRows(array $data) : array{\n\n foreach($data as $k => $v){\n\t\t\t$data[$k] = array_values($v);\n\t\t}\n return $data;\n }", "public function dataFix($data)\n {\n $items = [];\n\n if (!empty($data) && is_array($data)) {\n foreach ($data as $item) {\n if (!empty($item['value'])) {\n if (!empty($item['key']))\n $items[$item['key']] = $item['value'];\n else\n $items[$item['value']] = $item['value'];\n }\n }\n }\n\n return $items;\n }", "private function _removeUnderscores($data)\n {\n if (is_array($data))\n {\n foreach ($data as $key => $value)\n {\n if (substr($key, 0, 1) == '_')\n {\n unset($data[$key]);\n }\n elseif (is_array($value))\n {\n $data[$key] = $this->_removeUnderscores($value);\n }\n }\n }\n\n return $data;\n }", "function getFieldNameByTag($key)\n {\n\n $array = [\n 'NameTitle' => ['field' => 'name_title', 'fieldType' => 'string'],\n 'FirstName' => ['field' => 'persona_fname', 'fieldType' => 'string'],\n 'LastName' => ['field' => 'persona_lname', 'fieldType' => 'string'],\n 'RefreeName' => ['field' => 'persona_fname', 'fieldType' => 'string'],\n 'ReferredUser' => ['field' => 'persona_fname', 'fieldType' => 'string'],\n 'ReferralCode' => ['field' => 'referral_code', 'fieldType' => 'string'],\n 'ActivationCode' => ['field' => 'activation_code', 'fieldType' => 'string'],\n 'MiddleInitial' => ['field' => 'middle_initial', 'fieldType' => 'string'],\n 'OtherName' => ['field' => 'other_name', 'fieldType' => 'string'],\n\n 'Balance' => ['field' => 'balance', 'fieldType' => 'integer'],\n 'MembershipId' => ['field' => 'membership_id', 'fieldType' => 'integer'],\n 'year' => ['field' => 'year', 'fieldType' => 'integer'],\n 'month' => ['field' => 'month', 'fieldType' => 'integer'],\n 'date' => ['field' => 'date', 'fieldType' => 'integer'],\n 'ExpiryDatetime' => ['field' => 'expiry_datetime', 'fieldType' => 'date'],\n 'Id' => ['field' => '_routing', 'fieldType' => 'integer'],\n 'MembershipTypeId' => ['field' => 'membership_type_id', 'fieldType' => 'integer'],\n 'Status' => ['field' => 'status', 'fieldType' => 'string'],\n 'RatingGradeId' => ['field' => 'rating_grade_id', 'fieldType' => 'integer'],\n 'PointTypeId' => ['field' => 'point_type_id', 'fieldType' => 'integer'],\n 'TicketCount' => ['field' => 'ticket_count', 'fieldType' => 'integer'],\n\n 'Email' => ['field' => 'persona_email', 'fieldType' => 'string'],\n 'HomeTelephone' => ['field' => 'phone_numbers', 'fieldType' => 'integer'],\n 'Mobile' => ['field' => 'phone_numbers', 'fieldType' => 'integer'],\n 'ContactOnEmail' => ['field' => 'email_subscribed_flag', 'fieldType' => 'string'],\n 'ContactOnMobile' => ['field' => 'sms_subscribed_flag', 'fieldType' => 'string'],\n 'ContactOnMail' => ['field' => 'mail_subscribed_flag', 'fieldType' => 'string'],\n 'Country' => ['field' => 'residential_address.country', 'fieldType' => 'string'],\n 'PostalCode' => ['field' => 'postal_address.postal_code', 'fieldType' => 'integer'],\n 'Locality' => ['field' => 'residential_address.suburb', 'fieldType' => 'string'],\n 'PostalAddress1' => ['field' => 'postal_address.address_1', 'fieldType' => 'string'],\n 'ResPostalCode' => ['field' => 'residential_address.postal_code', 'fieldType' => 'string'],\n 'ResLocality' => ['field' => 'residential_address.suburb', 'fieldType' => 'string'],\n 'ResStateProvince' => ['field' => 'residential_address.state', 'fieldType' => 'string'],\n 'ResAddress1' => ['field' => 'residential_address.address_1', 'fieldType' => 'string'],\n 'WorkTelephone' => ['field' => 'phone_numbers.work_phone', 'fieldType' => 'integer'],\n\n 'VenueAddress' => ['field' => 'address', 'fieldType' => 'string'],\n 'VenueName' => ['field' => 'venue_name', 'fieldType' => 'string'],\n 'VenuePhoneNo' => ['field' => 'telephone', 'fieldType' => 'integer'],\n 'VenuePhoneNumber' => ['field' => 'telephone', 'fieldType' => 'integer'],\n\n 'LastVisit' => ['field' => 'date_added', 'fieldType' => 'date'],\n 'LastPOSEntry' => ['field' => 'sale_datetime', 'fieldType' => 'date'],\n 'LastKioskEntry' => ['field' => 'entry_datetime', 'fieldType' => 'date'],\n 'LastGamePlay' => ['field' => 'transaction_datetime', 'fieldType' => 'date'],\n 'CreationDatetime' => ['field' => 'creation_datetime', 'fieldType' => 'date'],\n\n 'MycashExpiry' => ['field' => 'latest_transaction_date_time', 'fieldType' => 'string'],\n 'MycashBalance' => ['field' => 'balance', 'fieldType' => 'integer'],\n\n 'POS' => ['field' => 'item_description', 'fieldType' => 'string'],\n 'BarrelDraw' => ['field' => 'description', 'fieldType' => 'string'],\n\n\n 'VenueNameDesign' => ['field' => 'venue_name', 'fieldType' => 'string'],\n 'VenueAddressDesign' => ['field' => 'address', 'fieldType' => 'string'],\n 'discount' => ['field' => 'discount', 'fieldType' => 'string'],\n 'DiscountPrice' => ['field' => 'DiscountPrice', 'fieldType' => 'string'],\n 'Discount' => ['field' => 'Discount', 'fieldType' => 'string'],\n\n 'facebook' => ['field' => 'facebook_id', 'fieldType' => 'string'],\n 'twitter' => ['field' => 'twitter_id', 'fieldType' => 'string'],\n 'instagram' => ['field' => 'instagram_id', 'fieldType' => 'string']\n ];\n\n foreach ($this->custom_fields as $key2 => $value2){\n $array[\"custom_\".$value2->field_name] = ['field' => $value2->field_name, 'fieldType' => 'string'];\n }\n\n\n\n\n return (array_key_exists($key, $array)) ? $array[$key] : '';\n }", "private function mkRefs($data) {\n $refs = array();\n foreach ($data as $k=>$v) $refs[$k] = &$data[$k];\n return $refs;\n }", "abstract public function array2Data($arr);", "protected function getKeysByData($data)\n\t{\n\t\t$keys_x = array_keys($data);\n\t\t\n\t\t$keys_y = array();\n\t\t\n\t\tforeach($keys_x as $x_key)\n\t\t{\n\t\t\tforeach($data[$x_key] as $y_key => $value)\n\t\t\t{\n\t\t\t\tif(!in_array($y_key, $keys_y)){\n\t\t\t\t\t\n\t\t\t\t\t$keys_y[] = $y_key;\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\n\t\treturn array($keys_x, $keys_y);\n\t}", "function change_index(&$tableau, $old_key, $new_key) {\n $changed = FALSE; $temp = 0;\n \n foreach ($tableau as $key => $value) {\n switch ($changed) {\n case FALSE :\n //creates the new key and deletes the old\n if ($key == $old_key) {\n $tableau[$new_key] = $tableau[$old_key];\n unset($tableau[$old_key]);\n $changed = TRUE;\n }\n break;\n\n case TRUE :\n //moves following keys\n if ($key != $new_key){\n $temp= $tableau[$key];\n unset($tableau[$key]);\n $tableau[$key] = $temp;\n break;\n } else {$changed = FALSE;} //stop\n }\n }\n array_values($tableau); //free_memory\n}", "function splitProperties($item_data)\r\n {\r\n\t\t\t$properties = array();\r\n\t\t\tforeach($item_data as $property)\r\n\t\t\t{\r\n\t\t\t\t$properties[$property['name']]['data'] = $property['data'];\r\n\t\t\t\t$properties[$property['name']]['attr'] = $property['attr'];\r\n\t\t\t\tif (sizeof($property['child']))\r\n\t\t\t\t{\r\n\t foreach($property['child'] as $k=>$p)\r\n\t {\r\n\t $properties[$property['name'].\"_\".$p['name'].$k]['data'] = $p['data'];\r\n\t \t\t\t $properties[$property['name'].\"_\".$p['name'].$k]['attr'] = $p['attr'];\r\n\t \t\t\t if (sizeof($p['child']))\r\n\t \t\t\t {\r\n\t foreach($p['child'] as $q)\r\n\t {\r\n\t \tif (isset($properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']]))\r\n\t \t{\r\n\t \tif (!isset($properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']]['nbre']))\r\n\t \t{\r\n\t \t$properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']]['nbre'] = 0;\r\n\t \t$properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name'].'0'] = $properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']];\r\n\t \t}\r\n\t \t$properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']]['nbre']++;\r\n\t \t$q['name'] = $q['name'].$properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']]['nbre'];\r\n\t }\r\n\r\n\t $properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']]['data'] = $q['data'];\r\n\t $properties[$property['name'].\"_\".$p['name'].$k.\"_\".$q['name']]['attr'] = $q['attr'];\r\n\t }\r\n\t }\r\n\t }\r\n\t }\r\n\t\t\t}\r\n\t\t\treturn $properties;\r\n }", "private function normalize_keywords()\r\n {\r\n /*\r\n 'ident_keywords' => array(\r\n 'type'=>'complex',\r\n 'is_repeated'=>true,\r\n 'xpath'=>'//gmd:identificationInfo/gmd:MD_DataIdentification/gmd:descriptiveKeywords/gmd:MD_Keywords',\r\n 'items'=>array(\r\n 'keyword'=> array(\r\n 'type'=>'array',\r\n 'xpath'=>'gmd:keyword',\r\n 'is_repeated'=>true,\r\n ),\r\n 'type'=> array(\r\n 'type'=>'text',\r\n 'xpath'=>'gmd:type',\r\n 'is_repeated'=>false\r\n ),\r\n 'thesaurus'=> array(\r\n 'type'=>'text',\r\n 'xpath'=>'gmd:thesaurusName/gmd:CI_Citation/gmd:title',\r\n 'is_repeated'=>false\r\n )\r\n )\r\n ),\r\n */\r\n \r\n $keywords=$this->xpath_map['ident_keywords']['data'];\r\n \r\n $output=array();\r\n foreach($keywords as $row)\r\n {\r\n foreach($row['keyword'] as $keyword)\r\n { \r\n $output[]=array(\r\n 'keyword' => $keyword,\r\n 'type' => @$row['type'],\r\n 'thesaurus' => @$row['thesaurus'] \r\n ); \r\n }\r\n }\r\n $this->xpath_map['ident_keywords']['data']=$output;\r\n }", "protected function _translateRow(array $data, $key = null)\n {\n $newData = array();\n\n $newData['topic_id'] = $data['thread_id'];\n if( $data['forum_id'] )\n $newData['forum_id'] = $data['forum_id'];\n $newData['user_id'] = $data['user_id'];\n $newData['title'] = $data['title'];\n $newData['closed'] = $data['is_closed'];\n $newData['creation_date'] = $this->_translateTime($data['time_stamp']);\n $newData['modified_date'] = $this->_translateTime($data['time_update']);\n $newData['sticky'] = $data['order_id'];\n $newData['lastposter_id'] = $data['last_user_id'] ? $data['last_user_id'] : $data['user_id'];\n $newData['view_count'] = $data['total_view'];\n $type_id = '';\n //FIND WHEATER THIS FORUM IS PAGES FORUM AND FIND PAGES TYPE\n if( !$data['forum_id'] ) {\n $type_id = $this->getFromDb()->select()\n ->from($this->getfromPrefix() . 'pages', 'type_id')\n ->where('page_id = ?', $data['group_id'])\n ->query()\n ->fetchColumn();\n }\n $albumTitle = 'Forum Photos';\n $isGroupForum = false;\n if( !empty($type_id) ) {\n\n $newData['group_id'] = $data['group_id'];\n $albumTitle = 'Group Photos';\n $isGroupForum = true;\n //INSERT GROUP FORUM TOPIC\n $this->getToDb()->insert('engine4_group_topics', $newData);\n } else {\n //INSERT THE FORUM TOPIC\n $this->getToDb()->insert('engine4_forum_topics', $newData);\n }\n\n $topic_id = $this->getToDb()->lastInsertId();\n //FIND ALL THE POST OF THIS TOPIC\n $posts = $this->getFromDb()->select()\n ->from($this->getfromPrefix() . 'forum_post', '*')\n ->where('thread_id = ?', $data['thread_id'])\n ->query()\n ->fetchAll();\n $newPostData = array();\n $count = 0;\n //INSERT ALL THE POST OF TOPIC\n foreach( $posts as $post ) {\n //GETTING TEXT\n $text = $this->getFromDb()->select()\n ->from($this->getfromPrefix() . 'forum_post_text', 'text')\n ->where('post_id = ?', $post['post_id'])\n ->query()\n ->fetchColumn();\n\n if( is_null($text) || $text === false )\n $text = '';\n\n $userInfo = array(\n 'user_id' => $post['user_id'],\n 'time_stamp' => $post['time_stamp'],\n 'text' => $text,\n 'item_id' => $post['post_id'],\n 'album_title' => $albumTitle,\n 'album_type' => 'forum',\n 'categoryId' => 'forum'\n );\n if( !empty($type_id) ) {\n $userInfo['page_id'] = $data['group_id'];\n $userInfo['album_table'] = 'group_albums';\n }\n //FIND THE POST BODY\n $body = $this->getBody($userInfo);\n if( is_null($body) )\n $body = '';\n\n $newPostData['post_id'] = $post['post_id'];\n $newPostData['topic_id'] = $data['thread_id'];\n if( $data['forum_id'] )\n $newPostData['forum_id'] = $data['forum_id'];\n $newPostData['user_id'] = $post['user_id'];\n $newPostData['body'] = $body;\n $newPostData['creation_date'] = $this->_translateTime($post['time_stamp']);\n $newPostData['modified_date'] = $post['update_time'] ? $this->_translateTime($post['update_time']) : $this->_translateTime($post['time_stamp']);\n// INSERT THE FORUM POST\n if( $isGroupForum ) {\n $newPostData['group_id'] = $data['group_id'];\n $this->getToDb()->insert('engine4_group_posts', $newPostData);\n } else {\n $this->getToDb()->insert('engine4_forum_posts', $newPostData);\n }\n $post_id = $this->getToDb()->lastInsertId();\n //UPDATE THE COUNT OF POST INTO THE TOPIC\n if( $isGroupForum ) {\n $this->getToDb()->update('engine4_group_topics', array(\n 'lastpost_id' => $post_id,\n 'post_count' => ++$count\n ), array(\n 'topic_id = ?' => $topic_id\n ));\n } else {\n $this->getToDb()->update('engine4_forum_topics', array(\n 'lastpost_id' => $post_id,\n 'post_count' => ++$count\n ), array(\n 'topic_id = ?' => $topic_id,\n 'forum_id = ?' => $data['forum_id'],\n ));\n }\n }\n //PREPARE AN ARRAY FOR TOPIC WATCHES\n $newWatchData = array();\n if( $data['forum_id'] )\n $newWatchData['resource_id'] = $data['forum_id'];\n\n $newWatchData['topic_id'] = $data['thread_id'];\n $newWatchData['user_id'] = $data['user_id'];\n $newWatchData['watch'] = 1;\n if( $isGroupForum ) {\n $newWatchData['resource_id'] = $data['group_id'];\n $this->getToDb()->insert('engine4_group_topicwatches', $newWatchData);\n } else {\n $this->getToDb()->insert('engine4_forum_topicwatches', $newWatchData);\n }\n\n if( $data['forum_id'] ) {\n //PREPARE AN ARRAY FOR TOPIC VIEW\n $newTopicViewsData = array();\n $newTopicViewsData['user_id'] = $data['user_id'];\n $newTopicViewsData['topic_id'] = $data['thread_id'];\n $newTopicViewsData['last_view_date'] = $this->_translateTime($data['time_stamp']);\n $this->getToDb()->insert('engine4_forum_topicviews', $newTopicViewsData);\n //FIND THE FORUM DETAIL\n $forums = $this->getFromDb()->select()\n ->from($this->getfromPrefix() . 'forum', '*')\n ->where('forum_id = ?', $data['forum_id'])\n ->where('thread_id = ?', $data['thread_id'])\n ->query()\n ->fetchAll();\n //UPDATE THE POST COUNT INTO THE FORUM\n foreach( $forums as $forum ) {\n $this->getToDb()->update('engine4_forum_forums', array(\n 'topic_count' => $forum['total_thread'],\n 'post_count' => $forum['total_post'] + 1,\n 'lastpost_id' => $post_id,\n 'lastposter_id' => $forum['last_user_id'],\n ), array(\n 'forum_id = ?' => $data['forum_id'],\n ));\n }\n }\n }", "public static function indexBy(& $data, $keys, $obj2array = false)\n {\n // Refactor Array $data structure by $keys\n return self::_refactorBy($data, $keys, $obj2array, $type = 'indexBy');\n }", "private function prepareData($data)\n {\n $data = (is_array($data)) ? $data : json_decode($data, true);\n $prepareData = array();\n foreach ($data as $key => $value) {\n switch ($key) {\n case 'Nome':\n case 'Sobrenome':\n case 'Email':\n case 'Telefone':\n $prepareData[$key] = $value;\n break;\n }\n }\n return $prepareData;\n }", "function explodeData($data_arr)\n\t{\n\t\t$keys=\"\";\n\t\t$vals=\"\";\n\t\twhile(list($key,$value)=each($data_arr))\n\t\t{\n\t\t\t// check to weed out numeric based keys\n\t\t\tif(!is_numeric($key))\n\t\t\t{\n // $ky=$this->sqlFormatField($key);\n $ky=$key;\n\t\t\t\tif($keys)\n\t\t\t\t{\n\t\t\t\t\t$keys.=\",\" . $ky;\n\t\t\t\t}else{\n\t\t\t\t\t$keys=$ky;\n\t\t\t\t}\n\t\t\t\t$val=$this->sqlFormatField($value);\n\t\t\t\tif($vals)\n\t\t\t\t{\n\t\t\t\t\t$vals.=\",\" . $val;\n\t\t\t\t}else{\n\t\t\t\t\t$vals=$val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"(\" . $keys . \") values (\" . $vals . \")\";\n\t}", "public function setKeys($data)\r\n\t{\r\n\t\tforeach ($data as $key => $value)\r\n\t\t\t$this->keys[$key]->data = $value;\r\n\t\treturn $this;\r\n\t}", "protected function _cloneObjects(array &$data, $key = '')\n {\n foreach ($data as $subKey => $value) {\n $valueKey = ($key !== '' ? $key . '/' . $subKey : $subKey);\n \n if (is_array($value)) {\n $this->_cloneObjects($data[$subKey], $valueKey);\n } elseif (in_array($valueKey, $this->_clonableObjectsKeys, true)) {\n $data[$subKey] = clone $value;\n }\n }\n }", "public static function renameKeys(array $array, array $keys): array\n {\n\n $new_array = [];\n\n foreach ($array as $k => $v) {\n\n if (array_key_exists($k, $keys)) {\n\n $new_array[$keys[$k]] = $v;\n\n } else {\n\n $new_array[$k] = $v;\n\n }\n\n }\n\n return $new_array;\n\n }", "static function key_on_sub_key($arrays, $sub_key='id', $options=[]){\n\t\t$new_arrays = [];\n\n\t\tif(empty($options['collision_handler'])){\n\t\t\t$options['collision_handler'] = function($sub_key_value, $previous_value, $new_value){\n\t\t\t\tthrow new Exception('Keys have collided with '.json_encode(func_get_args()));\n\t\t\t};\n\t\t}\n\n\t\tforeach($arrays as $array){\n\t\t\t$sub_key_value = $array[$sub_key];\n\t\t\t$value = $array;\n\t\t\tif(array_key_exists($sub_key_value, $new_arrays)){\n\t\t\t\t$value = $options['collision_handler']($sub_key_value, $new_arrays[$sub_key_value], $value);\n\t\t\t}\n\t\t\t$new_arrays[$sub_key_value] = $value;\n\t\t}\n\t\treturn $new_arrays;\n\t}", "public static function addToDetails($keys,$d){\nif(is_object($d))$d=(array)$d; //Allow $d to be an object\nif(!is_array($keys))$keys=array($keys); //So it will work when $keys is a string\nif(is_array($d)){\n foreach($keys as $k){\n if(array_key_exists($k,$d))self::$details[$k]=$d[$k];\n }\n }\n}", "public static function indexOnly(& $data, $keys, $obj2array = false)\n {\n // Refactor Array $data structure by $keys\n return self::_refactorBy($data, $keys, $obj2array, $type = 'indexOnly');\n }", "function resetKeys() {\n $this->keys = array_keys($this->records);\n }", "function sanitizeArray( &$data, $whatToKeep )\n{\n $data = array_intersect_key( $data, $whatToKeep ); \n \n foreach ($data as $key => $value) {\n\n $data[$key] = sanitizeOne( $data[$key] , $whatToKeep[$key] );\n\n }\n}", "function atk_array_merge_keys()\n{\n\t$args = func_get_args();\n\t$result = array();\n\tforeach($args as $array)\n\t{\n\t\tforeach($array as $key=>$value)\n\t\t{\n\t\t\t$result[$key] = $value;\n\t\t}\n\t}\n\treturn $result;\n}", "function prepareParams($data){\r\n\t$param_info = $this->getParamInfo();\r\n\t$param_ids = array();\r\n\t$param_types = array();\r\n\r\n\tforeach($param_info as $p_i){\r\n\t\t$param_ids[$p_i['param']] = $p_i['id'];\r\n\t\t$param_types[$p_i['param']] = $p_i['param_type'];\r\n\t}\r\n\t$new_params = array();\r\n\tforeach($data as $k=>$v){\r\n\t\tif(isset($param_ids[$k]) && $param_types[$k] == 'text'){\r\n\t\t\t$new_params[$param_ids[$k]][0] = $v;\r\n\t\t}\r\n\t\telseif(isset($param_ids[$k])){\r\n\t\t\tif(is_array($v)){\r\n\t\t\t\t$v = implode(',',$v);\r\n\t\t\t}\r\n\t\t\t$new_params[$param_ids[$k]][1] = $v;\r\n\t\t\t$new_params[$param_ids[$k]][0] = $data[$k.'_text_value'];\r\n\t\t}\r\n\t}\r\n\treturn $new_params;\r\n}", "function childKeys($key,$array) {\n\tif (is_array($array)) {\n\t\t$returnArray = array();\n\t\tforeach ($array as $childArray) { $returnArray[$childArray[$key]] = $childArray; }\n\t\treturn($returnArray);\n\t}\n}", "function reArrayFiles(&$file_post) {\n\n $file_ary = array();\n $file_count = count($file_post['name']);\n $file_keys = array_keys($file_post);\n\n for ($i=0; $i<$file_count; $i++) {\n foreach ($file_keys as $key) {\n $file_ary[$i][$key] = $file_post[$key][$i];\n }\n }\n\n return $file_ary;\n}", "protected function _formatData($data) {\n $data['Headers'] = Hash::combine($data, 'Headers.{n}.Name', 'Headers.{n}.Value');\n return $data;\n }", "function transposeData($data) {\r\n $retData = array();\r\n foreach ($data as $row => $columns) {\r\n foreach ($columns as $row2 => $column2) {\r\n \t\t$retData[$row2][$row] = $column2;\r\n }\r\n }\r\n\treturn $retData;\r\n}", "function extractFields(&$data, $fields, $ignoredFields) {\n\t//sanitize whole array of room + bookings fields\n\t$out = [];\n\tforeach ($fields as $field) {\n\t\t$out[$field] = $data[0][$field];\n\t\tfor ($i = 0; $i < count($data); $i++)\n\t\t\tunset($data[$i][$field]);\n\t}\n\tforeach ($ignoredFields as $field) {\n\t\tfor ($i = 0; $i < count($data); $i++)\n\t\t\tunset($data[$i][$field]);\n\t}\n\treturn $out;\n}", "public static function internalizeMultifieldData(array $data, array &$entityFields)\n\t{\n\t\tforeach($data as $typeName => $items)\n\t\t{\n\t\t\tif(!isset($entityFields[$typeName]))\n\t\t\t{\n\t\t\t\t$entityFields[$typeName] = array();\n\t\t\t}\n\n\t\t\tforeach($items as $itemID => $item)\n\t\t\t{\n\t\t\t\t$entityFields[$typeName][] = array_merge(array('ID' => $itemID), $item);\n\t\t\t}\n\t\t}\n\t}", "public function equalizeArrayKeys(array &$array)\n {\n /** note to self: using nested for each to ensure that numeric array keys are preserved */\n\n $fields = [];\n foreach ($array as &$subarray) {\n foreach ($subarray as $key => $value) {\n $fields[$key] = null;\n }\n }\n\n foreach ($array as &$subarray) {\n $newData = $fields;\n foreach ($fields as $field => $null) {\n if (isset($subarray[$field])) {\n $newData[$field] = $subarray[$field];\n }\n }\n $subarray = $newData;\n $newData = null;\n }\n }", "protected function _prepareData($data)\n {\n foreach ($this->_mapAttributes as $attributeAlias => $attributeCode) {\n if (isset($data[$attributeAlias])) {\n $data[$attributeCode] = $data[$attributeAlias];\n unset($data[$attributeAlias]);\n }\n }\n return $data;\n }", "function reArrange($source)\r\n{\r\n\t\r\n\t$i = 0;\r\n\t$fact_id=\"\";\r\n\t\t\t\r\n\tforeach($source as $key=>$val)\r\n\t{\t\r\n\t\t$res[$i]['Zone'] = $val['factories']['Zone'];\r\n\t\t\r\n\t\tif( intval($val['RESULT']['status']) == 0 ) \r\n\t\t{\r\n\t\t\t$fact_id = $val['RESULT']['factory_id'];\r\n\t\t\t\r\n\t\t\t$res[$i]['base_fact_id'] = $val['RESULT']['factory_id'];\r\n\t\t\t$res[$i]['base_fact_name'] = $val['factories']['factory_name'];\r\n\t\t\t$res[$i]['base_point'] = $val['RESULT']['points'];\r\n\t\t\t\r\n\t\t\t$res[$i]['follow_fact_id'] = \"\";\r\n\t\t\t$res[$i]['follow_point'] = \"\";\r\n\t\t}\r\n\t\t\t\r\n\t\telseif( intval($val['RESULT']['status']) != 0 ) \r\n\t\t{\r\n\t\t\tif($val['RESULT']['factory_id'] == $fact_id)\r\n\t\t\t{\r\n\t\t\t\t$res[$i-1]['follow_fact_id'] = $val['RESULT']['factory_id'];\r\n\t\t\t\t$res[$i-1]['follow_point'] = $val['RESULT']['points'];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$res[$i]['base_fact_id'] = \"\";\r\n\t\t\t\t$res[$i]['base_point'] = \"\";\r\n\t\t\t\t\r\n\t\t\t\t$res[$i]['follow_fact_id'] = $val['RESULT']['factory_id'];\r\n\t\t\t\t$res[$i]['follow_fact_name'] = $val['factories']['factory_name'];\r\n\t\t\t\t$res[$i]['follow_point'] = $val['RESULT']['points'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$i++;\r\n\t}\r\n\t\r\n\treturn $res;\t\t\r\n}", "function unset_array_keys($array, $keys) {\n $new_array = array();\n foreach($array as $arr) {\n foreach($arr as $key => $val) {\n if(in_array($key, $keys)) {\n unset($arr[$key]);\n }\n }\n array_push($new_array, $arr);\n }\n return $new_array;\n}", "function prepareData(){\n $this->ref = array();\n foreach($this->getIterator() as $junk=>$item){\n // current values\n $id = $item[$this->id_field];\n \n // save item\n $this->items[$id] = $item;\n \n // save relation\n if(isset($item[$this->parent_id_field])) {\n $this->ref[$item[$this->parent_id_field]][] = $id;\n } else {\n $this->ref[undefined][] = $id;\n }\n }\n }", "protected function cleanArray(array $data, $keyPrefix = '')\n {\n foreach ($data as $key => $value) {\n $data[$key] = $this->cleanValue($keyPrefix.$key, $value);\n }\n\n // abi_r('Array');abi_r($data);\n\n return collect($data)->all();\n }", "function acf_extract_vars(&$array, $keys)\n{\n}", "private function multiSelectArray($array,$keys) {\n $result = array();\n foreach ($keys as $key) {\n if(array_key_exists($key, $array)) {\n $result[$key] = $array[$key];\n }\n else {\n $result[$key] = \"\";\n }\n\n }\n return $result;\n }", "function CleanActionData($arrCalendarData){\n $arrReturnArray = array();\n foreach($arrCalendarData as $varCalendarId=>$arrData){\n if(is_array($arrData)){\n $arrReturnArray[$varCalendarId] = array();\n foreach($arrData as $intKey=>$varDays){\n if(is_array($varDays)){\n $arrReturnArray[$varCalendarId][] = $intKey;\n }\n }\n }\n }\n return ($arrReturnArray);\n }", "private static function _cookData($data) {\n\t\t$tmp = array();\n\t\tif (isset($data['name'])) $tmp['name'] = $data['name'];\n\t\tif (isset($data['link'])) $tmp['link'] = $data['link'];\n\t\tif (isset($data['img'])) $tmp['img'] = $data['img'];\n\t\tif (isset($data['sort'])) $tmp['sort'] = intval($data['sort']);\n\t\tif (isset($data['hits'])) $tmp['hits'] = intval($data['hits']);\n\t\tif (isset($data['status'])) $tmp['status'] = $data['status'];\n\t\tif (isset($data['type_id'])) $tmp['type_id'] = $data['type_id'];\n\t\tif (isset($data['descrip'])) $tmp['descrip'] = $data['descrip'];\n\t\tif (isset($data['is_recommend'])) $tmp['is_recommend'] = $data['is_recommend'];\n\t\tif (isset($data['star'])) $tmp['star'] = $data['star'];\n\t\treturn $tmp;\n\t}", "private static function sortByKey(&$arr,&$key){\n $newArr=[];\n for($i=0;$i<count($arr);$i++){\n\n $newArr[]=$arr[$key[$i]];\n }\n $arr=$newArr;\n }", "public static function format($data, $format, $keys)\n {\n $extracted = [];\n $count = count($keys);\n \n if (!$count) {\n return false;\n }\n \n $data = self::prepareDataArray($data);\n for ($i = 0; $i < $count; $i++) {\n $extracted[] = self::extract($data, $keys[$i]);\n }\n $out = [];\n $data = $extracted;\n $count = count($data[0]);\n \n if (preg_match_all('/\\{([0-9]+)\\}/msi', $format, $keys2) && isset($keys2[1])) {\n $keys = $keys2[1];\n $format = preg_split('/\\{([0-9]+)\\}/msi', $format);\n $count2 = count($format);\n \n for ($j = 0; $j < $count; $j++) {\n $formatted = '';\n for ($i = 0; $i <= $count2; $i++) {\n if (isset($format[$i])) {\n $formatted .= $format[$i];\n }\n if (isset($keys[$i]) && isset($data[$keys[$i]][$j])) {\n $formatted .= $data[$keys[$i]][$j];\n }\n }\n $out[] = $formatted;\n }\n } else {\n $count2 = count($data);\n for ($j = 0; $j < $count; $j++) {\n $args = [];\n for ($i = 0; $i < $count2; $i++) {\n if (array_key_exists($j, $data[$i])) {\n $args[] = $data[$i][$j];\n }\n }\n $out[] = vsprintf($format, $args);\n }\n }\n return $out;\n }", "function acf_add_array_key_prefix($array, $prefix)\n{\n}", "private function getCodeKey($data){\n\t\t$res=array();\n\t\tforeach ($data as $i => $value) {\n\t\t\t if(substr($i,0,4)=='cod_'){\t\t\t \t\n\t\t\t\t$res[] = str_replace('_', '.', substr($i,4));\t\n\t\t\t }\n\t\t}\t\t\n\t\tsort($res);\n\t\treturn $res;\t\t\t\n\t}", "public function readyToUpdate($data)\n {\n\n $returnArray = array();\n\n $datetime = date_create()->format('Y-m-d H:i:s');\n\n foreach ($data as $modelName => $childKey) {\n\n foreach ($childKey as $specialKey => $d) {\n\n $hash = arrayMd5Hash($d);\n $d[singular($modelName) . \"_update_date\"] = $datetime;\n $d[singular($modelName) . \"_hash\"] = $hash;\n $returnArray[$modelName][$specialKey] = $d;\n }\n\n }\n\n return $returnArray;\n }", "function restructure_sub($list, $more){\n $result = array();\n if($more){\n for($i = 0; $i < count($list); $i++){\n $result[$i]['id'] = $list[$i][0];\n $result[$i]['email'] = $list[$i][1];\n $result[$i]['date'] = $list[$i][2];\n }\n }else{\n $result['id'] = $list[0];\n $result['email'] = $list[1];\n $result['date'] = $list[2];\n }\n return $result;\n}", "function array_limit_keys(array $keys = [], array $input = []): array\n {\n if(empty($keys)) {\n return [];\n }\n\n //return array_filter($input, function($item) use ($keys) {\n // return in_array($item, $keys);\n //}, ARRAY_FILTER_USE_KEY);\n\n $out = [];\n foreach ($keys as $key) {\n if (array_key_exists($key, $input)) {\n $out[$key] = $input[$key];\n }\n }\n\n return $out;\n }", "protected function _cleanupData($data) {\n\t\tif (!$data && !is_array($data)) {\n\t\t\treturn array();\n\t\t}\n\t\t$skipFields = $this->_skipFields;\n\t\tif (!$skipFields || !is_array($skipFields)) {\n\t\t\t$skipFields = array();\n\t\t}\n\t\t$clearedData = array();\n\t\tforeach ($data as $key => $value) {\n\t\t\tif (!in_array($key, $this->_globalSkipFields) && !in_array($key, $skipFields) && !is_array($value) && !is_object($value)) {\n\t\t\t\t$clearedData[$key] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $clearedData;\n\t}", "function set($keys, $data) {\n\n $SET = array();\n\n foreach ($keys as $key) {\n $index = $key;\n $value = $data[$key];\n $SET[] = \"`$index` = '\" . str_replace(\"'\", \"\\'\", $value) . \"'\";\n }\n\n return implode(', ', $SET);\n}", "function _drush_utils_array_fold($values) {\n $is_array = is_array($values);\n if (!$is_array) {\n return $values;\n }\n $result = array();\n while ($is_array) {\n $is_array = FALSE;\n foreach ($values as $key => $data) {\n if (is_array($data)) {\n foreach ($data as $sub_key => $sub_data) {\n $fold = _drush_utils_array_fold($sub_data);\n if (is_array($fold)) {\n foreach ($fold as $k => $val) {\n $result[$key . '.' . $sub_key . '.' . $k] = $val;\n }\n }\n else {\n $result[$key . '.' . $sub_key] = $fold;\n }\n }\n }\n else {\n $result[$key] = $data;\n }\n }\n }\n return $result;\n}", "function serialize_keys($keys)\n\t{\n\t\t$ak = array();\n\t\tif(!is_array($keys)) $keys = array($keys);\n\t\tif(ACCESS_MODEL == \"discrete\") {\n\t\t\tforeach($keys as $key) {\n\t\t\t\tif(substr($key, 0, 3) == '-- ') {\n\t\t\t\t\t// regular key\n\t\t\t\t\t$ak[] = substr($key, 3);\n\t\t\t\t} else {\n\t\t\t\t\t// group name, include all keys under it\n\t\t\t\t\tforeach($GLOBALS['ACCESS_KEYS'][$key] as $v) $ak[] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if(ACCESS_MODEL == \"roles\") {\n\t\t\t// no action necessary\n\t\t\t$ak = $keys;\n\t\t}\n\t\treturn join(',', array_unique($ak));\n\t}", "public function rotate_db_data($dbdata){\n\t\t\n\t\t$return = array();\n\t\t$count = count($dbdata);\n\t\t$firstRow = $dbdata[0];\n\n\t\tforeach($firstRow as $f => $v){\n\t\t\t\n\t\t\t// loop through each key\n\t\t\t\n\t\t\t$rowKey = array();\n\t\t\t$sum = 0;\n\t\t\tfor($i = 0; $i < $count; $i++) {\n\t\t\t\t// loop all data\n\t\t\t\t$rowKey[] = $dbdata[$i][$f];\t// add to new row key (auto increase index by 1)\n\t\t\t\t$sum += $dbdata[$i][$f];\n\t\t\t}\n\t\t\t\n\t\t\tif($sum > 0){\n\t\t\t\n\t\t\t\t$return[$f] = $rowKey;\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "function acf_remove_array_key_prefix($array, $prefix)\n{\n}", "function normalize($data)\n{\n $maxLen = $data['_statistic']['len'];\n $maxCount = $data['_statistic']['count'];\n $duplexList = $data['_statistic']['duplex'];\n\n $out = array();\n foreach ($data as $funcName => $func) {\n if (substr($funcName, 0, 1) === '_') continue;\n if (!isset($out[$funcName])) $out[$funcName] = array();\n foreach ($func as $sender => $senderRow) {\n if (!isset($out[$funcName][$sender])) $out[$funcName][$sender] = array();\n foreach ($senderRow as $receiver => $receiverRow) {\n $duplex = (array_key_exists(\"$sender-$receiver\", $duplexList) && $sender == $duplexList[\"$sender-$receiver\"])\n ? 1\n : (array_key_exists(\"$receiver-$sender\", $duplexList) && $sender == $duplexList[\"$receiver-$sender\"])\n ? 2\n : 0;\n $out[$funcName][$sender][$receiver] = array(\n 'count' => round(100 * $receiverRow['count'] / $maxCount, 3),\n 'len' => round(100 * $receiverRow['len'] / $maxLen, 3),\n 'duplex' => $duplex\n );\n }\n }\n }\n\n return $out;\n}" ]
[ "0.66596234", "0.65763086", "0.6544835", "0.6415217", "0.6267786", "0.61668366", "0.6108922", "0.60454714", "0.60144174", "0.59989786", "0.59554946", "0.5887736", "0.58212805", "0.5779031", "0.5750475", "0.5741843", "0.5687098", "0.56751776", "0.56019026", "0.5550252", "0.5536305", "0.55289567", "0.5516847", "0.5513806", "0.55109596", "0.55078435", "0.54839516", "0.5481942", "0.5468619", "0.54598796", "0.54420096", "0.5432804", "0.54326963", "0.5415863", "0.539303", "0.53921777", "0.53812164", "0.5373586", "0.5366114", "0.53586435", "0.5352769", "0.53470826", "0.53437823", "0.53349036", "0.5328336", "0.5327505", "0.53269196", "0.5325708", "0.53219247", "0.5315977", "0.5300206", "0.53001267", "0.5299384", "0.5281607", "0.52791005", "0.5266552", "0.5263418", "0.5263039", "0.5259829", "0.5256173", "0.5250834", "0.52257335", "0.522294", "0.52208024", "0.52183425", "0.5213374", "0.52107733", "0.5209611", "0.5207802", "0.5207757", "0.5184954", "0.5181285", "0.5179834", "0.5176876", "0.5168587", "0.5160961", "0.5149694", "0.5147473", "0.51431507", "0.5141988", "0.51381916", "0.5128639", "0.5126969", "0.5126002", "0.5122918", "0.5118402", "0.51151687", "0.5111728", "0.51108974", "0.51071256", "0.51046044", "0.5103888", "0.5099746", "0.50980735", "0.50970745", "0.50959814", "0.5084603", "0.5077586", "0.5077453", "0.5075703" ]
0.5709315
16
Register the address book component routes in the given router.
public function registrar(Registrar $router) { $router->group([ 'middleware' => ['web', 'auth', 'managers'], 'prefix' => 'dashboard', ], function ($router) { $this->forHome($router); $this->forCategories($router); $this->forProductsFeatures($router); $this->forProducts($router); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function register_routes() {\n\t\t$routes = $this->get_routes();\n\t\tforeach ( $routes as $route ) {\n\t\t\t$route->register();\n\t\t}\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 }", "public function register_routes()\n {\n }", "public function register_routes() {\n\n\t\t\\add_filter( 'do_parse_request', array( $this, 'handle_routing' ) );\n\n\t}", "private function registerRoutes(){\n $appRouter = require_once __DIR__.'/../../routes/app.php';\n $this->registerApplicationRoutes($appRouter);\n $this->registerApplicationRoutes($appRouter, false);\n $this->registerAuthenticationRoutes();\n }", "public function register_routes( Collection $routes );", "protected function registerRouteBindings()\n {\n //\n }", "private function registerRouter($router) {\n\n if ($router !== null) {\n $this->queue[] = $router;\n }\n }", "public function registerRoutes()\n\t{\n\t\t$this->app->booted(function ($app) {\n\n\t\t\t# Manager\n\t\t\t$app['router']->get(\n\t\t\t\t'/',\n\t\t\t\t[\n\t\t\t\t\t'as' => 'manager.index',\n\t\t\t\t\t'uses' => 'ManagerController@index'\n\t\t\t\t]\n\t\t\t);\n\n\t\t});\n\t}", "public function registerRoutes() {\n $this->addRoute('default');\n }", "public function setupRoutes(Router $router)\n {\n\n }", "protected function registerRoutes()\n {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n }", "public function register()\n {\n /*\n * @param $c \\Innovating\\DIContainer\n * @return \\Canaan5\\Routing\\Router\n */\n $this->app['router'] = $this->app->share(function ($app) {\n return new Router($app);\n });\n\n $router = $this->app->router;\n\n require '/'.$this->app->appPath().'/routes.php';\n }", "public static function router(){\n if(iRouter::callMade()) {\n viewManager::registerComponent(iRouter::$route);\n }\n }", "protected function registerRoutes()\n {\n $this->registerWebRoutes();\n $this->registerApiRoutes();\n }", "protected function registerRoutes() {\n\n $this->get('/crossword', 'getCrossword');\n $this->post('/crossword', 'saveUserState');\n //not used\n //$this->get('/crossword', 'getCrossword');\n //$this->get('/wordData', 'getWordData');\n //);\n }", "public function map(Registrar $router)\n {\n $router->group([\n 'middleware' => ['auth'],\n 'namespace' => 'Dashboard',\n 'prefix' => 'dashboard/components',\n ], function (Registrar $router) {\n $router->get('/', [\n 'as' => 'get:dashboard.components',\n 'uses' => 'ComponentController@showComponents',\n ]);\n\n $router->get('create', [\n 'as' => 'get:dashboard.components.create',\n 'uses' => 'ComponentController@showAddComponent',\n ]);\n $router->post('create', [\n 'as' => 'post:dashboard.components.create',\n 'uses' => 'ComponentController@createComponentAction',\n ]);\n\n $router->get('groups', [\n 'as' => 'get:dashboard.components.groups',\n 'uses' => 'ComponentGroupController@showComponentGroups',\n ]);\n\n $router->get('groups/create', [\n 'as' => 'get:dashboard.components.groups.create',\n 'uses' => 'ComponentGroupController@showAddComponentGroup',\n ]);\n $router->post('groups/create', [\n 'as' => 'post:dashboard.components.groups.create',\n 'uses' => 'ComponentGroupController@postAddComponentGroup',\n ]);\n\n $router->get('groups/{component_group}', [\n 'as' => 'get:dashboard.components.groups.edit',\n 'uses' => 'ComponentGroupController@showEditComponentGroup',\n ]);\n $router->post('groups/{component_group}', [\n 'as' => 'post:dashboard.components.groups.edit',\n 'uses' => 'ComponentGroupController@updateComponentGroupAction',\n ]);\n $router->delete('groups/{component_group}', [\n 'as' => 'delete:dashboard.components.groups.delete',\n 'uses' => 'ComponentGroupController@deleteComponentGroupAction',\n ]);\n\n $router->get('{component}', [\n 'as' => 'get:dashboard.components.edit',\n 'uses' => 'ComponentController@showEditComponent',\n ]);\n $router->post('{component}', [\n 'as' => 'post:dashboard.components.edit',\n 'uses' => 'ComponentController@updateComponentAction',\n ]);\n $router->delete('{component}', [\n 'as' => 'delete:dashboard.components.delete',\n 'uses' => 'ComponentController@deleteComponentAction',\n ]);\n });\n }", "protected static function registerRoutes()\n {\n parent::routes(function ($router) {\n /* @var \\Illuminate\\Routing\\Router $router */\n $router->resource('useradmin/member', 'GG\\Admin\\Member\\Controllers\\MemberController');\n $router->resource('useradmin/permissions', 'GG\\Admin\\Member\\Controllers\\PermissionController');\n $router->resource('useradmin/roles', 'GG\\Admin\\Member\\Controllers\\RoleController');\n $router->resource('useradmin/menu', 'GG\\Admin\\Member\\Controllers\\MenuController');\n\n });\n }", "protected function registerRoutes()\n {\n if (EfaasProvider::$registersRoutes) {\n Route::group([\n 'as' => 'efaas.',\n 'namespace' => '\\Javaabu\\EfaasSocialite\\Http\\Controllers',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../../routes/web.php');\n });\n }\n }", "public function register(RouterContainer $container);", "private function register(Router $router)\n {\n $router->get('', function () {\n return new JsonResponse([\n 'linkman' => Linkman::VERSION\n ]);\n });\n\n $router->get('/albums', function () {\n return new CollectionResponse($this->linkman->api()->albums(), new AlbumFormatter($this->getBaseUrl()));\n });\n\n $router->post('/albums', function(Request $request) {\n $title = $request->getInput('title');\n\n if(empty($title)) {\n return new JsonResponse(['message' => \"Missing 'title' value\"], ResponseHeaders::HTTP_BAD_REQUEST);\n }\n\n $album = $this->linkman->api()->albums->create($title);\n\n return new EntityResponse($album, new AlbumFormatter($this->getBaseUrl()));\n });\n\n $router->get('/albums/:albumId', function (int $albumId) {\n return new EntityResponse($this->linkman->api()->album($albumId), new AlbumFormatter($this->getBaseUrl()));\n });\n\n $router->get('/albums/:albumId/contents', function (Request $request, int $albumId) {\n $request->getQuery()->add('filter-album', $albumId);\n $request->setPath('/api/v1/contents');\n\n return $this->router->route($request);\n });\n\n $router->post('/albums/:albumId/contents', function (Request $request, int $albumId) {\n $album = $this->linkman->api()->album($albumId);\n $contentId = $request->getInput('contentId');\n\n if ($contentId == null) {\n new Response('', ResponseHeaders::HTTP_BAD_REQUEST);\n }\n\n $content = $this->linkman->api()->content($contentId);\n\n if ($content == null) {\n new Response('', ResponseHeaders::HTTP_BAD_REQUEST);\n }\n\n $album->addContent($content);\n $this->linkman->api()->flush();\n\n return new Response('', ResponseHeaders::HTTP_CREATED);\n });\n\n $router->delete('/albums/:albumId/contents', function (Request $request, int $albumId) {\n $album = $this->linkman->api()->album($albumId);\n\n $contents = $request->getInput('contents');\n\n if(!is_array($contents) || empty($contents)) {\n return new JsonResponse(['message' => \"Need 'contents' as array.\"], ResponseHeaders::HTTP_BAD_REQUEST);\n }\n\n foreach($contents as $content) {\n $album->getContents()->remove($content);\n }\n\n $this->linkman->api()->flush();\n\n return new Response('', ResponseHeaders::HTTP_OK);\n });\n\n $router->get('/browse', function (Request $request) {\n $options = [\n 'mountId' => $request->getInput('mount'),\n 'path' => $request->getInput('path', '/')\n ];\n $files = $this->linkman->api()->files($options['mountId'], $options['path']);\n\n return new CollectionResponse($files, new DirectoryBrowserFormatter($this->getBaseUrl()));\n });\n\n $router->get('/calendar', function() {\n $years = $this->linkman->api()->contents->yearsCount();\n\n $years = array_map(function($year) {\n return [\n 'year' => $year['year'],\n 'href' => $this->getBaseUrl() . '/calendar/' . $year['year'],\n 'months' => [\n 'href' => $this->getBaseUrl() . '/calendar/' . $year['year'] . '/months',\n ],\n 'contents' => [\n 'href' => $this->getBaseUrl() . '/calendar/' . $year['year'] . '/contents',\n 'count' => $year['count']\n ]\n ];\n }, $years);\n\n return new JsonResponse($years);\n });\n\n // TODO: ?embed=days\n $router->get('/calendar/:year/months', function($year) {\n $months = $this->linkman->api()->contents->monthsCount($year);\n\n $months = array_map(function($month) {\n return [\n 'month' => $month['month'],\n 'href' => $this->getBaseUrl() . '/calendar/' . $month['year'] . '/months/' . $month['month'],\n 'days' => [\n 'href' => $this->getBaseUrl().'/calendar/'.$month['year'].'/months/'.$month['month'].'/days',\n ],\n 'contents' => [\n 'count' => $month['count'],\n 'href' => $this->getBaseUrl().'/calendar/'.$month['year'].'/months/'.$month['month'].'/contents',\n ],\n ];\n }, $months);\n\n return new JsonResponse($months);\n });\n\n $router->get('/calendar/:year/contents', function(Request $request, $year) {\n $request->getQuery()->add('filter-year', $year);\n $request->setPath('/api/v1/contents');\n\n return $this->router->route($request);\n });\n\n $router->get('/calendar/:year/months/:month/days', function($year, $month) {\n // List all days in month\n $days = $this->linkman->api()->contents->daysCount($year, $month);\n\n $days = array_map(function($day) {\n return [\n 'day' => $day['day'],\n 'contents' => [\n 'count' => $day['count'],\n 'href' => $this->getBaseUrl().'/calendar/'.$day['year'].'/months/'.$day['month'].'/days/'.$day['day'].'/contents',\n ]\n ];\n }, $days);\n\n return new JsonResponse($days);\n });\n\n $router->get('/calendar/:year/months/:month/contents', function(Request $request, $year, $month) {\n // List all contents in month\n\n $request->getQuery()->add('filter-year', $year);\n $request->getQuery()->add('filter-month', $month);\n $request->setPath('/api/v1/contents');\n\n return $this->router->route($request);\n });\n\n $router->get('/calendar/:year/months/:month/days/:day/contents', function(Request $request, $year, $month, $day) {\n // List all contents in month\n\n // TODO: Add these filter-year, filter-month, filter-day\n $request->getQuery()->add('filter-year', $year);\n $request->getQuery()->add('filter-month', $month);\n $request->getQuery()->add('filter-day', $day);\n\n $request->setPath('/api/v1/contents');\n\n return $this->router->route($request);\n });\n\n $router->get('/contents', function (Request $request) {\n $paginator = $this->linkman->api()->contents->all($request->getQuery()->getAll());\n $pageCount = $request->getInput('pageCount', 10);\n $currentPage = $request->getInput('page', 1);\n\n $orderCreatedQuery = $this->linkman->api()->contents->query($request->getQuery()->getAll());\n $orderCreatedQuery->select('c.createdAt');\n $orderCreatedQuery->orderBy('c.createdAt', 'asc');\n\n $orderedContents = $orderCreatedQuery->getQuery()->getScalarResult();\n\n $first = reset($orderedContents);\n $last = end($orderedContents);\n\n $paginator->getQuery()->setMaxResults($pageCount);\n $paginator->getQuery()->setFirstResult(($currentPage - 1) * $pageCount);\n\n $response = new PaginatedResponse($paginator, new FileContentFormatter($this->getBaseUrl()));\n\n $response->getHeaders()->add('X-Content-First', $first['createdAt']);\n $response->getHeaders()->add('X-Content-Last', $last['createdAt']);\n\n $response->setNextLink($this->getBaseUrl() . '/contents?page='.($currentPage + 1));\n\n if ($currentPage > 1) {\n $response->setPreviousLink($this->getBaseUrl() . '/contents?page='.($currentPage - 1));\n }\n\n return $response;\n });\n\n $router->get('/contents/:contentId', function ($contentId) {\n return new EntityResponse($this->linkman->api()->content($contentId), new FileContentFormatter($this->getBaseUrl()));\n });\n\n $router->post('/contents/:contentId', function ($contentId, Request $request) {\n $content = $this->linkman->api()->content($contentId);\n\n $visibility = $request->getInput('hidden');\n\n if ($visibility) {\n if ($visibility === 'true') {\n $visibility = true;\n }\n if ($visibility === 'false') {\n $visibility = false;\n }\n\n $content->setHidden($visibility);\n }\n\n // Visibility\n // location\n // license\n\n $this->linkman->api()->flush();\n\n return new EntityResponse($content, new FileContentFormatter($this->getBaseUrl()));\n });\n\n $router->get('/contents/:contentId/albums', function ($contentId) {\n $content = $this->linkman->api()->content($contentId);\n\n return new CollectionResponse($content->getAlbums(), new AlbumFormatter($this->getBaseUrl()));\n });\n\n $router->get('/contents/:contentId/files', function ($contentId, Request $request) {\n $content = $this->linkman->api()->content($contentId);\n\n $embeds = explode(',', $request->getInput('embed', ''));\n\n return new CollectionResponse($content->getFiles(), new FileFormatter($this->getBaseUrl(), $embeds));\n });\n\n $router->get('/contents/:contentId/tags', function ($contentId) {\n $content = $this->linkman->api()->content($contentId);\n\n return new CollectionResponse($content->getTags(), new TagFormatter($this->getBaseUrl()));\n });\n\n $router->delete('/contents/:contentId/tags', function(Request $request, $contentId) {\n $content = $this->linkman->api()->content($contentId);\n\n $tags = $request->getInput('tags');\n\n if(!is_array($tags) || empty($tags)) {\n return new JsonResponse(['message' => \"Need 'tags' as array.\"], ResponseHeaders::HTTP_BAD_REQUEST);\n }\n\n foreach($tags as $tagName) {\n $content->getTags()->remove($tagName);\n }\n\n $this->linkman->api()->flush();\n\n return new CollectionResponse($content->getTags(), new TagFormatter($this->getBaseUrl()));\n });\n\n $router->get('/contents/:contentId/raw', function (Request $request, int $contentId) {\n $format = $request->getInput('format', 'original');\n\n // TODO: Make resource and info\n\n $content = $this->linkman->api()->content($contentId);\n\n if ($content === null) {\n return new Response('', ResponseHeaders::HTTP_NOT_FOUND);\n }\n\n if($content instanceof Photo === false) {\n return new Response('', ResponseHeaders::HTTP_UNSUPPORTED_MEDIA_TYPE);\n }\n\n $content = $this->linkman->api()->content($contentId);\n\n if ($format == 'thumb') {\n $cachePath = $this->getCachePath() . '/'.$content->getHash(). '.thumb';\n if (file_exists($cachePath)) {\n $resource = fopen($cachePath, 'r');\n return new ResourceResponse($resource, fstat($resource)['size'], $content->getFiletype());\n }\n\n $manager = new ImageManager(['driver' => 'imagick']);\n\n $resource = $this->linkman->api()->contentRaw($contentId);\n $image = $manager->make($resource);\n\n $image->resize(null, 500, function ($constraint) {\n $constraint->aspectRatio();\n });\n\n if ($content->getOrientationAdjust()) {\n $image->rotate($content->getOrientationAdjust());\n }\n\n $resource = $image->stream(null, 40)->detach();\n file_put_contents($cachePath, $resource);\n return new ResourceResponse($image->stream(null, 40)->detach(), fstat($resource)['size'], $content->getFiletype());\n }\n\n if ($resource && $content) {\n return new ResourceResponse($resource, $content->getSize(), $content->getFiletype());\n }\n\n return new Response('', ResponseHeaders::HTTP_NOT_FOUND);\n });\n\n $router->get('/files', function (Request $request) {\n $fetchJoinCollection = true;\n\n $options = [\n 'mountId' => $request->getInput('mount'),\n 'path' => ltrim($request->getInput('path', ''), '/'),\n 'duplicates' => $request->getInput('duplicates', 0),\n 'content' => $request->getInput('content', null)\n ];\n\n $query = $this->linkman->api()->files->query();\n\n if($options['mountId']) {\n $query->andWhere('file.mount = :mount');\n $query->setParameter('mount', $options['mountId']);\n }\n\n if($options['path']) {\n $query->andWhere($query->expr()->like('file.path', ':path'));\n $query->setParameter('path', $options['path'].'%');\n }\n\n if($options['content']) {\n $query->andWhere('file.content = :contentId');\n $query->setParameter('contentId', $options['content']);\n }\n\n if($options['duplicates']) {\n $query->join('file.content', 'content');\n $fetchJoinCollection = false;\n $query->groupBy('content.hash');\n\n $query->having('count(content.hash) > 1');\n }\n\n $paginator = new Paginator($query->getQuery(), $fetchJoinCollection);\n\n return new PaginatedResponse($paginator, new FileFormatter($this->getBaseUrl()));\n });\n\n $router->get('/files/:fileId', function ($fileId) {\n return new EntityResponse($this->linkman->api()->file($fileId), new FileFormatter($this->getBaseUrl()));\n });\n\n $router->get('/mounts', function () {\n return new CollectionResponse($this->linkman->api()->mounts(), new MountFormatter($this->getBaseUrl()));\n });\n\n $router->get('/mounts/:mountId', function ($mountId) {\n $mount = $this->linkman->api()->mount($mountId);\n\n return new EntityResponse($mount, new MountFormatter($this->getBaseUrl()));\n });\n\n $router->get('/search/contents', function (Request $request) {\n\n // Get all $request, and send it?\n $query = $request->getInput('q', '');\n\n $paginator = $this->linkman->api()->contents->search($query);\n\n $pageCount = $request->getInput('pageLength', 10);\n $currentPage = $request->getInput('page', 1);\n\n $paginator->getQuery()->setMaxResults($pageCount);\n $paginator->getQuery()->setFirstResult(($currentPage - 1) * $pageCount);\n\n $response = new PaginatedResponse($paginator, new FileContentFormatter($this->getBaseUrl()));\n\n $response->setNextLink($this->getBaseUrl() . '/contents?page='.($currentPage + 1));\n\n if ($currentPage > 1) {\n $response->setPreviousLink($this->getBaseUrl() . '/contents?page='.($currentPage - 1));\n }\n\n return $response;\n });\n\n $router->get('/tags', function (Request $request) {\n $also = $request->getInput('with', '');\n $also = explode(',', $also);\n return new CollectionResponse($this->linkman->api()->tags->also($also), new TagFormatter());\n });\n }", "public function addRoutes($routes);", "public function registerRouting(Router $router, $env)\n {\n $routes = $this->getRootPath() . '/Resources/config/routes.php';\n\n if (file_exists($routes)) {\n include $routes;\n }\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shops' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shop' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/manager', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'register_shop_manager' ),\n\t\t\t)\n\t\t) );\n\t}", "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'parse_url_details' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'url' => array(\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'description' => __( 'The URL to process.' ),\n\t\t\t\t\t\t\t'validate_callback' => 'wp_http_validate_url',\n\t\t\t\t\t\t\t'sanitize_callback' => 'sanitize_url',\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' ),\n\t\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "protected function registerRoutes(): void\n {\n Route::group([\n 'prefix' => 'fairqueue',\n 'namespace' => 'Aloware\\FairQueue\\Http\\Controllers',\n 'middleware' => config('fair-queue.middleware', 'web'),\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n });\n }", "public function register_routes() {\n\n\t\t$namespace = $this->namespace;\n\n\t\t$base = $this->rest_base;\n\n\t\tregister_rest_route( $namespace, '/' . $base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t) );\n\t}", "public function addRoutes(): void\n {\n $router = $this->config['router'] ?? Router::class;\n $router::$DELIMITER = $this->delimiter;\n foreach (static::$routes as [$url, $func, $method]) {\n $router::add($url, [$this, $func], $method);\n }\n }", "function defineRoutes(&$router) {\n /*\n * example routers\n * \n * \n */\n //$router->map('modulename', 'modulename', array('controller' => 'modulename', 'action' => 'index'));\n //$router->map('dashboard_modulename', 'dashboard/modulename', array('controller' => 'modulename', 'action' => 'index'));\n //$router->map('modulename_view_project', 'modulename/:project_id/view', array('controller' => 'modulename', 'action' => 'view'), array('project_id' => '\\d+'));\n }", "public function setupRoutes(Router $router)\n {\n $router->group(['namespace' => 'Escuccim\\Sitemap\\Http\\Controllers'], function($router)\n {\n require __DIR__.'/Http/routes.php';\n });\n }", "protected function registerRoutes()\n {\n if (TwilioVerify::$registersRoutes) {\n Route::group([\n 'prefix' => config('twilio-verify.path'),\n 'namespace' => 'IvanSotelo\\TwilioVerify\\Http\\Controllers',\n 'as' => 'twilio-verify.',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }\n }", "public function register_routes() {\n\t\t$public_post_types = $this->post_type_helper->get_public_post_types();\n\n\t\tforeach ( $public_post_types as $post_type ) {\n\t\t\t\\register_rest_field( $post_type, self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_post' ] ] );\n\t\t}\n\n\t\t$public_taxonomies = $this->taxonomy_helper->get_public_taxonomies();\n\n\t\tforeach ( $public_taxonomies as $taxonomy ) {\n\t\t\tif ( $taxonomy === 'post_tag' ) {\n\t\t\t\t$taxonomy = 'tag';\n\t\t\t}\n\t\t\t\\register_rest_field( $taxonomy, self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_term' ] ] );\n\t\t}\n\n\t\t\\register_rest_field( 'user', self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_author' ] ] );\n\n\t\t\\register_rest_field( 'type', self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_post_type_archive' ] ] );\n\t}", "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}", "public static function register_rest_routes() {\n\t\tforeach (static::$apis as $api) {\n\t\t\t$api->register_rest_route();\n\t\t}\n }", "private static function registerRoute($route){\r\n global $Routes;\r\n $Routes[] = BASEDIR.$route;\r\n }", "public function setupRoutes(Router $router)\n {\n $router->group(['namespace' => 'Connormcwood\\CinemaRetriever\\Http\\Controllers'], function($router)\n { \n $this->loadRoutesFrom(__DIR__.'/Http/routes.php');\n });\n }", "public function register_rest_routes() {\n\t\t$controllers = array(\n\t\t\t'GF_REST_Entries_Controller',\n\t\t\t'GF_REST_Entry_Properties_Controller',\n\t\t\t'GF_REST_Entry_Notifications_Controller',\n\t\t\t'GF_REST_Notes_Controller',\n\t\t\t'GF_REST_Entry_Notes_Controller',\n\t\t\t'GF_REST_Form_Entries_Controller',\n\t\t\t'GF_REST_Form_Results_Controller',\n\t\t\t'GF_REST_Form_Submissions_Controller',\n\t\t\t'GF_REST_Forms_Controller',\n\t\t\t'GF_REST_Feeds_Controller',\n\t\t\t'GF_REST_Form_Feeds_Controller',\n\t\t);\n\n\t\tforeach ( $controllers as $controller ) {\n\t\t\t$controller_obj = new $controller();\n\t\t\t$controller_obj->register_routes();\n\t\t}\n\t}", "protected function registerRoutes()\n {\n $middleware = ['exposable.signature', 'exposable.expire', 'exposable.guard'];\n\n if (! empty(config('exposable.middleware'))) {\n $middleware = array_merge($middleware, (array) config('exposable.middleware'));\n }\n\n $uri = config('exposable.url-prefix').'/{exposable}/{id}';\n\n $this->app['router']->get($uri, 'ArjanWestdorp\\Exposable\\Http\\Controllers\\ExposableController@show')->middleware($middleware)->name('exposable.show');\n }", "public function registerRoutes()\n {\n $namespace = $this->getNameSpace();\n\n register_rest_route($namespace, '/' . self::ROUTE_UPDATE_CALLBACK, [\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'updateTrapp' ),\n 'permission_callback' => array( $this, 'updateTrappPermissions' ),\n ]);\n }", "public function register(): void\n {\n /**\n * @var \\Illuminate\\Config\\Repository $config\n * @var \\Illuminate\\Routing\\Router $router\n */\n [$config, $router] = $this->getDependencies();\n\n $this->resolveRouteFromConfig($config);\n\n foreach ($this->groups() as $group) {\n $this->map($router, $group);\n }\n }", "public function setupRoutes(Router $router)\n {\n $router->group(['namespace' => 'Christhompsontldr\\Laraboard\\Http\\Controllers'], function($router)\n {\n require __DIR__.'/Http/routes.php';\n });\n }", "protected function registerRoutes()\n {\n Route::group([\n 'domain' => config('documentation.domain', null),\n 'prefix' => config('documentation.path'),\n 'namespace' => 'Sonover\\Docs\\Http\\Controllers',\n 'middleware' => config('documentation.middleware', 'web'),\n ], function () {\n Route::get('/', 'DocumentationController@showRootPage');\n Route::get('{version}/{page?}', 'DocumentationController@show');\n });\n }", "protected function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n });\n }", "protected function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n });\n }", "private static function registerRoute($route) {\n global $Routes;\n $Routes[] = $route;\n }", "private function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__.'/Http/routes.php');\n });\n }", "private function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__.'/Http/routes.php');\n });\n }", "private function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__.'/Http/routes.php');\n });\n }", "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'args' => array(),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'update_item' ),\n\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "private static function registerRoute($route)\n {\n global $Routes;\n $Routes[] = \"/\".$route;\n }", "public function register_rest_routes() {\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast',\n\t\t\tarray(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'get_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast_update',\n\t\t\tarray(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'update_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for episodes\n\t\t */\n\t\t$controller = new Episodes_Controller();\n\t\t$controller->register_routes();\n\n\t}", "public function setupRoutes(Router $router)\n {\n// $router->group(['namespace' => 'Bendbennett\\JWT\\Http\\Controllers'], function($router)\n// {\n// require __DIR__.'/Http/routes.php';\n// });\n }", "public function map( Router $router )\n {\n $router->group( [ 'namespace' => $this->namespace ], function( $router )\n {\n if( app()->bound( RoutesBlueprint::class ) ) {\n $routeContract = app()->make( RoutesBlueprint::class );\n $routeContract->routes( $router );\n if( method_exists( $routeContract, 'extendingRoutes' ) ) {\n app()->make( RoutesBlueprint::class )->extendingRoutes( new RouteExtender( $router ) );\n }\n }\n });\n }", "public function register()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->aliasMiddleware($key, $middleware);\n }\n }", "public function setupRoutes(Router $router)\n {\n $router->group(['namespace' => 'App\\Http\\Controllers\\IntoTheSource\\Webshop'], function ($router) {\n require __DIR__.'/Http/routes.php';\n });\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 }", "protected function registerEditRoutes($prefix, $router)\n\t{\n\t\tif (!$this->config('editable.info')) {\n\t\t\treturn;\n\t\t}\n\n\t\t$router->get(\"edit\", ['uses' => 'EditController@getIndex', 'as' => $prefix . 'edit']);\n\t\t$router->post(\"edit\", ['uses' => 'EditController@postIndex']);\n\t}", "protected function registerPasswordRoutes($prefix, $router)\n\t{\n\t\tif (!$this->config('editable.password')) {\n\t\t\treturn;\n\t\t}\n\n\t\t$router->get(\"password\", ['uses' => 'PasswordController@getIndex', 'as' => $prefix . 'password']);\n\t\t$router->post(\"password\", ['uses' => 'PasswordController@postIndex']);\n\t}", "public function registerRoutes($router, $routes)\n {\n foreach($routes as $key => $route) {\n\n //Get controller and action method names\n $controllerAndMethod = explode('.', $key);\n $controller = $controllerAndMethod[0];\n $method = $controllerAndMethod[1];\n //Map routes on alto Router\n if(!empty($controller) && !empty($method) && isset($route['path']) && isset($route['method'])) {\n $router->map($route['method'], $route['path'], $controller, $key);\n }\n }\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 register_routes() {\n\t\tregister_rest_route( $this->namespace, $this->route, [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_options']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_options'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_options'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\n\t\tregister_rest_route( $this->namespace, $this->route . '/(?P<slug>.+)', [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_option']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_option'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_option'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\t}", "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 }", "public function register()\n {\n include __DIR__ . '/../routes/admin.php';\n include __DIR__ . '/../routes/api.php';\n include __DIR__ . '/../routes/manage.php';\n include __DIR__ . '/../routes/web.php';\n }", "public function set_router( sn\\base\\routing\\I_Router $router );", "function registerEndpoints()\n{\n $namespace = 'travel-review-app/v1';\n\n register_rest_route(\n $namespace,\n '/destinations-default-wordpress',\n [\n 'methods' => 'GET',\n 'callback' => 'listDestinationsDefaultWordPress',\n ]\n );\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 }", "public function register_route() {\n register_rest_route( $this->namespace, $this->endpoint , array(\n 'methods' => 'POST',\n 'callback' => array($this, 'get_next_page'),\n 'args' => array(),\n ) );\n }", "private function _setupRoutes(Router $router)\n {\n $router->group(['namespace' => 'Sso\\Http\\Controllers'], function ($router) {\n require __DIR__.'/../Http/routes.php';\n });\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}" ]
[ "0.67273283", "0.6441474", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.6440868", "0.63593405", "0.6346929", "0.6337661", "0.6319439", "0.62140244", "0.61438674", "0.59396255", "0.5921377", "0.5915832", "0.5880848", "0.588084", "0.58734053", "0.5860081", "0.5850399", "0.58286196", "0.5808262", "0.577936", "0.57742393", "0.576189", "0.5737173", "0.5702212", "0.568215", "0.5679823", "0.5676392", "0.56284344", "0.56111443", "0.5596416", "0.55866045", "0.5572801", "0.55663586", "0.5563282", "0.55632", "0.55572593", "0.55492073", "0.5546169", "0.55428815", "0.55420816", "0.5539259", "0.5524152", "0.55101556", "0.55101556", "0.5505514", "0.55021286", "0.55021286", "0.55021286", "0.54968566", "0.54892254", "0.54886055", "0.54833966", "0.54745275", "0.5471168", "0.54673946", "0.5465759", "0.5464693", "0.545916", "0.5458013", "0.5450402", "0.54400605", "0.54391634", "0.5434013", "0.54238397", "0.54208714", "0.5412538", "0.5408014", "0.53956085", "0.53924674" ]
0.5463611
88
Registers the dashboard routes.
protected function forHome($router) { $router->get('dashboard', 'Categories\CategoriesController@index')->name('dashboard.home'); $router->get('/', 'Categories\CategoriesController@index')->name('dashboard.home'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function registerRoutes()\n {\n if (!$this->app['config']->get('laratrust.panel.register')) {\n return;\n }\n\n Route::group([\n 'prefix' => config('laratrust.panel.path'),\n 'namespace' => 'Laratrust\\Http\\Controllers',\n 'middleware' => config('laratrust.panel.middleware', 'web'),\n ], function () {\n Route::redirect('/', '/'. config('laratrust.panel.path'). '/roles-assignment');\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }", "protected function registerRoutes()\n {\n Route::group([\n 'prefix' => config('dashkit.path'),\n 'middleware' => config('dashkit.middleware', 'web'),\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n });\n }", "public function registerRoutes() {\n $this->addRoute('default');\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 }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "protected static function registerRoutes()\n {\n parent::routes(function ($router) {\n /* @var \\Illuminate\\Routing\\Router $router */\n $router->resource('useradmin/member', 'GG\\Admin\\Member\\Controllers\\MemberController');\n $router->resource('useradmin/permissions', 'GG\\Admin\\Member\\Controllers\\PermissionController');\n $router->resource('useradmin/roles', 'GG\\Admin\\Member\\Controllers\\RoleController');\n $router->resource('useradmin/menu', 'GG\\Admin\\Member\\Controllers\\MenuController');\n\n });\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 }", "private function registerRoutes(){\n $appRouter = require_once __DIR__.'/../../routes/app.php';\n $this->registerApplicationRoutes($appRouter);\n $this->registerApplicationRoutes($appRouter, false);\n $this->registerAuthenticationRoutes();\n }", "protected function registerRoutes()\n {\n $this->registerWebRoutes();\n $this->registerApiRoutes();\n }", "protected function registerRoutes()\n {\n if (EfaasProvider::$registersRoutes) {\n Route::group([\n 'as' => 'efaas.',\n 'namespace' => '\\Javaabu\\EfaasSocialite\\Http\\Controllers',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../../routes/web.php');\n });\n }\n }", "public function registerRoutes()\n\t{\n\t\t$this->app->booted(function ($app) {\n\n\t\t\t# Manager\n\t\t\t$app['router']->get(\n\t\t\t\t'/',\n\t\t\t\t[\n\t\t\t\t\t'as' => 'manager.index',\n\t\t\t\t\t'uses' => 'ManagerController@index'\n\t\t\t\t]\n\t\t\t);\n\n\t\t});\n\t}", "protected function registerRoutes()\n {\n $middleware = ['exposable.signature', 'exposable.expire', 'exposable.guard'];\n\n if (! empty(config('exposable.middleware'))) {\n $middleware = array_merge($middleware, (array) config('exposable.middleware'));\n }\n\n $uri = config('exposable.url-prefix').'/{exposable}/{id}';\n\n $this->app['router']->get($uri, 'ArjanWestdorp\\Exposable\\Http\\Controllers\\ExposableController@show')->middleware($middleware)->name('exposable.show');\n }", "private function register_routes() {\n\t\t$routes = $this->get_routes();\n\t\tforeach ( $routes as $route ) {\n\t\t\t$route->register();\n\t\t}\n\t}", "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 }", "protected function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n });\n }", "protected function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n });\n }", "protected function registerRoutes()\n {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n }", "protected function registerRoutes(): void\n {\n Route::group([\n 'prefix' => 'fairqueue',\n 'namespace' => 'Aloware\\FairQueue\\Http\\Controllers',\n 'middleware' => config('fair-queue.middleware', 'web'),\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n });\n }", "protected function registerRoutes()\n {\n Route::group([\n 'domain' => config('documentation.domain', null),\n 'prefix' => config('documentation.path'),\n 'namespace' => 'Sonover\\Docs\\Http\\Controllers',\n 'middleware' => config('documentation.middleware', 'web'),\n ], function () {\n Route::get('/', 'DocumentationController@showRootPage');\n Route::get('{version}/{page?}', 'DocumentationController@show');\n });\n }", "private function mapAdminRoutes()\n {\n $this->name('backups.')\n ->prefix($this->config()->get('arcanesoft.backups.route.prefix', 'backups'))\n ->group(function () {\n Routes\\StatusesRoutes::register();\n });\n }", "public function register_rest_routes() {\n\t\t$controllers = array(\n\t\t\t'GF_REST_Entries_Controller',\n\t\t\t'GF_REST_Entry_Properties_Controller',\n\t\t\t'GF_REST_Entry_Notifications_Controller',\n\t\t\t'GF_REST_Notes_Controller',\n\t\t\t'GF_REST_Entry_Notes_Controller',\n\t\t\t'GF_REST_Form_Entries_Controller',\n\t\t\t'GF_REST_Form_Results_Controller',\n\t\t\t'GF_REST_Form_Submissions_Controller',\n\t\t\t'GF_REST_Forms_Controller',\n\t\t\t'GF_REST_Feeds_Controller',\n\t\t\t'GF_REST_Form_Feeds_Controller',\n\t\t);\n\n\t\tforeach ( $controllers as $controller ) {\n\t\t\t$controller_obj = new $controller();\n\t\t\t$controller_obj->register_routes();\n\t\t}\n\t}", "protected function registerRoutes() {\n\n $this->get('/crossword', 'getCrossword');\n $this->post('/crossword', 'saveUserState');\n //not used\n //$this->get('/crossword', 'getCrossword');\n //$this->get('/wordData', 'getWordData');\n //);\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 registerRoutes(): void\n {\n Route::group([\n 'domain' => $this->app['config']['support-chat.domain'] ?? null,\n 'prefix' => $this->app['config']['support-chat.path'] ?? null,\n 'name' => 'support-chat.',\n 'namespace' => 'TTBooking\\\\SupportChat\\\\Http\\\\Controllers',\n 'middleware' => $this->app['config']['support-chat.middleware'] ?? 'web',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n\n require __DIR__.'/../routes/channels.php';\n }", "private function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__.'/Http/routes.php');\n });\n }", "private function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__.'/Http/routes.php');\n });\n }", "private function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__.'/Http/routes.php');\n });\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 }", "public function register_routes(): void {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::ALLMETHODS,\n\t\t\t\t\t'callback' => [ $this, 'status_check' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'status_check_permissions_check' ],\n\t\t\t\t\t'args' => [\n\t\t\t\t\t\t'content' => [\n\t\t\t\t\t\t\t'description' => __( 'Test HTML content.', 'web-stories' ),\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'type' => 'string',\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}", "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 registerRoutes()\n {\n Route::group([\n 'prefix' => config('paystacksubscription.webhook_path'),\n 'namespace' => 'Digikraaft\\PaystackSubscription\\Http\\Controllers',\n 'as' => 'paystack.',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }", "protected function mapPanelRoutes()\n {\n Route::group([\n 'middleware' => ['web'/*,'auth'*/],\n 'namespace' => 'App\\Http\\Controllers\\Panel',//$this->namespace,\n ], function ($router) {\n require base_path('routes/panel.php');\n });\n }", "public function register_rest_routes() {\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast',\n\t\t\tarray(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'get_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast_update',\n\t\t\tarray(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'update_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for episodes\n\t\t */\n\t\t$controller = new Episodes_Controller();\n\t\t$controller->register_routes();\n\n\t}", "protected function registerRoutes(): void\n {\n Route::prefix('permission_makr')\n ->namespace('AlvariumDigital\\\\PermissionsMakr\\\\Http\\\\Controllers')\n ->as('permission_makr.')\n ->middleware(config('permission_makr.routes_middleware'))\n ->group(__DIR__ . '/routes/web.php');\n }", "public static function route()\n {\n return 'dashboard';\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shops' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shop' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/manager', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'register_shop_manager' ),\n\t\t\t)\n\t\t) );\n\t}", "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 static function register_rest_routes() {\n\t\tforeach (static::$apis as $api) {\n\t\t\t$api->register_rest_route();\n\t\t}\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => array(),\n\t\t\t)\n\t\t) );\n }", "public function register_routes() {\n\n\t\t$namespace = $this->namespace;\n\n\t\t$base = $this->rest_base;\n\n\t\tregister_rest_route( $namespace, '/' . $base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t) );\n\t}", "public function register_routes() {\n\n register_rest_route( $this->namespace, '/' . $this->base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array( $this->service, 'create' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => $this->get_endpoint_args_for_item_schema( true ),\n 'accept_json' => true\n ),\n ) );\n\n register_rest_route( $this->namespace, '/' . $this->base . '/(?P<id>[\\d]+)', array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this->service, 'get' ),\n 'permission_callback' => array( $this, 'getAllUserCheck' ),\n 'args' => array(\n 'context' => array(\n 'default' => 'view',\n )\n ),\n ),\n\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this->service, 'update' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => $this->get_endpoint_args_for_item_schema( false ),\n 'accept_json' => true\n ),\n\n array(\n 'methods' => WP_REST_Server::DELETABLE,\n 'callback' => array( $this->service, 'delete' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => array(\n 'force' => array(\n 'default' => false,\n ),\n ),\n ),\n ) );\n }", "protected function registerRoutes()\n {\n if (TwilioVerify::$registersRoutes) {\n Route::group([\n 'prefix' => config('twilio-verify.path'),\n 'namespace' => 'IvanSotelo\\TwilioVerify\\Http\\Controllers',\n 'as' => 'twilio-verify.',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }\n }", "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'parse_url_details' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'url' => array(\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'description' => __( 'The URL to process.' ),\n\t\t\t\t\t\t\t'validate_callback' => 'wp_http_validate_url',\n\t\t\t\t\t\t\t'sanitize_callback' => 'sanitize_url',\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' ),\n\t\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "public function register_routes() {\n\n\t\t\\add_filter( 'do_parse_request', array( $this, 'handle_routing' ) );\n\n\t}", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<status>[\\w-]+)', array(\n\t\t\t'args' => array(\n\t\t\t\t'status' => array(\n\t\t\t\t\t'description' => __( 'An alphanumeric identifier for the status.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t'args' => array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "public function register_routes()\n {\n\n $namespace = 'api/v1';\n $base = 'categories';\n\n register_rest_route($namespace, '/' . $base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array($this, 'create_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n\n register_rest_route($namespace, '/' . $base . '/(?P<id>\\d+)', array(\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array($this, 'update_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n }", "protected function defineRoutes()\n {\n if ($this->app->routesAreCached() || config('sanctum.routes') === false) {\n return;\n }\n\n Route::group(['prefix' => config('sanctum.prefix', 'sanctum')], function () {\n Route::get(\n '/csrf-cookie',\n CsrfCookieController::class.'@show'\n )->middleware('web');\n });\n }", "public function register()\n {\n $controllers = [];\n\n foreach (Route::getRoutes()->getRoutes() as $route)\n {\n $action = $route->getAction();\n\n if (array_key_exists('controller', $action))\n {\n // You can also use explode('@', $action['controller']); here\n // to separate the class name from the method\n if(Str::contains($action['controller'],'@index')){\n $step1 = str_replace('Modules\\Admin\\Http\\Controllers','',$action['controller']); \n $step2 = str_replace(\"@index\", '', $step1);\n $step3 = str_replace(\"Controller\", '', $step2);\n \n $notArr = ['Auth','Admin','Role','Compaint','ContactGroup','ArticleType','Article','Press','MonthlyReport',\n 'Program','Reason','Settings'];\n if(in_array(ltrim($step3,'\"\\\"'), $notArr))\n {\n continue;\n }else{\n $controllers[] = ltrim($step3,'\"\\\"');\n }\n }\n \n }\n } \n \n View::share('controllers',$controllers);\n }", "public function register_routes() {\n register_rest_route(\n $this->namespace, '/' . $this->base, array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_announcements' ),\n 'args' => array_merge(\n $this->get_collection_params(), array(\n 'status' => array(\n 'type' => 'string',\n 'description' => __( 'Announcement status', 'dokan' ),\n 'required' => false,\n ),\n )\n ),\n 'permission_callback' => array( $this, 'get_announcement_permissions_check' ),\n ),\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array( $this, 'create_announcement' ),\n 'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),\n 'permission_callback' => array( $this, 'create_announcement_permissions_check' ),\n ),\n )\n );\n\n register_rest_route(\n $this->namespace, '/' . $this->base . '/(?P<id>[\\d]+)/', array(\n 'args' => array(\n 'id' => array(\n 'description' => __( 'Unique identifier for the object.', 'dokan' ),\n 'type' => 'integer',\n ),\n ),\n\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_announcement' ),\n 'permission_callback' => array( $this, 'get_announcement_permissions_check' ),\n ),\n\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'update_announcement' ),\n 'permission_callback' => array( $this, 'get_announcement_permissions_check' ),\n ),\n\n array(\n 'methods' => WP_REST_Server::DELETABLE,\n 'callback' => array( $this, 'delete_announcement' ),\n 'permission_callback' => array( $this, 'get_announcement_permissions_check' ),\n ),\n\n )\n );\n\n register_rest_route(\n $this->namespace, '/' . $this->base . '/(?P<id>[\\d]+)/restore', array(\n 'args' => array(\n 'id' => array(\n 'description' => __( 'Unique identifier for the object.', 'dokan' ),\n 'type' => 'integer',\n ),\n ),\n\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'restore_announcement' ),\n 'permission_callback' => array( $this, 'restore_announcement_permissions_check' ),\n ),\n )\n );\n\n register_rest_route(\n $this->namespace, '/' . $this->base . '/batch', array(\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'batch_items' ),\n 'permission_callback' => array( $this, 'batch_items_permissions_check' ),\n 'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),\n ),\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 }", "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 }", "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'args' => array(),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'update_item' ),\n\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "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 $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 loadRoutes()\n {\n $this->app->call([$this, 'map']);\n }", "public static function register_endpoints() {\n // endpoints will be registered here\n register_rest_route( Liang_API_Endpoints::$base_url, '/index', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( 'Liang_API_Endpoints', 'get_index' ),\n ) );\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/location', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'update_user_location' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/quiz-result', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'save_quiz_result' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/ranking/(?P<park>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_ranking' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/point/(?P<slug>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_point' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/point/(?P<id>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'set_point_location' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/option/(?P<key>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_option' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/user', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'update_user' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/photo', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'upload_photo' ),\n\t\t\t)\n\t\t) );\n\t}", "protected function registerApiRoutes()\n {\n if (config('firefly.api.enabled')) {\n Route::group(config('firefly.api'), function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/api.php');\n });\n }\n }", "public function register_routes( Collection $routes );", "function register_routes(){\n \tregister_rest_route( parent::get_api_base(), $this->controller . 'get' , array(\n \t\t'methods' => WP_REST_Server::READABLE,\n \t\t'callback' => array($this,'run_cron'),\n\n \t\t//'permission_callback' => array( $this, 'get_item_permissions_check' ),\n \t));\n\t}", "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, $this->route, [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_options']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_options'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_options'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\n\t\tregister_rest_route( $this->namespace, $this->route . '/(?P<slug>.+)', [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_option']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_option'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_option'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\t}", "public function initializeRoutes()\n {\n $this->get(\"/\", \"index\");\n }", "public function registerRouters () {\n\t\tif ( !current_user_can( 'manage_options' ) )\n\t\t\treturn;\n\n\t\tforeach ( $this->classes as $class ) {\n\t\t\t\\Maven\\Core\\HookManager::instance()->addFilter( 'json_endpoints', array( $class, 'registerRoutes' ) );\n\t\t}\n\t}", "protected function registerRoutes()\n {\n Route::group([\n 'prefix' => config('knet.path'),\n 'namespace' => 'Asciisd\\Knet\\Http\\Controllers',\n 'as' => 'knet.',\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/../../routes/web.php');\n });\n }", "public function registerSiteRoutes()\n\t{\n\t\t// NOTE: the second route is used to capture files in subdirectories as well\n\t\treturn array(\n\t\t\t'internal/(?P<id>.\\d*)' => array('action' => 'AssetManagement/Assets/findById'),\n\t\t\t'internal/(?P<directory>.*)/(?P<name>.*)' => array('action' => 'AssetManagement/Assets/findInDirectory')\n\t\t);\n\t}", "protected function mapRoutes()\n {\n $this->loadRoutesFrom(__DIR__.'/../../routes/api/admin.php');\n }", "public function map()\n {\n Route::prefix('admin')\n ->middleware('admin')\n ->group(base_path('routes/admin.php'));\n }", "private function registerApiRoutes(): void\n {\n $detect = app(Detect::class);\n $monitor = app(Monitor::class);\n\n $type = Settings::TYPE__ROUTE_API_FILE;\n if (!$detect->resourceEnabled($type)) {\n return;\n }\n\n $monitor->startTimer('register ' . $type);\n\n foreach ($detect->getRouteApiFiles() as $path) {\n Route::middleware($detect->routeApiMiddleware())\n ->group($detect->basePath($path));\n }\n $monitor->incRegCount($type, count($detect->getRouteApiFiles()));\n\n $monitor->stopTimer('register ' . $type);\n }", "protected function configureRoutes()\n {\n if (Fortify::$registersRoutes) {\n Route::group([\n 'namespace' => 'Laravel\\Fortify\\Http\\Controllers',\n 'domain' => config('fortify.domain', null),\n 'prefix' => config('fortify.prefix'),\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/routes.php');\n });\n }\n }" ]
[ "0.7462359", "0.687647", "0.6843178", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.681941", "0.68188184", "0.68149436", "0.6805328", "0.6805328", "0.67802656", "0.67783004", "0.6774529", "0.6729404", "0.66269785", "0.6597511", "0.65428764", "0.6535373", "0.6535373", "0.6504714", "0.64801687", "0.6448324", "0.64357066", "0.64304864", "0.6413644", "0.6397068", "0.6385969", "0.6338158", "0.6338158", "0.6338158", "0.6331525", "0.6321901", "0.6306996", "0.6306903", "0.63010776", "0.62883395", "0.62867683", "0.6286565", "0.62588954", "0.62481767", "0.62363183", "0.6227663", "0.62247133", "0.62049866", "0.6181771", "0.61604595", "0.6158624", "0.614172", "0.61219203", "0.6100613", "0.61005473", "0.6099544", "0.6088146", "0.6086557", "0.6075146", "0.60739225", "0.60691243", "0.6062862", "0.6043414", "0.6032024", "0.6012089", "0.5982627", "0.59819025", "0.59702754", "0.5959706", "0.5959194", "0.59576637", "0.59531283", "0.5950834", "0.59461784", "0.5940517", "0.59402996" ]
0.0
-1
Registers the dashboard categories routes.
protected function forCategories($router) { $router->resource('categories', 'Categories\CategoriesController'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_routes()\n {\n\n $namespace = 'api/v1';\n $base = 'categories';\n\n register_rest_route($namespace, '/' . $base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array($this, 'create_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n\n register_rest_route($namespace, '/' . $base . '/(?P<id>\\d+)', array(\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array($this, 'update_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n }", "public function register_categories() {\n\t\tnew CSV_Import_Export_Redirections\\CSV_Import_Export_Redirections();\n\t\t$tax_labels = [\n\t\t\t'name' => _x( 'Redirection Categories', 'taxonomy general name', 'rank-math-pro' ),\n\t\t\t'singular_name' => _x( 'Redirection Category', 'taxonomy singular name', 'rank-math-pro' ),\n\t\t\t'search_items' => __( 'Search Redirection Categories', 'rank-math-pro' ),\n\t\t\t'all_items' => __( 'All Redirection Categories', 'rank-math-pro' ),\n\t\t\t'parent_item' => __( 'Parent Category', 'rank-math-pro' ),\n\t\t\t'parent_item_colon' => __( 'Parent Category:', 'rank-math-pro' ),\n\t\t\t'edit_item' => __( 'Edit Category', 'rank-math-pro' ),\n\t\t\t'update_item' => __( 'Update Category', 'rank-math-pro' ),\n\t\t\t'add_new_item' => __( 'Add New Category', 'rank-math-pro' ),\n\t\t\t'new_item_name' => __( 'New Category Name', 'rank-math-pro' ),\n\t\t\t'menu_name' => __( 'Redirection Categories', 'rank-math-pro' ),\n\t\t];\n\n\t\t$tax_args = [\n\t\t\t'labels' => $tax_labels,\n\t\t\t'public' => false,\n\t\t\t'rewrite' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => false,\n\t\t\t'query_var' => false,\n\t\t\t'hierarchical' => true,\n\t\t\t'capabilities' => [\n\t\t\t\t'manage_terms' => 'rank_math_redirections',\n\t\t\t\t'edit_terms' => 'rank_math_redirections',\n\t\t\t\t'delete_terms' => 'rank_math_redirections',\n\t\t\t\t'assign_terms' => 'rank_math_redirections',\n\t\t\t],\n\t\t];\n\n\t\tregister_taxonomy( 'rank_math_redirection_category', 'rank_math_redirection', $tax_args );\n\t}", "public static function routes(): void\n {\n Route::post(\"LaravelProducts/categories/list\", '\\\\' . __CLASS__ . '@list')->name('LaravelProducts.Categories.List');\n Route::post(\"LaravelProducts/categories/search\", '\\\\' . __CLASS__ . '@search')->name('LaravelProducts.Categories.Search');\n Route::post(\"LaravelProducts/categories/store\", '\\\\' . __CLASS__ . '@store')->name('LaravelProducts.Categories.Store');\n Route::post(\"LaravelProducts/categories/delete\", '\\\\' . __CLASS__ . '@delete')->name('LaravelProducts.Categories.Delete');\n }", "protected function registerRoutes()\n {\n if (!$this->app['config']->get('laratrust.panel.register')) {\n return;\n }\n\n Route::group([\n 'prefix' => config('laratrust.panel.path'),\n 'namespace' => 'Laratrust\\Http\\Controllers',\n 'middleware' => config('laratrust.panel.middleware', 'web'),\n ], function () {\n Route::redirect('/', '/'. config('laratrust.panel.path'). '/roles-assignment');\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }", "public function cws_register_cats() {\n\n\t\tforeach ( $this->cats as $args ) {\n\n\t\t\tregister_taxonomy( $this->post_type . '-category', array( $this->post_type ), $args );\n\n\t\t}\n\n\t}", "protected function registerRoutes()\n {\n Route::group([\n 'prefix' => config('dashkit.path'),\n 'middleware' => config('dashkit.middleware', 'web'),\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n });\n }", "public function register_rest_routes() {\n\t\t$controllers = array(\n\t\t\t'GF_REST_Entries_Controller',\n\t\t\t'GF_REST_Entry_Properties_Controller',\n\t\t\t'GF_REST_Entry_Notifications_Controller',\n\t\t\t'GF_REST_Notes_Controller',\n\t\t\t'GF_REST_Entry_Notes_Controller',\n\t\t\t'GF_REST_Form_Entries_Controller',\n\t\t\t'GF_REST_Form_Results_Controller',\n\t\t\t'GF_REST_Form_Submissions_Controller',\n\t\t\t'GF_REST_Forms_Controller',\n\t\t\t'GF_REST_Feeds_Controller',\n\t\t\t'GF_REST_Form_Feeds_Controller',\n\t\t);\n\n\t\tforeach ( $controllers as $controller ) {\n\t\t\t$controller_obj = new $controller();\n\t\t\t$controller_obj->register_routes();\n\t\t}\n\t}", "public function add_category() /// get routes of the form add cateogry\n {\n return view('admin.categories.add-category');\n }", "function add_routes_to_json($jsonData){\n\n // Get the name of the category base. Default to \"categories\"\n $category_base = get_option('category_base');\n\t\tif( empty($category_base) ){\n\t\t\t$category_base = 'category';\n\t\t}\n\n // build out router table to be used with Vue\n $programmed_routes = array(\n\n // Per-site\n // '/path' => 'VueComponent',\n // '/path/:var' => 'ComponentWithVar'\n // '/path/*/:var' => 'WildcardAndVar'\n // path_from_dev_id('dev-id') \t\t=> 'DefinedByDevId',\n\t\t // path_from_dev_id('dev-id', '/append-me') => 'DevIdPathPlusAppendedString',\n\n\t\t\t/*\n\t\t\t// Common Funkhaus setups\n\t\t\t// Directors - redirect to first child\n\t\t\tpath_from_dev_id('directors') => array(\n\t\t\t\t'redirect'\t=> get_child_of_dev_id_path('directors')\n\t\t\t),\n\t\t\t// Director detail\n\t\t\tpath_from_dev_id('directors', '/:director')\t\t\t\t\t=> 'DirectorDetail',\n\t\t\t// Reel grid\n\t\t\tpath_from_dev_id('directors', '/:director/:reel')\t\t\t=> 'ReelGrid',\n\t\t\t// Video detail\n\t\t\tpath_from_dev_id('directors', '/:director/:reel/:video')\t=> 'VideoDetail',\n\t\t\t// About\n\t\t\tpath_from_dev_id('about')\t=> 'About',\n\t\t\t// Contact\n\t\t\tpath_from_dev_id('contact')\t=> 'Contact',\n\t\t\t// Contact region - redirect to parent\n\t\t\tpath_from_dev_id('contact', '/:region')\t=> array(\n\t\t\t\t'redirect'\t=> path_from_dev_id('contact')\n\t\t\t),\n\t\t\t*/\n\n // Probably unchanging\n '' => 'FrontPage',\n '/' . $category_base => 'Archive',\n '/(\\\\d+)/:slug' => array(\n\t\t\t\t'name'\t\t=> 'SinglePost',\n\t\t\t\t'component'\t=> 'Default'\n\t\t\t), // If Permalinks set to \"/%post_id%/%postname%/\" then this will be a single Blog post\n '*' \t\t=> array(\n\t\t\t\t'name'\t\t=> 'Fallback',\n\t\t\t\t'component'\t=> 'Default'\n\t\t\t)\n\n );\n\n\t\t$jsonData['routes'] = array_merge( get_custom_template_routes(), $programmed_routes );\n\n\t\treturn $jsonData;\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 }", "public function register()\n {\n $controllers = [];\n\n foreach (Route::getRoutes()->getRoutes() as $route)\n {\n $action = $route->getAction();\n\n if (array_key_exists('controller', $action))\n {\n // You can also use explode('@', $action['controller']); here\n // to separate the class name from the method\n if(Str::contains($action['controller'],'@index')){\n $step1 = str_replace('Modules\\Admin\\Http\\Controllers','',$action['controller']); \n $step2 = str_replace(\"@index\", '', $step1);\n $step3 = str_replace(\"Controller\", '', $step2);\n \n $notArr = ['Auth','Admin','Role','Compaint','ContactGroup','ArticleType','Article','Press','MonthlyReport',\n 'Program','Reason','Settings'];\n if(in_array(ltrim($step3,'\"\\\"'), $notArr))\n {\n continue;\n }else{\n $controllers[] = ltrim($step3,'\"\\\"');\n }\n }\n \n }\n } \n \n View::share('controllers',$controllers);\n }", "public function register_routes()\n {\n }", "public function registerRoutes() {\n $this->addRoute('default');\n }", "protected function registerRoutes()\n {\n Route::group([\n 'domain' => config('documentation.domain', null),\n 'prefix' => config('documentation.path'),\n 'namespace' => 'Sonover\\Docs\\Http\\Controllers',\n 'middleware' => config('documentation.middleware', 'web'),\n ], function () {\n Route::get('/', 'DocumentationController@showRootPage');\n Route::get('{version}/{page?}', 'DocumentationController@show');\n });\n }", "public function register_rest_routes() {\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast',\n\t\t\tarray(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'get_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast_update',\n\t\t\tarray(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'update_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for episodes\n\t\t */\n\t\t$controller = new Episodes_Controller();\n\t\t$controller->register_routes();\n\n\t}", "protected function registerRoutes()\n {\n Route::group([\n 'prefix' => config('knet.path'),\n 'namespace' => 'Asciisd\\Knet\\Http\\Controllers',\n 'as' => 'knet.',\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/../../routes/web.php');\n });\n }", "public static function register_categories() {\n $args = apply_filters( 'wpex_taxonomy_publication_category_args', array(\n\n 'labels' => array(\n 'name' => __( 'Publication categories', 'total' ),\n 'singular_name' => __( 'Publication category', 'total' ),\n 'add_new' => __( 'Add New', 'total' ),\n 'add_new_item' => __( 'Add New Item', 'total' ),\n 'edit_item' => __( 'Edit Item', 'total' ),\n 'new_item' => __( 'Add New Item', 'total' ),\n 'view_item' => __( 'View Item', 'total' ),\n 'search_items' => __( 'Search Items', 'total' ),\n 'not_found' => __( 'No Items Found', 'total' ),\n 'not_found_in_trash' => __( 'No Items Found In Trash', 'total' )\n ),\n 'public' => true,\n 'show_in_nav_menus' => true,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'show_tagcloud' => true,\n 'hierarchical' => true,\n 'rewrite' => array( 'slug' => 'publication-category', 'with_front' => false ),\n 'query_var' => true\n ) );\n\n // Register the staff category taxonomy\n register_taxonomy( 'publication_category', array( 'publication' ), $args );\n\n }", "protected function registerRoutes(): void\n {\n Route::prefix('permission_makr')\n ->namespace('AlvariumDigital\\\\PermissionsMakr\\\\Http\\\\Controllers')\n ->as('permission_makr.')\n ->middleware(config('permission_makr.routes_middleware'))\n ->group(__DIR__ . '/routes/web.php');\n }", "public function index()\n {\n return new CategoriesResource(Category::all());\n }", "protected function registerRoutes(): void\n {\n Route::group([\n 'domain' => $this->app['config']['support-chat.domain'] ?? null,\n 'prefix' => $this->app['config']['support-chat.path'] ?? null,\n 'name' => 'support-chat.',\n 'namespace' => 'TTBooking\\\\SupportChat\\\\Http\\\\Controllers',\n 'middleware' => $this->app['config']['support-chat.middleware'] ?? 'web',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n\n require __DIR__.'/../routes/channels.php';\n }", "protected static function registerRoutes()\n {\n parent::routes(function ($router) {\n /* @var \\Illuminate\\Routing\\Router $router */\n $router->resource('useradmin/member', 'GG\\Admin\\Member\\Controllers\\MemberController');\n $router->resource('useradmin/permissions', 'GG\\Admin\\Member\\Controllers\\PermissionController');\n $router->resource('useradmin/roles', 'GG\\Admin\\Member\\Controllers\\RoleController');\n $router->resource('useradmin/menu', 'GG\\Admin\\Member\\Controllers\\MenuController');\n\n });\n }", "public function registerRoutes()\n\t{\n\t\t$this->app->booted(function ($app) {\n\n\t\t\t# Manager\n\t\t\t$app['router']->get(\n\t\t\t\t'/',\n\t\t\t\t[\n\t\t\t\t\t'as' => 'manager.index',\n\t\t\t\t\t'uses' => 'ManagerController@index'\n\t\t\t\t]\n\t\t\t);\n\n\t\t});\n\t}", "public static function registerTypeAndRoutes() {\n\n $data = array(\n 'plural_name' => 'Links',\n 'singular_name' => 'Link',\n 'dashicon' => 'dashicons-paperclip',\n 'supports' => array( 'title' ),\n 'post_type' => 'link'\n );\n\n parent::registerType($data);\n\n\t\t$controller = new LinkController();\n\t\t$controller->register_routes();\n\t}", "public function index()\n {\n $this->authorize('viewAny', Category::class);\n $categories = Category::all();\n return view('dashboard.category', compact('categories'));\n }", "public function registerMenuOptions()\n {\n if (Auth::user()->hasPermission('property_category.index')) {\n Menu::registerMenuOptions(Category::class, trans('plugins/real-estate::category.menu'));\n }\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 }", "public function registerCpSiteRoutes()\n\t{\n\t\treturn array();\n\t}", "protected function registerRoutes()\n {\n $this->registerWebRoutes();\n $this->registerApiRoutes();\n }", "public function index()\n\t{\n\t\tGate::authorize('admin');\n\n\t\t$categories = Category::all();\n\n\t\treturn view('manage_categories', compact('categories'));\n\t}", "public function registerRouters () {\n\t\tif ( !current_user_can( 'manage_options' ) )\n\t\t\treturn;\n\n\t\tforeach ( $this->classes as $class ) {\n\t\t\t\\Maven\\Core\\HookManager::instance()->addFilter( 'json_endpoints', array( $class, 'registerRoutes' ) );\n\t\t}\n\t}", "protected function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n });\n }", "protected function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n });\n }", "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, $this->route, [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_options']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_options'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_options'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\n\t\tregister_rest_route( $this->namespace, $this->route . '/(?P<slug>.+)', [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_option']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_option'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_option'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\t}", "public static function route_products_and_categories()\n\t{\n\t\tforeach(ORM::factory('product')->find_all() as $object)\n\t\t{\n\t\t\tKohana::config_set('routes.' . $object->show_path(false), inflector::plural($object->object_name) . '/show/' . $object);\n\t\t}\n\t\t\n\t\tforeach(ORM::factory('category')->find_all() as $object)\n\t\t{\n\t\t\tKohana::config_set('routes.' . $object->show_path(false), inflector::plural($object->object_name) . '/show/' . $object);\n\t\t}\n\t}", "public function testRouteListCategories()\n {\n $user = $this->makeAdminToLogin();\n $this->browse(function (Browser $browser) use ($user) {\n $browser->loginAs($user)\n ->visit('/admin')\n ->clickLink('CATEGORIES')\n ->assertPathIs('/admin/categories')\n ->assertSee('List Categories');\n });\n }", "public function categoryList()\n {\n $category = categories::orderBy('id', 'desc')->get();\n return view('backend.admin-panel.pages.viewCategories', compact('category'));\n }", "public function register_routes() {\n\n\t\t$namespace = $this->namespace;\n\n\t\t$base = $this->rest_base;\n\n\t\tregister_rest_route( $namespace, '/' . $base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t) );\n\t}", "protected function registerRoutes() {\n\n $this->get('/crossword', 'getCrossword');\n $this->post('/crossword', 'saveUserState');\n //not used\n //$this->get('/crossword', 'getCrossword');\n //$this->get('/wordData', 'getWordData');\n //);\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shops' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shop' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/manager', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'register_shop_manager' ),\n\t\t\t)\n\t\t) );\n\t}", "public function index()\n {\n //\n /*$roles = Role::all();\n\n return view('blog.admin.categories.index')->withCategories($categories);*/\n }", "public function index()\n {\n $page_title = 'Category';\n $page_description = 'Manage all categories';\n\n $data = Category::all();\n\n return view('dashboard.categories.index', compact('page_title', 'page_description', 'data'));\n }", "public function register_routes() {\n\t\tparent::register_routes();\n\n\t\t// Add a route for listing variations without specifying the parent product ID.\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/variations',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t)\n\t\t);\n\t}", "public function home_categories() {\n $data['categories'] = $this->settingsRepository->getCategories();\n\n return view('Admin::settings.home-categories', $data);\n }", "public function index(){\n // $node = Category::create([\n // 'category' => 'Foo', \n // 'children' => [\n // [\n // 'category' => 'nika',\n \n // 'children' => [\n // [ 'category' => 'mate' ],\n // [ 'category' => 'luka' ],\n // [ 'category' => 'mariami' ],\n // [ 'category' => 'ana' ],\n // ],\n // ],\n // ],\n // ]);\n\n $categories = Category::with('ancestors')->paginate(30);\n //dd($categories->pluck('category'));\n return view('admin.dashboard',[\n 'categories' => $categories,\n 'categoriesCount' => Category::count(),\n 'productsCount' => Product::count(),\n 'usersCount' => User::count()\n ]);\n }", "protected function registerRoutes()\n {\n if (EfaasProvider::$registersRoutes) {\n Route::group([\n 'as' => 'efaas.',\n 'namespace' => '\\Javaabu\\EfaasSocialite\\Http\\Controllers',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../../routes/web.php');\n });\n }\n }", "public function index()\n {\n $categories = Category::all();\n return view('dashboard.categories.listCategories')->with('categories', $categories);\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 }", "protected function mapCustomerRoutes()\n {\n Route::middleware([\n 'web',\n 'customer',\n ])->prefix('dashboard')->namespace($this->namespace)->group(base_path('routes/customer.php'));\n }", "public function boot()\n {\n parent::boot();\n Route::pattern('id', '[0-9]+');\n Route::pattern('page', '[0-9]+');\n Route::pattern('title', '[0-9a-zA-Z-]+');\n\n $tmp=Category::RouteCategory();\n $Categories=$tmp['RouteCategories'];\n $SubCategories=$tmp['RouteSubCategories'];\n\n Route::pattern('category',$Categories);\n Route::pattern('subcategory',$SubCategories);\n\n }", "public function index()\n {\n $this->categoryRepository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n \n // Get All Categories \n $categories = $this->categoryRepository->getCategoryList();\n if (request()->wantsJson()) {\n return response()->json([\n 'data' => $categories,\n ]);\n }\n return view('admin.categories.index', compact('categories'));\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<status>[\\w-]+)', array(\n\t\t\t'args' => array(\n\t\t\t\t'status' => array(\n\t\t\t\t\t'description' => __( 'An alphanumeric identifier for the status.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t'args' => array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "private function registerRoutes(){\n $appRouter = require_once __DIR__.'/../../routes/app.php';\n $this->registerApplicationRoutes($appRouter);\n $this->registerApplicationRoutes($appRouter, false);\n $this->registerAuthenticationRoutes();\n }", "public function index(){\n return view('adminviews.categories.index');\n }", "public function register_routes() {\n\n\t\t\t$collection_params = $this->get_collection_params();\n\t\t\t$schema = $this->get_item_schema();\n\n\t\t\t$get_item_args = array(\n\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t);\n\n\t\t\tregister_rest_route(\n\t\t\t\t$this->namespace,\n\t\t\t\t'/' . $this->rest_base . '/(?P<id>[\\d]+)/' . $this->rest_sub_base,\n\t\t\t\tarray(\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t'description' => esc_html__( 'User ID', 'learndash' ),\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'get_user_groups' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'get_user_groups_permissions_check' ),\n\t\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'update_user_groups' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'update_user_groups_permissions_check' ),\n\t\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t\t'group_ids' => array(\n\t\t\t\t\t\t\t\t'description' => esc_html__( 'Group IDs to add to User.', 'learndash' ),\n\t\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'delete_user_groups' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'delete_user_groups_permissions_check' ),\n\t\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t\t'group_ids' => array(\n\t\t\t\t\t\t\t\t'description' => esc_html__( 'Group IDs to remove from User.', 'learndash' ),\n\t\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t\t)\n\t\t\t);\n\t\t}", "public function index()\n {\n $categories = $this->category->paginate(25);\n return view('dashboard.categories.index', compact('categories'));\n }", "function categories(){\n\t\t\t$this->load->view('admin/header');\n\t\t\t$this->load->view('admin/categories');\n\t\t\t$this->load->view('admin/footer');\n\t\t}", "public function index()\n {\n $categories = Category::all();\n return view('adminlte::categories.main',compact('categories'));\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 defineRoutes()\n {\n if ($this->app->routesAreCached() || config('sanctum.routes') === false) {\n return;\n }\n\n Route::group(['prefix' => config('sanctum.prefix', 'sanctum')], function () {\n Route::get(\n '/csrf-cookie',\n CsrfCookieController::class.'@show'\n )->middleware('web');\n });\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => array(),\n\t\t\t)\n\t\t) );\n }", "public function registerCpRoutes()\n {\n return array(\n 'amforms/forms' => array(\n 'action' => 'amForms/forms/index'\n ),\n 'amforms/forms/new' => array(\n 'action' => 'amForms/forms/editForm'\n ),\n 'amforms/forms/edit/(?P<formId>\\d+)' => array(\n 'action' => 'amForms/forms/editForm'\n ),\n\n 'amforms/submissions' => array(\n 'action' => 'amForms/submissions/index'\n ),\n 'amforms/submissions/edit/(?P<submissionId>\\d+)' => array(\n 'action' => 'amForms/submissions/editSubmission'\n ),\n\n 'amforms/submissions/edit/(?P<submissionId>\\d+)/notes' => array(\n 'action' => 'amForms/notes/displayNotes'\n ),\n\n 'amforms/fields' => array(\n 'action' => 'amForms/fields/index'\n ),\n 'amforms/fields/new' => array(\n 'action' => 'amForms/fields/editField'\n ),\n 'amforms/fields/edit/(?P<fieldId>\\d+)' => array(\n 'action' => 'amForms/fields/editField'\n ),\n\n 'amforms/exports' => array(\n 'action' => 'amForms/exports/index'\n ),\n 'amforms/exports/new' => array(\n 'action' => 'amForms/exports/editExport'\n ),\n 'amforms/exports/edit/(?P<exportId>\\d+)' => array(\n 'action' => 'amForms/exports/editExport'\n ),\n\n 'amforms/settings' => array(\n 'action' => 'amForms/settings/index'\n ),\n 'amforms/settings/exports' => array(\n 'action' => 'amForms/settings/exports'\n ),\n 'amforms/settings/antispam' => array(\n 'action' => 'amForms/settings/antispam'\n ),\n 'amforms/settings/recaptcha' => array(\n 'action' => 'amForms/settings/recaptcha'\n ),\n 'amforms/settings/templates' => array(\n 'action' => 'amForms/settings/templates'\n )\n );\n }", "public function register_routes() {\n\n\t\t\\add_filter( 'do_parse_request', array( $this, 'handle_routing' ) );\n\n\t}", "public function categories()\n {\n $user = Auth::user();\n $categories = Categories::all();\n return view('categories', compact('user', 'categories'));\n }", "public function index()\n {\n $total_cats = count(Category::get());\n $categories = Category::orderby('id', 'desc')\n ->paginate(4);\n return view('/administration/categories', ['categories' => $categories, 'total_cats' => $total_cats]);\n }", "public function categories()\n {\n $group_id = ee()->input->get('group_id') ? ee()->input->get('group_id') : ee()->publisher_category->get_first_group();\n\n $vars = ee()->publisher_helper_cp->get_category_vars($group_id);\n\n $vars = ee()->publisher_helper_cp->prep_category_vars($vars);\n\n // Load the file manager for the category image.\n ee()->publisher_helper_cp->load_file_manager();\n\n // Bail if there are no category groups defined.\n if (empty($vars['category_groups']))\n {\n show_error('No category groups found, please <a href=\"'. BASE.AMP .'D=cp&C=admin_content&M=edit_category_group\">create one</a>.');\n }\n\n return ee()->load->view('category/index', $vars, TRUE);\n }", "protected function registerRoutes()\n {\n Route::group([\n 'prefix' => config('paystacksubscription.webhook_path'),\n 'namespace' => 'Digikraaft\\PaystackSubscription\\Http\\Controllers',\n 'as' => 'paystack.',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }", "public function index()\n {\n $categories = Category::/*select('id', 'root', 'name','slug')->*/where('root', 0)->get();\n return view('backend.category.manage', compact('categories'));\n }", "public function index()\n {\n $categories = Category::get();\n return view('pages.admin.category.index', compact('categories'));\n }" ]
[ "0.6629065", "0.63622636", "0.63558084", "0.62196827", "0.61435604", "0.588969", "0.57700586", "0.57687694", "0.5685018", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.56548166", "0.5654339", "0.5654142", "0.5645897", "0.56135917", "0.55910754", "0.5577217", "0.55640703", "0.55576915", "0.5541125", "0.5534836", "0.5517641", "0.54775816", "0.5444009", "0.54329574", "0.54250914", "0.54190415", "0.54142886", "0.5407932", "0.54046845", "0.54025346", "0.53935647", "0.53935647", "0.53823644", "0.53812486", "0.53760153", "0.5369923", "0.53652084", "0.53563446", "0.5355815", "0.5345971", "0.5334129", "0.5327529", "0.5318812", "0.53104347", "0.5307963", "0.53078026", "0.5296376", "0.5296376", "0.5296044", "0.5295895", "0.52934355", "0.52904314", "0.5288563", "0.52866745", "0.5284002", "0.5281589", "0.52796227", "0.5271707", "0.5271285", "0.5269044", "0.52644116", "0.52634144", "0.5260158", "0.52347046", "0.5231707", "0.52272797", "0.52265584", "0.5223451", "0.5220704" ]
0.5750465
8
Registers the dashboard products features routes.
protected function forProductsFeatures($router) { $router->resource('features', 'Features\FeaturesController'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_routes() {\n # GET/POST /products\n $routes[$this->base] = array(\n array( array( $this, 'get_products' ), WC_API_Server::READABLE ),\n array( array( $this, 'create_product' ), WC_API_SERVER::CREATABLE | WC_API_Server::ACCEPT_DATA ),\n );\n }", "public function register_routes() {\n\t\tparent::register_routes();\n\n\t\t// Add a route for listing variations without specifying the parent product ID.\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/variations',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t)\n\t\t);\n\t}", "function creta_product_register_route() {\n register_rest_route( 'cr/v1', 'cr-woo', array(\n 'methods' => 'GET',\n 'callback' => 'get_all_products_external',\n // 'permission_callback' => function() {\n // return current_user_can( 'edit_posts' );\n // },\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'GET',\n 'callback' => 'get_product_by_sku_external',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'PUT',\n 'callback' => 'update_product_by_sku_external',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo', array(\n 'methods' => 'POST',\n 'callback' => 'create_new_product_external',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'DELETE',\n 'callback' => 'del_product_by_sku_external',\n ) \n );\n\n /*--------route internal woocommerce */\n register_rest_route( 'cr/v1', 'cr-woo-in', array(\n 'methods' => 'GET',\n 'callback' => 'get_all_products_internal',\n // 'permission_callback' => function() {\n // return current_user_can( 'edit_posts' );\n // },\n )\n ); \n\n \n register_rest_route( 'cr/v1', 'cr-woo-in/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'GET',\n 'callback' => 'get_product_by_sku_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'PUT',\n 'callback' => 'update_product_by_sku_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in', array(\n 'methods' => 'POST',\n 'callback' => 'create_new_product_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'DELETE',\n 'callback' => 'del_product_by_sku_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in/sku-list', array(\n 'methods' => 'GET',\n 'callback' => 'get_sku_list_internal',\n ) \n );\n }", "function spf_register_route(){\n register_rest_route('wooapp/v1','/shop/products',Array(\n 'methods' => 'GET',\n 'callback' => 'spf_get_shop_products',\n ));\n\n register_rest_route('wooapp/v1', '/auth/register', [\n 'methods' => 'POST',\n 'callback' => 'spf_register_new_user',\n ]);\n\n register_rest_route('wooapp/v1', '/auth/login', [\n 'methods' => 'POST',\n 'callback' => 'spf_login_user',\n ]);\n}", "function add_endpoint() {\n flush_rewrite_rules();\n $whitelist_roles = array('administrator');\n $user = wp_get_current_user();\n $user_role = (array) $user->roles;\n \n if (in_array($user_role[0], $whitelist_roles)) {\n add_rewrite_endpoint( 'add-products', EP_ROOT | EP_PAGES );\n }\n }", "function registerEndpoints()\n{\n $namespace = 'travel-review-app/v1';\n\n register_rest_route(\n $namespace,\n '/destinations-default-wordpress',\n [\n 'methods' => 'GET',\n 'callback' => 'listDestinationsDefaultWordPress',\n ]\n );\n}", "public static function register_endpoints() {\n // endpoints will be registered here\n register_rest_route( Liang_API_Endpoints::$base_url, '/index', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( 'Liang_API_Endpoints', 'get_index' ),\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}", "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, $this->route, [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_options']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_options'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_options'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\n\t\tregister_rest_route( $this->namespace, $this->route . '/(?P<slug>.+)', [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_option']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_option'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_option'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\t}", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shops' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shop' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/manager', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'register_shop_manager' ),\n\t\t\t)\n\t\t) );\n\t}", "public function register_routes()\n {\n\n $namespace = 'api/v1';\n $base = 'categories';\n\n register_rest_route($namespace, '/' . $base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array($this, 'create_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n\n register_rest_route($namespace, '/' . $base . '/(?P<id>\\d+)', array(\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array($this, 'update_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n }", "public function register()\n {\n Route::group([\n 'namespace' => 'WooCommerce\\ProductAttributeGroup\\Controllers'\n ], function () {\n require themosis_path('plugin.woocommerce-product-attribute-group.resources').'routes.php';\n });\n }", "protected function registerRoutes()\n {\n if (!$this->app['config']->get('laratrust.panel.register')) {\n return;\n }\n\n Route::group([\n 'prefix' => config('laratrust.panel.path'),\n 'namespace' => 'Laratrust\\Http\\Controllers',\n 'middleware' => config('laratrust.panel.middleware', 'web'),\n ], function () {\n Route::redirect('/', '/'. config('laratrust.panel.path'). '/roles-assignment');\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }", "function register_endpoints(){\n\t$route_base = 'wc/v1';\n\n\tregister_rest_route($route_base, '/posts', array(\n\t\t'methods' => 'GET',\n\t\t'callback' => 'api_get_posts',\n\t\t'permission_callback' => 'helper_authentication_check'\n\t));\n\n\tregister_rest_route($route_base, '/posts/(?P<post_id>\\d+)', array(\n\t\t'methods' => 'GET',\n\t\t'callback' => 'api_get_post',\n\t\t'permission_callback' => 'helper_authentication_check'\n\t));\n}", "function register_api_routes() {\n\tregister_rest_route( Altis\\API_NAMESPACE, '/telemetry', [\n\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t'permission_callback' => function () {\n\t\t\treturn is_user_logged_in();\n\t\t},\n\t\t'callback' => __NAMESPACE__ . '\\\\handle_telemetry_endpoint',\n\t\t'args' => [\n\t\t\t'opt_in' => [\n\t\t\t\t'type' => 'boolean',\n\t\t\t\t'default' => false,\n\t\t\t],\n\t\t],\n\t] );\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 }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public static function register_endpoints() {\n\t\t\n $namespace = sprintf( 'wp/%s', API_VERSION );\n \n // Create a new blank package\n register_rest_route( $namespace, API_PREFIX . 'package/add', array(\n 'methods' => 'GET',\n 'callback' => array( 'Doolittle_Package_REST_API_Endpoints', 'add' ),\n ) );\n \n // Delete a package\n register_rest_route( $namespace, API_PREFIX . 'package/delete', array(\n 'methods' => 'POST',\n 'callback' => array( 'Doolittle_Package_REST_API_Endpoints', 'delete' ),\n 'args' => array(\n 'post_ids' => array(\n 'required' => true,\n 'type' => 'object',\n 'description' => 'Package post_ids',\n ) \n )\n ) );\n \n \n // Delete a package\n register_rest_route( $namespace, API_PREFIX . 'package/update', array(\n 'methods' => 'POST',\n 'callback' => array( 'Doolittle_Package_REST_API_Endpoints', 'update' ),\n 'args' => array(\n 'data' => array(\n 'required' => true,\n 'type' => 'object',\n 'description' => 'Package form',\n ) \n )\n ) );\n\t}", "protected function registerFeature() {\r\n //add feature\r\n $capability = aam_Core_ConfigPress::getParam(\r\n 'aam.feature.' . self::FEATURE_ID . '.capability', \r\n 'administrator'\r\n );\r\n\r\n //makre sure that current user has access to current Extension. This is \r\n //mandatory check and should be obeyed by all developers\r\n if (current_user_can($capability)) {\r\n //register the Extension's javascript\r\n add_action('admin_print_scripts', array($this, 'printScripts'));\r\n //register the Extension's stylesheet\r\n add_action('admin_print_styles', array($this, 'printStyles'));\r\n //register the Feature\r\n aam_View_Collection::registerFeature((object) array(\r\n //uid is mandatory and this should be the unique ID\r\n 'uid' => self::FEATURE_ID,\r\n //Extension Position is the list of AAM features. This works\r\n //the same way as WordPress Admin Menu\r\n 'position' => 150,\r\n //Extension's Title\r\n 'title' => __('Feature Example', 'aam'),\r\n //Define what subjects can see the Extenion's UI. AAM is based on \r\n //idea of Subjects (Blog, Role, User & Visitor) and Objects (Post, \r\n //Term, Event, Menu etc). This property defines what Subjects are\r\n //allowed to see this feature. So as Example if you click on Visitor\r\n //(on the Control Manager) you will not find Menu or Metabox Features.\r\n //This is because any visitor of your website does not have access to\r\n //backend so there is no need to show these features.\r\n 'subjects' => array(\r\n aam_Control_Subject_Role::UID,\r\n aam_Control_Subject_User::UID,\r\n aam_Control_Subject_Visitor::UID\r\n ),\r\n //Reference to Extension's Controller. Make sure that if your \r\n //Extension display any UI, the controller property contains the \r\n //instance of the Extenion's Controller and Controller has function\r\n //content. See aam_View_Manager::retrieveFeatures function for more\r\n //information\r\n 'controller' => $this\r\n ));\r\n }\r\n }", "public static function route_products_and_categories()\n\t{\n\t\tforeach(ORM::factory('product')->find_all() as $object)\n\t\t{\n\t\t\tKohana::config_set('routes.' . $object->show_path(false), inflector::plural($object->object_name) . '/show/' . $object);\n\t\t}\n\t\t\n\t\tforeach(ORM::factory('category')->find_all() as $object)\n\t\t{\n\t\t\tKohana::config_set('routes.' . $object->show_path(false), inflector::plural($object->object_name) . '/show/' . $object);\n\t\t}\n\t}", "public function register_endpoints() {\n\n foreach (static::$endpoints as $endpoint => $function) {\n\n $regular = 'wp_ajax_' . $endpoint;\n $nopriv = 'wp_ajax_nopriv_' . $endpoint;\n\n add_action( $regular, array( $this, $function ) );\n add_action( $nopriv, array( $this, $function ) );\n\n }\n }", "function routes_install()\r\n{\r\n\tregister_hook('init_1', 'addon/routes/routes.php', 'routes_init_1');\r\n\tregister_hook('post_local', 'addon/routes/routes.php', 'routes_post_local_end_hook');\r\n\tregister_hook('profile_tabs', 'addon/routes/routes.php', 'routes_profile_tabs_hook');\r\n}", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => array(),\n\t\t\t)\n\t\t) );\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}", "public static function register_rest_routes() {\n\t\tforeach (static::$apis as $api) {\n\t\t\t$api->register_rest_route();\n\t\t}\n }", "public function register_routes() {\n\n\t\t$namespace = $this->namespace;\n\n\t\t$base = $this->rest_base;\n\n\t\tregister_rest_route( $namespace, '/' . $base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t) );\n\t}", "public function registerRoutes() {\n $this->addRoute('default');\n }", "public function products_ids_route()\n {\n register_rest_route($this->namespace, '/products/ids/', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'products_ids_callback'),\n 'permission_callback' => array($this, 'get_items_permissions_check'),\n ));\n }", "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'args' => array(),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'update_item' ),\n\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "private function register_routes() {\n\t\t$routes = $this->get_routes();\n\t\tforeach ( $routes as $route ) {\n\t\t\t$route->register();\n\t\t}\n\t}", "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'parse_url_details' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'url' => array(\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'description' => __( 'The URL to process.' ),\n\t\t\t\t\t\t\t'validate_callback' => 'wp_http_validate_url',\n\t\t\t\t\t\t\t'sanitize_callback' => 'sanitize_url',\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' ),\n\t\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "protected function registerRoutes()\n {\n $middleware = ['exposable.signature', 'exposable.expire', 'exposable.guard'];\n\n if (! empty(config('exposable.middleware'))) {\n $middleware = array_merge($middleware, (array) config('exposable.middleware'));\n }\n\n $uri = config('exposable.url-prefix').'/{exposable}/{id}';\n\n $this->app['router']->get($uri, 'ArjanWestdorp\\Exposable\\Http\\Controllers\\ExposableController@show')->middleware($middleware)->name('exposable.show');\n }", "function add_menus_endpoint() {\n\n\t\tif ( $this->config[\"rest\"][\"menus\"] ) {\n\t\t\tregister_rest_route(\n\t\t\t\tWPN_REST_URL,\n\t\t\t\t'/menus',\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => 'GET',\n\t\t\t\t\t'callback' => array( $this, 'api_list_menus' )\n\t\t\t\t) );\n\n\n//\t\t\tregister_rest_route(\n//\t\t\t\tWPN_REST_URL,\n//\t\t\t\t'/menus/(?P<slug>[0-9a-zA-Z(-]+)',\n//\t\t\t\tarray(\n//\t\t\t\t\t'methods' => 'GET',\n//\t\t\t\t\t'callback' => array( $this, 'api_menu_by_id_slug' )\n//\t\t\t\t) );\n\n\t\t\tregister_rest_route(\n\t\t\t\tWPN_REST_URL,\n\t\t\t\t'/menus/(?P<id>\\d+)',\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => 'GET',\n\t\t\t\t\t'callback' => array( $this, 'api_menu_by_id_slug' )\n\t\t\t\t) );\n\t\t}\n\t}", "function quasar_register_products(){\n\t//'menu_icon' => F_WAY .'/images/admin-icons/products.png',\n\tregister_post_type('quasarproducts', array(\n\t\t'label' => 'Quasar Products',\n\t\t'singular_label' => 'Quasar Product',\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'capability_type' => 'page',\n\t\t'publicly_queryable' \t=> true,\n\t\t'exclude_from_search' \t=> false,\n\t\t'hierarchical' => false,\n\t\t'rewrite' => array(\n\t\t\t'slug' => xr_get_option('quasar_product_slug', 'quasarproducts'),\n\t\t\t'with_front' => false,\n\t\t ),\n\t\t'query_var' => true,\n\t\t'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'comments', 'custom-fields', 'page-attributes' ),\n\t\t'show_in_nav_menus' \t=> true\n\t));\n\tregister_taxonomy(\"quasarproduct_cat\",\n\t\t\t\t\t array(\"quasarproducts\"), \n\t\t\t\t\t array(\"hierarchical\" => true,\n\t\t\t\t\t \t\t\"label\" => __(\"Quasar Product Categories\", \"quasar\"),\n\t\t\t\t\t\t\t\"singular_label\" => \"Category\",\n\t\t\t\t\t\t\t\"rewrite\" => array(\n\t\t\t\t\t\t\t\t\"slug\" => xr_get_option(\"quasar_product_category_slug\", \"quasarproduct_cat_slug\"),\n\t\t\t\t\t\t\t\t\"with_front\"=>false\n\t\t\t\t\t\t\t)));\n}", "protected function registerRoutes()\n {\n if (EfaasProvider::$registersRoutes) {\n Route::group([\n 'as' => 'efaas.',\n 'namespace' => '\\Javaabu\\EfaasSocialite\\Http\\Controllers',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../../routes/web.php');\n });\n }\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 registerRouters () {\n\t\tif ( !current_user_can( 'manage_options' ) )\n\t\t\treturn;\n\n\t\tforeach ( $this->classes as $class ) {\n\t\t\t\\Maven\\Core\\HookManager::instance()->addFilter( 'json_endpoints', array( $class, 'registerRoutes' ) );\n\t\t}\n\t}", "public function register_routes() {\n\t\tparent::register_routes();\n\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base . '/totals',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_totals' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_totals_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "public function register_routes() {\n\n\t\t\\add_filter( 'do_parse_request', array( $this, 'handle_routing' ) );\n\n\t}", "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 }", "public function registerFormRoutes() {\n add_action('rest_api_init', function() {\n register_rest_route('forms/v1', '/submit', [\n 'methods' => 'POST',\n 'callback' => [$this, 'handleSubmission']\n ]);\n });\n }", "public function register_rest_routes() {\n\t\t$controllers = array(\n\t\t\t'GF_REST_Entries_Controller',\n\t\t\t'GF_REST_Entry_Properties_Controller',\n\t\t\t'GF_REST_Entry_Notifications_Controller',\n\t\t\t'GF_REST_Notes_Controller',\n\t\t\t'GF_REST_Entry_Notes_Controller',\n\t\t\t'GF_REST_Form_Entries_Controller',\n\t\t\t'GF_REST_Form_Results_Controller',\n\t\t\t'GF_REST_Form_Submissions_Controller',\n\t\t\t'GF_REST_Forms_Controller',\n\t\t\t'GF_REST_Feeds_Controller',\n\t\t\t'GF_REST_Form_Feeds_Controller',\n\t\t);\n\n\t\tforeach ( $controllers as $controller ) {\n\t\t\t$controller_obj = new $controller();\n\t\t\t$controller_obj->register_routes();\n\t\t}\n\t}", "function register_rest_routes() {\n\tif ( class_exists( '\\WP_REST_Controller' ) ) {\n\t\tinclude_once __DIR__ . '/wprest-shortcodes-controller.php';\n\t\t$controller = new rest\\WPREST_Shortcodes_Controller();\n\t\t$controller->register_routes();\n\t}\n}", "protected function registerRoutes()\n {\n $this->registerWebRoutes();\n $this->registerApiRoutes();\n }", "public static function routes(): void\n {\n Route::post(\"LaravelProducts/categories/list\", '\\\\' . __CLASS__ . '@list')->name('LaravelProducts.Categories.List');\n Route::post(\"LaravelProducts/categories/search\", '\\\\' . __CLASS__ . '@search')->name('LaravelProducts.Categories.Search');\n Route::post(\"LaravelProducts/categories/store\", '\\\\' . __CLASS__ . '@store')->name('LaravelProducts.Categories.Store');\n Route::post(\"LaravelProducts/categories/delete\", '\\\\' . __CLASS__ . '@delete')->name('LaravelProducts.Categories.Delete');\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/location', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'update_user_location' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/quiz-result', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'save_quiz_result' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/ranking/(?P<park>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_ranking' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/point/(?P<slug>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_point' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/point/(?P<id>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'set_point_location' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/option/(?P<key>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_option' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/user', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'update_user' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/photo', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'upload_photo' ),\n\t\t\t)\n\t\t) );\n\t}", "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 }", "public function register_routes() {\n\n register_rest_route( $this->namespace, '/' . $this->base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array( $this->service, 'create' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => $this->get_endpoint_args_for_item_schema( true ),\n 'accept_json' => true\n ),\n ) );\n\n register_rest_route( $this->namespace, '/' . $this->base . '/(?P<id>[\\d]+)', array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this->service, 'get' ),\n 'permission_callback' => array( $this, 'getAllUserCheck' ),\n 'args' => array(\n 'context' => array(\n 'default' => 'view',\n )\n ),\n ),\n\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this->service, 'update' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => $this->get_endpoint_args_for_item_schema( false ),\n 'accept_json' => true\n ),\n\n array(\n 'methods' => WP_REST_Server::DELETABLE,\n 'callback' => array( $this->service, 'delete' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => array(\n 'force' => array(\n 'default' => false,\n ),\n ),\n ),\n ) );\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<status>[\\w-]+)', array(\n\t\t\t'args' => array(\n\t\t\t\t'status' => array(\n\t\t\t\t\t'description' => __( 'An alphanumeric identifier for the status.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t'args' => array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "public static function registerEndpoints() {\n $register = register_rest_route(\n\t\t\t'UKM', \n\t\t\t'/informasjon/', \n\t\t\t[\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'informasjonsMeny'],\n\t\t\t\t'args' => []\n\t\t\t]\n );\n\n /**\n * ENDPOINT 4: Innlegg i bloggen\n */\n $register = register_rest_route(\n\t\t\t'UKM', \n\t\t\t'/nyheter/', \n\t\t\t[\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'nyheter'],\n\t\t\t\t'args' => []\n\t\t\t]\n );\n\n\n /**\n * ENDPOINT 5: Innlegg fra kategori\n */\n $register = register_rest_route(\n\t\t\t'UKM', \n\t\t\t'/kategori/(?P<id>\\d+)', \n\t\t\t[\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'kategori'],\n\t\t\t\t'args' => []\n\t\t\t]\n );\n\n /**\n * ENDPOINT 1 Info om en gitt post\n */\n $register = register_rest_route(\n 'UKM',\n '/post/(?P<id>\\d+)',\n [\n 'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'post'],\n 'args' => ['id']\n ]\n );\n\n /**\n * ENDPOINT 2: Innholdet i en post\n */\n $register = register_rest_route(\n 'UKM',\n '/content/(?P<id>\\d+)',\n [\n 'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'postContent'],\n 'args' => ['id']\n ]\n );\n }", "function wp_oembed_register_route()\n {\n }", "protected function registerRoutes()\n {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n }", "public static function registerProduct( $products ) {\n\t\t\t$product_details = self::$product_data;\n\t\t\t$product_details['dir'] = self::$product_data['isPlugin'] ? basename( __DIR__ ) . '/' . basename( __FILE__ ) : basename( get_template_directory() ) . '/functions.php'; // TODO: Remove this hardcoded value\n\t\t\t$product_details['whmcs_path'] = self::$product_data['isPlugin'] ? dirname( __FILE__ ) : get_template_directory();\n\t\t\t$products[] = $product_details;\n\n\t\t\treturn $products;\n\t\t}", "public function actionFeatureproduct()\n {\n $route = 'merchant.getFeatureProduct';\n $request = new getFeatureProductsRequest();\n $request->setCustomerId($this->customer_id);\n $request->setAuthToken($this->auth_token);\n $request->setWholesalerId(3);\n $result = Proxy::sendRequest($route, $request);\n $header = $result->getHeader();\n $body = getFeatureProductsResponse::parseFromString($result->getPackageBody());\n return $this->render('index',[\n 'request' => $request->toArray(),\n 'route' => $route,\n 'header' => $header,\n 'body' => $body\n ]);\n }", "public function register() {\n\t\tadd_action(\n\t\t\t'rest_api_init',\n\t\t\tfunction() {\n\t\t\t\t$this->register_routes();\n\t\t\t}\n\t\t);\n\n\t\tadd_filter(\n\t\t\t'do_parse_request',\n\t\t\tfunction( $do_parse_request, $wp ) {\n\t\t\t\tadd_filter(\n\t\t\t\t\t'query_vars',\n\t\t\t\t\tfunction( $vars ) use ( $wp ) {\n\t\t\t\t\t\t// Unsets standard public query vars to escape conflicts between WordPress core\n\t\t\t\t\t\t// and Google Site Kit APIs which happen when WordPress incorrectly parses request\n\t\t\t\t\t\t// arguments.\n\n\t\t\t\t\t\t$unset_vars = ( $wp->request && stripos( $wp->request, trailingslashit( rest_get_url_prefix() ) . self::REST_ROOT ) !== false ) // Check regular permalinks.\n\t\t\t\t\t\t\t|| ( empty( $wp->request ) && stripos( $this->context->input()->filter( INPUT_GET, 'rest_route' ), self::REST_ROOT ) !== false ); // Check plain permalinks.\n\n\t\t\t\t\t\tif ( $unset_vars ) {\n\t\t\t\t\t\t\t// List of variable names to remove from public query variables list.\n\t\t\t\t\t\t\treturn array_values(\n\t\t\t\t\t\t\t\tarray_diff(\n\t\t\t\t\t\t\t\t\t$vars,\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'orderby',\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn $vars;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\treturn $do_parse_request;\n\t\t\t},\n\t\t\t10,\n\t\t\t2\n\t\t);\n\t}", "protected function configureRoutes()\n {\n if (Fortify::$registersRoutes) {\n Route::group([\n 'namespace' => 'Laravel\\Fortify\\Http\\Controllers',\n 'domain' => config('fortify.domain', null),\n 'prefix' => config('fortify.prefix'),\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/routes.php');\n });\n }\n }", "public function register_rest_routes() {\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast',\n\t\t\tarray(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'get_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast_update',\n\t\t\tarray(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'update_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for episodes\n\t\t */\n\t\t$controller = new Episodes_Controller();\n\t\t$controller->register_routes();\n\n\t}", "protected static function registerRoutes()\n {\n parent::routes(function ($router) {\n /* @var \\Illuminate\\Routing\\Router $router */\n $router->resource('useradmin/member', 'GG\\Admin\\Member\\Controllers\\MemberController');\n $router->resource('useradmin/permissions', 'GG\\Admin\\Member\\Controllers\\PermissionController');\n $router->resource('useradmin/roles', 'GG\\Admin\\Member\\Controllers\\RoleController');\n $router->resource('useradmin/menu', 'GG\\Admin\\Member\\Controllers\\MenuController');\n\n });\n }", "public function products_updated_route()\n {\n register_rest_route($this->namespace, '/products/updated/', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'products_updated_callback'),\n 'permission_callback' => array($this, 'get_items_permissions_check'),\n ));\n }", "public function registerRoutes(Map $map)\n {\n $map->attach('legacy.', '/', function (Map $map) {\n\n // Admin\n //$map->get('admin.index', 'admin/', $this->controller(AdminController::class, 'index'))->allows(['POST']);\n $map->get('admin.assets', 'admin/assets/{asset}', $this->controller(AdminController::class, 'assets'))\n ->tokens(['asset' => '.+']);\n $map->get('admin.page', 'admin/', $this->controller(AdminController::class, 'index'))->allows(['POST'])\n ->wildcard('page');\n\n // Index\n $map->get('index', '', $this->controller(PagesController::class, 'index'))->allows(['POST']);\n\n // Named article\n $map->get('article', '{name}.html', $this->controller(PagesController::class, 'articles'))\n ->tokens(['name' => '[^/.]+'])\n ->allows(['POST']);\n\n // Pages\n $map->get('affiliates', 'affiliates/', $this->page('affiliates'))->allows(['POST']);\n $map->get('articles', 'articles/', $this->page('articles'))->allows(['POST']);\n $map->get('captcha', 'captcha/', $this->page('captcha'))->allows(['POST']);\n $map->get('comments', 'comments/', $this->page('comments'))->allows(['POST']);\n $map->get('confirm', 'confirm/', $this->page('confirm'))->allows(['POST']);\n $map->get('dlfile', 'dlfile/', $this->page('dlfile'))->allows(['POST']);\n $map->get('download', 'download/', $this->page('download'))->allows(['POST']);\n $map->get('feed', 'feed/', $this->page('feed'))->allows(['POST']);\n $map->get('gallery', 'gallery/', $this->page('gallery'))->allows(['POST']);\n $map->get('login', 'login/', $this->page('login'))->allows(['POST']);\n $map->get('logout', 'logout/', $this->page('logout'))->allows(['POST']);\n $map->get('news', 'news/', $this->page('news'))->allows(['POST']);\n $map->get('news_search', 'news_search/', $this->page('news_search'))->allows(['POST']);\n $map->get('press', 'press/', $this->page('press'))->allows(['POST']);\n $map->get('register', 'register/', $this->page('register'))->allows(['POST']);\n $map->get('search', 'search/', $this->page('search'))->allows(['POST']);\n $map->get('shop', 'shop/', $this->page('shop'))->allows(['POST']);\n $map->get('style_selection/', 'style_selection/', $this->page('style_selection'))->allows(['POST']);\n $map->get('user', 'user/', $this->page('user'))->allows(['POST']);\n $map->get('user_edit', 'user_edit/', $this->page('user_edit'))->allows(['POST']);\n $map->get('user_list', 'user_list/', $this->page('user_list'))->allows(['POST']);\n $map->get('viewer', 'viewer/', $this->page('viewer'))->allows(['POST']);\n });\n }", "public function register_routes(): void {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::ALLMETHODS,\n\t\t\t\t\t'callback' => [ $this, 'status_check' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'status_check_permissions_check' ],\n\t\t\t\t\t'args' => [\n\t\t\t\t\t\t'content' => [\n\t\t\t\t\t\t\t'description' => __( 'Test HTML content.', 'web-stories' ),\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'type' => 'string',\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}", "public function register_routes( Collection $routes );", "protected function registerRoutes() {\n\n $this->get('/crossword', 'getCrossword');\n $this->post('/crossword', 'saveUserState');\n //not used\n //$this->get('/crossword', 'getCrossword');\n //$this->get('/wordData', 'getWordData');\n //);\n }", "public function register_routes() {\n register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\\d]+)/feedback', [\n [\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => [$this, 'handle_feedback'],\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => [\n 'name' => [\n 'type' => 'string',\n 'sanitize_callback' => 'sanitize_text_field',\n ],\n 'email' => [\n 'description' => __('Email address of the author.'),\n 'type' => 'string',\n 'format' => 'email',\n ],\n 'subject' => [\n 'required' => true,\n 'type' => 'string',\n 'sanitize_callback' => 'sanitize_text_field',\n ],\n 'message' => [\n 'required' => true,\n 'type' => 'string',\n 'sanitize_callback' => 'sanitize_textarea_field',\n ],\n ],\n ]\n ] );\n\n register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\\d]+)/helpfullness', [\n [\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => [$this, 'update_helpfullness'],\n 'args' => [\n 'type' => [\n 'required' => true,\n 'type' => 'string',\n 'enum' => ['positive', 'negative'],\n ],\n ],\n ]\n ] );\n\n register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\\d]+)/parents', [\n [\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => [$this, 'get_parents'],\n ]\n ] );\n\n register_rest_route( $this->namespace, '/' . $this->rest_base . '/search', [\n [\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => [$this, 'search_docs'],\n 'args' => [\n 'query' => [\n 'required' => true,\n 'type' => 'string',\n 'description' => __('Limit results to those matching a string.', 'muiteer'),\n 'sanitize_callback' => 'sanitize_text_field',\n 'validate_callback' => 'rest_validate_request_arg',\n ],\n 'in' => [\n 'required' => false,\n 'type' => 'integer',\n 'description' => __('The ID for the parent of the object.', 'muiteer'),\n 'sanitize_callback' => 'absint',\n 'validate_callback' => 'rest_validate_request_arg',\n ],\n 'page' => array(\n 'description' => __('Current page of the collection.', 'muiteer'),\n 'type' => 'integer',\n 'default' => 1,\n 'sanitize_callback' => 'absint',\n 'validate_callback' => 'rest_validate_request_arg',\n 'minimum' => 1,\n ),\n 'per_page' => array(\n 'description' => __('Maximum number of items to be returned in result set.', 'muiteer'),\n 'type' => 'integer',\n 'default' => 10,\n 'minimum' => 1,\n 'maximum' => 100,\n 'sanitize_callback' => 'absint',\n 'validate_callback' => 'rest_validate_request_arg',\n ),\n ],\n ]\n ] );\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 boot_rest_server() {\n add_action('rest_api_init', array($this, 'register_routes'));\n }", "protected function registerRoutes()\n {\n Route::group([\n 'domain' => config('documentation.domain', null),\n 'prefix' => config('documentation.path'),\n 'namespace' => 'Sonover\\Docs\\Http\\Controllers',\n 'middleware' => config('documentation.middleware', 'web'),\n ], function () {\n Route::get('/', 'DocumentationController@showRootPage');\n Route::get('{version}/{page?}', 'DocumentationController@show');\n });\n }", "protected function setupAdminRoutes() {\n if ( class_exists('GetStartedController') ) {\n add_action('wp_ajax_getstarted', 'GetStartedController::pageAjax');\n add_action('wp_ajax_nopriv_getstarted', 'GetStartedController::pageAjax');\n }\n if ( class_exists('PricingController') ) {\n add_action('wp_ajax_pricing', 'PricingController::pageAjax');\n add_action('wp_ajax_nopriv_pricing', 'PricingController::pageAjax');\n }\n if ( class_exists('AppearanceController') ) {\n add_action('wp_ajax_appearance', 'AppearanceController::pageAjax');\n add_action('wp_ajax_nopriv_appearance', 'AppearanceController::pageAjax');\n }\n if ( class_exists('AccountController') ) {\n add_action('wp_ajax_account', 'AccountController::pageAjax');\n add_action('wp_ajax_nopriv_account', 'AccountController::pageAjax');\n }\n }" ]
[ "0.7028157", "0.6476098", "0.64552987", "0.61809456", "0.6167883", "0.6129079", "0.60283643", "0.60172445", "0.6011936", "0.5960789", "0.5930411", "0.59294385", "0.5891678", "0.58700365", "0.58667773", "0.58648723", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586421", "0.586016", "0.58520216", "0.583562", "0.5826204", "0.5823491", "0.5799209", "0.57930636", "0.57919353", "0.578037", "0.57532835", "0.5747791", "0.57437825", "0.57353365", "0.5705795", "0.5690254", "0.5687632", "0.5680508", "0.5675706", "0.5674253", "0.5674253", "0.5667955", "0.5664415", "0.56618655", "0.56588984", "0.5647247", "0.56468016", "0.56459695", "0.5634562", "0.56168115", "0.55935496", "0.55763453", "0.5569273", "0.5551839", "0.5539453", "0.55291015", "0.55192953", "0.551799", "0.5511599", "0.55042803", "0.55016536", "0.54526", "0.5451492", "0.54442126", "0.54388076", "0.54316854", "0.5426855", "0.5414479", "0.539127", "0.5388759", "0.53791857", "0.53744096", "0.5373898" ]
0.6541153
1
Registers the dashboard products routes.
protected function forProducts($router) { $router->resource('items', 'Product\ProductsController'); $router->resource('itemgroup', 'Product\ProductsGroupingController'); $router->get('items', 'Product\ProductsController@indexDashboard')->name('items.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_routes() {\n # GET/POST /products\n $routes[$this->base] = array(\n array( array( $this, 'get_products' ), WC_API_Server::READABLE ),\n array( array( $this, 'create_product' ), WC_API_SERVER::CREATABLE | WC_API_Server::ACCEPT_DATA ),\n );\n }", "function creta_product_register_route() {\n register_rest_route( 'cr/v1', 'cr-woo', array(\n 'methods' => 'GET',\n 'callback' => 'get_all_products_external',\n // 'permission_callback' => function() {\n // return current_user_can( 'edit_posts' );\n // },\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'GET',\n 'callback' => 'get_product_by_sku_external',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'PUT',\n 'callback' => 'update_product_by_sku_external',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo', array(\n 'methods' => 'POST',\n 'callback' => 'create_new_product_external',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'DELETE',\n 'callback' => 'del_product_by_sku_external',\n ) \n );\n\n /*--------route internal woocommerce */\n register_rest_route( 'cr/v1', 'cr-woo-in', array(\n 'methods' => 'GET',\n 'callback' => 'get_all_products_internal',\n // 'permission_callback' => function() {\n // return current_user_can( 'edit_posts' );\n // },\n )\n ); \n\n \n register_rest_route( 'cr/v1', 'cr-woo-in/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'GET',\n 'callback' => 'get_product_by_sku_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'PUT',\n 'callback' => 'update_product_by_sku_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in', array(\n 'methods' => 'POST',\n 'callback' => 'create_new_product_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in/sku=(?P<sku>[a-zA-Z0-9-]+)', array(\n 'methods' => 'DELETE',\n 'callback' => 'del_product_by_sku_internal',\n ) \n );\n\n register_rest_route( 'cr/v1', 'cr-woo-in/sku-list', array(\n 'methods' => 'GET',\n 'callback' => 'get_sku_list_internal',\n ) \n );\n }", "public function register_routes() {\n\t\tparent::register_routes();\n\n\t\t// Add a route for listing variations without specifying the parent product ID.\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/variations',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t)\n\t\t);\n\t}", "public static function route_products_and_categories()\n\t{\n\t\tforeach(ORM::factory('product')->find_all() as $object)\n\t\t{\n\t\t\tKohana::config_set('routes.' . $object->show_path(false), inflector::plural($object->object_name) . '/show/' . $object);\n\t\t}\n\t\t\n\t\tforeach(ORM::factory('category')->find_all() as $object)\n\t\t{\n\t\t\tKohana::config_set('routes.' . $object->show_path(false), inflector::plural($object->object_name) . '/show/' . $object);\n\t\t}\n\t}", "public function products_ids_route()\n {\n register_rest_route($this->namespace, '/products/ids/', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'products_ids_callback'),\n 'permission_callback' => array($this, 'get_items_permissions_check'),\n ));\n }", "protected function registerRoutes()\n {\n if (!$this->app['config']->get('laratrust.panel.register')) {\n return;\n }\n\n Route::group([\n 'prefix' => config('laratrust.panel.path'),\n 'namespace' => 'Laratrust\\Http\\Controllers',\n 'middleware' => config('laratrust.panel.middleware', 'web'),\n ], function () {\n Route::redirect('/', '/'. config('laratrust.panel.path'). '/roles-assignment');\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shops' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shop' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/manager', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'register_shop_manager' ),\n\t\t\t)\n\t\t) );\n\t}", "function spf_register_route(){\n register_rest_route('wooapp/v1','/shop/products',Array(\n 'methods' => 'GET',\n 'callback' => 'spf_get_shop_products',\n ));\n\n register_rest_route('wooapp/v1', '/auth/register', [\n 'methods' => 'POST',\n 'callback' => 'spf_register_new_user',\n ]);\n\n register_rest_route('wooapp/v1', '/auth/login', [\n 'methods' => 'POST',\n 'callback' => 'spf_login_user',\n ]);\n}", "function add_endpoint() {\n flush_rewrite_rules();\n $whitelist_roles = array('administrator');\n $user = wp_get_current_user();\n $user_role = (array) $user->roles;\n \n if (in_array($user_role[0], $whitelist_roles)) {\n add_rewrite_endpoint( 'add-products', EP_ROOT | EP_PAGES );\n }\n }", "function quasar_register_products(){\n\t//'menu_icon' => F_WAY .'/images/admin-icons/products.png',\n\tregister_post_type('quasarproducts', array(\n\t\t'label' => 'Quasar Products',\n\t\t'singular_label' => 'Quasar Product',\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'capability_type' => 'page',\n\t\t'publicly_queryable' \t=> true,\n\t\t'exclude_from_search' \t=> false,\n\t\t'hierarchical' => false,\n\t\t'rewrite' => array(\n\t\t\t'slug' => xr_get_option('quasar_product_slug', 'quasarproducts'),\n\t\t\t'with_front' => false,\n\t\t ),\n\t\t'query_var' => true,\n\t\t'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'comments', 'custom-fields', 'page-attributes' ),\n\t\t'show_in_nav_menus' \t=> true\n\t));\n\tregister_taxonomy(\"quasarproduct_cat\",\n\t\t\t\t\t array(\"quasarproducts\"), \n\t\t\t\t\t array(\"hierarchical\" => true,\n\t\t\t\t\t \t\t\"label\" => __(\"Quasar Product Categories\", \"quasar\"),\n\t\t\t\t\t\t\t\"singular_label\" => \"Category\",\n\t\t\t\t\t\t\t\"rewrite\" => array(\n\t\t\t\t\t\t\t\t\"slug\" => xr_get_option(\"quasar_product_category_slug\", \"quasarproduct_cat_slug\"),\n\t\t\t\t\t\t\t\t\"with_front\"=>false\n\t\t\t\t\t\t\t)));\n}", "protected function registerRoutes()\n {\n $middleware = ['exposable.signature', 'exposable.expire', 'exposable.guard'];\n\n if (! empty(config('exposable.middleware'))) {\n $middleware = array_merge($middleware, (array) config('exposable.middleware'));\n }\n\n $uri = config('exposable.url-prefix').'/{exposable}/{id}';\n\n $this->app['router']->get($uri, 'ArjanWestdorp\\Exposable\\Http\\Controllers\\ExposableController@show')->middleware($middleware)->name('exposable.show');\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 }", "public function register_routes()\n {\n }", "public function register_routes()\n {\n }", "public static function routeAdmin()\n {\n $route = self::$route;\n $get = self::$get;\n $post = self::$post;\n $files = self::$files;\n\n Security::requireAdmin();\n\n switch ($route['section']) {\n case '' :\n\n $controller = new AdminController();\n $controller->showDashboardPage();\n break;\n\n case 'reset' :\n\n $controller = new AdminController();\n // $controller->resetDatabase();\n self::redirect('/admin');\n break;\n\n case 'products' :\n\n $controller = new ProductManager();\n if (!empty($route['page']) && is_numeric($route['page'])) {\n $prodId = $route['page'];\n }\n\n // Check if prodId in uri is valid (when it is required)\n if (in_array($route['action'], ['view', 'update'])\n && !isset($prodId)\n ) {\n self::redirect('/admin/products');\n }\n\n switch ($route['action']) {\n case '' :\n $controller->showProductsListPage();\n break;\n\n case 'add' :\n $controller->showAddProductPage();\n break;\n\n case 'add-single' :\n if (empty($post)) {\n self::redirect('/admin/products/add');\n } else {\n if (!empty($files['uploadedMainPic'])) {\n $mainPic = Uploader::uploadPicture(\n PIC_DIRECTORY,\n $controller,\n $files['uploadedMainPic'],\n \"/admin/products/add\"\n );\n if ($mainPic) {\n $post['mainPic'] = $mainPic;\n }\n }\n if (!empty($files['uploadedPics'][0])) {\n $pics = [];\n foreach ($files['uploadedPics'] as $tempPic) {\n $pic = Uploader::uploadPicture(\n PIC_DIRECTORY,\n $controller,\n $tempPic,\n \"/admin/products/add\"\n );\n if ($pic) {\n $pics[] = $pic;\n }\n }\n $post['pics'] = $pics;\n } else {\n $post['pics'] = [];\n }\n $controller->addProduct($post);\n }\n break;\n\n case 'view' :\n $controller->showViewProductPage($prodId);\n break;\n\n case 'update' :\n if (empty($post)) {\n self::redirect('/admin/products');\n } else {\n if (!empty($files['uploadedMainPic'])) {\n $mainPic = Uploader::uploadPicture(\n PIC_DIRECTORY,\n $controller,\n $files['uploadedMainPic'],\n \"/admin/products/view/$prodId\"\n );\n if ($mainPic) {\n $post['mainPic'] = $mainPic;\n }\n }\n if (!empty($files['uploadedPics'][0])) {\n $pics = [];\n foreach ($files['uploadedPics'] as $tempPic) {\n $pic = Uploader::uploadPicture(\n PIC_DIRECTORY,\n $controller,\n $tempPic,\n \"/admin/products/view/$prodId\"\n );\n if ($pic) {\n $pics[] = $pic;\n }\n }\n $post['pics'] = $pics;\n } else {\n $post['pics'] = [];\n }\n $controller->updateProduct($prodId, $post);\n }\n break;\n\n case 'delete' :\n if (empty($post['id'])) {\n self::redirect('/admin/products');\n } elseif (count($post['id']) == 1) {\n $controller->deleteProduct($post['id'][0]);\n } else {\n $controller->deleteProducts($post['id']);\n }\n break;\n\n default :\n self::redirect('/admin/products');\n }\n break;\n\n case 'categories' :\n\n $controller = new CategoryManager();\n if (!empty($route['page']) &&\n is_numeric($route['page']) &&\n in_array($route['action'], ['view', 'delete'])\n ) {\n $catId = $route['page'];\n }\n\n switch ($route['action']) {\n case '' :\n $controller->showCategoriesListPage();\n break;\n\n case 'add' :\n $controller->showAddCategoryPage();\n break;\n\n case 'add-single' :\n if (empty($post)) {\n self::redirect('/admin/categories/add');\n } else {\n $controller->addCategory($post);\n }\n break;\n\n case 'view' :\n if (!isset($catId)) {\n self::redirect('/admin/categories');\n }\n $controller->showViewCategoryPage($catId);\n break;\n\n case 'update' :\n if (empty($post)) {\n self::redirect('/admin/categories');\n } else {\n // using post['id'] here is safer (readonly input)\n $controller->updateCategory($post['id'], $post);\n }\n break;\n\n case 'delete' :\n if (empty($post['id'])) {\n self::redirect('/admin/categories');\n } else {\n $controller->deleteCategory($post['id'][0]);\n }\n break;\n\n default :\n self::redirect('/admin/categories');\n }\n break;\n\n case 'sections' :\n\n $controller = new SectionManager();\n\n if (!empty($route['page']) &&\n is_numeric($route['page']) &&\n in_array($route['action'], ['view', 'delete'])\n ) {\n $sectId = $route['page'];\n }\n\n switch ($route['action']) {\n case '' :\n $controller->showSectionsListPage();\n break;\n\n case 'view' :\n if (!isset($sectId)) {\n self::redirect('/admin/sections');\n }\n $controller->showViewSectionPage($sectId);\n break;\n\n case 'update' :\n if (empty($post)) {\n self::redirect('/admin/sections');\n } else {\n $controller->updateSection($post);\n }\n break;\n\n default :\n self::redirect('/admin/sections');\n }\n break;\n\n case 'specs' :\n\n $controller = new SpecManager();\n\n if (!empty($route['page']) &&\n is_numeric($route['page']) &&\n in_array($route['action'], ['view', 'delete'])\n ) {\n $specId = $route['page'];\n }\n\n switch ($route['action']) {\n case '' :\n $controller->showSpecsListPage();\n break;\n\n case 'add' :\n $controller->showAddSpecPage();\n break;\n\n case 'add-single' :\n if (empty($post)) {\n self::redirect('/admin/specs/add');\n } else {\n $controller->addSpec($post);\n }\n break;\n\n case 'view' :\n if (!isset($specId)) {\n self::redirect('/admin/specs');\n }\n $controller->showViewSpecPage($specId);\n break;\n\n case 'update' :\n if (empty($post)) {\n self::redirect('/admin/specs');\n } else {\n $controller->updateSpec($post['id'], $post);\n }\n break;\n\n case 'delete' :\n if (empty($post['id'])) {\n self::redirect('/admin/specs');\n } else {\n $controller->deleteSpec($post['id'][0]);\n }\n break;\n\n default :\n self::redirect('/admin/specs');\n }\n break;\n\n case 'users' :\n\n $controller = new UserManager();\n\n // Check if user id in uri is valid\n if (in_array($route['action'], ['view', 'update'])) {\n if (empty($route['page']) || !is_numeric($route['page'])) {\n self::redirect('/admin/users');\n } else {\n $userId = $route['page'];\n }\n }\n\n switch ($route['action']) {\n case '' :\n $controller->showUsersListPage();\n break;\n\n case 'add' :\n $controller->showAddUserPage();\n break;\n\n case 'add-single' :\n if (empty($post)) {\n self::redirect('/admin/users/add');\n } else {\n $controller->addUser($post);\n }\n break;\n\n case 'view' :\n $controller->showUserPage($userId);\n break;\n\n case 'update' :\n if (empty($post)) {\n self::redirect(\"/admin/users/view/$userId\");\n } else {\n $controller->updateUser($userId, $post);\n }\n\n case 'delete' :\n if (empty($post['id'])) {\n $controller->showUsersListPage();\n } elseif (count($post['id']) == 1){\n $controller->deleteUser($post['id'][0]);\n } else {\n $controller->deleteUsers($post['id']);\n }\n break;\n\n default :\n self::redirect('/admin/users');\n }\n break;\n\n case 'orders' :\n\n $controller = new OrderManager();\n\n // Check if user id in uri is valid\n if (in_array($route['action'], ['view']) && (\n empty($route['page']) ||\n !is_numeric($route['page'])\n )) {\n self::redirect('/admin/orders');\n }\n\n switch ($route['action']) {\n case '' :\n $controller->showOrdersListPage();\n break;\n\n case 'view' :\n if (empty($post)) {\n $controller->showChangeAccountPage($route['page']);\n } else {\n $controller->changeAccount($route['page'], $post);\n }\n break;\n\n case 'delete' :\n if (empty($post['id'])) {\n $controller->showAccountListPage();\n } elseif (count($post['id']) == 1){\n $controller->deleteAccount($post['id'][0]);\n } else {\n $controller->deleteAccounts($post['id']);\n }\n break;\n\n default :\n self::redirect('/admin/accounts');\n }\n break;\n\n case 'deliveries' :\n\n $controller = new DeliveryManager();\n\n if (!empty($route['page']) &&\n is_numeric($route['page']) &&\n in_array($route['action'], ['view', 'delete'])\n ) {\n $deliveryId = $route['page'];\n }\n\n switch ($route['action']) {\n case '' :\n $controller->showDeliveriesListPage();\n break;\n\n case 'add' :\n $controller->showAddDeliveryPage();\n break;\n\n // case 'add-single' :\n // if (empty($post)) {\n // self::redirect('/admin/deliveries/add');\n // } else {\n // $controller->addDelivery($post);\n // }\n // break;\n //\n // case 'view' :\n // if (!isset($deliveryId)) {\n // self::redirect('/admin/deliveries');\n // }\n // $controller->showViewDeliveryPage($deliveryId);\n // break;\n //\n // case 'update' :\n // if (empty($post)) {\n // self::redirect('/admin/deliveries');\n // } else {\n // $controller->updateDelivery($post['id'], $post);\n // }\n // break;\n //\n // case 'delete' :\n // if (empty($post['id'])) {\n // self::redirect('/admin/deliveries');\n // } else {\n // $controller->deleteDelivery($post['id'][0]);\n // }\n // break;\n\n default :\n self::redirect('/admin/deliveries');\n }\n break;\n\n case 'payments' :\n\n $controller = new PaymentManager();\n\n if (!empty($route['page']) &&\n is_numeric($route['page']) &&\n in_array($route['action'], ['view', 'delete'])\n ) {\n $paymentId = $route['page'];\n }\n\n switch ($route['action']) {\n case '' :\n $controller->showPaymentsListPage();\n break;\n\n case 'add' :\n $controller->showAddPaymentPage();\n break;\n\n // case 'add-single' :\n // if (empty($post)) {\n // self::redirect('/admin/payments/add');\n // } else {\n // $controller->addPayment($post);\n // }\n // break;\n //\n // case 'view' :\n // if (!isset($paymentId)) {\n // self::redirect('/admin/payments');\n // }\n // $controller->showViewPaymentPage($paymentId);\n // break;\n //\n // case 'update' :\n // if (empty($post)) {\n // self::redirect('/admin/payments');\n // } else {\n // $controller->updatePayment($post['id'], $post);\n // }\n // break;\n //\n // case 'delete' :\n // if (empty($post['id'])) {\n // self::redirect('/admin/payments');\n // } else {\n // $controller->deletePayment($post['id'][0]);\n // }\n // break;\n\n default :\n self::redirect('/admin/payments');\n }\n break;\n\n case 'pictures' :\n\n $controller = new PictureManager();\n\n switch ($route['action']) {\n\n case '' :\n switch ($route['page']) {\n case 'add' :\n if (!empty($post)) {\n $controller->addPicturesToIllness($post);\n } else {\n $controller->showUploadsPage();\n }\n break;\n\n case 'delete' :\n if (!empty($post['pics'])) {\n $controller->deletePictures(\n PIC_DIRECTORY,\n $post['pics'],\n '/admin/uploads/pictures'\n );\n } else {\n $controller->showUploadsPage();\n }\n break;\n\n case 'upload' :\n if (!empty($files['uploads'])) {\n Uploader::uploadPictures(\n PIC_DIRECTORY,\n $controller,\n $files['uploads'],\n '/admin/uploads/pictures'\n );\n } else {\n $controller->showUploadsPage();\n }\n break;\n\n default :\n if (!empty($post['pics_per_page'])) {\n $controller->showPicturesPage(\n $post['pics_per_page']\n );\n } else {\n $controller->showPicturesPage();\n }\n }\n break;\n\n }\n break;\n\n default :\n self::redirect('/admin');\n }\n }", "public function register()\n {\n Route::group([\n 'namespace' => 'WooCommerce\\ProductAttributeGroup\\Controllers'\n ], function () {\n require themosis_path('plugin.woocommerce-product-attribute-group.resources').'routes.php';\n });\n }", "public function register_routes()\n {\n\n $namespace = 'api/v1';\n $base = 'categories';\n\n register_rest_route($namespace, '/' . $base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array($this, 'create_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n\n register_rest_route($namespace, '/' . $base . '/(?P<id>\\d+)', array(\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array($this, 'update_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n }", "public static function routes(): void\n {\n Route::post(\"LaravelProducts/categories/list\", '\\\\' . __CLASS__ . '@list')->name('LaravelProducts.Categories.List');\n Route::post(\"LaravelProducts/categories/search\", '\\\\' . __CLASS__ . '@search')->name('LaravelProducts.Categories.Search');\n Route::post(\"LaravelProducts/categories/store\", '\\\\' . __CLASS__ . '@store')->name('LaravelProducts.Categories.Store');\n Route::post(\"LaravelProducts/categories/delete\", '\\\\' . __CLASS__ . '@delete')->name('LaravelProducts.Categories.Delete');\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}", "public static function register_endpoints() {\n\t\t\n $namespace = sprintf( 'wp/%s', API_VERSION );\n \n // Create a new blank package\n register_rest_route( $namespace, API_PREFIX . 'package/add', array(\n 'methods' => 'GET',\n 'callback' => array( 'Doolittle_Package_REST_API_Endpoints', 'add' ),\n ) );\n \n // Delete a package\n register_rest_route( $namespace, API_PREFIX . 'package/delete', array(\n 'methods' => 'POST',\n 'callback' => array( 'Doolittle_Package_REST_API_Endpoints', 'delete' ),\n 'args' => array(\n 'post_ids' => array(\n 'required' => true,\n 'type' => 'object',\n 'description' => 'Package post_ids',\n ) \n )\n ) );\n \n \n // Delete a package\n register_rest_route( $namespace, API_PREFIX . 'package/update', array(\n 'methods' => 'POST',\n 'callback' => array( 'Doolittle_Package_REST_API_Endpoints', 'update' ),\n 'args' => array(\n 'data' => array(\n 'required' => true,\n 'type' => 'object',\n 'description' => 'Package form',\n ) \n )\n ) );\n\t}", "private function mapAdminRoutes()\n {\n $this->name('backups.')\n ->prefix($this->config()->get('arcanesoft.backups.route.prefix', 'backups'))\n ->group(function () {\n Routes\\StatusesRoutes::register();\n });\n }", "function registerEndpoints()\n{\n $namespace = 'travel-review-app/v1';\n\n register_rest_route(\n $namespace,\n '/destinations-default-wordpress',\n [\n 'methods' => 'GET',\n 'callback' => 'listDestinationsDefaultWordPress',\n ]\n );\n}", "public function products_updated_route()\n {\n register_rest_route($this->namespace, '/products/updated/', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'products_updated_callback'),\n 'permission_callback' => array($this, 'get_items_permissions_check'),\n ));\n }", "public function registerRoutes() {\n $this->addRoute('default');\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 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 register_rest_routes() {\n\t\t$controllers = array(\n\t\t\t'GF_REST_Entries_Controller',\n\t\t\t'GF_REST_Entry_Properties_Controller',\n\t\t\t'GF_REST_Entry_Notifications_Controller',\n\t\t\t'GF_REST_Notes_Controller',\n\t\t\t'GF_REST_Entry_Notes_Controller',\n\t\t\t'GF_REST_Form_Entries_Controller',\n\t\t\t'GF_REST_Form_Results_Controller',\n\t\t\t'GF_REST_Form_Submissions_Controller',\n\t\t\t'GF_REST_Forms_Controller',\n\t\t\t'GF_REST_Feeds_Controller',\n\t\t\t'GF_REST_Form_Feeds_Controller',\n\t\t);\n\n\t\tforeach ( $controllers as $controller ) {\n\t\t\t$controller_obj = new $controller();\n\t\t\t$controller_obj->register_routes();\n\t\t}\n\t}", "public static function registerProduct( $products ) {\n\t\t\t$product_details = self::$product_data;\n\t\t\t$product_details['dir'] = self::$product_data['isPlugin'] ? basename( __DIR__ ) . '/' . basename( __FILE__ ) : basename( get_template_directory() ) . '/functions.php'; // TODO: Remove this hardcoded value\n\t\t\t$product_details['whmcs_path'] = self::$product_data['isPlugin'] ? dirname( __FILE__ ) : get_template_directory();\n\t\t\t$products[] = $product_details;\n\n\t\t\treturn $products;\n\t\t}", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => array(),\n\t\t\t)\n\t\t) );\n }", "public function register_rest_routes() {\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast',\n\t\t\tarray(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'get_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast_update',\n\t\t\tarray(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'update_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for episodes\n\t\t */\n\t\t$controller = new Episodes_Controller();\n\t\t$controller->register_routes();\n\n\t}", "public function testProductRoutes()\n\t{\n\t\t//$response = $this->call('GET', '/admin/website/2/products');\n\t\t\n\t\t//$this->assertEquals(200, $response->status());\n\t}", "public function register_routes() {\n\n\t\t$namespace = $this->namespace;\n\n\t\t$base = $this->rest_base;\n\n\t\tregister_rest_route( $namespace, '/' . $base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t) );\n\t}", "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, $this->route, [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_options']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_options'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_options'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\n\t\tregister_rest_route( $this->namespace, $this->route . '/(?P<slug>.+)', [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_option']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_option'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_option'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\t}", "public static function register_rest_routes() {\n\t\tforeach (static::$apis as $api) {\n\t\t\t$api->register_rest_route();\n\t\t}\n }", "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'args' => array(),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'update_item' ),\n\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "public function register_routes() {\n\t\tparent::register_routes();\n\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base . '/totals',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_totals' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_totals_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "private function register_routes() {\n\t\t$routes = $this->get_routes();\n\t\tforeach ( $routes as $route ) {\n\t\t\t$route->register();\n\t\t}\n\t}", "protected static function registerRoutes()\n {\n parent::routes(function ($router) {\n /* @var \\Illuminate\\Routing\\Router $router */\n $router->resource('useradmin/member', 'GG\\Admin\\Member\\Controllers\\MemberController');\n $router->resource('useradmin/permissions', 'GG\\Admin\\Member\\Controllers\\PermissionController');\n $router->resource('useradmin/roles', 'GG\\Admin\\Member\\Controllers\\RoleController');\n $router->resource('useradmin/menu', 'GG\\Admin\\Member\\Controllers\\MenuController');\n\n });\n }", "function add_menus_endpoint() {\n\n\t\tif ( $this->config[\"rest\"][\"menus\"] ) {\n\t\t\tregister_rest_route(\n\t\t\t\tWPN_REST_URL,\n\t\t\t\t'/menus',\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => 'GET',\n\t\t\t\t\t'callback' => array( $this, 'api_list_menus' )\n\t\t\t\t) );\n\n\n//\t\t\tregister_rest_route(\n//\t\t\t\tWPN_REST_URL,\n//\t\t\t\t'/menus/(?P<slug>[0-9a-zA-Z(-]+)',\n//\t\t\t\tarray(\n//\t\t\t\t\t'methods' => 'GET',\n//\t\t\t\t\t'callback' => array( $this, 'api_menu_by_id_slug' )\n//\t\t\t\t) );\n\n\t\t\tregister_rest_route(\n\t\t\t\tWPN_REST_URL,\n\t\t\t\t'/menus/(?P<id>\\d+)',\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => 'GET',\n\t\t\t\t\t'callback' => array( $this, 'api_menu_by_id_slug' )\n\t\t\t\t) );\n\t\t}\n\t}", "public static function register_endpoints() {\n // endpoints will be registered here\n register_rest_route( Liang_API_Endpoints::$base_url, '/index', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( 'Liang_API_Endpoints', 'get_index' ),\n ) );\n }", "protected function registerRoutes()\n {\n $this->registerWebRoutes();\n $this->registerApiRoutes();\n }", "private function registerRoutes(){\n $appRouter = require_once __DIR__.'/../../routes/app.php';\n $this->registerApplicationRoutes($appRouter);\n $this->registerApplicationRoutes($appRouter, false);\n $this->registerAuthenticationRoutes();\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 }", "protected function registerRoutes()\n {\n Route::group([\n 'prefix' => config('paystacksubscription.webhook_path'),\n 'namespace' => 'Digikraaft\\PaystackSubscription\\Http\\Controllers',\n 'as' => 'paystack.',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }", "protected function registerRoutes()\n {\n if (EfaasProvider::$registersRoutes) {\n Route::group([\n 'as' => 'efaas.',\n 'namespace' => '\\Javaabu\\EfaasSocialite\\Http\\Controllers',\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../../routes/web.php');\n });\n }\n }", "function register_endpoints(){\n\t$route_base = 'wc/v1';\n\n\tregister_rest_route($route_base, '/posts', array(\n\t\t'methods' => 'GET',\n\t\t'callback' => 'api_get_posts',\n\t\t'permission_callback' => 'helper_authentication_check'\n\t));\n\n\tregister_rest_route($route_base, '/posts/(?P<post_id>\\d+)', array(\n\t\t'methods' => 'GET',\n\t\t'callback' => 'api_get_post',\n\t\t'permission_callback' => 'helper_authentication_check'\n\t));\n}", "protected function registerRoutes() {\n\n $this->get('/crossword', 'getCrossword');\n $this->post('/crossword', 'saveUserState');\n //not used\n //$this->get('/crossword', 'getCrossword');\n //$this->get('/wordData', 'getWordData');\n //);\n }", "protected function registerRoutes()\n {\n Route::group([\n 'prefix' => config('dashkit.path'),\n 'middleware' => config('dashkit.middleware', 'web'),\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n });\n }", "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'parse_url_details' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'url' => array(\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'description' => __( 'The URL to process.' ),\n\t\t\t\t\t\t\t'validate_callback' => 'wp_http_validate_url',\n\t\t\t\t\t\t\t'sanitize_callback' => 'sanitize_url',\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' ),\n\t\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "public function index()\n {\n $products = Product::all();\n return view('admin.dashboard', ['products' => $products]);\n }", "protected function registerRoutes(): void\n {\n Route::prefix('permission_makr')\n ->namespace('AlvariumDigital\\\\PermissionsMakr\\\\Http\\\\Controllers')\n ->as('permission_makr.')\n ->middleware(config('permission_makr.routes_middleware'))\n ->group(__DIR__ . '/routes/web.php');\n }", "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<status>[\\w-]+)', array(\n\t\t\t'args' => array(\n\t\t\t\t'status' => array(\n\t\t\t\t\t'description' => __( 'An alphanumeric identifier for the status.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t'args' => array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "protected function registerRoutes()\n {\n Route::group([\n 'domain' => config('documentation.domain', null),\n 'prefix' => config('documentation.path'),\n 'namespace' => 'Sonover\\Docs\\Http\\Controllers',\n 'middleware' => config('documentation.middleware', 'web'),\n ], function () {\n Route::get('/', 'DocumentationController@showRootPage');\n Route::get('{version}/{page?}', 'DocumentationController@show');\n });\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 }", "function wp_oembed_register_route()\n {\n }", "public static function registerEndpoints() {\n $register = register_rest_route(\n\t\t\t'UKM', \n\t\t\t'/informasjon/', \n\t\t\t[\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'informasjonsMeny'],\n\t\t\t\t'args' => []\n\t\t\t]\n );\n\n /**\n * ENDPOINT 4: Innlegg i bloggen\n */\n $register = register_rest_route(\n\t\t\t'UKM', \n\t\t\t'/nyheter/', \n\t\t\t[\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'nyheter'],\n\t\t\t\t'args' => []\n\t\t\t]\n );\n\n\n /**\n * ENDPOINT 5: Innlegg fra kategori\n */\n $register = register_rest_route(\n\t\t\t'UKM', \n\t\t\t'/kategori/(?P<id>\\d+)', \n\t\t\t[\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'kategori'],\n\t\t\t\t'args' => []\n\t\t\t]\n );\n\n /**\n * ENDPOINT 1 Info om en gitt post\n */\n $register = register_rest_route(\n 'UKM',\n '/post/(?P<id>\\d+)',\n [\n 'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'post'],\n 'args' => ['id']\n ]\n );\n\n /**\n * ENDPOINT 2: Innholdet i en post\n */\n $register = register_rest_route(\n 'UKM',\n '/content/(?P<id>\\d+)',\n [\n 'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'postContent'],\n 'args' => ['id']\n ]\n );\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 }", "public function index()\n {\n $products = Product::all();\n return view('dashboard.product.index', compact('products'));\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 }", "public function registerRoutes()\n\t{\n\t\t$this->app->booted(function ($app) {\n\n\t\t\t# Manager\n\t\t\t$app['router']->get(\n\t\t\t\t'/',\n\t\t\t\t[\n\t\t\t\t\t'as' => 'manager.index',\n\t\t\t\t\t'uses' => 'ManagerController@index'\n\t\t\t\t]\n\t\t\t);\n\n\t\t});\n\t}", "function register_rest_routes() {\n\tif ( class_exists( '\\WP_REST_Controller' ) ) {\n\t\tinclude_once __DIR__ . '/wprest-shortcodes-controller.php';\n\t\t$controller = new rest\\WPREST_Shortcodes_Controller();\n\t\t$controller->register_routes();\n\t}\n}", "protected function mapVendorRoutes()\n {\n Route::middleware([\n 'web',\n 'vendor',\n ])->prefix('dashboard/vendor')->namespace($this->namespace)->group(base_path('routes/vendor.php'));\n }", "public function registerSiteRoutes()\n\t{\n\t\t// NOTE: the second route is used to capture files in subdirectories as well\n\t\treturn array(\n\t\t\t'internal/(?P<id>.\\d*)' => array('action' => 'AssetManagement/Assets/findById'),\n\t\t\t'internal/(?P<directory>.*)/(?P<name>.*)' => array('action' => 'AssetManagement/Assets/findInDirectory')\n\t\t);\n\t}", "protected function registerRoutes()\n {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n }", "public function registerRouters () {\n\t\tif ( !current_user_can( 'manage_options' ) )\n\t\t\treturn;\n\n\t\tforeach ( $this->classes as $class ) {\n\t\t\t\\Maven\\Core\\HookManager::instance()->addFilter( 'json_endpoints', array( $class, 'registerRoutes' ) );\n\t\t}\n\t}", "public function register_routes() {\n\n register_rest_route( $this->namespace, '/' . $this->base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array( $this->service, 'create' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => $this->get_endpoint_args_for_item_schema( true ),\n 'accept_json' => true\n ),\n ) );\n\n register_rest_route( $this->namespace, '/' . $this->base . '/(?P<id>[\\d]+)', array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this->service, 'get' ),\n 'permission_callback' => array( $this, 'getAllUserCheck' ),\n 'args' => array(\n 'context' => array(\n 'default' => 'view',\n )\n ),\n ),\n\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this->service, 'update' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => $this->get_endpoint_args_for_item_schema( false ),\n 'accept_json' => true\n ),\n\n array(\n 'methods' => WP_REST_Server::DELETABLE,\n 'callback' => array( $this->service, 'delete' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => array(\n 'force' => array(\n 'default' => false,\n ),\n ),\n ),\n ) );\n }", "public function showAddProducts()\n {\n return view('dashboardB'); \n }", "protected function registerRoutes(): void\n {\n Route::group([\n 'prefix' => 'fairqueue',\n 'namespace' => 'Aloware\\FairQueue\\Http\\Controllers',\n 'middleware' => config('fair-queue.middleware', 'web'),\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n });\n }", "public function index(){\n\n $allProduct = DB::table('products')->orderBy('id', 'DESC')\n ->leftjoin('categories', 'products.category_id', '=', 'categories.id')\n ->leftjoin('sub_categories', 'products.sub_category_id', '=', 'sub_categories.id')\n ->leftjoin('brands', 'products.brand_id', '=', 'brands.id')\n ->select('products.*', 'categories.category_name', 'sub_categories.sub_category', 'brands.name as brand')\n ->get();\n return view('dashboard.pages.product', compact('allProduct'));\n }" ]
[ "0.74352807", "0.67240554", "0.6628662", "0.65496266", "0.638199", "0.6297508", "0.62474895", "0.62164986", "0.6109948", "0.6080066", "0.60496306", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.6035929", "0.60356766", "0.6024419", "0.6002032", "0.5996964", "0.5946485", "0.59135514", "0.5888067", "0.5857701", "0.585021", "0.5849272", "0.5845048", "0.58372635", "0.58293825", "0.58293825", "0.58211225", "0.5812559", "0.580993", "0.5798715", "0.57939166", "0.57756686", "0.5764172", "0.5762806", "0.5750561", "0.57482207", "0.57445127", "0.5739618", "0.5733473", "0.56901735", "0.5684888", "0.5684431", "0.56770724", "0.5670398", "0.5668247", "0.56319904", "0.5628722", "0.56111884", "0.55990607", "0.5593428", "0.55839556", "0.55701053", "0.55599976", "0.55539936", "0.5551833", "0.5540269", "0.5538713", "0.55249715", "0.55248964", "0.5494996", "0.54902357", "0.54532236", "0.5448014", "0.54413486", "0.54260546", "0.5424227", "0.54163766", "0.54153347", "0.5410908" ]
0.5976989
47
The initial default routing call, gets all Users
public function indexAction() { $users = UsersDev::find(); $this->view->setVars( [ 'users' => $users, ] ); return $this->view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index_get()\n {\n $response = $this->UserM->all_user();\n $this->response($response);\n }", "public function index()\n {\n // return collection of all users\n return UserIndexResource::collection(User::info()->get());\n }", "function GET()\n {\n $user = $this->router()->user();\n \n if ( ! $user->mayManageUsers())\n {\n throw new NotAuthorized();\n }\n \n $users = array();\n foreach(User::listAllIds() as $id)\n {\n $user = User::loadById($id);\n $users[] = array(\n \"email\" => $user->email(),\n \"id\" => $user->id(),\n \"name\" => $user->name(),\n \"privileges\" => $user->privileges()\n );\n }\n $this->setReturnVariable(\"data\", array(\"users\" => $users));\n }", "function getUsers(){\n }", "function getUsers(){\n }", "public function index() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\t$this->User->recursive = 0;\n\t\t$this->set('users', $this->paginate());\n\t\t$this->set('userId', $user['User']['id']);\n\t\t$this->set('userType', $user['User']['type']);\n\t}", "public function index()\n {\n return UserResource::collection(User::paginate(20));\n }", "public function getUsers();", "public function getUsers();", "public function getUsers();", "public function index()\n {\n $users = User::all();\n }", "public function index(){\n\t\t$users = $this->User->find(\"users\", \"all\");\t\n\t\t$this->set(\"users\", $users);\n\t}", "public function index()\n {\n // Get users\n $users = User::paginate(15);\n\n // Return collection of users as a resource\n return UserResource::collection($users);\n }", "public function index()\n {\n $this->userlist();\n }", "public function indexAction(){\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $perpage = 2;\n $count = \\R::count('user');\n $pagination = new Pagination($page, $perpage, $count);\n $start = $pagination->getStart();\n $users = \\R::findAll('user', \"LIMIT $start, $perpage\");\n\n $this->setMeta('All users');\n $this->setData(compact('users', 'pagination', 'count'));\n }", "public function index()\n {\n return UserResource::collection(User::all());\n }", "public function index()\n {\n return UserResource::collection(User::all());\n }", "public function index()\n {\n $this->user_list();\n }", "public function getUsersList()\n {\n }", "public function getUsers() {\n\n $users = $this->users_model->getallusers();\n exit;\n }", "public function index()\n {\n $query = User::all();\n\n //con resources api\n return UsersResource::collection($query)->additional([\n 'response' => true,\n 'message' => 'Los usuarios fueron listados.'\n ]);\n }", "public function allUsers()\n {\n $users = $this->user->findAll();\n $this->show('admin/allusers', ['users' => $users]);\n }", "function users(){\n\t\t\tif($this->rest->getRequestMethod() != \"GET\"){\n\t\t\t\t$this->rest->response('',406);\n\t\t\t}\n\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\t$user_data = $this->model->getUsers();\n\t\t\t\tif(count($user_data)>0) {\n\t\t\t\t\t$response_array['status']='success';\n\t\t\t\t\t$response_array['message']='Total '.count($user_data).' record(s) found.';\n\t\t\t\t\t$response_array['total_record']= count($user_data);\n\t\t\t\t\t$response_array['data']=$user_data;\n\t\t\t\t\t$this->rest->response($response_array, 200);\n\t\t\t\t} else {\n\t\t\t\t\t$response_array['status']='fail';\n\t\t\t\t\t$response_array['message']='Record not found.';\n\t\t\t\t\t$response_array['data']='';\n\t\t\t\t\t$this->rest->response($response_array, 204);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->rest->response('Unauthorized Access ',401);\n\t\t\t}\n\n\t\t}", "public function index()\n {\n return UserResource::collection(Users::all());\n }", "public function index()\n {\n return $this->user->all();\n }", "public function index()\n {\n $users = User::paginate(15);\n return UserResource::collection($users);\n }", "public function index()\n {\n $users = User::paginate(15);\n return UserResource::collection($users);\n }", "public function index()\n {\n $users = User::paginate(15);\n return UserResource::collection($users);\n }", "public function index()\n {\n $users = User::paginate(10);\n\n return UserResource::collection($users);\n }", "public function index()\n {\n $this->request->allowMethod(['get']);\n\n $this->set('data', $this->Users->find());\n }", "public function index(): AnonymousResourceCollection\n {\n return UserResource::collection(UserQuery::start()->paginate(10));\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 function index()\n {\n return user::get();\n }", "public function index()\n {\n //\n return User::all();\n }", "public function index()\n {\n return $this->userRepo->getUsers();\n }", "public function index()\n {\n $users = User::all();\n return UsersResource::collection($users);\n }", "public function index()\n {\n return $this->users->getAll('first_name', 'asc', ['departments', 'sectors', 'meta']);\n }", "public function index()\n {\n // show list user\n }", "public function index()\n {\n\n return User::all();\n }", "public function allUsers()\n\t{\n\t\t$data['users'] = $this->MainModel->selectAll('users', 'first_name');\n\t\t$this->load->view('layout/header');\n\t\t$this->load->view('layout/sidebar');\n\t\t$this->load->view('template/all-users', $data);\n\t\t$this->load->view('layout/footer');\n\t}", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return User::all();\n }", "public function index()\n {\n return response()->responseUtil(User::all(['id', 'name', 'realName', 'openId', 'nickName', 'avatarUrl', 'cellphone', 'officephone','regTime', 'email']));\n }", "public function getAllUsers()\n {\n return \"users from mongo\";\n }", "public function getUsers()\n {\n if (empty($this->users)) {\n $this->setUsers();\n }\n }", "public function index()\n {\n return $this->showCollectionResponse(User::all(), 200);\n }", "public function index()\n {\n list($response_array, $status_code) = $this->repository->getAllOfUser();\n return $this->responseWith($response_array, $status_code);\n }", "public function index_get()\n\t {\t\n \t$users=$this->User_Model->get_users();\n // Check if the users data store contains users (in case the database result returns NULL)\n if ($users)\n {\n // Set the response and exit\n $this->response($users, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code\n }\n else\n {\n // Set the response and exit\n $this->response([\n 'status' => FALSE,\n 'message' => 'No users were found'\n ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code\n }\n \n\t }", "public function index()\n {\n $this->authorize('index', User::class);\n\n $this->validate(request(), [\n 'page' => 'integer|min:1',\n 'search' => 'string',\n 'role' => 'string',\n 'promotion' => 'string',\n ]);\n\n $users = User::filtered(\n request()->search,\n request()->role,\n request()->promotion,\n null,\n null,\n false\n )->load(['roles'])\n ->sortByDesc('created_at');\n\n if (! request('raw')) {\n $users = $users\n ->paginate(10, request()->page)\n ->withPath(route('users.index'));\n }\n\n return UserResource::collection($users);\n }", "public function index()\n {\n $users = $this->repository->all($columns = ['*']);\n return $this->success($users, trans('messages.users.getListSuccess'));\n }", "public function index()\n {\n return User::get();\n }", "public function getAll(){\n $users = UserResource::collection($this->userRepo->getAll());\n return $users;\n }", "public function index()\n {\n return new UserCollection(User::paginate(10));\n }", "public function index(): \\Illuminate\\Http\\Resources\\Json\\AnonymousResourceCollection\n {\n return UserResource::collection(User::query()->paginate(100));\n }", "public function all_users() {\n\t\tif($this->input->is_ajax_request()) {\n\t\t\techo json_encode($this->users->get_all());\n\t\t} else {\n\t\t\tredirect('cms/users', 'refresh');\n\t\t}\n\t}", "function users() {\n if ($this->getRequestMethod() != \"GET\") {\n $this->response('', 406);\n }\n $query = \"select * from users;\"; \n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n\n if ($r->num_rows > 0) {\n $result = array(); \n while ($row = $r->fetch_assoc()) {\n $result[] = $row;\n } \n $this->response(json_encode($result), 200);\n } else {\n $this->response('',204);\n }\n }", "public function userIndex(){\n MyLogger::info(\"Entering RestController userIndex()\");\n\n\n $users = $this->restService->getAllUsers();\n $result = NULL;\n if ($users) {\n $result = new DTO(\"200\", \"Users Found\", $users);\n } else {\n $result = new DTO(\"404\", \"No User Found\", NULL);\n }\n\n\n MyLogger::info(\"Exiting RestController userIndex()\");\n\n return json_encode($result);\n }", "public function index()\n {\n $q = request()->query('q');\n $paginate = request()->query('paginate') != null ? request()->query('paginate') : 15;\n\n $users = User::orderBy('id', 'DESC')\n ->where(function ($query) use ($q) {\n $query->where(\"name\", \"like\", \"%$q%\")\n ->orWhere(\"email\", \"like\", \"%$q%\");\n });\n\n if(!auth()->user() || !auth()->user()->hasRole('Staff')){\n $users->where('id', '!=', 1);\n }\n\n return UserResource::collection($users->paginate($paginate));\n }", "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 getUsers()\n {\n $title = \"Users\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n\n // Get all the users from db\n $users = $this->di->get(\"user\")->getAllUsers();\n\n $data = [\n //\"items\" => $book->findAll(),\n \"users\" => $users,\n ];\n\n $view->add(\"pages/users\", $data);\n //$view->add(\"blocks/footer\", $data);\n\n $pageRender->renderPage([\"title\" => $title]);\n }", "public function index()\n {\n $this->authorize('viewAny', User::class);\n\n // List the users...\n }", "public function index()\n {\n // Returning all users\n return response()->json([\n 'message' =>'Users',\n 'code' => 200,\n 'error' => false,\n 'results' => User::orderBy('name', 'ASC')->get()\n ], 200);\n }", "public function index()\n {\n return UserTransformer::collection(User::all());\n }", "public function index()\n {\n $this->authorize('view', Auth::user());\n\n return UserResource::collection($this->service->index());\n }", "public function index()\n {\n $this->validate($this->request, User::indexRules());\n \n $users = User::all(); \n return $this->response(200,\"User\", $users );\n }", "function get_users()\n {\n //Unimplemented\n }", "public function getAllUser(){\n return $this->users;\n }", "public function index()\n {\n return $this->response->paginator(User::paginate(10), new UserTransformer());\n }", "public function index()\n {\n return $this->respond(User::_(User::all()->toArray()));\n }", "public function index()\n {\n //\n $users = User::all();\n\n return $users;\n }", "public function getList() {\n\t\t$this->request = array('uri' => array('path' => 'users.json'));\n\n\t\treturn $this->find('all');\n\t}", "public function index()\n {\n $user = User::all();\n return $this->sendResponse($user, 'Lista de usuarios', 200);\n }", "public function index()\n {\n //\n $users = User::all();\n return $users;\n }", "public function index()\n {\n return new UserCollection(User::all());\n }", "public function getAllUsers(){\n\t\treturn $this->user;\n\t}", "public function index()\n {\n $users = User::All();\n return $this->showAll($users);\n }", "public function index()\n {\n // $users = User::all();\n // return response()->json($users);\n\n $users = User::paginate(5);\n return UserResource::collection($users);\n }", "public function all()\n {\n return $this->newQuery('getUsers', ['type' => 'AllUsers']);\n }", "public function index()\n {\n $users = User::paginate(10);\n return new UserRessources($users);\n }", "public function users();", "public function users();", "public function users();", "public function users();", "public function invokeUsers()\r\n {\r\n if (!isset($_GET['users'])) {\r\n $users = $this->model->getUsers();\r\n include 'view/userslist.php';\r\n }\r\n }", "public function index()\n {\n $users = User::all();\n return $this->showAll($users);\n }", "public function indexAction()\n {\n $listing = $this->listing( 'Panel\\Listing\\Users');\n\n return array( 'listing' => $listing );\n }", "public function index()\n {\n $user = $this->permission(User::all(), 'id');\n\n return $this->showAll($user,User::class);\n }", "public function index()\n {\n $user = $this->user();\n\n// if ($user == null) {\n// throw new UnauthorizedHttpException(\"Bearer\", \"You are not authorized to see all users.\", null, 0x00C00301);\n// }\n\n if (!policy($user)->canSeeAll($user)) {\n throw new HttpException(403, \"You are not authorized to see all users.\", null, [], 0x00C00302);\n }\n\n $users = $this->repository->all();\n\n return $this->response->collection($users, new UserTransformer, [\"key\" => \"users\"]);\n }", "public function index()\n {\n return new UserCollection(Users::paginate(10));\n\n }", "public function index()\n {\n return User::all()->toArray();\n }", "public function getUsers() {\n $this->checkValidUser();\n\n $this->db->sql = 'SELECT id, username FROM '.$this->db->dbTbl['users'].' ORDER BY username';\n\n $res = $this->db->fetchAll();\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'sdop6'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'ffUI8',\n 'users' => $res\n );\n }\n\n $this->renderOutput();\n }", "public function index()\n {\n try {\n $result = $this->userService->getAll();\n } catch (Exception $e) {\n return $this->sendError($e->getMessage());\n }\n\n return $this->sendResponse(null, $result);\n }", "public function list()\n {\n $listUsers = AppUser::findAll();\n $this->show('back/user/list', [\"users\" => $listUsers]);\n }", "public function index()\n {\n $users = User::all();\n return $users;\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }" ]
[ "0.79441524", "0.76826394", "0.7661395", "0.760302", "0.760302", "0.7553967", "0.75445044", "0.7542545", "0.7542545", "0.7542545", "0.75085384", "0.74824536", "0.748114", "0.7478096", "0.7468994", "0.74566114", "0.74566114", "0.74372154", "0.7423345", "0.7416155", "0.74147826", "0.73749244", "0.73740655", "0.736674", "0.7361748", "0.7355262", "0.7355262", "0.7355262", "0.7331466", "0.7329081", "0.73243415", "0.7322532", "0.73203623", "0.7301544", "0.7277406", "0.7276872", "0.72723734", "0.7258897", "0.72481555", "0.7223842", "0.7217409", "0.7217409", "0.7217409", "0.7217409", "0.7217409", "0.7217409", "0.7217409", "0.7217409", "0.7194768", "0.7180759", "0.71678364", "0.7154584", "0.7143488", "0.7142632", "0.71381086", "0.71277934", "0.7125085", "0.7123289", "0.7122852", "0.7119874", "0.7114861", "0.7112548", "0.7108431", "0.7104063", "0.71016985", "0.71010333", "0.7100496", "0.70984423", "0.7095268", "0.7094567", "0.7093941", "0.7087723", "0.7085564", "0.7081338", "0.7077643", "0.70758396", "0.7075025", "0.707452", "0.70673895", "0.7066881", "0.7063029", "0.7062518", "0.7048791", "0.70441103", "0.70373106", "0.70362335", "0.70362335", "0.70362335", "0.70362335", "0.7034322", "0.70284986", "0.70187896", "0.7010946", "0.7009098", "0.7006141", "0.7005435", "0.7003797", "0.7001773", "0.70001364", "0.69944936", "0.69858783" ]
0.0
-1
output git Treeobject content
public function outputContent(Object $object, $ref = 'HEAD') { $output = $this->pygmentize->format($this->getGit()->outputRawContent($object, $ref), $object->getName()); $this->logger->info($output); $matches = array(); preg_match("'<div class=\"highlight\"><pre>(.*)\n</pre></div>'si", $output, $matches); $arrContent = preg_split('/\n/', $matches[1]); $arrOutput = array(); $arrNumbers = array(); foreach ($arrContent as $i => $line) { $arrNumbers[] = '<div class="number">'.($i + 1).'</div>'; $arrOutput[] = '<div class="ln">'.$line.'</div>'; } return array( 'line_numbers' => implode($arrNumbers), 'content' => implode($arrOutput) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function html_tree($proj, $tree, $repos) {\n $t = git_ls_tree(get_repo_path($proj, $repos), $tree);\n\n echo '<div class=\"gitbrowse\"><table>';\n\n foreach ($t as $t) {\n $plain = \"\";\n $perm = permissions_string($t['perm']);\n if ($t['type'] == 'tree')\n $objlink = \"<a href=\\\"\" . sanitized_url() . \"p=$proj&t={$t['hash']}\\\">{$t['file']}</a>\";\n else if ($t['type'] == 'blob') {\n $plain = \"<a href=\\\"\" . sanitized_url() . \"p=$proj&dl=plain&h={$t['hash']}\\\">plain</a>\";\n $objlink = \"<a class=\\\"blob\\\" href=\\\"\" . sanitized_url() . \"p=$proj&b={$t['hash']}\\\">{$t['file']}</a>\";\n }\n\n echo \"<tr><td>$perm</td><td>$objlink</td><td>$plain</td></tr>\";\n }\n echo '</table></div>';\n}", "function git_ls_tree($repo, $tree) {\n $ary = array();\n\n $out = array();\n //Have to strip the \\t between hash and file\n exec(\"GIT_DIR=$repo/.git git ls-tree $tree | sed -e 's/\\t/ /g'\", $out);\n\n foreach ($out as $line) {\n $entry = array();\n $arr = explode(\" \", $line);\n $entry['perm'] = $arr[0];\n $entry['type'] = $arr[1];\n $entry['hash'] = $arr[2];\n $entry['file'] = $arr[3];\n $ary[] = $entry;\n }\n return $ary;\n}", "public function __toString() {\n return $this->getTree();\n }", "public function outputContent(TreeObject $treeObject, $ref = 'HEAD')\n {\n $output = $this->pygmentize->format($this->repository->outputRawContent($treeObject, $ref), $treeObject->getName());\n $matches = array();\n preg_match(\"'<div class=\\\"highlight\\\"><pre>(.*)\\n</pre></div>'si\", $output, $matches);\n $arrContent = preg_split('/\\n/', $matches[1]);\n $arrOutput = array();\n $arrNumbers = array();\n foreach ($arrContent as $i => $line) {\n $arrNumbers[] = '<div class=\"number\">'.($i + 1).'</div>';\n $arrOutput[] = '<div class=\"ln\">'.$line.'</div>';\n }\n\n return array(\n 'line_numbers' => implode($arrNumbers),\n 'content' => implode($arrOutput)\n );\n }", "function git_tree($gitdir, $tree) {\n\n $out = array();\n $command = \"GIT_DIR=$gitdir/.git git ls-tree --name-only $tree\";\n exec($command, $out);\n}", "function write_plain($repos) {\n $repo = get_repo_path($_GET['p'], $repos);\n $hash = $_GET['h'];\n header(\"Content-Type: text/plain\");\n $str = system(\"GIT_DIR=$repo/.git git cat-file blob $hash\");\n echo $str;\n die();\n}", "public function getTreeOutput(){\n \n if(!$this->treeoutput)\n $this->setTreeOutput();\n \n return $this->treeoutput;\n }", "public function readRepoStructure() {\r\n $tree = array();\r\n $entries_list = SvnWrapper::singleton()->ls();\r\n if(is_array($entries_list)) {\r\n// $svntree = $this->buildTreeFromFlatList($entries_list);\r\n $svntree = $this->buildTreeRecursively('/');\r\n $tree = $this->svnTreeTransform($svntree);\r\n }\r\n return $tree;\r\n }", "public function menu_tree_output($tree)\n {\n return menu_tree_output($tree);\n }", "public function toTree()\n {\n throw new RuntimeException('This repository does not support \"toTree\" method.');\n }", "function tidy_get_output(tidy $object) {}", "public function show() {\n // abre tag\n $this->open();\n echo \"\\n\";\n // si tiene contenido\n if ($this->children) {\n \n \n // recorre todos los objetos hijos\n foreach ($this->children as $child) {\n // si es objeto\n if (is_object($child)) {\n $child->show();\n }\n elseif ((is_string($child)) or (is_numeric($child))) {\n // si es texto\n echo $child;\n }\n }\n // cierra la tag\n $this->close();\n }\n }", "function printCollectionTree(){\n\n\t\t/* Return HTML */\n\t\treturn $output;\n\t}", "function get_composer_content($commit, $filename) {\n\n return json_decode(shell_exec('git show ' . $commit . ':' . $filename));\n}", "static function getHTMLForTree( $data ){\n\t\tglobal $wgOut;\n\t\t$wgOut->addModules( 'ext.DataVisualizer' );\n\n\t\treturn '<div class=\"dv_d3_tree\" style=\"text-align:center;\" dv_data=' . json_encode($data) .'></div>';\n\t}", "function html_desc($repo, $proj) {\n\n // Check if the git repo has a description file\n if(file_exists(\"$repo/.git/description\")){\n $desc = short_desc(file_get_contents(\"$repo/.git/description\"));\n }else{\n $desc = \"No description\";\n }\n $owner = get_file_owner($repo);\n $last = get_last($repo);\n $git_clone_url = 'http://'.$_SERVER['HTTP_HOST'].'/git/'.$proj;\n \n echo \"<table>\";\n echo \"<tr><td>description</td><td>$desc</td></tr>\";\n echo \"<tr><td>owner</td><td>$owner</td></tr>\";\n echo \"<tr><td>last change</td><td>$last</td></tr>\";\n echo \"<tr><td>URL</td><td>$git_clone_url</td></tr>\";\n echo \"</table>\";\n}", "function dumpAllNicely($string = '')\n{\n global $tree;\n\n echo '<i><span style=\"color: #008000; text-decoration: underline;\">' . $string . '</span></i><br>';\n $all = $tree->getBranch(); // get the entire structure sorted as the tree is, so we can simply foreach through it and show it\n foreach ($all as $aElement) {\n for ($i = 0; $i < $aElement['level']; ++$i) {\n echo '&nbsp; &nbsp; ';\n }\n echo '<span style=\"color: red\">' . $aElement['name'] . '</span> ===&gt; ';\n $tree->varDump(array($aElement));\n }\n echo '<br />';\n\n}", "function v2_mumm_menu_tree__menu_doormat(&$variables) {\n return $variables['tree'];\n}", "function get_a($object, $html_format = true)\n{\n if (is_array($object)) {\n $content = print_r($object, true);\n } else {\n ob_start();\n var_dump($object);\n $content = ob_get_contents();\n ob_end_clean();\n }\n if ($html_format) {\n $content = \"<pre>\".htmlentities($content).\"</pre>\";\n }\n return $content;\n}", "public function generateTreeHtml()\n {\n $htmlWriter = new Writer();\n\n return $htmlWriter->render( $this->mapRedisSchema(), $this->getNamespaceSeparator() );\n }", "public function getTreeSource();", "function renderTreeOrgaos($arvore) {\n $lastLevel = 1;\n//Outer list item\n $html = \"<ul class=\\\"jstree\\\">\";\n//Iterating tree from tree root\n foreach ($arvore as $node) {\n//If we are on the item of the same level, closing <li> tag before printing item\n if (($node['level'] == $lastLevel) and ($lastLevel > 0)) {\n $html .= '</li>';\n }\n//If we are printing a next-level item, starting a new <ul>\n if ($node['level'] > $lastLevel) {\n $html .= '<ul>';\n }\n//If we are going to return back by several levels, closing appropriate tags\n if ($node['level'] < $lastLevel) {\n $html .= str_repeat(\"</li></ul>\", $lastLevel - $node['level']) . '</li>';\n }\n//Priting item without closing tag\n $html .= '\n <li id=\"tree_node[' . $node['uuid'] . ']\">\n <ins class=\"jstree-icon\">&nbsp;</ins>\n <a><ins class=\"jstree-icon\">&#160;</ins>' . $node['nome'] . '</a>';\n//Refreshing last level of the item\n $lastLevel = $node['level'];\n }\n $html .= \"</ul>\";\n return $html;\n}", "function html_diff($proj, $commit, $parent, $repos) {\n $repo = get_repo_path($proj, $repos);\n $out = array();\n exec(\"GIT_DIR=$repo/.git git diff $parent $commit\", $out);\n\n echo '<div class=\"gitcode\">';\n echo '<b>diff</b><br>';\n echo highlight_code(implode(\"\\n\", $out));\n echo '</div><br>';\n}", "public function getTrees() {}", "public function actionAreaTree()\n {\n $html = $this->renderPartial('tree', array(), true);\n Yii::app()->getClientScript()->renderBodyBegin($html);\n Yii::app()->getClientScript()->renderBodyEnd($html);\n echo $html;\n Yii::app()->end();\n }", "function putInTree()\n\t{\n//echo \"st:putInTree\";\n\t\t// chapters should be behind pages in the tree\n\t\t// so if target is first node, the target is substituted with\n\t\t// the last child of type pg\n\t\tif ($_GET[\"target\"] == IL_FIRST_NODE)\n\t\t{\n\t\t\t$tree = new ilTree($this->content_object->getId());\n\t\t\t$tree->setTableNames('lm_tree','lm_data');\n\t\t\t$tree->setTreeTablePK(\"lm_id\");\n\n\t\t\t// determine parent node id\n\t\t\t$parent_id = (!empty($_GET[\"obj_id\"]))\n\t\t\t\t? $_GET[\"obj_id\"]\n\t\t\t\t: $tree->getRootId();\n\t\t\t// determine last child of type pg\n\t\t\t$childs =& $tree->getChildsByType($parent_id, \"pg\");\n\t\t\tif (count($childs) != 0)\n\t\t\t{\n\t\t\t\t$_GET[\"target\"] = $childs[count($childs) - 1][\"obj_id\"];\n\t\t\t}\n\t\t}\n\t\tif (empty($_GET[\"target\"]))\n\t\t{\n\t\t\t$_GET[\"target\"] = IL_LAST_NODE;\n\t\t}\n\n\t\tparent::putInTree();\n\t}", "function print_tree(tree $t, $with_id=false) {\n // $root = tree_to_treenode($t);\n print_treenode($t, null, 0, $with_id);\n}", "private function createTree() {\n\t\t$html = $this->getSpec();\n\t\t$html .= '<div class=\"tal_clear\"></div>';\n\t\t$html .= $this->getSkills();\n\n\t\treturn $html;\n\t}", "private function setTreeOutput(){\n \n $item = $this->item;\n \n $treeoutput = NULL;\n $menuname = NULL;\n $parameters = NULL;\n \n $menutree = \\Drupal::menuTree();\n \n if($item->menu_name == 'active-menu'){\n \n $menuname = $this->getCurrentMenuName();\n \n if($menuname)\n $parameters = $menutree->getCurrentRouteMenuTreeParameters($menuname);\n \n }else{\n $parameters = new MenuTreeParameters();\n $parameters->root = $item->menu_plid;\n $menuname = $item->menu_name;\n }\n \n \n if($parameters && $menuname){\n \n $parameters->setMaxDepth($item->menu_level);\n\n $tree = $menutree->load($menuname, $parameters);\n $treeoutput = $menutree->build($tree);\n \n }\n \n $this->treeoutput = $treeoutput;\n }", "function html_browse($proj, $repos) {\n\n if (isset($_GET['b'])) {\n html_blob($proj, $_GET['b'], $repos);\n } else {\n // Get the tree, otherwise default to HEAD\n if (isset($_GET['t'])) {\n $tree = $_GET['t'];\n } else {\n $tree = \"HEAD\";\n }\n html_tree($proj, $tree, $repos);\n }\n}", "public function __toString(): string\n {\n return (string) $this->repository->toString();\n }", "public function print_result(){\n $parsed_result = (array) $this->get_result()->parse_result();\n foreach($parsed_result['items'] as $repository_detail){\n $out .= $repository_detail->full_name.': '.$repository_detail->description.'<br />';\n }\n echo $out;\n }", "function doDisplay()\n {\n parent :: doDisplay();\n\n $criteria = new lmbSQLCriteria('is_branch >= 0');//lmbSQLFieldCriteria('is_branch', 1);\n $this->tree_items = lmbActiveRecord :: find('TreeItem', $criteria);\n }", "public function getTree()\n {\n return($this->options['tree']);\n }", "function wp_print_plugin_file_tree($tree, $label = '', $level = 2, $size = 1, $index = 1)\n {\n }", "function renderTree($arvore) {\n $lastLevel = 0;\n//Outer list item\n $html = \"<ul class=\\\"jstree\\\">\";\n//Iterating tree from tree root\n foreach ($arvore->fetchTree() as $node) {\n//If we are on the item of the same level, closing <li> tag before printing item\n if (($node['level'] == $lastLevel) and ($lastLevel > 0)) {\n $html .= '</li>';\n }\n//If we are printing a next-level item, starting a new <ul>\n if ($node['level'] > $lastLevel) {\n $html .= '<ul>';\n }\n//If we are going to return back by several levels, closing appropriate tags\n if ($node['level'] < $lastLevel) {\n $html .= str_repeat(\"</li></ul>\", $lastLevel - $node['level']) . '</li>';\n }\n//Priting item without closing tag\n $html .= '\n <li id=\"tree_node[' . $node['uuid'] . ']\">\n <ins class=\"jstree-icon\">&nbsp;</ins>\n <a><ins class=\"jstree-icon\">&#160;</ins>' . $node['nome'] . '</a>';\n//Refreshing last level of the item\n $lastLevel = $node['level'];\n }\n $html .= \"</ul>\";\n return $html;\n}", "abstract public function tree_encoder();", "function getXedocsTreeList()\n {\n $oXedocsController = &getController('xedocs');\n\n header(\"Content-Type: text/xml; charset=UTF-8\");\n header(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");\n header(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\n header(\"Cache-Control: no-store, no-cache, must-revalidate\");\n header(\"Cache-Control: post-check=0, pre-check=0\", false);\n header(\"Pragma: no-cache\");\n\n if(!$this->module_srl) {\n return new Object(-1,'msg_invalid_request');\n }\n\n $xml_file = $this->_getXmlCacheFilename($this->module_srl);\n\n if(!file_exists($xml_file)) {\n $oXedocsController->_recompileTree($this->module_srl);\n }\n\n print FileHandler::readFile($xml_file);\n Context::close();\n exit();\n }", "private function _getTree($create = false) {}", "function html_shortlog($repo, $count) {\n echo '<table>';\n $c = git_commit($repo, \"HEAD\");\n for ($i = 0; $i < $count && $c; $i++) {\n\n $date = date('D n/j/y G:i', intval($c['date']));\n $commit_id = $c['commit_id'];\n $parent_id = $c['parent'];\n\n $commit_message = short_desc($c['message'], 110);\n $diff = \"<a href=\\\"\" . sanitized_url() . \"p={$_GET['p']}&a=commitdiff&h=$commit_id&hb=$parent_id\\\">commitdiff</a>\";\n echo \"<tr><td>$date</td><td>{$c['author']}</td><td>$commit_message</td><td>$diff</td></tr>\\n\";\n $c = git_commit($repo, $parent_id);\n }\n echo '</table>';\n}", "public function getGitData()\n\t{\n\t\treturn $this->getData('gitData');\n\t}", "function smarty_function_randgen_generator_tree($params, &$smarty)\n{\n $tree = $params['tree'];\n $htmltag = '<div class=\"well\"><em class=\"title\">%s</em> : %s';\n $depth = 0;\n $html = '';\n foreach(array_keys($tree['description']) as $key){\n $currentDepth = $tree['depth'][$key];\n $description = nl2br(htmlspecialchars($tree['description'][$key], ENT_QUOTES, 'UTF-8'));\n if($depth == $currentDepth){\n $html .= \"</div>\";\n $html .= sprintf($htmltag, $tree['title'][$key], $description);\n }\n elseif($depth > $currentDepth){\n for($i=0;$i<$depth-$currentDepth;$i++){\n $html .= \"</div>\";\n }\n $html .= sprintf($htmltag, $tree['title'][$key], $description);\n $depth = $currentDepth;\n }\n elseif($depth < $currentDepth){\n $html .= sprintf($htmltag, $tree['title'][$key], $description);\n $depth = $currentDepth;\n }\n }\n for($i=0;$i<$currentDepth;$i++){\n $html .= \"</div>\";\n }\n\n return $html;\n}", "public function getTreeHtml()\n {\n if ($this->getMenu()) {\n return $this->_getTreeHtmlLevel(0, $this->getMenu()->getMenuTreeObjects());\n }\n\n return '';\n }", "function get_github_file_structure($list) {\n $result = array();\n foreach ($list as $key => $value) {\n $path_segment = explode('/', $value['path']);\n // read the \"content\" directory\n if ((count($path_segment) >= 2) && (reset($path_segment) == 'content')) {\n // debug('value', $value);\n $path_segment = array_slice($path_segment, 1);\n // debug('path_segment', $path_segment);\n if ($value['type'] == 'tree') {\n if (count($path_segment) == 1) {\n // add the directory in the first level of the repository as chapters\n $result[$path_segment[0]] = array (\n 'item' => array(),\n );\n }\n } elseif ($value['type'] == 'blob') {\n $pathinfo = pathinfo(implode('/', $path_segment));\n // debug('pathinfo', $pathinfo);\n if ($pathinfo['filename'] == 'README') {\n } else {\n // get the main chapter files\n if (count($path_segment) == 2) {\n // debug('content file path_segment', $path_segment);\n $pathinfo = pathinfo($path_segment[1]);\n // debug('pathinfo', $pathinfo);\n if ($pathinfo['extension'] == 'md') { // TODO: accept also other extensions\n $fileinfo = explode('-', $pathinfo['filename']);\n // debug('fileinfo', $fileinfo);\n $language_code = end($fileinfo);\n $key = implode('-', array_slice($fileinfo, 0, -1));\n if (strlen($language_code) == 2) {\n // debug('key', $key);\n if (array_key_exists($key, $result)) {\n $result[$key]['item'][$language_code] = $value;\n }\n }\n }\n }\n }\n\n }\n }\n }\n // debug('result', $result);\n return $result;\n}", "function tidy_get_root(tidy $object) {}", "function robm_dump() {\r\n echo '<pre style=\"border:1px solid #000; padding:5px; margin:5px; max-height:150px; overflow:auto;\" id=\"' . md5(serialize($object)) . '\">';\r\n $i = 0; $args = func_get_args();\r\n foreach ( (array) $args as $object ) {\r\n if ( $i == 0 && count($args) > 1 && is_string($object) )\r\n echo \"<h3>$object</h3>\";\r\n var_dump($object);\r\n $i++;\r\n }\r\n echo '</pre>';\r\n }", "function _calculateTree() {\n include_once(\"bitlib/SQL/Tree.php\");\n include_once(\"bitlib/functions/common.php\");\n $db = common::getDB($GLOBALS[\"BX_config\"][\"dsn\"]);\n $t = new SQL_Tree($db);\n $t->FullPath=\"fulluri\";\n $t->Path=\"uri\";\n $t->FullTitlePath=\"fulltitlepath\";\n $t->Title=\"title_de\";\n \n $t->importTree(1);\n }", "final public function __toString()\n {\n $ret = $this->getContent();\n foreach ($this as $node) {\n $ret .= PHP_EOL . (string)$node;\n }\n return $ret;\n }", "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 }", "public function toHtml() {\n\t\techo '<pre '.$this->getAttributes().'>'.$this->renderChildren().'</pre>';\n\t}", "function git_commit($repo, $cid) {\n $out = array();\n $commit = array();\n\n if (strlen($cid) <= 0) {\n return 0;\n }\n exec(\"GIT_DIR=$repo/.git git rev-list --header --max-count=1 $cid\", $out);\n\n\n if (!empty($out)) {\n\n $commit[\"commit_id\"] = $out[0];\n\n\n $g = explode(\" \", $out[1]);\n\n $commit[\"tree\"] = $g[1];\n\n\n\n\n $g = explode(\" \", $out[2]);\n $commit[\"parent\"] = $g[1];\n\n\n\n\n $g = explode(\" \", $out[3]);\n\n if (isset($g[3])) {\n\n\n // $commit['author'] = $g[1].' '.$g[2];\n /* variable number of strings for the name */\n /*\n for ($i = 0; $g[$i][0] != '<' && $i < 5; $i++) {\n // $commit[\"author\"] = $g[1];\n\n $commit[\"author\"] = \" $g[$i] \";\n }\n */\n\n for ($i = 1; $g[$i][0] != '<' && $i < 5; $i++) {\n\n\n $commit[\"author\"] = $g[1];\n $commit[\"author\"] .= ' ' . $g[2];\n // $commit[\"author\"] = \"\";\n // $commit[\"author\"] .= \" $g[$i] \";\n }\n\n // $commit['author'] = $g[1].' '.$g[2];\n\n\n\n /* add the email */\n\n $commit[\"date\"] = \"{$g[++$i]} {$g[++$i]}\";\n // $commit[\"date\"] = $g[5];s\n $commit[\"message\"] = \"\";\n $size = count($out);\n\n\n\n for (; $i < $size - 1; $i++) {\n $commit[\"message\"] .= $out[$i];\n }\n return $commit;\n }\n }\n}", "function writeHTML()\n\t{\n\t\tglobal $_activeTree;\n\t\t\n\t\t$c = count($this->children);\n\n\t\tif ($this->link)\n\t\t{\n\t\t\t$title = \"<a href='{$this->link}' target='{$this->target}'>{$this->title}</a>{$this->extras}\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$title = \"<a href='#' onclick='\";\n\t\t\t\n\t\t\tif ($_activeTree->onSelect)\n\t\t\t{\n\t\t\t\t$title .= \"{$_activeTree->onSelect}(\\\"{$this->value}\\\");\";\n\t\t\t}\n\t\t\t\n\t\t\t$title .= \"; return false'>{$this->title}</a>{$this->extras}\";\n\t\t}\n\t\t\n\t\tif ($c == 0 && !$this->onDemand)\n\t\t{\n\t\t\t// Leaf node\n\t\t\techo \"<div class='{$this->leafStyle}'>\";\n\n\t\t\tif (isset($this->value) && $this->value !== \"\" && $_activeTree->selectMode != 'navigation')\n\t\t\t{\n?>\n\t\t\t<input type=\"checkbox\" class=\"checkbox\" name=\"<? echo $this->id?>\" value=\"<? echo $this->value?>\"<? \n\t\t\t\tif ($this->checked) echo \" checked\";\n\t\t\t\tif ($this->disabled) echo \" disabled\";\n\t\t\t\tif ($_activeTree->selectMode == \"single\") \n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"Tree.clearCheckBoxes('{$_activeTree->id}', this);\";\n\t\t\t\t\tif ($_activeTree->onSelect)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \" {$_activeTree->onSelect}('{$this->value}');\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"\\\"\";\n\t\t\t\t}\n\t\t\t\telse if ($_activeTree->onSelect)\n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"{$_activeTree->onSelect}('{$this->value}');\\\"\";\n\t\t\t\t}\n\t\t\t\t ?>/>\n<?\n\t\t\t}\n\t\t\n\t\t\techo \"$title</div>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->open)\n\t\t\t{\n\t\t\t\t$style = $this->openStyle;\n\t\t\t\t$display = \"block\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$style = $this->closedStyle;\n\t\t\t\t$display = \"none\";\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif ($this->onDemand)\n\t\t\t{\n\t\t\t\t$cmd = \"Tree.loadOnDemand('{$this->id}', '{$this->onDemand}');\";\n\t\t\t\t\n\t\t\t\tif ($this->open)\n\t\t\t\t{\n?>\n<script type=\"text/javascript\">\n\twindow.addEvent('domready', function() {Tree.loadOnDemand('<?echo $this->id?>', '<?echo $this->onDemand?>');});\n</script>\n<?\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$cmd = \"\";\n\t\t\t}\n\t\t\t\n\t\t\t$cmd .= \"Tree.toggleFolder('{$this->id}', '{$this->openStyle}', '{$this->closedStyle}');\";\n?>\n\t\t<div id='<?echo $this->id?>' class='<?echo $style?>' onclick=\"<?echo $cmd ?>\">\n<?\n\t\t\tif (isset($this->value) && $this->value !== \"\")\n\t\t\t{\n?>\n\t\t\t<input type=\"checkbox\" class=\"checkbox\" name=\"<? echo $this->id?>\" value=\"<? echo $this->value?>\" <? \n\t\t\t\tif ($this->checked) echo \" checked\";\n\t\t\t\tif ($this->disabled) echo \" disabled\";\n\t\t\t\tif ($_activeTree->selectMode == \"single\") \n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"Tree.clearCheckBoxes('{$_activeTree->id}', this);\";\n\t\t\t\t\tif ($_activeTree->onSelect)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \" {$_activeTree->onSelect}('{$this->value}');\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"\\\"\";\n\t\t\t\t}\n\t\t\t\telse if ($_activeTree->onSelect)\n\t\t\t\t{\n\t\t\t\t\techo \" onclick=\\\"{$_activeTree->onSelect}('{$this->value}');\\\"\";\n\t\t\t\t}\n\t\t\t\t ?>/>\n<?\n\t\t\t}\n?>\n\t\t<?echo $title?></div>\n\t\t<div id='<?echo $this->id?>_contents' style='padding-left: <?echo $_activeTree->indent ?>; display: <? echo $display?>'>\n\t\t\t\n<?\t\t\t\n\t\t\tfor($i = 0; $i < $c; ++$i)\n\t\t\t{\n\t\t\t\t$this->children[$i]->writeHTML();\n\t\t\t}\n?>\n\t\t</div>\n<?\n\t\t}\n\t}", "public function write(): string\n {\n\n $msg = \"\";\n foreach ($this->tree as $tree) {\n $msg .= $tree[0]::toHl7($tree) . chr(13); //carriage return\n }\n return $msg;\n }", "public function getTree() {\n\t\t// Affichage de la page\n\t\t$html = '<div id=\"tal_box\">';\n\t\t$html .= '<p>You can still use <span id=\"skillPoints\">23</span> points.</p>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div class=\"tal_tree\">';\n\t\t$html .= $this->createTree();\n\t\t$html .= '</div>';\n\t\t$html .= '<div id=\"tal_linkBox\">';\n\t\t$html .= '<button onClick=\"createLink()\">Create a link</button>';\n\t\t$html .= '<p id=\"tal_buildLink\"></p>';\n\t\t$html .= '</div>';\n\t\treturn $html;\n\t}", "public function toHtml() {\n\t\techo '<mark '.$this->getAttributes().'>'.$this->renderChildren().'</mark>';\n\t}", "public function treeAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n /** @var CategoryRepository $repo */\n $repo = $em->getRepository('SowpBudgetBundle:Category');\n $categories = $repo->childrenHierarchy();\n\n return $this->render('SowpBudgetBundle:CategoryAdmin:tree.html.twig', array(\n 'categories' => $categories,\n ));\n }", "public function __toString()\n {\n return $this->root;\n }", "function getContentObject() ;", "public function get_description() {\n\t\t\t$path = $this->git_directory_path();\n\t\t\treturn file_get_contents($path.\"/description\");\n\t\t}", "function getOutputCode() {\n\t\t\t\n\t\t$_bckOutputCode=$this->outputCode;\n\t\t$this->outputCode=\"\";\n\t\tfor ($in=0;$in<$this->indent; $in++) {\n\t\t\t$this->outputCode.=\"\";\n\t\t}\n\t\t$this->indent++;\n\t\t$this->outputCode.=$_bckOutputCode;\n\n\t\tfor ($childIdx=0; $childIdx<count($this->child); $childIdx++) {\n\t\t\tif (is_object($this->child[$childIdx])) {\n\t\t\t\t$theChild=$this->child[$childIdx];\n\t\t\t\tif (is_object($theChild)) {\n\t\t\t\t\t$theChild->indent=$this->indent;\n\t\t\t\t\t$this->outputCode.=$theChild->getOutputCode();\n\t\t\t\t} else {\n\t\t\t\t\t$this->outputCode.=$theChild;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$ind=$this->indent;\n\t\t$ind--;\n\t\t$this->indent=$ind;\n\t\t$this->CloseTag();\n\t\treturn $this->outputCode;\n\t}", "function pubrepo_display( &$treeView ) {\n\tglobal $modname, $op;\n\t$GLOBALS['page']->add( '<div class=\"std_block\">' );\n\t$GLOBALS['page']->add( '<form id=\"pubreposhow\" method=\"post\"'\n\t.' action=\"index.php?modname='.$modname.'&op='.$op.'\"'\n\t.' >'.\"\\n\"\n\t.'<input type=\"hidden\" id=\"authentic_request_pubr\" name=\"authentic_request\" value=\"'.Util::getSignature().'\" />' );\n\t\n\tif( funAccess('moditem','MOD', TRUE, 'pubrepo' ) ) {\n\t\t$treeView->withActions = TRUE;\n\t} else {\n\t\t$tdb = $treeView->getTreeDb();\n\t}\n\t$GLOBALS['page']->add( $treeView->load() );\n\tif( funAccess('moditem','MOD', TRUE, 'pubrepo' ) ) {\n\t\t$GLOBALS['page']->add( $treeView->loadActions() );\n\t}\n\n\t$GLOBALS['page']->add( '</form>' );\n\t// print form for import action\n\t$GLOBALS['page']->add( '</div>' );\n}", "public function output_commit( $args )\n\t{\n\t\t$url = 'https://github.com/' . $args['repository'] . '/commit/' . $args['commit'];\n\n\t\tob_start();\n\t\t?>\n\t\t\t<div class=\"commit\">\n\t\t\t\t<header>\n\t\t\t\t<h1>Commit by <span class=\"author\"><?php echo esc_html( $args['author'] ); ?></span> at\n\t\t\t\t\t<time>\n\t\t\t\t\t\t<?php echo human_time_diff( strtotime( $args['date'] ), time() ); ?> ago\n\t\t\t\t\t</time>\n\t\t\t\t\t(<a href=\"<?php echo esc_url( $url ); ?>\" class=\"diff\">view diff</a>)\n\t\t\t\t</h1>\n\t\t\t\t</header>\n\t\t\t\t<div class=\"body\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$body = htmlentities( $args['body'] );\n\t\t\t\t\t\techo nl2br( $this->link_issue_hash( $body, $args['repository'] ) );\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\treturn ob_get_clean();\n\t}", "protected function _getTree($create = false) {}", "public function getContent()\n {\n $source_code = '';\n $_components = array_reverse($this->components);\n $_last = end($_components);\n\n foreach ($_components as $_component) {\n if ($_component != $_last) {\n $source_code .= \"{$this->tpl_obj->left_delimiter}private_inheritancetpl_obj file='$_component->filepath' child--{$this->tpl_obj->right_delimiter}\\n\";\n } else {\n $source_code .= \"{$this->tpl_obj->left_delimiter}private_inheritancetpl_obj file='$_component->filepath'--{$this->tpl_obj->right_delimiter}\\n\";\n }\n }\n\n return $source_code;\n }", "function pr($obj) {\n\n if (!$this->is_cli())\n echo '<pre style=\"word-wrap: break-word\">';\n if (is_object($obj))\n print_r($obj);\n elseif (is_array($obj))\n print_r($obj);\n else\n echo $obj;\n if (!$this->is_cli())\n echo '</pre>';\n }", "public function toString() {\r\n return $this->contents;\r\n }", "function show_tree(){\n\t\t\t\t\tswitch(LINK_TYPE){\n\t\t\t\t\t\tcase \"static\":\n\t\t\t\t\t\t\treturn $this->show_tree_static();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"burc\":\n\t\t\t\t\t\tcase \"dynamic\":\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn $this->show_tree_dynamic();\n\t\t\t\t\t}\n\t\t\t\t}", "public function getTree($idEntry = 0);", "function dump_nodes($drupal_content_type, $format = 'php') {\n $result = db_query('SELECT nid FROM node WHERE type = \"%s\"', $drupal_content_type);\n $num = 0;\n while ($obj = db_fetch_object($result)) {\n $num++;\n $node = node_load($obj->nid);\n // if web app use function drupal_json() which sets headers, then invokes drupal_to_js()\n // print($num . \"\\n\");\n if ($format == 'json') {\n print(drupal_to_js($node));\n } else {\n print_r($node, false);\n }\n print(\"\\n\");\n }\n // return(\"\\nListed \" . $num . \" objects for content type \" . $drupal_content_type . \"\\n\");\n}", "public function __toString()\n { \n if (in_array($this->object->extension(), ['html', 'twig', 'md'])) {\n return $this->render();\n } else {\n return $this->content();\n }\n }", "function __toString(){\n\t\tif( $this->is_terminal() ){\n\t\t\treturn parent::__toString();\n\t\t}\n\t\t$src = '';\n\t\tforeach( $this->children as $i => $Child ){\n\t\t\tif( $Child->is_terminal() ){\n\t\t\t\t$s = (string) $Child->value;\n\t\t\t\tswitch( $Child->t ){\n\t\t\t\t// these terminals will may or may not be followed by an identifier\n\t\t\t\t// but always by the next terminal in this node.\n\t\t\t\tcase J_FUNCTION:\n\t\t\t\tcase J_CONTINUE:\n\t\t\t\tcase J_BREAK;\n\t\t\t\t\t$identFollows = isset($this->children[$i+1]) && $this->children[$i+1]->is_symbol(J_IDENTIFIER);\n\t\t\t\t\t$identFollows and $s .= ' ';\n\t\t\t\t\tbreak;\n\t\t\t\t// these terminals will always be followed by an idenfifer\n\t\t\t\tcase J_VAR:\n\t\t\t\t// these terminals are followed by a non terminal;\n\t\t\t\t// adding a space to be on the safe side.\n\t\t\t\tcase J_DO:\n\t\t\t\tcase J_ELSE:\n\t\t\t\tcase J_RETURN:\n\t\t\t\tcase J_CASE:\n\t\t\t\tcase J_THROW:\n\t\t\t\tcase J_NEW:\n\t\t\t\tcase J_DELETE:\n\t\t\t\tcase J_VOID:\n\t\t\t\tcase J_TYPEOF:\n\t\t\t\t\t$s .= ' ';\n\t\t\t\t\tbreak;\n\t\t\t\t// these terminals require a space on either side\n\t\t\t\tcase J_IN:\n\t\t\t\tcase J_INSTANCEOF:\n\t\t\t\t\t$s = ' '.$s.' ';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// recursion into non-terminal\n\t\t\t\t$s = $Child->__toString();\n\t\t\t}\n\t\t\t$src .= $s;\n\t\t}\n\t\treturn $src;\n\t}", "public function contents() {\n\t\t$vals = array_values(get_object_vars($this));\n\t\treturn( array_reduce($vals, create_function('$a,$b','return is_null($a) ? \"$b\" : \"$a\".\"\\t\".\"$b\";')));\n\t}", "public function getRenderedBranch($id = 1, $root = true){\n $query = \"\n SELECT\n `structure`.`id`,\n `structure`.`pid`,\n `structure_data`.`sort`,\n `structure_data`.`name`,\n `structure_data`.`path`,\n `structure_data`.`publish`\n FROM\n `structure`,\n `structure_data`\n WHERE\n `structure`.`pid` = \".$id.\" &&\n `structure`.`id` = `structure_data`.`id`\n ORDER BY\n `structure_data`.`sort` ASC\n \";\n $result = mysql_query($query);\n $array = array();\n $html = '';\n\n if(mysql_num_rows($result) > 0){\n $html .= '<ul>';\n };\n\n while($row = mysql_fetch_assoc($result)){\n if($row['publish'] == 1){\n $class = ' active';\n }else{\n $class = ' hided';\n };\n\n $html .= '<li id=\"item_'.$row['id'].'\" class=\"tree_item'.$class.'\" data-url=\"'.$row['path'].'\">';\n $html .= '<div class=\"item_container\"><div class=\"item_container_inner\">';\n $html .= '<a href=\"/admin/?option=structure&suboption=edit&id='.$row['id'].'\">'.$row['name'].'</a>';\n $html .= '</div></div>';\n if($root){\n $html .= $this->getRenderedBranch($row['id']);\n };\n $html .= '</li>';\n };\n\n if(mysql_num_rows($result) > 0){\n $html .= '</ul>';\n };\n\n return $html;\n }", "function doDisplay()\n {\n $criteria = new lmbSQLCriteria('is_branch = 1');//lmbSQLFieldCriteria('is_branch', 1);\n $this->items = lmbActiveRecord :: find('TreeItem', $criteria);\n }", "public function output()\n\t{\n\t\t$this->do_tags();\n\n\t\t$this->final_output = '';\n\n\t\tforeach ($this->merged as $block)\n\t\t{\n\t\t\t$this->final_output .= $block;\n\t\t}\n\n\t\t$this->last_file = '';\n\t\t$this->values = array();\n\t\t$this->files = array();\n\t\t$this->merged = array();\n\n\t\t// the final template all put together\n\t\treturn $this->final_output;\n\t}", "private function _getHtmlTree($tree)\n {\n //obudowujemy sztucznym rootem\n $html = '<ul><li id=\"0\" data-jstree=\\'{\"type\":\"root\", \"opened\":true, \"selected\":false}\\'>' . self::ROOT;\n $html = $this->_generateTree(['children' => $tree], $html);\n $html .= '</li></ul>';\n return $html;\n }", "function FullTree();", "public function toHtml() {\n\t\techo '<ol '.$this->getAttributes().'>'.$this->renderChildren().'</ol>';\n\t}", "public function getTree() {\n return $this->_buildBranch($this->root_category_id);\n }", "public function getContent()\n {\n return $this->objOutput->getObjectRender()->overrideContent($this->output);\n }", "public function getContent()\n {\n return $this->objOutput->getObjectRender()->overrideContent($this->output);\n }", "protected function getGitRevision() {}", "function rdf_object_contents( $my_post ) {\n $indent = 1;\n rdf_open_object_tag( $my_post, $indent );\n\n $indent = 2;\n\n // just step through all the tags needed...\n rdf_archive_contents( $my_post, $indent );\n rdf_federation_contents( $my_post, $indent );\n rdf_see_also_contents( $my_post, $indent );\n rdf_title_contents( $my_post, $indent );\n rdf_author_contents( $my_post, $indent );\n rdf_editor_contents( $my_post, $indent );\n rdf_publisher_contents( $my_post, $indent );\n rdf_translator_contents( $my_post, $indent );\n rdf_dc_date_contents( $my_post, $indent );\n rdf_genre_contents( $my_post, $indent );\n rdf_discipline_contents( $my_post, $indent );\n rdf_type_contents( $my_post, $indent );\n rdf_text_contents( $my_post, $indent );\n rdf_thumbnail_contents( $my_post, $indent );\n\n $indent = 1;\n rdf_close_object_tag( $indent );\n}", "public function theme_page()\n\t{\n\t\t$repository = $this->git_repository();\n\n\t\texec( 'cd ' . $this->theme_dir . '; git log --no-merges --decorate=full -n 20 ', $output );\n\n\t\t$formatted = '';\n\t\t$commit = array();\n\n\t\tforeach( $output as $line )\n\t\t{\n\t\t\tif ( preg_match( '/^commit ([^ ]+)/', $line, $matches ) )\n\t\t\t{\n\t\t\t\tif ( $commit )\n\t\t\t\t{\n\t\t\t\t\t$formatted .= $this->output_commit( $commit );\n\t\t\t\t}//end if\n\n\t\t\t\t$commit = array(\n\t\t\t\t\t'commit' => $matches[1],\n\t\t\t\t\t'repository' => $repository,\n\t\t\t\t);\n\t\t\t}//end if\n\t\t\telseif ( preg_match( '/^Author: ([^<]+)/', $line, $matches ) )\n\t\t\t{\n\t\t\t\t$commit['author'] = trim( $matches[1] );\n\t\t\t}//end elseif\n\t\t\telseif ( preg_match( '/^Date: (.+)$/', $line, $matches ) )\n\t\t\t{\n\t\t\t\t$commit['date'] = $matches[1];\n\t\t\t}//end elseif\n\t\t\telseif ( preg_match( '/^Merge: (.+)$/', $line, $matches ) )\n\t\t\t{\n\t\t\t\t$commit['merge'] = $matches[1];\n\t\t\t}//end elseif\n\t\t\telse\n\t\t\t{\n\t\t\t\t$commit['body'] .= $line . \"\\n\";\n\t\t\t}//end else\n\t\t}//end foreach\n\n\t\t$formatted .= $this->output_commit( $commit );\n\n\t\t?>\n\t\t<div class=\"wrap go-git\">\n\t\t\t<?php screen_icon('options-general'); ?>\n\t\t\t<h2>Theme Git Info</h2>\n\t\t\t<div class=\"current-branch\">\n\t\t\t\t<h3>Branch: <span class=\"branch\"><?php echo $this->git_working_branch(); ?></span> on <a href=\"https://github.com/<?php echo $repository; ?>\"><?php echo $repository; ?></a></h3>\n\t\t\t\t<div class=\"status\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$statuses = $this->git_working_branch_status();\n\n\t\t\t\t\t\t$final_status = '';\n\t\t\t\t\t\tforeach ( $statuses as $remote => $status )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( ! $status['behind'] && ! $status['ahead'] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}//end if\n\n\t\t\t\t\t\t\tif ( $status['behind'] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$final_status .= $status['behind'] . ' commit' . ($status['behind'] > 1 ? 's' : '') . ' behind ' . $remote . '. ';\n\t\t\t\t\t\t\t}//end if\n\n\t\t\t\t\t\t\tif ( $status['ahead'] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$final_status .= $status['ahead'] . ' commit' . ($status['ahead'] > 1 ? 's' : '') . ' ahead of ' . $remote . '. ';\n\t\t\t\t\t\t\t}//end if\n\t\t\t\t\t\t}//end foreach\n\n\t\t\t\t\t\tif ( ! $final_status )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$final_status = 'This branch is in sync with all of its remotes.';\n\t\t\t\t\t\t}//end if\n\n\t\t\t\t\t\techo $final_status;\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php echo $formatted; ?>\n\t\t</div>\n\t\t<?php\n\t}", "function print_obj($obj)\n{\n echo \"<pre>\".print_r($obj,1).\"</pre>\";\n}", "public function __toString() {\n\t\treturn $this->result . ($this->ordered ? '</ol>' : '</ul>') . PHP_EOL;\n\t}", "function wp_print_theme_file_tree($tree, $level = 2, $size = 1, $index = 1)\n {\n }", "public function pandocSetup()\n {\n $this->pandocOptions = [\n \"data-dir\" => \"app\",\n \"wrap\" => \"none\",\n \"from\" => \"mediawiki\",\n \"to\" => $this->format\n ];\n if (! empty($this->luafilter)) {\n $this->pandocOptions[\"lua-filter\"] = $this->luafilter;\n }\n\n if (! empty($this->template)) {\n $this->pandocOptions[\"template\"] = $this->template;\n }\n $this->message(\"pandoc: \" . json_encode($this->pandocOptions));\n $jsonFile = $this->output . \"tree.json\";\n if (file_exists($jsonFile)) {\n $tree = json_decode(file_get_contents($jsonFile), true); \n $this->outputTree = [];\n $dirTree = $tree[0]['contents'];\n foreach ($dirTree as $dir ) {\n $d = [];\n if (!empty($dir['contents'])) {\n foreach ($dir['contents'] as $r) {\n $d[$r['name']] = true;\n }\n }\n $this->outputTree[$dir['name']] = $d;\n }\n echo json_encode($this->outputTree);\n }\n }", "function makeTree($uid, $add_content, $mode) {\n\t\tglobal $add_content;\n\t\t//Execute query depending on mode\n\t\tif ($mode == 'circumstance_tree' || $mode == 'usergroup_tree') {\n\t\t\t$temp_enablefields1 = str_replace('tx_civserv_navigation', 'nv1', $this->cObj->enableFields('tx_civserv_navigation'));\n\n\t\t\t$temp_enablefields2 = str_replace('tx_civserv_navigation', 'nv2', $this->cObj->enableFields('tx_civserv_navigation'));\n\n\t\t\t// we need double quotation marks here!!! because of the single quotation marks within $temp_enablefields1 and $temp_enablefields2\n\t\t\t$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t\t\t\t\"nv1.uid as uid,\n\t\t\t\t\t\t\t\t nv1.nv_name as name\",\n\t\t\t\t\t\t\t\t\"tx_civserv_navigation as nv1,\n\t\t\t\t\t\t\t\t tx_civserv_navigation_nv_structure_mm as nvmm,\n\t\t\t\t\t\t\t\t tx_civserv_navigation as nv2\",\n\t\t\t\t\t\t\t\t\"1 \".\n\t\t\t\t\t\t\t\t$temp_enablefields1.\n\t\t\t\t\t\t\t\t$temp_enablefields2.\n\t\t\t\t\t\t\t\t\" AND nv1.uid = nvmm.uid_local\n\t\t\t\t\t\t\t\t AND nv1.uid = nvmm.uid_local\n\t\t\t\t\t\t\t\t AND nv2.uid = nvmm.uid_foreign\n\t\t\t\t\t\t\t\t AND nv2.uid = \" . intval($uid) ,\n\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\t\t\"\");\n\t\t}\n\t\t// test bk: add organisational code\n\t\tif($this->conf['displayOrganisationCode']){\n\t\t\t$orderby='or1.or_code, or1.sorting';\n\t\t}else{\n\t\t\t$orderby='or1.sorting, or2.sorting';\n\t\t}\n\t\tif ($mode == 'organisation_tree') {\n\t\t\t$temp_enablefields1 = str_replace('tx_civserv_organisation', 'or1', $this->cObj->enableFields('tx_civserv_organisation'));\n\n\t\t\t$temp_enablefields2 = str_replace('tx_civserv_organisation', 'or2', $this->cObj->enableFields('tx_civserv_organisation'));\n\n\t\t\t// we need double quotation marks here!!! because of the single quotation marks within $temp_enablefields1 and $temp_enablefields2\n\t\t\t$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t\t\t\t\"or1.uid as uid,\n\t\t\t\t\t\t\t\t or1.or_code as code,\n\t\t\t\t\t\t\t\t or1.or_name as name\",\n\t\t\t\t\t\t\t\t\"tx_civserv_organisation as or1,\n\t\t\t\t\t\t\t\t tx_civserv_organisation_or_structure_mm as ormm,\n\t\t\t\t\t\t\t\t tx_civserv_organisation as or2\",\n\t\t\t\t\t\t\t\t\"1 \".\n\t\t\t\t\t\t\t\t $temp_enablefields1.\n\t\t\t\t\t\t\t\t $temp_enablefields2.\n\t\t\t\t\t\t\t\t \" AND or1.uid = ormm.uid_local\n\t\t\t\t\t\t\t\t AND or2.uid = ormm.uid_foreign\n\t\t\t\t\t\t\t\t AND or2.uid = \" . intval($uid) ,\n\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t$orderby,\n\t\t\t\t\t\t\t\t\"\");\n\n\t\t}\n\t\t//Check if query returned any results\n\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {\n\t\t\t$add_content = $add_content . '<ul>';\n\t\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {\n\t\t\t\t$uid = $row['uid']; // or1 res. nv1\n\t\t\t\t$makelink=false;\n\t\t\t\tif($this->conf['no_link_empty_nv']){\n#\t\t\t\t\tdebug('no_link_empty_nv gesetzt!');\n\t\t\t\t}else{\n#\t\t\t\t\tdebug('no_link_empty_nv NICHT gesetzt!');\n\t\t\t\t}\n\t\t\t\t$res_connected_services = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(\n\t\t\t\t\t\t'tx_civserv_service.sv_name',\n\t\t\t\t\t\t'tx_civserv_service',\n\t\t\t\t\t\t'tx_civserv_service_sv_navigation_mm',\n\t\t\t\t\t\t'tx_civserv_navigation',\n\t\t\t\t\t\t'AND tx_civserv_service_sv_navigation_mm.uid_foreign = '. intval($uid), //just in case\n\t\t\t\t\t\t'');\n\t\t\t\tswitch ($mode) {\n\t\t\t\t\tcase 'circumstance_tree':\n\t\t\t\t\t\t$link_mode = 'circumstance';\n\t\t\t\t\t\tif(($GLOBALS['TYPO3_DB']->sql_num_rows($res_connected_services) < 1) && $this->conf['no_link_empty_nv']){\n\t\t\t\t\t\t\t$makelink = false;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$makelink = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'usergroup_tree':\n\t\t\t\t\t\t$link_mode = 'usergroup';\n\t\t\t\t\t\tif(($GLOBALS['TYPO3_DB']->sql_num_rows($res_connected_services) < 1) && $this->conf['no_link_empty_nv']){\n\t\t\t\t\t\t\t$makelink = false;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$makelink = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'organisation_tree':\n\t\t\t\t\t\t$link_mode = 'organisation';\n\n\t\t\t\t\t\t$makelink = true; // we want detail-information to all organisations\n/*\n// no! we want detail-information to all organisations - not only to those who offer services.....\n\t\t\t\t\t\t$res_connected_services = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(\n\t\t\t\t\t\t\t\t'tx_civserv_service.sv_name',\n\t\t\t\t\t\t\t\t'tx_civserv_service',\n\t\t\t\t\t\t\t\t'tx_civserv_service_sv_organisation_mm',\n\t\t\t\t\t\t\t\t'tx_civserv_organisation',\n\t\t\t\t\t\t\t\t'AND tx_civserv_service_sv_organisation_mm.uid_foreign = '.intval($uid),\n\t\t\t\t\t\t\t\t'');\n*/\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif($this->conf['hide_empty_nv'] && $makelink == false){\n\t\t\t\t\t$this->makeTree($uid, $add_content, $mode);\n\t\t\t\t}else{\n\t\t\t\t\t$add_content .= '<li>';\n\t\t\t\t\t$add_content .= $makelink ? '<a href=\"' . htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => $link_mode,id => $row['uid']),1,1)) . '\">' : '';\n\t\t\t\t\t// test bk: add organisational code\n\t\t\t\t\tif($this->conf['displayOrganisationCode'] && !($mode=='usergroup_tree' || $mode=='circumstance_tree')){\n\t\t\t\t\t\t$add_content .= $row['code'].' '.$row['name'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$add_content .= $row['name'];\n\t\t\t\t\t}\n\t\t\t\t\t$add_content .= $makelink ? '</a>': '';\n\t\t\t\t\t$this->makeTree($uid, $add_content, $mode);\n\t\t\t\t\t$add_content .= \"</li>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$add_content = $add_content . \"</ul>\\n\";\n\t\t}\n\t\treturn $add_content;\n\t}", "public function render_tree(tree $tree) {\n $return = \\html_writer::start_tag('div', array('class' => 'profile_tree'));\n $categories = $tree->categories;\n foreach ($categories as $category) {\n $return .= $this->render($category);\n }\n $return .= \\html_writer::end_tag('div');\n return $return;\n }", "public static function modelDump($object, $level=1) {\r\n \t$classname = get_class($object);\r\n \tif ($level==1) printf('<b>%s</b>', $classname);\t\t\r\n\t\t$object->rewind();\r\n\t\twhile($object->valid()) {\r\n\t\t\tif ($object->current() instanceof tx_auxo_modelbase) {\r\n\t\t\t\tprintf('<p>%s Object: %s</p>', self::printSpaces($level), $object->key());\r\n\t\t\t\tself::modelDump($object->current(), $level+1);\t\t\t\t\r\n\t\t\t}\r\n\t\t\telseif ($object->current() instanceof tx_lib_object) {\r\n\t\t\t\tprintf('<p>%s Collection: %s</p>', self::printSpaces($level), $object->key());\r\n\t\t\t\tself::modelDump($object->current(), $level+1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tprintf('<p>%s Member: \"%s\" = \"%s\"</p>', self::printSpaces($level), $object->key(), $object->current());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$object->next();\r\n\t\t}\r\n\t}", "public function output($object) {\n\t\t//Zend_Debug::dump($object);\n\t\t$this->out(\"=> \", null, null, false);\n\t\tif (is_object($object)) {\n\t\t\tif(method_exists($object, 'toJson')) {\n\t\t\t\tif($object->toJson() == '[]') {\n\t\t\t\t\t$this->out(\"Blank object of type \" . get_class($object), \"cyan\");\n\t\t\t\t} else {\n\t\t\t\t\t$this->out($this->indent($object->toJson()), \"cyan\") . \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif(method_exists($object, 'toArray')) { \n\t\t\t\t$this->out(print_r($object->toArray(), true), \"cyan\") . \"\\n\";\n\t\t\t} else {\n\t\t\t\t$this->out(Zend_Debug::dump($object, \"\", false), \"cyan\") . \"\\n\";\n\t\t\t}\n\t\t} elseif(is_array($object)) {\n\t\t\t$this->out($this->indent(json_encode($object)), \"cyan\") . \"\\n\";\n\t\t} else {\n\t\t\t$this->out(var_export($object, true), \"cyan\") . \"\\n\";\n\t\t}\n\t}", "public function toScreen(){\n\n header('Content-Type: text/html');\n\n $nodeAsText = $this->getNodeAsText('Home');\n\n\n\n echo (utf8_encode($nodeAsText));\n\n }", "function getHtmlContent($webBasePath) {\n if ($this->fileGitObject) {\n if ($this->generator) {\n $content = $this->generator->generate($this->fileGitObject->data, $webBasePath, $this->path.'/');\n $this->extraData = $this->generator->getExtraData();\n return $content;\n } else {\n return '<pre>'.htmlspecialchars($this->fileGitObject->data).'</pre>';\n }\n }\n return '';\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 index()\n {\n $userId = 1;\n $rows = $this->treeRepo->binaryChildren($userId,100)->joinUsers()->get();\n list($parent, $jsonNodes) = TreeBinary::generateJson($rows, $userId);\n\n // dump($jsonNodes);\n return view('tree.binary.indexBinary',compact('jsonNodes','parent'));\n\n }", "function _outputTree () {\r\n // this could e.g. call _applyPostfilters\r\n return true;\r\n }", "private function _processContents()\r\n {\r\n $contents = \"\";\r\n foreach ($this->_bagBody->objects as $obj) {\r\n $isInfoKey = false;\r\n foreach ($this->_aryInfoKeys as $infoKey)\r\n if ($infoKey == $obj['key'])\r\n $isInfoKey = true;\r\n \r\n if ($obj['probableText'] == true && !$isInfoKey)\r\n $contents .= $obj['contents'];\r\n } \r\n $this->_contents = $contents;\r\n }", "public function getAst() {\n\t\t\treturn \"<p>Ast: \".$this->ast.\"</p>\";\n\t\t}", "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 }" ]
[ "0.6970373", "0.6286042", "0.6176389", "0.6148073", "0.6118765", "0.6051983", "0.6006472", "0.5956989", "0.5949387", "0.5911626", "0.5781761", "0.5721267", "0.5694332", "0.5643036", "0.5623609", "0.55738115", "0.5562182", "0.5472815", "0.544576", "0.54405093", "0.53841746", "0.5369755", "0.5324619", "0.5293069", "0.5279041", "0.5272159", "0.522493", "0.5222163", "0.5188006", "0.51749825", "0.51745903", "0.5161332", "0.5148733", "0.5140343", "0.51346105", "0.5134063", "0.5111446", "0.5110512", "0.51064014", "0.5101728", "0.5094579", "0.508224", "0.50809103", "0.5079329", "0.50777704", "0.5077368", "0.507285", "0.506508", "0.50569975", "0.5055384", "0.50434715", "0.50352556", "0.50237006", "0.5019252", "0.50182396", "0.5005851", "0.50029576", "0.49987188", "0.49954212", "0.49850178", "0.49813747", "0.49766064", "0.49723843", "0.4970759", "0.496385", "0.49551567", "0.494604", "0.49444482", "0.49442184", "0.49275172", "0.49070796", "0.48993522", "0.48923677", "0.48907292", "0.48782432", "0.48670283", "0.48665234", "0.48661876", "0.4852827", "0.48472986", "0.48472986", "0.4843516", "0.48431817", "0.48404333", "0.48397106", "0.48301035", "0.48286048", "0.48243904", "0.4822938", "0.48190656", "0.48183018", "0.48181346", "0.4807154", "0.47931692", "0.4790296", "0.47800466", "0.4773743", "0.4762157", "0.4762075", "0.47568747" ]
0.576535
11
output git DiffChunkLine content
public function outputChunk(DiffChunk $diffChunk) { //var_dump($diffChunkLine); return implode($diffChunk->getLines(), "\n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function html_shortlog($repo, $count) {\n echo '<table>';\n $c = git_commit($repo, \"HEAD\");\n for ($i = 0; $i < $count && $c; $i++) {\n\n $date = date('D n/j/y G:i', intval($c['date']));\n $commit_id = $c['commit_id'];\n $parent_id = $c['parent'];\n\n $commit_message = short_desc($c['message'], 110);\n $diff = \"<a href=\\\"\" . sanitized_url() . \"p={$_GET['p']}&a=commitdiff&h=$commit_id&hb=$parent_id\\\">commitdiff</a>\";\n echo \"<tr><td>$date</td><td>{$c['author']}</td><td>$commit_message</td><td>$diff</td></tr>\\n\";\n $c = git_commit($repo, $parent_id);\n }\n echo '</table>';\n}", "public function generateUnifiedDiff()\n {\n if ( ! $this->operations) {\n return \"\";\n }\n\n if ($this->lines === null) {\n $hunk = Hunk::forEmptyFile();\n return (string)$this->operations[0]->perform($hunk);\n }\n\n $hunks = array();\n\n foreach ($this->getLineGroups() as $lineGroup) {\n $start = min($lineGroup);\n $end = max($lineGroup);\n\n $hunk = Hunk::forLines($start, $end, $this->lines);\n\n foreach ($this->operations as $line => $operation) {\n if ( ! in_array($line, $lineGroup)) {\n continue;\n }\n\n $hunk = $operation->perform($hunk);\n }\n\n $hunks[] = $hunk;\n }\n\n $output = \"\";\n\n if ($this->path) {\n $output .= \"--- a/\" . $this->path . \"\\n\";\n $output .= \"+++ b/\" . $this->path . \"\\n\";\n }\n\n $output .= implode(\"\\n\", $hunks);\n\n return $output;\n }", "function html_diff($proj, $commit, $parent, $repos) {\n $repo = get_repo_path($proj, $repos);\n $out = array();\n exec(\"GIT_DIR=$repo/.git git diff $parent $commit\", $out);\n\n echo '<div class=\"gitcode\">';\n echo '<b>diff</b><br>';\n echo highlight_code(implode(\"\\n\", $out));\n echo '</div><br>';\n}", "public function diff()\n {\n return trim(implode(\"\\n\", $this->git('diff')));\n }", "private function getMarkedUpDiffText( array $unifiedDiff ) {\n\t\t$lastUser = $this->getArticle()->getPage()->getUserText();\n\n\t\t$output = '';\n\t\tforeach ( $unifiedDiff as $key => $currentLine ) {\n\t\t\tforeach ( $currentLine as $changeSet ) {\n\t\t\t\tswitch ( $changeSet['action'] ) {\n\t\t\t\t\tcase 'add':\n\t\t\t\t\t\t$class = 'mw-twocolconflict-diffchange-own';\n\t\t\t\t\t\tif ( $this->hasConflictInLine( $currentLine ) ) {\n\t\t\t\t\t\t\t$class .= ' mw-twocolconflict-diffchange-conflict';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$output .= '<div class=\"' . $class . '\">' .\n\t\t\t\t\t\t\t'<div class=\"mw-twocolconflict-diffchange-title\">' .\n\t\t\t\t\t\t\t'<span mw-twocolconflict-diffchange-title-pseudo=\"' .\n\t\t\t\t\t\t\t$this->context->msg( 'twoColConflict-diffchange-own-title' )->escaped() .\n\t\t\t\t\t\t\t'\" unselectable=\"on\">' . // used by IE9\n\t\t\t\t\t\t\t'</span>' .\n\t\t\t\t\t\t\t'</div>' .\n\t\t\t\t\t\t\t$changeSet['new'] .\n\t\t\t\t\t\t\t'</div>' . \"\\n\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'delete':\n\t\t\t\t\t\t$class = 'mw-twocolconflict-diffchange-foreign';\n\t\t\t\t\t\tif ( $this->hasConflictInLine( $currentLine ) ) {\n\t\t\t\t\t\t\t$class .= ' mw-twocolconflict-diffchange-conflict';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$output .= '<div class=\"' . $class . '\">' .\n\t\t\t\t\t\t\t'<div class=\"mw-twocolconflict-diffchange-title\">' .\n\t\t\t\t\t\t\t'<span mw-twocolconflict-diffchange-title-pseudo=\"' .\n\t\t\t\t\t\t\t$this->context->msg(\n\t\t\t\t\t\t\t\t'twoColConflict-diffchange-foreign-title',\n\t\t\t\t\t\t\t\t$lastUser\n\t\t\t\t\t\t\t)->escaped() .\n\t\t\t\t\t\t\t'\" unselectable=\"on\">' . // used by IE9\n\t\t\t\t\t\t\t'</span>' .\n\t\t\t\t\t\t\t'</div>' .\n\t\t\t\t\t\t\t$changeSet['old'] .\n\t\t\t\t\t\t\t'</div>';\n\n\t\t\t\t\t\tif ( !$this->hasConflictInLine( $currentLine ) ) {\n\t\t\t\t\t\t\t$output .= \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'copy':\n\t\t\t\t\t\t$output .= '<div class=\"mw-twocolconflict-diffchange-same\">' .\n\t\t\t\t\t\t\t$this->addUnchangedText( $changeSet['copy'] ) .\n\t\t\t\t\t\t\t'</div>' . \"\\n\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->normalizeMarkedUpText( $output );\n\t}", "public function getOutputLines();", "protected function getGitRevision() {}", "public function outputContent(Object $object, $ref = 'HEAD')\n {\n $output = $this->pygmentize->format($this->getGit()->outputRawContent($object, $ref), $object->getName());\n $this->logger->info($output);\n $matches = array();\n preg_match(\"'<div class=\\\"highlight\\\"><pre>(.*)\\n</pre></div>'si\", $output, $matches);\n $arrContent = preg_split('/\\n/', $matches[1]);\n $arrOutput = array();\n $arrNumbers = array();\n foreach ($arrContent as $i => $line) {\n $arrNumbers[] = '<div class=\"number\">'.($i + 1).'</div>';\n $arrOutput[] = '<div class=\"ln\">'.$line.'</div>';\n }\n\n return array(\n 'line_numbers' => implode($arrNumbers),\n 'content' => implode($arrOutput)\n );\n }", "function _versioncontrol_git_process_commits($repository, $revision, &$branches_per_commit, &$existing_revs) {\n $rev_shell = escapeshellarg($revision);\n $command = \"git log $rev_shell --numstat --summary --pretty=format:\\\"%H%n%P%n%aN <%ae>%n%ct%n%s%n%b%nENDOFOUTPUTGITMESSAGEHERE\\\" -n 1 --\";\n $logs = _versioncontrol_git_log_exec($command);\n _versioncontrol_git_log_parse_commits($repository, $logs, $branches_per_commit, $existing_revs); // Parse the info from the raw output.\n}", "function write_plain($repos) {\n $repo = get_repo_path($_GET['p'], $repos);\n $hash = $_GET['h'];\n header(\"Content-Type: text/plain\");\n $str = system(\"GIT_DIR=$repo/.git git cat-file blob $hash\");\n echo $str;\n die();\n}", "function get_composer_content($commit, $filename) {\n\n return json_decode(shell_exec('git show ' . $commit . ':' . $filename));\n}", "public function output_commit( $args )\n\t{\n\t\t$url = 'https://github.com/' . $args['repository'] . '/commit/' . $args['commit'];\n\n\t\tob_start();\n\t\t?>\n\t\t\t<div class=\"commit\">\n\t\t\t\t<header>\n\t\t\t\t<h1>Commit by <span class=\"author\"><?php echo esc_html( $args['author'] ); ?></span> at\n\t\t\t\t\t<time>\n\t\t\t\t\t\t<?php echo human_time_diff( strtotime( $args['date'] ), time() ); ?> ago\n\t\t\t\t\t</time>\n\t\t\t\t\t(<a href=\"<?php echo esc_url( $url ); ?>\" class=\"diff\">view diff</a>)\n\t\t\t\t</h1>\n\t\t\t\t</header>\n\t\t\t\t<div class=\"body\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$body = htmlentities( $args['body'] );\n\t\t\t\t\t\techo nl2br( $this->link_issue_hash( $body, $args['repository'] ) );\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\treturn ob_get_clean();\n\t}", "function diff($text1, $text2) {\n__autoload('TextDiff');\ninclude_once 'Text/Diff.php';\ninclude_once 'Text/Diff/Renderer.php';\ninclude_once 'Text/Diff/Renderer/unified.php';\n\n\n $vtext1 = chunk_split(strip_tags($text1, '<p><div>'), 1, \"\\n\");\n $vtext2 = chunk_split(strip_tags($text2, '<p><div>'), 1, \"\\n\");\n\n $vlines1 = str_split($vtext1, 2);\n $vlines2 = str_split($vtext2, 2);\n $text1 = str_replace(\"\\n\",\" \\n\",$text1);\n $text2 = str_replace(\"\\n\",\" \\n\",$text2);\n\n $vlines1 = explode(\" \", $text1);\n $vlines2 = explode(\" \", $text2);\n $diff = new Text_Diff($vlines1, $vlines2);\n $renderer = new Text_Diff_Renderer_inline();\n $html = html_entity_decode($renderer->render($diff));\n\n return preg_replace(array('#(<ins>|<del>)(<[^\\>]+>)#i', '#(</[^\\>]+>)(</ins>|</del>)#i'), '$2$1', $html);\n}", "public static function show_diff() {\r\n\t\tcheck_admin_referer('plugin-name-action_wpidenonce'); \r\n\t\tif ( !is_super_admin() )\r\n\t\t\twp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');\r\n\t\t\r\n error_reporting(E_ALL);\r\n ini_set(\"display_errors\", 1);\r\n \r\n require_once('git/autoload.php.dist');\r\n //use TQ\\Git\\Cli\\Binary;\r\n //use TQ\\Git\\Repository\\Repository;\r\n \r\n $root = apply_filters( 'wpide_filesystem_root', WP_CONTENT_DIR ) . \"/\"; \r\n \r\n //check repo path entered or die\r\n if ( !strlen($_POST['gitpath']) ) \r\n die(\"Error: Path to your git repository is required!\");\r\n \r\n \r\n $repo_path = $root . sanitize_text_field( $_POST['gitpath'] );\r\n $gitbinary = sanitize_text_field( stripslashes($_POST['gitbinary']) );\r\n \r\n if ( $gitbinary===\"I'll guess..\" ){ //the binary path\r\n \r\n $thebinary = TQ\\Git\\Cli\\Binary::locateBinary();\r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $thebinary ) );\r\n \r\n }else{\r\n \r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $_POST['gitbinary'] ) );\r\n \r\n }\r\n \r\n $file = sanitize_text_field( base64_decode( $_POST['file']) );\r\n \r\n //generate a diff using the built in WordPress code\r\n $args = array(\r\n 'title' => 'Differences',\r\n 'title_left' => 'Old Version',\r\n \t'title_right' => 'New Version'\r\n );\r\n \r\n $contents = file_get_contents($repo_path . \"/\" . $file); //the git library isn't using the WP filesystem API so should we here? should we fullstop?\r\n $contents2 = $git->showFile( $file, 'HEAD@{1}');\r\n \r\n $diff_table = wp_text_diff($contents2, $contents, $args); \r\n echo \"<strong>Diff</strong>\" . $diff_table;\r\n\r\n \r\n\t\tdie(); // this is required to return a proper result\r\n\t}", "public function outputContent(TreeObject $treeObject, $ref = 'HEAD')\n {\n $output = $this->pygmentize->format($this->repository->outputRawContent($treeObject, $ref), $treeObject->getName());\n $matches = array();\n preg_match(\"'<div class=\\\"highlight\\\"><pre>(.*)\\n</pre></div>'si\", $output, $matches);\n $arrContent = preg_split('/\\n/', $matches[1]);\n $arrOutput = array();\n $arrNumbers = array();\n foreach ($arrContent as $i => $line) {\n $arrNumbers[] = '<div class=\"number\">'.($i + 1).'</div>';\n $arrOutput[] = '<div class=\"ln\">'.$line.'</div>';\n }\n\n return array(\n 'line_numbers' => implode($arrNumbers),\n 'content' => implode($arrOutput)\n );\n }", "public function visualizeEntityContentDiff( EntityContentDiff $diff ) {\n\t\t$html = '';\n\t\t$html .= $this->visualizeRedirectDiff( $diff->getRedirectDiff() );\n\t\t$html .= $this->visualizeEntityDiff( $diff->getEntityDiff() );\n\t\treturn $html;\n\t}", "public function getTextOutput()\n {\n $patchLevel = $this->getPatchLevel();\n\n $commands = array(sprintf('-- Patch level %d structural changes', $patchLevel));\n $lastLocation = '';\n $lastName = '';\n $noOutput = true;\n foreach ($this->getStructuralPatches($patchLevel) as $patch) {\n if ($patch['gpa_location'] != $lastLocation) {\n $commands[] = sprintf(\"\\n-- DATABASE LOCATION: %s\", $patch['gpa_location']);\n $lastLocation = $patch['gpa_location'];\n }\n if ($patch['gpa_name'] != $lastName) {\n $commands[] = sprintf(\"\\n-- PATCH: %s\", $patch['gpa_name']);\n $lastName = $patch['gpa_name'];\n }\n $commands[] = $patch['gpa_sql'] . ';';\n $noOutput = false;\n }\n\n if ($noOutput) {\n $commands[] = sprintf(\"\\n-- No structural changes in patchlevel %d\", $patchLevel);\n }\n $commands[] = '';\n\n return implode(\"\\n\", $commands);\n }", "public function render()\n\t{\n\t\t$changes = parent::render();\n\t\t$html = '';\n\t\tif(empty($changes)) {\n\t\t\treturn $html;\n\t\t}\n\n\t\t$html .= '<table class=\"Differences DifferencesInline\">';\n\t\t$html .= '<thead>';\n\t\t$html .= '</thead>';\n\t\tforeach($changes as $i => $blocks) {\n\t\t\t// If this is a separate block, we're condensing code so output ...,\n\t\t\t// indicating a significant portion of the code has been collapsed as\n\t\t\t// it is the same\n\t\t\tif($i > 0) {\n\t\t\t\t$html .= '<tbody class=\"Skipped\">';\n\t\t\t\t$html .= '<th>&hellip;</th>';\n\t\t\t\t$html .= '<th>&hellip;</th>';\n\t\t\t\t$html .= '<td>&#xA0;</td>';\n\t\t\t\t$html .= '</tbody>';\n\t\t\t}\n\n\t\t\tforeach($blocks as $change) {\n\t\t\t\t$html .= '<tbody class=\"Change'.ucfirst($change['tag']).'\">';\n\t\t\t\t// Added lines only on the right side\n\t\t\t\tif($change['tag'] == 'insert') {\n\t\t\t\t\tforeach($change['changed']['lines'] as $no => $line) {\n\t\t\t\t\t\t$html .= '<tr>';\n\t\t\t\t\t\t$html .= '<td class=\"Right\"><ins>'.$line.'</ins>&#xA0;</td>';\n\t\t\t\t\t\t$html .= '</tr>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Show deleted lines only on the left side\n\t\t\t\telse if($change['tag'] == 'delete') {\n\t\t\t\t\tforeach($change['base']['lines'] as $no => $line) {\n\t\t\t\t\t\t$html .= '<tr>';\n\t\t\t\t\t\t$html .= '<td class=\"Left\"><del>'.$line.'</del>&#xA0;</td>';\n\t\t\t\t\t\t$html .= '</tr>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Show modified lines on both sides\n\t\t\t\telse if($change['tag'] == 'replace') {\n\t\t\t\t\tforeach($change['base']['lines'] as $no => $line) {\n\t\t\t\t\t\t$html .= '<tr>';\n\t\t\t\t\t\t$html .= '<td class=\"Left\"><span>'.$line.'</span></td>';\n\t\t\t\t\t\t$html .= '</tr>';\n\t\t\t\t\t}\n\n\t\t\t\t\tforeach($change['changed']['lines'] as $no => $line) {\n\t\t\t\t\t\t$html .= '<tr>';\n\t\t\t\t\t\t$html .= '<td class=\"Right\"><span>'.$line.'</span></td>';\n\t\t\t\t\t\t$html .= '</tr>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$html .= '</tbody>';\n\t\t\t}\n\t\t}\n\t\t$html .= '</table>';\n\t\treturn $html;\n\t}", "function html_desc($repo, $proj) {\n\n // Check if the git repo has a description file\n if(file_exists(\"$repo/.git/description\")){\n $desc = short_desc(file_get_contents(\"$repo/.git/description\"));\n }else{\n $desc = \"No description\";\n }\n $owner = get_file_owner($repo);\n $last = get_last($repo);\n $git_clone_url = 'http://'.$_SERVER['HTTP_HOST'].'/git/'.$proj;\n \n echo \"<table>\";\n echo \"<tr><td>description</td><td>$desc</td></tr>\";\n echo \"<tr><td>owner</td><td>$owner</td></tr>\";\n echo \"<tr><td>last change</td><td>$last</td></tr>\";\n echo \"<tr><td>URL</td><td>$git_clone_url</td></tr>\";\n echo \"</table>\";\n}", "public function theme_page()\n\t{\n\t\t$repository = $this->git_repository();\n\n\t\texec( 'cd ' . $this->theme_dir . '; git log --no-merges --decorate=full -n 20 ', $output );\n\n\t\t$formatted = '';\n\t\t$commit = array();\n\n\t\tforeach( $output as $line )\n\t\t{\n\t\t\tif ( preg_match( '/^commit ([^ ]+)/', $line, $matches ) )\n\t\t\t{\n\t\t\t\tif ( $commit )\n\t\t\t\t{\n\t\t\t\t\t$formatted .= $this->output_commit( $commit );\n\t\t\t\t}//end if\n\n\t\t\t\t$commit = array(\n\t\t\t\t\t'commit' => $matches[1],\n\t\t\t\t\t'repository' => $repository,\n\t\t\t\t);\n\t\t\t}//end if\n\t\t\telseif ( preg_match( '/^Author: ([^<]+)/', $line, $matches ) )\n\t\t\t{\n\t\t\t\t$commit['author'] = trim( $matches[1] );\n\t\t\t}//end elseif\n\t\t\telseif ( preg_match( '/^Date: (.+)$/', $line, $matches ) )\n\t\t\t{\n\t\t\t\t$commit['date'] = $matches[1];\n\t\t\t}//end elseif\n\t\t\telseif ( preg_match( '/^Merge: (.+)$/', $line, $matches ) )\n\t\t\t{\n\t\t\t\t$commit['merge'] = $matches[1];\n\t\t\t}//end elseif\n\t\t\telse\n\t\t\t{\n\t\t\t\t$commit['body'] .= $line . \"\\n\";\n\t\t\t}//end else\n\t\t}//end foreach\n\n\t\t$formatted .= $this->output_commit( $commit );\n\n\t\t?>\n\t\t<div class=\"wrap go-git\">\n\t\t\t<?php screen_icon('options-general'); ?>\n\t\t\t<h2>Theme Git Info</h2>\n\t\t\t<div class=\"current-branch\">\n\t\t\t\t<h3>Branch: <span class=\"branch\"><?php echo $this->git_working_branch(); ?></span> on <a href=\"https://github.com/<?php echo $repository; ?>\"><?php echo $repository; ?></a></h3>\n\t\t\t\t<div class=\"status\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$statuses = $this->git_working_branch_status();\n\n\t\t\t\t\t\t$final_status = '';\n\t\t\t\t\t\tforeach ( $statuses as $remote => $status )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( ! $status['behind'] && ! $status['ahead'] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}//end if\n\n\t\t\t\t\t\t\tif ( $status['behind'] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$final_status .= $status['behind'] . ' commit' . ($status['behind'] > 1 ? 's' : '') . ' behind ' . $remote . '. ';\n\t\t\t\t\t\t\t}//end if\n\n\t\t\t\t\t\t\tif ( $status['ahead'] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$final_status .= $status['ahead'] . ' commit' . ($status['ahead'] > 1 ? 's' : '') . ' ahead of ' . $remote . '. ';\n\t\t\t\t\t\t\t}//end if\n\t\t\t\t\t\t}//end foreach\n\n\t\t\t\t\t\tif ( ! $final_status )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$final_status = 'This branch is in sync with all of its remotes.';\n\t\t\t\t\t\t}//end if\n\n\t\t\t\t\t\techo $final_status;\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php echo $formatted; ?>\n\t\t</div>\n\t\t<?php\n\t}", "protected function generateDiffContent($fileName) {\n\t\t$localLangDiff = NULL;\n\t\t$metaDiff = NULL;\n\t\t// set backup file\n\t\t$metaArray = $this->backupService->getBackupObj()->getMetaInfos(3);\n\t\t$informations = array(\n\t\t\t'absPath' => Typo3Lib::fixFilePath(\n\t\t\t\tPATH_site . '/' .\n\t\t\t\t$metaArray[$fileName]['pathBackup']\n\t\t\t),\n\t\t\t'relFile' => $fileName,\n\t\t);\n\t\t$this->backupService->getBackupObj()->setVar($informations);\n\n\t\t// exec diff\n\t\t// read original file\n\t\t$this->configurationService->initFileObject(\n\t\t\t$this->backupService->getBackupObj()->getVar('langFile'),\n\t\t\tTypo3Lib::fixFilePath(PATH_site . '/' . $this->backupService->getBackupObj()->getVar('extPath'))\n\t\t);\n\n\t\t// read backup file\n\t\t$this->backupService->getBackupObj()->readFile();\n\n\t\t// get language data\n\t\t$originalLocalLang = $this->configurationService->getFileObj()->getLocalLangData();\n\t\t$backupLocalLang = $this->backupService->getBackupObj()->getLocalLangData();\n\n\t\t// get meta data\n\t\t$origMeta = $this->configurationService->getFileObj()->getMetaData();\n\t\t$backupMeta = $this->backupService->getBackupObj()->getMetaData();\n\n\t\tSgLib::fixMetaAttributes($origMeta);\n\t\tunset($originalLocalLang['trans-unit']);\n\t\t$localLangDiff = Functions::getBackupDiff(0, $originalLocalLang, $backupLocalLang);\n\t\t$metaDiff = Functions::getMetaDiff(0, $origMeta, $backupMeta);\n\n\t\t// generate diff\n\t\tif (count($localLangDiff)) {\n\t\t\t$this->outputManageBackupsDiff(\n\t\t\t\t$localLangDiff, $metaDiff, $originalLocalLang, $backupLocalLang,\n\t\t\t\t$this->configurationService->getFileObj()->getOriginLangData(),\n\t\t\t\t$this->backupService->getBackupObj()->getOriginLangData(),\n\t\t\t\t$origMeta, $backupMeta\n\t\t\t);\n\t\t}\n\t}", "private function getLastCommitMessage()\n {\n // hash\n // subject\n // body\n $process = new Process('git log -1 --format=\"%h%n%s%n%b\"');\n $process->run();\n\n return \\trim($process->getOutput());\n }", "private function renderDiff($lines1, $lines2): string\n {\n if (!is_array($lines1)) {\n $lines1 = explode(\"\\n\", $lines1);\n }\n if (!is_array($lines2)) {\n $lines2 = explode(\"\\n\", $lines2);\n }\n foreach ($lines1 as $i => $line) {\n $lines1[$i] = rtrim($line, \"\\r\\n\");\n }\n foreach ($lines2 as $i => $line) {\n $lines2[$i] = rtrim($line, \"\\r\\n\");\n }\n\n $renderer = new DiffRendererHtmlInline();\n $diff = new Diff($lines1, $lines2);\n\n return $diff->render($renderer);\n }", "private function showDiffStyle() {\n\t\t$this->getOutput()->addModuleStyles( 'mediawiki.action.history.diff' );\n\t}", "public function git_log($options=\"\")\n\t\t{\n\t\t\t$cmd=\"git log \".$options;\n\t\t\t//$last_line=system ($cmd , $retval);\n\t\t\t$last_line=exec ($cmd , $output , $retval);\n\t\t\tcheck_error($cmd,$retval);\n\t\t\tout_table($output);\n\t\t}", "public function render() {\n\t\t$logs = $this->logger->get_logs();\n\t\tforeach ( $logs as $log_id => $gist ) {\n\t\t\techo '<div class=\"b6go-gist-debug\">';\n\t\t\tforeach ( $gist as $entry ) {\n\t\t\t\t// Don't wpautop tabular data, as it adds <br> between line number spans.\n\t\t\t\techo ( false === strpos( $entry['message'], '<table' ) ) ? wpautop ( $entry['message'] ) : $entry['message'];\n\t\t\t}\n\t\t\techo '</div>';\n\t\t}\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t.b6go-gist-debug { margin: 2em 0; padding: 10px; background: #e8e8e8;}\n\t\t#querylist .b6go-gist-debug .gist .gist-file .gist-data .line_data pre {\n\t\t\toverflow: auto;\n\t\t\tword-wrap: normal;\n\t\t\t-moz-tab-size: 4;\n\t\t\t-o-tab-size: 4;\n\t\t\ttab-size: 4;}\n\t\t.b6go-gist-debug .gist .gist-file .gist-data .line_numbers span {font-size: 12px;}\n\t\t#querylist .b6go-gist-debug h2 {border: 0; float: none; font-size: 22px; text-align: left; margin: 0 !important; padding-left: 0;}\n\t\t</style>\n\t\t<?php\n\t}", "function git_commit($repo, $cid) {\n $out = array();\n $commit = array();\n\n if (strlen($cid) <= 0) {\n return 0;\n }\n exec(\"GIT_DIR=$repo/.git git rev-list --header --max-count=1 $cid\", $out);\n\n\n if (!empty($out)) {\n\n $commit[\"commit_id\"] = $out[0];\n\n\n $g = explode(\" \", $out[1]);\n\n $commit[\"tree\"] = $g[1];\n\n\n\n\n $g = explode(\" \", $out[2]);\n $commit[\"parent\"] = $g[1];\n\n\n\n\n $g = explode(\" \", $out[3]);\n\n if (isset($g[3])) {\n\n\n // $commit['author'] = $g[1].' '.$g[2];\n /* variable number of strings for the name */\n /*\n for ($i = 0; $g[$i][0] != '<' && $i < 5; $i++) {\n // $commit[\"author\"] = $g[1];\n\n $commit[\"author\"] = \" $g[$i] \";\n }\n */\n\n for ($i = 1; $g[$i][0] != '<' && $i < 5; $i++) {\n\n\n $commit[\"author\"] = $g[1];\n $commit[\"author\"] .= ' ' . $g[2];\n // $commit[\"author\"] = \"\";\n // $commit[\"author\"] .= \" $g[$i] \";\n }\n\n // $commit['author'] = $g[1].' '.$g[2];\n\n\n\n /* add the email */\n\n $commit[\"date\"] = \"{$g[++$i]} {$g[++$i]}\";\n // $commit[\"date\"] = $g[5];s\n $commit[\"message\"] = \"\";\n $size = count($out);\n\n\n\n for (; $i < $size - 1; $i++) {\n $commit[\"message\"] .= $out[$i];\n }\n return $commit;\n }\n }\n}", "function logAllToRevision($log)\n{\n $revisions = array();\n if ($log != \"\" && preg_match_all('/commit\\s+(\\w{40})\\n/i', $log, $matches)) {\n $data = preg_split('/commit\\s+\\w{40}\\n/i', $log);\n foreach ($matches[1] as $k => $match) {\n preg_match('/Author:\\s+([^\\n]+)\\n/i', $data[$k + 1], $author);\n if (isset($author[1])) {\n $author = htmlentities($author[1]);\n $data[$k + 1] = preg_replace('/Author:\\s+[^\\n]+\\n/i', '', $data[$k + 1]);\n } else $author = '';\n\n preg_match('/Date:\\s+([^\\n]+)\\n/i', $data[$k + 1], $date);\n if (isset($date[1])) {\n $date = $date[1];\n $data[$k + 1] = preg_replace('/Date:\\s+[^\\n]+\\n/i', '', $data[$k + 1]);\n } else $date = '';\n\n $comment = trim($data[$k + 1]);\n\n $revisions[$match] = array(\n 'hash' => $match,\n 'author' => $author,\n 'date' => $date, //date('Y-m-d H:i:s', strtotime($date))\n 'comment' => $comment\n );\n }\n }\n return $revisions;\n}", "function git_ls_tree($repo, $tree) {\n $ary = array();\n\n $out = array();\n //Have to strip the \\t between hash and file\n exec(\"GIT_DIR=$repo/.git git ls-tree $tree | sed -e 's/\\t/ /g'\", $out);\n\n foreach ($out as $line) {\n $entry = array();\n $arr = explode(\" \", $line);\n $entry['perm'] = $arr[0];\n $entry['type'] = $arr[1];\n $entry['hash'] = $arr[2];\n $entry['file'] = $arr[3];\n $ary[] = $entry;\n }\n return $ary;\n}", "private function getUnifiedDiff() {\n\t\t$currentText = $this->toEditText( $this->getCurrentContent() );\n\t\t$yourText = $this->textbox1;\n\n\t\t$currentLines = explode( \"\\n\", $currentText );\n\t\t$yourLines = explode( \"\\n\", str_replace( \"\\r\\n\", \"\\n\", $yourText ) );\n\n\t\treturn $this->getLineBasedUnifiedDiff( $currentLines, $yourLines );\n\t}", "function _versioncontrol_git_log_parse_commits($repository, &$logs, &$branches_per_commit, &$existing_revs) {\n // If the log was retrieved by taking the return value of exec(), we've\n // got an array and navigate it via next(). If we stored the log in a\n // temporary file, $logs is a file handle that we need to fgets() instead.\n $root_path = $repository['root'];\n $line = next($logs); // Get Revision\n $merge = FALSE;\n // $line already points to the revision\n $revision = trim($line);\n foreach ($branches_per_commit[$revision] as $label) {\n $existing_revs[$label['name']][$revision] = TRUE;\n }\n\n $adjusted_commit = _versioncontrol_git_check_already_parsed_commits($repository,\n $revision, $branches_per_commit, $line, $logs);\n if ($adjusted_commit) {\n return;\n }\n\n $line = next($logs); // Get $parents\n $parents = explode(\" \", trim($line));\n if ($parents[0] == '') {\n $parents = array();\n }\n if (isset($parents[1])) {\n $merge = TRUE;\n }\n $line = next($logs); // Get Author\n $username = trim($line);\n $line = next($logs); // Get Date as Timestamp\n $date = trim($line);\n // Get revision message.\n $message = '';\n $i = 0;\n while (($line = next($logs)) !== FALSE) {\n $line = trim($line);\n if ($line == 'ENDOFOUTPUTGITMESSAGEHERE') {\n if (substr($message, -2) === \"\\n\\n\") {\n $message = substr($message, 0, strlen($message) - 1);\n }\n break;\n }\n if ($i == 1) {\n $message .= \"\\n\";\n }\n $message .= $line .\"\\n\";\n $i++;\n }\n $line = next($logs); // Points to either the next entry or the first items modified or to the file actions\n // Get the items\n $op_items = _versioncontrol_git_parse_items($repository, $logs, $line, $revision,\n $branches_per_commit, $parents, $merge);\n\n _versioncontrol_git_insert_commit($repository, $date, $username,\n $message, $revision, $branches_per_commit[$revision], $op_items);\n}", "public function fetchCommit(string $hash) : string\n {\n $extensions = $this->extensionInDiff;\n\n if($returned = shell_exec($this->makeCmd(\"show $hash\" . ' ' . \"'$extensions'\"))) {\n return $returned;\n } else {\n throw new \\RuntimeException(\"No data for commit $hash\", 404);\n }\n }", "function chunk($ch, $str) {\n print($str);\n ob_flush();\n flush();\n return strlen($str);\n}", "function handle_commit_command($command) {\n $output = '';\n $ref = $this->checkAndGet($command, 'ref');\n $mark = $this->checkAndGet($command, 'mark', FALSE);\n $author = $this->checkAndGetAuthor($command, 'author', FALSE);\n $committer = $this->checkAndGetAuthor($command, 'committer');\n $message = $this->checkAndGet($command, 'message');\n $from = $this->checkAndGet($command, 'from', FALSE);\n $merge = $this->checkAndGet($command, 'merge', FALSE);\n $ops = $this->checkAndGet($command, 'operations', FALSE);\n\n $output .= sprintf(\"commit %s\\n\", $ref);\n $output .= $this->handleMark($mark);\n if (!empty($author)) {\n $output .= $this->handleAuthor('author', $author);\n }\n $output .= $this->handleAuthor('committer', $committer);\n $output .= $this->handleData($message);\n if (!empty($from)) {\n $output .= sprintf(\"from %s\\n\", $from);\n }\n\n if ($merge) {\n foreach ($merge as $id) {\n $output .= sprintf(\"merge %s\\n\", $id);\n }\n }\n foreach ($ops as $op) {\n $output .= $this->handleOperation($op);\n }\n // not necessary in newer versions of git.\n $output .= \"\\n\";\n\n return $output;\n }", "public function output()\n\t{\n\t\t$this->do_tags();\n\n\t\t$this->final_output = '';\n\n\t\tforeach ($this->merged as $block)\n\t\t{\n\t\t\t$this->final_output .= $block;\n\t\t}\n\n\t\t$this->last_file = '';\n\t\t$this->values = array();\n\t\t$this->files = array();\n\t\t$this->merged = array();\n\n\t\t// the final template all put together\n\t\treturn $this->final_output;\n\t}", "public function add($chunk, $fileInfo = null, $index = 0, $mapLines = null){\n\n //ignore adding empty strings\n if( $chunk === '' ){\n return;\n }\n\n\n $sourceLines = array();\n $sourceColumns = ' ';\n\n\n if( $fileInfo ){\n\n $url = $fileInfo['currentUri'];\n\n if( isset($this->contentsMap[$url]) ){\n $inputSource = substr($this->contentsMap[$url], 0, $index);\n $sourceLines = explode(\"\\n\", $inputSource);\n $sourceColumns = end($sourceLines);\n }else{\n throw new Exception('Filename '.$url.' not in contentsMap');\n }\n\n }\n\n $lines = explode(\"\\n\", $chunk);\n $columns = end($lines);\n\n if($fileInfo){\n\n if(!$mapLines){\n $this->generator->addMapping(\n $this->lineNumber + 1,\t\t\t\t\t// generated_line\n $this->column,\t\t\t\t\t\t\t// generated_column\n count($sourceLines),\t\t\t\t\t// original_line\n strlen($sourceColumns),\t\t\t\t\t// original_column\n $fileInfo\n );\n }else{\n for($i = 0, $count = count($lines); $i < $count; $i++){\n $this->generator->addMapping(\n $this->lineNumber + $i + 1,\t\t\t\t// generated_line\n $i === 0 ? $this->column : 0,\t\t\t// generated_column\n count($sourceLines) + $i,\t\t\t\t// original_line\n $i === 0 ? strlen($sourceColumns) : 0, \t// original_column\n $fileInfo\n );\n }\n }\n }\n\n if(count($lines) === 1){\n $this->column += strlen($columns);\n }else{\n $this->lineNumber += count($lines) - 1;\n $this->column = strlen($columns);\n }\n\n // add only chunk\n parent::add($chunk);\n }", "function _btr_project_diff_get_drush_command() {\n return array(\n 'description' => \"Get the content of the specified diff.\",\n 'arguments' => array(\n 'origin' => 'The origin of the project.',\n 'project' => 'The name of the project',\n 'lng' => 'The language of translations.',\n 'nr' => 'The number of diff to be returned (as returned by btr-project-diff-ls).',\n ),\n 'options' => array(\n 'format' => 'The diff format: \\'diff\\' or \\'ediff\\' (default \\'diff\\').',\n 'output' => 'The file where to save the output.'\n ),\n 'examples' => array(\n 'drush btrp-diff-get KDE kdeedu sq 1 > test.diff' => '',\n 'drush btrp-diff-get KDE kdeedu sq 2 --output=/tmp/test.ediff --format=ediff' => '',\n ),\n 'aliases' => array('btrp-diff-get'),\n );\n}", "protected function removeLineFromChunk(&$line, &$chunk, $chunkSize) {\n\t\t\n\t\t$qty = 0;\n\t\t$chunkLines = explode(\"\\n\", $chunk);\n\t\t\n\t\tforeach($chunkLines as $key => $chunkLine) {\n\n\t\t\t$x = 1;\n\t\t\tif($key === 0 && strlen($chunk) >= $chunkSize) continue; // skip first line since it’s likely a partial line\n\n\t\t\t// check if line appears in this chunk line\n\t\t\tif(strpos($chunkLine, $line) === false) continue;\n\t\t\t\n\t\t\t// check if line also indicates a previous quantity that we should add to our quantity\n\t\t\tif(strpos($chunkLine, ' ^+') !== false) {\n\t\t\t\tlist($chunkLine, $n) = explode(' ^+', $chunkLine, 2); \n\t\t\t\tif(ctype_digit($n)) $x += (int) $n;\n\t\t\t}\n\t\t\t\n\t\t\t// verify that these are the same line\n\t\t\tif(strpos(trim($chunkLine) . \"\\n\", trim($line) . \"\\n\") === false) continue; \n\t\t\t\n\t\t\t// remove the line\n\t\t\tunset($chunkLines[$key]);\n\t\t\n\t\t\t// update the quantity\n\t\t\t$qty += $x;\n\t\t}\n\t\t\n\t\tif($qty) {\n\t\t\t// append quantity to line, i.e. “^+2” indicating 2 more indentical lines were above\n\t\t\t$chunk = implode(\"\\n\", array_values($chunkLines));\n\t\t\t$line .= \" ^+$qty\";\n\t\t}\n\t}", "public function commit() {\n $repo = Repo::getById($this->repoId);\n\n $commit = $repo->getCommitInformation($this->commit);\n $commit->avatar = $commit->user ? $commit->user->getProfileData('avatar') : null;\n $commit->formattedDate = date(Lang::get('main.date-format'), $commit->date);\n\n $diff = $repo->getDiff($commit->parent ? $commit->hash . '^1' : '', $commit->hash);\n\n $this->addJavaScript($this->getPlugin()->getJsUrl('commit-diff.js'));\n $this->addCss('//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/monokai-sublime.min.css');\n\n $content = View::make($this->getPlugin()->getView('commits/commit.tpl'), array(\n 'repo' => $repo,\n 'commit' => $commit,\n 'diff' => $diff,\n ));\n\n return RepoController::getInstance(array(\n 'repoId' => $this->repoId\n ))\n ->display('commits', $content, Lang::get($this->_plugin . '.repo-commit-title', array(\n 'commit' => $commit->shortHash,\n 'repo' => $repo->name\n )));\n }", "public static function decodeChunked($buffer)\n {\n // length := 0\n $length = 0;\n $new = '';\n\n // read chunk-size, chunk-extension (if any) and crlf\n // get the position of the linebreak\n $chunkEnd = strpos($buffer, \"\\r\\n\") + 2;\n $temp = substr($buffer, 0, $chunkEnd);\n $chunkSize = hexdec(trim($temp));\n $chunkStart = $chunkEnd;\n while ($chunkSize > 0) {\n $chunkEnd = strpos($buffer, \"\\r\\n\", $chunkStart + $chunkSize);\n\n // just in case we got a broken connection\n if ($chunkEnd == false) {\n $chunk = substr($buffer, $chunkStart);\n // append chunk-data to entity-body\n $new .= $chunk;\n $length += strlen($chunk);\n break;\n }\n\n // read chunk-data and crlf\n $chunk = substr($buffer, $chunkStart, $chunkEnd - $chunkStart);\n // append chunk-data to entity-body\n $new .= $chunk;\n // length := length + chunk-size\n $length += strlen($chunk);\n // read chunk-size and crlf\n $chunkStart = $chunkEnd + 2;\n\n $chunkEnd = strpos($buffer, \"\\r\\n\", $chunkStart) + 2;\n if ($chunkEnd == false) {\n break; //just in case we got a broken connection\n }\n $temp = substr($buffer, $chunkStart, $chunkEnd - $chunkStart);\n $chunkSize = hexdec(trim($temp));\n $chunkStart = $chunkEnd;\n }\n\n return $new;\n }", "public function diff()\n {\n $type = strtolower($this->getType());\n if (in_array($type, ['jpg', 'gif', 'png', 'exe'])) {\n return false;\n }\n\n if ($this->operation === self::OP_OVERWRITE) {\n return $this->renderDiff(file($this->path), $this->content);\n }\n\n return '';\n }", "public function get_modified_content() {\n // First of all, get the contents\n $content = $this->get_content();\n\n $ast = $this->ast ?? null;\n\n // Check if has any traverser instruction\n if (!empty($this->node_instructions)) {\n // Prepare the traverser\n $this->apply_node_instructions();\n }\n\n // Check if any traverser was created\n if (!empty($this->traverser)) {\n // Let the traverser perform\n $ast = $this->traverser->traverse($this->get_ast());\n }\n\n // Check if the AST was created\n if (!empty($ast)) {\n // Convert it back to PHP\n $pretty_printer = new \\PhpParser\\PrettyPrinter\\Standard();\n $content = $pretty_printer->printFormatPreserving($ast, $this->ast, $this->tokens);\n\n // Fix some buggy issues with the format preserving\n $content = preg_replace(\"/(function .+?)\\n.+\\{/m\", '$1 {', $content);\n }\n\n return $content;\n }", "protected function getChunk($chunkNum = 1, $chunkSize = 0, $reverse = true, $clean = true) {\n\n\t\tif($chunkSize < 1) $chunkSize = $this->chunkSize;\n\t\n\t\tif($reverse) {\n\t\t\t$offset = -1 * ($chunkSize * $chunkNum);\n\t\t} else {\n\t\t\t$offset = $chunkSize * ($chunkNum-1);\n\t\t}\n\t\t\n\t\tif(self::debug) {\n\t\t\t$this->message(\"chunkNum=$chunkNum, chunkSize=$chunkSize, offset=$offset, filesize=\" . filesize($this->logFilename));\n\t\t}\n\t\t\n\t\t$data = '';\n\t\t$totalChunks = $this->getTotalChunks($chunkSize); \n\t\tif($chunkNum > $totalChunks) return $data; \n\n\t\tif(!$fp = fopen($this->logFilename, \"r\")) return $data;\n\t\t\n\t\tfseek($fp, $offset, ($reverse ? SEEK_END : SEEK_SET));\n\n\t\tif($clean) {\n\t\t\t// make chunk include up to beginning of first line\n\t\t\tfseek($fp, -1, SEEK_CUR);\n\t\t\twhile(ftell($fp) > 0) {\n\t\t\t\t$chr = fread($fp, 1);\n\t\t\t\tif($chr == \"\\n\") break;\n\t\t\t\tfseek($fp, -2, SEEK_CUR);\n\t\t\t\t$data = $chr . $data;\n\t\t\t}\n\t\t\tfseek($fp, $offset, ($reverse ? SEEK_END : SEEK_SET));\n\t\t}\n\t\t\n\t\t// get the big part of the chunk\n\t\t$data .= fread($fp, $chunkSize);\n\n\t\tif($clean) {\n\t\t\t// remove last partial line\n\t\t\t$pos = strrpos($data, \"\\n\");\n\t\t\tif($pos) $data = substr($data, 0, $pos);\n\t\t}\n\n\t\tfclose($fp); \n\t\t\n\t\treturn $data;\n\t}", "public function testSuccessfulExecute()\n {\n $executor = new CommandExecutor(\n new ShellCommandBuilder(new UnixEnvironment()),\n '/usr/bin/git',\n '.'\n );\n\n $output = $executor->execute(array(\n 'log',\n '--reverse',\n '--format=fuller'\n ));\n\n\n $logLines = $output->getStdOutLines();\n $this->assertEquals(\n 'commit 6f1ed5364b1369b618270b2774f6ec86f77fa213',\n $logLines[0]\n );\n }", "function diff2( $page1, $page2 ) {\n\t\t$page1 = split( \"\\n\", $page1 );\n\t\t$page2 = split( \"\\n\", $page2 );\n\t\t$z = new WikiDiff( $page1, $page2 );\n\t\tif( $z->isEmpty() ) {\n\t\t\t$html = '<hr /><br />['.tra(\"Versions are identical\").']<br /><br />';\n\t\t} else {\n\t\t\t//$fmt = new WikiDiffFormatter;\n\t\t\t$fmt = new WikiUnifiedDiffFormatter;\n\t\t\t$html = $fmt->format( $z, $page1 );\n\t\t}\n\t\treturn $html;\n\t}", "function process_matches(&$output, &$match)\n\t{\n\t\tif (sizeof($match) > 0)\n\t\t{\n\t\t\t$data = implode(\"\\n\", $match);\n\t\t\tarray_unshift($output, new vB_Text_Diff_Entry($data, $data));\n\t\t}\n\n\t\t$match = array();\n\t}", "public function get_output_content();", "function getRevisiondifference($from_text, $to_text)\n{\n // limit input\n if (!empty($from_text) && is_string($from_text)) {\n $from_text = substr($from_text, 0, 1024 * 100);\n } else {\n return false;\n }\n if (!empty($to_text) && is_string($to_text)) {\n $to_text = substr($to_text, 0, 1024 * 100);\n } else {\n return false;\n }\n $granularity = 2; // 0: Paragraph/lines, 1: Sentence, 2: Word, 3: Character\n $granularityStacks = array(\n FineDiff::$paragraphGranularity,\n FineDiff::$sentenceGranularity,\n FineDiff::$wordGranularity,\n FineDiff::$characterGranularity\n );\n $diff_opcodes = FineDiff::getDiffOpcodes($from_text, $to_text, $granularityStacks[$granularity]);\n $difference = FineDiff::renderDiffToHTMLFromOpcodes($from_text, $diff_opcodes);\n return $difference;\n}", "public function show_changed_files() {\r\n\t\tcheck_admin_referer('plugin-name-action_wpidenonce'); \r\n\t\tif ( !is_super_admin() )\r\n\t\t\twp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');\r\n\t\t\r\n error_reporting(E_ALL);\r\n ini_set(\"display_errors\", 1);\r\n \r\n require_once('git/autoload.php.dist');\r\n //use TQ\\Git\\Cli\\Binary;\r\n //use TQ\\Git\\Repository\\Repository;\r\n \r\n $root = apply_filters( 'wpide_filesystem_root', WP_CONTENT_DIR ) . \"/\"; \r\n \r\n //check repo path entered or die\r\n if ( !strlen($_POST['gitpath']) ) \r\n die(\"Error: Path to your git repository is required!\");\r\n \r\n \r\n $repo_path = $root . sanitize_text_field( $_POST['gitpath'] );\r\n $gitbinary = sanitize_text_field( stripslashes($_POST['gitbinary']) );\r\n \r\n if ( $gitbinary===\"I'll guess..\" ){ //the binary path\r\n \r\n $thebinary = TQ\\Git\\Cli\\Binary::locateBinary();\r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $thebinary ) );\r\n \r\n }else{\r\n \r\n $git = TQ\\Git\\Repository\\Repository::open($repo_path, new TQ\\Git\\Cli\\Binary( $_POST['gitbinary'] ) );\r\n \r\n }\r\n\r\n //echo branch\r\n $branch = $git->getCurrentBranch();\r\n echo \"<p><strong>Current branch:</strong> \" . $branch . \"</p>\";\r\n \r\n // [0] => Array\r\n //(\r\n // [file] => WPide.php\r\n // [x] => \r\n // [y] => M\r\n // [renamed] => \r\n //)\r\n $status = $git->getStatus();\r\n $i=0;//row counter\r\n if ( count($status) ){\r\n \r\n //echo out rows of staged files \r\n foreach ($status as $item){\r\n echo \"<div class='gitfilerow \". ($i % 2 != 0 ? \"light\" : \"\") .\"'><span class='filename'>{$item['file']}</span> <input type='checkbox' name='\". str_replace(\"=\", '_', base64_encode($item['file']) ) .\"' value='\". base64_encode($item['file']) .\"' checked /> \r\n <a href='\". base64_encode($item['file']) .\"' class='viewdiff'>[view diff]</a> <div class='gitdivdiff \". str_replace(\"=\", '_', base64_encode($item['file']) ) .\"'></div> </div>\";\r\n $i++;\r\n }\r\n }else{\r\n echo \"<p class='red'>No changed files in this repo so nothing to commit.</p>\";\r\n }\r\n \r\n //output the commit message box\r\n echo \"<div id='gitdivcommit'><label>Commit message</label><br /><input type='text' id='gitmessage' name='message' class='message' />\r\n <p><a href='#' class='button-primary'>Commit the staged chanages</a></p></div>\";\r\n \r\n //echo $thebinary;\r\n \r\n //$git = Repository::open($repo_path, new Binary('/var/www/siddtes/wpsites.co.uk/git') );\r\n //echo $git->getFileCreationMode().\" ----- \";\r\n // get status of working directory\r\n //$branch = $git->getCurrentBranch();\r\n //echo \"current branch: \" . $branch;\r\n \r\n \r\n //print_r($_POST);\r\n \r\n\t\tdie(); // this is required to return a proper result\r\n\t}", "function _btr_project_diff_get_drush_help() {\n return dt(\"Get the content of the specified diff.\");\n}", "private function do_commit_post()\n {\n // so will re-run 'porcelain' to get a list of files. We'll only 'git add'\n // any files supplied by the user that are in the list we get from porcelain\n // we'll then go ahead and commit them with the message supplied\n require_once 'Git-php-lib';\n $repo = Git::open('.');\n $status = $repo->porcelain();\n $git_files = array();\n foreach($status as $item) {\n $git_files[$item['file']] = $item['y'];\n }\n\n $to_add = array();\n $to_rm = array();\n foreach($_REQUEST['file'] as $requested_file) {\n if(array_key_exists($requested_file, $git_files)) {\n if($git_files[$requested_file] == 'D') {\n $to_rm[] = $requested_file;\n } else {\n $to_add[] = $requested_file;\n }\n }\n }\n\n $add_output = '';\n if(count($to_add) > 0) {\n try {\n $add_output = $repo->add($to_add);\n }\n catch(Exception $e) {\n $add_output = 'Failed to run git-add: ' . $e->getMessage();\n }\n }\n #$add_output = preg_replace('/\\r?\\n\\r?/', \"<br>\\n\", $add_output);\n if(count($to_rm) > 0) {\n $rm_output = '';\n try {\n $rm_output = $repo->rm($to_rm);\n }\n catch(Exception $e) {\n $rm_output = 'Failed to run git-rm: ' . $e->getMessage();\n }\n }\n\n $commit_output = '';\n try {\n $commit_output = $repo->commit($_REQUEST['message'], false);\n }\n catch(Exception $e) {\n $commit_output = 'Failed to run git-commit: ' . $e->getMessage();\n }\n #$commit_output = preg_replace('/\\r?\\n\\r?/', \"<br>\\n\", $add_output);\n\n if(file_exists('./plugins/pico_edit/commitresponse.html')) {\n $loader = new Twig_Loader_Filesystem('./plugins/pico_edit');\n $twig = new Twig_Environment($loader, array('cache' => null));\n $twig->addExtension(new Twig_Extension_Debug());\n $twig_vars = array(\n 'add' => $add_output,\n 'rm' => $rm_output,\n 'commit' => $commit_output,\n );\n $content = $twig->render('commitresponse.html', $twig_vars);\n die($content);\n } else {\n die('Sorry, commitresponse.html was not found in the backend plugin. This is an installation problem.');\n }\n }", "public function getCountForGit($response = array()) {\n if ($response['code'] == 200 && !empty($response['body'])) {\n foreach ($response['body'] as $key => $val) {\n if ($val['author']['login'] === $this->contributer) {\n self::$finalCount += $val['total'];\n }\n }\n return \"Total Number Of Commits by $this->contributer: \" . self::$finalCount . \" \\n\";\n } else if ($response['code'] == 202) {\n return \"GIT is building the result for request . Try after few seconds.\\n\";\n } else {\n if (isset($response['body']['message']) && $response['body']['message'] != '') {\n return $response['body']['message'] . \"\\n\";\n }\n return \"Unable to Find Count !\\n\";\n }\n }", "protected function getGitCommand(): string\n {\n return 'diff-tree'\n . ' --diff-algorithm=myers'\n . ' --no-ext-diff'\n . ' --no-commit-id'\n . ' --name-only'\n . ' -r'\n . (!empty($this->filter) ? ' --diff-filter=' . implode('', $this->filter) : '')\n . ' ' . $this->getVersionsToCompare();\n }", "protected function getGitRevision()\n {\n chdir(PATH_site);\n $revision = trim(CommandUtility::exec('git describe'));\n chdir(PATH_typo3);\n return [\n htmlspecialchars('Site Version'),\n htmlspecialchars($revision),\n 'sysinfo-git',\n ];\n }", "public function format(Diff $diff);", "function skin_diff_export_overview( $content, $missing, $changed, $title, $date ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<html>\n <head>\n <meta http-equiv=\"content-type\" content=\"text/html; charset={$this->ipsclass->vars['gb_char_set']}\" />\n <title>$title export</title>\n <style type=\"text/css\">\n BODY\n {\n \tfont-family: verdana;\n \tfont-size:11px;\n \tcolor: #000;\n \tbackground-color: #CCC;\n }\n\n del,\n .diffred\n {\n\t background-color: #D7BBC8;\n\t text-decoration:none;\n }\n\n ins,\n .diffgreen\n {\n\t background-color: #BBD0C8;\n\t text-decoration:none;\n }\n\n h1\n {\n \tfont-size: 18px;\n }\n\n h2\n {\n \tfont-size: 18px;\n }\n </style>\n </head>\n<body>\n <div style='padding:4px;border:1px solid #000;background-color:#FFF;margin:4px;'>\n <h1>$title (экспортировано: $date)</h1>\n <strong>$missing новых шаблонов и $changed измененных</strong>\n </div>\n <br />\n $content\n <br />\n <div style='padding:4px;border:1px solid #000;background-color:#FFF;margin:4px;'>\n <span class='diffred'>Удален HTML код</span> &middot; <span class='diffgreen'>Добавлен HTML код</span>\n </div>\n</body>\n<html>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function wp_get_footnotes_from_revision($revision_field, $field, $revision)\n {\n }", "function get_github_file_structure($list) {\n $result = array();\n foreach ($list as $key => $value) {\n $path_segment = explode('/', $value['path']);\n // read the \"content\" directory\n if ((count($path_segment) >= 2) && (reset($path_segment) == 'content')) {\n // debug('value', $value);\n $path_segment = array_slice($path_segment, 1);\n // debug('path_segment', $path_segment);\n if ($value['type'] == 'tree') {\n if (count($path_segment) == 1) {\n // add the directory in the first level of the repository as chapters\n $result[$path_segment[0]] = array (\n 'item' => array(),\n );\n }\n } elseif ($value['type'] == 'blob') {\n $pathinfo = pathinfo(implode('/', $path_segment));\n // debug('pathinfo', $pathinfo);\n if ($pathinfo['filename'] == 'README') {\n } else {\n // get the main chapter files\n if (count($path_segment) == 2) {\n // debug('content file path_segment', $path_segment);\n $pathinfo = pathinfo($path_segment[1]);\n // debug('pathinfo', $pathinfo);\n if ($pathinfo['extension'] == 'md') { // TODO: accept also other extensions\n $fileinfo = explode('-', $pathinfo['filename']);\n // debug('fileinfo', $fileinfo);\n $language_code = end($fileinfo);\n $key = implode('-', array_slice($fileinfo, 0, -1));\n if (strlen($language_code) == 2) {\n // debug('key', $key);\n if (array_key_exists($key, $result)) {\n $result[$key]['item'][$language_code] = $value;\n }\n }\n }\n }\n }\n\n }\n }\n }\n // debug('result', $result);\n return $result;\n}", "function show_migrate_multisite_files_progress( $current, $total ) {\n echo \"<span style='position: absolute;z-index:$current;background:#F1F1F1;'>Parsing Blog \" . $current . ' - ' . round($current / $total * 100) . \"% Complete</span>\";\n echo(str_repeat(' ', 256));\n if (@ob_get_contents()) {\n @ob_end_flush();\n }\n flush();\n}", "public function getOutputLines()\n {\n return $this->output;\n }", "function phorum_api_diff_unpatch_color($text, $diff)\n{\n $text = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $text);\n\n if (!is_array($diff))\n {\n $n = 0;\n for ($i=0; $i<strlen($diff); $i++) {\n $c = substr($diff, $i, 1);\n if ($c == \"-\") {\n $n = substr($diff, 0, $i);\n $pre = substr($text, 0, $n);\n $post = substr($text, $n);\n return $pre.\"[phorum removal]\".substr($diff, $i+1).\"[/phorum removal]\".$post;\n } elseif ($c == \"+\") {\n $n = substr($diff, 0, $i);\n $pre = substr($text, 0, $n);\n $post = substr($text, $n);\n $colored_text = substr($diff, $i+1);\n return $pre.\"[phorum addition]\".$colored_text.\"[/phorum addition]\".substr($post, strlen($diff)-$i-1);\n }\n }\n return $text;\n }\n foreach (array_reverse($diff) as $d) {\n $text = phorum_api_diff_unpatch_color($text, $d);\n }\n return $text;\n}", "public static function hash()\n {\n if (static::isClean()) {\n return static::command(\"git log --pretty=format:'%H' -n 1\");\n }\n }", "static function apply($diff, $text)\n {\n $tmpname = tempnam(sys_get_temp_dir(), \"diff\");\n $outname = tempnam(sys_get_temp_dir(), \"diff\");\n $tmp = fopen($tmpname, \"w\");\n $out = fopen($outname, \"r\");\n fwrite($tmp, $text.PHP_EOL);\n $proc = proc_open(\n 'patch '.$tmpname.' -o '.$outname, array(\n 0 => array(\"pipe\", \"r\"),\n 1 => array(\"pipe\", \"w\"),\n 2 => array(\"pipe\", \"w\")\n ), $pipes\n );\n if (is_resource($proc)) {\n fwrite($pipes[0], $diff);\n fclose($pipes[0]);\n stream_get_contents($pipes[1]);\n $newText = stream_get_contents($out);\n fclose($pipes[1]);\n return $newText;\n }\n }", "protected function buildCommitMessage($wc_path)\n\t{\n\t\t/*\n\t\t * 3. if it's In-Portal project, then:\n\t\t * - create commit message that:\n\t\t * -- Merge of \"{from_path}@{from_rev}\" to \"{to_path}@{to_rev}\".\n\t\t * -- Merge of \"in-portal/branches/5.2.x@16189\" to \"in-portal/branches/5.3.x@16188\".\n\t\t * - {from_path} to be determined from list of merged revisions\n\t\t * - {from_rev} - last changed of {from_path} by looking in repo\n\t\t * - {to_path} to be determined from working copy\n\t\t * - {to_rev} - last changed of {to_path} by looking in repo\n\t\t * 4. open interactive editor with auto-generated message\n\t\t */\n\n\t\t$merged_revisions = $this->getFreshMergedRevisions($wc_path);\n\n\t\tif ( !$merged_revisions ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$commit_message = '';\n\t\t$wc_url = $this->repositoryConnector->getWorkingCopyUrl($wc_path);\n\t\t$repository_url = $this->removePathFromURL($wc_url);\n\n\t\tforeach ( $merged_revisions as $path => $revisions ) {\n\t\t\t$merged_messages = array();\n\t\t\t$revision_log = $this->getRevisionLog($repository_url . $path);\n\t\t\t$commit_message .= 'Merging from ' . ucfirst(basename($path)) . ' to ' . ucfirst(basename($wc_url)) . PHP_EOL;\n\n\t\t\tforeach ( $revisions as $revision ) {\n\t\t\t\t$revision_data = $revision_log->getRevisionData('summary', $revision);\n\t\t\t\t$merged_messages[] = ' * r' . $revision . ': ' . $revision_data['msg'];\n\t\t\t}\n\n\t\t\t$merged_messages = array_unique(array_map('trim', $merged_messages));\n\t\t\t$commit_message .= implode(PHP_EOL, $merged_messages) . PHP_EOL;\n\t\t}\n\n\t\treturn rtrim($commit_message);\n\t}", "protected function output() {\n\t\treturn $this->before() . $this->option( 'content' ) . $this->after();\n\t}", "function wp_add_footnotes_to_revision($fields)\n {\n }", "function __getExecutableLines($content) {\n\t\tif (is_array($content)) {\n\t\t\t$manager =& CodeCoverageManager::getInstance();\n\t\t\t$result = array();\n\t\t\tforeach ($content as $file) {\n\t\t\t\t$result[$file] = $manager->__getExecutableLines(file_get_contents($file));\n\t\t\t}\n\t\t\treturn $result;\n\t\t}\n\t\t$content = h($content);\n\t\t// arrays are 0-indexed, but we want 1-indexed stuff now as we are talking code lines mind you (**)\n\t\t$content = \"\\n\" . $content;\n\t\t// // strip unwanted lines\n\t\t$content = preg_replace_callback(\"/(@codeCoverageIgnoreStart.*?@codeCoverageIgnoreEnd)/is\", array('CodeCoverageManager', '__replaceWithNewlines'), $content);\n\t\t// strip php | ?\\> tag only lines\n\t\t$content = preg_replace('/[ |\\t]*[&lt;\\?php|\\?&gt;]+[ |\\t]*/', '', $content);\n\n\t\t// strip lines that contain only braces and parenthesis\n\t\t$content = preg_replace('/[ |\\t]*[{|}|\\(|\\)]+[ |\\t]*/', '', $content);\n\t\t$result = explode(\"\\n\", $content);\n\t\t// unset the zero line again to get the original line numbers, but starting at 1, see (**)\n\t\tunset($result[0]);\n\t\treturn $result;\n\t}", "function toHtml() {\n\n $key = hash('ripemd128', serialize($this->options));\n if ($this->should_cache() && !file_exists($this->get_cache_dir())) {\n mkdir($this->get_cache_dir(), 0777, true);\n }\n if ($this->should_cache() && file_exists($this->get_cache($key))) {\n return gzuncompress(file_get_contents($this->get_cache($key)));\n }\n\n $linesToClose = [];\n $html = null;\n\n foreach ($this->code_to_lines($this->code) as $lineNumber => $line) {\n\n $lineIndentation = $this->get_line_indentation($line) + $this->get_additional_indent();\n $line = trim($line);\n\n if (empty($line)) {\n continue;\n }\n\n $newLinesToClose = array();\n $closingLine = null;\n foreach ($linesToClose as $previousIndentation => $previousClosing) {\n if ($previousIndentation >= $lineIndentation) {\n $closingLine = $previousClosing[0] . $this->should_lb($previousIndentation, $lineIndentation) . $this->get_indentation($previousIndentation - 2) . $closingLine;\n } else {\n $newLinesToClose[$previousIndentation] = $previousClosing;\n }\n }\n $linesToClose = $newLinesToClose;\n\n if ($line !== self::SKIP_STRING) {\n $element = $this->format_element($line, $lineIndentation);\n $htmlBlock = $element[0];\n $linesToClose[$lineIndentation] = array($element[1], $lineNumber);\n } else {\n $htmlBlock = $this->str_replace_first(self::SKIP_STRING, \"\", $line);\n }\n\n # format template\n if (empty($htmlBlock)) {\n $html .= $closingLine;\n } else {\n $html .= $closingLine . $this->should_lb($lineNumber) . $this->get_indentation($lineIndentation) . ltrim($htmlBlock);\n }\n }\n\n if ($this->should_cache()) {\n file_put_contents($this->get_cache($key), gzcompress($html));\n }\n\n return $html;\n }", "public function getContent()\n {\n $source_code = '';\n $_components = array_reverse($this->components);\n $_last = end($_components);\n\n foreach ($_components as $_component) {\n if ($_component != $_last) {\n $source_code .= \"{$this->tpl_obj->left_delimiter}private_inheritancetpl_obj file='$_component->filepath' child--{$this->tpl_obj->right_delimiter}\\n\";\n } else {\n $source_code .= \"{$this->tpl_obj->left_delimiter}private_inheritancetpl_obj file='$_component->filepath'--{$this->tpl_obj->right_delimiter}\\n\";\n }\n }\n\n return $source_code;\n }", "function wp_ajax_get_revision_diffs()\n {\n }", "function execute() {\n if (!$handle = $this->create_output_handle()) return;\n \n fwrite($handle, $this->get_preamble());\n $row_id_format = \"%0\" . ceil(log10(count($this->results))) . \"d\";\n $num_results_written = 0;\n foreach ($this->results as $result) {\n if (!$this->is_severity_sufficient($result->severity))\n continue;\n $filename = $result->filename;\n $pinfo = pathinfo($filename);\n $ext = $pinfo['extension'];\n if (isset($result->custom['translation'])) {\n $t =& $result->custom['translation'];\n $filename = $t[basename($filename, \".$ext\")];\n }\n $filename = str_replace(\"\\\\\", \"/\", $filename);\n\n $source_context = \"\";\n if (is_array($result->source_context)) {\n foreach ($result->source_context as $context) {\n $context = preg_replace('/[\\r\\n]/', \"\", $context);\n $context = substr(trim($context), 0, 76);\n $source_context .= htmlentities($context) . \"~~~\";\n }\n }\n $row_id = sprintf($row_id_format, ++$num_results_written);\n $category_link = $result->category_link;\n $category = $result->category;\n $plugin_name = $result->plugin_name;\n $source_code_class = ($result->is_source_code ? \"code\" : \"\");\n $source = $result->source;\n $severity_description = $this->get_severity_description($result->severity);\n $filename_base = basename($filename);\n $line_number = $result->line_number;\n $line_number_field = $result->line_number > 0 ? \":\" . $result->line_number : \"\";\n $category_link_field = \"<a href=\\\"$category_link\\\" target=\\\"_blank\\\">$category</a>\";\n if ($category_link == \"\") $category_link_field = $category;\n \n fwrite($handle,\n \"<tr>\" .\n \" <td title=\\\"Severity: $severity_description\\nPlugin: $plugin_name\\\" class=\\\"severity_$severity_description\\\">$row_id</td>\\n\" . \n \" <td nowrap>$category_link_field</td>\\n\" .\n \" <td>\");\n\n if ($result->is_source_code || ($line_number != 0 && strlen(trim($source_context)) > 0)) {\n fwrite($handle, \n \"<div class=\\\"snippet_anchor\\\" onclick=\\\"show_code_snippet(event, '$row_id', $line_number, 'file://$filename');\\\">&#x25A0;</div>\" . \n \"<div id=\\\"c_$row_id\\\" style=\\\"display:none;\\\">$source_context</div>\");\n }\n \n fwrite($handle, \n \"<a style=\\\"margin-right: 12px;\\\" href=\\\"file://$filename\\\" target=\\\"_blank\\\" title=\\\"$filename\\\">$filename_base$line_number_field</a>\" .\n \"</td>\");\n \n fwrite($handle, \"<td nowrap class=\\\"message $source_code_class\\\" title=\\\"\" . htmlentities(trim($source)) . \"\\\">\" .\n htmlentities( ($result->is_source_code ? ellipsize(trim($source), 50, \"...\", false) : trim($source)) ) . \"</td>\");\n }\n if ($num_results_written == 0) {\n fwrite($handle, \"<tr><td colspan=\\\"4\\\" align=\\\"center\\\">No results were found.</td></tr>\");\n }\n \n fwrite($handle, $this->get_postamble());\n \n if ($this->use_digital_signature) {\n // Sign the file\n fseek($handle, 0);\n $html_content = \"\";\n while(!feof($handle)) {\n $html_content .= fread($handle, 4096);\n }\n $signature = Yasca::calculate_signature($html_content);\n fseek($handle, 0, SEEK_END);\n fwrite($handle, \"<!-- SIGNATURE: [$signature] -->\"); \n }\n \n fclose($handle);\n }", "public function getOutputLines(): array\n {\n return $this->output;\n }", "public static function message()\n {\n if (static::isClean()) {\n return static::command(\"git log --pretty=format:'%s' -n 1\");\n }\n }", "private function getChangelog($parent) {\n\t\t$file = $parent->getParent()->getPath('extension_administrator') .\n\t\t\t\t'/changelog.txt';\n\t\tif (! file_exists($file)) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$changelog = file_get_contents($file);\n\t\t$changelog = preg_replace(\"#\\r#s\", '', $changelog);\n\n\t\t$parts = explode(\"\\n\\n\", $changelog);\n\t\tif (empty($parts)) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$version = '';\n\t\t$changelog = array ();\n\n\t\tforeach ($parts as $part) {\n\t\t\t$part = trim($part);\n\n\t\t\t// changeloh eintrag ?!\n\t\t\tif (! preg_match('#.*(\\d+\\.\\d+\\.\\d+ - \\[.*\\]).*#i', $part)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// changelog version ermitteln\n\t\t\tif (preg_match('#.*(\\d+\\.\\d+\\.\\d+) - \\[.*\\].*#i', $part, $version)) {\n\t\t\t\t$version = $version[1];\n\t\t\t}\n\n\t\t\tif (version_compare($version, $this->fromVersion, '<=')) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$part = preg_replace('#.*(\\d+\\.\\d+\\.\\d+ - \\[.*\\]).*#', '<b>$1</b><pre style=\"line-height: 1.6em;\">', $part);\n\n\t\t\t$changelog[] = $part . '</pre>';\n\t\t}\n\n\t\t$changelog = implode(\"\\n\\n\", $changelog);\n\n\t\t// Change Type: @see changelog.txt\n\t\t$change_types = [ '+' => [ 'Addition', 'success' ],\n\t\t\t\t'-' => [ 'Removed', 'danger' ], '^' => [ 'Change', 'warning' ],\n\t\t\t\t'*' => [ 'Security Fix', 'info' ], '#' => [ 'Bug Fix', 'info' ],\n\t\t\t\t'!' => [ 'Note', 'info' ],\n\t\t\t\t'$' => [ 'Language fix or change', 'info' ] ];\n\t\tforeach ($change_types as $char => $type) {\n\t\t\t$changelog = preg_replace('#\\n' . preg_quote($char, '#') . ' #', \"\\n\" .\n\t\t\t\t\t'<span class=\"label label-sm label-' . $type[1] . '\" title=\"' .\n\t\t\t\t\t$type[0] . '\">' . $char . '</span> ', $changelog);\n\t\t}\n\t\t$changelog = preg_replace('#\\n #', \"\\n \", $changelog);\n\n\t\t$title = JText::sprintf('COM_CLM_TURNIER_CHANGELOG', $this->fromVersion);\n\n\t\treturn '<div style=\"max-height: 240px; padding-right: 20px; margin-right: -20px; overflow: auto;\">' .\n\t\t\t\t'<p><b>' . $title . '</b></p>' . $changelog . '</div>';\n\t}", "public function newLinesWritten();", "function skin_css_view_bit( $diff ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div style='padding:4px;border:1px solid #000;background-color:#FFF;margin:4px;'>\n$diff\n</div>\n<div style='padding:4px;border:1px solid #000;background-color:#FFF;margin:4px;'>\n <span class='diffred'>Удален HTML код</span> &middot; <span class='diffgreen'>Добавлен HTML код</span>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function getHtmlContent($webBasePath) {\n if ($this->fileGitObject) {\n if ($this->generator) {\n $content = $this->generator->generate($this->fileGitObject->data, $webBasePath, $this->path.'/');\n $this->extraData = $this->generator->getExtraData();\n return $content;\n } else {\n return '<pre>'.htmlspecialchars($this->fileGitObject->data).'</pre>';\n }\n }\n return '';\n }", "function skin_diff_view_bit( $template_bit_name, $template_group, $content ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div style='padding:4px;border:1px solid #000;background-color:#FFF;margin:4px;'>\n<strong>$template_group &gt; $template_bit_name</strong>\n</div>\n<div style='padding:4px;border:1px solid #000;background-color:#FFF;margin:4px;'>\n$content\n</div>\n<div style='padding:4px;border:1px solid #000;background-color:#FFF;margin:4px;'>\n <span class='diffred'>Удален HTML код</span> &middot; <span class='diffgreen'>Добавлен HTML код</span>\n</div>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "function action_diff()\n{\n\tglobal $pagestore, $page, $ver1, $ver2, $ParseEngine;\n\n\t$p1 = $pagestore->page($page);\n\t$p1->version = $ver1;\n\t$p2 = $pagestore->page($page);\n\t$p2->version = $ver2;\n\n\t$diff = diff_compute($p1->read(), $p2->read());\n\n\ttemplate_diff(array('page' => $p2->as_array(),\n\t\t\t\t\t\t\t\t\t\t\t'diff_html' => diff_parse($diff),\n\t\t\t\t\t\t\t\t\t\t\t'html' => parseText($p2->text, $ParseEngine, $page),\n\t\t\t\t\t\t\t\t\t\t\t'editable' => $p2->acl_check(),\n\t\t\t\t\t\t\t\t\t\t\t'timestamp' => $p2->time));\n}", "public function gitLog($file = '', $hash = '', $return = 'date')\n\t{\n\t\tif (!$this->_path || !is_dir($this->_path))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$file_obj = new Models\\File($file, $this->_path);\n\t\t$out = '';\n\n\t\t// Set exec command for retrieving different commit information\n\t\tswitch ($return)\n\t\t{\n\t\t\tcase 'combined':\n\t\t\t\t$out = 'combined';\n\t\t\t\tbreak;\n\n\t\t\tcase 'num':\n\t\t\t\t$out = 'num';\n\t\t\t\tbreak;\n\n\t\t\tcase 'author':\n\t\t\t\t$out = 'author';\n\t\t\t\tbreak;\n\n\t\t\tcase 'email':\n\t\t\t\t$out = 'email';\n\t\t\t\tbreak;\n\n\t\t\tcase 'message':\n\t\t\t\t$out = 'message';\n\t\t\t\tbreak;\n\n\t\t\tcase 'size':\n\t\t\t\t$out = 'size';\n\t\t\t\tbreak;\n\n\t\t\tcase 'diff':\n\t\t\t\t$out = 'diff';\n\t\t\t\tbreak;\n\n\t\t\tcase 'content':\n\t\t\t\t$out = 'content';\n\t\t\t\tbreak;\n\n\t\t\tcase 'rename':\n\t\t\t\t$out = 'rename';\n\t\t\t\tbreak;\n\n\t\t\tcase 'namestatus':\n\t\t\t\t$out = 'namestatus';\n\t\t\t\tbreak;\n\n\t\t\tcase 'blob':\n\t\t\t\t$out = 'blob';\n\t\t\t\tbreak;\n\n\t\t\tcase 'hash':\n\t\t\tcase 'timestamp':\n\t\t\tcase 'date':\n\t\t\tdefault:\n\t\t\t\t$out = $file_obj->get('date')->toUnix();\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\t// Parse returned array of data\n\t\treturn $out;\n\t}", "public function getDiffHtml($a, $b)\n\t{\n\t\tpreg_match_all(\"/(<.*?>\\\\s*|\\\\s+)([^\\\\s<]*)/\", \" \".$a, $matchA);\n\t\tpreg_match_all(\"/(<.*?>\\\\s*|\\\\s+)([^\\\\s<]*)/\", \" \".$b, $matchB);\n\n\t\t$diffScript = $this->getDiffScript($matchA[2], $matchB[2]);\n\t\tif(count($diffScript) == 0)\n\t\t{\n\t\t\t// no difference found\n\t\t\treturn $a;\n\t\t}\n\n\t\t$positionA = 0;\n\n\t\t$result = '';\n\t\tforeach($diffScript as $diffItem)\n\t\t{\n\t\t\twhile($positionA < $diffItem['startA'])\n\t\t\t{\n\t\t\t\t$result .= $matchA[0][$positionA];\n\t\t\t\t$positionA++;\n\t\t\t}\n\n\t\t\t//deleted items\n\t\t\tif($diffItem['deletedA'] > 0)\n\t\t\t{\n\t\t\t\t$result .= $matchA[1][$positionA] . '<s style=\"color:red\">' . $matchA[2][$positionA];\n\t\t\t\tfor($i = 1; $i < $diffItem['deletedA']; $i++)\n\t\t\t\t\t$result .= $matchA[0][$positionA + $i];\n\n\t\t\t\t$result .= '</s>';\n\t\t\t\t$positionA = $positionA + $diffItem['deletedA'];\n\t\t\t}\n\n\t\t\tif($diffItem['insertedB'] > 0)\n\t\t\t{\n\t\t\t\t$result .= $matchB[1][$diffItem['startB']] . '<b style=\"color:green\">' . $matchB[2][$diffItem['startB']];\n\t\t\t\tfor($i = 1; $i < $diffItem['insertedB']; $i++)\n\t\t\t\t\t$result .= $matchB[0][$diffItem['startB'] + $i];\n\n\t\t\t\t$result .= '</b>';\n\t\t\t}\n\t\t}\n\n\t\twhile($positionA < count($matchA[0]))\n\t\t{\n\t\t\t$result .= $matchA[0][$positionA];\n\t\t\t$positionA++;\n\t\t}\n\n\t\treturn $result;\n\t}", "function _versioncontrol_git_log_parse_tag_info($repository, &$logs, $tag_commits) {\n $line = next($logs); // Get op type\n if ($line === FALSE) {\n return FALSE;\n }\n if ($line == 'commit') {\n //let's get the author and the date from the tagged commit, better than nothing.\n $tagged_commit = next($logs); // Get the tagged commit\n $tag_name = substr(strrchr(next($logs), '/'), 1 ); // Get the name of the tag based on %(refname)\n next($logs); // Skip these two lines\n next($logs);\n // Get the tag/commit message\n $message = '';\n $i = 0;\n while (($line = next($logs)) !== FALSE) {\n if ($line == 'ENDOFGITTAGOUTPUTMESAGEHERE') {\n break;\n }\n if ($i == 1) {\n $message .= \"\\n\";\n }\n $message .= $line .\"\\n\";\n $i++;\n }\n $constraints = array(\n 'vcs' => array('git'),\n 'repo_ids' => array($repository['repo_id']),\n 'types' => array(VERSIONCONTROL_OPERATION_COMMIT),\n 'revisions' => array($tagged_commit)\n );\n $op = versioncontrol_get_operations($constraints);\n $op = array_pop($op);\n return array(\n 'type' => VERSIONCONTROL_OPERATION_TAG,\n 'repository' => $repository,\n 'date' => $op['date']+1, // We want to be displayed *after* the tagged commit.\n 'username' => $op['username'],\n 'message' => $message,\n 'revision' => $tagged_commit,\n 'labels' => array(\n 0 => array(\n 'name' => $tag_name,\n 'type' => VERSIONCONTROL_OPERATION_TAG,\n 'action' => VERSIONCONTROL_ACTION_ADDED\n )\n )\n );\n }\n $line = next($logs); // Skip op sha1\n $tag_name = substr(strrchr(next($logs), '/'), 1 ); // Get the name of the tag based on %(refname)\n $tagger = next($logs); // Get tagger\n $date = strtotime(next($logs)); // Get date\n // Get the tag message\n $message = '';\n $i = 0;\n while (($line = next($logs)) !== FALSE) {\n if ($line == 'ENDOFGITTAGOUTPUTMESAGEHERE') {\n break;\n }\n if ($i == 1) {\n $message .= \"\\n\";\n }\n $message .= $line .\"\\n\";\n $i++;\n }\n $tagged_commit = $tag_commits[$tag_name];\n // By now, we're done with the parsing, construct the op array\n return array(\n 'type' => VERSIONCONTROL_OPERATION_TAG,\n 'repository' => $repository,\n 'date' => $date,\n 'username' => $tagger,\n 'message' => $message,\n 'revision' => $tagged_commit,\n 'labels' => array(\n 0 => array(\n 'name' => $tag_name,\n 'type' => VERSIONCONTROL_OPERATION_TAG,\n 'action' => VERSIONCONTROL_ACTION_ADDED\n )\n )\n );\n}", "private function getSelfupdaterContent()\n {\n $path = $this->getWrapperPath();\n assert(file_exists($path), \"Wrapper file should be found at: $path\");\n\n return <<<FILE\n<?php\n require_once \"$path\";\n\n evidev\\composer\\Wrapper::create()->run(\"selfupdate\");\n\nFILE;\n }", "function chunk($ch, $str) {\r\n print($str);\r\n return strlen($str);\r\n }", "public function outputFile()\n {\n // If inputProcess was not run first throw error.\n if (empty($this->hashes)) {\n throw new Exception('No hashes, call processInput first.');\n }\n\n // Open the output file for writing.\n $handle = fopen($this->outputName, 'w');\n\n // Get line of last hash.\n end($this->hashes);\n $last = key($this->hashes);\n\n // Loop through each line.\n for ($i = 1; $i < $this->lineCount; $i++) {\n $txt = '';\n\n // If there are no hashes, print only dots.\n if (!isset($this->hashes[$i]) && !isset($star)) {\n $txt = str_repeat('.', $this->lineLength);\n\n // Row with hash(s).\n } elseif (isset($this->hashes[$i])) {\n $count = count($this->hashes[$i]);\n\n // For each hash.\n foreach ($this->hashes[$i] as $key => $hash) {\n $reverseStar = false;\n // First hash.\n if ($hash >= 0 && $key === 0 && !isset($star)) {\n if ($hash !== 0) {\n $txt .= str_repeat('.', $hash);\n }\n\n $txt .= '#';\n\n // If row is only hash.\n } elseif ($hash > 0 && $key === 0 && isset($star) && $hash === $star) {\n $txt .= str_repeat('.', $hash);\n $txt .= '#';\n\n // Unset for last in line.\n if ($i === $last && $key === $count - 1) {\n unset($star);\n }\n\n // If star row and hash is last.\n } elseif (isset($star) && $hash > $star) {\n // Account for last char as hash.\n if (!isset($this->hashes[$i][$key - 1])) {\n $txt .= str_repeat('.', $star);\n $starLength = $hash - $star;\n } else {\n $starLength = $hash - $star - 1;\n }\n\n $txt .= str_repeat('*', $starLength);\n $txt .= '#';\n unset($star);\n\n // If star row and star is before hash.\n } elseif (isset($star) && $hash < $star) {\n $txt .= str_repeat('.', $hash);\n $txt .= '#';\n\n $diff = 0;\n $next = '';\n if (isset($this->hashes[$i][$key + 1])) {\n $next = $this->hashes[$i][$key + 1];\n }\n if ($star !== $next) {\n $diff = $star - $hash;\n }\n\n $txt .= str_repeat('*', $diff);\n\n // Account for 2 hashes on the same row.\n if (!isset($this->hashes[$i][$key + 1])) {\n $txt .= str_repeat('.', $this->lineLength - $star - 1);\n }\n\n $reverseStar = true;\n unset($star);\n\n // Else fill b/w hashes.\n } elseif ($key > 0) {\n $currentLength = strlen($txt);\n\n if ($hash - $currentLength > 0) {\n $txt .= str_repeat('*', $hash - $currentLength);\n }\n\n $txt .= '#';\n }\n\n // End row.\n if ($key === $count - 1 && $hash !== $this->lineLength && !$reverseStar) {\n $txt .= str_repeat('.', $this->lineLength - $hash - 1);\n }\n\n // If next row should have a star.\n if ($i !== $last && $key === $count - 1) {\n $star = $hash;\n }\n }\n\n // Star only row.\n } elseif (!isset($this->hashes[$i]) && isset($star)) {\n $txt = str_repeat('.', $star);\n $txt .= '*';\n $txt .= str_repeat('.', $this->lineLength - $star - 1);\n }\n\n // Add line break.\n $txt .= \"\\n\";\n\n // Write line.\n fwrite($handle, $txt);\n }\n\n fclose($handle);\n }", "function MergeFile($original, $edited, $cache)\n{\n /*echo \"<table><tr><td VALIGN='top' width='33%'>\" . htmlspecialchars($original) . \"</td><td VALIGN='top' width='33%'>\" . \n htmlspecialchars($edited) . \" </td><td VALIGN='top' width='33%'>\" . htmlspecialchars($cache) . \"</td></tr></table>\";\n echo \"<br><br>-----------------------------------------------------------------------------\";*/\n /* Run the merge */\n require_once 'classMerge.php';\n $merge = new ThreeWayMerge( $original, $edited, $cache, /*'lite'*/ 'full');\n \n $result = $merge->merge();\n\n if ( $result !== FALSE )\n {\n /* Check for conflicts */\n //$conflicts = ( stristr( $result, '<ips:conflict' ) ) ? 1 : 0;\n \n echo htmlspecialchars($result);\n\n $myfile = fopen(\"doclineSQL1.txt\", \"w+\") or die(\"Unable to open file!\");\n fwrite($myfile, $result);\n fclose($myfile);\n } \n else\n echo \"Fail to merge\";\n}", "public function get_description() {\n\t\t\t$path = $this->git_directory_path();\n\t\t\treturn file_get_contents($path.\"/description\");\n\t\t}", "public static function get() {\n\t\t$commitHash = trim(exec('git log --pretty=\"%h\" -n1 HEAD'));\n\n\t\t// Get date and time information.\n\t\t$commitDate = new \\DateTime(trim(exec('git log -n1 --pretty=%ci HEAD')));\n\t\t$commitDate->setTimezone(new \\DateTimeZone('UTC'));\n\n\t\t// Format all information into a version identifier.\n\t\treturn sprintf('v%s.%s.%s-dev.%s (%s)', self::MAJOR, self::MINOR, self::PATCH, $commitHash, $commitDate->format('Y-m-d H:m:s'));\n\t}", "protected function ReadData()\n\t{\n\t\t$this->dataRead = true;\n\n\t\t$exe = new GitPHP_GitExe($this->project);\n\n\t\t/* get data from tag object */\n\t\t$args = array();\n\t\t$args[] = 'tag';\n\t\t$args[] = $this->GetHash();\n\t\t$ret = $exe->Execute(GIT_CAT_FILE, $args);\n\t\tunset($exe);\n\n\t\t$lines = explode(\"\\n\", $ret);\n\n\t\tif (!isset($lines[0]))\n\t\t\treturn;\n\n\t\t$readInitialData = false;\n\t\tforeach ($lines as $i => $line) {\n\t\t\tif (!$readInitialData) {\n\t\t\t\tif (preg_match('/^object ([0-9a-fA-F]{40})$/', $line, $regs)) {\n\t\t\t\t\t$this->objectHash = $regs[1];\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (preg_match('/^type (.+)$/', $line, $regs)) {\n\t\t\t\t\t// Ignore this, because it's determined by GetType of the object\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (preg_match('/^tag (.+)$/', $line, $regs)) {\n\t\t\t\t\t$this->tagName = $regs[1];\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (preg_match('/^tagger (.*) ([0-9]+) (.*)$/', $line, $regs)) {\n\t\t\t\t\t$this->tagger = $regs[1];\n\t\t\t\t\t$this->taggerEpoch = $regs[2];\n\t\t\t\t\t$this->taggerTimezone = $regs[3];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$trimmed = trim($line);\n\n\t\t\tif ((strlen($trimmed) > 0) || ($readInitialData === true)) {\n\t\t\t\t$this->comment[] = $line;\n\t\t\t}\n\t\t\t$readInitialData = true;\n\n\t\t}\n\n\t}", "function _versioncontrol_git_log_get_commits_in_branch($repository, $range) {\n $logs = _versioncontrol_git_log_exec(\"git rev-list $range --reverse --\"); // Query tags.\n $commits = array();\n while (($line = next($logs)) !== FALSE) {\n $commits[] = trim($line);\n }\n return $commits;\n}", "function tidy_get_output(tidy $object) {}", "public function _changed($orig, $closing)\n\t{\n\t\t$diff = new WordLevelDiff($orig, $closing);\n\t\t$del = $diff->orig();\n\t\t$add = $diff->closing();\n\n\t\t// Notice that WordLevelDiff returns HTML-escaped output.\n\t\t// Hence, we will be calling addedLine/deletedLine without HTML-escaping.\n\n\t\twhile ($line = array_shift($del))\n\t\t{\n\t\t\t$this->i++;\n\t\t\t$aline = array_shift($add);\n\t\t\techo \"\\t\\t\".'<tr>'.\"\\n\";\n\t\t\techo \"\\t\\t\\t\".'<th>'.$this->i.'</th>'.\"\\n\";\n\t\t\techo $this->deletedLine($line) . $this->addedLine($aline);\n\t\t\techo \"\\t\\t\".'</tr>'.\"\\n\";\n\t\t}\n\t\t// If any leftovers\n\t\tforeach ($add as $line)\n\t\t{\n\t\t\t$this->i++;\n\t\t\techo \"\\t\\t\".'<tr>'.\"\\n\";\n\t\t\techo \"\\t\\t\\t\".'<th>'.$this->i.'</th>'.\"\\n\";\n\t\t\techo $this->emptyLine() . $this->addedLine($line);\n\t\t\techo \"\\t\\t\".'</tr>'.\"\\n\";\n\t\t}\n\t\t//$this->i--;\n\t}", "function diff($diff, $mode = 'autodetect')\n {\n }", "function getDocmanFileChunk($sessionKey, $group_id, $item_id, $version_number, $chunk_offset, $chunk_size) {\n $params = array(\n 'item_id' => $item_id,\n 'version_number' => $version_number,\n 'chunk_offset' => $chunk_offset,\n 'chunk_size' => $chunk_size,\n );\n \n return _makeDocmanRequest($sessionKey, $group_id, 'getFileChunk', $params);\n}", "public function contextLine($line)\n\t{\n\t\treturn $this->wrapLine(' ', 'diff-context', $line);\n\t}", "private function digest_content($file, $input_line) \n {\n foreach (static::$object_attributes as $property => $process_attributes) {\n list($regex, $type) = $process_attributes;\n // Process fields by regex\n if ($type == self::REGEX) {\n if (preg_match($regex, $input_line, $output_array)) {\n $this->{$property} = $output_array[1];\n } else {\n $file->__destruct();\n Error::set(Error::ERROR_ATTR_NOT_FOUND, [$property, $input_line], Error::ERROR);\n }\n // Process free text fields\n } elseif ($type == self::FREE_TEXT) {\n $string_separated = explode(Build::FIELD_DELIMITER, $input_line);\n list($regex, $type, $final_regex) = $process_attributes;\n $content_line = '';\n $content_found = false;\n\n // Wrap all the content beetween the $regex and the $final_refex\n foreach ($string_separated as $line) {\n if (preg_match($regex, $line, $output_array)) {\n // Remove the beginning tag\n $content_line .= preg_replace($regex, \"\", $line);\n $content_found = true;\n continue;\n }\n\n if (preg_match($final_regex, $line, $output_array)) {\n break;\n }\n\n if ($content_found) {\n // Remove the first white space\n $content_line .= preg_replace(\"/^\\s/\", \"\", $line);\n }\n }\n\n if (empty($content_line)) {\n $file->__destruct();\n Error::set(Error::ERROR_ATTR_NOT_FOUND, [$property, $input_line], Error::ERROR);\n } else {\n $this->{$property} = $content_line;\n }\n } else {\n $file->__destruct();\n Error::set(Error::DIGEST_METHOD_NOT_FOUND, [$type], Error::ERROR);\n }\n }\n\n return true;\n }", "function hook_file_formatter_info_alter(&$info) {\n // @todo Add example.\n}", "abstract protected function getGitCommand(): string;", "function html_tree($proj, $tree, $repos) {\n $t = git_ls_tree(get_repo_path($proj, $repos), $tree);\n\n echo '<div class=\"gitbrowse\"><table>';\n\n foreach ($t as $t) {\n $plain = \"\";\n $perm = permissions_string($t['perm']);\n if ($t['type'] == 'tree')\n $objlink = \"<a href=\\\"\" . sanitized_url() . \"p=$proj&t={$t['hash']}\\\">{$t['file']}</a>\";\n else if ($t['type'] == 'blob') {\n $plain = \"<a href=\\\"\" . sanitized_url() . \"p=$proj&dl=plain&h={$t['hash']}\\\">plain</a>\";\n $objlink = \"<a class=\\\"blob\\\" href=\\\"\" . sanitized_url() . \"p=$proj&b={$t['hash']}\\\">{$t['file']}</a>\";\n }\n\n echo \"<tr><td>$perm</td><td>$objlink</td><td>$plain</td></tr>\";\n }\n echo '</table></div>';\n}" ]
[ "0.58935595", "0.5771478", "0.5690661", "0.5257246", "0.52250886", "0.52140003", "0.5173087", "0.5094269", "0.5065596", "0.50597435", "0.50582755", "0.50370955", "0.49841663", "0.49563992", "0.4903894", "0.48786676", "0.48729935", "0.4847911", "0.48276314", "0.4826947", "0.4792645", "0.47680065", "0.47236377", "0.4721039", "0.4712925", "0.47089234", "0.47050717", "0.47002918", "0.46947184", "0.46508464", "0.46345153", "0.46330383", "0.46089816", "0.45950535", "0.45921183", "0.4590731", "0.4573645", "0.45622483", "0.45616704", "0.45516014", "0.45487985", "0.45473456", "0.45339644", "0.4525073", "0.45237723", "0.45215768", "0.45138818", "0.4513797", "0.45032394", "0.44866562", "0.44852403", "0.44784406", "0.44672123", "0.445528", "0.44480795", "0.444698", "0.44355503", "0.44119757", "0.44099855", "0.43987182", "0.4380131", "0.43761864", "0.43688554", "0.4356817", "0.43552837", "0.43492875", "0.43404385", "0.43392232", "0.4335039", "0.43277845", "0.43253815", "0.4322204", "0.43205714", "0.43183577", "0.43171358", "0.43103504", "0.43083102", "0.430801", "0.42993993", "0.429794", "0.4293495", "0.42925328", "0.42917317", "0.42810208", "0.427085", "0.42696685", "0.42692903", "0.4266165", "0.4260073", "0.4259348", "0.4255967", "0.4248001", "0.42432657", "0.42309377", "0.42239654", "0.4221067", "0.42203227", "0.42190346", "0.42188123" ]
0.7083244
1
/ MiningBuddy ( $Header: /usr/home/mining/cvs/mining/functions/html/showEvents.php,v 1.19 2008/01/02 20:01:32 mining Exp $ Copyright (c) 20052008 Christian Reiss. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
function showEvents() { // Lets import some globals, shall we? global $MySelf; global $DB; global $TIMEMARK; $delta = $TIMEMARK -259200; // is the events module active? if (!getConfig("events")) { makeNotice("The admin has deactivated the events module.", "warning", "Module not active"); } // Load all events. $EVENTS_DS = $DB->query("SELECT * FROM events WHERE starttime >= '" . $delta . "' ORDER BY starttime ASC"); // .. right? if ($EVENTS_DS->numRows() >= 1) { // Lets keep in mind: We have events. $haveEvents = true; while ($event = $EVENTS_DS->fetchRow()) { // get the date. $date = date("d.m.y", $event[starttime]); // open up a new table for each day. if ($date != $previousdate) { $workday = date("l", $event[starttime]); if ($beenhere) { $html .= $temp->flush(); $html .= "<br>"; } $beenhere = true; // We need an additional row if we are allowed to delete events. if ($MySelf->canDeleteEvents()) { $temp = new table(8, true); } else { $temp = new table(7, true); } $temp->addHeader(">> Events for " . $workday . ", the " . $date); $previousdate = $date; $temp->addRow("#060622"); $temp->addCol("ID"); $temp->addCol("Starttime"); $temp->addCol("Starts in / Runs for"); $temp->addCol("Mission Type"); $temp->addCol("Short Description"); $temp->addCol("System"); $temp->addCol("Security"); if ($MySelf->canDeleteEvents()) { $temp->addCol("Delete"); } } // Add Event to the current database. $temp->addRow(); $temp->addCol("<a href=\"index.php?action=showevent&id=" . $event[id] . "\">" . str_pad($event[id], 4, "0", STR_PAD_LEFT) . "</a>"); $temp->addCol(date("d.m.y H:i", $event[starttime])); $delta = $TIMEMARK - $event[starttime]; if ($TIMEMARK > $event[starttime]) { // Event underway. $temp->addCol("<font color=\"#00ff00\">" . numberToString($delta) . "</font>"); } else { // Event not started yet. $delta = $delta * -1; $temp->addCol("<font color=\"#ffff00\">" . numberToString($delta) . "</font>"); } $temp->addCol($event[type]); $temp->addCol($event[sdesc]); $temp->addCol($event[system]); $temp->addCol($event[security]); if ($MySelf->canDeleteEvents()) { $temp->addCol("<a href=\"index.php?action=deleteevent&id=$event[id]\">delete event</a>"); } } } // Lets recall, did we have events scheduled? if ($haveEvents) { // We do! $html = "<h2>Scheduled Events</h2>" . $html . $temp->flush(); } else { // We dont! $html = "<h2>Scheduled Events</h2><b>There are currently no scheduled events in the database.</b>"; } // Return what we got. return ($html); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ShowEvents()\n {\n $this->ReadEvents();\n echo\n $this->H(1,$this->MyLanguage_GetMessage(\"Events_Table_Title\")).\n $this->EventsHtmlTable(),\n \"\";\n }", "function DisplayEvents()\r\n\t{\t\r\n\t\tglobal $_GET;\r\n\t\tglobal $_POST;\r\n\t\tglobal $_REQUEST;\r\n\t\tglobal $_SETTINGS;\r\n\t\tglobal $_SESSION;\t\r\n\t\t\r\n\t\t//\r\n\t\t// PAGE FLAG\r\n\t\t//\r\n\t\t$flag = $_SETTINGS['events_page_clean_url'];\r\n\t\tif($flag == $_REQUEST['page']){\r\n\t\t\t\r\n\t\t\t//\r\n\t\t\t// DEBUG SECTION\r\n\t\t\t//\r\n\t\t\tif($_SETTINGS['debug'] == 1){\r\n\t\t\t\techo \"<br>PAGE: \".$_REQUEST['page'].\"<br>\";\r\n\t\t\t\techo \"<br>FORM1: \".$_REQUEST['FORM1'].\"<br>\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//\r\n\t\t\t// IF FORM1 CALENDAR\r\n\t\t\t//\r\n\t\t\tif($_REQUEST['FORM1'] == 'calendar'){\r\n\t\t\t\t$this->DisplayCalendarOfEvents();\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// ELSE DISPLAY EVENTS BY DEFAULT\r\n\t\t\t//\r\n\t\t\telse {\t\t\r\n\t\t\t\techo \"<div class='events'>\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t// CHECK FOR A CATEGORY\r\n\t\t\t\tif($_REQUEST['form1'] != ''){\r\n\t\t\t\t\r\n\t\t\t\t\t$form1Array = explode(\":\",$_REQUEST['FORM1']);\r\n\t\t\t\t\t$categoryName = $form1Array[0];\r\n\t\t\t\t\t$pageNum = $form1Array[1];\r\n\t\t\t\t\t$eventName = $form1Array[2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t$cagegorySQL = \"AND ec.name='\".$categoryName.\"' \";\r\n\t\t\t\t\t$nameSQL = \"AND ev.name='\".$eventName.\"' \";\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// PAGINATION\r\n\t\t\t\t$page = 1; // start page\t\t\t\r\n\t\t\t\t$size = 4; // records per page\r\n\t\t\t\t$select = \t\"SELECT * FROM events \".\r\n\t\t\t\t\t\t\t\"WHERE events.active='1' \".\r\n\t\t\t\t\t\t\t\"AND events.published='1' \".\r\n\t\t\t\t\t\t\t\"\".$_SETTINGS['demosqland'].\" \".\r\n\t\t\t\t\t\t\t\"ORDER BY events.date DESC \";\t\r\n\t\t\t\t$total_records = mysql_num_rows(doQuery($select)); // total records\r\n\t\t\t\tif($pageNum){ $page = (int) $pageNum; } // current page\r\n\t\t\t\t$pagination = new Pagination();\r\n\t\t\t\t$pagination->setLink(\"\".$_SETTINGS['website'].\"/\".$_REQUEST['page'].\"/\".$categoryName.\":%s\");\r\n\t\t\t\t$pagination->setPage($page);\r\n\t\t\t\t$pagination->setSize($size);\r\n\t\t\t\t$pagination->setTotalRecords($total_records);\r\n\t\t\t\t$select2 = \t$select.$pagination->getLimitSql();\t\t\t\t\r\n\t\t\t\t$result = doQuery($select);\r\n\t\t\t\t\r\n\t\t\t\t$i=0;\r\n\t\t\t\twhile ($row = mysql_fetch_array($result)){\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<div class='event_cont'>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<div class='eventmaps' id='eventmap\".$i.\"'></div>\";\r\n\t\t\t\t\techo \"<div class='event_cont_img_box'><img src='\".$_SETTINGS['website'].\"uploads/\".$row['image'].\"' class='event_cont_img' alt='' /></div>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<strong>\".$row['title'].\"</strong>\";\r\n\t\t\t\t\techo \"<label>\".TimestampIntoDate($row['date']).\"</label>\";\r\n\t\t\t\t\techo \"<label>\".$row['location'].\"</label>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"\".truncateString($row['content'], 300, $stopanywhere=false).\"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"<ul class='event_list'>\";\r\n\t\t\t\t\techo \"<li><b>Location:</b> \".$row['location'].\"</li>\";\r\n\t\t\t\t\techo \"<li><b>Address:</b> \".$row['address'].\"</li>\";\r\n\t\t\t\t\techo \"<li><b>Openings:</b></li>\";\r\n\t\t\t\t\techo \"<li><b>Price:</b> $\".$row['price'].\"</li>\";\t\t\t\t\t\r\n\t\t\t\t\techo \"</ul>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t// CHECKOUT FORM\r\n\t\t\t\t\tif($row['price'] != 0){\r\n\t\t\t\t\t\techo\t\"<form class='product-form' method='post'>\".\r\n\t\t\t\t\t\t\t\t\"<input class='hidden' type='hidden' name='pid' value='\".$product_id.\"' >\".\r\n\t\t\t\t\t\t\t\t\"<input type='hidden' class='qtyinput' name='qty' value='1' size='2' >\";\r\n\t\t\t\t\t\techo\t\"<input type='submit' name='ADDTOCART' class='event-submit' value='Attend This Event'>\";\r\n\t\t\t\t\t\techo\t\"<input type='button' class='event-directions' value='Get Directions'>\".\r\n\t\t\t\t\t\t\t\t\"</form>\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\techo\t\"<form>\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\techo\t\"<input type='submit' name='ATTENDEVENT' class='event-submit' value='Attend This Event'>\";\r\n\t\t\t\t\t\techo\t\"<input type='button' class='event-directions' value='Get Directions'>\".\r\n\t\t\t\t\t\t\t\t\"</form>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\techo \"</div>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif($i==0){\r\n\t\t\t\t\techo \"There are currently no events listed\";\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\t?>\r\n\t\t\t\t\r\n\t\t\t\t<?\r\n\t\t\t\t\r\n\t\t\t\t$navigation = $pagination->create_links();\r\n\t\t\t\techo $navigation; // will draw our page navigation\r\n\t\t\t\r\n\t\t\t\techo \"</div>\";\t\r\n\t\t\t\techo \"<div id='map_canvas'></div>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function viewEvents();", "function listEventInfo() {\n\t\t$query = \"SELECT e_description, c_name, tag_name, start_datetime, end_datetime, capacity, v.name AS vname, address,o.name AS oname, v.address, v.city, v.state, v.postal_code \n\t\tFROM yam14.F_event e, yam14.F_venue v, yam14.F_category c, yam14.F_topic t, yam14.F_organizer o\n\t\tWHERE e.venue_id = v.v_id \n\t\tAND c.c_id = e.c_id \n\t\tAND t.tag_id = e.tag_id \n\t\tAND o.o_id = e.organizer_id\n\t\tAND e.e_id = $this->eid ;\";\n\t\t\n\t\t$result = mysql_query($query);\n\t\tif (!$result) {\n\t\t\t$message='Invalid Query' .mysql_errno().\" \\n\";\n\t\t $message .= 'Whole Query' . $query;\n\t\t die($message);\n\t\t}//end if\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t$this->category = $row['c_name'];\n\t\t\t$this->tag = $row['tag_name'];\n\t\t\t$this->description = $row['e_description'];\n\t\t\t$this->startdate = date('l, M d, Y',strtotime($row['start_datetime']));\n\t\t\t$this->starttime = date('H:i A',strtotime($row['start_datetime']));\n\t\t\t$this->enddate = date('l, M d, Y',strtotime($row['end_datetime']));\n\t\t\t$this->endtime =date('H:i A',strtotime($row['end_datetime']));\n\t\t\t$this->capacity = $row['capacity'];\n\t\t\t$this->venue = $row['vname'];\n\t\t\t$this->address = $row['address'] . \", \" . $row['city'] . \", \" . $row['state'] . \" \" . $row['postal_code'];\n\t\t\t$this->organizer = $row['oname'];\n\t\t\techo \"<hr />\";\n\t\t\techo \"<div class=\\\"panel panel-default\\\">\";\n\t\t\techo \t\"<div class=\\\"panel-heading\\\">\";\n\t\t\techo \t\"<h3 class=\\\"panel-title\\\">Event Information</h3>\";\n\t\t\techo \t\"</div>\";\n\t\t\techo \t\"<div class=\\\"panel-body\\\">\";\n\t\t\techo \"<p><b>Description: </b>$this->description</p>\";\n\t\t\techo \t\"<p><b>Category: </b>$this->category</p>\";\n\t\t\techo \t\"<p><b>Topic: </b>$this->tag</p>\";\n\t\t\techo \t\"<p><b>Start Date: </b>$this->startdate</p>\";\n\t\t\techo \t\"<p><b>Start Time: </b>$this->starttime</p>\";\n\t\t\techo \t\"<p><b>End Date: </b>$this->enddate</p>\";\n\t\t\techo \t\"<p><b>End Time: </b>$this->endtime</p>\";\n\t\t\techo \t\"<p><b>Capacity: </b>$this->capacity</p>\";\n\t\t\techo \t\"<p><b>Organizer: </b>$this->organizer</p>\";\n\t\t\techo \t\"<p><b>Location: </b>$this->venue</p>\";\n\t\t\techo \t\"<p><b>Address: </b>$this->address</p>\";\n\t\t\t\n\t\t\techo \t\"</div>\";\n\t\t\techo \t\"</div>\";\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t\t\n\t\t}\t\n\t\t\n\t\tmysql_free_result($result);\n\t}", "function showEvent() \n {\n if (isset($_SESSION['eventid']) AND isset($_SESSION['eventguest'])) {\n // event und gast informationen\n echo \"<div class=''>\";\n echo \"<div class='rightBody'>\";\n $this->askUserForZusage($_SESSION['eventid']);\n $this->askUserForCount($_SESSION['eventid']);\n $this->showSmallGuestList();\n echo \"</div>\";\n echo \"<div class='innerBody'>\";\n echo \"<ul class='finanzNAV'>\";\n $this->eventAdministration();\n echo \"</ul>\";\n $eventname = $this->getEventname($_SESSION['eventid']);\n echo \"<h1><a href='event.php'>\" .$eventname . \"</a></h1>\";\n echo \"<h2>Willkommen \" . $this->getGuestName($_SESSION['eventguest']) . \"</h2>\";\n $this->showWelcomeMessage($_SESSION['eventid']);\n $this->showCountdowns($_SESSION['eventid']);\n $this->showBlogMessages($_SESSION['eventid']);\n echo \"</div>\";\n echo \"</div>\";\n \n }\n }", "function aidtransparency_print_events()\r\n{\r\n $events = new IATI_Event_Collection();\r\n if( $events->findPosts() > 0 ) :\r\n ?>\r\n <ol>\r\n <?php\r\n foreach ($events->getPosts() as $event) :\r\n ?>\r\n <li><a href=\"<?php echo get_permalink($event->ID); ?>\" title=\"<?php echo $event->post_title; ?>\"><?php echo $event->post_title; ?></a>\r\n <span class=\"when\"><?php echo $event->getWhere(); ?> </span>\r\n </li>\r\n <?php endforeach; ?>\r\n </ol>\r\n <?php endif;\r\n}", "function DisplayCalendarOfEvents()\r\n\t{\r\n\t\tglobal $_SETTINGS;\r\n\t\techo \"<div id='calendar'></div>\";\t\r\n\t}", "function show_calendar_events()\n\t{\n\t\t$stats_html = \"\";\n\t\t\n\t\tif ($this->ipsclass->vars['show_birthdays'] or $this->ipsclass->vars['show_calendar'] )\n\t\t{\n\t\t\t$a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->ipsclass->get_time_offset() ) );\n\t\t\n\t\t\t$day = $a[2];\n\t\t\t$month = $a[1];\n\t\t\t$year = $a[0];\n\t\t\t\n\t\t\t$birthstring = \"\";\n\t\t\t$count = 0;\n\t\t\t$users = array();\n\t\t\t\n\t\t\tif ( $this->ipsclass->vars['show_birthdays'] )\n\t\t\t{\n\t\t\t\tif ( is_array($this->ipsclass->cache['birthdays']) AND count( $this->ipsclass->cache['birthdays'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $this->ipsclass->cache['birthdays'] as $u )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( $u['bday_day'] == $day and $u['bday_month'] == $month )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$users[] = $u;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( $day == 28 && $month == 2 && !date(\"L\") )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( $u['bday_day'] == \"29\" and $u['bday_month'] == $month )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$users[] = $u;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Spin and print...\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tforeach ( $users as $user )\n\t\t\t\t{\n\t\t\t\t\t$birthstring .= \"<a href='{$this->ipsclass->base_url}showuser={$user['id']}'>{$user['members_display_name']}</a>\";\n\t\t\t\t\t\n\t\t\t\t\tif ($user['bday_year'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$pyear = $year - $user['bday_year'];\n\t\t\t\t\t\t$birthstring .= \"(<b>$pyear</b>)\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$birthstring .= $this->sep_char.\"\\n\";\n\t\t\t\t\t\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Fix up string...\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$birthstring = preg_replace( \"/\".$this->sep_char.\"$/\", \"\", trim($birthstring) );\n\t\t\t\t\n\t\t\t\t$lang = $this->ipsclass->lang['no_birth_users'];\n\t\t\t\t\n\t\t\t\tif ($count > 0)\n\t\t\t\t{\n\t\t\t\t\t$lang = ($count > 1) ? $this->ipsclass->lang['birth_users'] : $this->ipsclass->lang['birth_user'];\n\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->birthdays( $birthstring, $count, $lang );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$count = \"\";\n\t\t\t\t\t\n\t\t\t\t\tif ( ! $this->ipsclass->vars['autohide_bday'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->birthdays( $birthstring, $count, $lang );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Are we viewing the calendar?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($this->ipsclass->vars['show_calendar'])\n\t\t{\n\t\t\t$this->ipsclass->vars['calendar_limit'] = intval($this->ipsclass->vars['calendar_limit']) < 2 ? 1 : intval($this->ipsclass->vars['calendar_limit']);\n\t\t\t\n\t\t\t$our_unix = gmmktime( 0, 0, 0, $month, $day, $year);\n\t\t\t$max_date = $our_unix + ($this->ipsclass->vars['calendar_limit'] * 86400);\n\t\t\t$events = array();\n\t\t\t$show_events = array();\n\t\t\t\n\t\t\tif( $this->ipsclass->member['org_perm_id'] )\n\t\t\t{\n\t\t\t\t$member_permission_groups = explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->member['org_perm_id'] ) );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$member_permission_groups = explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->member['g_perm_id'] ) );\n\t\t\t\t\n\t\t\t\tif( isset($this->ipsclass->member['mgroup_others']) AND $this->ipsclass->member['mgroup_others'] )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->member['mgroup_others'] = $this->ipsclass->clean_perm_string($this->ipsclass->member['mgroup_others']);\n\t\t\t\t\t\n\t\t\t\t\t$mgroup_others = explode( \",\", $this->ipsclass->member['mgroup_others'] );\n\t\t\t\t\t\n\t\t\t\t\tif( count($mgroup_others) )\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach( $mgroup_others as $mgroup )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( $mgroup )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$member_permission_groups = array_merge( $member_permission_groups, explode( \",\", $this->ipsclass->clean_perm_string( $this->ipsclass->cache['group_cache'][$mgroup]['g_perm_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\t\n\t\t\tif ( is_array($this->ipsclass->cache['calendar']) AND count( $this->ipsclass->cache['calendar'] ) )\n\t\t\t{\n\t\t\t\tforeach( $this->ipsclass->cache['calendar'] as $u )\n\t\t\t\t{\n\t\t\t\t\t$set_offset = 0;\n\n\t\t\t\t\tif( $u['event_timeset'] && !($u['event_recurring'] == 0 AND $u['event_unix_to']) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$set_offset = isset($this->ipsclass->member['time_offset']) ? $this->ipsclass->member['time_offset'] * 3600 : 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$u['_unix_from'] = $u['event_unix_from'] - $set_offset;\n\t\t\t\t\t$u['_unix_to'] = $u['event_unix_to'] - $set_offset;\n\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Private?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['event_private'] == 1 and $this->ipsclass->member['id'] != $u['event_member_id'] )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Got perms?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['event_perms'] != \"*\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$event_perms = explode( \",\", $this->ipsclass->clean_perm_string( $u['event_perms'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$check = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( count($event_perms) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach( $event_perms as $mgroup_perm )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif( in_array( $mgroup_perm, $member_permission_groups ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$check = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( !$check )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Got calendar perms?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\tif ( $u['_perm_read'] != \"*\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$read_perms = explode( \",\", $this->ipsclass->clean_perm_string( $u['_perm_read'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$check = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( count($read_perms) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach( $read_perms as $mgroup_perm )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif( in_array( $mgroup_perm, $member_permission_groups ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$check = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( !$check )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// In range?\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t\tif ( $u['event_recurring'] == 0 AND ( ( $u['event_unix_to'] >= $our_unix AND $u['event_unix_from'] <= $max_date )\n\t\t\t\t\t\tOR ( $u['event_unix_to'] == 0 AND $u['event_unix_from'] >= $our_unix AND $u['event_unix_from'] <= $max_date ) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$u['event_activetime'] = $u['_unix_from'];\n\t\t\t\t\t\t$events[ str_pad( $u['event_unix_from'].$u['event_id'], 15, \"0\" ) ] = $u;\n\t\t\t\t\t}\n\t\t\t\t\telseif( $u['event_recurring'] > 0 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$cust_range_s = $u['event_unix_from'];\n\n\t\t\t\t\t\twhile( $cust_range_s < $u['event_unix_to'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( $cust_range_s >= $our_unix AND $cust_range_s <= $max_date )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$u['event_activetime'] = $cust_range_s;\n\t\t\t\t\t\t\t\t$events[ str_pad( $cust_range_s.$u['event_id'], 15, \"0\" ) ] = $u;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif( $u['event_recurring'] == \"1\" )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cust_range_s += 604800;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif ( $u['event_recurring'] == \"2\" )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cust_range_s += 18144000;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cust_range_s += 31536000;\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}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Print...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tksort($events);\n\t\t\t\n\t\t\tforeach( $events as $event )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Recurring?\n\t\t\t\t//-----------------------------------------\n\n\t\t\t\t$c_time = '';\n\t\t\t\t$c_time = gmdate( 'j-F-y', $event['event_activetime'] );\n\t\t\t\t\n\t\t\t\t$show_events[] = \"<a href='{$this->ipsclass->base_url}act=calendar&amp;code=showevent&amp;calendar_id={$event['event_calendar_id']}&amp;event_id={$event['event_id']}' title='$c_time'>\".$event['event_title'].\"</a>\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->ipsclass->lang['calender_f_title'] = sprintf( $this->ipsclass->lang['calender_f_title'], $this->ipsclass->vars['calendar_limit'] );\n\t\t\t\n\t\t\tif ( count($show_events) > 0 )\n\t\t\t{\n\t\t\t\t$event_string = implode( $this->sep_char.' ', $show_events );\n\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->calendar_events( $event_string );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( ! $this->ipsclass->vars['autohide_calendar'] )\n\t\t\t\t{\n\t\t\t\t\t$event_string = $this->ipsclass->lang['no_calendar_events'];\n\t\t\t\t\t$stats_html .= $this->ipsclass->compiled_templates['skin_boards']->calendar_events( $event_string );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn $stats_html;\n\t\n\t}", "function main_content()\n{\n?>\n <h2>Events</h2>\n\n <div class=\"box\"><b>Where and When</b><br />\n Events take place in Room 86-01 of Portland State's \n <a href=\"http://www.fap.pdx.edu/floorplans/detail2.php?buildingID=12\">Fourth Avenue Building (FAB)</a>\n from 4:30pm to 5:30pm, unless circumstances dictate otherwise.</div>\n<?php\n\n// Are you looking for the events?\n/* To add the functionality the events section now enjoys, unfortunatly I\n * had to break the normal design style and add all the event handling to\n * the body.php script, with the actual events information stored in the \n * events_list.php script. \n * \n * events are stored in events_list.php for two reasons; so that the\n * sidebar can access them without accessing this page every time, and\n * so there is one file that is purely events information. In the future,\n * if we ever use a database to store events information, the \n * events_list.php script is the only script that would need to change.\n * \n * I would have gone with just using SQL, but it's easier to show new\n * people how to edit a text file than it is to create, maintain, and use\n * a secure form or other interface for SQL. Anyone can edit a text file,\n * but not everyone can use SQL.\n *\n * So why not call events_list.php from here and use this page to display\n * it? honestly I couldn't figure out how to. I tried and tried, but \n * aparently my understanding of php is not good enough to get it to work.\n * It seems to have something to do with how the main_content function is\n * actually run in body.php causing some scope issues. Anyways I suffered\n * enough trying to make it work that way. Give it a try if you feel like\n * it, I'm done struggling with it for now.\n *\n*/\n\n\n// Google calendar, which is now redundant.\n/*\n <!--<iframe src=\"https://www.google.com/calendar/embed?height=400&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=psuacm%40cs.pdx.edu&amp;color=%23B1440E&amp;ctz=America%2FLos_Angeles\" style=\" border-width:0 \" width=\"600\" height=\"400\" frameborder=\"0\" scrolling=\"no\"></iframe>\n\n <p>\n Sign up for the\n <a href=\"https://mailhost.cecs.pdx.edu/cgi-bin/mailman/listinfo/acm-members\">ACM Mailing List</a>\n to get messages about upcoming events.\n </p>-->\n*/\n}", "function render($events){\n\t\t// in the weekly event view\n\t\t$number_of_events=sizeof($events);\n\t\t$i=0;\n\t\t$return_val=\"\";\n\t\twhile($i<$number_of_events){\n\t\t\t$next_event=$events[$i];\n\t\t\t$return_val=$return_val.\"<a href=\\\"event_display_detail.php?event_id=\";\n\t\t\t$return_val=$return_val.($next_event->get_id());\n\t\t\t$return_val=$return_val.\"&amp;day=\".$next_event->get_start_day();\n\t\t\t$return_val.=\"&amp;month=\".$next_event->get_start_month();\n\t\t\t$return_val.=\"&amp;year=\".$next_event->get_start_year();\n\t\t\t$return_val.=\"\\\" class=\\\"eventTitle\\\">\";\n\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_title()));\n\t\t\t$return_val=$return_val.\"</a><br />\";\n\n\t\t\t$start_time_obj=$next_event->get_start_time_object();\n\t\t\t$display_timerange=$start_time_obj->get_display_time();\n\t\t\tif ($next_event->get_duration()>0){\n\t\t\t\t$end_time_obj=$next_event->get_end_time_object();\n\t\t\t\t$display_timerange=$display_timerange.\" - \".$end_time_obj->get_display_time();\n\n\t\t\t}\n\n\t\t\t$return_val=$return_val.$display_timerange.\"<br />\";\n\t\t\tif (strlen(trim($next_event->get_event_type_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_event_type_name()).\"<br />\";\n\t\t\t}\n\t\t\tif (strlen(trim($next_event->get_location_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_location_name()).\"<br />\";\n\t\t\t}\n\t\t\t$return_val=$return_val.\"<br />\";\n\t\t\t$i=$i+1;\n\t\t}\n\t\tif (strlen($return_val)==0){\n\t\t\treturn \"&nbsp;\";\n\t\t}\n\t\treturn $return_val;\n\t}", "function obj_do_cx_events_list( $events ) {\n\tif (is_array($events) ) {\n echo '<div class=\"event-list-grid\">';\n foreach ($events as $event ) {\n obj_do_cx_event_item_output($event);\n }\n echo '</div>';\n }\n}", "public static function events();", "function getEvents($date = ''){\r\n\t//Include db configuration file\r\n\tinclude 'dbConfig.php';\r\n\t$eventListHTML = '';\r\n\t$date = $date?$date:date(\"Y-m-d\");\r\n\t//Get events based on the current date\r\n\t$result = $db->query(\"SELECT title FROM cakemaker WHERE date = '\".$date.\"' AND status = 1\");\r\n\tif($result->num_rows > 0){\r\n\t\t$eventListHTML = '<h2>Events on '.date(\"l, d M Y\",strtotime($date)).'</h2>';\r\n\t\t$eventListHTML .= '<ul>';\r\n\t\twhile($row = $result->fetch_assoc()){ \r\n $eventListHTML .= '<li>'.$row['title'].'</li>';\r\n }\r\n\t\t$eventListHTML .= '</ul>';\r\n\t}\r\n\techo $eventListHTML;\r\n}", "function obj_cx_events_list_inner( $events, $bottom_banner, $pagination, $event_list_deets = null ) {\n echo '<h3 class=\"section-title green\">Upcoming events</h3>';\n obj_do_cx_events_list_filter( $events );\n obj_do_cx_events_list( $events );\n obj_do_cx_event_bottom_banner_output( $bottom_banner );\n obj_do_cx_events_list_pagination( $pagination );\n}", "function printEvents($args = array()) {\n\t \t$echo = true;\n\t \t$before = $after = '';\n\n\t \t$template = get_option('fse_template');\n\t \t$showend = get_option('fse_show_enddate');\n\n\t \tif (isset($_GET['wpcal-page'])) {\n\t \t\t$args['page'] = intval($_GET['wpcal-page']);\n\t \t} else {\n\t \t\t$args['page'] = 1;\n\t \t}\n\t \t$pagination = get_option('fse_pagination');\n\n\t \tforeach($args as $k => $a) {\n\t \t\tswitch($k) {\n\t \t\t\tcase 'echo':\n\t \t\t\t\t$echo = ($a == true ? true : false);\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'before':\n\t \t\t\t\t$before = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'after':\n\t \t\t\t\t$after = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'template':\n\t \t\t\t\t$template = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'alwaysshowenddate':\n\t \t\t\t\t$showend = ($a == true ? true : false);\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'pagination':\n\t \t\t\t\t$pagination = ($a == true ? true : false); // Allow type cast using == instead of ===$\n\t \t\t\t\tbreak;\n\t \t\t}\n\t \t}\n\n\t \t$ret = '';\n\t \t$evt = $this->getEventsExternal($args);\n\n\t \tif ($pagination) {\n\t \t\t$args['count'] = true;\n\t \t\t$count = $this->getEventsExternal($args);\n\n\t \t\t// If no pagination is needed, disabled it\n\t \t\tif (count($evt) == $count) {\n\t \t\t\t$pagination = false;\n\t \t\t}\n\t \t}\n\n\t \tforeach($evt as $e) {\n\t \t\t$ret .= $this->filterContent($template, $e);\n\t \t}\n\n\t \t$pagstr = '';\n\t \tif ($pagination) {\n\t \t\t$pagstr = $this->getEventsPagination($count, $args);\n\t \t}\n\n\t \t$ret = $pagstr.$before.$ret.$after.$pagstr;\n\n\t \tif ($echo == true)\n\t \t\techo $ret;\n\t \telse\n\t \t\treturn $ret;\n\t }", "function showEventList($groupId, $title) {\n\t\n\t//read config file for this portlet\n\t$config = new ConfigReader();\n\t$config->loadConfigFile('assets/core/config/widgets/showGroup/event_list.properties');\n\t\n\t$maxDisplay = $config->readValue('maxDisplay');\n\t$showSummary = $config->readValue('displaySummary');\n\t$w = $config->readValue('maxImageSizeX');\n\t$h = $config->readValue('maxImageSizeY');\n\t\n\t//create user groups validation object\n\t$userGroup = new CategoryUserGroupValidator();\n\t$excludeCategories = $userGroup->viewCategoryExclusionList('events');\n\t\n\t$return .= \"\t\t\t\t<div id=\\\"event_list\\\">\\n\";\n\t$return .= \"\t\t\t\t\t<div class=\\\"header\\\">$title</div>\\n\";\n\t$return .= \"\t\t\t\t\t<div class=\\\"body\\\">\\n\";\n\t$return .= \"\t\t\t\t\t\t<div id=\\\"upcoming_events_container\\\">\\n\";\n\t\n\t$todaysDate = getdate();\n\t\n\t$month = $todaysDate['mon'];\n\t$day = $todaysDate['mday'];\n\t$year = $todaysDate['year'];\n\t\n\t$getDate = $todaysDate['year'] . \"-\" . $todaysDate['mon'] . \"-\" . $todaysDate['mday'] . \" 00:00:00\";\n\t\n\t$s = 0;\n\t\n\t$result = mysql_query(\"SELECT events.id FROM events LEFT JOIN groupsMembers ON events.groupId = groupsMembers.parentId WHERE events.groupId = '{$groupId}' AND events.startDate >= '{$getDate}' AND events.publishState = 'Published'$excludeCategories AND ((events.private = '1' AND groupsMembers.parentId = events.groupId AND groupsMembers.username = '{$_SESSION['username']}' AND groupsMembers.status = 'approved') OR (events.private = '0')) GROUP BY events.id\");\n\t$totalRows = mysql_num_rows($result);\n\t\n\t//if there's nothing to display, just exit (remove this test to display \"no events currently scheduled\" message)\n\tif ($totalRows == 0) {\n\t\t\n\t\treturn;\n\t\t\n\t}\n\t\n\t$showTotalPages = ceil($totalRows / $maxDisplay);\n\n\tif ($totalRows > 0) {\n\n\t\t$showCurrentPage = floor($s / $maxDisplay) + 1;\n\n\t} else {\n\n\t\t$showCurrentPage = 0;\n\n\t}\n\t\n\t$result = mysql_query(\"SELECT events.id, events.title, events.summary, events.summaryImage, DATE_FORMAT(startDate, '%M %d, %Y %h:%i %p') AS newStartDate, DATE_FORMAT(expireDate, '%M %d, %Y %h:%i %p') AS newExpireDate FROM events LEFT JOIN groupsMembers ON events.groupId = groupsMembers.parentId WHERE events.groupId = '{$groupId}' AND events.startDate >= '{$getDate}' AND events.publishState = 'Published'$excludeCategories AND ((events.private = '1' AND groupsMembers.parentId = events.groupId AND groupsMembers.username = '{$_SESSION['username']}' AND groupsMembers.status = 'approved') OR (events.private = '0')) GROUP BY events.id ORDER BY startDate ASC, title ASC LIMIT $maxDisplay\");\n\t$count = mysql_num_rows($result);\n\t\n\tif ($count > 0) {\n\t\t\n\t\twhile ($row = mysql_fetch_object($result)) {\n\t\t\t\n\t\t\t$x++;\n\t\t\t\n\t\t\tif ($x < $count) {\n\t\t\t\t\n\t\t\t\t$style = \" event_item_row_separator\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$style = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$title = htmlentities($row->title);\n\t\t\t\n\t\t\tif (trim($row->summaryImage) != \"\") {\n\t\t\t\t\n\t\t\t\t$image = \"\t\t\t\t\t\t\t<div class=\\\"summary_image\\\">\\n<a href=\\\"/events/id/$row->id\\\"><img src=\\\"/file.php?load=$row->summaryImage&w=$w&h=$h\\\"></a></div>\\n\";\n\t\t\t\t$imageOffsetClass = \" image_offset\";\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$image = \"\";\n\t\t\t\t$imageOffsetClass = \"\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$return .= \"\t\t\t\t\t\t<div class=\\\"event_item$style\\\">\\n\";\n\t\t\t$return .= \"$image\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t<div class=\\\"details_container$imageOffsetClass\\\">\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t<div class=\\\"title\\\"><a href=\\\"/events/id/$row->id\\\">$title</a></div>\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t<table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t\t<tr><td class=\\\"start_date\\\">$row->newStartDate</td></tr><tr><td class=\\\"end_date\\\">$row->newExpireDate</td></tr>\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t\t\t</table>\\n\";\n\t\t\t\n\t\t\tif ($showSummary == \"true\") {\n\t\t\t\t\n\t\t\t\t$summary = preg_replace(\"/\\\\n/\", \"<br>\", htmlentities($row->summary));\n\t\t\t\t\t\n\t\t\t\t$return .= \"\t\t\t\t\t\t\t<div class=\\\"summary\\\">\\n\";\n\t\t\t\t$return .= \"\t\t\t\t\t\t\t\t$summary\\n\";\n\t\t\t\t$return .= \"\t\t\t\t\t\t\t</div>\\n\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$return .= \"\t\t\t\t\t\t\t</div>\\n\";\n\t\t\t$return .= \"\t\t\t\t\t\t</div>\\n\";\n\t\t\t\n\t\t}\n\t\t\n\t\t$return .= \"<div id=\\\"event_list_navigation\\\">\";\n\t\t$return .= \"\t<div class=\\\"totals\\\">$totalRows Events</div><div class=\\\"navigation\\\"><div class=\\\"pages\\\">Page: $showCurrentPage of $showTotalPages</div><div class=\\\"previous\\\"><a href=\\\"javascript:regenerateEventList('$s', 'b');\\\">Previous</a></div><div class=\\\"next\\\"><a href=\\\"javascript:regenerateEventList('$s', 'n');\\\">Next</a></div></div>\";\n\t\t$return .= \"</div>\";\n\t\t\n\t} else {\n\t\t\n\t\t$return .= \"\t\t\t\t\t\t\t<div class=\\\"event_item\\\">No events are currently scheduled.</div>\\n\";\n\t\t\n\t}\n\t\n\t$return .= \"\t\t\t\t\t\t</div>\\n\";\n\t$return .= \"\t\t\t\t\t</div>\\n\";\n\t$return .= \"\t\t\t\t</div>\\n\";\n\t\n\treturn($return);\n\t\n}", "public function viewAllEvents();", "function getEvents($date = '') {\r\n //Include db configuration file\r\n include 'dbConfig.php';\r\n $eventListHTML = '';\r\n $date = $date ? $date : date(\"Y-m-d\");\r\n //Get events based on the current date\r\n $result = $db->query(\"SELECT title FROM floralbookings WHERE date = '\" . $date . \"' AND status = 1\");\r\n if ($result->num_rows > 0) {\r\n $eventListHTML = '<h2>Events on ' . date(\"l, d M Y\", strtotime($date)) . '</h2>';\r\n $eventListHTML .= '<ul>';\r\n while ($row = $result->fetch_assoc()) {\r\n $eventListHTML .= '<li>' . $row['title'] . '</li>';\r\n }\r\n $eventListHTML .= '</ul>';\r\n }\r\n echo $eventListHTML;\r\n}", "public function indexAction() {\n\t\t$this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer();\n\t\tif (!Engine_Api::_()->core()->hasSubject()) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\t\t// Get subject and check auth\n\t\t$subject = Engine_Api::_()->core()->getSubject('event');\n\t\tif (!$subject->authorization()->isAllowed($viewer, 'view')) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n\t\t// Prepare data\n\t\t$this->view->event = $event = $subject;\n\t\t$limit =$this->_getParam('max',5);\n\t\t$currentDay = date('Y') . '-' . date('m') . '-' . date('d');\n\t\t\n\t\t$table = Engine_Api::_()->getItemTable('event');\n\t\t$select = $table->select()\n ->where('category_id = ?', $event->category_id)\n ->where('event_id != ?', $event->getIdentity())\n ->order(\"DATEDIFF('{$currentDay}', starttime) DESC\")\n ->limit($limit);\n\n\t\t$showedEvents = $table->fetchAll($select);\n\t\t$this->view->showedEvents = $showedEvents;\n\t\t// Hide if nothing to show\n\t\tif( count($showedEvents) <= 0 ) {\n\t return $this->setNoRender();\n\t }\n }", "function display() {\n\t\t$events = $this->events;\n\t\tif (!$events) return '';\n\t\t$olddate = '';\n\t\t$displaystring .= '<div class=\"gw-post\">';\n\n\t\tforeach($events as $event) {\n\t\t\t$start = $event['starttime'];\n\t\t\t// check for new dates\n\t\t\t$newdate = date('l, n/j/y', $start);\n\t\t\tif (strcmp($newdate, $olddate)) {\n\t\t\t\t// $newdate != $olddate\n\t\t\t\t$displaystring .= '<div class=\"gw-date-wrap\"><div class=\"gw-date\">' . $newdate . '</div></div>';\n\t\t\t\t$olddate = $newdate;\n\t\t\t}\n\t\t\tif ($event['isfeatured']) {\n\t\t\t $displaystring .= '<div class=\"gw-featured\">';\n\t\t\t}\n\t\t\tif ($event['post_link']) {\n\t\t\t $displaystring .= '<a href=\"'.$event['post_link'].'\">';\n\t\t\t}\n\t\t\t$displaystring .= '<div class=\"gw-event ' . $event['tag'] . '\">';\n\t\t\t$displaystring .= '<span class=\"gw-bullet\">&nbsp;</span><div class=\"gw-time\">' . date('g:i a', $start) . '</div>';\n\t\t\t$displaystring .= '<div class=\"gw-title\">' . $event['title'];\n\t\t\tif ($event['location']) {\n\t\t\t\t$displaystring .= ' @ ' . $event['location'] . $this->displayMap($event['address']);\n\t\t\t}\n\t\t\t$displaystring .= '</div>'; //close .gw-title\n\t\t\t$displaystring .= '</div>'; // close .gw-event \n\t\t\tif ($event['post_link']) {\n\t\t\t $displaystring .= '</a>';\n\t\t\t}\n\t\t\tif ($event['isfeatured']) {\n\t\t\t $displaystring .= '</div>';\n\t\t\t}\n\t\t\t\n\n\t\t} // end foreach\n\t\t\n\t\t$displaystring .= '</div>'; // close .textwidget\n\t\treturn $displaystring;\n\t}", "function displayLatestEvents()\n\t{\n\t\t$viewname = $this->getTheme();\n\n\t\t$cfg = JEVConfig::getInstance();\n\n\t\t// override global start now setting so that timelimit plugin can use it!\n\t\t$compparams = ComponentHelper::getParams(JEV_COM_COMPONENT);\n\t\t$startnow = $compparams->get(\"startnow\", 0);\n\t\t$compparams->set(\"startnow\", $this->modparams->get(\"startnow\", 0));\n\t\t$this->getLatestEventsData();\n\t\t$compparams->set(\"startnow\", $startnow);\n\n\t\t$content = \"\";\n\n\t\t$k = 0;\n\t\tif (isset($this->eventsByRelDay) && count($this->eventsByRelDay))\n\t\t{\n\t\t\t$content .= $this->getModuleHeader('<table class=\"mod_events_latest_table jevbootstrap\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">');\n\n\t\t\t// Now to display these events, we just start at the smallest index of the $this->eventsByRelDay array\n\t\t\t// and work our way up.\n\n\t\t\t$firstTime = true;\n\n\t\t\t// initialize name of com_jevents module and task defined to view\n\t\t\t// event detail. Note that these could change in future com_event\n\t\t\t// component revisions!! Note that the '$this->itemId' can be left out in\n\t\t\t// the link parameters for event details below since the event.php\n\t\t\t// component handler will fetch its own id from the db menu table\n\t\t\t// anyways as far as I understand it.\n\n\t\t\t$this->processFormatString();\n\n\t\t\tforeach ($this->eventsByRelDay as $relDay => $daysEvents)\n\t\t\t{\n\n\t\t\t\treset($daysEvents);\n\n\t\t\t\t// get all of the events for this day\n\t\t\t\tforeach ($daysEvents as $dayEvent)\n\t\t\t\t{\n\n\t\t\t\t\tif ($this->processTemplate($content, $dayEvent))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$eventcontent = \"\";\n\n\t\t\t\t\t// generate output according custom string\n\t\t\t\t\tforeach ($this->splitCustomFormat as $condtoken)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tif (isset($condtoken['cond']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($condtoken['cond'] == 'a' && !$dayEvent->alldayevent())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!a' && $dayEvent->alldayevent())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == 'e' && !($dayEvent->noendtime() || $dayEvent->alldayevent()))\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!e' && ($dayEvent->noendtime() || $dayEvent->alldayevent()))\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == '!m' && $dayEvent->getUnixStartDate() != $dayEvent->getUnixEndDate())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\telse if ($condtoken['cond'] == 'm' && $dayEvent->getUnixStartDate() == $dayEvent->getUnixEndDate())\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforeach ($condtoken['data'] as $token)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($match);\n\t\t\t\t\t\t\tunset($dateParm);\n\t\t\t\t\t\t\t$dateParm = \"\";\n\t\t\t\t\t\t\t$match = '';\n\t\t\t\t\t\t\tif (is_array($token))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$match = $token['keyword'];\n\t\t\t\t\t\t\t\t$dateParm = isset($token['dateParm']) ? trim($token['dateParm']) : \"\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (strpos($token, '${') !== false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$match = $token;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$eventcontent .= $token;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->processMatch($eventcontent, $match, $dayEvent, $dateParm, $relDay);\n\t\t\t\t\t\t} // end of foreach\n\t\t\t\t\t} // end of foreach\n\n\t\t\t\t\tif ($firstTime)\n\t\t\t\t\t\t$eventrow = '<tr class=\"jevrow' . $k . '\"><td class=\"mod_events_latest_first\">%s' . \"</td></tr>\\n\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$eventrow = '<tr class=\"jevrow' . $k . '\"><td class=\"mod_events_latest\">%s' . \"</td></tr>\\n\";\n\n\t\t\t\t\t$templaterow = $this->modparams->get(\"modlatest_templaterow\") ? $this->modparams->get(\"modlatest_templaterow\") : $eventrow;\n\t\t\t\t\t$content .= str_replace(\"%s\", $eventcontent, $templaterow);\n\n\t\t\t\t\t$firstTime = false;\n\t\t\t\t} // end of foreach\n\t\t\t\t$k++;\n\t\t\t\t$k %= 2;\n\t\t\t} // end of foreach\n\t\t\t$content .= $this->getModuleFooter(\"</table>\\n\");\n\t\t}\n\t\telse if ($this->modparams->get(\"modlatest_NoEvents\", 1))\n\t\t{\n\t\t\t$content .= $this->modparams->get(\"modlatest_templatetop\") || $this->modparams->get(\"modlatest_templatetop\") ? $this->modparams->get(\"modlatest_templatetop\") : '<table class=\"mod_events_latest_table jevbootstrap\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">';\n\t\t\t$templaterow = $this->modparams->get(\"modlatest_templaterow\") ? $this->modparams->get(\"modlatest_templaterow\") : '<tr><td class=\"mod_events_latest_noevents\">%s</td></tr>' . \"\\n\";\n\t\t\t$content .= str_replace(\"%s\", Text::_('JEV_NO_EVENTS'), $templaterow);\n\t\t\t$content .= $this->modparams->get(\"modlatest_templatebottom\") ? $this->modparams->get(\"modlatest_templatebottom\") : \"</table>\\n\";\n\t\t}\n\n\t\t$callink_HTML = '<div class=\"mod_events_latest_callink\">'\n\t\t\t. $this->getCalendarLink()\n\t\t\t. '</div>';\n\n\t\tif ($this->linkToCal == 1)\n\t\t\t$content = $callink_HTML . $content;\n\t\tif ($this->linkToCal == 2)\n\t\t\t$content .= $callink_HTML;\n\n\t\tif ($this->displayRSS)\n\t\t{\n\t\t\t$rssimg = Uri::root() . \"media/system/images/livemarks.png\";\n\t\t\t$callink_HTML = '<div class=\"mod_events_latest_rsslink\">'\n\t\t\t\t. '<a href=\"' . $this->rsslink . '\" title=\"' . Text::_(\"RSS_FEED\") . '\" target=\"_blank\">'\n\t\t\t\t. '<img src=\"' . $rssimg . '\" alt=\"' . Text::_(\"RSS_FEED\") . '\" />'\n\t\t\t\t. Text::_(\"SUBSCRIBE_TO_RSS_FEED\")\n\t\t\t\t. '</a>'\n\t\t\t\t. '</div>';\n\t\t\t$content .= $callink_HTML;\n\t\t}\n\n\t\tif ($this->modparams->get(\"contentplugins\", 0))\n\t\t{\n\t\t\t$eventdata = new stdClass();\n\t\t\t$eventdata->text = $content;\n\t\t\tFactory::getApplication()->triggerEvent('onContentPrepare', array('com_jevents', &$eventdata, &$this->modparams, 0));\n\t\t\t$content = $eventdata->text;\n\t\t}\n\n\t\treturn $content;\n\n\t}", "function insert_events( $events ){\n\t// Informationen zu den Events holen\n\t$results = eventoni_fetch('',false,$events);\n\n\t// Falls keine Informationen zu Events gefunden, aus Methode rausspringen\n\tif( $results['total'] <= 0 )\n\t{\n\t\treturn;\n\t}\n\n\t// HTML Code erstellen\n\t$result = '';\n\t$result.= '<div class=\"events-container\">';\n\t$result.= '<img src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/logo.png\" />';\n\n\t// Jedes Event durchlaufen\n\tforeach($results['xml'] as $event)\n\t{\n\t\t// Berechnung der Zeitangabe und Tageszeit als Wort\n\t\t$datetime = strtotime($event->start_date.' '.$event->start_time);\n\t\t$hours = getdate($datetime);\n\t\t$hour = $hours['hours'];\n\t\t$tageszeit = '';\n\t\tif( $hour < 6 ){\n\t\t\t$tageszeit = 'nachts';\n\t\t} else if( $hour < 12 ){\n\t\t\t$tageszeit = 'morgens';\n\t\t} else if( $hour < 14 ){\n\t\t\t$tageszeit = 'mittags';\n\t\t} else if( $hour < 18 ){\n\t\t\t$tageszeit = 'nachmittags';\n\t\t} else if( $hour < 22 ){\n\t\t\t$tageszeit = 'abends';\n\t\t} else {\n\t\t\t$tageszeit = 'nachts';\n\t\t}\n\t\t$result.= ' <div class=\"event-item\">';\n\t\t$result.= '<a class=\"event-item-link\" href=\"'.$event->permalink.'\">';\n\n\t\t// Falls kein Vorschaubild vorhanden, nehme Standardbild\n\t\tif(isset($event->media_list->media->thumbnail_url)) {\n\t\t\t$result.= '<img width=\"60px\" height\"60px\" align=\"left\" src=\"'.$event->media_list->media->thumbnail_url.'\"/>';\n\t\t} else {\n\t\t\t$result.= '<img width=\"60px\" height\"60px\" align=\"left\" src=\"http://static.eventoni.com/images/image-blank.png\"/>';\n\t\t}\n\t\t$result.= '</a>';\n\t\t$result.= '\t <div class=\"event-item-content\">';\n\t\t$result.= '\t\t<div class=\"event-item-content-date\">'.date( \"d.m.Y\", $datetime ).', '.date( \"H:i \\U\\h\\\\r\", $datetime ).'</div>';\n\t\t$result.= '\t\t<div class=\"event-item-content-city\"><img src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/my_location.png\"/> '.$event->location->city.'</div>';\n\t\t$result.= '\t </div>';\n\t\t$result.= '\t <div class=\"event-item-content-name\"><b><a class=\"event-item-link\" href=\"'.$event->permalink.'\">'.$event->title.'</a></b></div>';\n\t\t$result.= '<div style=\"float:right\"><a class=\"facebook_link\" href=\"http://www.facebook.com/sharer.php?u='.$event->permalink.'&t=Dieses Event musst Du gesehen haben: \" target=\"_blank\"><img src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/facebook.png\" /></a></div>';\n\t\t$result.= '<div style=\"float:right\"><a class=\"twitter_link\" href=\"http://twitter.com/home?status=Dieses Event musst Du gesehen haben: '.$event->permalink.'\" target=\"_blank\"><img src=\"'.get_bloginfo('wpurl').'/wp-content/plugins/eventoni-events/img/twitter.png\" /></a></div>';\n\t\t$result.= ' </div>';\n\n\t}\n\t$result.= '</div>';\n\n\t// HTML code zurückgeben\n\treturn $result;\n}", "public function showEvent()\n {\n switch($this->logo){\n case 'default':\n $logo = '<img src=\"public/img/default/event.png\" alt=\"WorldEsport logo\">';\n break;\n default:\n $logo = '<img src=\"inc/img/imgempevents.php?imgname='. $this->logo .'&u='. $this->currentUser->pk_iduser .'\" alt=\"WorldEsport employee events logo\">';\n }\n\n //test de la presence de description ou non\n switch($this->description){\n case true:\n $description = '<div class=\"info-line collapse\" id=\"collapse'. substr(str_replace($this->unauthorizedChar,'',$this->name),0,15) . str_replace($this->unauthorizedChar,'',$this->startdate) .'\">\n <p class=\"info-decription\">' . $this->description . '</p>\n </div>';\n $btcollapse = '<div class=\"bt-more-container\">\n <button class=\"share-button bt\" data-toggle=\"collapse\" href=\"#collapse'. substr(str_replace($this->unauthorizedChar,'',$this->name),0,15) . str_replace($this->unauthorizedChar,'',$this->startdate) .'\">\n '. $this->langFile[$this->pageName]->bt_myprofile_gamer_moredetails .'\n </button>\n </div>';\n break;\n default:\n $description = '<div class=\"info-line collapse\">\n <p class=\"info-decription\">' . $this->description . '</p>\n </div>';\n $btcollapse = '';\n }\n\n $content = ' <div class=\"profile-elem profil-event-container col-md-12\" data-elem=\"'.$this->id.'\">\n <div class=\"profile-aside-container\">\n <div class=\"loader-container loader-elem-bloc loader-profile-elem\">\n <div class=\"loader-double-container\">\n <span class=\"loader loader-double\">\n </span>\n </div>\n </div>\n <div class=\"edit-container\">\n <div class=\"edit-ico-container\">\n <div class=\"edit-gear edit-profile-bloc-elem ico-gear\"></div> \n </div>\n <div class=\"edit-options\">\n \n </div>\n </div>\n <div class=\"profile-bloc-elem-left col-md-9\">\n <div class=\"infos-container col-md-12\">\n <div class=\"info-line\">\n <p class=\"info\">'. $this->name .'</p>\n </div>\n <div class=\"info-line\">\n <p class=\"info\">'. $this->jobtitle .' '. $this->langGenerals->word_at .' </p><p class=\"info\">'. $this->company .'</p>\n </div> \n <div class=\"info-line\">\n <p class=\"info\">' . $this->dayStart . ' ' . $this->monthStart . ' ' . $this->yearStart . ' - </p><p class=\"info\">' . $this->dayEnd . ' ' . $this->monthEnd . ' ' . $this->yearEnd . '</p>\n </div>\n '. $description .' \n </div> \n '. $btcollapse .' \n </div> \n <div class=\"profile-bloc-elem-right col-md-3\">\n <div class=\"pic\">\n '. $logo .'\n </div>\n </div>\n </div> \n </div>';\n\n return $content;\n }", "function render_list($events,$detail_flag){\n\t\t$number_of_events=sizeof($events);\n\t\t$i=0;\n\t\t$return_val=\"\";\n\n\t\t$return_val=$return_val.\"<table>\";\n\t\twhile($i<$number_of_events){\n\t\t\t$next_event=$events[$i];\n\n\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\n\t\t\tif ($detail_flag==\"off\") {\n\t\t\t\t$return_val=$return_val.\"<b>\";\n\t\t\t}\n\t\t\t$return_val=$return_val.\"(\".($i+1).\")&nbsp;&nbsp;\";\n\t\t\tif ($detail_flag==\"on\") {\n\t\t\t\t$return_val=$return_val.\"<a href=\\\"#\".($i+1).\"\\\">\";\n\t\t\t}\n\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_title()));\n\t\t\tif ($detail_flag==\"off\") {\n\t\t\t\t$return_val=$return_val.\"</b>\";\n\t\t\t}\n\n\t\t\tif ($detail_flag==\"on\") {\n\t\t\t\t$return_val=$return_val.\"</a>\";\n\t\t\t}\n\n\t\t\t$return_val=$return_val.'<br />';\n\t\t\t$date=$next_event->get_start_date_object();\n\t\t\t$return_val=$return_val.date(\"D\", $date->timestamp).\"&nbsp;\";\n\t\t\t$return_val=$return_val.date(\"M\", $date->timestamp).\".&nbsp;\";\n\t\t\t$return_val=$return_val.$next_event->get_start_day().\",&nbsp;\";\n\n\t\t\t$start_time_obj=$next_event->get_start_time_object();\n\t\t\t$display_timerange=$start_time_obj->get_display_time();\n\t\t\tif ($next_event->get_duration()>0){\n\t\t\t\t$end_time_obj=$next_event->get_end_time_object();\n\t\t\t\t$display_timerange=$display_timerange.\" - \".$end_time_obj->get_display_time();\n\t\t\t}\n\n\t\t\t$return_val=$return_val.$display_timerange.\"&nbsp;-&nbsp;\";\n\t\t\tif (strlen(trim($next_event->get_location_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_location_name()).\"&nbsp;\";\n\t\t\t}\n\n\t\t\t$return_val=$return_val.'<br />';\n\t\t\t$return_val=$return_val.'Event Topic:&nbsp;&nbsp;'.(htmlspecialchars($next_event->get_event_topic_name()));\n\n\t\t\t$return_val=$return_val.'<br />';\n\t\t\t$return_val=$return_val.'Event Type:&nbsp;&nbsp;'.(htmlspecialchars($next_event->get_event_type_name()));\n\n\t\t\t$return_val=$return_val.\"</td></tr>\";\n\t\t\t$i=$i+1;\n\t\t}\n\n\t\tif ($detail_flag==\"on\") {\n\n\t\t\tif ($number_of_events >0)\n\t\t\t\t$return_val=$return_val.\"<tr><td>---------------------------------------------------</td></tr>\";\n\t\t\t$i=0;\n\n\t\t\twhile($i<$number_of_events){\n\t\t\t\t$next_event=$events[$i];\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\"><b>';\n\t\t\t\t$return_val=$return_val.'<a name=\"'.($i+1).'\"></a>';\n\t\t\t\t$return_val=$return_val.\"(\".($i+1).\")&nbsp;&nbsp;\";\n\t\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_title()));\n\t\t\t\t$return_val=$return_val.\"</b></td></tr>\";\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\t\t\t\t$date=$next_event->get_start_date_object();\n\n\t\t\t\t$return_val=$return_val.date(\"D\", $date->timestamp).\"&nbsp;\";\n\t\t\t\t$return_val=$return_val.date(\"M\", $date->timestamp).\".&nbsp;\";\n\t\t\t\t$return_val=$return_val.$next_event->get_start_day().\",&nbsp;\";\n\n\t\t\t\t$start_time_obj=$next_event->get_start_time_object();\n\t\t\t\t$display_timerange=$start_time_obj->get_display_time();\n\t\t\t\tif ($next_event->get_duration()>0){\n\t\t\t\t\t$end_time_obj=$next_event->get_end_time_object();\n\t\t\t\t\t$display_timerange=$display_timerange.\" - \".$end_time_obj->get_display_time();\n\t\t\t\t}\n\n\t\t\t\t$return_val=$return_val.$display_timerange;\n\t\t\t\t$return_val=$return_val.'<br />';\n\n\t\t\t\tif (strlen(trim($next_event->get_location_name()))>0){\n\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_location_name()).\"&nbsp;\";\n\t\t\t\t}\n\n\t\t\t\t$return_val=$return_val.'<br />';\n\n\t\t\t\t$return_val=$return_val.(htmlspecialchars($next_event->get_location_details()));\n\t\t\t\t$return_val=$return_val.'</td></tr>';\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\t\t\t\t$return_val=$return_val.\"Contact:<br />\";\n\n\t\t\t\tif (strlen(trim($next_event->get_contact_name()))>0){\n\t\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_contact_name()).\"<br />\";\n\t\t\t\t}\n\t\t\t\tif (strlen(trim($next_event->get_contact_phone()))>0){\n\t\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_contact_phone()).\"<br />\";\n\t\t\t\t}\n\t\t\t\tif (strlen(trim($next_event->get_contact_email()))>0){\n\t\t\t\t\t$return_val=$return_val.htmlspecialchars($next_event->get_contact_email()).\"<br />\";\n\t\t\t\t}\n\n\t\t\t\t$return_val=$return_val.'</td><tr>';\n\n\t\t\t\t$return_val=$return_val.'<tr><td>&nbsp;</td></tr>';\n\n\t\t\t\t$return_val=$return_val.'<tr><td class=\"eventText\">';\n\t\t\t\t$return_val=$return_val.(nl2br($next_event->get_description()));\n\t\t\t\t$return_val=$return_val.'</td></tr>';\n\n\t\t\t\t$return_val=$return_val.\"<tr><td>&nbsp;</td></tr>\";\n\t\t\t\t$i=$i+1;\n\t\t\t}\n\t\t}\n\n\t\t$return_val=$return_val.'</table>';\n\n\t\tif (strlen($return_val)==0){\n\t\t\treturn \"&nbsp;\";\n\t\t}\n\t\treturn $return_val;\n\t}", "function wp_print_community_events_markup()\n {\n }", "public function actionEvents()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render('events');\n\t}", "function listEventTitle($e_id) {\n\t\t$e_id = mysql_real_escape_string($e_id);\n\t\t$this->eid = $e_id;\n\t\t$query = \"SELECT e_title, v.name, start_datetime, end_datetime \n\t\tFROM yam14.F_event e, yam14.F_venue v \n\t\tWHERE e.venue_id = v.v_id\n\t\tAND e_id = $this->eid;\";\n\t\t\n\t\t$result = mysql_query($query);\n\t\tif (!$result) {\n\t\t\t$message='Invalid Query' .mysql_errno().\" \\n\";\n\t\t $message .= 'Whole Query' . $query;\n\t\t die($message);\n\t\t}//end if\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t\n\t\t\t$this->title = $row['e_title'];\n\t\t\t$this->venue = $row['name'];\n\t\t\t$this->startdate = date('l, M d, Y',strtotime($row['start_datetime']));\n\t\t\t$this->starttime = date('H:i A',strtotime($row['start_datetime']));\n\t\t\t$this->enddate = date('l, M d, Y',strtotime($row['end_datetime']));\n\t\t\t$this->endtime =date('H:i A',strtotime($row['end_datetime']));\n\t\t\t\n\t\t\techo \"<div>\";\n\t\t\techo \"<h3>$this->title</h3>\";\n\t\t\techo \"<h4>$this->venue</h4>\";\n\t\t\techo \"<h4>From $this->startdate $this->starttime </h4><h4>To $this->enddate $this->endtime </h4>\";\n\t\t\techo \"<hr />\";\n\t\t\techo \"</div>\";\n\t\t}\t\n\t\t\n\t\tmysql_free_result($result);\n\t\t\n\t}", "private function makeDayEventListHTML()\n\t{\n\t\t$showtext = \"\";\n\t\tforeach($this->eventItems as $item) {\n\t\t\tif($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) {\n\t\t\t\t$category = (strlen($item['cat']) > 0 ? 'Category: '.$item['cat'].' - ' : '');\n\t\t\t\t$outevents[$n]['category'] = $item['cat'];\n\t\t\t\t\n\t\t\t\tif($item['stdurl']) {\n\t\t\t\t\t$href = '<a href=\"'.$item['url'].'?id='.$item['id'].'\" title=\"'.$category.$item['desc'].'\">'.$item['text'].'</a>';\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'].'?id='.$item['id'];\n\t\t\t\t} else {\n\t\t\t\t\t$href = (strlen($item['url']) > 0 ? '<a href=\"'.$item['url'].'\" title=\"'.$category.$item['desc'].'\">'.$item['text'].'</a>' : $item['text']);\n\t\t\t\t\t$outevents[$n]['url'] = $item['url'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$style = (strlen($item['catcolor']) > 0 ? ' style=\"background-color:#'.str_replace('#','',$item['catcolor']).';\" ' : ' style=\"background-color:#eeeeee;\" ');\n\t\t\t\t\n\t\t\t\t$showtext .= \"\\n\\t\\t\\t<div class=\\\"dayContent\\\"\".$style.\">\".$href.\"</div>\\n\\t\\t\";\n\t\t\t\t\n\t\t\t\t$outevents[$n]['summary'] = $item['text'];\n\t\t\t\t$outevents[$n]['description'] = $item['desc'];\n\t\t\t\t$outevents[$n]['categorycolor'] = (strlen($item['catcolor']) > 0 ? str_replace('#','',$item['catcolor']) : '#eeeeee');\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\treturn $showtext;\n\t}", "public function show(events $events)\n {\n //\n }", "public function getEvents();", "public function getEvents();", "function ajax_event_table_basic($db, $eventID)\r\n{\r\n?>\r\n<table class='pizzaOrder'>\r\n<tr>\r\n\t<td class='MANheader' width='600px' colspan='2'>\r\n\t&nbsp;&nbsp;Current Events: \r\n\t<font size=\"2\" class=\"subtitle\">Click on an event to see more information below</font></td>\r\n</tr>\r\n\r\n<?php\r\n$query = \"SELECT * FROM event WHERE startDate >= CURDATE() AND event_started != 2 ORDER BY startDate ASC\";\r\n$result = $db->query($query);\r\nif ($result->num_rows == 0)\r\n{\r\n\techo '<tr><td><i>There are no current events in the system</i></td></tr>';\r\n\tdie();\r\n}\r\n\r\n\r\n// Now we can output the option fields to populate the list box.\r\nfor ($i=0; $i<$result->num_rows; $i++) \r\n{\r\n\t$row = $result->fetch_assoc(); \r\n\r\n\techo '<tr class=\"pointer\" id=\"eventRow_'.$i.'\" onclick=\"getEvent('.$row[\"eventID\"].')\">';\r\n\t\techo '<td width=\"70px\">';\r\n\t\t\techo '<div style=\"position: relative; top: 5px;\">';\r\n\t\t?>\r\n\t\t\t<!-- // DELETE EVENT BUTTON -->\r\n\t\t\t<img class=\"pointer\"\r\n\t\t\t\tsrc=\"../images/buttons/delete_60.png\"';\r\n\t\t\t\talt=\"Delete this event\" \r\n\t\t\t\tonclick=\"deleteEvent(<?php echo $row[\"eventID\"]; ?>, '<?php echo $row[\"event_name\"]; ?>')\" />\r\n\t\t<?php\r\n\t\t\techo '</div>';\r\n\t\techo '</td>';\r\n\t\techo '<td>';\r\n\t\t\techo $row['event_name'];\r\n\t\t\techo '&nbsp;-&nbsp;<font size=\"1\">['.dateToScreen($row['startDate']).']</font>';\r\n\t\techo '</td>';\r\n\techo '</tr>';\r\n}\r\necho '</table>';\r\n?>\r\n\r\n\r\n\r\n\r\n\r\n<?php\r\n\t//Create the general select query.\r\n $query = \"SELECT * FROM event WHERE startDate >= CURDATE() AND eventID=\".$eventID.\";\"; \t\r\n $result = $db->query($query); \t\t\t\r\n\r\n\r\n\t//use it first for the title\t\r\n $row1 = $result->fetch_array(MYSQLI_BOTH);\t\t\r\n\t\r\n\t//then close it ready for the next execution\r\n $result->close();\t\t\t\t\t\t\t\t\r\n $result = $db->query($query); \t\r\n\r\n\r\n\techo '<br />';\r\n\r\n\r\necho '<table class=\"pizzaOrder\">';\r\n $on = 'this.src=\"../images/buttons/edit_dwn.png\"';\r\n $off = 'this.src=\"../images/buttons/edit_up.png\"';\r\n\r\n echo '<tr>';\r\n\t\techo '<td colspan=\"2\" id=\"headCell_left\">&nbsp;&nbsp;';\r\n\t\techo '<font class=\"subtitle\" style=\"font-size: 14pt;\">'.$row1['event_name'].'</font></td>';\r\n\t\techo '<td id=\"headCell_right\">';\r\n\t\techo '<img class=\"button\" src=\"../images/buttons/edit_dwn.png\"';\r\n\t\t\techo 'alt=\"Edit The Selected Event\" onclick=\"editEvent('.$row1['eventID'].')\"';\r\n\t\t\techo 'onmouseover='.$off.' onmouseout='.$on.' /></td>';\r\n\techo '</tr>';\r\n\r\n\t\t\t\t\t\r\n\t//While Loop starts here - \r\n\t// Retrieve the data for the table. There should only be one row.\r\n\twhile($row = $result->fetch_assoc())\r\n\t{\r\n\t\techo '<tr>';\r\n\t\t\techo '<td width=\"150px\"><b>Event Location: </b></td>';\r\n\t\t\techo '<td>'.$row['event_location'].'</td>';\r\n\t\t\techo '<td>&nbsp;</td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Start Date: </b></td>';\r\n\t\t\techo '<td>'.dateToScreen($row['startDate']).'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Day Count: </b></td>';\r\n\t\t\techo '<td>'.$row['days'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Start Time: </b></td>';\r\n\t\t\techo '<td>'.$row['startTime'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Server IP Address: </b></td>';\r\n\t\t\techo '<td>'.$row['server_IP_address'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\techo '<tr>';\r\n\t\t\techo '<td><b>Number of Seats: </b></td>';\r\n\t\t\techo '<td>'.$row['seatQuantity'].'</td>';\r\n\t\t\techo '<td></td>';\r\n\t\techo '</tr>';\r\n\r\n\t\t$on = 'this.src=\"../images/buttons/stop_dwn.png\"';\r\n\t\t$off = 'this.src=\"../images/buttons/stop.png\"';\r\n\t\t\r\n\t\t$on1 = 'this.src=\"../images/buttons/start_dwn.png\"';\r\n\t\t$off1 = 'this.src=\"../images/buttons/start.png\"';\r\n\r\n\t\t// If the event has started place the stop event button in the table.\r\n\t\tif($row['event_started'] == 1) \r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\techo '<td>Yes</td>';\r\n\t\t\techo '<td><img src=\"../images/buttons/stop_dwn.png\" class=\"button\"'; \r\n\t\t\t\techo 'alt=\"Stop the current event.\" onclick=\"stopEvent(' . $row['eventID'] . ')\" ';\r\n\t\t\t\techo 'onmouseover='.$off.' onmouseout='.$on.' /></td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t\t// If the event has not started place the start event button in the table. \r\n\t\t\r\n\r\n\t\t\r\n\t\telseif ($row['event_started'] == 0)\r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\t\techo '<td>No</td>';\r\n\t\t\t\techo '<td><img src=\"../images/buttons/start_dwn.png\" class=\"button\"';\r\n\t\t\t\t\techo 'alt=\"Start the selected event. Stops all others.\" onclick=\"startEvent(' . $row['eventID'] . ')\"'; \r\n\t\t\t\t\techo 'onmouseover='.$off1.' onmouseout='.$on1.' /></td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t\t// If the event has completed or been stopped. \r\n\t\telseif ($row['event_started'] == 2)\r\n\t\t{\r\n\t\t\techo '<tr>';\r\n\t\t\t\techo '<td><b>Event Started: </b></td>';\r\n\t\t\t\techo '<td>Finished</td>';\r\n\t\t\t\techo '<td>&nbsp;</td>';\r\n\t\t\techo '</tr>';\r\n\t\t}\r\n\t}\r\necho '</table>';\r\n}", "function display_day()\n{\n global $phpcid, $phpc_cal, $phpc_script, $phpcdb, $day, $month, $year;\n\n\t$monthname = month_name($month);\n\n $results = $phpcdb->get_occurrences_by_date($phpcid, $year, $month, $day);\n\n\t$have_events = false;\n\n\t$html_table = tag('table', attributes('class=\"phpc-main\"'),\n\t\t\ttag('caption', \"$day $monthname $year\"),\n\t\t\ttag('thead',\n\t\t\t\ttag('tr',\n\t\t\t\t\ttag('th', __('Title')),\n\t\t\t\t\ttag('th', __('Time')),\n\t\t\t\t\ttag('th', __('Description'))\n\t\t\t\t )));\n\tif($phpc_cal->can_modify()) {\n\t\t$html_table->add(tag('tfoot',\n\t\t\t\t\ttag('tr',\n\t\t\t\t\t\ttag('td',\n\t\t\t\t\t\t\tattributes('colspan=\"4\"'),\n\t\t\t\t\t\t\tcreate_hidden('action', 'event_delete'),\n\t\t\t\t\t\t\tcreate_hidden('day', $day),\n\t\t\t\t\t\t\tcreate_hidden('month', $month),\n\t\t\t\t\t\t\tcreate_hidden('year', $year),\n\t\t\t\t\t\t\tcreate_submit(__('Delete Selected'))))));\n\t}\n\n\t$html_body = tag('tbody');\n\n\twhile($row = $results->fetch_assoc()) {\n\t\n\t\t$event = new PhpcOccurrence($row);\n\n\t\tif(!$event->can_read())\n\t\t\tcontinue;\n\n\t\t$have_events = true;\n\n\t\t$eid = $event->get_eid();\n\t\t$oid = $event->get_oid();\n\n\t\t$html_subject = tag('td');\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(create_checkbox('eid[]',\n\t\t\t\t\t\t$eid));\n\t\t}\n\n\t\t$html_subject->add(create_occurrence_link(tag('strong',\n\t\t\t\t\t\t$event->get_subject()),\n\t\t\t\t\t'display_event', $oid));\n\n\t\tif($event->can_modify()) {\n\t\t\t$html_subject->add(\" (\");\n\t\t\t$html_subject->add(create_event_link(\n\t\t\t\t\t\t__('Modify'), 'event_form',\n\t\t\t\t\t\t$eid));\n\t\t\t$html_subject->add(')');\n\t\t}\n\n\t\t$html_body->add(tag('tr',\n\t\t\t\t\t$html_subject,\n\t\t\t\t\ttag('td', $event->get_time_span_string()),\n\t\t\t\t\ttag('td', attributes('class=\"phpc-desc\"'), $event->get_desc())));\n\t}\n\n\t$html_table->add($html_body);\n\n\tif($phpc_cal->can_modify()) {\n\t\t$output = tag('form',\n\t\t\t\tattributes(\"action=\\\"$phpc_script\\\"\"),\n\t\t\t\t$html_table);\n\t} else {\n\t\t$output = $html_table;\n\t}\n\n\tif(!$have_events)\n\t\t$output = tag('h2', __('No events on this day.'));\n\n\treturn tag('', create_day_menu(), $output);\n}", "function getEvents(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('is_closed'=>false));\r\n\t\t$recordSet = $this->db->get(TBL_EVENTS);\r\n\t\t$events=$recordSet->result() ;\t\t\r\n\t\t//return json_encode($events);\r\n\t\tif (stristr($_SERVER[\"HTTP_ACCEPT\"],\"application/xhtml+xml\") ) {\r\n\t\t\t\theader(\"Content-type: application/xhtml+xml\"); } \r\n\t\telse{\r\n\t\t\t\theader(\"Content-type: text/xml\");\r\n\t\t}\r\n\t\t$xml=\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\";\r\n\t\t$xmlinner=\"\";\r\n\t\t$xmlinner=\"<newslist title=\\\"Event Calendar:\\\">\";\r\n\t\tforeach($events as $row){\r\n\t\t\t$xmlinner=$xmlinner.\"<news url=\\\"javascript:void(0)\\\" date='\".dateformat($row->event_date).\"' time='\".$row->event_time.\"'>\";\r\n\t\t\t$xmlinner=$xmlinner.\"<headline><![CDATA[\".$row->title.\"]]></headline>\";\r\n\t\t\t$xmlinner=$xmlinner.\"<detail><![CDATA[\".$row->venue.\"]]></detail>\";\r\n\t\t\t$xmlinner=$xmlinner.\"</news>\";\t\t\t\r\n\t\t}\r\n\t\t$xmlinner=$xmlinner.\"</newslist>\";\r\n\t\treturn $xml.$xmlinner;\r\n\t}", "function getEvents($date = '') {\n include 'config.php';\n $eventListHTML = '';\n $date = $date ? $date : date(\"Y-m-d\");\n //Get events based on the current date\n $result = $con->query(\"SELECT * FROM med_records WHERE entry_date = '\" . $date . \"' \");\n if ($result->num_rows > 0) {\n $eventListHTML = '<h2>Events on ' . date(\"l, d M Y\", strtotime($date)) . '</h2>';\n $eventListHTML .= '<td>';\n while ($row = $result->fetch_assoc()) {\n $eventListHTML .= '<td>' . $row['emp_name'] . '</td>';\n }\n $eventListHTML .= '</td>';\n }\n echo $eventListHTML;\n}", "function printEventsList($args = array()) {\n\t \t$echo = true;\n\t \t$before = $after = '';\n\n\t \t$template = get_option('fse_template_lst');\n\t \t$groupby = get_option('fse_groupby');\n\t \t$groupby_hdr = get_option('fse_groupby_header');\n\n\t \t$pagination = get_option('fse_pagination');\n\n\t \tif (isset($_GET['wpcal-page'])) {\n\t \t\t$args['page'] = intval($_GET['wpcal-page']);\n\t \t} else {\n\t \t\t$args['page'] = 1;\n\t \t}\n\n\t \tforeach($args as $k => $a) {\n\t \t\tswitch($k) {\n\t \t\t\tcase 'echo':\n\t \t\t\t\tif (is_bool($a))\n\t \t\t\t\t$echo = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'before':\n\t \t\t\t\t$before = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'after':\n\t \t\t\t\t$after = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'template':\n\t \t\t\t\t$template = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'groupby':\n\t \t\t\t\tif (in_array($a, array('','d','m','y')))\n\t \t\t\t\t$groupby = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'groupby_header':\n\t \t\t\t\t$groupby_hdr = $a;\n\t \t\t\t\tbreak;\n\t \t\t\tcase 'pagination':\n\t \t\t\t\t$pagination = ($a == true ? true : false); // Allow type cast using == instead of ===$\n\t \t\t\t\tbreak;\n\n\t \t\t}\n\t \t}\n\n\t \t// Sort must be by date, the user can choos, if asc or desc...\n\t \tif (isset($filter['orderby'])) {\n\t \t\tunset($filter['orderby']);\n\t \t}\n\t \t$filter['orderby'] = array('datefrom');\n\n\t \tif (isset($filter['orderdir'])) {\n\t \t\t$dir = $filter['orderdir'];\n\t \t\tif (isset($dir[0]))\n\t \t\t$dir = $dir[0];\n\t \t\telse\n\t \t\t$dir = 'asc';\n\t \t\tunset($filter['orderdir']);\n\t \t} else {\n\t \t\t$dir = 'asc';\n\t \t}\n\t \t$filter['orderdir'] = array($dir);\n\n\t \t$ret = '';\n\n\t \t$evt = $this->getEventsExternal($args);\n\n\n\t \tif ($pagination) {\n\t \t\t$args['count'] = true;\n\t \t\t$count = $this->getEventsExternal($args);\n\n\t \t\t// If no pagination is needed, disabled it\n\t \t\tif (count($evt) == $count) {\n\t \t\t\t$pagination = false;\n\t \t\t}\n\t \t}\n\n\t \tif ($evt !== false) {\n\t \t\t$d = $m = $y = -1;\n\t \t\tforeach($evt as $e) {\n\t \t\t\t$dn = $e->getStart('d');\n\t \t\t\t$mn = $e->getStart('m');\n\t \t\t\t$yn = $e->getStart('y');\n\n\t \t\t\tif (($groupby == 'y' && $yn != $y) ||\n\t \t\t\t($groupby == 'm' && ($yn != $y || $mn != $m)) ||\n\t \t\t\t($groupby == 'd' && ($yn != $y || $mn != $m || $dn != $d))) {\n\n\t \t\t\t\t//echo $yn.'-'.$y.':'.$mn.'-'.$m.'<br />';\n\n\t \t\t\t\tif ($d != -1) {\n\t \t\t\t\t\t$ret .= '</ul></li>';\n\t \t\t\t\t}\n\t \t\t\t\t$ret .= '<li class=\"event_header\">'.$e->getStart($groupby_hdr).'<ul class=\"events\">';\n\t \t\t\t\t$d = $dn;\n\t \t\t\t\t$m = $mn;\n\t \t\t\t\t$y = $yn;\n\t \t\t\t}\n\t \t\t\t$ret .= '<li class=\"event\" id=\"event-'.$e->eventid.'\">';\n\t \t\t\t$ret .= $this->filterContent($template, $e);\n\t \t\t\t$ret .= '</li>';\n\t \t\t}\n\t \t\tif ($d != -1) {\n\t \t\t\t$ret .= '</ul></li>';\n\t \t\t}\n\t \t}\n\n\t \t$pagstr = '';\n\t \tif ($pagination) {\n\t \t\t$pagstr = $this->getEventsPagination($count, $args);\n\t \t}\n\n\t \t$ret = $pagstr.$before.'<ul class=\"groups\">'.$ret.'</ul>'.$after.$pagstr;\n\n\t \tif ($echo == true)\n\t \t\techo $ret;\n\t \telse\n\t \t\treturn $ret;\n\t }", "function submitted_events_create_about_page() {\n\techo '\n\t<div class=\"wrap\">\n\t\t<h2>How to use the Submitted Events plugin</h2>\n\t\t<p>Plugin created by Graham S. Horn ([email protected]) in November 2016.</p>\n\t\t<p>(Optional: If you click on <strong>Submitted Events</strong> you can see how many pending submissions there are.)</p>\n\t\t<p>Click on <strong>Auto Generate</strong> and Events will be automatically added for all pending submissions. These will have <code>draft</code> status. When you have finished editing the event you should click on the <strong>publish</strong> button to make the event visible (Previewing your changes is a good idea). You may want to switch to the visual editor if the generated HTML is hard to read.</p>\n\t\t<p>This plugin was written specifically for the Brunel <strong>Walk Submit Form</strong> in the Form Maker plugin (form version as of 5 November 2016); if this form is changed in any way then this plugin is likely to break. Contact the author for support.</p>\n\t</div>\t\n\t';\n}", "function noEventsMsg() {\r\n\techo <<<noevents\r\n\t<div class='wrapper wide topmargin'>\r\n\t\t<h1 class='center'>It seems like you don't have any events added!</h1><br />\r\n\t\t<h1 class='center'>Return to Menu to create an event.</h1><br />\r\n\t\t<div class='center'>\r\n\t\t\t<a href='menu.php' class='btn btn-large btn-primary'>Back to Menu</a>\r\n\t\t</div>\r\n\t\t\r\n\t</div>\r\nnoevents;\r\n\tdie();\r\n}", "public function showUserEvent()\n {\n switch($this->logo){\n case 'default':\n $logo = '<img src=\"public/img/default/event.png\" alt=\"WorldEsport logo\">';\n break;\n default:\n $logo = '<img src=\"inc/img/imgempevents.php?imgname='. $this->logo .'&u='. $this->userToDisplay->pk_iduser .'\" alt=\"WorldEsport employee events logo\">';\n }\n\n //test de la presence de description ou non\n switch($this->description){\n case true:\n $description = '<div class=\"info-line collapse\" id=\"collapse'. substr(str_replace($this->unauthorizedChar,'',$this->name),0,15) . str_replace($this->unauthorizedChar,'',$this->startdate) .'\">\n <p class=\"info-decription\">' . $this->description . '</p>\n </div>';\n $btcollapse = '<div class=\"bt-more-container\">\n <button class=\"share-button bt\" data-toggle=\"collapse\" href=\"#collapse'. substr(str_replace($this->unauthorizedChar,'',$this->name),0,15) . str_replace($this->unauthorizedChar,'',$this->startdate) .'\">\n '. $this->langFile[$this->pageName]->bt_myprofile_gamer_moredetails .'\n </button>\n </div>';\n break;\n default:\n $description = '<div class=\"info-line collapse\">\n <p class=\"info-decription\">' . $this->description . '</p>\n </div>';\n $btcollapse = '';\n }\n\n $content = ' <div class=\"profile-elem profil-event-container col-md-12\" data-elem=\"'.$this->id.'\">\n <div class=\"profile-aside-container\"> \n <div class=\"profile-bloc-elem-left col-md-9\">\n <div class=\"infos-container col-md-12\">\n <div class=\"info-line\">\n <p class=\"info\">'. $this->name .'</p>\n </div>\n <div class=\"info-line\">\n <p class=\"info\">'. $this->jobtitle .' '. $this->langGenerals->word_at .' </p><p class=\"info\">'. $this->company .'</p>\n </div> \n <div class=\"info-line\">\n <p class=\"info\">' . $this->dayStart . ' ' . $this->monthStart . ' ' . $this->yearStart . ' - </p><p class=\"info\">' . $this->dayEnd . ' ' . $this->monthEnd . ' ' . $this->yearEnd . '</p>\n </div>\n '. $description .' \n </div> \n '. $btcollapse .' \n </div> \n <div class=\"profile-bloc-elem-right col-md-3\">\n <div class=\"pic\">\n '. $logo .'\n </div>\n </div>\n </div> \n </div>';\n\n return $content;\n }", "public function eventsAction()\n {\n $events = $this->manager->getRepository('Event\\Doctrine\\Orm\\Event')->findBy(array(), array('date' => 'ASC'));\n\n return $this->renderView('events', array(\n 'title' => 'Zusammenfassung der Grillveranstaltungen',\n 'events' => $events,\n 'meals' => $this->createMealsList($events),\n ));\n }", "function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array(), $var=false)\n{\n\tglobal $db;\n\tglobal $user, $conf, $langs, $hookmanager, $action;\n\tglobal $filter, $filtert, $status, $actioncode;\t// Filters used into search form\n\tglobal $theme_datacolor;\t// Array with a list of different we can use (come from theme)\n\tglobal $cachethirdparties, $cachecontacts, $colorindexused;\n\tglobal $begin_h, $end_h;\n\n\t$cases1 = array();\t// Color first half hour\n\t$cases2 = array(); // Color second half hour\n\n\t$curtime = dol_mktime(0, 0, 0, $month, $day, $year);\n\n\t$i=0; $nummytasks=0; $numother=0; $numbirthday=0; $numical=0; $numicals=array();\n\t$ymd=sprintf(\"%04d\",$year).sprintf(\"%02d\",$month).sprintf(\"%02d\",$day);\n\n\t$nextindextouse=count($colorindexused);\t// At first run, this is 0, so fist user has 0, next 1, ...\n\t//if ($username->id && $day==1) var_dump($eventarray);\n\n\t// We are in a particular day for $username, now we scan all events\n\tforeach ($eventarray as $daykey => $notused)\n\t{\n\t\t$annee = date('Y',$daykey);\n\t\t$mois = date('m',$daykey);\n\t\t$jour = date('d',$daykey);\n\t\t//print $annee.'-'.$mois.'-'.$jour.' '.$year.'-'.$month.'-'.$day.\"<br>\\n\";\n\n\t\tif ($day==$jour && $month==$mois && $year==$annee)\t// Is it the day we are looking for when calling function ?\n\t\t{\n\t\t\t// Scan all event for this date\n\t\t\tforeach ($eventarray[$daykey] as $index => $event)\n\t\t\t{\n\t\t\t\t//var_dump($event);\n\n\t\t\t\t$keysofuserassigned=array_keys($event->userassigned);\n\t\t\t\tif (! in_array($username->id,$keysofuserassigned)) continue;\t// We discard record if event is from another user than user we want to show\n\t\t\t\t//if ($username->id != $event->userownerid) continue;\t// We discard record if event is from another user than user we want to show\n\n\t\t\t\t$parameters=array();\n\t\t\t\t$reshook=$hookmanager->executeHooks('formatEvent',$parameters,$event,$action); // Note that $action and $object may have been modified by some hooks\n\t\t\t\tif ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');\n\n\t\t\t\t$ponct=($event->date_start_in_calendar == $event->date_end_in_calendar);\n\n\t\t\t\t// Define $color (Hex string like '0088FF') and $cssclass of event\n\t\t\t\t$color=-1; $cssclass=''; $colorindex=-1;\n\t\t\t\tif (in_array($user->id, $keysofuserassigned))\n\t\t\t\t{\n\t\t\t\t\t$nummytasks++; $cssclass='family_mytasks';\n\t\t\t\t\tif (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) $color=$event->type_color;\n\t\t\t\t}\n\t\t\t\telse if ($event->type_code == 'ICALEVENT')\n\t\t\t\t{\n\t\t\t\t\t$numical++;\n\t\t\t\t\tif (! empty($event->icalname))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (! isset($numicals[dol_string_nospecial($event->icalname)])) {\n\t\t\t\t\t\t\t$numicals[dol_string_nospecial($event->icalname)] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$numicals[dol_string_nospecial($event->icalname)]++;\n\t\t\t\t\t}\n\n\t\t\t\t\t$color=$event->icalcolor;\n\t\t\t\t\t$cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unsortable');\n\t\t\t\t}\n\t\t\t\telse if ($event->type_code == 'BIRTHDAY')\n\t\t\t\t{\n\t\t\t\t\t$numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf(\"%02x%02x%02x\",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$numother++; $cssclass='family_other';\n\t\t\t\t\tif (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) $color=$event->type_color;\n\t\t\t\t}\n\n\t\t\t\tif ($color < 0)\t// Color was not forced. Set color according to color index.\n\t\t\t\t{\n\t\t\t\t\t// Define color index if not yet defined\n\t\t\t\t\t$idusertouse=($event->userownerid?$event->userownerid:0);\n\t\t\t\t\tif (isset($colorindexused[$idusertouse]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$colorindex=$colorindexused[$idusertouse];\t// Color already assigned to this user\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$colorindex=$nextindextouse;\n\t\t\t\t\t\t$colorindexused[$idusertouse]=$colorindex;\n\t\t\t\t\t\tif (! empty($theme_datacolor[$nextindextouse+1])) $nextindextouse++;\t// Prepare to use next color\n\t\t\t\t\t}\n\t\t\t\t\t// Define color\n\t\t\t\t\t$color=sprintf(\"%02x%02x%02x\",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);\n\t\t\t\t}\n\t\t\t\t//$cssclass=$cssclass.' '.$cssclass.'_day_'.$ymd;\n\n\t\t\t\t// Define all rects with event (cases1 is first half hour, cases2 is second half hour)\n\t\t\t\tfor ($h = $begin_h; $h < $end_h; $h++)\n\t\t\t\t{\n\t\t\t\t\t//if ($username->id == 1 && $day==1) print 'h='.$h;\n\t\t\t\t\t$newcolor = ''; //init\n\t\t\t\t\tif (empty($event->fulldayevent))\n\t\t\t\t\t{\n\t\t\t\t\t\t$a = dol_mktime((int) $h,0,0,$month,$day,$year,false,0);\n\t\t\t\t\t\t$b = dol_mktime((int) $h,30,0,$month,$day,$year,false,0);\n\t\t\t\t\t\t$c = dol_mktime((int) $h+1,0,0,$month,$day,$year,false,0);\n\n\t\t\t\t\t\t$dateendtouse=$event->date_end_in_calendar;\n\t\t\t\t\t\tif ($dateendtouse==$event->date_start_in_calendar) $dateendtouse++;\n\n\t\t\t\t\t\t//print dol_print_date($event->date_start_in_calendar,'dayhour').'-'.dol_print_date($a,'dayhour').'-'.dol_print_date($b,'dayhour').'<br>';\n\n\t\t\t\t\t\tif ($event->date_start_in_calendar < $b && $dateendtouse > $a)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$busy=$event->transparency;\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['busy']=$busy;\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour');\n\t\t if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar)\n\t\t\t \t\t{\n\t\t\t\t \t\t$tmpa=dol_getdate($event->date_start_in_calendar,true);\n\t\t\t\t \t\t$tmpb=dol_getdate($event->date_end_in_calendar,true);\n\t\t\t\t \t\tif ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases1[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'hour');\n\t\t\t\t \t\telse $cases1[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'dayhour');\n\t\t\t \t\t}\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['string'].=' - '.$event->label;\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['typecode']=$event->type_code;\n\t\t\t\t\t\t\tif ($event->socid)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//$cases1[$h][$event->id]['string'].='xxx';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$cases1[$h][$event->id]['color']=$color;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($event->date_start_in_calendar < $c && $dateendtouse > $b)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$busy=$event->transparency;\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['busy']=$busy;\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour');\n\t\t\t\t\t\t\tif ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar)\n\t\t\t \t\t{\n\t\t\t\t \t\t$tmpa=dol_getdate($event->date_start_in_calendar,true);\n\t\t\t\t \t\t$tmpb=dol_getdate($event->date_end_in_calendar,true);\n\t\t\t\t \t\tif ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases2[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'hour');\n\t\t\t\t \t\telse $cases2[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'dayhour');\n\t\t\t \t\t}\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['string'].=' - '.$event->label;\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['typecode']=$event->type_code;\n\t\t\t\t\t\t\tif ($event->socid)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//$cases2[$h][$event->id]['string'].='xxx';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$cases2[$h][$event->id]['color']=$color;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$busy=$event->transparency;\n\t\t\t\t\t\t$cases1[$h][$event->id]['busy']=$busy;\n\t\t\t\t\t\t$cases2[$h][$event->id]['busy']=$busy;\n\t\t\t\t\t\t$cases1[$h][$event->id]['string']=$event->label;\n\t\t\t\t\t\t$cases2[$h][$event->id]['string']=$event->label;\n\t\t\t\t\t\t$cases1[$h][$event->id]['typecode']=$event->type_code;\n\t\t\t\t\t\t$cases2[$h][$event->id]['typecode']=$event->type_code;\n\t\t\t\t\t\t$cases1[$h][$event->id]['color']=$color;\n\t\t\t\t\t\t$cases2[$h][$event->id]['color']=$color;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\n\t\t\tbreak;\t// We found the date we were looking for. No need to search anymore.\n\t\t}\n\t}\n\n\tfor ($h = $begin_h; $h < $end_h; $h++)\n\t{\n\t\t$color1='';$color2='';\n\t\t$style1='';$style2='';\n\t\t$string1='&nbsp;';$string2='&nbsp;';\n\t\t$title1='';$title2='';\n\t\tif (isset($cases1[$h]) && $cases1[$h] != '')\n\t\t{\n\t\t\t//$title1.=count($cases1[$h]).' '.(count($cases1[$h])==1?$langs->trans(\"Event\"):$langs->trans(\"Events\"));\n\t\t\tif (count($cases1[$h]) > 1) $title1.=count($cases1[$h]).' '.(count($cases1[$h])==1?$langs->trans(\"Event\"):$langs->trans(\"Events\"));\n\t\t\t$string1='&nbsp;';\n\t\t\tif (empty($conf->global->AGENDA_NO_TRANSPARENT_ON_NOT_BUSY)) $style1='peruser_notbusy';\n\t\t\telse $style1='peruser_busy';\n\t\t\tforeach($cases1[$h] as $id => $ev)\n\t\t\t{\n\t\t\t\tif ($ev['busy']) $style1='peruser_busy';\n\t\t\t}\n\t\t}\n\t\tif (isset($cases2[$h]) && $cases2[$h] != '')\n\t\t{\n\t\t\t//$title2.=count($cases2[$h]).' '.(count($cases2[$h])==1?$langs->trans(\"Event\"):$langs->trans(\"Events\"));\n\t\t\tif (count($cases2[$h]) > 1) $title2.=count($cases2[$h]).' '.(count($cases2[$h])==1?$langs->trans(\"Event\"):$langs->trans(\"Events\"));\n\t\t\t$string2='&nbsp;';\n\t\t\tif (empty($conf->global->AGENDA_NO_TRANSPARENT_ON_NOT_BUSY)) $style2='peruser_notbusy';\n\t\t\telse $style2='peruser_busy';\n\t\t\tforeach($cases2[$h] as $id => $ev)\n\t\t\t{\n\t\t\t\tif ($ev['busy']) $style2='peruser_busy';\n\t\t\t}\n\t\t}\n\n\t\t$ids1='';$ids2='';\n\t\tif (count($cases1[$h]) && array_keys($cases1[$h])) $ids1=join(',',array_keys($cases1[$h]));\n\t\tif (count($cases2[$h]) && array_keys($cases2[$h])) $ids2=join(',',array_keys($cases2[$h]));\n\n\t\tif ($h == $begin_h) echo '<td class=\"'.$style.'_peruserleft cal_peruser'.($var?' cal_impair '.$style.'_impair':'').'\">';\n\t\telse echo '<td class=\"'.$style.' cal_peruser'.($var?' cal_impair '.$style.'_impair':'').'\">';\n\t\tif (count($cases1[$h]) == 1)\t// only 1 event\n\t\t{\n\t\t\t$output = array_slice($cases1[$h], 0, 1);\n\t\t\t$title1=$langs->trans(\"Ref\").' '.$ids1.($title1?' - '.$title1:'');\n\t\t\tif ($output[0]['string']) $title1.=($title1?' - ':'').$output[0]['string'];\n\t\t\tif ($output[0]['color']) $color1 = $output[0]['color'];\n\t\t}\n\t\telse if (count($cases1[$h]) > 1)\n\t\t{\n\t\t\t$title1=$langs->trans(\"Ref\").' '.$ids1.($title1?' - '.$title1:'');\n\t\t\t$color1='222222';\n\t\t}\n\n\t\tif (count($cases2[$h]) == 1)\t// only 1 event\n\t\t{\n\t\t\t$output = array_slice($cases2[$h], 0, 1);\n\t\t\t$title2=$langs->trans(\"Ref\").' '.$ids2.($title2?' - '.$title2:'');\n\t\t\tif ($output[0]['string']) $title2.=($title2?' - ':'').$output[0]['string'];\n\t\t\tif ($output[0]['color']) $color2 = $output[0]['color'];\n\t\t}\n\t\telse if (count($cases2[$h]) > 1)\n\t\t{\n\t\t\t$title2=$langs->trans(\"Ref\").' '.$ids2.($title2?' - '.$title2:'');\n\t\t\t$color2='222222';\n\t\t}\n\t\tprint '<table class=\"nobordernopadding\" width=\"100%\">';\n\t\tprint '<tr><td '.($color1?'style=\"background: #'.$color1.';\"':'').'class=\"'.($style1?$style1.' ':'').'onclickopenref'.($title1?' cursorpointer':'').'\" ref=\"ref_'.$username->id.'_'.sprintf(\"%04d\",$year).'_'.sprintf(\"%02d\",$month).'_'.sprintf(\"%02d\",$day).'_'.sprintf(\"%02d\",$h).'_00_'.($ids1?$ids1:'none').'\"'.($title1?' title=\"'.$title1.'\"':'').'>';\n\t\tprint $string1;\n\t\tprint '</td><td '.($color2?'style=\"background: #'.$color2.';\"':'').'class=\"'.($style2?$style2.' ':'').'onclickopenref'.($title1?' cursorpointer':'').'\" ref=\"ref_'.$username->id.'_'.sprintf(\"%04d\",$year).'_'.sprintf(\"%02d\",$month).'_'.sprintf(\"%02d\",$day).'_'.sprintf(\"%02d\",$h).'_30_'.($ids2?$ids2:'none').'\"'.($title2?' title=\"'.$title2.'\"':'').'>';\n\t\tprint $string2;\n\t\tprint '</td></tr>';\n\t\tprint '</table>';\n\t\tprint '</td>';\n\t}\n}", "public function show(Events $events)\n {\n //\n }", "function get_new_events_no_page(){\n\t\n\t\tglobal $gamo, $dbh;\n\t\n\t\t$error_append = \" CLASS[\".__CLASS__.\"] METHOD[\".__METHOD__.\"] DATE[\".date('Y-m-d H:i:s').\"]\";\n\n\t\n\t\t$sql = \"SELECT id FROM \" . CORE_DB . \".\" . self::$table_name.\n\t\t\" WHERE active = 1 and hide = 0 ORDER BY date_time ASC\";\n\t\n\t\t$sth = $dbh->prepare($sql);\n\t\n\t\t$vevents = array();\n\t\t$sth->execute();\n\n\n\t\twhile($row = $sth->fetch()) {\n\t\n\t\t\t$row = Core::r('virtual_events')->get_event(array(\n\t\t\t\t\t'id' => $row['id'],\n\t\t\t\t\t'public_has' => 1,\n\t\t\t\t\t'show_private_has' => 0\n\t\t\t\t)\n\t\t\t);\n\n\n\t\t\tarray_push($vevents, $row);\n\t\n\t\t}\n\t\n\t\treturn $vevents;\n\t\n\t}", "function showEvents($date) {\n\tglobal $privs, $evtList, $set, $xx;\n\n\t$thsM = ($set['dwStartHour'] * 60); //threshold start of day in mins\n\t$theM = ($set['dwEndHour'] * 60); //threshold end of day in mins\n\t$offset = $set['dwStartHour'] ? 2 * $set['dwTimeSlot'] : $set['dwTimeSlot']; //\"earlier\" row\n\t//hereafter: M = in nbr of mins\n\tforeach ($evtList[$date] as $eIx => $evt) {\n\t\tif ($evt['mde']) { //multi-day-event\n\t\t\tif ($evt['mde'] != 1) { $evt['sti'] = '00:00'; }\n\t\t\tif ($evt['mde'] != 3) { $evt['eti'] = '23:59'; }\n\t\t}\n\t\tif (($evt['sti'] == '' and $evt['eti'] == '') or $evt['ald']) { //all day (takes up 1 slot at the top)\n\t\t\t$st[] = 0; //start time\n\t\t\t$et[] = $set['dwTimeSlot']; //end time\n\t\t} else {\n\t\t\t$stM = substr($evt['sti'],0,2) * 60 + intval(substr($evt['sti'],3,2)); //start time\n\t\t\tif ($stM < $thsM) {\n\t\t\t\t$st[] = $set['dwTimeSlot']; //start time < threshold start of day in mins\n\t\t\t} elseif ($stM < $theM) {\n\t\t\t\t$st[] = $stM - $thsM + $offset; //start time < threshold end of day in mins\n\t\t\t} else {\n\t\t\t\t$st[] = $theM - $thsM + $offset; //start time >= threshold end of day in mins\n\t\t\t}\n\t\t\tif ($evt['eti'] == \"\" or $evt['eti'] == $evt['sti']) {\n\t\t\t\t$et[] = end($st) + $set['dwTimeSlot'];\n\t\t\t} else {\n\t\t\t\t$etM = substr($evt['eti'],0,2) * 60 + intval(substr($evt['eti'],3,2)); //end time\n\t\t\t\tif ($etM <= $thsM) {\n\t\t\t\t\t$et[] = $offset; //end time <= threshold start of day in mins\n\t\t\t\t} elseif ($etM <= $theM) {\n\t\t\t\t\t$et[] = $etM - $thsM + $offset; //end time < threshold end of day in mins\n\t\t\t\t} else {\n\t\t\t\t\t$et[] = $theM - $thsM + $offset + $set['dwTimeSlot']; //end time > threshold end of day in mins\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t//for day $date we now have :\n\t//$st: array with start time in mins for each event\n\t//$et: array with end time in mins for each event\n\t//the indexes in these arrays correspond to the indexes in $evtList\n\t$sEmpty[0][0] = 0;\n\t$eEmpty[0][0] = 1440; //24 x 60 mins\n\t$indent = 0;\n\t$column = array(); //array with column numbers of each event\n\tforeach ($st as $i => $stM) { //i: index in $evtList, stM: start time in mins\n\t\t$found = false;\n\t\tforeach ($sEmpty as $k => $v) {\n\t\t\tforeach ($v as $kk => $sEtM) {\n\t\t\t\tif ($stM >= $sEtM and $et[$i] <= $eEmpty[$k][$kk]) {\n\t\t\t\t\t$sEmpty[$k][] = $et[$i]; //end time in mins\n\t\t\t\t\t$eEmpty[$k][] = $eEmpty[$k][$kk];\n\t\t\t\t\t$eEmpty[$k][$kk] = $stM; //start in mins\n\t\t\t\t\t$sFill[$k][] = $stM;\n\t\t\t\t\t$evIx[$k][] = $i;\n\t\t\t\t\t$column[$i] = $k;\n\t\t\t\t\t$found = true;\n\t\t\t\t\tbreak 2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!$found) {\n\t\t\t$indent++;\n\t\t\t$sEmpty[$indent][0] = 0;\n\t\t\t$eEmpty[$indent][0] = $stM;\n\t\t\t$sEmpty[$indent][1] = $et[$i];\n\t\t\t$eEmpty[$indent][1] = 1440; //24 x 60\n\t\t\t$sFill[$indent][0] = $stM;\n\t\t\t$evIx[$indent][0] = $i;\n\t\t\t$column[$i] = $indent;\n\t\t}\n\t}\n\t$cWidth = round(90 / ($indent+1),1); //width of smallest column\n\t$showDetails = ($set['details4All'] == 1 or ($set['details4All'] == 2 and $_SESSION['uid'] > 1));\n\tforeach ($sFill as $k => $v) { //1 min = 1px\n\t\t$eLeft = ($cWidth + 0.5) * $k; //event left side in %\n\t\t$eWidth = $cWidth - 0.5; //event width in %\n\t\tforeach ($v as $kk => $stM) { //event start time in mins\n\t\t\t$etM = $sEmpty[$k][$kk + 1]; //event end time in mins\n\t\t\t$eHeight = $etM - $stM; //event height in mins\n\t\t\t$stM = round($stM * $set['dwTsHeight'] / $set['dwTimeSlot']) - 1; //scale start time in px\n\t\t\t$eHeight = round($eHeight * $set['dwTsHeight'] / $set['dwTimeSlot']) - 1; //scale height in px\n\t\t\t$i = $evIx[$k][$kk];\n\t\t\t$evt = &$evtList[$date][$i];\n\t\t\t$sti = ($evt['sti']) ? ITtoDT($evt['sti']) : '';\n\t\t\t$stiPrefix = (substr($evt['sti'],0,2) < $set['dwStartHour'] or substr($evt['sti'],0,2) >= $set['dwEndHour']) ? $sti.' ' : '';\n\t\t\t$time = makeHovT($evt);\n\t\t\t$chBox = '';\n\t\t\tif ($evt['cbx']) {\n\t\t\t\t$mayCheck = ($privs > 3 or ($privs > 1 and $evt['uid'] == $_SESSION['uid'])); //boolean\n\t\t\t\t$chBox .= strpos($evt['chd'], $date) ? $evt['cmk'] : '&#x2610;';\n\t\t\t\t$cBoxAtt = $mayCheck ? \"class='chkBox floatL point' onclick=\\\"checkE(this,{$evt['eid']},'{$date}');\\\"\" : \"class='chkBox floatL arrow'\";\n\t\t\t\t$chBox = \"<span title='{$evt['clb']}' {$cBoxAtt}>{$chBox}</span>\";\n\t\t\t}\n\t\t\tif ($set['popBoxWkDay'] and $set['evtTemplPop']) {\n\t\t\t\t$popText = \"<b>{$time} {$evt['tix']}</b><br>\";\n\t\t\t\tif ($showDetails or $evt['mayE']) {\n\t\t\t\t\t$popText .= makeE($evt,$set['evtTemplPop'],'br','<br>');\n\t\t\t\t}\n\t\t\t\t$popText = htmlspecialchars(addslashes($popText));\n\t\t\t\t$popClass = ($evt['pri'] ? 'private' : 'normal').(($evt['mde'] or $evt['r_t']) ? ' repeat' : '');\n\t\t\t\t$popAttr = \" onmouseover=\\\"pop(this,'{$popText}','{$popClass}')\\\"\";\n\t\t\t} else {\n\t\t\t\t$popAttr = '';\n\t\t\t}\n\t\t\tif ($set['eventColor']) { //use event color\n\t\t\t\t$eStyle = ($evt['cco'] ? \"color:{$evt['cco']};\" : '').' background-color:'.($evt['cbg'] ? $evt['cbg'] : '#FFFFFF').';';\n\t\t\t} else { //use user color\n\t\t\t\t$eStyle = ' background-color:'.($evt['uco'] ? $evt['uco'] : '#FFFFFF').';';\n\t\t\t}\n\t\t\tif ($evt['app'] and !$evt['apd']) { $eStyle .= 'border-left:2px solid #ff0000;'; }\n\t\t\t$class = $eHeight < 21 ? 'dwEventNw' : 'dwEvent';\n\t\t\t// enlarge box if possible \n\t\t\t// 1. find next column of overlapping event starting before\n\t\t\t$ovlColumn = $indent+1; \n\t\t\tfor ($iTest=0;$iTest<$i;$iTest++) {\n\t\t\t\t$evtBefore = &$evtList[$date][$iTest];\n\t\t\t\tif ($evtBefore['eti'] > $evt['sti'] && $column[$iTest] > $column[$i] && $column[$iTest] < $ovlColumn) {\n\t\t\t\t\t$ovlColumn = $column[$iTest];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 2. find next column of overlapping event starting later\n\t\t\tfor ($iTest=$i+1;$iTest<count($st);$iTest++) {\n\t\t\t\t$evtAfter = &$evtList[$date][$iTest];\n\t\t\t\tif ($evtAfter['sti'] < $evt['eti'] && $column[$iTest] > $column[$i] && $column[$iTest] < $ovlColumn) {\n\t\t\t\t\t$ovlColumn = $column[$iTest];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$eWidthAdjusted = ($ovlColumn-$k) * $cWidth - 0.5;\n//\t\t\techo \"<div class='evtBox' style='top:{$stM}px; left:{$eLeft}%; height:{$eHeight}px; width:{$eWidth}%;{$eStyle}'>\\n\";\n\t\t\techo \"<div class='evtBox' style='top:{$stM}px; left:{$eLeft}%; height:{$eHeight}px; width:{$eWidthAdjusted}%;{$eStyle}'>\\n\";\n\n\t\t\tif (!$_SESSION['mobile']) {\n\t\t\t\techo \"<div class='{$class}'>{$chBox}\".(($showDetails or $evt['mayE']) ? \"<span class='point' onclick=\\\"editE({$evt['eid']},'{$date}');\\\"\" : \"<span class='arrow'\").\"{$popAttr}>{$stiPrefix}{$evt['tix']}</span></div></div>\\n\";\n\t\t\t} else {\n\t\t\t\techo \"<div class='{$class}'>{$chBox}\".(($showDetails or $evt['mayE']) ? \"<span class='point' \" : \"<span class='arrow'\").\"{$popAttr}>{$stiPrefix}{$evt['tix']}</span></div></div>\\n\";\n\t\t\t}\n\t\t}\n\t}\n}", "function showGrid($date) {\n\tglobal $title, $niceday, $start_time, $end_time, $venue, $city, $state, $cat, $color, $background, $ed, $usr, $o, $c, $m, $a, $y, $w, $lang;\n\tif ($start_time[$date]) {\n\t\tksort($start_time[$date]);\n\t\twhile (list($t) = each($start_time[$date])) {\n\t\t\twhile (list($id,$value) = each($start_time[$date][$t])) {\n\t\t\t\techo \"<div class=\\\"button\\\" style=\\\"\";\n\t\t\t\tif ($color[$id]) echo \" color: \".$color[$id].\"; background: \".$background[$id].\";\";\n\t\t\t\techo \"\\\">\";\n\t\t\t\techo \"<a href=\\\"show_event.php?id=\".$id.\"&o=\".$o.\"&c=\".$c.\"&m=\".$m.\"&a=\".$a.\"&y=\".$y.\"&w=\".$w.\"\\\" onClick=\\\"openPic('show_event.php?id=\".$id.\"&size=small','pop','600','400'); window.newWindow.focus(); return false\\\">\";\n\t\t\t\techo \"<div style=\\\"background: \".$color[$id].\";\\\" title=\\\"\";\n\t\t\t\techo $value;\n\t\t\t\tif ($end_time[$date][$t][$id]) echo \" - \".$end_time[$date][$t][$id];\n\t\t\t\techo \" - \";\n\t\t\t\techo $title[$id];\n\t\t\t\tif ($venue[$id]) {\n\t\t\t\t\techo \" - \".$venue[$id];\n\t\t\t\t\tif ($city[$id]) {\n\t\t\t\t\t\techo \" - \".$city[$id];\n\t\t\t\t\t\tif ($state[$id]) echo \", \".$state[$id];\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo \"\\\">&nbsp;</div></a></div>\";\n\t\t\t}\n\t\t}\n\t}\n}", "function displayEventButton($eventID, $eventInfo){\r\n //Creates a button to navigate to an event\r\n\r\n // Format location string\r\n $location = '';\r\n if($eventInfo['eventCity'] != null){\r\n $location = $eventInfo['eventCity'];\r\n }\r\n if($eventInfo['eventProvince'] != null){\r\n if(isset($location)){ $location .= ', '; }\r\n $location .= $eventInfo['eventProvince'];\r\n }\r\n if($eventInfo['eventCountry'] != null){\r\n if(isset($location)){ $location .= ', '; }\r\n $location .= $eventInfo['eventCountry'];\r\n }\r\n\r\n $location = rtrim($location,', \\t');\r\n\r\n // Format year and date string\r\n $name = $eventInfo['eventName'];\r\n $year = $eventInfo['eventYear'];\r\n\r\n $startDate = $eventInfo['eventStartDate'];\r\n $endDate = $eventInfo['eventStartDate'];\r\n\r\n try {\r\n $format = \"M jS\";\r\n $dateString = '';\r\n if (isset($startDate)) {\r\n $dateString = (new DateTime($startDate))->format($format);\r\n\r\n if (isset($endDate) && $endDate != $startDate)\r\n $dateString .= \" - \" . (new DateTime($endDate))->format($format);\r\n } else if (isset($endDate)) {\r\n $dateString = (new DateTime($endDate))->format($format);\r\n }\r\n } catch (Exception $e) {\r\n $dateString = '';\r\n }\r\n\r\n // Displays current event in red\r\n if($eventID == $_SESSION['eventID']) {\r\n $isActive = \"alert\";\r\n } else {\r\n $isActive = '';\r\n }\r\n\r\n ?>\r\n <button value='<?= $eventID ?>' style='width:100%'\r\n class='button hollow <?= $isActive ?>' name='changeEventTo' >\r\n <?= $name ?>, <?= $year ?>\r\n <span class='hide-for-small-only'> - </span>\r\n <BR class='show-for-small-only'>\r\n <?= $location ?>\r\n <BR>\r\n <?= $dateString ?>\r\n </button>\r\n<?php }", "public function showEvents($args)\n {\n $view = Zikula_View::getInstance($this->name);\n $repo = $this->entityManager->getRepository('ZSELEX_Entity_Event');\n $setParams = array();\n $level = FormUtil::getPassedValue(\"level\");\n $shop_id = FormUtil::getPassedValue(\"shop_id\");\n $country_id = FormUtil::getPassedValue(\"country_id\");\n $region_id = FormUtil::getPassedValue(\"region_id\");\n $city_id = FormUtil::getPassedValue(\"city_id\");\n $area_id = FormUtil::getPassedValue(\"area_id\");\n $branch_id = FormUtil::getPassedValue(\"branch_id\");\n $category_id = FormUtil::getPassedValue(\"category_id\");\n $search = FormUtil::getPassedValue(\"hsearch\");\n $search = ($search == $this->__('search for...') || $search == $this->__('search'))\n ? '' : $search;\n // $eventlimit = FormUtil::getPassedValue(\"eventlimit\");\n $startlimit = FormUtil::getPassedValue(\"startlimit\");\n $firstLoad = FormUtil::getPassedValue(\"firstLoad\");\n // $startlimit = 0;\n // echo $startlimit;\n $eventlimit = FormUtil::getPassedValue(\"eventlimit\");\n\n // $start = $startlimit + $eventlimit;\n $start = $startlimit;\n if ($firstLoad) {\n // $start = 0;\n }\n // $limit = $start;\n $limit = $start + 10;\n $end = $eventlimit;\n // echo $limitquery;\n\n $searchquery = '';\n if (($shop_id > 0 || !empty($shop_id)) || ($region_id > 0 || !empty($region_id))\n || ($city_id > 0 || !empty($city_id)) || ($country_id > 0 || !empty($country_id))\n || ($area_id > 0 || !empty($area_id)) || ($search > 0 || !empty($search))\n || ($category_id > 0 || !empty($category_id)) || ($branch_id > 0 || !empty($branch_id)\n || !empty($eventdate))) {\n\n // $eventdateqry = \" AND shop_event_startdate>=CURDATE()\";\n $eventdateqry = '';\n $output = '';\n $items = array(\n 'id' => $shop_id\n );\n\n $where = '';\n $append = '';\n\n if (!empty($country_id)) { // COUNTRY\n $append .= \" AND b.country_id=$country_id\";\n }\n\n if (!empty($region_id)) { // REGION\n $append .= \" AND b.region_id=$region_id\";\n }\n\n if (!empty($city_id)) { // CITY\n $append .= \" AND b.city_id=$city_id\";\n }\n\n if (!empty($area_id)) { // AREA\n $append .= \" AND b.area_id=$area_id\";\n }\n\n if (!empty($shop_id)) { // SHOP\n $append .= \" AND b.shop_id=$shop_id\";\n }\n $join = \"\";\n if (!empty($category_id)) {\n $append .= \" AND c.category_id=$category_id \";\n $join = \" INNER JOIN zselex_shop_to_category c ON c.shop_id=b.shop_id \";\n }\n\n if (!empty($branch_id)) {\n $append .= \" AND b.branch_id=$branch_id\";\n }\n\n if (!empty($search)) {\n // $append .= \" AND (a.shop_id IN (SELECT shop_id FROM zselex_keywords WHERE keyword LIKE '%\" . DataUtil::formatForStore($search) . \"%') OR a.shop_id IN (SELECT shop_id FROM zselex_shop WHERE shop_name LIKE '%\" . DataUtil::formatForStore($search) . \"%'))\";\n $append .= \" AND (b.shop_name LIKE :search OR MATCH (b.shop_name) AGAINST (:search2) OR b.shop_id IN (SELECT shop_id FROM zselex_keywords WHERE keyword LIKE :search OR MATCH (keyword) AGAINST (:search2)))\";\n $setParams += array(\n 'search' => '%'.DataUtil::formatForStore($search).'%',\n 'search2' => DataUtil::formatForStore($search)\n );\n }\n\n $event_args = array(\n 'append' => $append,\n 'join' => $join,\n 'setParams' => $setParams,\n 'start' => $start,\n 'end' => $end\n );\n\n // echo \"<pre>\"; print_r($event_args); echo \"</pre>\";\n $result = $repo->getAllEvents($event_args);\n\n $count = $repo->getAllEventsCount(array(\n 'append' => $append,\n 'join' => $join,\n 'setParams' => $setParams\n ));\n\n /*\n * $countNext = $repo->getAllEventsCount(\n * array('append' => $append,\n * 'join' => $join,\n * 'setParams' => $setParams,\n * 'start' => $start + 10,\n * 'end' => $end\n * ));\n */\n } else {\n\n $count = 0;\n }\n\n $counts = $countNext;\n\n $data = '';\n $view->assign('limit', $limit);\n $view->assign('events', $result);\n $view->assign('count', $count);\n $view->assign('counts', $counts);\n $output_tpl = $view->fetch('ajax/show_all_events.tpl');\n $data .= new Zikula_Response_Ajax_Plain($output_tpl);\n // $data[\"data\"] = $output;\n AjaxUtil::output($data);\n }", "function eventoni_suggest_events()\n{\n\t// POST-Daten (Inhalt + Titel) auslesen und analysieren\n\t$content = $_POST['content'];\n\t$what = analyse_content($content);\n\n\t// hole Rohdaten zu den Events anhand des analysierten Text-Inhalts\n\t$data = eventoni_fetch('&wt='.$what, true);\n\techo $data['xml'];\n\tdie();\n}", "function calendar()\n{\n /*\n $groups = getAllEvents();\n $fieldsToConvert = [\"name\", \"description\", \"context\", \"status\"];\n $groups = specialCharsConvertFromAnArray($groups, $fieldsToConvert);\n displaydebug($groups);\n */\n require_once \"view/calendar.php\";\n}", "function getEventsFeed($args = array()) {\n\t \t$events = $this->getEventsExternal($args);\n\n\t \t$esc_chars = \",;\\\\\";\n\n\t \t// Get Page url if any\n\t \t$page_id = intval(get_option('fse_page'));\n\t \tif (!empty($page_id)) {\n\t \t\t$page_url = get_permalink($page_id);\n\t \t\tif (!empty($page_url)) {\n\t \t\t\tif (strpos($page_url, '?') === false)\n\t \t\t\t$page_url .= '?event=';\n\t \t\t\telse\n\t \t\t\t$page_url .= '&event=';\n\t \t\t}\n\t \t}\n\n\t \t$feed = array();\n\t \t$feed[] = 'BEGIN:VCALENDAR';\n\t \t$feed[] = 'METHOD:PUBLISH';\n\t \t$feed[] = 'PRODID:http://www.faebusoft.ch/webentwicklung/wpcalendar/';\n\t \t$feed[] = 'VERSION:2.0';\n\t \t$feed[] = 'X-WR-TIMEZONE:'.get_option('timezone_string');\n\n\t \t//print_r($events);\n\n\t \tforeach($events as $e) {\n\n\t \t\t$feed[] = 'BEGIN:VEVENT';\n\n\t \t\t$feed[] = 'UID:'.get_bloginfo('url').'/feed/ical/'.$e->eventid;\n\t \t\t//$feed[] = 'UID:'.md5(uniqid());\n\n\t \t\t// Add description\n\t \t\t$feed[] = 'DESCRIPTION:'.str_replace(array(\"\\r\",\"\\n\"), array('','\\n'),addcslashes(trim(strip_tags($e->getDescription())), $esc_chars));\n\n\t \t\t// Categories\n\t \t\tforeach($e->categories_t as $k => $c) {\n\t \t\t\t$e->categories_t[$k] = addcslashes($c, $esc_chars);\n\t \t\t}\n\t \t\t$feed[] = 'CATEGORIES:'.implode(',',$e->categories_t);\n\n\t \t\t// Location\n\t \t\t$feed[] = 'LOCATION:'.addcslashes($e->location, $esc_chars);\n\n\t \t\t// Summary\n\t \t\t$feed[] = 'SUMMARY:'.addcslashes($e->subject, $esc_chars);\n\n\t \t\t// Times\n\t \t\tif ($e->allday == true) {\n\t \t\t\t$feed[] = 'DTSTART;TZID='.get_option('timezone_string').';VALUE=DATE:'.mysql2date('Ymd', $e->from);\n\n\t \t\t\t// End has to be + 1!\n\t \t\t\t$end = strtotime($e->to)+(60*60*24);\n\t \t\t\t$feed[] = 'DTEND;TZID='.get_option('timezone_string').';VALUE=DATE:'.date('Ymd', $end);\n\t \t\t} else {\n\t \t\t\t$feed[] = 'DTSTART;TZID='.get_option('timezone_string').':'.mysql2date('Ymd\\THis', $e->from);\n\t \t\t\t$feed[] = 'DTEND;TZID='.get_option('timezone_string').':'.mysql2date('Ymd\\THis', $e->to);\n\t \t\t}\n\n\t \t\t// Classification\n\t \t\t$feed[] = 'CLASS:PUBLIC';\n\n\t \t\t// Publish Date of event\n\t \t\t$feed[] = 'DTSTAMP;TZID='.get_option('timezone_string').':'.mysql2date('Ymd\\THis', $e->publishdate);\n\n\t \t\t// URL of event\n\t \t\tif (!empty($e->postid)) {\n\t \t\t\t$feed[] = 'URL:'.get_permalink($e->postid);\n\t \t\t} elseif (!empty($page_url)) {\n\t \t\t\t$feed[] = 'URL:'.$page_url.$e->eventid;\n\t \t\t}\n\n\t \t\t$feed[] = 'END:VEVENT';\n\t \t}\n\n\t \t$feed[] = 'END:VCALENDAR';\n\n\t \t// Now trim all date to maxium 75chars\n\t \t$output = '';\n\t \tforeach ($feed as $f) {\n\t \t\t$new_line = true;\n\t \t\twhile(strlen($f) > 0) {\n\t \t\t\tif (!$new_line) {\n\t \t\t\t\t$output .= \"\\r\\n \"; // Add CRLF + Space!\n\t \t\t\t}\n\t \t\t\t$output .= substr($f, 0, 72);\n\t \t\t\t// String kürzen\n\t \t\t\tif (strlen($f) > 72) {\n\t \t\t\t\t$f = substr($f, 72);\n\t \t\t\t\t$new_line = false;\n\t \t\t\t} else {\n\t \t\t\t\t$f = '';\n\t \t\t\t}\n\t \t\t}\n\t \t\t$output .= \"\\r\\n\";\n\t \t}\n\n\t \treturn $output;\n\t }", "function hookAjaxGetEvents() {\n\n\t \t$start = intval($_POST['start']);\n\t \t$end = intval($_POST['end']);\n\n\t \t$args['datefrom'] = $start;\n\t \t$args['dateto'] = $end;\n\t \t$args['datemode'] = FSE_DATE_MODE_ALL;\n\t \t$args['number'] = 0; // Do not limit!\n\n\t \tif (isset($_POST['state']))\n\t \t$args['state'] = $_POST['state'];\n\t \tif (isset($_POST['author']))\n\t \t$args['author'] = $_POST['author'];\n\t \tif (isset($_POST['categories']))\n\t \t$args['categories'] = $_POST['categories'];\n\t \tif (isset($_POST['include']))\n\t \t$args['include'] = $_POST['include'];\n\t \tif (isset($_POST['exclude']))\n\t \t$args['exclude'] = $_POST['exclude'];\n\t \t$events = $this->getEventsExternal($args);\n\n\t \t// Process array of events\n\t \t$events_out = array();\n\t \tforeach($events as $evt) {\n\t \t\tunset($e);\n\t \t\t$e['id'] = $evt->eventid;\n\t \t\t$e['post_id'] = $evt->postid;\n\t \t\t$e['post_url'] = (empty($evt->postid) ? '' : get_permalink($evt->postid));\n\t \t\t$e['title'] = $evt->subject;\n\t \t\t$e['allDay'] = ($evt->allday == true ? true : false);\n\t \t\t$e['start'] = mysql2date('c', $evt->from);\n\t \t\t$e['end'] = mysql2date('c', $evt->to);\n\t \t\t$e['editable'] = false;\n\n\t \t\t$classes = array();\n\t \t\tforeach($evt->categories as $c) {\n\t \t\t\t$classes[] = 'category-'.$c;\n\t \t\t}\n\t \t\tif (count($classes) > 0) {\n\t \t\t\t$e['className'] = $classes;\n\t \t\t}\n\t \t\t\n\t \t\t$events_out[] = $e;\n\t \t}\n\n\t \t$response = json_encode($events_out);\n\n\t \theader(\"Content-Type: application/json\");\n\t \techo $response;\n\n\t \texit;\n\t }", "public function displayManager() {\n\t\t$return = \"<h3>Events</h3><div id='tm_eventsCal'></div>\";\n\n\t\tif(pmpro_hasMembershipLevel('2')){\n\t\t\t$return .= \"<h3>Teams</h3><div id='tm_teamsPlace'></div>\";\n\t\t\t$allTeams = [];\n\t\t\tforeach ($this->teams as $team) {\n\t\t\t\t$allTeams[$team->id] = $team->getTeamEventsMembersAndSettings();\n\t\t\t}\n\t\t\t$return .= '<script type=\"text/javascript\"> var teams = '.json_encode($allTeams).'; </script>';\n\t\t\tif(TEAMMANAGER_DEBUG_MODE) $return .= json_encode($allTeams);\n\t\t} else {\n\t\t\t$this->please_upgrade();\n\t\t\t$return .= \"<h3>Team</h3>\";\n\t\t\t$return .= $this->teams[0]->getTeamEventsMembersAndSettings();\n\t\t} \n\t\treturn $return;\n\t}", "function MyEvents_Handle_Open()\n {\n $this->InscriptionsObj()->InitActions();\n\n echo\n $this->OpenEventsHtmlTable().\n \"\";\n }", "function get_basic_event_information_wct($schedule_html, $event_url) {\n\t//if page contains pink background\n\t$event_gender = get_gender_wct($schedule_html);\n\tif ($event_gender == -1) {\n\t\techo \"\\nNo Gender Found. Error\";\n\t\tpause(\"\");\n\t}\n\t$event_category = get_event_category_wct($schedule_html, $event_url);\n\t$event_name = get_event_name_wct($schedule_html, $event_url);\n\t$event_location = get_event_location_wct($schedule_html, $event_url);\n\t$start_date = get_event_date_wct($schedule_html, $event_url, \"start\");\n\t$end_date = get_event_date_wct($schedule_html, $event_url, \"end\");\n\t$event_purse = get_event_purse_wct($schedule_html, $event_url);\n\t$event_currency = get_event_currency_wct($schedule_html, $event_url);\n\t$event_teams = get_event_teams_wct($event_url, $event_gender);\n\t$event_winnings = get_event_winnings_wct($event_url, $event_teams);\n\t$event_format = get_event_format_wct($event_url);\n\t$event_FGZ = get_event_FGZ($event_category);\n\t\n\t$event = new Event($event_location, $start_date, $end_date, $event_purse, $event_currency, $event_name, $event_gender, $event_teams, $event_category, $event_winnings, $event_format, $event_FGZ);\n\t$event->print_event();\n\treturn $event;\n}", "function eventoni_get_events_by_id()\n{\n\t$event_ids = $_POST['event_ids'];\n\n\t// Aufsplitten des Strings in ein Array mit den Events\n\t$event_ids = explode('-',$event_ids);\n\n\t// Holen der Informationen zu den Events\n\t$data = eventoni_fetch('',true,$event_ids);\n\n\t// Rückgabe der Informationen zu den Events in XML\n\techo $data['xml'];\n\tdie();\n}", "function cal_content()\n{\n $a = get_app();\n $o = \"\";\n if ($a->argc == 1) {\n $o .= \"<h3>\".t('Event Export').\"</h3><p>\".t('You can download public events from: ').$a->get_baseurl().\"/cal/username/export/ical</p>\";\n } elseif ($a->argc==4) {\n\t// get the parameters from the request we just received\n\t$username = $a->argv[1];\n\t$do = $a->argv[2];\n\t$format = $a->argv[3];\n\t// check that there is a user matching the requested profile\n\t$r = q(\"SELECT uid FROM user WHERE nickname='\".$username.\"' LIMIT 1;\");\n\tif (count($r)) \n\t{\n\t $uid = $r[0]['uid'];\n\t} else {\n\t killme();\n\t}\n\t// if we shall do anything other then export, end here\n\tif (! $do == 'export' )\n\t killme();\n\t// check if the user allows us to share the profile\n\t$enable = get_pconfig( $uid, 'cal', 'enable');\n\tif (! $enable == 1) {\n\t info(t('The user does not export the calendar.'));\n\t return;\n\t}\n\t// we are allowed to show events\n\t// get the timezone the user is in\n\t$r = q(\"SELECT timezone FROM user WHERE uid=\".$uid.\" LIMIT 1;\");\n\tif (count($r))\n\t $timezone = $r[0]['timezone'];\n\t// does the user who requests happen to be the owner of the events \n\t// requested? then show all of your events, otherwise only those that \n\t// don't have limitations set in allow_cid and allow_gid\n\tif (local_user() == $uid) {\n\t $r = q(\"SELECT `start`, `finish`, `adjust`, `summary`, `desc`, `location` FROM `event` WHERE `uid`=\".$uid.\" and `cid`=0;\");\n\t} else {\n\t $r = q(\"SELECT `start`, `finish`, `adjust`, `summary`, `desc`, `location` FROM `event` WHERE `allow_cid`='' and `allow_gid`='' and `uid`='\".$uid.\"' and `cid`='0';\");\n\t}\n\t// we have the events that are available for the requestor\n\t// now format the output according to the requested format\n\t$res = cal_format_output($r, $format, $timezone);\n\tif (! $res=='')\n\t info($res);\n } else {\n\t// wrong number of parameters\n\tkillme();\n }\n return $o;\n}", "function GetEventsJsForCalendar($frontend=true)\r\n\t{\r\n\t\tglobal $_SETTINS;\r\n\r\n\t\t// SELECT EVENTS\r\n\t\t$select = \t\"SELECT * FROM events \".\r\n\t\t\t\t\t\"WHERE events.active='1' \".\r\n\t\t\t\t\t\"\".$_SETTINGS['demosqland'].\" \".\r\n\t\t\t\t\t\"ORDER BY events.date DESC \";\r\n\t\t$result = doQuery($select);\t\t\t\r\n\t\t$num = mysql_num_rows($result);\r\n\t\t$i = 0;\r\n\t\twhile($i<$num){\r\n\t\t\t$row = mysql_fetch_array($result);\r\n\t\t\tif($i != 0){ $js .= \",\"; }\r\n\t\t\t$js .= \t\"{\";\r\n\t\t\t\r\n\t\t\t\t// TITLE CHECK\r\n\t\t\t\t$js .= \"title: '\".$row['title'].\"',\";\r\n\t\t\t\t$js .= \"description: '\".$row['description'].\"',\";\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// GET FORMAT AND EXPLODE DATE\r\n\t\t\t\t$start_date = TimestampIntoDate($row['date']);\r\n\t\t\t\t$end_date = TimestampIntoDate($row['end_date']);\r\n\t\t\t\t$startArray = explode(\"/\",$start_date);\r\n\t\t\t\t$endArray = explode(\"/\",$end_date);\t\t\r\n\t\t\t\t$sy = $startArray[2];\r\n\t\t\t\t$sm = $startArray[0];\r\n\t\t\t\t$sd = $startArray[1];\t\t\t\r\n\t\t\t\t$ey = $endArray[2];\r\n\t\t\t\t$em = $endArray[0];\r\n\t\t\t\t$ed = $endArray[1];\r\n\t\t\t\t\r\n\t\t\t\t$js .= \"start: new Date(\".$sy.\", \".$sm.\"-1, \".$sd.\"),\";\r\n\t\t\t\t\r\n\t\t\t\tif($_POST['end_date'] == \"0000-00-00 00:00:00\" || $_POST['end_date'] == \"\"){\r\n\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$js .= \"end: new Date(\".$ey.\", \".$em.\"-1, \".$ed.\"),\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif($frontend == true){\t\t\t\r\n\t\t\t\t\t$js .= \"url: 'http://\".$_SETTINGS['website'].$_SETTINGS['events_page_clean_url'].\"/'\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$js .= \"url: 'http://\".$_SETTINGS['website'].$_SETTINGS['events_page_clean_url'].\"/'\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t$js .= \"}\";\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t\r\n\t\t$js .=\t\"\";\r\n\t\treturn $js;\r\n\t\t\r\n\t\t/*\r\n\t\t{\r\n\t\t\ttitle: 'All Day Event',\r\n\t\t\tstart: new Date(y, m, 1)\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: 'Long Event',\r\n\t\t\tstart: new Date(y, m, d-5),\r\n\t\t\tend: new Date(y, m, d-2)\r\n\t\t},\r\n\t\t{\r\n\t\t\tid: 999,\r\n\t\t\ttitle: 'Repeating Event',\r\n\t\t\tstart: new Date(y, m, d-3, 16, 0),\r\n\t\t\tallDay: false\r\n\t\t},\r\n\t\t{\r\n\t\t\tid: 999,\r\n\t\t\ttitle: 'Repeating Event',\r\n\t\t\tstart: new Date(y, m, d+4, 16, 0),\r\n\t\t\tallDay: false\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: 'Meeting',\r\n\t\t\tstart: new Date(y, m, d, 10, 30),\r\n\t\t\tallDay: false\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: 'Lunch',\r\n\t\t\tstart: new Date(y, m, d, 12, 0),\r\n\t\t\tend: new Date(y, m, d, 14, 0),\r\n\t\t\tallDay: false\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: 'Birthday Party',\r\n\t\t\tstart: new Date(y, m, d+1, 19, 0),\r\n\t\t\tend: new Date(y, m, d+1, 22, 30),\r\n\t\t\tallDay: false\r\n\t\t},\r\n\t\t{\r\n\t\t\ttitle: 'Click for Google',\r\n\t\t\tstart: new Date(y, m, 28),\r\n\t\t\tend: new Date(y, m, 29),\r\n\t\t\turl: 'http://google.com/'\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t}", "public function showEventsTable() {\r\n\t\t$stmt = $this->connect()->query(\"SELECT * FROM event\");\r\n\t\techo \"<h3>Event Table</h3>\";\r\n\t\techo \"<table><tr><td>\" . \"id\" . \"</td><td>\" . \"competition_id\" . \"</td><td>\" . \"name\" . \"</td><td>\" . \"score\" . \"</td><td>\" . \"time\" . \"</td><td>\" . \"tie_break\" . \"</td></tr>\";\r\n\t\twhile ($row = $stmt->fetch()) {\r\n\t\t\techo \"<tr><td>\" . $row['id'] . \"</td><td>\" . $row['competition_id'] . \"</td><td>\" . $row['name'] . \"</td><td>\" . $row['score'] . \"</td><td>\" . $row['time'] . \"</td><td>\" . $row['tie_break'] . \"</td></tr>\"; \r\n\t\t}\r\n\t\techo \"</table>\";\r\n\t}", "private function display_custom_events_table()\n\t{\n\t\t// Show the custom PHP events\n\t\t// Firstly, convert our custom event list to a proper map\n\t\t$map = [];\n\n\t\t// Sort alphabetically\n\t\tksort($this->custom_php_events);\n\n\t\tforeach ($this->custom_php_events as $extension => $events)\n\t\t{\n\t\t\tksort($events);\n\n\t\t\t// Grab each event\n\t\t\tforeach ($events as $event)\n\t\t\t{\n\t\t\t\t$map[] = [$extension, $event];\n\t\t\t}\n\t\t}\n\n\t\t// Show the table\n\t\t$table_header = [$this->language->lang('CLI_EXTENSION_EVENTS_EXTENSION_NAME'), $this->language->lang('CLI_EXTENSION_EVENTS_NAME')];\n\t\t$this->render_table($table_header, $map);\n\t}", "function showEventMembers(int $eventid) \n {\n $memberlist = $this->sqlselect(\"SELECT * FROM eventguests WHERE eventid=$eventid ORDER BY zusage,guestname\");\n if ($this->checkEventOwner($eventid) == true) { \n $owner = true;\n } else {\n $owner = false;\n }\n echo \"<h3><a name=gaesteliste>Gästeliste</a></h3>\";\n if ($owner == true) { \n $this->deleteEventGuest();\n $this->zusageGuest();\n $this->absageGuest();\n $this->counterAction();\n $this->addGuests();\n $this->setGuest();\n }\n echo \"<table class='kontoTable'>\";\n echo \"<thead>\";\n echo \"<td id='small'>Login</td>\";\n echo \"<td>Gastname</td>\";\n echo \"<td id='small'>Anzahl</td>\";\n echo \"<td id='small'>Zusage</td>\";\n // RESTRICTED START\n if ($owner == true) { \n echo \"<td id='small'>Options</td>\";\n } \n // RESTRICTED END\n echo \"</thead>\";\n for ($i = 0; $i < sizeof($memberlist); $i++) {\n if (isset($_SESSION['eventguest'])) {\n if ($_SESSION['eventguest'] == $memberlist[$i]->id) {\n $css = \"yellow\";\n } else {\n $css = \"\";\n }\n } else {\n $css = \"\";\n }\n echo \"<tbody id='$css'>\"; \n echo \"<td>\";\n if ($memberlist[$i]->loggedin == 1) {\n echo \"<a href='?setGuest=\".$memberlist[$i]->id.\"#gaesteliste'> &#10004; </a>\";\n } else {\n echo \"<a href='?setGuest=\".$memberlist[$i]->id.\"#gaesteliste'> &#8855; </a>\";\n }\n echo \"</td>\";\n // NAME\n echo \"<td>\";\n if ($owner == true) {\n \n if (strlen($memberlist[$i]->guestmailaddress) > 0) {\n echo \"<a href='mailto:\".$memberlist[$i]->guestmailaddress.\"'> &#9993; \"; \n }\n \n }\n\n echo $memberlist[$i]->fullname .\" / \". $memberlist[$i]->guestname; \n if ($owner == true) {\n if (strlen($memberlist[$i]->guestmailaddress) > 0) { \n echo \"</a>\";\n }\n }\n echo \"</td>\";\n\n // ANZAHL\n echo \"<td>\";\n if ($owner == true) { \n echo \"<a href='?CounterUP=\".$memberlist[$i]->id.\"&eventid=\".$memberlist[$i]->eventid.\"&wert=\".$memberlist[$i]->anzahl.\"#gaesteliste'>+</a> \";\n }\n \n echo $memberlist[$i]->anzahl;\n if ($owner == true) { \n echo \" <a href='?CounterDOWN=\".$memberlist[$i]->id.\"&eventid=\".$memberlist[$i]->eventid.\"&wert=\".$memberlist[$i]->anzahl.\"#gaesteliste'>-</a>\";\n }\n echo \"</td>\";\n\n // ZUSAGE / ABSAGE\n echo \"<td>\";\n if ($memberlist[$i]->zusage == null) {\n if ($owner == true) { \n echo \"<a href='?zusageUser=\".$memberlist[$i]->id.\"&eventid=\".$memberlist[$i]->eventid.\"#gaesteliste' class='rightRedLink'>nein</a>\";\n } else {\n echo \"<a class='rightRedLink' href=''>nein</a>\";\n }\n } else {\n if ($owner == true) { \n echo \"<a href='?absageUser=\".$memberlist[$i]->id.\"&eventid=\".$memberlist[$i]->eventid.\"#gaesteliste' class='rightGreenLink'>&#10004;</a>\";\n } else {\n echo \"<a class='rightGreenLink' href=''>&#10004;</a>\";\n }\n \n }\n echo \"</td>\";\n \n // RESTRICTED START\n // LÖSCHEN\n if ($owner == true) {\n echo \"<td>\";\n echo \"<a class='rightRedLink'href='?delUser=\".$memberlist[$i]->id.\"&eventid=\".$memberlist[$i]->eventid.\"'>X</a>\";\n echo \"</td>\";\n }\n // RESTRICTED END\n\n echo \"</tbody>\";\n }\n\n // FUSSZEILE\n $sumGuest = $this->sqlselect(\"SELECT *,count(id) as count FROM eventguests WHERE eventid=$eventid\");\n $sumAnzahl = $this->sqlselect(\"SELECT *,sum(anzahl) as gesAnzahl FROM eventguests WHERE eventid=$eventid\");\n $sumZusage = $this->sqlselect(\"SELECT *,sum(zusage) as zusagen FROM eventguests WHERE eventid=$eventid\");\n echo \"<tfoot>\"; \n echo \"<td></td>\";\n echo\"<td>Summe Gäste: \".$sumGuest[0]->count.\" </td>\"; \n echo \"<td>\".$sumAnzahl[0]->gesAnzahl.\"</td>\"; \n echo \"<td>\".$sumZusage[0]->zusagen.\"</td>\"; \n echo \"<td>\".\"\".\"</td>\"; \n echo \"</tfoot>\";\n\n echo \"</table>\";\n }", "function obj_do_cx_events_list_filter( $events ) {\n\t$months = evt_helper_get_year_months( $events );\n $types = evt_helper_get_event_types( $events );\n $search_term = evt_helper_get_search_term();\n $reset_display = 'none';\n if ('' !== $search_term ) {\n $reset_display = 'block';\n }\n\t?>\n\t<div class=\"event-list-filter__wrap\">\n <!-- <div class=\"event-search-form-wrap\">\n <form method=\"get\" action=\"/events/\">\n <div class=\"event-search-form-inner\">\n <input type=\"search\" value=\"<?php echo $search_term; ?>\" name=\"evtq\" placeholder=\"Search\" class=\"input-search\" />\n <button class=\"btn-search\">\n <i class=\"fa fa-search\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </form>\n </div> -->\n <div class=\"select-wrap\">\n\t\t\t<select name=\"event-list__month\" id=\"event-list__month\">\n\t\t\t\t<option value=\"all\">When</option>\n\t\t\t\t<?php foreach ( $months as $abbr => $month ) : ?>\n\t\t\t\t\t<option value=\"<?php echo $abbr; ?>\"><?php echo $month; ?></option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</select>\n\t\t</div>\n\t\t<div class=\"select-wrap\">\n\t\t\t<select name=\"event-list__type\" id=\"event-list__type\">\n\t\t\t\t<option value=\"all\">Type</option>\n\t\t\t\t<?php foreach ( $types as $abbr => $type ) : ?>\n\t\t\t\t\t<option value=\"<?php echo $abbr; ?>\"><?php echo $type; ?></option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</select>\n\t\t</div>\n\t\t<div class=\"filter-reset\" style=\"display:<?php echo $reset_display; ?>\">Reset</div>\n </div>\n <span style=\"display: none;\" class=\"no-events-shown-message grande-text\">No results seem to match your search. Adjust the filters to see what other events may be relevant for you.</span>\n\t<?php\n}", "function formatEvent($time, $date, $firstInList=false)\n{\n\t$str = \"\";\n\t$event = $time->get(\"-event:time\");\n\t$organisers = array();\n\tgetOrganisers($organisers, $event);\n\t$places = array();\n\tgetPlaces($places, $event);\n\n\t$sid = sid($time);\n\n\tglobal $eventcounter;\n\tglobal $eventdate;\n\t$eventcounter++;\n\tif($eventcounter <= 10 || $eventdate == $date) { $featured = \"featured \"; } else { $featured = \"\"; }\n\tif($eventcounter <= 10) { $eventdate = $date; }\n\t$starts = \"\";\n\tif( $time->has( \"tl:start\" ) && substr($time->getString(\"tl:start\"), 0, 10) == $date )\n\t{\n\t\t$starts = \" <span class='date'>(\".formatTime($time->getString( \"tl:start\" ), $date).\")</span>\";\n\t}\n\t$str .= \"<div class='event $featured\".($firstInList?\"first-event \":\"\").implode(\" \", array_keys($organisers)).\" \".implode(\" \", array_keys($places)).\"' itemscope itemtype='http://data-vocabulary.org/Event'>\\n\";\n\t$str .= \"\\t<h3 itemprop='summary'><img class='small-chevron' src='img/chevron_small_right.png' alt='' />\".htmlspecialchars($event->label()).\"$starts</h3><div class='event-links'><a href='#' class='expand-link'>Read more</a>\";\n\tif( $event->has( \"foaf:homepage\" ) )\n\t{\n\t\t$str .= \" | <a href='\".htmlspecialchars($event->get( \"foaf:homepage\" )).\"' itemprop='url' target='_blank'>View event</a>\";\n\t}\n\t$str .= \"</div>\\n\";\n\t$str .= \"\\t<div class='event-more' id='\".$sid.\"'>\\n\";\n\t$str .= \"\\t\\t<div class='event-info'>\\n\";\n\tif( $time->has( \"tl:start\" ) && substr($time->getString(\"tl:start\"), 0, 10) == $date )\n\t{\n\t\t$str .= \"\\t\\t\\t<div>\";\n\t\t$str .= formatTime($time->getString( \"tl:start\" ), $date);\n\t\tif( $time->has( \"tl:end\" ) )\n\t\t{\n\t\t\t$str .= \" - \".formatTime($time->getString( \"tl:end\" ), $date);\n\t\t}\n\t\t$str .= \"</div>\\n\";\n\t\t$str .= \"<span style='display:none' itemprop='startDate'>\".$time->getString( \"tl:start\" ).\"</span>\";\n\t\tif( $time->has( \"tl:end\" ) )\n\t\t{\n\t\t\t$str .= \"<span style='display:none' itemprop='endDate'>\".$time->getString( \"tl:end\" ).\"</span>\";\n\t\t}\n\t}\n\t$str .= getEventPlaces($event, \"Place\");\n\t$str .= getEventPlaces($event, \"Additional Place Info\");\n\t$organisers = getEventAgents($event, \"Organiser\");\n\tif(count($organisers) > 0)\n\t{\n\t\tsort($organisers);\n\t\t$str .= \"\\t\\t\\t<div class='organisers'>Organised by: \";\n\t\tforeach($organisers as $organiser)\n\t\t{\n\t\t\t$str .= $organiser.\" \";\n\t\t}\n\t\t$str .= \"</div>\\n\";\n\t}\n\t$str .= \"\\t\\t</div>\\n\";\n\t//$str .= \"\\t<div style='clear:left'></div>\\n\";\n\t$speakers = getEventAgents($event, \"Speaker\");\n\tif(count($speakers) > 0)\n\t{\n\t\t$str .= \"\\t\\t<div class='speakers'>Speaker\".((count($speakers) > 1) ? \"s\" : \"\").\": \";\n\t\tforeach($speakers as $speaker)\n\t\t{\n\t\t\t$str .= $speaker.\" \";\n\t\t}\n\t\t$str .= \"</div>\\n\";\n\t}\n\tif( $event->has( \"dct:description\" ) )\n\t{\n\t\t$str .= \"\\t\\t<div class='description' itemprop='description'>\".$event->getString( \"dct:description\" ).\"</div>\\n\";\n\t}\n\t$str .= \"\\t\\t<div style='clear:both'></div>\\n\";\n\t$str .= \"\\t</div>\\n\";\n\t$str .= \"</div>\\n\";\n\treturn $str;\n}", "public function indexAction() {\n $this->view->events = $this->_events->getEventsAdmin($this->_getParam('page'));\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}", "function overview($tpl = null)\n\t{\n\t\tif (JVersion::isCompatible(\"1.6.0\"))\n\t\t\tJHTML::stylesheet('administrator/components/' . JEV_COM_COMPONENT . '/assets/css/eventsadmin.css');\n\t\telse\n\t\t\tJHTML::stylesheet('eventsadmin.css', 'administrator/components/' . JEV_COM_COMPONENT . '/assets/css/');\n\n\t\t$document = & JFactory::getDocument();\n\t\t$document->setTitle(JText::_( 'ICAL_EVENTS' ));\n\n\t\t// Set toolbar items for the page\n\t\tJToolBarHelper::title(JText::_( 'ICAL_EVENTS' ), 'jevents');\n\n\t\t//JToolBarHelper::custom('icalevent.csvimport','upload.png','upload.png','JEV_ADMIN_CSVIMPORT',false);\n\t\tJToolBarHelper::publishList('icalevent.publish');\n\t\tJToolBarHelper::unpublishList('icalevent.unpublish');\n\t\tJToolBarHelper::addNew('icalevent.edit');\n\t\tJToolBarHelper::editList('icalevent.edit');\n\t\tJToolBarHelper::custom('icalevent.editcopy', 'copy.png', 'copy.png', 'JEV_ADMIN_COPYEDIT');\n\t\tJToolBarHelper::deleteList('Delete Event and all repeats?', 'icalevent.delete');\n\t\tJToolBarHelper::spacer();\n\t\tJToolBarHelper::custom('cpanel.cpanel', 'default.png', 'default.png', 'JEV_ADMIN_CPANEL', false);\n\t\t//JToolBarHelper::help( 'screen.ical', true);\n\n\t\tJSubMenuHelper::addEntry(JText::_( 'CONTROL_PANEL' ), 'index.php?option=' . JEV_COM_COMPONENT, true);\n\n\t\t$params = JComponentHelper::getParams(JEV_COM_COMPONENT);\n\t\t//$section = $params->getValue(\"section\",0);\n\n\t\tJHTML::_('behavior.tooltip');\n\n\t}", "function latest_events($user_id = '', $from_date_field = 'start_date', $order = 'DESC', $number_of_latest_events = 1) {\n\t$latest_events = get_latest_events('', $from_date_field, $from_date_field, $order, $number_of_latest_events);\n\n\tif (empty($latest_events)) {\n\t\treturn;\n\t}\n?>\n\t\t<!-- Latest Events -->\n\t\t<section id=\"latest-events\" class=\"section-invert featurette\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t<h2>Latest sponsored event<?php echo (count($latest_events) > 1 ? 's' : ''); ?></h2>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"latest-events row\">\n\t\t\t\t\t<?php\n\t\t\t\t\tforeach ($latest_events as $latest_event) :\n\t\t\t\t\t\t$latest_event_featured_image = get_asset($latest_event['event_featured_image_id']);\n\t\t\t\t\t\t$latest_event_featured_image_properties = json_decode($latest_event_featured_image['asset_properties'], TRUE);\n\t\t\t\t\t\t$latest_event_featured_image_thumbnail_url = get_image_thumbnail_url($latest_event_featured_image_properties, 'desktop_featured_image');\n\t\t\t\t\t?>\n\t\t\t\t\t<div id=\"latest-event-<?php echo $latest_event['id']; ?>\" class=\"latest-events-event-wrapper\">\n\t\t\t\t\t\t<div class=\"col-md-6\">\n\t\t\t\t\t\t\t<a href=\"event.php?event_id=<?php echo $latest_event['id']; ?>\"><img class=\"img-responsive\" src=\"<?php echo $latest_event_featured_image_thumbnail_url; ?>\" alt=\"<?php echo 'event featured image'; // $latest_event_featured_image['asset_caption']; ?>\"></a>\n\t\t\t\t\t\t</div><!-- .col-md-7 -->\n\n\t\t\t\t\t\t<div class=\"col-md-6 hero\">\n\t\t\t\t\t\t\t<h3 class=\"lead\"><a href=\"event.php?event_id=<?php echo $latest_event['id']; ?>\"><?php echo $latest_event['event_name']; ?></a></h3>\n\n\t\t\t\t\t\t\t<?php echo ($latest_event['event_start_date'] ? '<p class=\"lead\">' . ($latest_event['event_end_date'] && $latest_event['event_start_date'] == $latest_event['event_end_date'] ? 'On ' : 'From ') . date('F j, Y', strtotime($latest_event['event_start_date'])) . ($latest_event['event_end_date'] && $latest_event['event_start_date'] != $latest_event['event_end_date'] ? ' to ' . date('F j, Y', strtotime($latest_event['event_end_date'])) : '') . '</p>' : ''); ?>\n\n\t\t\t\t\t\t\t<?php echo ($latest_event['event_description'] ? '<p class=\"lead\">' . $latest_event['event_description'] . '</p>' : ''); ?>\n\n\t\t\t\t\t\t\t<a href=\"upload-photos-to-event.php?event_id=<?php echo $latest_event['id']; ?>\" class=\"btn btn-primary\">Let's make a movie now</a>\n\t\t\t\t\t\t</div><!-- .col-md-5 -->\n\n\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t</div><!-- .latest-events-event-wrapper -->\n\t\t\t\t\t<?php endforeach; // foreach ($latest_events as $latest_event) ?>\n\t\t\t\t</div><!-- .latest-events -->\n\t\t\t</div><!-- .container -->\n\t\t</section><!-- #latest-events -->\n<?php\n}", "function events(){\n if(!$this->session->userdata('logged_in') || $this->session->userdata('role') != 'student'):\n redirect('/');\n endif;\n\n $data = array(\n 'events' => $this->admin_model->browse(array('module' => 'events'))\n );\n //load content\n $this->template->content->view('/students/content/events', $data);\n\n //add js file\n $this->template->publish('layouts/app');\n }", "public static function list_events()\n\t{\n\t\treturn cms_orm('CmsDatabaseEvent')->find_all(array('order' => 'module_name, event_name'));\n\t}", "public function showEvents1($args)\n {\n $setParams = array();\n $level = FormUtil::getPassedValue(\"level\");\n $shop_id = FormUtil::getPassedValue(\"shop_id\");\n $country_id = FormUtil::getPassedValue(\"country_id\");\n $region_id = FormUtil::getPassedValue(\"region_id\");\n $city_id = FormUtil::getPassedValue(\"city_id\");\n $area_id = FormUtil::getPassedValue(\"area_id\");\n $branch_id = FormUtil::getPassedValue(\"branch_id\");\n $category_id = FormUtil::getPassedValue(\"category_id\");\n $search = FormUtil::getPassedValue(\"hsearch\");\n $search = ($search == $this->__('search for...') || $search == $this->__('search'))\n ? '' : $search;\n // $eventlimit = FormUtil::getPassedValue(\"eventlimit\");\n $startlimit = FormUtil::getPassedValue(\"startlimit\");\n // $startlimit = 0;\n // echo $startlimit;\n $eventlimit = FormUtil::getPassedValue(\"eventlimit\");\n if (isset($startlimit) && !empty($startlimit)) {\n $pageLimit = $startlimit;\n } else {\n $pageLimit = '0';\n }\n $loadCount = $pageLimit + $eventlimit;\n // echo $loadCount;\n $reset = FormUtil::getPassedValue(\"reset\");\n // echo $reset; exit;\n if (!empty($eventlimit)) {\n $limit = $eventlimit;\n $limitquery = \"LIMIT 0 , $eventlimit\";\n } else {\n $limit = \"2\";\n $limitquery = \"LIMIT 0 , $limit\";\n }\n\n // echo $limitquery;\n\n $searchquery = '';\n if (($shop_id > 0 || !empty($shop_id)) || ($region_id > 0 || !empty($region_id))\n || ($city_id > 0 || !empty($city_id)) || ($country_id > 0 || !empty($country_id))\n || ($area_id > 0 || !empty($area_id)) || ($search > 0 || !empty($search))\n || ($category_id > 0 || !empty($category_id)) || ($branch_id > 0 || !empty($branch_id)\n || !empty($eventdate))) {\n\n // $eventdateqry = \" AND shop_event_startdate>=CURDATE()\";\n $eventdateqry = '';\n $output = '';\n $items = array(\n 'id' => $shop_id\n );\n // $shops = ModUtil::apiFunc('ZSELEX', 'admin', 'getShop', $items);\n $where = '';\n $append = '';\n\n if (!empty($country_id)) { // COUNTRY\n $append .= \" AND a.country_id=$country_id\";\n }\n\n if (!empty($region_id)) { // REGION\n $append .= \" AND a.region_id=$region_id\";\n }\n\n if (!empty($city_id)) { // CITY\n $append .= \" AND a.city_id=$city_id\";\n }\n\n if (!empty($area_id)) { // AREA\n $append .= \" AND a.area_id=$area_id\";\n }\n\n if (!empty($shop_id)) { // SHOP\n $append .= \" AND a.shop_id=$shop_id\";\n }\n if (!empty($category_id)) {\n // $append .= \" AND a.cat_id=$category_id\";\n $append .= \" AND a.shop_id IN(SELECT shop_id FROM zselex_shop_to_category WHERE category_id=$category_id) \";\n }\n\n if (!empty($branch_id)) {\n $append .= \" AND a.branch_id=$branch_id\";\n }\n\n if (!empty($search)) {\n // $append .= \" AND (a.shop_id IN (SELECT shop_id FROM zselex_keywords WHERE keyword LIKE '%\" . DataUtil::formatForStore($search) . \"%') OR a.shop_id IN (SELECT shop_id FROM zselex_shop WHERE shop_name LIKE '%\" . DataUtil::formatForStore($search) . \"%'))\";\n $append .= \" AND (a.shop_name LIKE :search OR MATCH (a.shop_name) AGAINST (:search2) OR a.shop_id IN (SELECT shop_id FROM zselex_keywords WHERE keyword LIKE :search OR MATCH (keyword) AGAINST (:search2)))\";\n $setParams += array(\n 'search' => '%'.DataUtil::formatForStore($search).'%',\n 'search2' => DataUtil::formatForStore($search)\n );\n }\n\n /*\n * $sql = \"SELECT a.shop_id\n * FROM zselex_shop a\n * WHERE a.shop_id IS NOT NULL\n * AND a.status='1' $append\";\n * //echo $sql;\n * $query = DBUtil::executeSQL($sql);\n * $result = $query->fetchAll();\n */\n\n $result = $this->entityManager->getRepository('ZSELEX_Entity_Event')->getUpcomingEventShops(array(\n 'append' => $append,\n 'setParams' => $setParams,\n 'show_all' => true,\n 'upcommingEvents' => true\n ));\n\n $count = count($result);\n } else {\n\n $count = 0;\n }\n $shopsql = '';\n if ($count > 0) {\n\n foreach ($result as $shopid) {\n $shop_idarray [] = $shopid ['shop_id'];\n }\n\n $shop_ids = implode(\",\", $shop_idarray);\n // foreach ($result as $shop) {\n $shopsql = \" AND a.shop_id IN($shop_ids)\";\n $shopquery1 = \" AND a.shop IN($shop_ids)\";\n\n if ($reset != 'reset') {\n $shopquery = $shopsql;\n } else {\n $shopquery = \"\";\n }\n\n // echo $shopquery;\n\n /*\n * $minmax = \"SELECT MIN( shop_event_startdate ) as mindate , MAX( shop_event_enddate ) as maxdate\n * FROM zselex_shop_events a\n * WHERE a.shop_event_id IS NOT NULL AND UNIX_TIMESTAMP(a.shop_event_startdate) != 0 AND UNIX_TIMESTAMP(a.shop_event_enddate) != 0 AND a.status='1' \" . \" \" . $shopquery . \" \" . $limitquery;\n * //echo $minmax;\n * $q = DBUtil::executeSQL($minmax);\n * $e = $q->fetch();\n */\n $e = $this->entityManager->getRepository('ZSELEX_Entity_Event')->getEventDates(array(\n 'shopquery' => $shopquery1\n ));\n\n $mindate = $e ['mindate'];\n $maxdate = $e ['maxdate'];\n $mxdates = array(\n \"0\" => $maxdate\n );\n $datearray = array();\n // echo \"mindate : \" . $mindate;\n // echo \"maxdate : \" . $maxdate;\n\n $datearray = $this->createDateRangeArray($mindate, $maxdate);\n $datearray = array_merge($datearray, $mxdates);\n\n $dateCount = count($datearray);\n\n $todayDate = date(\"Y-m-d\");\n $arrays = array();\n\n $i = 0;\n $j = 0;\n foreach ($datearray as $key => $d) {\n if ($d < $todayDate) continue;\n // echo $d . '<br>';\n if ($i == $limit) {\n // break;\n }\n\n /*\n * $sql1 = \"SELECT a.shop_event_id , a.shop_id , a.shop_event_name , a.shop_event_shortdescription , a.shop_event_description , a.shop_event_startdate , a.shop_event_starthour , a.shop_event_startminute , a.shop_event_enddate , a.shop_event_endhour , a.shop_event_endminute,a.price,a.email,a.phone,a.shop_event_venue,\n * b.aff_id , c.aff_image\n * FROM zselex_shop_events a\n * LEFT JOIN zselex_shop b ON b.shop_id=a.shop_id\n * LEFT JOIN zselex_shop_affiliation c ON c.aff_id=b.aff_id\n * WHERE '\" . $d . \"' BETWEEN a.shop_event_startdate AND a.shop_event_enddate AND (a.activation_date<=CURDATE() OR UNIX_TIMESTAMP(a.activation_date) = 0) \" . \" \" . $shopquery;\n * //echo $sql1;\n *\n * $query1 = DBUtil::executeSQL($sql1);\n * $events1 = $query1->fetchAll();\n */\n $events1 = $this->entityManager->getRepository('ZSELEX_Entity_Event')->getEventBetweenDates(array(\n 'd' => $d,\n 'shopsql' => $shopquery1\n ));\n foreach ($events1 as $get => $owner) {\n $ownerName = ModUtil::apiFunc('ZSELEX',\n 'admin', 'getOwner',\n $args = array(\n 'shop_id' => $owner ['shop_id']\n ));\n $events1 [$get] ['uname'] = $ownerName;\n }\n // echo $events1['shop_event_name'] . '<br>';\n $dates = strtotime(date(\"Y-m-d\", strtotime($d)).\" +$j day\");\n $headlinedates = date('l dS \\o\\f F Y', $dates);\n // echo $headlinedates . '<br>';\n $arrays ['dates'] [$d] = $events1;\n\n // echo \"<pre>\"; print_r($events1); echo \"</pre>\";\n // $datearray[$key]['eventsname'] = 'hiii';\n $i ++;\n $j ++;\n }\n\n $l = 0;\n $eventcount = count($arrays ['dates']);\n // echo $eventcount;\n if ($eventcount > 0) {\n $todayDate = date(\"Y-m-d\");\n $current_theme = System::getVar('Default_Theme');\n // exit;\n if ($current_theme == 'CityPilot') {\n // echo \"hellooo\";\n $output .= '<div class=\"DateBlock\">';\n $k = 0;\n $s = 0;\n foreach ($arrays ['dates'] as $key => $d1) {\n // echo \"hii\";\n if ($k == $limit) {\n // break;\n }\n $eventsdate = $key;\n $dateexplode = explode('-', $eventsdate);\n $dayname = date_format(date_create($eventsdate), 'l');\n $dayname = $this->__($dayname);\n\n // echo $startlimit . '<br>';\n foreach ($arrays ['dates'] [$key] as $key2 => $d2) {\n // echo $s . '<br>';\n // echo $l . '<br>';\n if ($s >= $startlimit) {\n $newArray [] = $d2;\n if ($l == $limit) {\n break;\n }\n\n if ($d2 [price] > 0) {\n $curr_args = array(\n 'amount' => $d2 [price],\n 'currency_symbol' => '',\n 'decimal_point' => ',',\n 'thousands_sep' => '.',\n 'precision' => '2'\n );\n $price = ModUtil::apiFunc('ZSELEX',\n 'user', 'number2currency',\n $curr_args);\n } else {\n $price = $this->__(\"FREE\");\n }\n\n if ($d2 ['aff_id'] > 0) {\n $aff_image = pnGetBaseURL().\"modules/ZSELEX/images/affiliates/\".$d2 ['aff_image'];\n $aff_image_link = \"<img src='\".$aff_image.\"' style='width: 50px;'>\";\n $aff_image_div = \"<div style='width: 50px; height: 50px; position: relative;z-index:999;display:inline-block; float:right; margin-top:-45px; margin-right: 30px;'>$aff_image_link</div>\";\n }\n $evntUrl = pnGetBaseURL().ModUtil::url('ZSELEX',\n 'user', 'viewevent',\n array(\n 'shop_id' => $d2 [shop_id],\n 'eventId' => $d2 [shop_event_id]\n ));\n // $evntUrl = \"www.gmail.com\";\n $output .= '<a href=\"'.$evntUrl.'\" class=\"HoverEffet\">\n <div class=\"DateBorder\">\n <div class=\"Date\">\n <span class=\"DateSpan\">'.$dateexplode [2].'/'.$dateexplode [1].'</span><br /><span class=\"YearSpan\">'.$dateexplode [0].'</span><br /><span class=\"WeekDay\">'.$dayname.'</span>\n </div>\n\n <div class=\"DateHead\">\n <h5>'.stripslashes(wordwrap($d2 [shop_event_name],\n 19, \"<br>\\n\", TRUE)).'</h5>\n '.$aff_image_div.'\n <h6>'.stripslashes($d2 [shop_event_shortdescription]).'</h6>\n </div>\n <div class=\"DatePrice\">\n <p>'.$this->__('Price').' : '.$price.'</p>\n '.$this->__('Time').' : '.$d2 [shop_event_startdate].', '.$d2 [shop_event_starthour].' - '.($d2 [shop_event_enddate]\n != $d2 [shop_event_startdate] ? $d2 [shop_event_enddate].', '\n : '').$d2 [shop_event_endhour].'<br>\n '.$this->__('Location').' : '.stripslashes($d2 [shop_event_venue]).'\n </div>\n <div class=\"Sect3\">\n '.$this->__('Contact').' : '.$d2 [phone].'<br>\n '.$this->__('Organizer').' : '.$d2 [uname].'<br>\n <span class=\"Sect3Link\">\n '.$this->__('See More').'...\n </span>\n </div>\n </div>\n </a>';\n // echo $l;\n $l ++;\n }\n $s ++;\n }\n\n $k ++;\n }\n $newArrayCount = sizeof($newArray);\n $output .= \"</div>\";\n } else {\n // echo \"hellooo\";\n foreach ($arrays ['dates'] as $key => $d1) {\n if ($k == $limit) {\n break;\n }\n\n $dayname = date_format(date_create($key), 'l');\n $output .= \"<div>\n <b>$key $dayname</b> </br>\";\n foreach ($arrays ['dates'] [$key] as $key2 => $d2) {\n $output .= \"&nbsp;&nbsp;<a href='\".ModUtil::url('ZSELEX',\n 'user', 'viewevent',\n array(\n 'shop_id' => $d2 ['shop_id'],\n 'eventId' => $d2 ['shop_event_id']\n )).\"'>$d2[shop_event_name]</a><br>\n <div>\";\n }\n $output .= \"</br>\";\n $k ++;\n }\n }\n // exit;\n // echo $totalCount;\n // $loadCount = 3;\n // echo \"eventcount : \" . $eventcount;\n // if ($eventcount >= $limit) {\n if ($newArrayCount > $limit) {\n // $output .= '<div style=\"cursor:pointer\" align=right onclick=getMoreEvents()> <font color=\"blue\">more events... </font> </div>';\n // $output .= \"<div class='allevent' style='cursor:pointer' onclick=check(document.getElementById('hcountry').value,document.getElementById('hregion').value,document.getElementById('hcity').value,document.getElementById('harea').value,document.getElementById('hshop').value,document.getElementById('hcategory').value,document.getElementById('hbranch').value,document.getElementById('hsearch').value)> <font color='blue'>\" . $this->__('All Events...') . \" </font> </div>\";\n // $output .= \"<div style='cursor:pointer'><a class='infoclass' id='allevents' href='\" . ModUtil::url('ZSELEX', 'info', 'showEvents') . \"'>All Events...</a></div>\";\n // $output .= \"<br><a href style='cursor:pointer' onclick=check(document.getElementById('hcountry').value,document.getElementById('hregion').value,document.getElementById('hcity').value,document.getElementById('harea').value,document.getElementById('hshop').value,document.getElementById('hcategory').value,document.getElementById('hbranch').value,document.getElementById('hsearch').value)> \" . $this->__('All Events...') . \"</a>\";\n $output .= '<div class=\"load_more_link\" align=\"right\">';\n $output .= '<input type=\"button\" class=\"eventmorebutton\" value=\"'.$this->__('Load More Events').'\"\n onclick=showEvents(\"'.$loadCount.'\")>';\n $output .= '<span class=\"flash\"></span></div>';\n }\n } else {\n $output .= '<dt> &nbsp;&nbsp;&nbsp;&nbsp; '.$this->__('No Events Found').' </dt>';\n }\n // }\n } else {\n\n $output .= '<dt> &nbsp;&nbsp;&nbsp;&nbsp; '.$this->__('No Events Found').' </dt>';\n }\n\n $output .= '</dl>';\n\n // ZSELEX_Util::ajaxOutput($output);\n $data [\"data\"] = $output;\n AjaxUtil::output($data);\n }", "public function showEvents2($args)\n {\n $setParams = array();\n $level = FormUtil::getPassedValue(\"level\");\n $shop_id = FormUtil::getPassedValue(\"shop_id\");\n $country_id = FormUtil::getPassedValue(\"country_id\");\n $region_id = FormUtil::getPassedValue(\"region_id\");\n $city_id = FormUtil::getPassedValue(\"city_id\");\n $area_id = FormUtil::getPassedValue(\"area_id\");\n $branch_id = FormUtil::getPassedValue(\"branch_id\");\n $category_id = FormUtil::getPassedValue(\"category_id\");\n $search = FormUtil::getPassedValue(\"hsearch\");\n $search = ($search == $this->__('search for...') || $search == $this->__('search'))\n ? '' : $search;\n // $eventlimit = FormUtil::getPassedValue(\"eventlimit\");\n $startlimit = FormUtil::getPassedValue(\"startlimit\");\n // $startlimit = 0;\n // echo $startlimit;\n $eventlimit = FormUtil::getPassedValue(\"eventlimit\");\n if (isset($startlimit) && !empty($startlimit)) {\n $pageLimit = $startlimit;\n } else {\n $pageLimit = '0';\n }\n $loadCount = $pageLimit + $eventlimit;\n // echo $loadCount;\n $reset = FormUtil::getPassedValue(\"reset\");\n // echo $reset; exit;\n if (!empty($eventlimit)) {\n $limit = $eventlimit;\n $limitquery = \"LIMIT 0 , $eventlimit\";\n } else {\n $limit = \"2\";\n $limitquery = \"LIMIT 0 , $limit\";\n }\n\n // echo $limitquery;\n\n $searchquery = '';\n if (($shop_id > 0 || !empty($shop_id)) || ($region_id > 0 || !empty($region_id))\n || ($city_id > 0 || !empty($city_id)) || ($country_id > 0 || !empty($country_id))\n || ($area_id > 0 || !empty($area_id)) || ($search > 0 || !empty($search))\n || ($category_id > 0 || !empty($category_id)) || ($branch_id > 0 || !empty($branch_id)\n || !empty($eventdate))) {\n\n // $eventdateqry = \" AND shop_event_startdate>=CURDATE()\";\n $eventdateqry = '';\n $output = '';\n $items = array(\n 'id' => $shop_id\n );\n // $shops = ModUtil::apiFunc('ZSELEX', 'admin', 'getShop', $items);\n $where = '';\n $append = '';\n\n if (!empty($country_id)) { // COUNTRY\n $append .= \" AND a.country_id=$country_id\";\n }\n\n if (!empty($region_id)) { // REGION\n $append .= \" AND a.region_id=$region_id\";\n }\n\n if (!empty($city_id)) { // CITY\n $append .= \" AND a.city_id=$city_id\";\n }\n\n if (!empty($area_id)) { // AREA\n $append .= \" AND a.area_id=$area_id\";\n }\n\n if (!empty($shop_id)) { // SHOP\n $append .= \" AND a.shop_id=$shop_id\";\n }\n if (!empty($category_id)) {\n // $append .= \" AND a.cat_id=$category_id\";\n $append .= \" AND a.shop_id IN(SELECT shop_id FROM zselex_shop_to_category WHERE category_id=$category_id) \";\n }\n\n if (!empty($branch_id)) {\n $append .= \" AND a.branch_id=$branch_id\";\n }\n\n if (!empty($search)) {\n // $append .= \" AND (a.shop_id IN (SELECT shop_id FROM zselex_keywords WHERE keyword LIKE '%\" . DataUtil::formatForStore($search) . \"%') OR a.shop_id IN (SELECT shop_id FROM zselex_shop WHERE shop_name LIKE '%\" . DataUtil::formatForStore($search) . \"%'))\";\n $append .= \" AND (a.shop_name LIKE :search OR MATCH (a.shop_name) AGAINST (:search2) OR a.shop_id IN (SELECT shop_id FROM zselex_keywords WHERE keyword LIKE :search OR MATCH (keyword) AGAINST (:search2)))\";\n $setParams += array(\n 'search' => '%'.DataUtil::formatForStore($search).'%',\n 'search2' => DataUtil::formatForStore($search)\n );\n }\n\n $result = $this->entityManager->getRepository('ZSELEX_Entity_Event')->getUpcomingEventShops(array(\n 'append' => $append,\n 'setParams' => $setParams,\n 'show_all' => true,\n 'upcommingEvents' => true\n ));\n\n $count = count($result);\n } else {\n\n $count = 0;\n }\n $shopsql = '';\n if ($count > 0) {\n\n foreach ($result as $shopid) {\n $shop_idarray [] = $shopid ['shop_id'];\n }\n\n $shop_ids = implode(\",\", $shop_idarray);\n // foreach ($result as $shop) {\n $shopsql = \" AND a.shop_id IN($shop_ids)\";\n $shopquery1 = \" AND a.shop IN($shop_ids)\";\n\n if ($reset != 'reset') {\n $shopquery = $shopsql;\n } else {\n $shopquery = \"\";\n }\n\n // echo $shopquery;\n\n /*\n * $minmax = \"SELECT MIN( shop_event_startdate ) as mindate , MAX( shop_event_enddate ) as maxdate\n * FROM zselex_shop_events a\n * WHERE a.shop_event_id IS NOT NULL AND UNIX_TIMESTAMP(a.shop_event_startdate) != 0 AND UNIX_TIMESTAMP(a.shop_event_enddate) != 0 AND a.status='1' \" . \" \" . $shopquery . \" \" . $limitquery;\n * //echo $minmax;\n * $q = DBUtil::executeSQL($minmax);\n * $e = $q->fetch();\n */\n $e = $this->entityManager->getRepository('ZSELEX_Entity_Event')->getEventDates(array(\n 'shopquery' => $shopquery1\n ));\n\n $mindate = $e ['mindate'];\n $maxdate = $e ['maxdate'];\n $mxdates = array(\n \"0\" => $maxdate\n );\n $datearray = array();\n // echo \"mindate : \" . $mindate;\n // echo \"maxdate : \" . $maxdate;\n\n $datearray = $this->createDateRangeArray($mindate, $maxdate);\n $datearray = array_merge($datearray, $mxdates);\n\n $dateCount = count($datearray);\n\n $todayDate = date(\"Y-m-d\");\n $arrays = array();\n\n $i = 0;\n $j = 0;\n foreach ($datearray as $key => $d) {\n if ($d < $todayDate) continue;\n // echo $d . '<br>';\n if ($i == $limit) {\n // break;\n }\n\n /*\n * $sql1 = \"SELECT a.shop_event_id , a.shop_id , a.shop_event_name , a.shop_event_shortdescription , a.shop_event_description , a.shop_event_startdate , a.shop_event_starthour , a.shop_event_startminute , a.shop_event_enddate , a.shop_event_endhour , a.shop_event_endminute,a.price,a.email,a.phone,a.shop_event_venue,\n * b.aff_id , c.aff_image\n * FROM zselex_shop_events a\n * LEFT JOIN zselex_shop b ON b.shop_id=a.shop_id\n * LEFT JOIN zselex_shop_affiliation c ON c.aff_id=b.aff_id\n * WHERE '\" . $d . \"' BETWEEN a.shop_event_startdate AND a.shop_event_enddate AND (a.activation_date<=CURDATE() OR UNIX_TIMESTAMP(a.activation_date) = 0) \" . \" \" . $shopquery;\n * //echo $sql1;\n *\n * $query1 = DBUtil::executeSQL($sql1);\n * $events1 = $query1->fetchAll();\n */\n $events1 = $this->entityManager->getRepository('ZSELEX_Entity_Event')->getEventBetweenDates(array(\n 'd' => $d,\n 'shopsql' => $shopquery1\n ));\n foreach ($events1 as $get => $owner) {\n $ownerName = ModUtil::apiFunc('ZSELEX',\n 'admin', 'getOwner',\n $args = array(\n 'shop_id' => $owner ['shop_id']\n ));\n $events1 [$get] ['uname'] = $ownerName;\n }\n // echo $events1['shop_event_name'] . '<br>';\n $dates = strtotime(date(\"Y-m-d\", strtotime($d)).\" +$j day\");\n $headlinedates = date('l dS \\o\\f F Y', $dates);\n // echo $headlinedates . '<br>';\n $arrays ['dates'] [$d] = $events1;\n\n // echo \"<pre>\"; print_r($events1); echo \"</pre>\";\n // $datearray[$key]['eventsname'] = 'hiii';\n $i ++;\n $j ++;\n }\n\n $l = 0;\n $eventcount = count($arrays ['dates']);\n // echo $eventcount;\n if ($eventcount > 0) {\n $todayDate = date(\"Y-m-d\");\n $current_theme = System::getVar('Default_Theme');\n // exit;\n if ($current_theme == 'CityPilot') {\n // echo \"hellooo\";\n $output .= '<div class=\"DateBlock\">';\n $k = 0;\n $s = 0;\n foreach ($arrays ['dates'] as $key => $d1) {\n // echo \"hii\";\n if ($k == $limit) {\n // break;\n }\n $eventsdate = $key;\n $dateexplode = explode('-', $eventsdate);\n $dayname = date_format(date_create($eventsdate), 'l');\n $dayname = $this->__($dayname);\n\n // echo $startlimit . '<br>';\n foreach ($arrays ['dates'] [$key] as $key2 => $d2) {\n // echo $s . '<br>';\n // echo $l . '<br>';\n if ($s >= $startlimit) {\n $newArray [] = $d2;\n if ($l == $limit) {\n break;\n }\n\n if ($d2 [price] > 0) {\n $curr_args = array(\n 'amount' => $d2 [price],\n 'currency_symbol' => '',\n 'decimal_point' => ',',\n 'thousands_sep' => '.',\n 'precision' => '2'\n );\n $price = ModUtil::apiFunc('ZSELEX',\n 'user', 'number2currency',\n $curr_args);\n } else {\n $price = $this->__(\"FREE\");\n }\n\n if ($d2 ['aff_id'] > 0) {\n $aff_image = pnGetBaseURL().\"modules/ZSELEX/images/affiliates/\".$d2 ['aff_image'];\n $aff_image_link = \"<img src='\".$aff_image.\"' style='width: 50px;'>\";\n $aff_image_div = \"<div style='width: 50px; height: 50px; position: relative;z-index:999;display:inline-block; float:right; margin-top:-45px; margin-right: 30px;'>$aff_image_link</div>\";\n }\n $evntUrl = pnGetBaseURL().ModUtil::url('ZSELEX',\n 'user', 'viewevent',\n array(\n 'shop_id' => $d2 [shop_id],\n 'eventId' => $d2 [shop_event_id]\n ));\n // $evntUrl = \"www.gmail.com\";\n $output .= '<a href=\"'.$evntUrl.'\" class=\"HoverEffet\">\n <div class=\"DateBorder\">\n <div class=\"Date\">\n <span class=\"DateSpan\">'.$dateexplode [2].'/'.$dateexplode [1].'</span><br /><span class=\"YearSpan\">'.$dateexplode [0].'</span><br /><span class=\"WeekDay\">'.$dayname.'</span>\n </div>\n\n <div class=\"DateHead\">\n <h5>'.stripslashes(wordwrap($d2 [shop_event_name],\n 19, \"<br>\\n\", TRUE)).'</h5>\n '.$aff_image_div.'\n <h6>'.stripslashes($d2 [shop_event_shortdescription]).'</h6>\n </div>\n <div class=\"DatePrice\">\n <p>'.$this->__('Price').' : '.$price.'</p>\n '.$this->__('Time').' : '.$d2 [shop_event_startdate].', '.$d2 [shop_event_starthour].' - '.($d2 [shop_event_enddate]\n != $d2 [shop_event_startdate] ? $d2 [shop_event_enddate].', '\n : '').$d2 [shop_event_endhour].'<br>\n '.$this->__('Location').' : '.stripslashes($d2 [shop_event_venue]).'\n </div>\n <div class=\"Sect3\">\n '.$this->__('Contact').' : '.$d2 [phone].'<br>\n '.$this->__('Organizer').' : '.$d2 [uname].'<br>\n <span class=\"Sect3Link\">\n '.$this->__('See More').'...\n </span>\n </div>\n </div>\n </a>';\n // echo $l;\n $l ++;\n }\n $s ++;\n }\n\n $k ++;\n }\n $newArrayCount = sizeof($newArray);\n $output .= \"</div>\";\n } else {\n // echo \"hellooo\";\n foreach ($arrays ['dates'] as $key => $d1) {\n if ($k == $limit) {\n break;\n }\n\n $dayname = date_format(date_create($key), 'l');\n $output .= \"<div>\n <b>$key $dayname</b> </br>\";\n foreach ($arrays ['dates'] [$key] as $key2 => $d2) {\n $output .= \"&nbsp;&nbsp;<a href='\".ModUtil::url('ZSELEX',\n 'user', 'viewevent',\n array(\n 'shop_id' => $d2 ['shop_id'],\n 'eventId' => $d2 ['shop_event_id']\n )).\"'>$d2[shop_event_name]</a><br>\n <div>\";\n }\n $output .= \"</br>\";\n $k ++;\n }\n }\n // exit;\n // echo $totalCount;\n // $loadCount = 3;\n // echo \"eventcount : \" . $eventcount;\n // if ($eventcount >= $limit) {\n if ($newArrayCount > $limit) {\n // $output .= '<div style=\"cursor:pointer\" align=right onclick=getMoreEvents()> <font color=\"blue\">more events... </font> </div>';\n // $output .= \"<div class='allevent' style='cursor:pointer' onclick=check(document.getElementById('hcountry').value,document.getElementById('hregion').value,document.getElementById('hcity').value,document.getElementById('harea').value,document.getElementById('hshop').value,document.getElementById('hcategory').value,document.getElementById('hbranch').value,document.getElementById('hsearch').value)> <font color='blue'>\" . $this->__('All Events...') . \" </font> </div>\";\n // $output .= \"<div style='cursor:pointer'><a class='infoclass' id='allevents' href='\" . ModUtil::url('ZSELEX', 'info', 'showEvents') . \"'>All Events...</a></div>\";\n // $output .= \"<br><a href style='cursor:pointer' onclick=check(document.getElementById('hcountry').value,document.getElementById('hregion').value,document.getElementById('hcity').value,document.getElementById('harea').value,document.getElementById('hshop').value,document.getElementById('hcategory').value,document.getElementById('hbranch').value,document.getElementById('hsearch').value)> \" . $this->__('All Events...') . \"</a>\";\n $output .= '<div class=\"load_more_link\" align=\"right\">';\n $output .= '<input type=\"button\" class=\"eventmorebutton\" value=\"'.$this->__('Load More Events').'\"\n onclick=showEvents(\"'.$loadCount.'\")>';\n $output .= '<span class=\"flash\"></span></div>';\n }\n } else {\n $output .= '<dt> &nbsp;&nbsp;&nbsp;&nbsp; '.$this->__('No Events Found').' </dt>';\n }\n // }\n } else {\n\n $output .= '<dt> &nbsp;&nbsp;&nbsp;&nbsp; '.$this->__('No Events Found').' </dt>';\n }\n\n $output .= '</dl>';\n\n $data [\"data\"] = $output;\n AjaxUtil::output($data);\n }", "function showGetEventSources() {\n\t\t$this->getEngine()->assign('oModel', utilityOutputWrapper::wrap($this->getModel()));\n\t\t$this->render($this->getTpl('sourceList', '/account'));\n\t}", "public function show_event($id)\r\n\t{\r\n\t\t//check for admin\r\n\t\tif($this->session->userdata('logged_in'))\r\n\t\t{\r\n\t\t\t$session_data = $this->session->userdata('logged_in');\r\n\t\t\t$data['username'] = $session_data['username'];\r\n\t\t\t$data['admin'] = $session_data['admin'];\r\n\t\t\t// get info if user is logged in\r\n\t\t\t$data['user_info'] = $this->caifmodel->get_user_info($session_data['username']);\r\n\t\t\t// see if they have already rsvp'ed to the event\r\n\t\t\t$data['already_rsvp'] = $this->caifmodel->get_rsvp($session_data['username'],$id);\r\n\t\t}\r\n\t\telse\r\n\t\t\t$data['username'] = '';\r\n\t\t\t\r\n\t\t// set active tab\r\n\t\t$data['welcome_active'] = \"\";\r\n\t\t$data['host_active'] = \"\";\r\n\t\t$data['event_active'] = \"active\";\r\n\t\t\r\n\t\t// get the data for the event\r\n\t\t$data['event_info'] = $this->caifmodel->get_event_info($id);\r\n\t\t\r\n\t\t// load views\r\n\t\t$this->load->view('include/header',$data);\r\n\t\t$this->load->view('include/tabs',$data);\r\n\t\t$this->load->view('show_events',$data);\r\n\t\t$this->load->view('include/footer');\t\r\n\t}", "function eventNavigation() \n {\n echo \"<ul class='finanzNAV'>\";\n if (isset($_SESSION['username'])) {\n $this->eventAdministration();\n }\n if (isset($_SESSION['eventid']) AND isset($_SESSION['eventguest'])) {\n echo \"<li><a href='event.php'>\" .$this->getEventname($_SESSION['eventid']). \"</a></li>\";\n }\n if (isset($_SESSION['eventid'])) {\n echo \"<li><a href='index.php?eventchange'>Logout</a></li>\";\n }\n echo \"</ul>\";\n \n }", "function display_postasevent_demo() {\n\techo '<table><tbody>';\n\techo '<tr><th>Event Start Date:</th><td>' . date('F j, Y', get_post_meta( get_the_ID(), '_postasevent_demo_event_start_date', true ) ) . '</td></tr>';\n\techo '<tr><th>Event Start Time:</th><td>' . get_post_meta( get_the_ID(), '_postasevent_demo_event_start_time', true ) . '</td></tr>';\n\n\techo '<tr style=\"background-color:rgba(81, 136, 230, 0.66);\"><th>Event End Date:</th><td>' . date('F j, Y', get_post_meta( get_the_ID(), '_postasevent_demo_event_end_date', true ) ) . '</td></tr>';\n\techo '<tr style=\"background-color:rgba(81, 136, 230, 0.66);\"><th>Event End Time:</th><td>' . get_post_meta( get_the_ID(), '_postasevent_demo_event_end_time', true ) . '</td></tr>';\n\n\techo '<tr><th>Registration Deadline Date:</th><td>' . date('F j, Y', get_post_meta( get_the_ID(), '_postasevent_demo_event_reg_date', true ) ) . '</td></tr>';\n\techo '<tr><th>Registration Deadline Time:</th><td>' . get_post_meta( get_the_ID(), '_postasevent_demo_event_reg_time', true ) . '</td></tr>';\n\techo '</tbody></table>';\n}", "function ShowCalendar()\n{\n\t$str1=\"select value1 from options where name='calendar'\";\n\t$result=mysql_query($str1) or\n\t\tdie(mysql_error());\n\t$row=mysql_fetch_array($result);\n\tif ($row['value1']==1)\n\t{\n echo(\"<tr><td height='154' valign='top'><table width='100%' border='0' cellpadding='0' cellspacing='0' bgcolor='#F0F8FF'>\");\n echo(\"<tr><td bgcolor='\");\n\t echo(background());\n\t echo(\"' class='leftmenumainitem' width='216' valign='top'>\");\n\t\techo(\"<img src='image/point.jpg' />&nbsp;&nbsp;\");\n\t\techo(getPara('calendar','value2'));\n\t\techo(\" </td></tr>\");\n echo(\"<tr><td height='132' align='center' valign='middle'><div align='center'>\");\n echo(\"<script language='javascript'>calendar();</script>\");\n echo(\"</div></td></tr></table></td></tr>\");\n\t}\n\n\tmysql_free_result($result);\n}", "function superAdministration() \n {\n echo \"<div class='newFahrt'>\";\n \n $this->eventNavigation();\n echo \"<h2>Event Management</h2>\";\n echo \"<p>Hier können Events angelegt und verwaltet werden</p>\";\n\n \n $this->listAllEvents();\n\n if (isset($_SESSION['eventid'])) {\n $this->showManageCountdowns($_SESSION['eventid']);\n $this->showInviteCodes($_SESSION['eventid']);\n $this->showEventMembers($_SESSION['eventid']);\n }\n echo \"</div>\"; // newFahrt END\n }", "public function actionEventManagement(){\n $accessUser = [role::ADMIN, role::MEMBER]; // which user(role_id) has permission to join the page\n User::checkUserPermissionForPage($accessUser);\n\n\n $this->_params['title'] = 'Eventverwaltung';\n\n if(isset($_GET['eventId'])) {\n $dataDir = 'assets/images/upload/events/';\n unlink($dataDir . $_GET['pictureName']);\n Booking::deleteWhere('EVENT_ID = '.$_GET['eventId']);\n Event::deleteWhere('ID = ' . $_GET['eventId']);\n sendHeaderByControllerAndAction('event', 'EventManagement');\n }\n\n\n $sortEvent = 'ORDER BY DATE';\n $sortEventOld = 'ORDER BY DATE';\n\n if(isset($_GET['sortEvent'])) {\n $sortEvent = Event::generateSortClauseForEvent($_GET['sortEvent']);\n }\n\n if(isset($_GET['sortEventOld'])) {\n $sortEventOld = Event::generateSortClauseForEvent($_GET['sortEventOld']);\n }\n\n\n $this->_params['eventList'] = Event::find('DATE >= CURDATE()', null, $sortEvent);\n $this->_params['eventListOld'] = Event::find('DATE < CURDATE()', null, $sortEventOld);\n\n }", "public function sprintEvents($events, $view = 'date', $articleClass = 'span4', $imageWidth = 150, $imageHeight = 150, $realImageSize = 1) {\n\t\tglobal $model;\n\t\t$content = '';\n\t\tif (is_array($events)) {\n\t\t\tif ($view == 'multiple-days') foreach($events as $day => $_events) {\n\t\t\t\t$date = strtotime($day);\n\t\t\t\t$content .= sprintf('<h1 class=\"eventDate\">%s</h1>', $date > 0 ? date('l, M j, Y', $date) : $model->lang('WEEKLY', 'CalendarModel'));\n\t\t\t\t$content .= $this->sprintEvents($_events, 'date', $articleClass, $imageWidth, $imageHeight, $realImageSize);\n\t\t\t} else foreach($events as $event) {\n\t\t\t\t$content .= $this->sprintEvent($event, $view, $articleClass, $imageWidth, $imageHeight, $realImageSize);\n\t\t\t}\n\t\t}\n\t\treturn $content;\n\t}", "function get_my_events($rama) {\r\n\t\tglobal $post;\r\n\t\t$events = new WP_Query();\r\n\t\t$events->query('post_type=Rama&showposts=5&order=desc' . $rama);\r\n\t\tif($events->found_posts>0) {\r\n\t\t\techo '<ul class=\"rama_widget\">';\r\n\t\t\t\twhile($events->have_posts()) {\r\n\t\t\t\t\t$events->the_post();\r\n\t\t\t\t\t$image = (has_post_thumbnail($post->ID)) ? get_the_post_thumbnail($post->ID) : '<div class=\"missingthumbnail\"></div>';\r\n\t\t\t\t\t$eventItem = '<li>' . $image;\r\n\t\t\t\t\t$eventItem .= '<a href=\"' . get_permalink() . '\">';\r\n\t\t\t\t\t$eventItem .= get_the_title() . '</a>';\r\n\t\t\t\t\t$eventItem .= '<span>' . get_the_excerpt() . '';\r\n\t\t\t\t\t$eventItem .= '<a class=\"widgetmore\" href=\"' . get_permalink() . '\">';\r\n\t\t\t\t\t$eventItem .= '<p>Read More... </p>' . '</a></span></li>';\r\n\t\t\t\t\techo $eventItem;\r\n\t\t\t\t}\r\n\t\t\techo '</ul>';\r\n\t\t\twp_reset_postdata();\r\n\t\t}\r\n\t}", "function cat($id,$firstcatevcolor,$secondcatevcolor){\nglobal $language,$maand,$searchscatviews,$popupevent,$popupeventheight,$popupeventwidth;\n\n$query = \"select id,title,cat_name,day,month,year from events left join calendar_cat on events.cat=calendar_cat.cat_id where approved='1' and events.cat='$id' order by year ASC, month ASC, day ASC\";\n\n$result = mysql_query($query);\n$rowname = mysql_fetch_object($result);\n$rows = mysql_num_rows($result);\nif (!$rows){\n\necho \"<br><h3>\".translate(\"noevents\").\"</h3>\\n\";\n\n}\n\nelse {\n\necho \"<h3>\".translate(\"numbevents\").\" \".$rowname->cat_name.\"</h3>\\n\";\n\n$result = mysql_query($query);\n$foo = '';\nwhile ($row = mysql_fetch_object($result)){\n\n$foo++ % 2 ? $color=$firstcatevcolor : $color=$secondcatevcolor;\n\necho \"<table border=1 bgcolor=$color cellspacing=0 cellpadding=4 width=\\\"100%\\\">\\n\";\necho \"<tr><td>\\n<li>\";\nif ($popupevent == 1)\n echo \"<a href=\\\"#\\\" onclick=\\\"MM_openBrWindow('cal_popup.php?op=view&id=\".$row->id.\"','Calendar','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=\".$popupeventwidth.\",height=\".$popupeventheight.\"')\\\">\";\nelse\n echo \"<a href=calendar.php?op=view&id=\".$row->id.\">\";\necho \"<b>\".stripslashes($row->title).\"</b></a> \".translate(\"op\").\" \".$row->day.\" \".$maand[$row->month].\" \".$row->year.\"\\n\";\necho \"</td></tr>\\n\";\necho \"</table>\\n\";\n\n}\n\n}\nif ($searchscatviews == 1)\n\tsearch();\n}", "private function getEvents () \n\n\t\t{\n\t\t\t $dbs = new DB ( $this->config['database'] );\n $c = $dbs->query (\"SELECT * FROM tbl_events_record WHERE org_id = '\" . $this->c . \"'\");\n\t\t\t if ( count ( $c ) ) {\n\t\t\t\t$this->result['data']['id'] = trim ( $this->c );\n\t\t\t\t$this->result['data']['events'] = $c[0]['events'];\n\t\t\t\t$this->result['data']['date'] = $c[0]['date_rec'];\n\t\t\t } else \n\t\t\t\t$this->result['data']['result'] = \"Not found [error code:100:101]\";\n\n\t\t\t $dbs->CloseConnection ();\n\t\t\t\n\t\t \treturn;\n\t\t}", "public function displayEventWidget($attrs) {\n $widget = new EventsWidget();\n \n ob_start();\n $widget->widget([], $attrs);\n return ob_get_clean();\n }", "public function getOtherEvents();", "function eventLink ( $id, $name ) {\n return \"<a class='e' href='\" . pathToRoot() . \"e.php?i=$id'>$name</a>\";\n}", "public function getEvents()\n {\n $main_actions = [\n 'event' => \\adminer\\lang('Create event'),\n ];\n\n $headers = [\n \\adminer\\lang('Name'),\n \\adminer\\lang('Schedule'),\n \\adminer\\lang('Start'),\n // \\adminer\\lang('End'),\n ];\n\n // From db.inc.php\n $events = \\adminer\\support(\"event\") ? \\adminer\\get_rows(\"SHOW EVENTS\") : [];\n $details = [];\n foreach($events as $event)\n {\n $detail = [\n 'name' => \\adminer\\h($event[\"Name\"]),\n ];\n if(($event[\"Execute at\"]))\n {\n $detail['schedule'] = \\adminer\\lang('At given time');\n $detail['start'] = $event[\"Execute at\"];\n // $detail['end'] = '';\n }\n else\n {\n $detail['schedule'] = \\adminer\\lang('Every') . \" \" .\n $event[\"Interval value\"] . \" \" . $event[\"Interval field\"];\n $detail['start'] = $event[\"Starts\"];\n // $detail['end'] = '';\n }\n $details[] = $detail;\n }\n\n return \\compact('main_actions', 'headers', 'details');\n }", "function get_new_events( $options=array() ){\n\t\t\n\t\tglobal $gamo, $dbh;\n\t\t\n\t\t$error_append = \" CLASS[\".__CLASS__.\"] METHOD[\".__METHOD__.\"] DATE[\".date('Y-m-d H:i:s').\"]\";\n\t\t\n\t\tCore::ensure_defaults(array(\n\t\t\t\t'start' => 0,\n\t\t\t\t'number' => 1\n\t\t\t),\n\t\t$options);\n\t\t\n\t\t$sql = \"SELECT id FROM \" . CORE_DB . \".\" . self::$table_name.\n\t\t\" WHERE active = 1 and hide = 0 ORDER BY date_time ASC LIMIT \".$options['start'].\",\".$options['number'];\n\n\t\t$sth = $dbh->prepare($sql);\n\n\t\t$vevents = array();\n\t\t$sth->execute();\n\n\t\twhile($row = $sth->fetch()) {\n\n\t\t\t$row = Core::r('virtual_events')->get_event(array(\n\t\t\t\t\t'id' => $row['id'],\n\t\t\t\t\t'public_has' => 1,\n\t\t\t\t\t'show_private_has' => 0\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tarray_push($vevents, $row);\n\n\t\t}\n\n\t\treturn $vevents;\n\t\t\n\t}", "function icalendar_render_events( $url = '', $args = array() ) {\n\t$ical = new iCalendarReader();\n\treturn $ical->render( $url, $args );\n}", "function event_list(){\n\tglobal $DB;\n\t$currenttime = time();\n\t$query = \"SELECT * FROM {event} WHERE eventtype='site' ORDER By id DESC\";\n $result = $DB->get_records_sql($query);\n\treturn $result;\n}", "function BeforeShowPrint(&$xt, &$templatefile, &$pageObject)\n{\n\n\t\tglobal $dal;\n$strWhereClause=$_SESSION[\"strWhereClause\"];\n//**********************************************\n\n//\tread settings\nif ($_SESSION[\"calendar_FirstDayOfWeek\"]) {\n\t// we need 0-Monday, 6-Sunday\n\t$firstWeekDay = ( $_SESSION[\"calendar_FirstDayOfWeek\"] + 6 ) % 7; \n}\nelse \n\t$firstWeekDay = 6; //\t6 - sunday\n\nif ($_SESSION[\"calendar_EditInPast\"]) {\n\t$allowEditInPast = $_SESSION[\"calendar_EditInPast\"];\n}\nelse \n\t$allowEditInPast = 0; //edit events in past 0 - No, 1 - Yes\n\n$thisMoment = db2time(now());\n\n$currentDate = array( $_SESSION[\"yr\"], $_SESSION[\"mon\"], $_SESSION[\"days\"], 0, 0, 0 );\n\n$monthStart = array( $_SESSION[\"yr\"], $_SESSION[\"mon\"], 1, 0, 0, 0 );\n$monthDays = calendar_getMonthDays($_SESSION[\"yr\"], $_SESSION[\"mon\"]);\n$monthEnd = calendar_adddays($monthStart, $monthDays);\n$monthFirstDay = getdayofweek($monthStart);\n \n\n$rawevents = calendar_getListOfEventsInRange( $monthStart, $monthEnd, $strWhereClause, $pageObject->connection );\n$events = calendar_sortEvents($monthStart, $monthEnd, $rawevents );\n\n//output header Monday Tuesday ...\n$xt->assign(\"Monthly_month_year\",calendar_format_datetime_custom( $currentDate, \" MMMM yyyy\" ));\nif ($firstWeekDay==6){\n\t$monthFirstDay++;\n\t$xt->assign(\"row00sdname1\", getDayNameByNumber(7,\"dddd\"));\n\tfor($j=2; $j<=7; $j++){\n\t\t$xt->assign(\"row00sdname\".($j), getDayNameByNumber($j-1,\"dddd\"));\n\t}\n}\nelse {\n\tfor($j=1; $j<=7; $j++){\n\t\t$xt->assign(\"row00sdname\".($j), getDayNameByNumber($j,\"dddd\"));\n\t}\n}\n//\tassign events\n\n$today = getDatePart( db2time( now() ) );\n$monthDay = $monthStart;\n\t\nfor ($i=$monthFirstDay; $i<$monthDays+$monthFirstDay; $i++) \n{\n\t$eventsHTML = \"\";\n\t//input events\n\t$monthDayKey = date2db( $monthDay );\n\t\n\tif( isset( $events[ $monthDayKey ] ) )\n\t{\n\t\tforeach( $events[ $monthDayKey ] as $event )\n\t\t{\n\t\t\t$eventsHTML .= calendar_getEventHTML( $event, $monthDayKey, $allowEditInPast, $pageObject->pageType );\n\t\t}\n\t\n\t}\n\t\n\t$xt->assign(\"row00\".$i.\"Datevisible\",true);\n\t$xt->assign(\"row00\".$i.\"Datevalue\", calendar_format_datetime_custom( $monthDay, \"d\" ) );\n\t$xt->assign(\"row00\".$i.\"Dayvalue\", $eventsHTML );\n\n\t$monthDay = calendar_adddays( $monthDay, 1 );\n}\n\n\n;\t\t\n}", "function viewEventDetail()\n{\n\t\t/*\n\t\t{\n\t \"name\": \"Master The Art Of Selling\",\n\t \"address\": \"10-f, Fort Legend Tower, 3rd Ave, Taguig, Metro Manila\",\n\t \"gmapLong\": 121.04692,\n\t \"gmapLat\": 14.55408,\n\t \"date\": \"4-25-2016\",\n\t \"startTime\": \"10:00\",\n\t \"endTime\": \"19:00\",\n\t \"eventPhoto\": \"event.jpg\",\n\t \"about\": \"We will teach you on how to master selling and generate more sales for your brand or company\",\n\t \"attendees\": [\n\t {\n\t \"id\": \"1\",\n\t \"firstName\": \"Ken\",\n\t \"lastName\": \"Sia\",\n\t \"profilePhoto\": \"emp1.jpg\"\n\t },\n\t {\n\t \"id\": \"2\",\n\t \"firstName\": \"Jaye\",\n\t \"lastName\": \"Atienza\",\n\t \"profilePhoto\": \"emp2.jpg\"\n\t }\n\t ]\n\t }\n\t */\n\t \n\t//the defaults starts\n\tglobal $myStaticVars;\n\textract($myStaticVars); // make static vars local\n\t$member_default_avatar \t\t= $member_default_avatar;\n\t$member_default_cover\t\t= $member_default_cover;\n\t$member_default\t\t\t\t= $member_default;\n\t$company_default_cover\t\t= $company_default_cover;\n\t$company_default_avatar\t\t= $company_default_avatar;\n\t$events_default\t\t\t\t= $events_default;\n\t$event_default_poster\t\t= $event_default_poster;\n\t//the defaults ends\n\t\n\t\n\t$data= array();\t\t\n\t\n\t$eventTagid=validate_input($_GET['id']);\n\t$eventid=getEventIdfromEventTag($eventTagid);\n\tif($eventid!='')\n\t{\n\t\t$qry=\"SELECT entrp_events.*,entrp_event_categories.category_name \n\t\t\t\tFROM entrp_events \n\t\t\t\tLEFT JOIN entrp_event_categories ON entrp_events.category=entrp_event_categories.id\n\t\t\t WHERE entrp_events.id=\".$eventid.\" AND entrp_events.status!=0\n\t\t\t\t\";\n\t\t$res=getData($qry);\n\t\t$count_res=mysqli_num_rows($res);\n\t\tif($count_res>0)\n\t\t{\n\t\t\twhile($row=mysqli_fetch_array($res))\n\t \t{\n\t \t\t$data['id']\t\t\t\t=\t$row['id'];\n\t \t\t$data['eventTagId']\t=\t$row['eventTagId'];\n\t \t\t$data['city']\t\t\t=\t$row['city'];\n\t \t\t$data['share_url']\t=\t$row['share_url'];\n\t \t\t$data['name']\t\t\t=\t$row['eventName'];\n\t \t\t$data['address']\t\t=\t$row['address'];\n\t\n\t \t\t$data['date_time_formatted']\t\t\t=\tdate('Y/m/d H:i:s', strtotime($row['event_date_time']));\n\t \t\t$data['date']\t\t\t=\t$row['event_date'];\n\t \t\t$data['startTime']\t=\t$row['start_time'];\n\t \t\t$data['endTime']\t\t=\t$row['end_time'];\n\t \t\t$data['eventPhoto']\t=\t$row['clientid'];\n\t \t\tif($row['poster']!='')\n\t \t\t{\n\t \t\t\t$data['poster']\t=\t$row['poster'];\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\t$data['poster']\t=\t$events_default;\n\t \t\t}\n\t \t\t\n\t \t\t$data['about']\t\t\t=\thtmlspecialchars_decode($row['description'],ENT_QUOTES);\n\t \t\t$data['category']\t\t=\t$row['category_name'];\n\t \t\t$data['map']['center']['latitude']\t\t=\t$row['location_lat'];\n\t\t\t\t$data['map']['center']['longitude']\t\t=\t$row['location_long'];\n\t\t\t\t$data['map']['zoom']\t=\t8;\n\t \t}\n\t \t\n\t\t\t$data['joining']\t\t\t=\tgoingForThisEventorNot($eventid);\n\t\t\t$data['attendees']\t\t=\tgetEventAttendeesFromEventID($eventid);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['id']\t\t\t\t\t\t\t\t\t\t=\t'';\n\t\t\t$data['name']\t\t\t\t\t\t\t\t\t=\t'';\n\t\t\t$data['address']\t\t\t\t\t\t\t\t=\t'';\n\t\t\t$data['map']['center']['latitude']\t\t=\t'';\n\t\t\t$data['map']['center']['longitude']\t\t=\t'';\n\t\t\t$data['map']['zoom']\t\t\t\t\t\t\t=\t8;\n\t\t\t$data['date']\t\t\t\t\t\t\t\t\t=\t'';\n\t\t\t$data['startTime']\t\t\t\t\t\t\t=\t'';\n\t\t\t$data['endTime']\t\t\t\t\t\t\t\t=\t'';\n\t\t\t$data['eventPhoto']\t\t\t\t\t\t\t=\t'';\n\t\t\t$data['poster']\t\t\t\t\t\t\t\t=\t'';\n\t\t\t$data['about']\t\t\t\t\t\t\t\t\t=\t'';\n\t \t$data['category']\t\t\t\t\t\t\t\t=\t'';\t\t\n\t\t}\t\n\t}\n\treturn $data;\n}", "public function events()\n {\n $eventdata = $this->Event->find('all', \n array(\n 'order' => array('Event.time' => 'DESC'),\n 'condition' => array('type' => 'Event')\n ));\n \n $this->set('events', $eventdata);\n \n $this->assignUserToView($this->Auth->user('id'));\n \n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Info');\n }", "public function ajaxevents() {\n\t\t$pageTitle = 'Events';\n\t\t$this->autoRender = false;\n\t\t$this->viewBuilder()->setLayout(false);\n\t\t$this->loadModel('Events');\n\t\t$today = date(\"Y-m-d\");\n\t\tif ($this->request->is('ajax')) {\n\n\t\t\t$events = $this->Events->find()->where(['Events.published' => 1, 'DATE(Events.start_date) >' => $today])->order(['Events.start_date' => 'ASC'])->limit(3)->offset($this->request->getData()['offset'])->all();\n\t\t\techo json_encode(array(\"status\" => \"success\", \"data\" => $events));\n\t\t\texit;\n\n\t\t}\n\n\t}", "public function viewNewEvents()\n {\n $this->load->model('M_Event_table');\n $this->load->model('M_Customer_table');\n $events = $this->M_Event_table->getNewEvents();\n $customers = $this->M_Customer_table->getAllCustomers();\n\n $returnData['newEventsMore']= $events;\n $returnData['customers'] = $customers;\n\n $this->load->view('admin/viewNewEvents',$returnData);\n }", "function get_event_wct($html) {\n\t$event_name = $html->find(\".wctlight\")[0]->plaintext;\n\t//Common Sense check\n\tif (strlen($event_name) <= 3) {\n\t\techo \"\\n\\n*****ERROR: Short Event name found\\n\";\n\t\tpause(\"\");\n\t}\n\t\n\t$event_location = $html->find(\".wctlight\")[1]->plaintext;\n\t//Common Sense check\n\tif (strlen($event_location) <= 3) {\n\t\techo \"\\n\\n****ERROR: Short Event location found*****\\n\\n\";\n\t\tpause(\"\");\n\t}\n\t//Get the event date\n\t$event_date_html = str_replace(\"&nbsp;\", \"\", $html->find(\".wctlight\")[3]->plaintext);\n\t$start_date = get_date_wct($event_date_html, \"start\");\n\t$end_date = get_date_wct($event_date_html, \"end\");\n\t\n\t//Get the event purse\n\t$event_purse = get_purse_wct($html->find(\".wctlight\")[5]->plaintext);\n\t\n\t$event_currency = get_currency_wct($html->find(\".wctlight\")[5]->plaintext);\n\t\n\t$event_gender = get_gender_wct($html);\n\n\treturn new Event($event_location, $start_date, $end_date, $event_purse, $event_currency, $event_name, $event_gender);\n}", "function get_event($options = array()) {\n\n\t\t/*\n\t\targs:\n\t\t{\n\t\t\tid: the event id\n\t\t\tget_has: 1 = retrieve info table values, 0 = do not retrieve info table values\n\t\t\tshow_private_has: 1 = show has values that should only be privately accessible (to devs), 0 = do not show\n\t\t}\n\t\t*/\n\n\t\tCore::ensure_defaults(array(\n\t\t\t\t'id' => -1,\n\t\t\t\t'get_has' => 1,\n\t\t\t\t'show_private_has' => 1\n\t\t\t)\n\t\t, $options);\n\n\t\tglobal $dbh;\n\n\t\t$sql = \"SELECT\n\t\tid,\n\t\ttitle,\n\t\tdescription,\n\t\tdate_time,\n\t\tdate_time as date,\n\t\tend_time,\n\t\tactive,\n\t\tsummary\n\t\tFROM \" . CORE_DB . \".virtual_events\n\t\tWHERE id = :id\n\t\t\";\n\n\t\t$sth = $dbh->prepare($sql);\n\t\t$sth->execute(array(\n\t\t\t\t':id' => $options['id']\n\t\t\t)\n\t\t);\n\n\t\t$event = $sth->fetch();\n\n\t\tif(!is_array($event)) { // Could not find event\n\n\t\t\treturn Core::error($this->errors, 8);\n\n\t\t}\n\n\t\t$event = Core::remove_numeric_keys($event);\n\t\t$event['has'] = array();\n\n\t\tif($options['show_private_has'] == 1) {\n\n\t\t\t$params = array(\n\t\t\t\t'event_id' => $options['id']\n\t\t\t);\n\n\t\t\t$filters = Core::db_params(array(\n\t\t\t\t\t'values' => $params\n\t\t\t\t)\n\t\t\t);\n\n\t\t} else {\n\n\t\t\t$filters['sql'] = \"event_id = :event_id AND (info_type = 'livestream_id' OR info_type = 'coveritlive_id' OR info_type = 'launched')\";\n\t\t\t$filters['params'] = array(\n\t\t\t\t':event_id' => $options['id']\n\t\t\t);\n\n\t\t}\n\n\t\t// Retrieve has values\n\t\t$sql = \"SELECT\n\t\tvirtual_events_info_id,\n\t\tevent_id,\n\t\tinfo_type,\n\t\tint_info,\n\t\tinfo,\n\t\tinfo_b,\n\t\ttime\n\t\tFROM\n\t\t\" . CORE_DB . \".virtual_events_info\n\t\tWHERE \" . $filters['sql'];\n\n\t\t$sth = $dbh->prepare($sql);\n\n\t\t$sth->execute($filters['params']);\n\n\t\twhile($row = $sth->fetch()) {\n\n\t\t\tarray_push($event['has'], Core::remove_numeric_keys($row));\n\n\t\t}\n\n\t\treturn $event;\n\n\t}", "function jes_theme_template_standart() {\r\nglobal $bp;\r\n/**************************************/\r\n/* Standart Template for Event Loop */\r\n/* */\r\n/* Base Template\t\t\t\t\t */\r\n/**************************************/\r\n?>\r\n<?php\r\n\t$jes_adata = get_site_option('jes_events' );\r\n\t$_eventstatus = eventstatus(jes_bp_get_event_edtsd(),jes_bp_get_event_edtsth(),jes_bp_get_event_edtstm(),jes_bp_get_event_edted(),jes_bp_get_event_edteth(),jes_bp_get_event_edtetm());\r\n?>\r\n<li>\r\n\t<div class=\"item-avatar\" id=\"jes-avatar\">\r\n\t\t<?php if ($jes_adata['jes_events_show_avatar_directory_size'] > 50 ) { ?>\r\n\t\t<a href=\"<?php jes_bp_event_permalink() ?>\"><?php jes_bp_event_avatar( 'type=full&width='.$jes_adata['jes_events_show_avatar_directory_size'].'&height='.$jes_adata['jes_events_show_avatar_directory_size'] ) ?></a>\r\n\t\t<?php } else { ?>\r\n\t\t<a href=\"<?php jes_bp_event_permalink() ?>\"><?php jes_bp_event_avatar( 'type=thumb&width='.$jes_adata['jes_events_show_avatar_directory_size'].'&height='.$jes_adata['jes_events_show_avatar_directory_size'] ) ?></a>\r\n\t\t<?php } ?>\r\n\t</div>\r\n\r\n\t<div class=\"item\" style=\"width:80%;\" id=\"jes-templ-item-<?php jes_bp_event_id() ?>\">\r\n\t\t<div class=\"item-title\" id=\"jes-title\"><a href=\"<?php jes_bp_event_permalink() ?>\"><?php jes_bp_event_name() ?></a></div>\t\t\t\r\n\t\t\t<div class=\"item-meta\" id=\"jes-template-meta-<?php jes_bp_event_id() ?>\">\r\n\t\t\t\t<em><?php echo $_eventstatus; ?></em> , <em><?php jes_bp_event_type() ?></em>\r\n\t\t\t\t<div class=\"item-desc\" id=\"jes-timedate-<?php jes_bp_event_id() ?>\">\r\n\t\t\t\t\t<strong>Starts:</strong> <span class=\"meta\"><?php jes_bp_event_edtsd() ?>, \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t\t// JLL_MOD - conert military time to 12 hour\r\n\t\t\t\t$shour = jes_bp_get_event_edtsth();\r\n\t\t\t\tif ( $shour == '00' ) { \r\n\t\t\t\t\t$shour = '12';\r\n\t\t\t\t\t$stime = ' am';\r\n\t\t\t\t} elseif ( $shour > 12 ) { \r\n\t\t\t\t\t$shour = $shour - 12;\r\n\t\t\t\t\t$stime = ' pm';\r\n\t\t\t\t} elseif ( $shour < 10 ) { \r\n\t\t\t\t\t$shour = substr( $shour, -1 );\r\n\t\t\t\t\t$stime = ' am';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$stime = ' am';\r\n\t\t\t\t}\r\n\t\t\t\t$ehour = jes_bp_get_event_edteth();\r\n\t\t\t\tif ( $ehour == '00' ) { \r\n\t\t\t\t\t$ehour = '12';\r\n\t\t\t\t\t$etime = ' am';\r\n\t\t\t\t} elseif ( $ehour > 12 ) { \r\n\t\t\t\t\t$ehour = $ehour - 12;\r\n\t\t\t\t\t$etime = ' pm';\r\n\t\t\t\t} elseif ( $ehour < 10 ) { \r\n\t\t\t\t\t$ehour = substr( $ehour, -1 );\r\n\t\t\t\t\t$etime = ' am';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$etime = ' am';\r\n\t\t\t\t}\r\n\t\t\t\t?>\t\t\t\r\n\r\n\t\t\t\t\t<?php echo $shour; ?>:<?php jes_bp_event_edtstm() ?><?php echo $stime; ?></span>\r\n <?php if ( jes_bp_get_event_edtsd() == jes_bp_get_event_edted() && jes_bp_get_event_edtsth() == jes_bp_get_event_edteth() && jes_bp_get_event_edtstm() == jes_bp_get_event_edtetm() ) {} else { ?>\r\n <strong>Ends:</strong> <span><?php jes_bp_event_edted() ?>, <?php echo $ehour; ?>:<?php jes_bp_event_edtetm() ?><?php echo $etime; ?></span><?php }; ?>\r\n\t\t\t\t</div>\r\n\t\t\t<div class=\"item-desc\" id=\"jes-desc-<?php jes_bp_event_id() ?>\">\r\n\t\t\t\t<span><strong>Where: </strong> <?php // JLL_MOD - removed ?><?php if ( jes_bp_event_is_visible() ) { ?><?php jes_bp_event_placedaddress() ?> <?php } ?></span><br />\r\n\t\t\t</div>\r\n\t\t<?php if ($jes_adata['jes_events_style'] == 'Standart') { ?>\r\n\t\t\t<?php // JLL_MOD - Removed text ?><?php jes_bp_event_description_excerpt() ?>\r\n\t\t<?php } else { ?>\r\n\t\t\t<?php jes_bp_event_description() ?>\r\n\t\t<?php } ?>\r\n\t\t\t</div>\t\t\t\t\r\n<?php do_action( 'bp_directory_events_item' ) ?>\r\n\t\t</div>\r\n\t\t<div class=\"action\" id=\"jes-button\">\r\n\t\t\t<?php \r\n\t\t\t\tif (!strpos($_eventstatus,__('Past event','jet-event-system')))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbp_event_join_button();\r\n\t\t\t\t\t}\r\n\t\t\t?>\r\n\t\t\t\t<div class=\"meta\" id=\"jes-approval-<?php jes_bp_event_id() ?>\">\r\n\t\t\t\t\t<?php if ( $shiftcan ) \r\n\t\t\t\t\t\t\t{ ?>\r\n\t\t\t\t\t\t\t\t<span class=\"meta\"><em><?php _e('Event requires approval!','jet-event-system'); ?></em></span>\r\n\t\t\t\t\t<?php }\t?>\r\n\t\t\t\t\t<?php // JLL_MOD - removed event classification ?>\r\n\t\t\t\t\t<p><?php jes_bp_event_member_count() ?></p>\r\n\t\t\t\t\t<span class=\"activity\"><?php printf( __( 'Last activity:<br /> %s ago', 'jet-event-system' ), jes_bp_get_event_last_active() ) ?></span>\r\n\t\t\t\t</div>\r\n<?php do_action( 'bp_directory_events_actions' ) ?>\r\n\t\t\t</div>\r\n\t\t<div class=\"clear\"></div>\r\n</li>\r\n<?php\r\n// End Standart Template\r\n}", "public function viewAction() {\n if (!Engine_Api::_()->core()->hasSubject('siteevent_organizer'))\n $this->respondWithError('unauthorized');\n\n $showEvents = $this->_getParam('showEvents', 1);\n $profileTabs = $this->_getParam('profileTabs', 1);\n $getInfo = $this->_getParam('getInfo', null);\n\n\n $viewtype = $this->_getParam('viewType', 'upcoming');\n\n //GET EVENT SUBJECT\n $organizer = Engine_Api::_()->core()->getSubject();\n if (empty($organizer)) {\n return $this->respondWithError('no_record');\n }\n $response = $organizer->toArray();\n\n $suffix = '';\n if (strpos($response['web_url'], \"http\") === false)\n $suffix = \"http://\";\n if (isset($response['facebook_url']) && !empty($response['facebook_url']))\n $response['facebook_url'] = 'https://facebook.com/' . $response['facebook_url'];\n if (isset($response['twitter_url']) && !empty($response['twitter_url']))\n $response['twitter_url'] = 'https://twitter.com/' . $response['twitter_url'];\n if (isset($response['web_url']) && !empty($response['web_url']))\n $response['web_url'] = $suffix . $response['web_url'];\n\n $contentImages = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($organizer);\n $response = array_merge($response, $contentImages);\n $response['countOrganizedEvent'] = $organizer->countOrganizedEvent();\n $response['addedBy'] = $organizer->getOwner()->displayname;\n\n if (isset($getInfo) && !empty($getInfo)) {\n $getInfoArray['Added By'] = $response['addedBy'];\n $getInfoArray['Events Hosted '] = $organizer->countOrganizedEvent();\n\n $allowedInfo = Engine_Api::_()->getApi('settings', 'core')->getSetting('siteevent.hostinfo', array('body', 'sociallinks'));\n\n if (in_array('body', $allowedInfo)) {\n if (isset($response['description']) && !empty($response['description']))\n $getInfoArray['Description'] = strip_tags($response['description']);\n }\n\n if (in_array('sociallinks', $allowedInfo)) {\n if (isset($response['facebook_url']) && !empty($response['facebook_url']))\n $getInfoArray['Facebook URL'] = $response['facebook_url'];\n if (isset($response['twitter_url']) && !empty($response['twitter_url']))\n $getInfoArray['Twitter URL'] = $response['twitter_url'];\n if (isset($response['web_url']) && !empty($response['web_url']))\n $getInfoArray['Web URL'] = $response['web_url'];\n }\n\n $ratingEnable = Engine_Api::_()->getApi('settings', 'core')->getSetting('siteevent.reviews', 2);\n if ($ratingEnable) {\n $tempRating = Engine_Api::_()->getDbtable('events', 'siteevent')->avgTotalRating(\n array('host_type' => $organizer->getType(), 'host_id' => $organizer->getIdentity(), 'more_than' => 0));\n\n // Added variable for rating to show rating bar\n if (_CLIENT_TYPE && ((_CLIENT_TYPE == 'ios') && _IOS_VERSION && _IOS_VERSION >= '1.5.3') || (_CLIENT_TYPE == 'android') && _ANDROID_VERSION && _ANDROID_VERSION >= '1.7') {\n if (isset($tempRating) && !empty($tempRating))\n $getInfoArray['total_rating'] = $tempRating;\n } else {\n if (isset($tempRating) && !empty($tempRating))\n $getInfoArray['Total Rating'] = $tempRating;\n }\n }\n\n // Added variable for description to show full description\n if (_CLIENT_TYPE && ((_CLIENT_TYPE == 'ios') && _IOS_VERSION && _IOS_VERSION >= '1.5.3') || (_CLIENT_TYPE == 'android') && _ANDROID_VERSION && _ANDROID_VERSION >= '1.7') {\n if (in_array('body', $allowedInfo)) {\n if (isset($response['description']) && !empty($response['description'])) {\n $getInfoArray['description'] = strip_tags($response['description']);\n if (isset($getInfoArray['Description']) && !empty($getInfoArray['Description']))\n unset($getInfoArray['Description']);\n }\n }\n }\n\n if (isset($getInfoArray) && !empty($getInfoArray))\n $this->respondWithSuccess($getInfoArray, true);\n }\n\n// //GET EVENTS PAGINATOR\n// $paginator = Engine_Api::_()->getDbTable('events', 'siteevent')->getSiteeventsPaginator($values, $customProfileFields);\n// $paginator->setItemCountPerPage($this->getRequestParam(\"limit\", 20));\n// $paginator->setCurrentPageNumber($this->getRequestParam(\"page\", 1));\n//\n// //SET VIEW\n// Engine_Api::_()->getApi('Core', 'siteapi')->setView();\n// $response['canCreate'] = Engine_Api::_()->authorization()->isAllowed('siteevent_event', $viewer, 'create');\n// $response[\"getTotalItemCount\"] = $getTotalItemCount = $paginator->getTotalItemCount();\n//\n//\n// if (isset($showEvents) && !empty($showEvents) && empty($getInfo)) {\n// try {\n// $values['viewType'] = $viewtype;\n// $values['host_type'] = 'siteevent_organizer';\n// $values['host_id'] = $organizer->getIdentity();\n//\n//\n// if (!empty($getTotalItemCount)) {\n// foreach ($paginator as $eventObj) {\n// $event = $eventObj->toArray();\n//\n// // ADD OWNER IMAGES\n// $getContentImages = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($eventObj, true);\n// $event = array_merge($event, $getContentImages);\n// $event[\"owner_title\"] = $eventObj->getOwner()->getTitle();\n//\n// // ADD EVENT IMAGES\n// $getContentImages = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($eventObj);\n// $event = array_merge($event, $getContentImages);\n// $tempResponse[] = $event;\n// }\n// $response['events'] = $tempResponse;\n// }\n// } catch (Exception $e) {\n// \n// }\n// }\n\n\n if (isset($profileTabs) && !empty($profileTabs) && empty($getInfo)) {\n $profileTabsArray[] = array(\n 'name' => 'organizer_info',\n 'label' => $this->translate('Info'),\n 'url' => 'advancedevents/organizer/' . $organizer->getIdentity(),\n 'urlParams' => array(\n 'getInfo' => 1\n )\n );\n\n if ($organizer->countOrganizedEvent() > 0) {\n $profileTabsArray[] = array(\n 'name' => 'organizer_events',\n 'label' => $this->translate('Events'),\n 'url' => 'advancedevents/',\n 'totalItemCount' => $organizer->countOrganizedEvent(),\n 'urlParams' => array(\n 'host_type' => 'siteevent_organizer',\n 'host_id' => $organizer->getIdentity()\n )\n );\n }\n\n $response['profileTabs'] = $profileTabsArray;\n }\n $this->respondWithSuccess($response, true);\n }", "function sp_events_shortcode( $atts ) {\n\t\textract( shortcode_atts( array(\n\t\t\t'posts_per_page' => '1',\n\t\t\t'meta_key' => 'Jan',\n\t\t\t'orderby' => 'date',\n\t\t\t'event_type' => '',\n\t\t), $atts ) );\n\t \n\t\treturn sp_get_events( $posts_per_page, $meta_key, $orderby, $event_type );\n\t}", "function GetExcludedEvents();", "function eventContent($event,$i)\r\n\t{\r\n\t\tglobal $_REQUEST;\r\n\t\tglobal $_SETTINGS;\r\n\t\t\r\n\t\techo \"<div class='event-content'>\";\r\n\t\t\r\n\t\tif($i != 0){\r\n\t\t\techo \t\"\".$this->truncate($event['content'], 250, false).\"\".\r\n\t\t\t\t\t\"<a class='event-more' href='\".$_SETTINGS['website'].\"/\".$_REQUEST['page'].\"/\".$event['name'].\"' >\".\r\n\t\t\t\t\t\"<span>More</span>\".\r\n\t\t\t\t\t\"</a>\";\r\n\t\t} else {\r\n\t\t\techo $event['content'];\r\n\t\t}\r\n\t\t\r\n\t\techo \"</div>\";\r\n\t}" ]
[ "0.7772302", "0.74917644", "0.7270854", "0.72544175", "0.71525925", "0.7111285", "0.71041787", "0.70760643", "0.700652", "0.6831481", "0.6783804", "0.671174", "0.66664046", "0.66620207", "0.6639366", "0.6624541", "0.66156113", "0.6591692", "0.6563447", "0.65535104", "0.65090454", "0.64896894", "0.64773154", "0.6425224", "0.6365839", "0.63007516", "0.6291708", "0.6285954", "0.627457", "0.62646776", "0.62646776", "0.6260564", "0.62567455", "0.6253886", "0.62420493", "0.62358224", "0.6216316", "0.62114656", "0.62040603", "0.6199438", "0.61631167", "0.6159881", "0.6159501", "0.61436707", "0.6131678", "0.6101941", "0.610178", "0.6078979", "0.60704917", "0.606364", "0.605965", "0.60457927", "0.6031096", "0.60245895", "0.60228854", "0.60139334", "0.6007877", "0.59991026", "0.5994076", "0.5992947", "0.59905463", "0.5990478", "0.59810513", "0.594712", "0.59445626", "0.59437853", "0.59359217", "0.5921167", "0.591666", "0.5910817", "0.5910717", "0.59093416", "0.59054357", "0.5875819", "0.5873804", "0.58709276", "0.5867473", "0.586491", "0.58592933", "0.5846675", "0.5846039", "0.58316565", "0.5787697", "0.57774365", "0.57756317", "0.57722485", "0.5752216", "0.57286566", "0.5727506", "0.5719648", "0.57167816", "0.5713078", "0.57122487", "0.569703", "0.5684502", "0.5678075", "0.5676201", "0.566565", "0.565092", "0.56498516" ]
0.7623232
1
GET ALL FIELDS IN TABLE
private function _display_data_table(){ $fields = array(); $query = "DESCRIBE `".$this->class_settings['database_name']."`.`".$this->table_name."`"; $query_settings = array( 'database'=>$this->class_settings['database_name'], 'connect' => $this->class_settings['database_connection'] , 'query' => $query, 'query_type' => 'DESCRIBE', 'set_memcache' => 1, 'tables' => array( $this->table_name ), ); $sql_result = execute_sql_query($query_settings); if($sql_result && is_array($sql_result)){ foreach($sql_result as $sval) $fields[] = $sval; }else{ //REPORT INVALID TABLE ERROR $err = new cError(000001); $err->action_to_perform = 'notify'; $err->class_that_triggered_error = 'centry_exit_log.php'; $err->method_in_class_that_triggered_error = '_display_data_table'; $err->additional_details_of_error = 'executed query '.str_replace("'","",$query).' on line 208'; return $err->error(); } //INHERIT FORM CLASS TO GENERATE TABLE $form = new cForms(); $form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] ); $form->uid = $this->class_settings['user_id']; //Currently logged in user id $form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege $this->datatable_settings['current_module_id'] = $this->class_settings['current_module']; $form->datatables_settings = $this->datatable_settings; $returning_html_data = $form->myphp_dttables($fields); return array( 'html' => $returning_html_data, 'method_executed' => $this->class_settings['action_to_perform'], 'status' => 'display-datatable', ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllFields();", "public function getFields($table);", "private function _fields() {\n if ($this->_table() && empty($this->fields)) {\n $this->fields = $this->db->list_fields($this->_table());\n }\n return $this->fields;\n }", "public function fetchFields();", "public function getAllFields() {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t= false;\n\t\t\t// Query set up\t\n\t\t\t$table\t\t\t= 'tb_field';\n\t\t\t$select_what\t= 'id, vc_field AS vc_name';\n\t\t\t$conditions\t\t= \"1 ORDER BY vc_field ASC\";\n\t\t\t$return\t\t\t= $db->getAllRows_Arr($table, $select_what, $conditions);\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}", "public static function getAllFields(): array\n {\n $className = get_called_class();\n $table = with(new $className)->getTable();\n $cache_key = self::$cache_prefix.'.ALLFIELDS.' . strtoupper($table);\n\n return self::$use_cache ? Cache::remember($cache_key, 5 * 60, function () use ($table) {\n return \\Schema::getColumnListing($table);\n }) : \\Schema::getColumnListing($table);\n }", "protected function fetch_fields()\n {\n if(empty($this->table_fields))\n {\n $fields = $this->_database->list_fields($this->table);\n foreach ($fields as $field) {\n $this->table_fields[] = $field;\n }\n }\n }", "final public function getAllFields()\r\n {\r\n return array($this->_field);\r\n }", "public static function fetch_fields($table){\n $sql = 'SHOW columns FROM '.self::clean($table);\n self::$__querys[] = $sql;\n $result = mysqli_query(self::$__connection, $sql);\n $data = array();\n if ($result) {\n while ($r = $result->fetch_assoc()) {\n $data[] = $r;\n }\n $result->close();\n }\n return $data;\n }", "public function getQueryFields ($table);", "public function listFields($table)\r\n {\r\n return $this->fetchItems($this->query(\"SHOW FIELDS FROM $table\"), 0, 'row');\r\n }", "public function getFields($table) {\n\t\treturn $this->_list_fields($table);\n\t}", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function list_fields() {\n return $this->db->list_fields($this->_table());\n }", "function getTableFields($table) {\n return $this->select(\"show fields from $table\");\n }", "public function getAllFields()\n {\n return $this->fields;\n }", "private static function fields()\n {\n $fields = static::$fields;\n $primary_key = static::$primary_key;\n\n $rows = [$primary_key, ...$fields];\n\n if(!count($rows)) {\n return ['*'];\n }\n\n return $rows;\n }", "public function fetch_fields() {}", "public static function getAllFieldsForTable($table) {\n\t\tif (!isset(self::$tableFields[$table])) {\n\t\t\tself::$tableFields[$table] = $GLOBALS['TYPO3_DB']->admin_get_fields($table);\n\t\t}\n\t\treturn self::$tableFields[$table];\n\t}", "protected function fetchFields(){\n $fields = X3::db()->fetchFields($this->modelName);\n $_res = array();\n foreach($fields as $name=>$field){\n $dataType = X3_MySQL_Command::parseMySQLField($field);\n $_res[$name] = $dataType;\n }\n return $_res;\n }", "function get_fields_in_table( ){\n\t\t\t\t $result = mysql_query(\"SHOW COLUMNS FROM \".$this->db.\".\".$this->table.\"\");\n\t\t\t\tif (!$result) {\n\t\t\t\t echo 'Could not run query: ' . mysql_error();\n\t\t\t\t exit;\n\t\t\t\t}\n\t\t\t\tif (mysql_num_rows($result) > 0) {\n\t\t\t\t while ($row = mysql_fetch_assoc($result)) {\n\t\t\t\t \n\t\t\t\t //$a_fields[]=$row;\n\t\t\t\t $a_fields[]=$row['Field'].\" | \".$row['Type'];\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\treturn $a_fields;\n\t\t\t }", "function my_get_field_list( $table_name ){\r\n\t\r\n\t$query = \" SHOW fields FROM `\".$table_name.\"` \";\r\n\t$result = my_query( $query );\r\n\t \r\n\twhile($row = my_fetch_array( $result ) ){\r\n\t\t$data = $row['Field'];\r\n\t\tbreak;\r\n\t}\r\n\t\r\n\treturn $data;\r\n\t\r\n}", "public function getListFields();", "public function getFields() {\n $fields = $this->_fields;\n\n if ($this->getJoins() && !$fields && $this->getType() === self::SELECT) {\n return array_keys($this->getRepository()->getSchema()->getColumns());\n }\n\n return $fields;\n }", "function getFields();", "function GetFieldsList($table)\n\t{\n\t\t$tbl = $this->Table($table);\n\t\treturn $tbl->GetFieldsList();\n\t}", "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}", "abstract public function getFields();", "abstract public function getFields();", "public function getFields() {}", "public function getFields() {}", "public function getFields() {}", "function get_fields(){\n\t\t\t \n\t\t\t // IN: database,table\n\t\t\t //OUT: array of fields\n\t\t\t \n\t\t\t$this->db_connect;\n\t\t\t$result = mysql_query(\"SHOW COLUMNS FROM \".$this->db.\".\".$this->table.\"\" );\n\t\t\t//echo(\"SHOW COLUMNS FROM \".$this->db.\".\".$this->table.\"\" );\n\t\t\tif (!$result) {\n\t\t\t echo 'Could not run query: ' . mysql_error();\n\t\t\t exit;\n\t\t\t}\n\t\t\tif (mysql_num_rows($result) > 0) {\n\t\t\t while ($row = mysql_fetch_assoc($result)) {\n\t\t\t $a_fields[]=$row['Field'];\n\t\t\t }\n\t\t\t}\n\t\t\treturn $a_fields;\n\t}", "function getFields($table,$fields=\"\",$condition=\"\",$limit=\"\",$calculateRows=false,$fastHint=false);", "public function getFields() : FieldCollection;", "public function getFields() {\n $columns = $this->schema();\n if (empty($columns)) {\n trigger_error(__d('cake_dev', '(Model::getColumnTypes) Unable to build model field data. If you are using a model without a database table, try implementing schema()'), E_USER_WARNING);\n }\n\n $results = array();\n foreach ($columns as $key => $col) {\n $results[] = $key;\n }\n unset($columns);\n return $results;\n }", "private function getAllFields($table) {\n\t\t$sqlFields = $GLOBALS['TYPO3_DB']->admin_get_fields($table);\n\t\tif (!is_array($GLOBALS['TCA'][$table])) {\n\t\t\treturn array();\n\t\t}\n\t\t$fields = array_keys($GLOBALS['TCA'][$table]['columns']);\n\t\t$fields[] = 'uid';\n\t\t$fields[] = 'pid';\n\t\t$fields[] = 'deleted';\n\t\t$fields[] = 'crdate';\n\t\t$fields[] = 'tstamp';\n\t\tif (strlen($GLOBALS['TCA'][$table]['ctrl']['sortby']) && !in_array($GLOBALS['TCA'][$table]['ctrl']['sortby'], $fields)) {\n\t\t\t$fields[] = $GLOBALS['TCA'][$table]['ctrl']['sortby'];\n\t\t}\n\t\t$sqlKeys = array_keys($sqlFields);\n\t\t$sqlKeys = array_diff($sqlKeys, $fields);\n\t\t$fields = array_merge($fields, $sqlKeys);\n\t\treturn $fields;\n\t}", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function admin_get_fields($tableName)\n {\n $output = [];\n $columns_res = $this->query('SHOW FULL COLUMNS FROM `' . $tableName . '`');\n if ($columns_res !== false) {\n while ($fieldRow = $columns_res->fetch_assoc()) {\n $output[$fieldRow['Field']] = $fieldRow;\n }\n $columns_res->free();\n }\n return $output;\n }", "private function getAllTableFields()\n {\n $connection = $this->node->getConnection();\n $mainTable = $this->node->getMainTable();\n $fields = $connection->describeTable($mainTable);\n $metadataTable = $this->node->getTable('magento_versionscms_hierarchy_metadata');\n $fields += $connection->describeTable($metadataTable);\n\n return $fields;\n }", "function wrapper_field_names($table) {\n\n\t\t$rowdata = $this->query_return(\"SELECT TOP 1 * FROM $table\");\n\t\t$fields = array();\n\n\t\tforeach ($rowdata as $f => $x) {\n\t\t\t$fields[] = $f;\n\t\t}\n\n\t\treturn $fields;\n\t}", "public function schemaFields() { \n return $this->allFieldsArray;\n }", "public function schemaFields() { \n return $this->allFieldsArray;\n }", "function field_data()\r\n\t{\r\n\t\t$retval = array();\r\n /*\r\n echo \"<pre>\";\r\n var_dump($this->result_id);\r\n var_dump($this->pdo_results);\r\n echo \"</pre>\";\r\n */\r\n $table_info = $this->pdo_results;\r\n assert(is_array($table_info));\r\n foreach ($table_info as $row_info) {\r\n $F = new stdClass();\r\n $F->name = $row_info['name'];\r\n $F->type = $row_info['type'];\r\n $F->default = $row_info['dflt_value'];\r\n $F->max_length = 0;\r\n $F->primary_key = $row_info['pk'];\r\n \r\n $retval[] = $F;\r\n }\r\n\r\n return $retval;\r\n }", "public function getFields(): array;", "public function getFields(): array;", "public function getFields(): array;", "abstract protected function getFields();", "public function all_fields()\n {\n $allfields = array();\n foreach (array_values($this->CLASS_CONTAINER) as $val){\n $allfields = array_merge($allfields, $this->{$val});\n }\n foreach (array_values($this->singular_fields) as $val){\n if($this->{$val}) {\n $allfields[] = $this->{$val};\n }\n }\n\n return $allfields;\n }", "public function getTableFields(){\n if(empty($this->tableFields)){\n $this->getTableInfo();\n }\n return $this->tableFields;\n }", "public function fetchFields()\n {\n $field_names = array();\n for ($c = 1, $fieldCount = $this->getFieldsCount(); $c <= $fieldCount; $c++) {\n $field_names[] = oci_field_name($this->stmt_id, $c);\n }\n return $field_names;\n }", "public function getFieldsList()\n {\n return $this->table_fields_names;\n }", "public function fields()\n {\n return array_map(\n function (array $field) {\n return Field::fromArray($field);\n },\n $this->client->get('field')\n );\n }", "public static function get_fields()\n {\n }", "public function getAllFields() {\n return $this->allFieldsAlias;\n }", "private function readFields( )\n {\n global $UNDERQL;\n\n $l_fs = @ mysql_list_fields( $UNDERQL['db']['name'], $this->table_name );\n $l_fq = @ mysql_query( 'SHOW COLUMNS FROM `' . $this->table_name . '`' );\n $l_fc = @ mysql_num_rows( $l_fq );\n @ mysql_free_result( $l_fq );\n $i = 0;\n\n $this->table_fields_names[$this->table_name] = array( );\n $this->string_fields = array( );\n\n while ( $i < $l_fc )\n {\n $l_f = mysql_fetch_field( $l_fs );\n if ( $l_f->numeric != 1 )\n $this->string_fields[@ count( $this->string_fields )] = $l_f->name;\n\n $this->table_fields_names[$this->table_name]\n [@count($this->table_fields_names[$this->table_name])] = $l_f->name;\n $i++;\n }\n }", "function list_fields()\n\t{\n\t\t$field_names = array();\n\t\twhile ($field = mysqli_fetch_field($this->result_id))\n\t\t{\n\t\t\t$field_names[] = $field->name;\n\t\t}\n\n\t\treturn $field_names;\n\t}", "public function table_get_all($table);", "public function getFields() {\n $field = $this->get('field');\n return null !== $field ? $field : array();\n }", "public function field_data()\n\t{\n\t\t$retval = array();\n\t\tfor ($c = 1, $fieldCount = $this->num_fields(); $c <= $fieldCount; $c++)\n\t\t{\n\t\t\t$F\t\t\t= new stdClass();\n\t\t\t$F->name\t\t= oci_field_name($this->stmt_id, $c);\n\t\t\t$F->type\t\t= oci_field_type($this->stmt_id, $c);\n\t\t\t$F->max_length\t\t= oci_field_size($this->stmt_id, $c);\n\n\t\t\t$retval[] = $F;\n\t\t}\n\n\t\treturn $retval;\n\t}", "public function fields_names(){\n $table_meta = array();\n // get fields in the database table\n\n foreach ($this->_meta() as $meta) {\n array_push($table_meta, $meta->name);\n }\n\n return $table_meta;\n }", "abstract public function getColsFields();", "public function getFieldsList(){\n return $this->_get(1);\n }", "public function getModelFields($model)\n {\n\treturn $this->query('select [name] from [fields] where [table] = %s', $model->getTableName() );\n }", "public function list_fields()\r\n {\r\n $field_names = array();\r\n $this->resultID->field_seek(0);\r\n while ($field = $this->resultID->fetch_field())\r\n {\r\n $field_names[] = $field->name;\r\n }\r\n\r\n return $field_names;\r\n }", "public function getFieldData()\n {\n $retval = array();\n for ($c = 1, $fieldCount = $this->getFieldsCount(); $c <= $fieldCount; $c++) {\n $item = array();\n $item['name'] = oci_field_name($this->stmt_id, $c);\n $item['type'] = oci_field_type($this->stmt_id, $c);\n $item['max_length'] = oci_field_size($this->stmt_id, $c);\n $retval[] = $item;\n }\n\n return $retval;\n }", "public static function getDbFields()\n {\n global $zdb;\n $columns = $zdb->getColumns(self::TABLE);\n $fields = array();\n foreach ( $columns as $col ) {\n $fields[] = $col->getName();\n }\n return $fields;\n }", "public function &getFields();", "function field_data()\n\t{\n\t\t$retval = array();\n\t\twhile ($field = mysqli_fetch_field($this->result_id))\n\t\t{\n\t\t\t$F\t\t\t\t= new stdClass();\n\t\t\t$F->name\t\t= $field->name;\n\t\t\t$F->type\t\t= $field->type;\n\t\t\t$F->default\t\t= $field->def;\n\t\t\t$F->max_length\t= $field->max_length;\n\t\t\t$F->primary_key = ($field->flags & MYSQLI_PRI_KEY_FLAG) ? 1 : 0;\n\n\t\t\t$retval[] = $F;\n\t\t}\n\n\t\treturn $retval;\n\t}", "public static function fields($model){\n\t\t$resultset = self::do_query(\"SHOW COLUMNS FROM \" . self::table_for($model));\n\t\treturn self::get_results_array($resultset, 'Field');\n\t}", "public function fieldsForTable(Table $table)\n {\n // Execute the query directly\n $result = $this->client->query(\"SHOW COLUMNS FROM $table->name\");\n\n // If no results are returned, return an empty array\n if ($result === false) {\n return [];\n }\n\n // Loop through the query results, and add each field name to the array\n $fields = [];\n while ($data = $result->fetch_assoc()) {\n $fields[] = $data['Field'];\n }\n\n return $fields;\n }", "public function fields()\n {\n $fields = array();\n\n foreach ($this->_data as $field => $row)\n {\n $fields[$field] = $row['value'];\n }\n\n return $fields;\n }", "function getTableFields($table_name)\n\t{\n\t\t$query = \"SHOW COLUMNS FROM $table_name\";\n\t\t$rs = $this->db->query($query);\n\t\treturn $rs->result_array();\n\t}", "function getTableFields($table_name)\n\t{\n\t\t$query = \"SHOW COLUMNS FROM $table_name\";\n\t\t$rs = $this->db->query($query);\n\t\treturn $rs->result_array();\n\t}", "function fields ($tableName)\n {\n $sql = \"SELECT c.relname, a.attname, t.typname FROM pg_class c, pg_attribute a, pg_type t WHERE c.relname = '{$tableName}' AND a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid\";\n\n $fields = false;\n foreach ($this->all($sql) as $field) {\n $fields[] = array(\n 'name' => $field['attname'],\n 'type' => $field['typname']);\n }\n\n return $fields;\n }", "abstract public function fields();", "abstract public function getFields(): array;", "public function getFields()\n\t{\n\t\treturn [];\n\t}", "protected function _initAllFIeld() \n\t{\n\t\t$sql = 'select COLUMN_NAME from information_schema.COLUMNS where table_name = \"' . $this->table.'\"\n\t\t\t\tAND `TABLE_SCHEMA`=\"'. $this->db .'\";';\n\n\t\t$this->_fields = array_column($this->_getSelectResult($sql), 'COLUMN_NAME');\n\t}", "public static function getAllFieldsWithTypes(): array\n {\n $className = get_called_class();\n $table = with(new $className)->getTable();\n\n\n $cache_key = self::$cache_prefix.'.ALLFIELDS.WITH.TYPES.' . strtoupper($table);\n\n return self::$use_cache ? Cache::remember($cache_key, 5 * 60, function () use ($table) {\n return self::getArrayTableInfo($table);\n }) : self::getArrayTableInfo($table);\n }", "public function getFields($table, $column = null): array {\n global $wpdb;\n $table = $wpdb->prefix . $table;\n\n $where = '';\n if ($column) {\n $where = \" WHERE Field = '{$column}'\";\n }\n return $wpdb->get_results(\"SHOW FIELDS FROM {$table}{$where};\", ARRAY_A);\n }", "public function getFieldMetaList($table){\n if(!$this->connect()) return array();\n $sql = sprintf(self::$_metaColumnSQL,$table);\n $fieldObjs = $this->query($sql);\n $fields = array();\n foreach($fieldObjs as $f){\n $type = $f['Type'];\n if (preg_match(\"/^(.+)\\((\\d+),(\\d+)/\", $type, $query_array)) {\n\t\t\t\t$fld_type = $query_array[1];\n\t\t\t\t$fld_max_length = is_numeric($query_array[2]) ? $query_array[2] : -1;\n\t\t\t} elseif (preg_match(\"/^(.+)\\((\\d+)/\", $type, $query_array)) {\n\t\t\t\t$fld_type = $query_array[1];\n\t\t\t\t$fld_max_length = is_numeric($query_array[2]) ? $query_array[2] : -1;\n\t\t\t} elseif (preg_match(\"/^(enum)\\((.*)\\)$/i\", $type, $query_array)) {\n\t\t\t\t$fld_type = $query_array[1];\n\t\t\t\t$fld_max_length = max(array_map(\"strlen\",explode(\",\",$query_array[2]))) - 2; // PHP >= 4.0.6\n\t\t\t\t$fld_max_length = ($fld->max_length == 0 ? 1 : $fld->max_length);\n\t\t\t} else {\n\t\t\t\t$fld_type = $type;\n\t\t\t\t$fld_max_length = -1;\n\t\t\t}\n $name = $f['Field'];\n $fields[$name]= array(\n 'name' => $f['Field'],\n 'type' => self::convert_field_type($fld_type),\n 'length' => $fld_max_length,\n );\n }\n return $fields;\n }", "static function custom_get_creatable_fields() {\n # use this functionality to get a list of all field in the table\n return self::default_get_updatable_fields();\n }", "public function getFields(){\n return $this->dbFields;\n }", "public function getTableFields()\n {\n return array(\n array(\"Field\" => \"uid_empresa\", \"Type\" => \"int(10)\", \"Null\" => \"NO\", \"Key\" => \"PRI\", \"Default\" => \"\", \"Extra\" => \"auto_increment\"),\n array(\"Field\" => \"endeve_id\", \"Type\" => \"varchar(60)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"pago_no_obligatorio\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"nombre\", \"Type\" => \"varchar(100)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"nombre_comercial\", \"Type\" => \"varchar(200)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"representante_legal\", \"Type\" => \"varchar(512)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cif\", \"Type\" => \"varchar(20)\", \"Null\" => \"NO\", \"Key\" => \"UNI\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"pais\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_pais\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"direccion\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"localidad\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"provincia\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cp\", \"Type\" => \"int(8)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"accion\", \"Type\" => \"timestamp\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"CURRENT_TIMESTAMP\", \"Extra\" => \"\"),\n array(\"Field\" => \"updated\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_provincia\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_municipio\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"convenio\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"created\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"aviso_caducidad_subcontratas\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"color\", \"Type\" => \"varchar(10)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"email\", \"Type\" => \"varchar(255)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_enterprise\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"logo\", \"Type\" => \"tinytext\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"skin\", \"Type\" => \"varchar(300)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"dokify\", \"Extra\" => \"\"),\n array(\"Field\" => \"lang\", \"Type\" => \"varchar(2)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"es\", \"Extra\" => \"\"),\n array(\"Field\" => \"activo_corporacion\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"pago_aplicacion\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"receive_summary\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"date_last_summary\", \"Type\" => \"int(16)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"license\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_validation_partner\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"partner_validation_price\", \"Type\" => \"float\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"partner_validation_price_urgent\", \"Type\" => \"float\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"validation_languages\", \"Type\" => \"varchar(250)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cost\", \"Type\" => \"float\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"pay_for_contracts\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"invoice_periodicity\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_attached\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_validated\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_rejected\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_expired\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_transfer_pending\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"kind\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"min_app_version\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"2\", \"Extra\" => \"\"),\n array(\"Field\" => \"prevention_service\", \"Type\" => \"varchar(20)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_idle\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"corporation\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_referrer\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"requirement_count\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"invoice_count\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_referrer\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_manager\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_self_controlled\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"has_custom_login\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"header_img\", \"Type\" => \"tinytext\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"), array(\"Field\" => \"uid_manager\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_referrer\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"requirements_origin_company_cloneables\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n );\n }", "private function _list_fields($table = null)\n\t{\n\t\t// Is there a cached result?\n\t\tif (isset($this->data_cache['field_names'][$table]))\n\t\t{\n\t\t\treturn $this->data_cache['field_names'][$table];\n\t\t}\n\t\n\t\tif (!$table)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// only valid for MySQL\n\t\t$sql = 'SHOW COLUMNS FROM ' . $table ;\n\t\t\t\t\t\n\t\t$results = $this->query($sql);\n\t\t\n\t\t$retVal = array();\n\t\t\n\t\tforeach ($results as $row)\n\t\t{\n\t\t\tif (isset($row['Field'])){\n\t\t\t\t$retVal[] = $row['Field'];\n\t\t\t} else if (isset($row['FIELD'])) {\n\t\t\t\t$retVal[] = $row['FIELD'];\n\t\t\t} else {\n\t\t\t\t$retVal[] = current($row);\n\t\t\t}\n\t\t}\n\n\t\t$this->data_cache['field_names'][$table] = $retVal;\n\t\treturn $this->data_cache['field_names'][$table]; \n\t}", "function getTableFields($sessionID, $table){\r\n\t\t//echo $table;\r\n\t\t$result = mysql_list_fields($this->dbname, $table);\r\n\t\treturn $result;\t\t// jeremy originally called this variable $tom, and for that i shall kill him.\r\n\t}", "public function fields(){\n\t\treturn array();\n\t}", "public function _fieldData(string $table): array\n\t{\n\t\t//log_message('error', '_fieldData');\n\t\tif (($query = $this->query( $this->_listColumns($table))) === false)\n\t\t{\n\t\t\tthrow new DatabaseException(lang('Database.failGetFieldData'));\n\t\t}\n\t\t$query = $query->getResultObject();\n\n\t\t//log_message('error', print_r($query, true) );\n\n\t\treturn $query;\n\t}", "public function getTableFields($tableName) {\n\t\t\n\t\t$result = array(); \n\t\t$fields = array();\n\t\t\n\t\t$query = $this->db->query('DESCRIBE '. DB_PREFIX . $tableName);\n\t\t$result = $query->rows;\n\t\t\n\t\tforeach ($result as $row) {\n\t\t\t$fields[$row['Field']] = $row['Default'];\n\t\t}\t\t\n\t\t\n\t\treturn $fields;\n\t}", "public function fields()\r\n {\r\n return array_keys($this->getKey('schema', true));\r\n }", "public function fields()\n {\n return [];\n }" ]
[ "0.8220278", "0.8106678", "0.7958208", "0.7909347", "0.78545755", "0.78298295", "0.7711079", "0.76183945", "0.76152086", "0.7615135", "0.758423", "0.7561379", "0.7553135", "0.7553135", "0.7553135", "0.7553135", "0.7553135", "0.7553135", "0.75309354", "0.7513835", "0.74611866", "0.7435234", "0.7433206", "0.7414913", "0.7410962", "0.74105906", "0.7391401", "0.7380822", "0.7323344", "0.73183423", "0.7289636", "0.7259046", "0.72583103", "0.72583103", "0.7256456", "0.7256456", "0.7256456", "0.7235909", "0.7234825", "0.7220227", "0.72181755", "0.72132075", "0.7178205", "0.7178205", "0.7178205", "0.7178205", "0.7178205", "0.7177941", "0.70964265", "0.7094492", "0.7085972", "0.7085972", "0.7057165", "0.70361745", "0.70361745", "0.70361745", "0.7024475", "0.7015068", "0.70111066", "0.7010809", "0.6972363", "0.6953841", "0.6949485", "0.6937353", "0.69007677", "0.6893517", "0.68846524", "0.6883056", "0.687654", "0.6866559", "0.68625504", "0.685576", "0.6849933", "0.684146", "0.68322814", "0.68299687", "0.6829821", "0.6821897", "0.6816965", "0.68087196", "0.6808683", "0.68064445", "0.68064445", "0.6801531", "0.6793642", "0.67870164", "0.6786296", "0.6782739", "0.67711854", "0.6766196", "0.67650664", "0.67593443", "0.67583483", "0.67521346", "0.6741024", "0.67400926", "0.67198503", "0.67120796", "0.6706525", "0.67059475", "0.66952896" ]
0.0
-1
its tempory for fill database
public function addEntry(Request $request) { $response = [ 'status' => false]; for ($i = 1; $i < 80; $i++) { PaperSubject::create(['paper_id' => 2, 'subject_id' => $i]); } return response($response)->header('Content-Type', 'application/json'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createDatabaseStructure() {}", "public function initDatabaseStructure( );", "public function fill_db()\n {\n include('create_tables.php');\n\n $this->db->query($CLEAN);\n $this->db->query($APPTYPE);\n $this->db->query($BOOKINGS);\n $this->db->query($BUSINESSOWNER);\n $this->db->query($CUSTOMERS);\n $this->db->query($EMPLOYEES);\n $this->db->query($TIMESLOTS);\n $this->db->query($CANWORK);\n $this->db->query($HAVESKILL);\n $this->db->query($BUSINESS);\n $this->db->query($HOURS);\n }", "abstract public function prepareToStore();", "protected function initDatabaseRecord() {}", "private function initDatabase() {\n \n \n \n }", "private function populateDummyTable() {}", "private function _loadDataToTemporaryTable(){\n\n }", "public function fillOutDb()\n {\n /* Fill out the Contacts table. BatchInsert is a good idea for that */\n $this->batchInsert('Contacts', ['name', 'surname', 'description'], self::InitialContacts);\n\n /* Prepare array for batchInsert request at first */\n $list = [];\n foreach(self::InitialPhoneNumbers as $name => $numbers){\n $query = new \\yii\\db\\Query();\n $contact_id = $query->select('id')->from('Contacts')->where(['name' => $name])->one();\n foreach($numbers as $number){\n $list[] = ['number' => $number, 'contact_id' => $contact_id['id']];\n }\n }\n\n /* Fill out the Numbers table */\n $this->batchInsert('Numbers', ['number', 'contact_id'], $list);\n }", "public function initializeTemporaryDBmount() {}", "abstract public function prepareData();", "abstract protected function initDB();", "public function database() {\n\t\t$this->_check();\n\t\t$d['title_for_layout'] = __(\"Database creation\");\n\t\t$this->set($d);\n\t}", "protected function _initsTable() {}", "function prepareForDb() {\n $this->description = sql_escape($this->description);\n $this->postsHeader = sql_escape($this->postsHeader);\n $this->postBody = sql_escape($this->postBody);\n $this->postsFooter = sql_escape($this->postsFooter);\n $this->formLogged = sql_escape($this->formLogged);\n $this->form = sql_escape($this->form);\n $this->navigation = sql_escape($this->navigation);\n $this->name = sql_escape($this->name);\n $this->nameLin = sql_escape($this->nameLin);\n $this->memberName = sql_escape($this->memberName);\n $this->date = sql_escape($this->date);\n $this->time = sql_escape($this->time); \n $this->nextPage = sql_escape($this->nextPage);\n $this->previousPage =sql_escape($this->previousPage);\n $this->firstPage = sql_escape($this->firstPage);\n $this->lastPage = sql_escape($this->lastPage);\n\t$this->gravDefault = sql_escape($this->gravDefault);\n }", "private function initialiseDatabaseStructure(){\r\n $this->exec($this->userTableSQL);\r\n $query = \"INSERT INTO `user` (`userName`,`userEmail`,`userFirstName`,`userSurname`,`userPassword`,`userIsActive`,`userIsAdmin`) VALUES(?,?,?,?,?,?,?);\";\r\n $statement = $this->prepare($query);\r\n $password = md5('Halipenek3');\r\n $statement->execute(array('admin','[email protected]','Super','Admin',$password,1,1));\r\n\r\n //Create the knowledge Table\r\n $this->exec($this->knowledgeTableSQL);\r\n $this->exec($this->tagTableSQL);\r\n $this->exec($this->tagsTableSQL);\r\n }", "public function acfedu_create_fill_db() {\n\t\t\t\t$this->acfedu_check_table();\n\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\t\t\tob_start();\n\t\t\t\tglobal $wpdb;\n //require_once( 'lib/import_nl.php' );\n //require_once( 'lib/import_be.php' );\n //require_once( 'lib/import_lux.php' );\n require_once( 'lib/import_id.php' );\n\t\t\t\t$sql = ob_get_clean();\n\t\t\t\tdbDelta( $sql );\n\t\t\t}", "protected function setupDBData()\n {\n /**\n * IMPORTANT NOTE : these functions must be executed sequentially in order for the command to work.\n */\n $this->setupProducts();\n $this->setupServerTypes();\n $this->setupServers();\n $this->setupUsers();\n }", "function cl_ing_ingreso_det() {\r\n\r\n $this->database = new Database();\r\n }", "function populate(){\n\t\t$this->db_tools->populate();\n\t\t$this->db_tools->echo_populate();\n\t}", "protected function importDatabaseData() {}", "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}", "private function prepareTables() {}", "private function fillInfo()\n\t{\n\t\t$database = new db_Database();\n\n\t\t$database->query(\"select * from users where id=:id\");\n\t\t$database->bind(\":id\",$this->id);\n\t\t$set=$database->resultset();\n\t\t\n\t\t$this->password=$set[0]['pass'];\n\t\t$this->userName=$set[0]['userName'];\t\t\n\t\t$this->email=$set[0]['email'];\t\t\n\t\t$this->session=$set[0]['session'];\n\t\t$this->avatar=$set[0]['avatar'];\n\t\t\n\t}", "public function prepare();", "public function prepare();", "private function initializeStorage(): void\n\t{\n\t\t$this->connection->query('\n\t\t\tCREATE TABLE IF NOT EXISTS ticket (\n\t\t\t\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\t\t\t\tclient_id TEXT NOT NULL,\n\t\t\t\tcreated TEXT,\n\t\t\t\tdeposit TEXT,\n\t\t\t\trate TEXT\t\t\t\t\n\t\t\t);\n\t\t');\n\n\t\t$this->connection->query('\n\t\t\tCREATE TABLE IF NOT EXISTS ticket_item (\n\t\t\t\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n\t\t\t\tticket_id INTEGER NOT NULL,\n\t\t\t\tname TEXT,\n\t\t\t\ttip TEXT,\n\t\t\t\tstatus TEXT,\n\t\t\t\trate TEXT,\t\t\n\t\t\t\tdate_time TEXT\t\t\t\t\n\t\t\t);\n\t\t');\n\t}", "abstract public function populate();", "public function initStorage() {\n if(empty($this -> _db)) {\n $db = new SQLite3('./prices.db');\n $this -> _db = $db;\n }\n \n }", "public function TemparioData(){\n\t\t$this->id = \"\"; \n\t\t$this->id_tempario = \"\";\n\t\t$this->descripcion = \"\";\n\t\t$this->tiempo = \"\";\n\t\n\t\t\n\t}", "public function populate();", "private final function _createDbStructure()\n {\n if ($conn = $this->_getConnection()) {\n $installer = new lib_Install('install');\n try {\n $installer->install();\n } catch (Exception $e) {\n app::log($e->getMessage(), app::LOG_LEVEL_ERROR);\n }\n }\n }", "public function prefill();", "public function __construct(){\n $this->db = new SQLite3(':memory:');\n //create table in db if it does now exist\n $this->db->exec('CREATE TABLE IF NOT EXISTS storage (name STRING, value INT);');\n }", "public function seed()\n\t{\n\t\t$this->createDataType();\n\t\t$this->createDataRowForColumns();\n\t}", "public function prepare_item_for_database($request)\n {\n }", "public function prepare_item_for_database($request)\n {\n }", "protected function getDatabase() {}", "protected function fillTable()\n {\n $names = [\n 'Anna', 'Betty', 'Clara', 'Donna', 'Fiona',\n 'Gertrude', 'Hanna', 'Ione', 'Julia', 'Kara',\n ];\n\n $stm = \"INSERT INTO {$this->table} (name) VALUES (:name)\";\n foreach ($names as $name) {\n $this->connection->perform($stm, ['name' => $name]);\n }\n }", "private static function setupDB() {\n\t\t$tbl = self::$table;\n\t\t$dbw = wfGetDB( DB_MASTER );\n\t\twfDebugLog( __METHOD__, \"\\tCreating tables\\n\" );\n\t\t$dbw->query(\n\t\t\t\"CREATE TABLE IF NOT EXISTS $tbl ( pathway varchar(255), day varchar(50) )\", DB_MASTER\n\t\t);\n\t\twfDebugLog( __METHOD__, \"\\tDone!\\n\" );\n\t}", "public function initTable(){\n\t\t\t\n\t\t}", "public function run()\n {\n db::truncate();\n foreach ([\n 'NP'=>'Draft','NJ'=>'Pending',\n 'CN'=>'Cancle','AJ'=>'Assigned',\n 'JC'=>'Evaluate','SC'=>'Success',\n ] as $key=>$value) {\n db::create([\n 'id'=>$key,\n 'name'=>$value\n ]);\n }\n }", "function initDB(PDO $db) {\n $db->exec('drop table if exists \"caching\"');\n $db->exec('CREATE TABLE \"caching\" (\"id\" INTEGER PRIMARY KEY AUTOINCREMENT, \"keyword\" VARCHAR UNIQUE, \"object\" BLOB, \"exp\" INTEGER)');\n $db->exec('CREATE UNIQUE INDEX \"cleaup\" ON \"caching\" (\"keyword\",\"exp\")');\n $db->exec('CREATE INDEX \"exp\" ON \"caching\" (\"exp\")');\n $db->exec('CREATE UNIQUE INDEX \"keyword\" ON \"caching\" (\"keyword\")');\n }", "abstract function loadDbData($compid);", "private function init() {\n\t\tlist(, $this->db, $this->table) = explode('_', get_called_class(), 3);\n\t\t$this->db = defined('static::DB') ? static::DB : $this->db;\n\t\t$this->table = defined('static::TABLE') ? static::TABLE : $this->table;\n\t\t$this->pk = defined('static::PK') ? static::PK : 'id';\n\t}", "public function prepare() {}", "public function prepare() {}", "public static function init() {\n\t\tself::$_db = Storage::get('objects.database');\n\t}", "public function loadFromDB()\n {\n }", "protected function prepare_item_for_database($request)\n {\n }", "protected function prepare_item_for_database($request)\n {\n }", "function __construct() {\n\t\t\t$this->db_name = DATABASE;\n\t\t\t//$this->table1 = TKR_TBL; \n\t\t\t//$this->table2 = DATA_TBL;\n\t\t\t\n\t\t\t}", "public function loadDatabase(){\n $table = new Table('Textarea_Widgets');\n $table->add_column('Title', 'text');\n $table->add_column('Content', 'text');\n $table->add_column('WidgetName', 'text');\n $table->create();\n }", "private function generateCache()\n {\n $schmaTabls = [];\n foreach (self::$allSchema as $Schema) {\n $schmaTabls[] = Tools::parse_object_TO_array($Schema);\n }\n self::setgenerateCACHE_SELECT($schmaTabls);\n }", "public function run()\n {\n \tDB::table('forme')->insert([\n \t\t'value' => 'haute',\n\n \t\t]);\n \tDB::table('forme')->insert([\n \t\t'value' => 'ronde',\n\n \t\t]);\n \tDB::table('forme')->insert([\n \t\t'value' => 'large',\n \t\t\n \t\t]);\n }", "public function database();", "private function createDummyTable() {}", "function CAnticipoData($db) {\r\n $this->db = $db;\r\n }", "function optimizeDatabase() {}", "abstract protected function _prepare();", "function db_dispense($table,$data){\n\t$db=R::dispense($table);\n\tforeach ($data as $key => $value) {\n\t\t$db->$key=$value;\n\t}\n\tR::store( $db );\n}", "private function create()\n {\n if ($this->isRequired()) {\n $db = Database::getDatabaseConnection();\n $db->exec($this->getDropQuery());\n $db->exec($this->getCreateQuery());\n $this->populate($db);\n }\n }", "private function tinydb_datafill($data)\n {\n // Fix up access information\n $this->tinydb_access_manager = new \\TinyDb\\Internal\\AccessManager($this->tinydb_get_reflector());\n foreach (static::tinydb_get_table_info()->table_info() as $name => $field) {\n unset($this->$name);\n }\n\n // Set the information from the database\n $this->tinydb_rowdata = $data;\n }", "public function load()\n {\n $pdo = $this->getDbConnection();\n $query = \"SELECT * FROM {$this->dbTable}\";\n $data = $pdo->query($query)->fetchAll(\\PDO::FETCH_ASSOC);\n\n foreach ($data as ['key' => $key, 'value' => $value]) {\n $this->setData($key, $value);\n }\n }", "function MetaDatabases() {}", "protected function prepare()\n\t{\n\t}", "private function init()\n {\n if(!file_exists($this->tempDB))\n {\n $data = @file_get_contents($this->remoteLink);\n\n if($data !== FALSE)\n {\n file_put_contents($this->tempDB, $data);\n }\n }\n }", "public function generateDatabase()\n {\n $this->generateUserTable();\n $this->generateEmployerTable();\n $this->generateCandidateTable();\n $this->generateGuidTable();\n $this->generateWorkExperienceTable();\n $this->generateShortListTable();\n $this->generateQualTypeTable();\n $this->generateQualLevelTable();\n $this->generateQualificationsTable();\n $this->generateFieldTable();\n $this->generateSubFieldTable();\n $this->generateSkillTable();\n $this->generatePreferencesTable();\n }", "public function __construct(){\n \n $this->create_tables();\n \n }", "static function empty_temp_db() {\n\t\tif(self::using_temp_db()) {\n\t\t\t$dbadmin = new DatabaseAdmin();\n\t\t\t$dbadmin->clearAllData();\n\t\t\t\n\t\t\t// Some DataExtensions keep a static cache of information that needs to \n\t\t\t// be reset whenever the database is cleaned out\n\t\t\tforeach(array_merge(ClassInfo::subclassesFor('DataExtension'), ClassInfo::subclassesFor('DataObject')) as $class) {\n\t\t\t\t$toCall = array($class, 'on_db_reset');\n\t\t\t\tif(is_callable($toCall)) call_user_func($toCall);\n\t\t\t}\n\t\t}\n\t}", "function __construct() {\r\n\t\tparent::__construct();\r\n\t\tmakeTestDB('temp1');\r\n\t}", "function processData() \n {\n \n // store values in table manager object.\n $moduleID = $this->dataManager->getModuleID();\n $moduleCreator = new ModuleCreator( $moduleID, $this->pathModuleRoot);\n $moduleCreator->createModule();\n \n }", "function load() {\n\t\tglobal $mysql;\n //if(!$this->exists()) return;\n \t$id \t\t= $mysql->escape($this->id);\n \t$tablename \t= $this->class_name();\n \t$this->data = $mysql->executeSql(\"SELECT * FROM \".$tablename.\" WHERE id=$id;\");\n \t$this->id\t= $this->data['id'];\n \tunset($this->data['id']);\n }", "protected function prepareDetailsTables()\n\t{\n\t}", "function augmentDatabase() {\r\n\t}", "protected function populateDatabase()\n {\n\n $orm = $this->db->getOrm();\n\n // first clean the database to make shure to have no interferences\n // from existing data\n $orm->cleanResource('WbfsysText');\n $orm->cleanResource('WbfsysRoleGroup');\n $orm->cleanResource('WbfsysRoleUser');\n $orm->cleanResource('WbfsysSecurityArea');\n $orm->cleanResource('WbfsysSecurityAccess');\n $orm->cleanResource('WbfsysGroupUsers');\n\n // clear the cache\n $orm->clearCache();\n\n // Ein paar daten in der Datenbank\n $textPublic = $orm->newEntity('WbfsysText');\n $textPublic->access_key = 'text_public';\n $orm->insert($textPublic);\n\n $textAccess = $orm->newEntity('WbfsysText');\n $textAccess->access_key = 'text_access';\n $orm->insert($textAccess);\n\n $textNoAccess = $orm->newEntity('WbfsysText');\n $textNoAccess->access_key = 'text_no_access';\n $orm->insert($textNoAccess);\n\n // Gruppen Rollen\n $groupUnrelated = $orm->newEntity('WbfsysRoleGroup');\n $groupUnrelated->name = 'Unrelated';\n $groupUnrelated->access_key = 'unrelated';\n $groupUnrelated->level = Acl::DENIED;\n $orm->insert($groupUnrelated);\n\n $groupHasAccess = $orm->newEntity('WbfsysRoleGroup');\n $groupHasAccess->name = 'Has Access';\n $groupHasAccess->access_key = 'has_access';\n $groupHasAccess->level = Acl::DENIED;\n $orm->insert($groupHasAccess);\n\n $groupHasNoAccess = $orm->newEntity('WbfsysRoleGroup');\n $groupHasNoAccess->name = 'Has no Access';\n $groupHasNoAccess->access_key = 'has_no_access';\n $groupHasNoAccess->level = Acl::DENIED;\n $orm->insert($groupHasNoAccess);\n\n // user roles\n $userAnon = $orm->newEntity('WbfsysRoleUser');\n $userAnon->name = 'annon';\n $userAnon->level = Acl::DENIED;\n $orm->insert($userAnon);\n\n $userHasAccess = $orm->newEntity('WbfsysRoleUser');\n $userHasAccess->name = 'has_access';\n $userHasAccess->level = Acl::DENIED;\n $orm->insert($userHasAccess);\n\n $userHasDAccess = $orm->newEntity('WbfsysRoleUser');\n $userHasDAccess->name = 'has_dataset_access';\n $userHasDAccess->level = Acl::DENIED;\n $orm->insert($userHasDAccess);\n\n $userHasNoAccess = $orm->newEntity('WbfsysRoleUser');\n $userHasNoAccess->name = 'has_no_access';\n $userHasNoAccess->level = Acl::DENIED;\n $orm->insert($userHasNoAccess);\n\n // security areas\n $areaModPublic = $orm->newEntity('WbfsysSecurityArea');\n $areaModPublic->access_key = 'mod-public';\n $areaModPublic->id_level_listing = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_access = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_insert = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_update = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_delete = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_admin = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_listing = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_access = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_insert = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_update = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_delete = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_admin = User::LEVEL_SUPERADMIN;\n $orm->insert($areaModPublic);\n\n $areaModAccess = $orm->newEntity('WbfsysSecurityArea');\n $areaModAccess->access_key = 'mod-has_access';\n $areaModAccess->id_level_listing = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_access = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_insert = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_update = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_delete = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_admin = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_listing = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_access = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_insert = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_update = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_delete = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_admin = User::LEVEL_SUPERADMIN;\n $orm->insert($areaModAccess);\n\n $areaModNoAccess = $orm->newEntity('WbfsysSecurityArea');\n $areaModNoAccess->access_key = 'mod-no_access';\n $areaModNoAccess->id_level_listing = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_access = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_insert = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_update = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_delete = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_admin = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_listing = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_access = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_insert = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_update = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_delete = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_admin = User::LEVEL_SUPERADMIN;\n $orm->insert($areaModNoAccess);\n\n // access\n $access1 = $orm->newEntity('WbfsysSecurityAccess');\n $access1->id_group = $groupHasAccess;\n $access1->id_area = $areaModAccess;\n $access1->access_level = Acl::LISTING;\n $this->acl->createAreaAssignment($access1,array(),true);\n\n // user role assignments\n $entityGUser = $orm->newEntity('WbfsysGroupUsers');\n $entityGUser->id_user = $userHasAccess;\n $entityGUser->id_group = $groupHasAccess;\n $entityGUser->id_area = $areaModAccess;\n $this->acl->createGroupAssignment($entityGUser);\n\n $entityGUser = $orm->newEntity('WbfsysGroupUsers');\n $entityGUser->id_user = $userHasDAccess;\n $entityGUser->id_group = $groupHasAccess;\n $entityGUser->id_area = $areaModAccess;\n $entityGUser->vid = $textAccess;\n $this->acl->createGroupAssignment($entityGUser);\n\n }", "public function init()\n {\n $this->_db = Instance::ensure($this->_db, Connection::class);\n }", "protected function populateTable() {\n\t\t$query = \"\n\t\tINSERT INTO `items` VALUES (1, 'Candy', 'Crush', '1924 Sucka Drive', 'Stripper');\n\t\tINSERT INTO `items` VALUES (2, 'John', 'Smith', '9999 The Way', 'Unemployeed');\n\t\t\";\n\t\t$this->PDO->query($query);\n\t}", "public function run()\n {\n $data=[];\n for($i=0;$i<100;$i++){\n \t$temp['typeid']=rand(1,11);\n \t$temp['goods']=str_random(10);\n \t$temp['price']=rand(1,10000);\n \t$temp['picname']='/upload/14869794804653.jpg';\n \t$temp['descr']='<p><img src=\"/upload/baidu/1486979474670564.jpg\" title=\"1486979474670564.jpg\"/></p><p><img src=\"/upload/baidu/1486922430402045.jpg\" title=\"1486922430402045.jpg\"/></p>';\n \t$temp['num']=rand(1,1000);\n \t$temp['created_at']=date('Y-m-d H:i:s');\n \t$temp['updated_at']=date('Y-m-d H:i:s');\n $temp['szie']=rand(0,2);\n \t$temp['state']=1;\n $data[]=$temp;\n }\n \\DB::table('goods')->insert($data);\n }", "function dbSetVars() {\n\n foreach ($this->fields() as $f) {\n if ($this->$f === false) continue;\n $this->db->set($f,$this->$f);\n }\n\n }", "private function getCrendentials()\n {\n $db = parse_ini_file('db.ini');\n $this->username = $db['user'];\n $this->password = $db['password'];\n $this->host = $db['host'];\n $this->dbname = $db['dbname'];\n }", "static function create_temp_db() {\n\t\trestore_error_handler();\n\t\t\n\t\t// Create a temporary database\n\t\t$dbConn = DB::getConn();\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\t\t$dbname = strtolower(sprintf('%stmpdb', $prefix)) . rand(1000000,9999999);\n\t\twhile(!$dbname || $dbConn->databaseExists($dbname)) {\n\t\t\t$dbname = strtolower(sprintf('%stmpdb', $prefix)) . rand(1000000,9999999);\n\t\t}\n\n\t\t$dbConn->selectDatabase($dbname);\n\t\t$dbConn->createDatabase();\n\n\t\t$st = new SapphireTest();\n\t\t$st->resetDBSchema();\n\t\t\n\t\t// Reinstate PHPUnit error handling\n\t\tset_error_handler(array('PHPUnit_Util_ErrorHandler', 'handleError'));\n\t\t\n\t\treturn $dbname;\n\t}", "public function DataInstitucion() {\n $this->mysqli = new Data();\n }", "function allinea_db() {\r\n\t\t\r\n\t\t$in=$this->session_vars;\r\n\t\t$conn=$this->conn;\r\n\t\t$service=$this->service;\r\n\t\t$tb_exist = false;\r\n\t\t$str_synonym=\"select * from USER_SYNONYMS where synonym_name='\" . $this->form ['TABLE'] . \"'\";\r\n\t\t$sql = new query ( $conn );\r\n\t\t$sql->set_sql ( $str_synonym );\r\n\t\t$sql->exec ();//non richiede binding\r\n\t\t$sql->get_row();\r\n\t\tif($sql->row['TABLE_NAME']!='') $this->form ['TABLE']=$sql->row['TABLE_NAME'];\r\n\t\t$query = \"select column_name from user_col_comments where table_name='\" . $this->form ['TABLE'] . \"'\";\r\n\t\t$sql = new query ( $conn );\r\n\t\t$sql->set_sql ( $query );\r\n\t\t$sql->exec ();//non richiede binding\r\n\t\t$all_field_exist = true;\r\n\t\tforeach ( $this->fields as $key => $val ) {\r\n\t\t\tif (isset ( $val ['TYPE'] ) && $val ['TYPE'] != '')\r\n\t\t\t$field_type = \"field_{$val['TYPE']}\";\r\n\t\t\telse\r\n\t\t\t$field_type = \"field\";\r\n\t\t\t\r\n\t\t\tif ($this->config_service['field_lib'] != '' && file_exists ( $this->config_service['field_lib'] . $field_type . \".inc\" )) {\r\n\t\t\t\tinclude_once $this->config_service['field_lib'] . $field_type . \".inc\";\r\n\t\t\t} else\r\n\t\t\tinclude_once \"{$field_type}.inc\";\r\n\t\t\t$this->no_field_value_by_tb=true;\r\n\t\t\t$field_obj = new $field_type ( $this, $key, $this->conn, $this->tb_vals, $this->session_vars, $this->service, $this->errors);\r\n\t\t\t$this->no_field_value_by_tb=false;\r\n\t\t\t$allinea_stmt [$key] = $field_obj->allinea_db ();\r\n\t\t\tif ($field_obj->attributes ['PK'] == 'yes') {\r\n\t\t\t\t$sql_pk_fields .= \"{$field_obj->attributes['VAR']},\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$sql_pk_fields = rtrim ( $sql_pk_fields, \",\" );\r\n\t\tif ($sql->numrows > 0) {\r\n\t\t\t$tb_exist = true;\r\n\t\t\t$i = 0;\r\n\t\t\twhile ( $sql->get_row () ) {\r\n\t\t\t\t$res [$i] = $sql->row ['COLUMN_NAME'];\r\n\t\t\t\t$i ++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($tb_exist) {\r\n\t\t\t$sql_pk = null;\r\n\t\t\t$c = 0;\r\n\t\t\t$all_field_exist = true;\r\n\t\t\tforeach ( $allinea_stmt as $key => $val ) {\r\n\t\t\t\tif ($val != '') {\r\n\t\t\t\t\t$field_exist = false;\r\n\t\t\t\t\tforeach ( $val as $vk => $vval ) {\r\n\t\t\t\t\t\t$nome_campo = explode ( \" \", $vval );\r\n\t\t\t\t\t\t$field_exist [$key] [$vk] = false;\r\n\t\t\t\t\t\tforeach ( $res as $key_res => $val_res ) {\r\n\t\t\t\t\t\t\tif ($val_res == $nome_campo [0] || $nome_campo [0] == '') {\r\n\t\t\t\t\t\t\t\t$field_exist [$key] [$vk] = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tforeach ( $field_exist as $key1 => $val1 ) {\r\n\t\t\t\t\t\tforeach ( $val1 as $vk => $boolval )\r\n\t\t\t\t\t\tif (! $boolval) {\r\n\t\t\t\t\t\t\t$all_field_exist = false;\r\n\t\t\t\t\t\t\t$index = (count ( $this->fields ) * $vk) + $key;\r\n//\t\t\t\t\t\t\t$eq_sql_str [$index] = \"alter table EQ_\" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\r\n\t\t\t\t\t\t\t$s_sql_str [$index] = \"alter table S_\" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\r\n\t\t\t\t\t\t\t$sql_str [$index] = \"alter table \" . $this->form ['TABLE'] . \" add {$allinea_stmt[$key][$vk]}\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$sql_pk_drop = \"alter table \" . $this->form ['TABLE'] . \" drop constraint PK_\" . $this->form ['TABLE'] . \" cascade\";\r\n\t\t\t$sql_pk = \"alter table \" . $this->form ['TABLE'] . \" add constraint PK_\" . $this->form ['TABLE'] . \" primary key ($sql_pk_fields)\";\r\n\t\t\t$sql_fk_coord_drop = \"alter table \" . $this->form ['TABLE'] . \" drop constraint FK_\" . $this->form ['TABLE'] . \"_COORD cascade\";\r\n\t\t\tglobal $config_service;\r\n\t\t\tif ($config_service ['VISITNUM_PROGR'] == 1)\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t\telse\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t} else {\r\n\t\t\t$this->body .= \"Table <b>\" . $this->form ['TABLE'] . \"</b> doesn't exist<br/>\";\r\n\t\t\tforeach ( $allinea_stmt as $key => $val ) {\r\n\t\t\t\tforeach ( $val as $key_f => $val_f )\r\n\t\t\t\tif ($val_f != '')\r\n\t\t\t\t$sql_create_fields .= \"{$val_f},\";\r\n\t\t\t}\r\n\t\t\t$sql_create_fields = rtrim ( $sql_create_fields, \",\" );\r\n\t\t\t$sql_str_ini = \"create table \" . $this->form ['TABLE'] . '(';\r\n\t\t\t$sql_str_end = \")\";\r\n\t\t\t$sql_str [0] = $sql_str_ini . $sql_create_fields . $sql_str_end;\r\n\t\t\t$sql_pk = \"alter table \" . $this->form ['TABLE'] . \" add constraint PK_\" . $this->form ['TABLE'] . \" primary key ($sql_pk_fields)\";\r\n\t\t\t$config_service=$this->config_service;\r\n\t\t\tif ($config_service ['VISITNUM_PROGR'] == 1)\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, VISITNUM_PROGR, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n\t\t\telse\r\n\t\t\t$sql_fk_coord = \"alter table \" . $this->form ['TABLE'] . \" add constraint FK_\" . $this->form ['TABLE'] . \"_COORD foreign key (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) references {$service}_COORDINATE (VISITNUM, ESAM, {$this->PK_SERVICE}, PROGR) on delete cascade\";\r\n//\t\t\t$eq_sql_str [0] = \"create table EQ_\" . $this->form ['TABLE'] . \" (ID NUMBER, COMMENTO varchar2(400),\" . $sql_create_fields . $sql_str_end;\r\n//\t\t\t$eq_sql_str [1] = \"alter table EQ_\" . $this->form ['TABLE'] . \" add constraint EQ_PK_\" . $this->form ['TABLE'] . \" primary key (ID)\";\r\n\r\n\t\t\t$s_sql_str [0] = \"create table S_\" . $this->form ['TABLE'] . \"(USERID VARCHAR2(20),MODDT DATE,MODPROG NUMBER not null,FL_QUERY CHAR(1) not null,ID_QUERY NUMBER,\" . $sql_create_fields . $sql_str_end;\r\n\t\t\t$s_sql_str [1] = \"alter table S_\" . $this->form ['TABLE'] . \" add constraint S_PK_\" . $this->form ['TABLE'] . \" primary key (MODPROG)\";\r\n\r\n\t\t}\r\n\t\tif (isset ( $in ['CREATE'] ) || isset ( $in ['CREATE_' . $this->form ['TABLE']] )) {\r\n\t\t\tforeach ( $sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tforeach ( $eq_sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tforeach ( $s_sql_str as $key => $val ) {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($val); // bind non necessario\r\n\t\t\t}\r\n\t\t\tif ($sql_pk_drop != '') {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($sql_pk_drop); // bind non necessario\r\n\t\t\t}\r\n\t\t\t$sql = new query ( $conn );\r\n\t\t\t$sql->ins_upd ($sql_pk); // bind non necessario\r\n\t\t\tif ($sql_fk_coord_drop != '') {\r\n\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t$sql->ins_upd ($sql_fk_coord_drop); // bind non necessario\r\n\t\t\t}\r\n\t\t\t$sql = new query ( $conn );\r\n\t\t\t$sql->ins_upd ($sql_fk_coord); // bind non necessario\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\treturn ($tb_exist && $all_field_exist);\r\n\t}", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Product::truncate();\n Transaction::truncate();\n Category::truncate();\n DB::table('product_categories')->truncate();\n\n\n factory(User::class, 500)->create();\n factory(Category::class, 50)->create();\n factory(Product::class, 400)->create()->each(\n function ($product){\n $categories = Category::all()->random( mt_rand(1,5) )->pluck('id');\n $product->categories()->attach( $categories );\n }\n );\n\n factory(Transaction::class, 500)->create();\n }", "function put(){\r\n\t\t//Connect\r\n\t\t$sql = new DataBase;\r\n\t\t$sql->connect();\r\n\t}", "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 __construct()\n {\n $this->_idField = $this->getIdField();\n $this->_tableName = $this->getTableName();\n\n if (!static::$_db) {\n static::$_db = Database::getInstance();\n }\n\n if (!static::$_schema) {\n static::$_schema = new Cache();\n }\n }", "protected function populateDatabase(){\n $itemsSaved = (\"\\n\" . implode(';', get_object_vars($this)));\n file_put_contents('coursesTakenDB.csv', $itemsSaved, FILE_APPEND | LOCK_EX);\n }", "public function run()\n {\n DB::table(\"data\")->insert([\n \t\"name\"=>\"IVA\",\n \t\"data\"=>\"21\"\n ]);\n DB::table(\"data\")->insert([\n \t\"name\"=>\"DESIGN_INDEX\",\n \t\"data\"=>\"BUTTONS\"\n ]);\n\n }", "abstract public function prepare(): self;", "private function _set_table()\n\t{\n\t\t$dossier = $this->config->item('dossier');\n\t\tif($dossier === false)\n\t\t{\n\t\t\tlog_message('info', '\"Dossier\" params is not set');\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_dossier = $dossier;\n\t\t\t$this->_table = $this->_dossier . '.' . $this->_table;\n\t\t}\n\t}", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n User::truncate();\n Departement::truncate();\n JobPosition::truncate();\n Manager::truncate();\n\n\n $usersQuantity = 10;\n $departementsQuantity = 10;\n $managersQuantity = 20;\n $jobpositionsQuantity = 30;\n\n factory(User::class,$usersQuantity)->create();\n factory(Departement::class,$departementsQuantity)->create();\n factory(Manager::class,$managersQuantity)->create();\n factory(JobPosition::class,$jobpositionsQuantity)->create();\n }", "protected function _setup() {\n // $this->_createTable();\n parent::_setup();\n }", "public function run()\n {\n \\Illuminate\\Support\\Facades\\DB::table('tipo_material')\n ->insert([\n 'nombre' => 'FILTROS',\n 'created_at' => getCurrentDate(),\n ]);\n \\Illuminate\\Support\\Facades\\DB::table('tipo_material')\n ->insert([\n 'nombre' => 'ACEITES',\n 'created_at' => getCurrentDate(),\n ]);\n \\Illuminate\\Support\\Facades\\DB::table('tipo_material')\n ->insert([\n 'nombre' => 'REPUESTOS',\n 'created_at' => getCurrentDate(),\n ]);\n }", "public function initialize()\n {\n $this->_db = new Fplanillassal();\n }", "function initialize() {\n\t\tglobal $mysqli, $table;\n\t\t$id_result = $_SESSION['mem_id'];\n\t\t\n\t\tif (!($stmt = $mysqli->prepare(\"SELECT * FROM $table WHERE mem_id = '$id_result'\"))) {\n\t\t\techo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n\t\t}\n\t\tif (!$stmt->execute()) {\n\t\t\techo \"Execute failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n\t\t}\n\t\tif (!($allResults = $stmt->get_result())) {\n\t\t\techo \"Get results failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n\t\t}\n\t\t//$allResults = $stmt->get_result();\n\t\t\n\t\tbuildTable($allResults);\n\t\t\n\t\t$stmt->close();\n\t}", "private function _fillTmpTable()\n {\n $sql = new SqlStatement();\n $sql->select()\n ->from(array('p' => 'product'), array('p.*'));\n \n if ($this->subCategory) \n {\n $sql->innerJoin(array('p2c' => 'product_to_category'), 'p.product_id = p2c.product_id')\n ->innerJoin(array('cp' => 'category_path'), 'cp.category_id = p2c.category_id')\n ->where('cp.path_id = ?', array($this->subCategory));\n }\n elseif ($this->topCategory) \n {\n $sql->innerJoin(array('p2c' => 'product_to_category'), 'p.product_id = p2c.product_id')\n ->where('p2c.category_id = ?', array($this->topCategory));\n }\n \n $searchConditions = $this->_prepareSearchConditions();\n if (count($searchConditions)) {\n $sql->innerJoin(array('pd' => 'product_description'), 'pd.product_id = p.product_id')\n ->multipleWhere($searchConditions, 'OR');\n }\n \n $sql2 = new SqlStatement();\n $sql2->select(array(\n 'p.product_id',\n 'p.price',\n 'discount' => 'MIN(pd2.price)',\n 'special' => 'MIN(ps.price)',\n 'total' => 'AVG(rating)',\n //@fixed_tax\n //@percent_tax\n ))\n ->from(array('p' => $sql))\n ->innerJoin(array('p2s' => 'product_to_store'), 'p.product_id = p2s.product_id')\n ->where('p2s.store_id = ?', (int)$this->config->get('config_store_id'))\n ->where(\"p.status = '1'\")\n ->where('p.date_available <= NOW()')\n ->group(array('p.product_id'));\n \n if (count($this->aggregate)) {\n foreach ($this->aggregate as $type => $group) {\n foreach ($group as $groupId => $values) {\n $tblAlias = strtolower(substr($type, 0, 1)) . $groupId;\n $sql2->innerJoin(array($tblAlias => self::FILTERS_TABLE), 'p.product_id = ' . $tblAlias . '.product_id');\n $sql2->where($tblAlias . '.type = ?', array($type));\n $sql2->where($tblAlias . '.group_id = ?', array($groupId));\n if ($type !== 'STOCK_STATUS') {\n foreach ($values as $k => $val) {\n $values[$k] = '\\'' . $this->db->escape($val) . '\\'';\n }\n $sql2->where($tblAlias . '.value IN (' . implode(', ', $values) . ')');\n } else {\n $terms = array();\n foreach ($values as $stockSt) {\n if ($stockSt == self::$IN_STOCK_STATUS) {\n $terms[] = '(p.quantity > 0 OR p.stock_status_id = ' . self::$IN_STOCK_STATUS . ')';\n } else {\n $terms[] = '(' . $tblAlias . '.value = \\'' . $this->db->escape($stockSt) . '\\' AND p.quantity = 0)';\n }\n }\n\n $sql2->where('(' . implode(' OR ', $terms) . ')');\n }\n }\n }\n }\n \n if ( self::$HIDE_OUT_OF_STOCK ) {\n $vals = array();\n if (isset($this->aggregate['OPTION'])) {\n foreach ($this->aggregate['OPTION'] as $values) {\n $vals = array_merge($vals, $values);\n }\n }\n $on = count($vals) \n ? \"p.product_id = pov.product_id AND pov.option_value_id IN (\" . implode(',', $vals) . \")\" \n : \"p.product_id = pov.product_id\";\n \n $sql2->leftJoin(array('pov' => 'product_option_value'), $on)\n ->where('( (pov.quantity IS NULL AND p.quantity > 0) OR pov.quantity > 0 )');\n }\n \n $sql2->leftJoin(array('pd2' => 'product_discount'), \"pd2.product_id = p.product_id \n AND pd2.quantity = '1'\n AND (pd2.date_start = '0000-00-00' OR pd2.date_start < NOW())\n AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())\n AND pd2.customer_group_id = '{$this->customerGroupId}'\")\n ->leftJoin(array('ps' => 'product_special'), \"ps.product_id = p.product_id \n AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())\n AND (ps.date_start = '0000-00-00' OR ps.date_start < NOW())\n AND ps.customer_group_id = '{$this->customerGroupId}'\")\n ->leftJoin(array('r1' => 'review'), 'r1.product_id = p.product_id AND r1.status = 1');\n\n if ($this->config->get('config_tax')) {\n $sql2->select(array('fixed_tax', 'percent_tax'))\n ->leftJoin(array('tr1' => $this->subquery->fixedTax), 'tr1.tax_class_id = p.tax_class_id')\n ->leftJoin(array('tr2' => $this->subquery->percentTax), 'tr2.tax_class_id = p.tax_class_id');\n } else {\n $sql2->select(array('fixed_tax' => '0', 'percent_tax' => '0'));\n }\n\n $this->db->query('CREATE TEMPORARY TABLE ' . DB_PREFIX . self::RESULTS_TABLE . ' (PRIMARY KEY (`product_id`)) ' . $sql2);\n }", "public function createData()\n {\n // TODO: Implement createData() method.\n }", "private function _create() {\n\n $this->db->insert(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->set(\"id\", $this->db->insert_id());\n\n }", "public function initializeTypo3DbGlobal() {}" ]
[ "0.68578875", "0.6771575", "0.67547446", "0.66998786", "0.6616273", "0.6560394", "0.6523527", "0.6482866", "0.64827895", "0.6479671", "0.6430688", "0.6408288", "0.6363516", "0.62844115", "0.6269311", "0.6243386", "0.6234412", "0.62226206", "0.62123007", "0.6194581", "0.61890537", "0.61809254", "0.6163473", "0.61306685", "0.61101586", "0.61101586", "0.60855305", "0.6061689", "0.60595095", "0.60449576", "0.6037357", "0.6015936", "0.6010393", "0.6008167", "0.60056156", "0.5980912", "0.5980912", "0.59732944", "0.59665716", "0.59661543", "0.5963328", "0.5942842", "0.5928343", "0.59018016", "0.5893887", "0.5893188", "0.58918095", "0.58834916", "0.58817244", "0.58745956", "0.58745956", "0.5870402", "0.58693016", "0.5865528", "0.586337", "0.5832897", "0.58291376", "0.5822754", "0.5792656", "0.5792418", "0.5791255", "0.57843715", "0.5774926", "0.5773164", "0.57727647", "0.5772332", "0.5771772", "0.5765796", "0.576191", "0.57358676", "0.5735414", "0.5735104", "0.571957", "0.5717368", "0.5717268", "0.57129043", "0.5704143", "0.5703151", "0.56858927", "0.5682997", "0.5674081", "0.5667194", "0.5655301", "0.5653215", "0.5652861", "0.5652356", "0.5651873", "0.56425554", "0.56410265", "0.56406325", "0.5636675", "0.56346476", "0.5631431", "0.5614468", "0.560778", "0.5606628", "0.5604635", "0.5600585", "0.559549", "0.5592724", "0.5589851" ]
0.0
-1
Relacion de uno a muchos un oficinas tiene muchos oficios(corresponce)
public function correspondences(){ return $this ->hasMany('App\Correspondence'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function butacas_ocupadas($ProximaObraNombre,$ProximaObraMes,$ProximaObraAnyo){\n\t\t//las butacas reservadas de las sesiones en el mes analizado\n\t\t$reservas=Reserva::whereHas('sesion', function ($query) use ($ProximaObraNombre,$ProximaObraMes,$ProximaObraAnyo) {\n \t\t$query->where('nombre_obra', $ProximaObraNombre);\n \t\t$query->where(\"inicio\",\">=\",$ProximaObraAnyo.\"-\".$ProximaObraMes.\"-01\")->where(\"inicio\",\"<=\",$ProximaObraAnyo.\"-\".$ProximaObraMes.\"-31\");\n\t\t})->get();\n\t\t//las butacas bloqueadas aun no reservadas en el mes analizado\n\t\t$butacas=Butaca::whereHas('sesion', function ($query) use ($ProximaObraNombre,$ProximaObraMes,$ProximaObraAnyo) {\n \t\t$query->where('nombre_obra', $ProximaObraNombre);\n \t\t$query->where(\"inicio\",\">=\",$ProximaObraAnyo.\"-\".$ProximaObraMes.\"-01\")->where(\"inicio\",\"<=\",$ProximaObraAnyo.\"-\".$ProximaObraMes.\"-31\");\n\t\t})->get();\n\n\t\t$data[\"butacas_ocupadas_dia\"]=[];\n\t\tforeach ($reservas as $reserva) {\n\t\t\t$dia=Carbon::parse($reserva->sesion->inicio)->format('d');\n\t\t\t$dia=(int)$dia;\n\n\t\t\tif(isset($data[\"butacas_ocupadas_dia\"][$dia])){\n\t\t\t\t$data[\"butacas_ocupadas_dia\"][$dia]+=$reserva->num_butacas;\n\t\t\t}else{\n\t\t\t\t$data[\"butacas_ocupadas_dia\"][$dia]=$reserva->num_butacas;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tforeach ($butacas as $butaca) {\n\t\t\t$dia=Carbon::parse($butaca->sesion->inicio)->format('d');\n\t\t\t$dia=(int)$dia;\n\n\t\t\tif(isset($data[\"butacas_ocupadas_dia\"][$dia])){\n\t\t\t\t$data[\"butacas_ocupadas_dia\"][$dia]++;\n\t\t\t}else{\n\t\t\t\t$data[\"butacas_ocupadas_dia\"][$dia]=1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn $data[\"butacas_ocupadas_dia\"];\n }", "public function contAlumNormal($anio)\n { \n //$gradosMatTercerCiclo=[];$gradosVespertino=[];$gradosCompleto=[];\n //para contar alumnas en periodo normal\n //hay q filtrar por turnos Matutino,Vespertino y Completo\n $match=['anios_id'=>$anio,'turnos_id'=>1];\n $gradosMatutino=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n //$countMat=count($gradosMatutino);\n $arreglo_grados_inscritos_matutino=[];\n for($i=0;$i<count($gradosMatutino);$i++){\n $gradoId=$gradosMatutino[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosMatutino[$i]['grado'].$gradosMatutino[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosMatutino[$i]['categoria'],\n \"capacidad\"=>$gradosMatutino[$i]['capacidad'],\n \"turno\"=>\"matutino\",\n ];\n array_push($arreglo_grados_inscritos_matutino,$aux);\n }\n\n \n $match=['anios_id'=>$anio,'turnos_id'=>2];\n $gradosVespertino=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n $arreglo_grados_inscritos_vespertino=[];\n for($i=0;$i<count($gradosVespertino);$i++){\n $gradoId=$gradosVespertino[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosVespertino[$i]['grado'].$gradosVespertino[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosVespertino[$i]['categoria'],\n \"capacidad\"=>$gradosVespertino[$i]['capacidad'],\n \"turno\"=>\"Vespertino\", \n ];\n array_push($arreglo_grados_inscritos_vespertino,$aux);\n }\n\n //$countVesp=count($gradosVespertino);\n $match=['anios_id'=>$anio,'turnos_id'=>3];\n $gradosCompleto=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n\n $arreglo_grados_inscritos_completo=[];\n for($i=0;$i<count($gradosCompleto);$i++){\n $gradoId=$gradosCompleto[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosCompleto[$i]['grado'].$gradosCompleto[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosCompleto[$i]['categoria'],\n \"capacidad\"=>$gradosCompleto[$i]['capacidad'],\n \"turno\"=>\"completo\",\n ];\n array_push($arreglo_grados_inscritos_completo,$aux);\n }\n\n //$countComp=count($gradosCompleto);\n //dd($gradosCompleto);\n $arreglo_de_grados=[\"gradosMatutino\"=>$arreglo_grados_inscritos_matutino,\n \"gradosVespertino\"=>$arreglo_grados_inscritos_vespertino,\n \"gradosCompleto\"=>$arreglo_grados_inscritos_completo,\n \n ];\n //dd($arreglo_de_grados);\n //dd($arreglo_grados_inscritos_matutino);\n return $arreglo_de_grados;\n //$match=[''=>];\n //$nomMat=matricula::\n\n }", "public function colaboradores_obsoletos(){\n //where ((B.data_inserida-'$data') && (C.data_inserida-'$data') )>tempo_sem_atualizar\n return $this->db->query(\"select * from colaboradores A inner join competencias_colaboradores AS B on (A.id_colaborador=B.colaboradores_id_colaborador) join instituicao where status_colaborador=0 group by colaboradores_id_colaborador order by B.data_inserida \");\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}", "function en_rojo($anio){\n $ar=array();\n $ar['anio']=$anio;\n $sql=\"select sigla,descripcion from unidad_acad \";\n $sql = toba::perfil_de_datos()->filtrar($sql);\n $resul=toba::db('designa')->consultar($sql);\n $ar['uni_acad']=$resul[0]['sigla'];\n $res=$this->get_totales($ar);//monto1+monto2=gastado\n $band=false;\n $i=0;\n $long=count($res);\n while(!$band && $i<$long){\n \n if(($res[$i]['credito']-($res[$i]['monto1']+$res[$i]['monto2']))<-50){//if($gaste>$resul[$i]['cred']){\n $band=true;\n }\n \n $i++;\n }\n return $band;\n \n }", "protected function armaColeccionObligatorios() {\n $dao = new PGDAO();\n $result = array();\n $where = $this->strZpTprop();\n if ($where != '') {\n $colec = $this->leeDBArray($dao->execSql($this->COLECCIONZPCARACOBLIG . \" and tipoprop in (\" . $where . \")\"));\n } else {\n $colec = $this->leeDBArray($dao->execSql($this->COLECCIONZPCARACOBLIG));\n }\n foreach ($colec as $carac) {\n $result[$carac['id_zpcarac']] = 0;\n }\n return $result;\n }", "function cuentabancos(){\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,c.description,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=2 \n\t\t\tand c.`main_father`=conf.CuentaBancos and p.idtipopoliza!=3 and m.TipoMovto not like '%M.E%'\n\t\t\tand m.IdPoliza=p.id and p.activo=1 and m.Activo=1 group by m.Cuenta\n\t\t\t\");\n\t\t\treturn $sql;\n\t\t}", "function buscarEspaciosReprobados($notaAprobatoria) {\r\n \r\n $reprobados=isset($reprobados)?$reprobados:'';\r\n $espacios=isset($reprobados)?$reprobados:'';\r\n \r\n if (is_array($this->espaciosCursados)){\r\n foreach ($this->espaciosCursados as $value) {\r\n if (isset($value['NOTA'])&&($value['NOTA']<$notaAprobatoria||$value['CODIGO_OBSERVACION']==20||$value['CODIGO_OBSERVACION']==23||$value['CODIGO_OBSERVACION']==25)){\r\n if ($value['CODIGO_OBSERVACION']==19||$value['CODIGO_OBSERVACION']==22||$value['CODIGO_OBSERVACION']==24)\r\n {\r\n }else\r\n {\r\n $espacios[]=$value['CODIGO'];\r\n }\r\n }\r\n }\r\n if(is_array($espacios)){\r\n \r\n $espacios= array_unique($espacios);\r\n if($this->datosEstudiante['IND_CRED']=='S'){\r\n \r\n foreach ($espacios as $key => $espacio) {\r\n foreach ($this->espaciosCursados as $cursado) {\r\n if($espacio==$cursado['CODIGO']){\r\n $reprobados[$key]['CODIGO']=$cursado['CODIGO'];\r\n $reprobados[$key]['CREDITOS']=(isset($cursado['CREDITOS'])?$cursado['CREDITOS']:0);\r\n }\r\n }\r\n\r\n }\r\n }else{\r\n $reprobados=$espacios;\r\n }\r\n return $reprobados; \r\n \r\n }else{\r\n return 0; \r\n }\r\n \r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }", "public function unidadReceptoraReal($correspondencia_id) {\n \n // BUSCAR UNIDADES DE RECEPTORES ESTABLECIDOS\n $unidades_receptoras = array();\n $unidad_recibe_id = '';\n $receptores_establecidos = Doctrine::getTable('Correspondencia_Receptor')->findByCorrespondenciaIdAndEstablecido($correspondencia_id, 'S');\n foreach ($receptores_establecidos as $receptor_establecido) {\n $unidades_receptoras[] = $receptor_establecido->getUnidadId();\n if($receptor_establecido->getFuncionarioId() == $this->getUser()->getAttribute('funcionario_id')){\n // SI EL FUNCIONARIO LOGUEADO ES ESTABLECIDO COMO RECEPTOR SE SELECCIONA LA UNIDAD POR LA CUAL RECIBE\n $unidad_recibe_id = $receptor_establecido->getUnidadId();\n }\n }\n \n if($unidad_recibe_id==''){\n // EN CASO DE NO ENCONTRAR LA UNIDAD, BUSCAR SI LE FUE ASIGANADA LA CORRESPONDENCIA COMO UNA TAREA\n $receptor_asignado = Doctrine::getTable('Correspondencia_Receptor')->findOneByCorrespondenciaIdAndFuncionarioIdAndEstablecido($correspondencia_id, $this->getUser()->getAttribute('funcionario_id'), 'A');\n\n if($receptor_asignado){\n $unidad_recibe_id = $receptor_asignado->getUnidadId();\n }\n }\n \n if($unidad_recibe_id==''){\n // BUSCAR LAS UNIDADES A LA QUE PERTENECE EL FUNCIONARIO CON PERMISO DE LEER\n $unidades_receptoras = array_unique($unidades_receptoras);\n \n $funcionario_unidades_leer = Doctrine::getTable('Correspondencia_FuncionarioUnidad')->funcionarioAutorizado($this->getUser()->getAttribute('funcionario_id'),'leer');\n\n foreach($funcionario_unidades_leer as $unidad_leer) {\n if(array_search($unidad_leer->getAutorizadaUnidadId(), $unidades_receptoras)>=0){\n $unidad_recibe_id = $unidad_leer->getAutorizadaUnidadId();\n }\n }\n }\n \n return $unidad_recibe_id;\n }", "function getCorrelativoComprobante() {\n\t\tglobal $bd;\n\t\tglobal $x_correlativo_comprobante;\n\t\t/// buscamos el ultimo correlativo\n\t\t$x_array_comprobante = $_POST['p_comprobante'];\n\t\t$correlativo_comprobante = 0; \n\t\t$idtipo_comprobante_serie = $x_array_comprobante['idtipo_comprobante_serie'];\n\t\tif ($x_array_comprobante['idtipo_comprobante'] != \"0\"){ // 0 = ninguno | no imprimir comprobante\n\n\t\n\t\t\t$sql_doc_correlativo=\"select (correlativo + 1) as d1 from tipo_comprobante_serie where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\t\t\n\t\t\t$correlativo_comprobante = $bd->xDevolverUnDato($sql_doc_correlativo);\n\n\t\t\t// if ($x_array_comprobante['codsunat'] === \"0\") { // si no es factura electronica\n\t\t\t\t// guardamos el correlativo //\n\t\t\t\t$sql_doc_correlativo = \"update tipo_comprobante_serie set correlativo = \".$correlativo_comprobante.\" where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\n\t\t\t\t$bd->xConsulta_NoReturn($sql_doc_correlativo);\n\t\t\t// } \n\t\t\t// si es factura elctronica guarda despues tigger ce \n\t\t} else {\n\t\t\t$correlativo_comprobante='0';\n\t\t}\n\n\t\t// SI TAMBIEN MODIFICA EN REGISTRO PAGO\n\t\t$x_correlativo_comprobante = $correlativo_comprobante;\n\t\tif ( strrpos($x_from, \"e\") !== false ) { $x_from = str_replace('e','',$x_from); setComprobantePagoARegistroPago(); }\n\n\t\t// print $correlativo_comprobante;\n\t\t$x_respuesta = json_encode(array('correlativo_comprobante' => $correlativo_comprobante));\n\t\tprint $x_respuesta.'|';\n\t}", "function ImprimirSubtituloIndice($evento, &$cont_causa500, &$cont_imp, &$cont_pro)\r\n {\r\n if ($evento->getTipoFalla() == 'CAUSA-500' && $cont_causa500 == 1)\r\n {\r\n $this->Ln(10);\r\n $this->Imprimir('INTERRUPCIONES CON ERROR DE OPERACIONES:', 30, 10, 8);\r\n $cont_causa500++;\r\n }\r\n elseif ($evento->getTipoFalla() == 'IMPREVISTA' && $cont_imp == 1)\r\n {\r\n $this->Ln(10);\r\n $this->Imprimir('INTERRUPCIONES IMPREVISTAS:', 30, 10, 8);\r\n $cont_imp++;\r\n }\r\n elseif ($evento->getTipoFalla() == 'PROGRAMADA' && $cont_pro == 1)\r\n {\r\n $this->Ln(10);\r\n $this->Imprimir('INTERRUPCIONES PROGRAMADAS:', 30, 10, 8);\r\n $cont_pro++;\r\n }\r\n }", "function calcularCuposDistrito($conexion, $conexion2, $idEvento, $idOrganizador)\n{\n $conexion->Ejecuto(\"select PorcentajeRotarios1, PorcentajeExtranjeros1, Reserva, CupoMaximo from evento where idEvento=\" . $idEvento);\n $valores=$conexion->Siguiente();\n\n $cupoRotario = ($valores['PorcentajeRotarios1'] * $valores['CupoMaximo']) / 100;\n $cupoExtranjeros = ($valores['PorcentajeExtranjeros1'] * $valores['CupoMaximo']) / 100;\n $disponible = $valores['CupoMaximo'] - $valores['Reserva'] - $cupoRotario - $cupoExtranjeros;\n\n $conexion->Ejecuto(\"select sum(Inscriptos) as 'Inscriptos' from asistenciaeraup where idDistrito not in (\" . $idOrganizador . \") and idEvento<\" . $idEvento . \" group by idEvento order by idAsistenciaERAUP DESC LIMIT 3\");\n\n //Asistencia global a los �ltimos 3 ERAUP\n $totalEraup3 = 0; //Antepentultimo ERAUP\n $totalEraup2 = 0; //Penultimo ERAUP\n $totalEraup1 = 0; //Ultimo ERAUP\n\n $x = 1;\n\n while ($asistenciaGlobal=$conexion->Siguiente()) {\n if ($x == 1) {\n $totalEraup1 = $asistenciaGlobal['Inscriptos'];\n } elseif ($x == 2) {\n $totalEraup2 = $asistenciaGlobal['Inscriptos'];\n } elseif ($x == 3) {\n $totalEraup3 = $asistenciaGlobal['Inscriptos'];\n }\n\n $x++;\n }\n\n $conexion->Ejecuto(\"select count(s.idSocio) as 'Registro' from socio s, club c, distrito d where s.idTipoRueda=2 and s.Activo=1 and s.idClub=c.idClub and c.idDistrito=d.idDistrito and d.idDistrito not in (\" . $idOrganizador . \") and d.Nombre<>'Otro'\");\n $totalSGI=$conexion->Siguiente();\n\n $conexion->Ejecuto(\"select idDistrito, Nombre from distrito where Nombre<>'Otro' and idDistrito not in (\" . $idOrganizador . \")\");\n\n $totalG = 0;\n\n while ($distrito=$conexion->Siguiente()) {\n $conexion2->Ejecuto(\"select Inscriptos from asistenciaeraup where idEvento<\" . $idEvento . \" and idDistrito=\" . $distrito['idDistrito'] . \" order by idAsistenciaERAUP DESC LIMIT 3\");\n\n //Asistencia del distrito en cuestion\n $eraup3 = 0; //Antepentultimo ERAUP\n $eraup2 = 0; //Penultimo ERAUP\n $eraup1 = 0; //Ultimo ERAUP\n\n $x = 1;\n\n while ($asistencias=$conexion2->Siguiente()) {\n if ($x == 1) {\n $eraup1 = $asistencias['Inscriptos'];\n } elseif ($x == 2) {\n $eraup2 = $asistencias['Inscriptos'];\n } elseif ($x == 3) {\n $eraup3 = $asistencias['Inscriptos'];\n }\n\n $x++;\n }\n\n //Cantidad de Rotaractianos registrados del distrito en cuesti�n\n $conexion2->Ejecuto(\"select count(s.idSocio) as 'Membresia' from socio s, club c, distrito d where s.idClub=c.idClub and c.idDistrito=d.idDistrito and d.idDistrito=\" . $distrito['idDistrito'] . \" and s.idTipoRueda=2\");\n $membresia=$conexion2->Siguiente();\n\n $porcEraup3 = ($eraup3 * 100) / $totalEraup3;\n $porcEraup2 = ($eraup2 * 100) / $totalEraup2;\n $porcEraup1 = ($eraup1 * 100) / $totalEraup1;\n $porcMembresia = ($membresia['Membresia'] * 100) / $totalSGI['Registro'];\n\n $calculo = (0.2 * $porcEraup3 / 100) + (0.2 * $porcEraup2 / 100) + (0.3 * $porcEraup1 / 100) + (0.3 * $porcMembresia / 100);\n $cuposReservados = round($disponible * $calculo);\n\n $conexion2->Ejecuto(\"insert into asistenciaeraup (idDistrito, idEvento, CupoReservado, Inscriptos) values (\" . $distrito['idDistrito'] . \",\" . $idEvento . \",\" . $cuposReservados . \",0)\");\n }\n\n //INSERTAR FILAS PARA LOS ORGANIZADORES CON CUPORESERVADO=0\n $organizadoresSep = split(\",\", $idOrganizador);\n\n for ($x=0;$x<count($organizadoresSep);$x++) {\n $conexion2->Ejecuto(\"insert into asistenciaeraup (idDistrito, idEvento, CupoReservado, Inscriptos) values (\" . $organizadoresSep[$x] . \",\" . $idEvento . \",0,0)\");\n }\n}", "function contarReprobados($espacios_por_cursar){\n $cantidad=0;\n if(count($espacios_por_cursar)>0){\n foreach ($espacios_por_cursar as $key => $espacio) {\n if($espacio['REPROBADO']==1){\n $cantidad++;\n \t }\n }\n }\n return $cantidad; \n }", "function __procesarAsistenciaIndividual($cod_interno){\n \n\t\t\t$sql = \"SELECT * FROM \".Config::get(__CLASS__).\" WHERE cod_interno = '$cod_interno'\";\n\t\t\t$asistencias = DB::table_query($sql);\n\t\t\t$motivos = TMotivoInasistencia::motivos();\n\t\t\t$reporte = array();\n\t\t\t$reporte['asistencia'] = array_fill_keys(array('t','f'), 0);\n\t\t\t$reporte['motivos'] = array_fill_keys(array_keys($motivos), 0);\n\t\t\t$reporte['validez'] = array_fill_keys(array('t','f'), 0);\t\t\t\n\t\t\t$reporte['total'] = count($asistencias);\n\n\t\t\tforeach($asistencias as $asistencia){\n\t\t\t\t$reporte['asistencia'][$asistencia['asiste']]++;\n\t\t\t\tif($asistencia['asiste'] == 'f'){\n\t\t\t\t\t$cod_motivo = $asistencia['cod_motivo'];\n\t\t\t\t\t$reporte['motivos'][$cod_motivo]++;\n\t\t\t\t\t$reporte['validez'][$motivos[$cod_motivo]['valida']]++;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $reporte;\n\t\t}", "function determinaFechosVazios()\n{\n\tglobal $mTransicoes, $lAlfabeto, $fechoVazio, $lEstados, $lTokens; \t\n\n\t//Variáveis\n\t$arrayEstados = NULL; //array com as diversas transições vazias de um mesmo estado\n\t$arrayEstados2 = NULL;\t\n\t$transConcatenadas = NULL; //array com a string inteira da transição, pode ter diversas transições vazias\n\n\techo \"------------------------------------<br>\";\n\techo \"Passo 1: Fechos dos estados<br>\";\n\t\n\tfor($i = 1; $i <= sizeof($lEstados); $i++) //determina o fecho para cada estado do autômato\n\t{ \n\t\t//echo \"Fecho de \".$lEstados[$i].\":<br>\";\n\t\t//echo \"&nbsp;&nbsp;Transicoes vazias: \".$mTransicoes[$lEstados[$i]][$lAlfabeto[0]].\"<br>\";\n\t\tif($mTransicoes[$lEstados[$i]][$lAlfabeto[0]] != '-') //mtransicoes[\"q0\"][\"e\"] != \"-\" \n\t\t{\n\t\t\t//echo \"&nbsp;&nbsp;Diferente de '-'<br>\";\n\t\t\t$fechoVazio[$lEstados[$i]][] = $lEstados[$i]; //coloca ele mesmo na lista //fechoVazio[\"q0\"][0] = \"q0'\n\t\t\t$lTokens = NULL; //limpa conteúdo de $lTokens\n\t\t\ttokeniza($mTransicoes[$lEstados[$i]][$lAlfabeto[0]]); //\"tokeniza\" vai deixar em $lTokens todos os estados de transição vazia\n\t\t\t$arrayEstados = $lTokens;\t\n\t\n\t\t\tfor($j = 0; $j < sizeof($arrayEstados); $j++)\n\t\t\t{\n\t\t\t\t//echo \"&nbsp;&nbsp;arrayEstados[$j] = \".$arrayEstados[$j].\"<br>\";\t\t\t\t\n\t\t\t\t//ve se o estado está no fecho, se não estiver coloca\n\t\t\t\tif(array_search($arrayEstados[$j], $fechoVazio[$lEstados[$i]]) == NULL \t\n\t\t\t\t\t\t\t\t&& $arrayEstados[$j] != '-'\n\t\t\t\t\t\t\t\t&& $arrayEstados[$j] != $fechoVazio[$lEstados[$i]][0])\t\n\t\t\t\t{ //o teste é igual a NULL, logo não achou o estado no fecho\n\t\t\t\t\t$fechoVazio[$lEstados[$i]][sizeof($fechoVazio[$lEstados[$i]])] = $arrayEstados[$j];\n\t\t\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;1fechoVazio[$lEstados[$i]][\".sizeof($fechoVazio[$lEstados[$i]]).\"]: \".$arrayEstados[$j].\"<br>\";\n\t\t\t\t\t//agora precisamos ver as transições vazias do arrayEstados[$j]\n\t\t\t\t\t$lTokens = NULL; //limpa conteúdo de $lTokens\n\t\t\t\t\ttokeniza($mTransicoes[$arrayEstados[$j]][$lAlfabeto[0]]); \n\t\t\t\t\t$arrayEstados2 = NULL;\n\t\t\t\t\t$arrayEstados2 = $lTokens;\n\t\t\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\";\t\n\t\t\t\t\t//echo \"transicao: \".$arrayEstados2[0].\"<br>\";\n\t\n\t\t\t\t\tfor($k = 0; $k < sizeof($arrayEstados2); $k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(array_search($arrayEstados2[$j], $fechoVazio[$lEstados[$i]]) == NULL \n\t\t\t\t\t\t\t\t\t\t&& $arrayEstados2[$j] != '-' \n\t\t\t\t\t\t\t\t\t\t&& $arrayEstados2[$j] != $fechoVazio[$lEstados[$i]][0])\t\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$fechoVazio[$lEstados[$i]][sizeof($fechoVazio[$lEstados[$i]])] = $arrayEstados2[$k];\n\t\t\t\t\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;2fechoVazio[$lEstados[$i]][\".sizeof($fechoVazio[$lEstados[$i]]).\"]: \".$arrayEstados2[$j].\"<br>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t} \t\n\t\t}\n\t\telse //estado sem transições vazias, logo o fecho vazio é vazio\n\t\t{\n\t\t\t$fechoVazio[$lEstados[$i]][] = $lEstados[$i]; //o fecho de um estado contém ele próprio sempre\n\t\t\t//echo \"&nbsp;&nbsp;&nbsp;&nbsp;Eh vazio, coloca so ele mesmo<br>\";\n\t\t}\n\t}\t\n\n\tfor($i = 1; $i <= sizeof($lEstados); $i++) //determina o fecho para cada estado do autômato\n\t{ \n\t\tsort($fechoVazio[$lEstados[$i]]);\n\t\techo $lEstados[$i].\": \";\n\t\tfor($j = 0; $j < sizeof($fechoVazio[$lEstados[$i]]); $j++)\n\t\t{\n\t\t\techo $fechoVazio[$lEstados[$i]][$j].\".\";\n\t\t}\n\t\techo \"<br>\";\n\t}\n\n\techo \"------------------------------------<br>\";\n\treturn;\n}", "public function porCobrar(Request $request) {\n $clienteID = $request->cliente;\n $porCobrar = [];\n $totalNotaDebito = [];\n\n if ($clienteID == 0) {\n\n $porCobrar = PagoNacional::facturasPorPagarTodas($clienteID);\n $totalNotaDebito = PagoNacional::totalNotaDebito($clienteID);\n\n if ($totalNotaDebito[0]->totalNotaDebito == NULL || $totalNotaDebito[0]->deudaNotaDebito == NULL) {\n\n $porCobrar = PagoNacional::facturasPorPagarTodas($clienteID);\n $totalNotaDebito = PagoNacional::totalNotaDebitoNull($clienteID);\n }\n }\n\n if ($clienteID) {\n\n $porCobrar = PagoNacional::facturasPorPagar($clienteID);\n $totalNotaDebito = PagoNacional::totalNotaDebito($clienteID);\n\n\n if ($totalNotaDebito[0]->totalNotaDebito == NULL || $totalNotaDebito[0]->deudaNotaDebito == NULL) {\n $porCobrar = PagoNacional::facturasPorPagar($clienteID);\n $totalNotaDebito = PagoNacional::totalNotaDebitoNull($clienteID);\n\n }\n }\n //Datos de Nota Débito\n $totalND = $totalNotaDebito[0]->totalNotaDebito;\n $totalDeudaND = $totalNotaDebito[0]->deudaNotaDebito;\n //dd($totalND,$totalDeudaND);\n $busqueda = $request;\n $porCobrar = collect($porCobrar);\n $porCobrar->total_cargo = $porCobrar->sum('total') + $totalND;\n $porCobrar->total_abono = $porCobrar->total_cargo - ($porCobrar->sum('deuda') + $totalDeudaND);\n $porCobrar->total = $porCobrar->total_cargo - $porCobrar->total_abono;\n\n $clientes = ClienteNacional::getAllActive();\n\n return view('finanzas.pagosNac.porCobrar')\n ->with([\n 'busqueda' => $busqueda,\n 'clientes' => $clientes,\n 'clienteID' => $clienteID,\n 'pagos' => $porCobrar\n ]);\n }", "public function corregir_boletas_por_sector($sectores = 0, $mes = 0, $anio = 0)\n\t{\n\t\t// if($sectores == 0 )\n\t\t// \t$sectores = $this->input->post('select_tablet');\n\t\t// if($mes == 0 )\n\t\t// \t$mes = $this->input->post('mes');\n\t\t// if($anio == 0 )\n\t\t// \t$anio = $this->input->post('anio');\n\t\t// if($sectores === 0 )\n\t\t// \t{\n\t\t// \t\techo \"Error\";die();\n\t\t// \t}\n\t\t// elseif($sectores == \"A\")\n\t\t// \t$sectores = [ \"A\", \"Jardines del Sur\", \"Aberanstain\", \"Medina\", \"Salas\", \"Santa Barbara\" , \"V Elisa\"];\n\t\t// else $sectores = [ \"B\", \"C\", \"David\", \"ASENTAMIENTO OLMOS\", \"Zaldivar\" ];\n\t\t$todas_las_variables = $this->Nuevo_model->get_data(\"configuracion\");\n\t\t$mediciones_desde_query = $this->Nuevo_model->get_sectores_query_corregir($sectores, $mes, $anio );\n\t\t//var_dump($mediciones_desde_query);die();\n\t\tif($mediciones_desde_query != false)\n\t\t{\n\t\t\t$indice_actual = 0;\n\t\t\tforeach ($mediciones_desde_query as $key ) {\n\t\t\t\tif( ($key->Factura_MedicionAnterior == 0) && ($key->Factura_MedicionActual == 1) ) // bandera de tablet\n\t\t\t\t\tcontinue;\n\t\t\t\tif( ( floatval($key->Factura_PagoMonto) != floatval(0)) && ($key->Factura_PagoContado != NULL) && ($key->Factura_PagoContado != NULL) ) //si esta pagada no se re calcula\n\t\t\t\t\tcontinue;\n\t\t\t\tif( ($key->Conexion_Categoria == 1) || ($key->Conexion_Categoria == \"Familiar\") || ($key->Conexion_Categoria ==\"Familiar \") )\n\t\t\t\t{\n\t\t\t\t\t$precio_metros = $todas_las_variables[3]->Configuracion_Valor;\n\t\t\t\t\t$metros_basicos = $todas_las_variables[5]->Configuracion_Valor;\n\t\t\t\t\t$precio_bsico = $todas_las_variables[4]->Configuracion_Valor;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$precio_metros = $todas_las_variables[6]->Configuracion_Valor;\n\t\t\t\t\t$metros_basicos = $todas_las_variables[8]->Configuracion_Valor;\n\t\t\t\t\t$precio_bsico = $todas_las_variables[7]->Configuracion_Valor;\n\t\t\t\t}\n\t\t\t\t$anterior = $key->Factura_MedicionAnterior;\n\t\t\t\t$actual = $key->Factura_MedicionActual;\n\t\t\t\t$inputExcedente = intval($actual) - intval($anterior) - intval($metros_basicos);\n\t\t\t\tif($inputExcedente < 0 )\n\t\t\t\t\t$inputExcedente = 0;\n\t\t\t\t$importe_medicion = 0;\n\t\t\t\tif($inputExcedente == 0)\n\t\t\t\t\t$importe_medicion = 0;\n\t\t\t\telse $importe_medicion = floatval($precio_metros) * floatval($inputExcedente);\n\t\t\t\t//calculo el subtotal y total\n\t\t\t\t$sub_total = floatval($key->Factura_TarifaSocial) \n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_Deuda)\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_ExcedentePrecio )\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_CuotaSocial )\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_Riego )\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_PM_Cuota_Precio)\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_PPC_Precio)\n\t\t\t\t\t\t\t\t\t\t+ floatval($key->Factura_Multa);\n\t\t\t\t$total = $sub_total;\n\t\t\t\t$bonificacion = 0;\n\t\t\t\tif($key->Conexion_Deuda == 0)\n\t\t\t\t\t\t//$bonificacion_pago_puntual = (floatval ($excedente) + floatval($tarifa_basica)) * floatval (5) / floatval(100) ;//con bonificacion\n\t\t\t\t\t\t$bonificacion = (floatval ($inputExcedente) + floatval($key->Factura_TarifaSocial)) * floatval (5) / floatval(100) ;//con bonificacion\n\t\t\t\t$total =\tfloatval($total)\n\t\t\t\t\t\t\t\t\t\t- floatval($key->Factura_Acuenta)\n\t\t\t\t\t\t\t\t\t\t- floatval($bonificacion);\n\t\t\t\t//vtos\n\t\t\t\t$vto_2_precio = floatval($total) + floatval($total) * floatval($todas_las_variables[18]->Configuracion_Valor);\n\t\t\t\t$vto_1_precio = $total;\n\t\t\t\t$indice_actual++;\n\t\t\t\t$datos_factura_nueva = array(\n\t\t\t\t\t'Factura_SubTotal' => floatval($sub_total),\n\t\t\t\t\t'Factura_Total' => floatval($total),\n\t\t\t\t\t'Factura_Vencimiento1_Precio' => floatval($vto_1_precio),\n\t\t\t\t\t'Factura_Vencimiento2_Precio' => floatval($vto_2_precio),\n\t\t\t\t\t'Factura_ExcedentePrecio' => floatval($importe_medicion),\n\t\t\t\t\t'Factura_Excedentem3' => $inputExcedente\n\t\t\t\t\t );\n\t\t\t\t$resultado[$indice_actual] = $this->Nuevo_model->update_data_tres_campos($datos_factura_nueva, $key->Conexion_Id, \"facturacion_nueva\",\"Factura_Conexion_Id\", \"Factura_Mes\", $mes, \"Factura_Año\", $anio);\n\t\t\t\tvar_dump($datos_factura_nueva,$key->Conexion_Id);\n\t\t\t}\n\t\t\tvar_dump($datos_factura_nueva);\n\t\t}\n\t\telse\n\t\t\tvar_dump(\"Error. no hay medciones para las variables\");\t\n\t}", "public function otorgarPrestamo(){\n $fecha = date('d-m-y');\n $this->setFechaOtorgado($fecha);\n $cantidadCuotas = $this->getCantidadCuotas();\n $monto = $this->getMonto();\n $colObjCuota = array();\n for($i=0; $i<$cantidadCuotas; $i++){\n $montoCuota = $monto / $cantidadCuotas;\n $montoInteres = $this->calcularInteresPrestamo($i);\n $colObjCuota[$i] = new Cuota($i, $montoCuota, $montoInteres);\n }\n $this->setColObjCuota($colObjCuota);\n }", "public static function consignarC_Ahorros ($id, $cedula, $correo, $monto )\n {\n $consulta = c_ahorro::dineroAhorrado($id);\n $fila = mysqli_fetch_array($consulta);\n $nuevoMonto = $fila['JAVECOINS'] + $monto;\n c_ahorro::consignarVisitante($id, $cedula, $nuevoMonto );\n $subject = \"Consignacion a cuenta de ahorros\";\n $mensaje = \"Usted ha realizado una consignacion con valor de $\" . $nuevoMonto;\n correo::enviarCorreo($correo,$subject,$mensaje);\n }", "public function get_cite_comunicacion_interna(){\r\n //Tomamos los datos de la persona logueada\r\n $usuario_logueado = $this->datos_persona_logueada();\r\n foreach ($usuario_logueado as $usuario) {\r\n $persona_origen = $usuario->nombres.\" \".$usuario->paterno.\" \".$usuario->materno;\r\n $id_cargo_origen = $usuario->id_cargo;\r\n $cargo_origen = $usuario->descripcion_del_cargo;\r\n $sigla_origen = $usuario->sigla_del_area;\r\n $id_nivel_jerarquico_origen = $usuario->id_nivel_jerarquico;\r\n $id_area_origen = $usuario->id_area;\r\n $unidad_origen = $usuario->unidad;\r\n $id_direccion_origen = $usuario->id_direccion;\r\n $id_entidad_origen = $usuario->id_entidad;\r\n $id_servidor_publico_origen = $usuario->id_servidor_publico;\r\n }\r\n\r\n //Tomamos el año en curso\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n $año = $hoy->format('Y');\r\n\r\n //Tomamos el correlativo para el cite\r\n $correlativo_cite = \\DB::table('chasqui_correlativos')\r\n ->where('id_area', $id_area_origen)\r\n ->where('id_tipo_documento', 1)\r\n ->where('gestion', $año)\r\n ->value('correlativo');\r\n\r\n //Si no existe el registro para el correlativo, lo creamos\r\n if ($correlativo_cite < 1) {\r\n //Tomamos el año (nuevamente por que se pierde)\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n $año = $hoy->format('Y');\r\n\r\n //Creamos el registro\r\n \\DB::table('chasqui_correlativos')->insert([\r\n ['id_area' => $id_area_origen,\r\n 'id_tipo_documento' => 1,\r\n 'correlativo' => 1,\r\n 'gestion' => $año]\r\n ]);\r\n //Establecemos el $correlativo_cite en 1\r\n $correlativo_cite = 1;\r\n }\r\n\r\n //Tomamos las siglas de unidad, direccion y ministerio para formar el cite segun sus dependencias\r\n $sigla_entidad = \\DB::table('areas')\r\n ->where('id_entidad', $id_entidad_origen)\r\n ->where('id_direccion', 0)\r\n ->where('unidad', 0)\r\n ->value('sigla');\r\n\r\n //Verificamos si tiene direccion, si es 0, signigica que depende de despacho\r\n if ($id_direccion_origen == 0) {\r\n //Tomamos el año (nuevamente por que se pierde y genera conflicto)\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n $año = $hoy->format('Y');\r\n\r\n //Verificamos si es una unidad dependiente de despacho\r\n if ($unidad_origen != 0) {\r\n // Si es una unidad dependiente de despacho, tomamos la sigla de la unidad\r\n $sigla_unidad = \\DB::table('areas')\r\n ->where('id_area', $id_area_origen)\r\n ->value('sigla');\r\n //Aramamos el cite como una unidad dependiente de despacho\r\n $cite = $sigla_entidad.\"-\".$sigla_unidad.\"-CI Nº \".$correlativo_cite.\"/\".$año;\r\n }\r\n else {\r\n //Aramamos el cite como un cargo dependiente de despacho\r\n $cite = $sigla_entidad.\"-DESP-CI Nº \".$correlativo_cite.\"/\".$año;\r\n }\r\n }\r\n else {\r\n //Tomamos el año (nuevamente por que se pierde y genera conflicto)\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n $año = $hoy->format('Y');\r\n\r\n //En caso que tenga direccion, tomamos la sigla\r\n $sigla_direccion = \\DB::table('areas')\r\n ->where('id_entidad', $id_entidad_origen)\r\n ->where('id_direccion', $id_direccion_origen)\r\n ->where('unidad', 0)\r\n ->value('sigla');\r\n //Verificamos si tiene unidad, si es 0 significa que depende de la direccion\r\n if ($unidad_origen == 0) {\r\n //Aramamos el cite como direccion\r\n $cite = $sigla_entidad.\"-\".$sigla_direccion.\"-CI Nº \".$correlativo_cite.\"/\".$año;\r\n }\r\n else {\r\n //En caso que si tenga unidad, tomamos la sigla\r\n $sigla_unidad = \\DB::table('areas')\r\n ->where('id_area', $id_area_origen)\r\n ->value('sigla');\r\n //Aramamos el cite como unidad\r\n $cite = $sigla_entidad.\"-\".$sigla_direccion.\"-\".$sigla_unidad.\"-CI Nº \".$correlativo_cite.\"/\".$año;\r\n }\r\n }\r\n\r\n //Devolvemos el cite generado\r\n return $cite;\r\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 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 addOcorencias($ltOcorrencia, $tpOcorrencia, $graph, &$ocorrencias){\n\tforeach ($ltOcorrencia as $key => $value) {\n\n\t\tif ($tpOcorrencia[$key][0] == 'ALF' ) {\n\n\t\t\t$resp = buscaAlf($graph, $ltOcorrencia[$key]);\n\t\t\tif ($resp != 0) {\n\t\t\t\t$ocorrencias[] = $resp;\n\t\t\t}\n\t\t}elseif ($tpOcorrencia[$key][0] == 'DATE' or $tpOcorrencia[$key][0] == 'INT') {\n\t\t\t$resp = buscaDate($graph, $ltOcorrencia[$key]);\n\t\t\tif ($resp != 0) {\n\t\t\t\t$ocorrencias[] = $resp;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif ($tpOcorrencia[$key][0] == 'INT') {\n\t\t\t$resp = buscaInt($graph, $ltOcorrencia[$key]);\n\t\t\tif ($resp != 0) {\n\t\t\t\t$ocorrencias[] = $resp;\n\t\t\t}\n\t\t}\n\t\t\n\t}\n}", "public function cumpleanos_usuarios(){\n $date_now = date('m-d');\n $data_usua = $this->usuario_model->getUsuarioAll();\n $data_birthday = array();\n if(isset($data_usua)):\n foreach ($data_usua as $key => $usua):\n $usua_date = date('m-d', strtotime($usua->usua_fecha_nacimiento));\n if($date_now === $usua_date):\n $data_birthday[] = $usua;\n endif;\n endforeach;\n endif;\n\n /* REPORTE NRO. 03 QUE CORRESPONDE A LOS CUMPLEAÑOS DEL PERSONAL */\n $data_rexu = $this->reportexusuario_model->getReportexusuarioAllByREMACOD('03');\n $email_cc = '';\n $email_subject = '';\n $email_descripcion = '';\n if(isset($data_rexu)){\n foreach ($data_rexu as $item => $rexu) {\n $rema_id = $rexu->rema_id;\n $usua_id = $rexu->usua_id;\n $usua_nombre = $rexu->usua_nombre;\n $usua_apellido = $rexu->usua_apellido;\n $usua_email = $rexu->usua_email;\n $rema_titulo = $rexu->rema_titulo;\n $rema_descripcion= $rexu->rema_descripcion;\n if($usua_email != ''){\n $email_cc .= ($email_cc === '') ? $usua_email : ','.$usua_email;\n $email_subject = $rema_titulo;\n $email_descripcion = $rema_descripcion;\n }//end if\n }//end foreach\n }//end if\n\n if($email_cc != '' && count($data_birthday) > 0){\n foreach ($data_birthday as $key => $usua):\n $data_palabras_reservadas = array(\n '[CUMPLEANOS]' => $usua->usua_nombre.' '.$usua->usua_apellido\n );\n $email_to = ($usua->usua_email != '') ? $usua->usua_email : $usua->usua_email_personal;\n $email_message = reemplazar_palabras_reservadas($this, $email_descripcion, $data_palabras_reservadas);\n $mail_request = enviar_email($this, $email_to, $email_subject, $email_message, $email_cc);\n endforeach;\n }//end if\n }", "private function concursoAntigo() {\n\t\t$concursos = $this->Funcionario->Concurso->find('all', array('conditions' => array('status' => 1)));\n\t\tif (!empty($concursos)) {\n\t\t\t# code...\n\t\t\t$concurso_mais_antigo = $concursos[0];\n\t\t\t$data_antiga = $concurso_mais_antigo['Concurso']['data_aprovacao'];\n\t\t\t// Iterar sobre os concursos existentes\n\t\t\tforeach ( $concursos as $concurso ) {\n\t\t\t\t// Se o valor do status for um entao o concurso esta aberto | 0 fechado\n\t\t\t\tif ($concurso['Concurso']['status'] == 1 && (strtotime($data_antiga) > strtotime($concurso['Concurso']['data_aprovacao']))) {\n\t\t\t\t\t// Inicio a comparacao das datas dos funcionarios\n\t\t\t\t\t$data_antiga = $concurso['Concurso']['data_aprovacao'];\n\t\t\t\t\t$concurso_mais_antigo = $concurso;\n\n\t\t\t\t} else {\n\t\t\t\t\t// $concurso_mais_antigo = NULL;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $concurso_mais_antigo;\n\t\t}\n\t\treturn NULL;\n\t}", "public function buscar_comprobante_venta_3($anio ,$mes ,$fech1 ,$fech2 ,$tipodocumento) {\n //CPC_TipoDocumento => F factura, B boleta\n //CPC_total => total de la FACTURA o BOLETA CPC_FechaRegistro BETWEEN '20121201' AND '20121202'\n\n $where=\"\";\n //----------\n if($anio!=\"--\" && $mes ==\"--\"){// SOLO AÑO\n $where=\"AND YEAR(CPC_FechaRegistro)='\" . $anio . \"'\";\n }\n if($anio!=\"--\" && $mes !=\"--\" ){// MES Y AÑO\n $where=\"AND YEAR(CPC_FechaRegistro)='\" . $anio . \"' AND MONTH(CPC_FechaRegistro)='\" . $mes .\"'\";\n }\n if($anio==\"--\" && $mes !=\"--\"){//MES CON AÑO ACTUAL\n $where=\"AND YEAR(CPC_FechaRegistro)=' \".date(\"Y\").\"' AND MONTH(CPC_FechaRegistro)='\" . $mes .\"'\";\n }\n\n //-----------------\n \n if($anio==\"--\" && $mes ==\"--\" && $fech1!=\"--\" && $fech2==\"--\"){//FECHA INICIAL\n $where=\"AND CPC_FechaRegistro > '\" . $fech1 . \"'\";\n }\n if($anio==\"--\" && $mes ==\"--\" && $fech1!=\"--\" && $fech2!=\"--\" ){//FECHA INICIAL Y FECHA FINAL\n $where=\"AND CPC_FechaRegistro >= '\" . $fech1 . \"' AND CPC_FechaRegistro <= '\" . $fech2 . \"'\";\n }\n \n \n //------------\n\n \n $wheretdoc= \"\";\n if($tipodocumento !=\"--\")\n $wheretdoc= \" AND CPC_TipoDocumento='\".$tipodocumento.\"' \";\n\n \n\n $sql = \" SELECT com.*,CONCAT(pe.PERSC_Nombre , ' ', pe.PERSC_ApellidoPaterno, ' ', pe.PERSC_ApellidoMaterno) as nombre , MONED_Simbolo from cji_comprobante com\n inner join cji_cliente cl on cl.CLIP_Codigo = com.CLIP_Codigo\n inner join cji_persona pe on pe.PERSP_Codigo = cl.PERSP_Codigo\n inner JOIN cji_moneda m ON m.MONED_Codigo=com.MONED_Codigo \n WHERE CPC_TipoOperacion='V' \".$wheretdoc.$where.\"\n \n UNION \n SELECT com.* ,EMPRC_RazonSocial as nombre ,MONED_Simbolo from cji_comprobante com\n inner join cji_cliente cl on cl.CLIP_Codigo = com.CLIP_Codigo\n inner join cji_empresa es on es.EMPRP_Codigo = cl.EMPRP_Codigo\n inner JOIN cji_moneda m ON m.MONED_Codigo = com.MONED_Codigo \n WHERE CPC_TipoOperacion='V' \".$wheretdoc.$where.\"\";\n\n //echo $sql;\n $query = $this->db->query($sql);\n if ($query->num_rows > 0) {\n foreach ($query->result() as $fila) {\n $data[] = $fila;\n }\n return $data;\n }\n return array();\n }", "function Cuerpo($acceso,$id_contrato)\n\t{\n\t\t//echo \"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"SELECT tarifa_ser FROM vista_tarifa where id_serv='BM00001'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$costo_inst=utf8_decode(trim($row['tarifa_ser']));\n\t\t}\n\t\t//echo \"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\");\n\t\t$acceso->objeto->ejecutarSql(\"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\");\n\t\tif($row=row($acceso)){\n\t\t\n\t\t\t$observacion=utf8_decode(trim($row['observacion']));\n\t\t\t$costo_contrato=utf8_decode(trim($row['costo_contrato']));\n\t\t\t$tipo_cliente=utf8_decode(trim($row['tipo_cliente']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombrecli']));\n\t\t\t$apellidocli=utf8_decode(trim($row['apellido']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombre']));\n\t\t\t$etiqueta=utf8_decode(trim($row['etiqueta']));\n\t\t\t$cedulacli=utf8_decode(trim($row['cedula']));\n\t\t\t\n\t\t\t$fecha=formatofecha(trim($row[\"fecha_contrato\"]));\n\t\t\t$fecha_nac=formatofecha(trim($row[\"fecha_nac\"]));\n\t\t\t\n\t\t\t\n\t\t\t$nro_contrato=trim($row['nro_contrato']);\n\t\t\t$id_contrato=trim($row['id_contrato']);\n\t\t\n\t\t\n\t\t\t$puntos=utf8_decode(trim($row['puntos']));\n\t\t\t$deuda=utf8_decode(trim($row['deuda']));\n\t\t\tif($deuda==\"\"){\n\t\t\t\t$deuda=0;\n\t\t\t}\n\t\t\t\n\t\t\t$deuda=number_format($deuda, 2, ',', '.');\n\t\t\t$nombre_zona=utf8_decode(trim($row['nombre_zona']));\n\t\t\t$nombre_sector=utf8_decode(trim($row['nombre_sector']));\n\t\t\t$nombre_calle=utf8_decode(trim($row['nombre_calle']));\n\t\t\t$numero_casa=utf8_decode(trim($row['numero_casa']));\n\t\t\t$telefono=utf8_decode(trim($row['telefono']));\n\t\t\t$telf_casa=utf8_decode(trim($row['telf_casa']));\n\t\t\t$telf_adic=utf8_decode(trim($row['telf_adic']));\n\t\t\t$email=utf8_decode(trim($row['email']));\n\t\t\t$direc_adicional=utf8_decode(trim($row['direc_adicional']));\n\t\t\t$id_persona=utf8_decode(trim($row['id_persona']));\n\t\t\t$postel=utf8_decode(trim($row['postel']));\n\t\t\t$taps=utf8_decode(trim($row['taps']));\n\t\t\t$pto=utf8_decode(trim($row['pto']));\n\t\t\t$edificio=utf8_decode(trim($row['edificio']));\n\t\t\t$numero_piso=utf8_decode(trim($row['numero_piso']));\n\t\t}\n\t\t$acceso->objeto->ejecutarSql(\"SELECT nombre,apellido FROM persona where id_persona='$id_persona' LIMIT 1 offset 0 \");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$vendedor=utf8_decode(trim($row['nombre'])).\" \".utf8_decode(trim($row['apellido']));\n\t\t\t\n\t\t}\n\n\t\tif($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}\n\t\t\n\t\t\n\t\t$this->Ln();\t\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetXY(10,35);\t\t\n\t\t$this->Cell(195,10,\"Abonado: $nro_contrato\",\"0\",0,\"R\");\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t$this->SetXY(40,50);\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA JURIDICA.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Razón Social.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Actividad.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Telef.\",\"1\",0,\"J\");\n\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Representante Legal\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cargo en la Empresa.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA NATURAL.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: $nombrecli $apellidocli\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: $fecha_nac\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ingreso Mensual: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Deposito en Garantia: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Tipo Vivienda: Propia ___ Alquilado ___ Canon Mensual: ____\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(65,6,\"Vencimiento del Contrato: / / \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DATOS DEL CONYUGUE.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Ingreso Mensual.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DOMICILIO DEL SERVICIO\",\"1\",0,\"C\");\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Apellidos: $apellidocli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Vendedor: $vendedor\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Suscriptor Nº: $nro_contrato\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha: $fecha\",\"1\",0,\"J\");*/\n\t\t\t\t\n\t\n\t\t/*if($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}*/\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I. $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Ocupación: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Grupo Familiar Nº:\",\"1\",0,\"J\");\n\t\tif($fecha_nac=='11/11/1111'){\n\t\t\t$fecha_nac='';\n\t\t}\n\t\t$this->Cell(65,6,\"Fecha de Nacimiento : $fecha_nac\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"DOMICILIO DE SERVICIO\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb o Sector: $nombre_sector\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Calle n°: \",\"1\",0,\"J\");\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Avenida o Calle: $nombre_calle\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Vereda : \",\"1\",0,\"J\");\t\t\n\t\t\n\t\tif($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Piso:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"N° de Casa o Apto: $numero_casa $apto\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Referencia o Zona: $nombre_zona N°Poste:$postel\",\"1\",0,\"J\");\n\t\t//$this->Cell(65,6,\"N° de Poste: $postel\",\"0\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ruta Cuenta: \",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Zona: $nombre_zona\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Manzana: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb.: $nombre_sector\",\"1\",0,\"J\");*/\n\t\t\n\t\t/*if($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Cell(97,6,\"Apto.: $apto\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cod. Postal: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t//Rect( float x, float y, float w, float h [, string style])\n\t\t$this->Cell(98,6,\"Vivienda Alquilada: SI ____ NO ____\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha de Vencimineto de Alquiler: \",\"1\",0,\"J\");\n\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Proveedor de Internet: \",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\");\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"SERVICIOS \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,6,\"CANT.\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"P. UNITARIO \",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"P. TOTAL \",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Instalación Principal\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"1\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Tomas Adicionales\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Cable Coaxial\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Conectores\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Espliter\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\" \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(60,5,\"TOTAL A PAGAR BS\",\"1\",0,\"R\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"FECHA ESTIMADA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"HORA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"TOTAL A\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"$costo_contrato\",\"LRT\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"DE INSTALACION\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"SUGERIDA\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"PAGAR Bs.\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"\",\"LRB\",0,\"C\");*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PROGRAMACIÓN\",\"1\",0,\"C\");\t\t\t\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Descripción.\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Descripción\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Familiar Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Extendido Bs \",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Adulto Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Comercial I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Monto de Contrato: Bs. $costo_inst\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Firma del Abonado:_________________________ \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Puntos Adicionales:_________________________\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Costo Punto Adicional:_______________________\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Tiempo de Instalación:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Total a Cancelar Mensual:\",\"1\",0,\"J\");\n\t\t$this->Cell(30,6,\"Total:\",\"1\",0,\"J\");\n\t\t$this->Cell(35,6,\"Contrato:\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Observaciones.\",\"1\",0,\"J\");\n\t\t\t\t\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"$observacion\",\"1\",0,\"J\");*/\n\t\t\n\t/*\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"RECIBO DE PAGO\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"*EL PRECIO INCLUYE EL IMPUESTO DE LEY\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Efectivo\",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"Cheque\",\"1\",0,\"C\");\n\t\t$this->Cell(65,6,\"Cargo Cta. Cte.\",\"1\",0,\"C\");\n\t\t$this->Cell(60,6,\"Tarjeta de Credito:\",\"1\",0,\"C\");\n\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Bs. $costo_contrato\",\"1\",0,\"L\");\n\t\t$this->Cell(35,6,\"Nº.\",\"1\",0,\"L\");\n\t\t$this->Cell(65,6,\"Cta. Nº Bco.\",\"1\",0,\"L\");\n\t\t$this->Cell(60,6,\"Nombre:\",\"1\",0,\"L\");\n\t\t\n\t\n\t\t\n\t\t\n\t\t$this->Ln(15);\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Nota:\",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"En caso de que el televisor no acepte la señal de todos los canales del cable, es posible que amerite la instalación de un amplificador de sintonia, el cual deberá ser adquirido por el SUSCRIPTOR\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Atención: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"La Empresa. No autoriza el retiro de televisores y/o VHS por el personal de la empresa. El SUSCRIPTOR conoce y acepta las condiciones del contrato del servicio que apacen al dorso del presente\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Aviso: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"Se le informa a todos los suscriptores y publico en general de acuerdo a la Ley Orgánica de Telecomunicaciones, en el Artículo 189, Literal 2: será penado con prisión de uno (1) a cuatro (4) años, el que utilizando equipos o tecnologías de cualquier tipo, proporciones a un tercero el acceso o disfrute en forma fraudulenta o indebida de un serbicio o facilidad de telecomunicaciones \",\"0\",\"J\");\n\t\t\n\t\t\n\t\t\n\t\t$this->Ln(10);\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,5,\"________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"_________________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"__________________________\",\"0\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Firma del Vendedor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Nombre y Apellido del Suscriptor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Firma del Suscriptor\",\"0\",0,\"C\");*/\n\t\t\n\t\t/*$this->Ln(4);\n\t\t\n\t\t$this->SetDrawColor(76,136,206);\n\t\t$this->SetLineWidth(.4);\n\t\t$this->SetFont('times','I',12);\n\t\t$this->SetX(10);\n\t\t$this->MultiCell(195,5,'Av. Perimetral, Centro Comercial Residencial Central. P.B. Local Nº 07. Cúa, Edo. Miranda.\[email protected] / [email protected]',\"TB\",\"C\");*/\n\t\t\n\t\t//$this->clausulas();\n\t\t\n\t\treturn $cad;\n\t}", "public function testCobrarCuotas()\n {\n $id_socio = 11;\n $monto = 200;\n $socioRepo = new SociosRepo();\n $socio = $socioRepo->cuotasSociales($id_socio);\n $cobrarObj = new CobrarCuotasSociales();\n $cobrarObj->cobrar($socio, $monto);\n\n $cobrado = $socio->getCuotasSociales()->sum(function($cuota){\n return $cuota->totalEntradaDeMovimientosDeCuota();\n });\n\n $cuota1 = $socio->getCuotasSociales()->all()[0];\n $cuota2 = $socio->getCuotasSociales()->all()[1];\n\n\n $this->assertEquals($cobrado, $monto);\n $this->assertEquals(100, $cuota1->totalEntradaDeMovimientosDeCuota());\n $this->assertEquals(100, $cuota2->totalEntradaDeMovimientosDeCuota());\n $this->assertEquals('Cobro Total', $cuota1->getEstado());\n $this->assertEquals('Cobro Total', $cuota2->getEstado());\n }", "public function comprobar_conversacion_mensaje_inicial($id_otro_usuario)\n\t{\n\t\t$usuario=$this->session->userdata('id');\n\t\t$id_conversacion=$this->Mensaje_model->comprobar_conversacion($usuario,$id_otro_usuario);\n\t\t\n\t\tif($id_conversacion!=null)\n\t\t{\n\t\t\t$this->mostrar_mensajes($id_otro_usuario);\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->mostrar_mensajes($id_otro_usuario,1);\n\t\t}\n\t}", "function Cargar_alojamientos_condiciones($clave, $filadesde, $buscar_paquete, $buscar_tipo){\r\n\r\n\t\t$conexion = $this ->Conexion;\r\n\t\t$Usuario = $this ->Usuario;\r\n\r\n\t\r\n\t\tif($buscar_tipo != ''){\r\n\t\t\t$paq = \" AND PAQUETE = '\".$buscar_paquete.\"'\";\r\n\t\t\t$CADENA_BUSCAR = \" WHERE CLAVE_CUADRO = '\".$clave.\"' AND TIPO = '\".$buscar_tipo.\"'\";\r\n\t\t\tif($buscar_paquete != ''){\r\n\t\t\t\t$CADENA_BUSCAR .= $paq;\t\r\n\t\t\t}\r\n\t\t}elseif($buscar_paquete != ''){\r\n\t\t\t$CADENA_BUSCAR = \" WHERE CLAVE_CUADRO = '\".$clave.\"' AND PAQUETE = '\".$buscar_paquete.\"'\";\r\n\t\t}else{\r\n\t\t\t$CADENA_BUSCAR = \" WHERE CLAVE_CUADRO = '\".$clave.\"'\"; \r\n \t\t}\r\n\r\n\r\n\t\t$resultado =$conexion->query(\"SELECT paquete, tipo, uso,\r\n\t\tDATE_FORMAT(salida_desde, '%d-%m-%Y') AS salida_desde,\r\n\t\tDATE_FORMAT(salida_hasta, '%d-%m-%Y') AS salida_hasta,\r\n\t\tDATE_FORMAT(reserva_desde, '%d-%m-%Y') AS reserva_desde,\r\n\t\tDATE_FORMAT(reserva_hasta, '%d-%m-%Y') AS reserva_hasta,\r\n\t\tmargen_1, margen_2, maximo, forma_calculo, valor_1, valor_2, acumulable, prioritario, aplicacion, regimen FROM hit_producto_cuadros_alojamientos_condiciones \".$CADENA_BUSCAR.\" ORDER BY paquete, tipo, uso, salida_desde, reserva_desde, margen_1\");\r\n\r\n\t\t/*if ($resultado == FALSE){\r\n\t\t\techo('Error en la consulta: '.$CADENA_BUSCAR);\r\n\t\t\t$resultado->close();\r\n\t\t\t$conexion->close();\r\n\t\t\texit;\r\n\t\t}*/\r\n\r\n\t\t//Guardamos el resultado en una matriz con un numero fijo de registros\r\n\t\t//que controlaremos por una tabla de configuracion de pantallas de usuarios. ESPECIFICO: Solo el nombre del formulario en la query\r\n\t\t$numero_filas =$conexion->query(\"SELECT LINEAS_MODIFICACION FROM hit_usuarios_formularios WHERE FORMULARIO = 'PRODUCTO_CUADROS_ALOJAMIENTOS_CONDICIONES' AND USUARIO = '\".$Usuario.\"'\");\r\n\t\t$Nfilas\t = $numero_filas->fetch_assoc();\t\t\t\t\t\t\t\t\t\t\t //------\r\n\r\n\t\t$folletos_condiciones = array();\r\n\t\tfor ($num_fila = $filadesde-1; $num_fila <= $filadesde + $Nfilas['LINEAS_MODIFICACION']-2; $num_fila++) {\r\n\t\t\t$resultado->data_seek($num_fila);\r\n\t\t\t$fila = $resultado->fetch_assoc();\r\n\t\t\t//Esto es para dejar de cargar lineas en caso de que sea la ultima pagina de la consulta\r\n\t\t\tif($fila['paquete'] == ''){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tarray_push($folletos_condiciones,$fila);\r\n\t\t}\r\n\r\n\t\t//Liberar Memoria usada por la consulta\r\n\t\t$resultado->close();\r\n\t\t$numero_filas->close();\r\n\r\n\t\treturn $folletos_condiciones;\t\t\t\t\t\t\t\t\t\t\t\r\n\t}", "public function buscar_comprobante_compras($anio) {\n //CPC_TipoDocumento => F factura, B boleta\n //CPC_total => total de la FACTURA o BOLETA\n $sql = \" SELECT c.*, m.MONED_Simbolo FROM cji_comprobante c inner JOIN cji_moneda m ON m.MONED_Codigo=c.MONED_Codigo WHERE c.CPC_TipoOperacion='C' AND c.CPC_TipoDocumento='F' AND YEAR(c.CPC_FechaRegistro)=\" . $anio . \"\";\n //echo $sql;\n $query = $this->db->query($sql);\n if ($query->num_rows > 0) {\n foreach ($query->result() as $fila) {\n $data[] = $fila;\n }\n return $data;\n }\n return array();\n }", "function setCobrar($tarjeta1,$tarjeta2,$tarjeta3,$tarjeta4,$tarjeta5,$partida){\n\t$tarjetas=array(0=>$tarjeta1,1=>$tarjeta2,2=>$tarjeta3,3=>$tarjeta4,4=>$tarjeta5);\n\t$tarjeta_cambio;\n\t$veces_entre_foreach=0;\n\t$cantidad=0;\n\t\t\t//pregunta si el usuario saco tarjeta en la ronda, si no saco no puede cambiar ninguna de las que ya tiene(por esto ese if)\n\tif($partida->turno_usuario->getSaqueTarjeta() == 1){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tforeach($tarjetas as $tarjeta){\n\t\t\t\tif($tarjeta == 1){\n\t\t\t\t\tif($partida->turno_usuario->getTarjeta($veces_entre_foreach)!=NULL ){\n\t\t\t\t\t\t\t//solamente puede tomar una tarjeta, porque es cobrar, si hay mas de una seleccionadada cantidad de hace mas de 1 y el cambio no se realiza\n\t\t\t\t\t\tif($cantidad < 1){\n\t\t\t\t\t\t\t\t//digo que la tarjeta que esta en la posicion $avanzar_arreglo del usuario fue seleccionada\n\t\t\t\t\t\t\t$tarjeta_cambio=$partida->turno_usuario->getTarjeta($veces_entre_foreach);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$cantidad++;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\t$veces_entre_foreach++;\n\t\t\t}//foreach($tarjetas as $tarjeta){\n\t\t\t\n\t\t\t\t//si se selecciono una y solo una tarjeta\n\t\t\tif($cantidad == 1){\n\t\t\t\t\t//compruebo si la tarjeta esta en estado de ser cambiada\n\t\t\t\tif($tarjeta_cambio->getEstado() == 0 ){\n\t\t\t\t\t\t\n\t\t\t\t\t$id_pais=$tarjeta_cambio->getIdPais();\n\t\t\t\t\t\t//recorro todos los paises \n\t\t\t\t\tforeach($partida->paises as $pais){\t\n\t\t\t\t\t\t\t//compruebo si id del usuario en turno es igual al del propietario del pais que selecciona el foreach Y aparte compruebo que \n\t\t\t\t\t\t\t//el pais al que hace referencia la tarjeta sea el seleccionado por el foreach\n\t\t\t\t\t\tif($id_pais == $pais->getId() && $partida->turno_usuario->getId() == $pais->getPropietario()->getId() )\t{\n\t\t\t\t\t\t\t\t//cambio el estado de la tarjeta\n\t\t\t\t\t\t\t$tarjeta_cambio->setEstado(1);\n\t\t\t\t\t\t\t\t//le entrego al pais al que hace referencia 2 fichas\n\t\t\t\t\t\t\t$pais->setFichas(2);\n\t\t\t\t\t\t\t\t//reseteo el saco tarjeta, para que en la misma ronda no pueda cobrar dos tarjetas\n\t\t\t\t\t\t\t$partida->turno_usuario->setSaqueTarjetaReset();\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//if($cantidad == 1){\n\t\t\t\n\t}//if($partida->turno_usuario->getSaqueTarjeta() == 1){\t\n}", "public function consumo($id_cirugia) {\n return $this->db\n ->select(format_select(array(\n 'cirugia.idCirugia' => 'id_cirugia',\n 'material_osteosintesis.nombre' => 'nombre',\n 'cirugia_material_osteosintesis.cantidad' => 'cantidad'\n )))\n ->join('cirugia_material_osteosintesis','cirugia_material_osteosintesis.idCirugia = cirugia.idCirugia')\n ->join('material_osteosintesis','material_osteosintesis.idMaterial_Osteosintesis = cirugia_material_osteosintesis.idMaterial_Osteosintesis')\n ->where('cirugia.status = \"1\" AND cirugia.idCirugia = \"'.$id_cirugia.'\"')\n ->get('cirugia')\n ->result_array();\n }", "private function processarNotificacoes() {\n\n /**\n * Objeto assunto e mensagem padrao\n */\n $oMensageriaLicenca = new MensageriaLicenca();\n\n /**\n * Define o sistema para mensageria, pelo nome do municipio\n * - db_config.munic\n */\n $oInstituicao = new Instituicao();\n $oPrefeitura = @$oInstituicao->getDadosPrefeitura();\n $sSistema = 'e-cidade.' . strtolower($oPrefeitura->getMunicipio());\n\n foreach ($this->aLicencas as $oLicenca) {\n\n $iCodigoLicencaEmpreendimento = $oLicenca->getSequencial();\n\n if ($oLicenca->getParecerTecnico()->getTipoLicenca()->getSequencial() != 3) {\n\n $iCodigoLicencaEmpreendimento = $oLicenca->getParecerTecnico()->getCodigoLicencaAnterior();\n if (is_null($iCodigoLicencaEmpreendimento)) {\n $iCodigoLicencaEmpreendimento = $oLicenca->getSequencial();\n }\n }\n\n $oDataVencimento = new DBDate( $oLicenca->getParecerTecnico()->getDataVencimento() );\n\n $aVariaveisLicenca = array(\n\n '[nome_emp]' => $oLicenca->getParecerTecnico()->getEmpreendimento()->getNome(),\n '[codigo_emp]' => $oLicenca->getParecerTecnico()->getEmpreendimento()->getSequencial(),\n '[numero]' => $iCodigoLicencaEmpreendimento,\n '[tipo]' => $oLicenca->getParecerTecnico()->getTipoLicenca()->getDescricao(),\n '[data]' => $oDataVencimento->getDate( DBDate::DATA_PTBR ),\n '[processo]' => $oLicenca->getParecerTecnico()->getProtProcesso()\n );\n\n\n $sAssuntoLicenca = strtr($oMensageriaLicenca->getAssunto(), $aVariaveisLicenca);\n $sMensagemLicenca = strtr($oMensageriaLicenca->getMensagem(), $aVariaveisLicenca);\n $oDBDateAtual = new DBDate(date('Y-m-d'));\n $iDiasVencimento = DBDate::calculaIntervaloEntreDatas(new DBDate($oLicenca->getParecerTecnico()->getDataVencimento()), $oDBDateAtual, 'd');\n $aDestinatarios = array();\n $aUsuarioNotificado = array();\n\n foreach ($this->aCodigoMensageriaLicencaUsuario as $iCodigoMensageriaLicencaUsuario) {\n\n $oMensageriaLicencaUsuario = MensageriaLicencaUsuarioRepository::getPorCodigo($iCodigoMensageriaLicencaUsuario);\n $oUsuarioSistema = $oMensageriaLicencaUsuario->getUsuario();\n\n /**\n * Dias para vencer maior que os dias configurados\n */\n if ($iDiasVencimento > $oMensageriaLicencaUsuario->getDias() ) {\n continue;\n }\n\n /**\n * Salva acordo como ja notificado para usuario e dia\n * mensagerialicencaprocessados\n */\n $this->salvarLicencaProcessado($iCodigoMensageriaLicencaUsuario, $oLicenca->getSequencial());\n\n /**\n * Usuario ja notificado com dia menor que o atual\n */\n if (in_array($oUsuarioSistema->getCodigo(), $aUsuarioNotificado)) {\n continue;\n }\n\n $aDestinatarios[] = array('sLogin' => $oUsuarioSistema->getLogin(), 'sSistema' => $sSistema);\n $aUsuarioNotificado[] = $oUsuarioSistema->getCodigo();\n }\n\n /**\n * Licenca sem usuarios para notificar\n */\n if (empty($aDestinatarios)) {\n continue;\n }\n\n $sAssunto = str_replace('[dias]', $iDiasVencimento, $sAssuntoLicenca);\n $sMensagem = str_replace('[dias]', $iDiasVencimento, $sMensagemLicenca);\n $this->enviarNotificacao($sAssunto, $sMensagem, $sSistema, $aDestinatarios);\n }\n\n return true;\n }", "function grafico_1( $desde, $hasta, $ua ){\n\t$query = \"select nested.id_cliente, noticiasactor.id_actor, nested.tema from \"\n\t. \"( select procesados.* from ( select noticiascliente.* from noticiascliente inner join proceso on noticiascliente.id_noticia = proceso.id_noticia where noticiascliente.id_cliente = \" . $ua . \" ) procesados \"\n\t. \"inner join noticia on noticia.id = procesados.id_noticia where noticia.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59') nested \"\n\t. \"inner join noticiasactor on nested.id_noticia = noticiasactor.id_noticia order by id_actor asc \";\n\t$main = R::getAll($query);\n\t// obtengo el nombre de la unidad de analisis\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\t// obtengo los nombres de todos los actores, para cruzar\n\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[4]) ;\n\t//var_dump($actores_nombres['nombre'] . \" \" . $actores_nombres['apellido']);\n\n\t$tabla = [];\n\t$temas = [];\n\t$i = -1;\n\t// reemplazo actores por nombres y temas\n\tforeach($main as $k=>$v){\n\t\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[ $v['id_actor'] ]);\n\t\t$main[$k]['id_cliente'] = $ua_nombre;\n\t\t// $main[$k]['id_actor'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$main[$k]['id_actor'] = $v['id_actor'];\n\t\t$main[$k]['nombre'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$id_tema = get_string_between($main[$k]['tema'],\"frm_tema_\",\"\\\"\");\n\t\t$tema = R::findOne(\"attr_temas\",\"id LIKE ?\",[$id_tema])['nombre'];\n\t\tif( is_null( $tema ) ) $tema = 'TEMA NO ASIGNADO';\n\t\t$main[$k]['tema'] = $tema;\n\t\t\n\t\t// if(array_search( [ $main[$k]['id_actor'],$tema], $tabla ) ) echo \"repetido\";\n\t\t// chequeo si ya existe alguno con este actor y tema, si es asi, sumo uno\n\t\t// TODO - FIXME : deberia ser mas eficiente, busqueda por dos valores\n\t\t$iter = true;\n\t\tforeach($tabla as $ka=>$va){\n\t\t\t// if($va['actor'] == $main[$k]['id_actor'] && $va['tema'] == $tema){\n\t\t\tif($va['actor'] == $main[$k]['nombre'] && $va['tema'] == $tema){\n\t\t\t\t$tabla[$ka]['cantidad'] += 1;\n\t\t\t\t$iter = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($iter){\n\t\t\t$tabla[ ++$i ] = [ \n\t\t\t\t'unidad_analisis' => $ua_nombre,\n\t\t\t\t'actor' => $main[$k]['nombre'],\n\t\t\t\t'id_actor' => $main[$k]['id_actor'],\n\t\t\t\t'tema' => $tema,\n\t\t\t\t'cantidad' => 1\n\t\t\t\t];\n\t\t\t}\n\t\t// agrego los temas que van apareciendo en la tabla temas\n\t\t// UTIL para poder hacer el CRC32 por la cantidad de colores\n\t\tif(!in_array($tema,$temas)) $temas[] = $tema;\n\t}\n\t// la agrupacion de repetidos es por aca, por que repite y cuenta temas de igual id\n\n\t// en el grafico, los hijos, son arreglos de objetos, hago una conversion tabla -> objeto\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Actores';\n\t$objeto->rank = 0;\n\t$objeto->weight = 1;\n\t$objeto->id = 1;\n\t$objeto->children = [];\n\tforeach($tabla as $k=>$v){\n\t\t// me fijo si el actor existe, ineficiente pero por ahora\n\t\t$NoExiste = true;\n\t\tforeach($objeto->children as $ka=>$va){\n\t\t\t// si existe actor, le inserto el tema\n\t\t\tif($va->name == $v['actor']){\n\t\t\t\t$in = new StdClass();\n\t\t\t\t// $in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$in->name = \"\";\n\t\t\t\t$in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t\t$in->id = $k;\n\t\t\t\t$in->children = [];\n\t\t\t\t$objeto->children[$ka]->children[] = $in;\n\t\t\t\t$objeto->children[$ka]->cantidad_temas = count($objeto->children[$ka]->children);\t\n\t\t\t\t$objeto->children[$ka]->rank = count($objeto->children[$ka]->children);\n\t\t\t\t$NoExiste = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($NoExiste){\n\t\t\t$in = new StdClass();\n\t\t\t$in->name = $v['actor'];\n\t\t\t$in->rank = 1;\n\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t$in->id = $k;\n\t\t\t//$in->id = $v['id_actor'];\n\t\t\t$in->id_actor = $v['id_actor'];\n\t\t\t\t$t_in = new StdClass();\n\t\t\t\t// $t_in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$t_in-> name = \"\";\n\t\t\t\t$t_in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$t_in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$t_in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$t_in->weight = 0; // lo asigna JS\n\t\t\t\t$t_in->id = $k;\n\t\t\t\t$t_in->children = [];\n\t\t\t$in->children = [ $t_in ];\n\t\t\t$objeto->children[] = $in;\n\t\t}\n\t}\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto,\n\t\t'temas' => $temas\n\t\t];\n}", "function cupondebienvenida($link,$socio,$email,$telefono,$nombres,$apellidos,$archivojson) {\n\t$query = \"select * from proveedores where id=\".$_POST['id_proveedor'];\n\t// $query = \"select * from proveedores where id=1\";\n\t$result = mysqli_query($link, $query);\n\tif ($row = mysqli_fetch_array($result)) {\n\t\t$nombreproveedor=$row[\"nombre\"];\n\t}\n\n\t// Buscar premio activo\n\t$query = \"select * from premios where id_proveedor=\".$_POST['id_proveedor'] . \" and clasepremio='bienvenida' and activo=1\";\n\t// $query = \"select * from premios where id_proveedor=1 and activo=1\";\n\t$result = mysqli_query($link, $query);\n\tif ($row = mysqli_fetch_array($result)) {\n\t\t$id_premio=$row[\"id\"];\n\t\t$tipopremio=$row[\"tipopremio\"];\n\t\t$montopremio=$row[\"montopremio\"];\n\t\t$descpremio=$row[\"descpremio\"];\n\t\t$diasvalidez=$row[\"diasvalidez\"];\n\t}\n\n\t// Asignar el número de cupón\n\t$query = \"select max(cupon) as ultcupon from cupones\";\n\t$result = mysqli_query($link, $query);\n\tif ($row = mysqli_fetch_array($result)) {\n\t\tif (strlen($row[\"ultcupon\"])==0) {\n\t\t\t$numcupon = asignacodigo('0000000000');\n\t\t\t$cuponlargo = asignacodigolargo2($numcupon,$email,$nombres,$apellidos,$telefono);\n\t\t} else {\n\t\t\t$numcupon = asignacodigo($row[\"ultcupon\"]);\n\t\t\t$cuponlargo = asignacodigolargo2($numcupon,$email,$nombres,$apellidos,$telefono);\n\t\t}\n\t}\n\n\t// Verificar si ya existe el cupón, si existe responder, si no, agregar y responder \n\t$query = \"select * from cupones where id_socio=\".$_POST['id_socio'].\" and factura='00000'\";\n\t// $query = \"select * from cupones where id_proveedor=1 and factura='8888888'\";\n\t$result = mysqli_query($link, $query);\n\tif ($row = mysqli_fetch_array($result)) {\n\t\t$respuesta = '{\"exito\":\"NO\",\"mensaje\":'. mensajes($archivojson,\"cuponyaregistrado\") .',\"cupon\":\"0\"}';\n\t} else {\n\t\t$fechacupon = date ('Y-m-d');\n\t\t$fechavencimiento = strtotime('+'.$diasvalidez.' days', strtotime ($fechacupon));\n\t\t$fechavencimiento = date ('Y-m-d' , $fechavencimiento);\n\t\t$fechavencstr = substr($fechavencimiento,8,2).'/'.substr($fechavencimiento,5,2).'/'.substr($fechavencimiento,0,4);\n\n\t\t/*\n\t\tHash para insertar en el blockchain\n\t\t-----------------------------------\n\t\tEl hash se va a armar con los siguientes datos:\n\t\t- Cupon\n\t\t- Proveedor\n\t\t- Socio\n\t\t- Tipo premio\n\t\t- Monto premio\n\t\t- Descripción premio\n\t\t- Status cupón\n\t\t*/\n\t\t$hash = hash(\"sha256\",$numcupon.$_POST['id_proveedor']. $id.$tipopremio.$montopremio.$descpremio.\"Generado\");\n\n\t\t$query = \"INSERT INTO cupones (cupon,cuponlargo,id_proveedor,id_socio,status,factura,monto,id_premio,tipopremio,montopremio,descpremio,socio,email,telefono,nombres,apellidos,fechacupon,fechavencimiento,fechacanje,facturacanje,montocanje,hash) VALUES ('\".$numcupon.\"','\".$cuponlargo.\"',\" . $_POST['id_proveedor'] . \",\" . $_POST['id_socio'] . \",'Generado','00000',0,\".$id_premio.\",'\".$tipopremio.\"',\".$montopremio.\",'Bienvenida',\" . $socio . \",'\" . $email . \"','\" . $telefono . \"','\" . $nombres . \"','\" . $apellidos . \"','\".$fechacupon.\"','\".$fechavencimiento.\"','0000-00-00','',0,'\".$hash.\"')\";\n\t\t// echo $query;\n\n\t\tif ($result = mysqli_query($link, $query)) {\n\n\t\t\t$correo = $email;\n\n\t\t\t$mensaje = utf8_decode('Hola '.trim($nombres).',<br/><br/>');\n\t\t\t$mensaje .= utf8_decode('¡Bienvenido a Cash-Flag, tu comunidad de beneficios!<br/><br/>');\n\n\t\t\t$mensaje .= utf8_decode('Queremos darte un obsequio de bienvenida, ');\n\t\t\t$mensaje .= utf8_decode('la próxima que visites <b>'.trim($nombreproveedor).'</b> podrás reclamar el siguiente premio:'.'<br/><br/>');\n\t\t\tswitch ($tipopremio) {\n\t\t\t\tcase 'porcentaje':\n\t\t\t\t\t$mensaje .= utf8_decode('<h3 style=\"text-align:center;\"><b>'.number_format($montopremio,2,',','.').'% de descuento sobre el monto total de tu factura.</b></h3>');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'monto':\n\t\t\t\t\t$mensaje .= utf8_decode('<h3 style=\"text-align:center;\"><b>'.number_format($montopremio,2,',','.').' Bs. de descuento en sobre el monto total de tu factura.</b></h3>');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'producto':\n\t\t\t\t\t$mensaje .= utf8_decode('<h3 style=\"text-align:center;\"><b>'.trim($descpremio).'.</b></h3>');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$mensaje .= utf8_decode('<h3 style=\"text-align:center;\"><b>Premio especial sorpresa.</b></h3>');\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$mensaje .= utf8_decode('Este premio podrás reclamarlo cualquier día, siempre que sea antes del <b>'.$fechavencstr.'</b>.<br/><br/>');\n\t\t\t$mensaje .= utf8_decode('Sólo debes presentar este correo electrónico o indicar el siguiente código:'.'<br/>');\n\t\t\t$mensaje .= utf8_decode('<h2 style=\"text-align:center\"><b>'.$cuponlargo.'</b></h2>');\n\n\t\t\t// codigo de barras\n\t\t\t$mensaje .= '<p style=\"text-align:center;\">';\n\t\t\t\t$mensaje .= '<img src=\"https://www.cash-flag.com/php/barcode.php?';\n\t\t\t\t$mensaje .= 'text='.$cuponlargo;\n\t\t\t\t$mensaje .= '&size=50';\n\t\t\t\t$mensaje .= '&orientation=horizontal';\n\t\t\t\t$mensaje .= '&codetype=Code39';\n\t\t\t\t$mensaje .= '&print=true';\n\t\t\t\t$mensaje .= '&sizefactor=1\" />';\n\t\t\t$mensaje .= '</p>';\n\n\t\t\t// código qr\n\t\t\t$mensaje .= utf8_decode('<p style=\"text-align:center;\">Para canjear desde el móvil:</p>');\n\n\t//\t\t$dir = 'https://www.cash-flag.com/php/temp/';\n\t//\t\tif(!file_exists($dir)) mkdir($dir);\n\t\t\t$ruta = 'https://www.cash-flag.com/php/';\n\t\t\t$dir = 'qr/';\n\t\t\tif(!file_exists($dir)) mkdir($dir);\n\n\t//\t\t$filename = $dir.'test.png';\n\t\t\t$tamanio = 5;\n\t\t\t$level = 'H';\n\t\t\t$frameSize = 1;\n\t//\t\t$contenido = $cuponlargo;\n\t//\t\t$contenido = '{\"id_proveedor\":'.$_POST['id_proveedor'].',\"cupon\":\"'.$cuponlargo.'\"}';\n\t\t\t$contenido = 'https://www.cash-flag.com/canje/canje.html?cJson={\"id_proveedor\":'.$_POST['id_proveedor'].',\"cupon\":\"'.$cuponlargo.'\"}';\n\n\t//\t\tQRcode::png($contenido, $filename, $level, $tamanio, $frameSize);\n\t\t\tQRcode::png($contenido,$dir.$numcupon.'.png', $level, $tamanio, $frameSize);\n\t\t\t$mensaje .= '<p style=\"text-align:center;\">';\n\t\t\t\t$mensaje .= '<img src=\"'.$ruta.$dir.$numcupon.'.png\" height=\"200\" width=\"200\" />';\n\t\t\t$mensaje .= '</p>';\n\t\t\t// Hasta aqui\n\t\t\t$mensaje .= '<p style=\"text-align:center;\">'.$hash.'</p>';\n\n\t\t\t$mensaje .= utf8_decode('¡Te esperamos!'.'<br/><br/>');\n\n\t\t\t$mensaje .= utf8_decode('Atentamente'.'<br/><br/>');\n\t\t\t$mensaje .= utf8_decode('Cash-Flag'.'<br/><br/>');\n\n\t\t\t$mensaje .= utf8_decode('<b>Nota:</b> Esta cuenta no es monitoreada, por favor no respondas este email, si deseas comunicarte con tu club escribe a: <b><a href=\"mailto:[email protected]\">[email protected]</a></b>'.'<br/><br/>');\n\n\t\t\t// $mensaje .= $numcupon;\n\n\t\t\t$asunto = utf8_decode('Hola '.trim($nombres).', recibe este obsequio de bienvenida a Cash-Flag, tu comunidad de beneficios.');\n\t\t\t$cabeceras = 'Content-type: text/html;';\n\t\t\tif ($_SERVER[\"HTTP_HOST\"]!='localhost') {\n\t\t\t\tmail($correo,$asunto,$mensaje,$cabeceras);\n\t\t\t}\n\n\t\t\t$a = fopen('log.html','w+');\n\t\t\tfwrite($a,$asunto);\n\t\t\tfwrite($a,'-');\n\t\t\tfwrite($a,$mensaje);\n\n\t\t\t// $respuesta = '{\"exito\":\"SI\",\"mensaje\":' . mensajes($archivojson,\"exitoregistrocupon\") . ',\"cupon\":\"'.$numcupon.'\"}';\n\t//\t\t$respuesta = '{\"exito\":\"SI\",\"mensaje\":' . mensajes($archivojson,\"exitoregistrocupon\") . ',\"cupon\":\"'.$numcupon.'\",';\n\t//\t\t$respuesta .= '\"contenido\":'.$contenido.',\"filename\":\"'.$filename.'\"}';\n\n\t\t// } else {\n\t\t\t// $respuesta = '{\"exito\":\"NO\",\"mensaje\":' . mensajes($archivojson,\"fallaregistrocupon\") . ',\"cupon\":\"0\"}';\n\t\t}\n\t}\n\t// echo $respuesta;\n}", "function RellenarIndice()\r\n {\r\n $this->AddPage();\r\n\r\n $this->Imprimir('2. Revisión y Análisis de las siguientes interrupciones:', 20, 10);\r\n\r\n $cont_causa500 = 1;\r\n $cont_imp = 1;\r\n $cont_pro = 1;\r\n\r\n foreach ($this->eventos as $evento)\r\n {\r\n if (Doctrine_Core::getTable('SAF_EVENTO_CONVOCATORIA')->getEventoConvocatoria($evento, $this->convocatoria)->getStatus() == 'analizado')\r\n {\r\n $this->ImprimirSubtituloIndice($evento, $cont_causa500, $cont_imp, $cont_pro);\r\n\r\n $fecha_evento = strftime(\"%A, %d/%m/%Y\", strtotime($evento->getFHoraIni()));\r\n $text = \"RI. \" . $evento->getCEventoD() . \" - Circuito \" . $evento->getCircuito() . \". \" . $fecha_evento . '. MVAmin: ' . $evento->getMvaMin();\r\n $this->Imprimir($text, 40, 10);\r\n }\r\n }\r\n }", "function creaChampionnatFantome($id_tournoi, $tab_c, Tournoi $tournoi, Concurrent $concurrent)\n{ \n $manager_concurrent = connect('Concurrent');\n //gestion des fantomes\n if($tournoi->getNbEquipe()!=4 ||\n $tournoi->getNbEquipe()!=6 ||\n $tournoi->getNbEquipe()!=8 ||\n $tournoi->getNbEquipe()!=12 ||\n $tournoi->getNbEquipe()!=16 ||\n $tournoi->getNbEquipe()!=24 ||\n $tournoi->getNbEquipe()!=32)\n {\n if($tournoi->getNbEquipe()<=4){$nb_fantome= 4-$tournoi->getNbEquipe();}\n else if($tournoi->getNbEquipe()<=6){$nb_fantome= 6-$tournoi->getNbEquipe();}\n else if($tournoi->getNbEquipe()<=8){$nb_fantome= 8-$tournoi->getNbEquipe();}\n else if($tournoi->getNbEquipe()<=12){$nb_fantome= 12-$tournoi->getNbEquipe();}\n else if($tournoi->getNbEquipe()<=16){$nb_fantome= 16-$tournoi->getNbEquipe();}\n else if($tournoi->getNbEquipe()<=24){$nb_fantome= 24-$tournoi->getNbEquipe();}\n else if($tournoi->getNbEquipe()<=32){$nb_fantome= 32-$tournoi->getNbEquipe();}\n\n for($i=1; $i<=$nb_fantome; $i++)\n {\n $concurrent->setIdTournoi($id_tournoi);\n $concurrent->setNomConcurrent(\"~~free win~~\");\n $concurrent->setNbConcurrent(1);\n $tab_fantome[] = $concurrent->getNomConcurrent();\n $manager_concurrent->addConcurrent($concurrent); \n }\n \n $nb_equipe_total = $tournoi->getNbEquipe()+$nb_fantome;\n //fusion des 2 tableaux fantome et real concurrent\n $tab_co = array_reverse($tab_c);\n $x=0;\n $espace_fantome=0;\n foreach($tab_co as $value_concurrent)\n {\n \n if($x<$nb_fantome)\n { \n if((($espace_fantome%3)==0) && (($nb_equipe_total==6) || ($nb_equipe_total==12) || ($nb_equipe_total==24)))\n {\n $tab_con[] = $tab_fantome[$x];\n $x++;\n }\n else if((($espace_fantome%3)==0) && (($nb_equipe_total==4) || ($nb_equipe_total==8) || ($nb_equipe_total==16) || ($nb_equipe_total==32)))\n {\n $tab_con[] = $tab_fantome[$x]; \n $x++;\n } \n }\n $tab_con[] = $value_concurrent;\n $espace_fantome++;\n }\n $tab_concurrent = array_reverse($tab_con);\n }\n $tab_fantome_championnat = array('nb_fantome' => $nb_fantome, 'tab_concurrent' => $tab_concurrent);\n \n return $tab_fantome_championnat;\n}", "public function interesadosPorCiclo(Request $request)\n {\n\n //Sacar año y ciclo del request\n $year = $request->year;\n $ciclo = $request->ciclo;\n\n $interesados = array();\n\n $respuestas = DB::table('respuestas')\n ->join('users', 'users.id', '=', 'respuestas.user_id')\n ->join('preguntas', 'preguntas.id', '=', 'respuestas.pregunta_id')\n ->select('users.*', 'respuestas.respuesta')\n ->where('preguntas.ciclo', $ciclo)\n ->where('respuestas.year', $year)\n ->orderBy('users.id')\n ->get();\n\n //Ahora tenemos que ir sumando las respuestas por usuario\n $usuario = \"\";\n $total = 0;\n foreach($respuestas as $interesado) {\n if ($usuario == $interesado->email) {\n switch ($interesado->respuesta) {\n case 'A':\n $valor=2;\n break;\n case 'B':\n $valor=1;\n break;\n case 'C':\n $valor=-1;\n break;\n case 'D':\n $valor=0;\n break;\n \n default:\n # code...\n break;\n }\n\n $total += $valor;\n\n } else { //Si el usuario no coincide cambiamos y empezamos a calcular\n //Vemos el total del usuario anterior, si es mayor que 10 está interesado\n if ($total > 10) {\n array_push($interesados, $interesado->name.\" \".$interesado->surname.\", \".\n $usuario.\", \".$interesado->curso); \n }\n //echo \"FINAL- \".$usuario.\" - \".$total.\"<br>\";\n\n //Cambiamos de usuario\n $total = 0;\n $usuario = $interesado->email;\n }\n\n //echo $interesado->email.\" - \".$interesado->respuesta.\" total: \".$total.\"<br>\";\n }\n\n //Vemos el total del usuario anterior, si es mayor que 10 está interesado\n if ($total > 10) {\n array_push($interesados, $interesado->name.\", \".$usuario.\", \".$interesado->curso); \n }\n //echo \"FINAL- \".$usuario.\" - \".$total.\"<br>\";\n\n //Pintamos la vista preguntas con las preguntas del grado medio\n return view('interesados', [ 'interesados' => $interesados, \n 'ciclo' => $ciclo,\n 'year' => $year\n ]);\n }", "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 Cuerpo($acceso,$id_fam,$id_unidad,$impresion)\n\t{\n\t\t$this->SetFont('Arial','',8);\n\t\t\n\t\tif($id_fam!='' && $id_fam!=\"0\" ){\n\t\t\t$bus=$bus.\" and id_fam='$id_fam'\";\n\t\t\t\n\t\t\t$acceso->objeto->ejecutarSql(\"SELECT nombre_fam FROM familia where id_fam='$id_fam'\");\n\t\t\t$row=row($acceso);\n\t\t\t$this->SetX(15);\n\t\t\t$this->Cell(50,6,strtoupper(_(\"familia\")).\": \".utf8_decode(trim($row[\"nombre_fam\"])),\"0\",0,\"J\",$fill);\n\t\t}\n\n\t\tif($id_unidad!='' && $id_unidad!=\"0\" ){\n\t\t\t$bus=$bus.\" and id_unidad='$id_unidad'\";\n\t\t\t\n\t\t\t$acceso->objeto->ejecutarSql(\"SELECT nombre_unidad FROM unidad_medida where id_unidad='$id_unidad'\");\n\t\t\t$row=row($acceso);\n\t\t\t$this->Cell(50,6,strtoupper(_(\"unidad medida\")).\": \".utf8_decode(trim($row[\"nombre_unidad\"])),\"0\",0,\"J\",$fill);\n\t\t}\n\n\t\tif($impresion!='' && $impresion!=\"0\" ){\n\t\t\t$bus=$bus.\" and impresion='$impresion'\";\n\t\t\t$val=array(\"T\"=>\"SI\",\"F\"=>\"NO\");\n\t\t\t$this->Cell(50,6,strtoupper(_(\"para impresion\")).\": \".$val[\"$impresion\"],\"0\",0,\"J\",$fill);\n\t\t}\n\n\t\t\n\t\t$w=$this->TituloCampos();\n\t\t$bus=\" where id_m <>'' \";\n\n\t\tif($id_fam!='' && $id_fam!=\"0\" ){\n\t\t\t$bus=$bus.\" and id_fam='$id_fam'\";\n\t\t}\n\t\tif($id_unidad!='' && $id_unidad!=\"0\" ){\n\t\t\t$bus=$bus.\" and id_unidad='$id_unidad'\";\n\t\t}\n\t\tif($impresion!='' && $impresion!=\"0\" ){\n\t\t\t$bus=$bus.\" and impresion='$impresion'\";\n\t\t}\n\t\t$acceso->objeto->ejecutarSql(\"SELECT numero_mat,nombre_mat,nombre_fam,nombre_unidad FROM vista_matpadre $bus\");\n\t\t\n\t\t$this->SetFont('Arial','',9);\n\t\t$cont=1;\n\t\t$this->SetFillColor(249,249,249);\n\t\t$this->SetTextColor(0);\n\t\t\n\t\twhile ($row=row($acceso))\n\t\t{\n\t\t\t$this->SetX(15);\n\t\t\t/*$this->Cell($w[0],6,$cont,\"L\",0,\"C\",$fill);*/\n\t\t\t$this->Cell($w[0],6,utf8_decode(trim($row[\"numero_mat\"])),\"L\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[1],6,utf8_decode(trim($row[\"nombre_mat\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[2],6,utf8_decode(trim($row[\"nombre_fam\"])),\"0\",0,\"J\",$fill);\n\t\t\t$this->Cell($w[3],6,utf8_decode(trim($row[\"nombre_unidad\"])),\"R\",0,\"J\",$fill);\n\n\t\t\t$this->Ln();\n\t\t\t$fill=!$fill;\n\t\t\t$cont++;\n\t\t}\n\t\t$this->SetX(15);\n\t\t$this->Cell(array_sum($w),5,'','T');\n\t}", "function calculaAlunosMatriculadosEscola($aEscolas, $aEnsinos, $oDtInicio, $oDtFim) {\n\n foreach ($aEscolas as $oEscola) {\n\n $oEscola->aAlunosEtapa = array();\n $oEscola->iTotalEscola = 0;\n foreach ($aEnsinos as $oEnsino) {\n\n $lCorrecaoFluxo = false;\n if (isset($oEnsino->lCorrecaoFluxo) && $oEnsino->lCorrecaoFluxo) {\n $lCorrecaoFluxo = $oEnsino->lCorrecaoFluxo;\n }\n $iTotalEnsino = 0;\n foreach ($oEnsino->aEtapas as $oEtapa) {\n\n if (is_null($oEtapa->iEtapa)) {\n continue;\n }\n\n $sHash = \"{$oEnsino->iEnsino}#{$oEtapa->iEtapa}\";\n $iTotalAlunosEtapa = buscaAlunosMatriculados($oEscola->codigo, $oEtapa->iEtapa, $oDtInicio, $oDtFim, $lCorrecaoFluxo);\n $iTotalEnsino += $iTotalAlunosEtapa;\n $oEtapa->iTotalEtapa += $iTotalAlunosEtapa;\n\n $oEscola->aAlunosEtapa[$sHash] = $iTotalAlunosEtapa;\n }\n $sHash = \"{$oEnsino->iEnsino}#T\";\n $oEscola->aAlunosEtapa[$sHash] = $iTotalEnsino;\n $oEnsino->iTotalEnsino += $iTotalEnsino;\n $oEscola->iTotalEscola += $iTotalEnsino;\n $oEnsino->aEtapas[count($oEnsino->aEtapas) - 1]->iTotalEtapa += $iTotalEnsino;\n }\n }\n\n}", "public function AnularCobranza(Cobranza $co)\n {\n \t$detalleDePago\t=\t$co->GetDetalleDePago();\n \t \n \tforeach ($detalleDePago as $d)\n \t{\n \t\t$PagoTipoId\t=\t$d->PagoTipoId;\n \n \t\t// si pago con cheque tercero en cartera, cambiar estado\n \t\tif($PagoTipoId == 4)\n \t\t{\n \t\t\t$Cheque\t\t= Doctrine::getTable('Cheque')->FindOneById($d->ChequeId);\n \t\t\tif(!is_object($Cheque))\n \t\t\t\tthrow new Exception('No existe el cheque para anular');\n \n \t\t\t$Cheque->Estado\t=\t'Anulado';\n \t\t\t$Cheque->save();\n \t\t}\n \n \t\t// si pague con retencion, al anular cobranza, no queda mas para utilizar\n \t\tif(($PagoTipoId == 6)||($PagoTipoId ==7)||($PagoTipoId == 8)\n \t\t\t\t||($PagoTipoId == 9)||($PagoTipoId == 10)||($PagoTipoId == 11))\n \t\t{\n \t\t\t \n \t\t\t// no hacer nada porque no son mas mostradas por tener fecha de anulacion\n \t\t}\n \n \t\t// si es efectivo, decrementar saldo en efectivo\n \t\tif($PagoTipoId == 2)\n \t\t{\n \t\t\t$Configuracion = Doctrine::GetTable ( 'Configuracion' )->FindOneByNombre('SaldoEfectivo');\n \t\t\t$Configuracion->Valor -=\t$d->Importe;\n \t\t\t$Configuracion->save();\n \n \t\t\t$data['Detalle'] = 'CO #' . $co->Id . ' anulada';\n \t\t\t$data['Importe']\t=\t$co->Importe;\n \t\t\t$data['Saldo']\t=\t$Configuracion->Valor;\n \t\t\t$data['Haber']\t=\t$data['Importe'];\n \n \t\t\t$g = new Classes_GestionEconomicaManager();\n \t\t\t$g->AddHistorialEfectivo($data);\n \t\t}\n\n \t\t// si es un tipo de pago: transferencia (id = 13),\n \t\t// - actualizar saldo de la cuenta de banco asociada\n \t\tif($PagoTipoId == 13)\n \t\t{\n \t\t\tlist($banco, $cuenta)\t=\texplode('-', $d->Detalle);\n \t\t\t\n \t\t\tif(isset($cuenta) && is_numeric($cuenta))\n \t\t\t{\n \t\t\t\t$banco\t\t= Doctrine::getTable('Banco')->FindOneByNumeroDeCuenta($cuenta);\n \t\t\t\tif(!is_object($banco))\n \t\t\t\t\tthrow new Exception('El banco ingresado no existe');\n \n \t\t\t\t$ctacte\t\t=\tnew Classes_CuentaCorrienteManager();\n \t\t\t\t$data['Haber']\t=\t$d->Importe;\n \t\t\t\t$data['Saldo']\t=\t$banco->SaldoCuenta;\n \t\t\t\t$data['BancoId']\t=\t$banco->Id;\n \t\t\t\t$data['Detalle']\t=\t'Tranferencia bancaria de CO '.$co->Numero. ' anulada';\n \t\t\t\t$ctacte->AddConceptoBancoCuentaCorriente($data);\n \t\t\t}\n \t\t}\n \n \t}\n }", "function agrega_emergencia_ctraslado (\n $_fecha,$_telefono,\n $_plan,$_horallam,\n $_socio,$_nombre,\n $_tiposocio,$_edad,$_sexo,\n $_identificacion,$_documento,\n $_calle,$_numero,\n $_piso,$_depto,\n $_casa,$_monoblok,\n $_barrio,$_entre1,\n $_entre2,$_localidad,\n $_referencia,$_zona,\n $_motivo1,\n $_color,\n $_observa1,$_observa2,\n $_opedesp ,\n\t\t\t\t\t\t\t$_nosocio1 , $_noedad1 , $_nosexo1, $_noiden1 , $_nodocum1 ,\n\t\t\t\t\t\t\t$_nosocio2 , $_noedad2 , $_nosexo2, $_noiden2 , $_nodocum2 ,\n\t\t\t\t\t\t\t$_nosocio3 , $_noedad3 , $_nosexo3, $_noiden3 , $_nodocum3 ,\n\t\t\t\t\t\t\t$_nosocio4 , $_noedad4 , $_nosexo4, $_noiden4 , $_nodocum4 ,\n\t\t\t\t\t\t\t$_nosocio5 , $_noedad5 , $_nosexo5, $_noiden5 , $_nodocum5 ,\n $_bandera_nosocio1 ,$_bandera_nosocio2 ,$_bandera_nosocio3 ,$_bandera_nosocio4 ,\n\t\t\t\t\t\t\t$_bandera_nosocio5 \n )\n{\n $moti_explode ['0'] = substr($_motivo1, 0, 1);\n $moti_explode ['1'] = substr($_motivo1, 1, 2);\n\n // CALCULO DE FECHA Y DIA EN QUE SE MUESTRA EL TRASLADO EN PANTALLA\n $fecha_aux = explode (\".\" ,$_fecha );\n $hora_aux = explode (\":\" ,$_horallam);\n\n $_dia_tr =$fecha_aux[2];\n $_mes_tr =$fecha_aux[1];\n $_anio_tr =$fecha_aux[0];\n $_hora_tr =$hora_aux[0];\n $_min_tr =$hora_aux[1];\n $_param_tr =12; // parametro para mostrar en pantalla\n \n $traslado_aux = restaTimestamp ($_dia_tr , $_mes_tr, $_anio_tr , $_hora_tr , $_min_tr , $_param_tr);\n //***********************************************************\n $_plan = $_plan + 0;\n $insert_atencion = '\n insert into atenciones_temp\n (fecha,telefono,plan,\n horallam,socio,\n nombre,tiposocio,\n edad,sexo,\n identificacion,documento,\n calle,numero,\n piso,depto,casa,\n monoblok,barrio,\n entre1,entre2,\n localidad,referencia,\n zona,motivo1,\n motivo2,\n color,observa1,\n observa2,operec,traslado_aux ,fechallam)\n\n values\n\n (\n \"'.$_fecha.'\" , \"'.$_telefono.'\" , \"'.$_plan.'\" ,\n \"'.$_horallam.'\",\"'.$_socio.'\",\n \"'.utf8_decode($_nombre).'\",\"'.$_tiposocio.'\",\n \"'.$_edad.'\",\"'.$_sexo.'\",\n \"'.utf8_decode($_identificacion).'\",\"'.$_documento.'\",\n \"'.utf8_decode($_calle).'\",\"'.utf8_decode($_numero).'\",\n \"'.utf8_decode($_piso).'\",\"'.utf8_decode($_depto).'\",\n \"'.utf8_decode($_casa).'\",\"'.utf8_decode($_monoblok).'\",\n \"'.utf8_decode($_barrio).'\",\"'.utf8_decode($_entre1).'\",\n \"'.utf8_decode($_entre2).'\",\"'.utf8_decode($_localidad).'\",\n \"'.utf8_decode($_referencia).'\",\"'.$_zona.'\",\n '.$moti_explode[0].',\n '.$moti_explode[1].','.$_color.',\n \"'.utf8_decode($_observa1).'\",\"'.utf8_decode($_observa2).'\",\n \"'.utf8_decode($_opedesp).'\", \"'.$traslado_aux.'\" , \"'.$_fecha.'\"\n )\n ';\n\n // insert de la emergencia en atenciones temp\n global $G_legajo , $parametros_js;\n $result = mysql_query($insert_atencion);\n if (!$result) {\n $boton = '<input type=\"button\" value=\"Error! modificar y presionar nuevamente\"\n\t\t\t onclick=\" check_emergencia(\n\t\t\t document.formulario.muestra_fecha.value,document.formulario.telefono.value,\n\t\t\t document.formulario.i_busca_plan.value,document.formulario.hora.value,\n\t\t\t document.formulario.td_padron_idpadron.value,document.formulario.td_padron_nombre.value,\n\t\t\t document.formulario.td_padron_tiposocio.value,document.formulario.td_padron_edad.value,\n\t\t\t document.formulario.td_padron_sexo.value,document.formulario.td_padron_identi.value,\n\t\t\t document.formulario.td_padron_docum.value,document.formulario.td_padron_calle.value,\n\t\t\t document.formulario.td_padron_nro.value,document.formulario.td_padron_piso.value,\n\t\t\t document.formulario.td_padron_depto.value,document.formulario.td_padron_casa.value,\n\t\t\t document.formulario.td_padron_mon.value,document.formulario.td_padron_barrio.value,\n\t\t\t document.formulario.td_padron_entre1.value,document.formulario.td_padron_entre2.value,\n\t\t\t document.formulario.td_padron_localidad.value,document.formulario.referencia.value,\n\t\t\t document.formulario.s_lista_zonas.value,document.formulario.i_busca_motivos.value,\n\t\t\t document.formulario.s_lista_colores.value,document.formulario.obs1.value,\n\t\t\t document.formulario.obs2.value,'.$G_legajo.' ,\n\t\t\t document.formulario.check_traslado.value , document.formulario.dia_traslado.value ,\n\t\t\t document.formulario.mes_traslado.value , document.formulario.anio_traslado.value ,\n\t\t\t document.formulario.hora_traslado.value , document.formulario.minuto_traslado.value ,\n\t\t\t\t\t '.$parametros_js.' \n \t );\"/> ';\n \n }else \n {\n $boton = '<input type=\"button\" value=\"CERRAR CON EXITO\" onclick=\"window.close();\"/>';\n \n\n\n\t // recupero id para hacer altas de clientes no apadronados\n\t $consulta_id = mysql_query ('select id from atenciones_temp\n\t where fecha = \"'.$_fecha.'\" and plan = \"'.$_plan.'\"\n\t and horallam = \"'.$_horallam.'\" and nombre = \"'.$_nombre.'\"\n\t and tiposocio = \"'.$_tiposocio.'\" and motivo1 = '.$moti_explode[0].'\n\t and motivo2 = '.$moti_explode[1]);\n\n\n\t $fetch_idatencion=mysql_fetch_array($consulta_id);\n\n\n\t\tif ($_bandera_nosocio1 == 1) { $insert_nosocio1 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio1.'\" , \"'.$_noedad1.'\" , \"'.$_nosexo1.'\" , \"'.$_noiden1.'\" , \"'.$_nodocum1.'\" ) '); }\n\t\tif ($_bandera_nosocio2 == 1) { $insert_nosocio2 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio2.'\" , \"'.$_noedad2.'\" , \"'.$_nosexo2.'\" , \"'.$_noiden2.'\" , \"'.$_nodocum2.'\" ) '); }\n\t\tif ($_bandera_nosocio3 == 1) { $insert_nosocio3 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio3.'\" , \"'.$_noedad3.'\" , \"'.$_nosexo3.'\" , \"'.$_noiden3.'\" , \"'.$_nodocum3.'\" ) '); }\n\t\tif ($_bandera_nosocio4 == 1) { $insert_nosocio4 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio4.'\" , \"'.$_noedad4.'\" , \"'.$_nosexo4.'\" , \"'.$_noiden4.'\" , \"'.$_nodocum4.'\" ) '); }\n\t\tif ($_bandera_nosocio5 == 1) { $insert_nosocio5 = mysql_query ('insert into clientes_nopadron (idatencion , nombre , edad , sexo , os , dni) values (\"'.$fetch_idatencion['id'].'\" , \"'.$_nosocio5.'\" , \"'.$_noedad5.'\" , \"'.$_nosexo5.'\" , \"'.$_noiden5.'\" , \"'.$_nodocum5.'\" ) '); }\n }\n // mysql_query($insert_atencion);\n $insert_atencion='';\n //$insert_atencion='';\n //instanciamos el objeto para generar la respuesta con ajax\n $respuesta = new xajaxResponse();\n //escribimos en la capa con id=\"respuesta\" el texto que aparece en $salida\n $respuesta->addAssign(\"mensaje_agrega\",\"innerHTML\",$boton);\n\n //tenemos que devolver la instanciaci�n del objeto xajaxResponse\n return $respuesta;\n}", "function datos_censales($alumno)\n\t{\n $formulario_habilitado = $this->s__datos_config_reporte['formulario_habilitado'];\n\t\t//$habilitacion = $this->s__datos_config_reporte['habilitacion'];\n \n\t\t$formulario_terminado = toba::consulta_php('consultas_relevamiento_ingenierias')->get_formulario_terminado($formulario_habilitado, $alumno['encuestado']);\n\t\t\n\t\tif (!empty($formulario_terminado)) {\n\t\t\t$formulario_habilitado = $formulario_terminado[0]['formulario_habilitado'];\n\t\t\t$this->respuestas = toba::consulta_php('consultas_relevamiento_ingenierias')->get_respuestas_completas_formulario_habilitado_encuestado($formulario_habilitado, $alumno['encuestado']);\n\t\t\t\n\t\t\t//Respuestas Datos Censales Principales\n\t\t\t$rta_estado_civil \t= $this->get_respuestas(247);\n\t\t\t$rta_cant_hijos \t= $this->get_respuestas(248);\n\t\t\t$rta_cant_fliares \t= $this->get_respuestas(249);\n\t\t\t$rta_calle\t\t\t= $this->get_respuestas(251);\n\t\t\t$rta_numero\t\t\t= $this->get_respuestas(252);\n\t\t\t$rta_piso\t\t\t= $this->get_respuestas(253);\n\t\t\t$rta_depto\t\t\t= $this->get_respuestas(254);\n\t\t\t$rta_unidad\t\t\t= $this->get_respuestas(255);\n\t\t\t$rta_localidad\t\t= $this->get_respuestas(256);\n\t\t\t$rta_calle_proc\t\t= $this->get_respuestas(258);\n\t\t\t$rta_numero_proc\t= $this->get_respuestas(259);\n\t\t\t$rta_piso_proc\t\t= $this->get_respuestas(260);\n\t\t\t$rta_depto_proc\t\t= $this->get_respuestas(261);\n\t\t\t$rta_unidad_proc\t= $this->get_respuestas(262);\n\t\t\t$rta_localidad_proc\t= $this->get_respuestas(263);\n\t\t\t\n\t\t\t//Respuestas Datos Económicos - Financiamiento estudios\n\t\t\t$rtas_fuente = $this->get_respuestas(265, true);\n\t\t\t$rtas_beca\t = $this->get_respuestas(266, true);\n\t\t\t\n\t\t\t//Situación laboral\n\t\t\t$rta_cond_activ\t\t = $this->get_respuestas(268);\n\t\t\t$rta_es_usted\t\t = $this->get_respuestas(269);\n\t\t\t$rta_ocupacion_es\t = $this->get_respuestas(270);\n\t\t\t$rta_horas_semanales = $this->get_respuestas(271);\n\t\t\t$rta_rel_trab_carrera = $this->get_respuestas(272);\n\t\t\t\n\t\t\t//Situación del padre\n\t\t\t$rta_nivel_est_padre\t = $this->get_respuestas(274);\n\t\t\t$rta_vive_padre\t\t\t = $this->get_respuestas(275);\n\t\t\t$rta_cond_activ_padre\t = $this->get_respuestas(276);\n\t\t\t$rta_es_usted_padre\t\t = $this->get_respuestas(277);\n\t\t\t$rta_ocupacion_es_padre\t = $this->get_respuestas(278);\n\t\t\t$rta_si_no_trabaja_padre = $this->get_respuestas(279);\n\t\t\t\n\t\t\t//Situación de la madre\n\t\t\t$rta_nivel_est_madre\t = $this->get_respuestas(281);\n\t\t\t$rta_vive_madre\t\t\t = $this->get_respuestas(282);\n\t\t\t$rta_cond_activ_madre\t = $this->get_respuestas(283);\n\t\t\t$rta_es_usted_madre\t\t = $this->get_respuestas(284);\n\t\t\t$rta_ocupacion_es_madre\t = $this->get_respuestas(285);\n\t\t\t$rta_si_no_trabaja_madre = $this->get_respuestas(286);\n\t\t\t\n\t\t\t//Se arma la linea con las respuestas - Datos Censales Principales\n\t\t\t$linea = '|'.$rta_estado_civil['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_cant_hijos['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_cant_fliares['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_calle['respuesta_valor'].'|'.$rta_numero['respuesta_valor'].'|'.$rta_piso['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_depto['respuesta_valor'].'|'.$rta_unidad['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_localidad) ? '' : $rta_localidad['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_calle_proc['respuesta_valor'].'|'.$rta_numero_proc['respuesta_valor'].'|'.$rta_piso_proc['respuesta_valor'];\n\t\t\t$linea .= '|'.$rta_depto_proc['respuesta_valor'].'|'.$rta_unidad_proc['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_localidad_proc) ? '' : $rta_localidad_proc['respuesta_valor'];\n\t\t\t\n\t\t\t//Respuestas Datos Económicos - Financiamiento estudios\n\t\t\t$linea .= '|'.$this->get_lista_array_fuente($rtas_fuente).'|'.$this->get_lista_array_beca($rtas_beca);\n\t\t\t\n\t\t\t//Situación laboral\n\t\t\t$linea .= '|'.$rta_cond_activ['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_es_usted) \t\t ? '' : $rta_es_usted['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_ocupacion_es) \t ? '' : $rta_ocupacion_es['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_horas_semanales) ? '' : $rta_horas_semanales['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_rel_trab_carrera) ? '' : $rta_rel_trab_carrera['respuesta_valor'];\n\t\t\t\n\t\t\t//Situación del padre\n\t\t\t$linea .= '|'.$rta_nivel_est_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_vive_padre) \t\t ? '' : $rta_vive_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_cond_activ_padre) \t ? '' : $rta_cond_activ_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_es_usted_padre) \t ? '' : $rta_es_usted_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_ocupacion_es_padre) ? '' : $rta_ocupacion_es_padre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_si_no_trabaja_padre) ? '' : $rta_si_no_trabaja_padre['respuesta_valor'];\n\t\t\t\n\t\t\t//Situación de la madre\n\t\t\t$linea .= '|'.$rta_nivel_est_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_vive_madre) \t\t ? '' : $rta_vive_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_cond_activ_madre)\t ? '' : $rta_cond_activ_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_es_usted_madre) \t ? '' : $rta_es_usted_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_ocupacion_es_madre) ? '' : $rta_ocupacion_es_madre['respuesta_valor'];\n\t\t\t$linea .= '|'.empty($rta_si_no_trabaja_madre) ? '' : $rta_si_no_trabaja_madre['respuesta_valor'];\n\t\t\t\n\t\t\t//Fecha de terminación del formulario\n\t\t\t$linea .= '|'.$formulario_terminado[0]['fecha_terminado'];\n\t\t} else {\n\t\t\t$linea = '|||||||||||||||||||||||||||||||';\n\t\t}\n\t\t\n\t\t//Se retornan las respuestas del alumno\n\t\treturn $linea;\n\t}", "function Cuerpo($acceso,$desde,$hasta,$id_f)\n\t{\n\t\t\n\t\t$tipo=utf8_decode($tipo);\n\t\t$this->SetFont('Arial','B',9);\n\t\t\n\t\t$acceso1=conexion();\n\t\t\n\t\t\n\t\t//$acceso->objeto->ejecutarSql(\"SELECT *FROM parametros where id_param='2'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$por_iva=trim($row['valor_param']);\n\t\t}\n\t\t\n\t\t$this->SetDrawColor(0,0,0);\n\t\t$this->SetLineWidth(.2);\n\t\t$this->SetFillColor(249,249,249);\n\t\t$this->SetTextColor(0);\n\t\t\n\t$w=array(20,20,25);\t\n\t$col=5;\n\t$right=10;\n\t$alto=49;\t\n\t\t$this->SetX($right);\n\t\t\t\n\t\t$this->SetX($right);\n\t\t\t$this->SetFont('Arial','BIU',8);\n\t\t\t$this->Cell($right,6,strtoupper(_('ingresos cobrados por franquicia')),\"0\",0,\"L\");\n\t\t\t\n\t\t\t\n\t\t\t$this->SetX($right)\t;\n\t\t\t\n\t\t\t\t$this->Ln(12);\n\t\t\t\t$this->SetX($right);\n\t\t\t\t$this->SetFont('Arial','B',7);\n\t\t\t\t$this->Cell($w[0],7,\"\",\"LRB\",0,\"L\");\n\t\t\t\t$der=15;\n\t\t\t\t$this->RotatedText($der, $alto, \"FECHA\", 25);\n\t\t\t\t$der=$der+$w[1];\n\t\t\t\t$dato=lectura($acceso,\"SELECT *FROM franquicia order by nombre_franq\");\n\t\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t\t$nombre_franq=trim($dato[$j][\"nombre_franq\"]);\n\t\t\t\t\t$this->RotatedText($der, $alto, $nombre_franq, 25);\n\t\t\t\t\t$der=$der+$w[1];\n\t\t\t\t\t$this->Cell($w[1],7,\"\",\"LRB\",0,\"C\");\n\t\t\t\t}\n\t\t\t\t$der=$der+5;\n\t\t\t\t$this->RotatedText($der, $alto, \"TOTAL\", 25);\n\t\t\t\t$this->Cell($w[2],7,\"\".\" \",\"LRB\",0,\"C\");\n\t\t\n\t\t\t$this->Ln(7);\n\t\t\n\t\t\t$sum_total=array();\n\t\t\t$sum_t=0;\n\twhile(comparaFecha($desde,$hasta)<=0){\n\t\t//ECHO \"SELECT sum(monto_pago) as monto FROM pagos where fecha_pago='$desde' \";\n\t\t$acceso->objeto->ejecutarSql(\"SELECT monto_pago as monto FROM pagos where fecha_pago='$desde' and pagos.id_caja_cob<>'EA00000001' limit 1 \");\n\t\t$row=row($acceso);\n\t\t$monto=trim($row[\"monto\"])+0;\n\t\t$cant=trim($row[\"cant\"])+0;\n\t\t\n\t\t\n\t if($monto>0){\n\t\t$wi=0;\n\t\t$j=0;\n\t\t$suma=0;\n\t\t$suma_m=0;\n\t\t$this->SetX(10);\n\t\t//list($ano,$mes,$dia)=explode(\"-\",$desde);\n\t\t$fecha=$desde;\n\t\t$dia=formatofecha($desde);\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->Cell($w[$wi],$col,$dia,\"LR\",0,\"C\",$fill);\n\t\t$wi++;\n\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','',9);\n\t\t\t$sum_t=0;\n\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t$id_franq=trim($dato[$j][\"id_franq\"]);\n\t\t\t\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"SELECT sum(monto_pago) as monto_pago FROM pagos ,caja_cobrador,caja where pagos.id_caja_cob=caja_cobrador.id_caja_cob and caja_cobrador.id_caja=caja.id_caja and fecha_pago='$fecha' and status_pago='PAGADO' and id_franq='$id_franq' and pagos.id_caja_cob<>'EA00000001' \");\n\t\t\t\t$row=row($acceso);\n\t\t\t\t$monto_pago=trim($row[\"monto_pago\"])+0;\n\t\t\t\t$sum_total[$j]+=$monto_pago;\n\t\t\t\t$sum_t+=$monto_pago;\n\t\t\t\t$this->Cell($w[$wi],$col,number_format($monto_pago+0, 2, ',', '.'),\"LR\",0,\"R\",$fill);\n\t\t\t\t\n\t\t\t}\n\t\t\t\t$sum_total[$j]+=$sum_t;\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t$this->Cell($w[2],$col,number_format($sum_t+0, 2, ',', '.'),\"LR\",0,\"R\",$fill);\n\t\t\t\t$fill=!$fill;\n\t\t\t\n\t\t$this->Ln();\n\t\t\t\n\t\t}//if monto\t\n\t\t$desde=sumadia($desde);\n\t\t\t\n\t}\n\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t$this->SetX($right)\t;\n\t\t\t$this->Cell($w[0],7,\"TOTAL\",\"1\",0,\"R\",$fill);\n\t\t\t$sum_to=0;\n\t\t\tfor($j=0;$j<count($dato);$j++){\n\t\t\t\t$id_franq=trim($dato[$j][\"id_franq\"]);\n\t\t\t\t$this->SetFont('Arial','B',9);\n\t\t\t\t//$sum_to+=$sum_total[$j];\n\t\t\t\t$this->Cell($w[1],7,number_format($sum_total[$j]+0, 2, ',', '.'),\"1\",0,\"R\",$fill);\n\t\t\t\t\n\t\t\t}\n\t\t\t$this->SetFont('Arial','B',10);\n\t\t\t$this->Cell($w[2],7,number_format($sum_total[$j]+0, 2, ',', '.'),\"1\",0,\"R\",$fill);\n\t\t\n\t}", "public function calificacionPendiente($changuita, $usuario, $contraparte) {\n $sql = \"select nombre, mail, aviso_ca from usuarios where id = $usuario and activo = '2'\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n if ($fila[\"aviso_ca\"] == 1) {\n $mail = $fila[\"mail\"];\n $nombre = $fila[\"nombre\"];\n $sql = \"select nombre, apellido, mail, celular_area, celular from usuarios where id = $contraparte\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n //$cNombre = $fila[\"nombre\"].\" \".$fila[\"apellido\"];\n $cNombre = $fila[\"nombre\"];\n $cMail = $fila[\"mail\"];\n // $cTel = $fila[\"telefono_area\"].\" \".$fila[\"telefono\"];\n $cCel = $fila[\"celular_area\"] . \" \" . $fila[\"celular\"];\n $sql = \"select usuario, titulo from changuitas where id = $changuita\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n $titulo = $fila[\"titulo\"];\n $txtContrato = \"fuiste elegido por\";\n if ($usuario == $fila[\"usuario\"])\n $txtContrato = \"elegiste a\";\n $this->mailer->Subject = \"Tenés que calificar a $cNombre por la changuita $titulo\";\n $this->mailer->Body = $this->bodyIni;\n $this->mailer->Body .= \"Estimado/a $nombre:<br/><br/>Ya pasaron varios días desde que $txtContrato $cNombre para realizar la changuita <a href='\" . Sitio . \"/#/changuita|\" . $changuita . \"'><strong>$titulo</strong></a>. Por este motivo, te pedimos que lo/a califiques por su amabilidad, claridad y efectividad en el intercambio. Si la changuita ya fue concretada, podés <a href='\" . Sitio . \"/#/changuita|\" . $changuita . \"'>calificarlo/a ahora</a>. De no haberse concretado el intercambio en el tiempo indicado, podés indicarlo y calificar a tu contraparte para obtener una bonificación de los cargos. En ese caso, la reputación de $cNombre se verá afectada negativamente.<br/>Te recordamos sus datos de contacto:<br/>E-mail: $cMail<br/>\";\n // if(trim($cTel) != \"\")\n // $this->mailer->Body .= \"Tel.: $cTel<br/>\";\n if (trim($cCel) != \"\")\n $this->mailer->Body .= \"Cel.: $cCel<br/>\";\n $this->mailer->Body .= \"<br/>\" . $this->bodyFin;\n $this->mailer->ClearAddresses();\n $this->mailer->AddAddress($mail);\n $this->mailer->Send();\n }\n }", "public static function ComprobarAccesoGenerarContrato($id_inmueble,$id_cliente)\n\t{\t\t\n\t\trequire_once(PATHINCLUDE_FRAMEWORK_MODELOS.'Inmuebles.class.php');\n\t\t// Datos inmueble\n\t\t$inmueble = new ModelInmuebles();\n\t\t$inmueble->SetDataObject($id_inmueble);\n\t\t// Si no está en venta\n\t\tif($inmueble->precio_compra==0)\n\t\t\treturn -1;\n\t\t// Si no tiene ficha de encargo\n\t\trequire_once(PATHINCLUDE_FRAMEWORK_MODELOS.'FichasEncargoCliente.class.php');\n\t\t// Datos de fichas de encargo\n\t\t$ficha_encargo = new ModelFichasEncargoCliente();\n\t\t$fichas_encargo_obtenidas=$ficha_encargo->ObtenerFichasInmuebleCliente($id_inmueble,$id_cliente);\n\t\t$num_fichas_encargo=$fichas_encargo_obtenidas->RecordCount();\n\t\tif($num_fichas_encargo==0)\n\t\t\treturn -2;\n\t\t\n\t\treturn 1;\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}", "function obtener_horarios_ocupados_por_aula ($aula, $horarios_ocupados){\n $fin=FALSE;\n $i=0;\n $longitud=count($horarios_ocupados);\n \n while ($i<$longitud && !$fin){\n $elemento=$horarios_ocupados[$i];\n if(strcmp($elemento[0]['id_aula'], $aula['id_aula']) == 0){\n $fin=TRUE;\n }\n \n $i += 1;\n }\n \n return $elemento; // indice => Array ( 0 => Array(), 1 => Array() ... )\n }", "function contarSemestresTranscurridos($semestre_ingreso){\r\n $cantidad='';\r\n $anio_actual=date('Y');\r\n if(date('m')<=6){\r\n $semestre_actual=1;\r\n }else{\r\n $semestre_actual=2;\r\n }\r\n $periodo_actual =$anio_actual.$semestre_actual;\r\n if($periodo_actual>=$semestre_ingreso){\r\n $cantidad = $this->calcularCantidadSemestres($semestre_ingreso,$periodo_actual);\r\n }\r\n if ($this->datosEstudiante['CARRERA']==97)\r\n $cantidad=round($cantidad/2);\r\n return $cantidad;\r\n }", "public function getAgenciaConta();", "function graficosProductosConsumo($anio) {\r\n\r\n\r\n\t$sql = \"select\r\n\t\t\t\r\n\t\t\t\tp.refcategorias, c.descripcion, coalesce(count(c.idcategoria),0)\r\n\t\t\r\n\t\t\t\t\tfrom dbventas v\r\n\t\t\t\t\tinner join tbtipopago tip ON tip.idtipopago = v.reftipopago\r\n\t\t\t\t\tinner join dbclientes cli ON cli.idcliente = v.refclientes\r\n\t\t\t\t\tinner join dbdetalleventas dv ON v.idventa = dv.refventas\r\n\t\t\t\t\tinner join dbproductos p ON p.idproducto = dv.refproductos\r\n\t\t\t\t\tinner join tbcategorias c ON c.idcategoria = p.refcategorias\r\n\t\t\t\t\twhere\tyear(v.fecha) = \".$anio.\" and c.esegreso = 0 and v.cancelado = 0\r\n\t\t\tgroup by p.refcategorias, c.descripcion\r\n\t\t\t\";\r\n\t\t\t\r\n\t$sqlT = \"select\r\n\t\t\t\r\n\t\t\t\tcoalesce(count(p.idproducto),0)\r\n\r\n\t\t\tfrom dbventas v\r\n\t\t\tinner join tbtipopago tip ON tip.idtipopago = v.reftipopago\r\n\t\t\tinner join dbclientes cli ON cli.idcliente = v.refclientes\r\n\t\t\tinner join dbdetalleventas dv ON v.idventa = dv.refventas\r\n\t\t\tinner join dbproductos p ON p.idproducto = dv.refproductos\r\n\t\t\tinner join tbcategorias c ON c.idcategoria = p.refcategorias\r\n\t\t\twhere\tyear(v.fecha) = \".$anio.\" and c.esegreso = 0 and v.cancelado = 0\";\r\n\t\t\t\r\n\t$sqlT2 = \"select\r\n\t\t\t\t\tcount(*)\r\n\t\t\t\tfrom dbproductos p\r\n\t\t\t\twhere p.activo = 1\r\n\t\t\t\";\r\n\r\n\t\r\n\t$resT = mysql_result($this->query($sqlT,0),0,0);\r\n\t$resR = $this->query($sql,0);\r\n\t\r\n\t$cad\t= \"Morris.Donut({\r\n element: 'graph2',\r\n data: [\";\r\n\t$cadValue = '';\r\n\tif ($resT > 0) {\r\n\t\twhile ($row = mysql_fetch_array($resR)) {\r\n\t\t\t$cadValue .= \"{value: \".((100 * $row[2])\t/ $resT).\", label: '\".$row[1].\"'},\";\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n\t$cad .= substr($cadValue,0,strlen($cadValue)-1);\r\n $cad .= \"],\r\n formatter: function (x) { return x + '%'}\r\n }).on('click', function(i, row){\r\n console.log(i, row);\r\n });\";\r\n\t\t\t\r\n\treturn $cad;\r\n}", "public function changeToOrdine()\n {\n\n //crea la tabella degli ordini verso i fornitori\n //Rielabora\n $preventivatore = $this->getPreventivatore();\n $result = $preventivatore->elabora();\n $imponibile = $result['prezzo_cliente_senza_iva'];\n $iva = $result['prezzo_cliente_con_iva'] - $result['prezzo_cliente_senza_iva'];\n $importo_trasportatore = $result['costo_trazione'];\n $importo_depositario = $result['deposito'];\n $importo_traslocatore_partenza = $result['costo_scarico_totale'] ;\n $importo_traslocatore_destinazione = $result['costo_salita_piano_totale'] + $result['costo_montaggio_totale'] + $result['costo_scarico_ricarico_hub_totale'];\n\n $totali = array();\n $totali[$this->id_trasportatore] = 0;\n $totali[$this->id_depositario] = 0;\n $totali[$this->id_traslocatore_destinazione] = 0;\n $totali[$this->id_traslocatore_partenza] = 0;\n\n $totaliMC = array();\n $totaliMC[$this->id_trasportatore] = 0;\n $totaliMC[$this->id_depositario] = 0;\n $totaliMC[$this->id_traslocatore_destinazione] = 0;\n $totaliMC[$this->id_traslocatore_partenza] = 0;\n\n\n $totali[$this->id_trasportatore] = $totali[$this->id_trasportatore] + $importo_trasportatore;\n $totali[$this->id_depositario] = $totali[$this->id_depositario] + $importo_depositario;\n $totali[$this->id_traslocatore_partenza] = $totali[$this->id_traslocatore_partenza] + $importo_traslocatore_partenza;\n $totali[$this->id_traslocatore_destinazione] = $totali[$this->id_traslocatore_destinazione] + $importo_traslocatore_destinazione;\n\n\n $mc = $preventivatore->getMC();\n\n $totaliMC[$this->id_trasportatore] = $totaliMC[$this->id_trasportatore] + $mc;\n $totaliMC[$this->id_depositario] = $totaliMC[$this->id_depositario] + $mc;\n $totaliMC[$this->id_traslocatore_destinazione] = $totaliMC[$this->id_traslocatore_destinazione] + $mc;\n $totaliMC[$this->id_traslocatore_partenza] = $totaliMC[$this->id_traslocatore_partenza] + $mc;\n\n $imponibile = round($totali[$this->id_trasportatore]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_trasportatore] - $imponibile,2);\n\n $ordine_trasportatore = new OrdineFornitore($this->id_preventivo, $this->id_trasportatore, $totali[$this->id_trasportatore], $imponibile, $iva, $totaliMC[$this->id_trasportatore], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASPORTO);\n $ordine_trasportatore->save();\n\n $imponibile = round($totali[$this->id_traslocatore_partenza]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_partenza] - $imponibile,2);\n\n $ordine_traslocatore_partenza = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_partenza, $totali[$this->id_traslocatore_partenza], $imponibile, $iva, $totaliMC[$this->id_traslocatore_destinazione], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_PARTENZA);\n $ordine_traslocatore_partenza->save();\n\n $imponibile = round($totali[$this->id_traslocatore_destinazione]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_destinazione] - $imponibile,2);\n $ordine_traslocatore_destinazione = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_destinazione, $totali[$this->id_traslocatore_destinazione], $imponibile, $iva, $totaliMC[$this->id_traslocatore_partenza], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_DESTINAZIONE);\n $ordine_traslocatore_destinazione->save();\n\n if ($this->giorni_deposito>10) {\n $imponibile = round($totali[$this->id_depositario]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_depositario] - $imponibile,2);\n\n $ordine_depositario = new OrdineFornitore($this->id_preventivo, $this->id_depositario, $totali[$this->id_depositario], $imponibile, $iva, $totaliMC[$this->id_depositario], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_DEPOSITO);\n $ordine_depositario->save();\n }\n\n\n\n $data_ordine = date('Y-m-d');\n $con = DBUtils::getConnection();\n $sql =\"UPDATE preventivi SET tipo=\".OrdineBusiness::TIPO_ORDINE.\" , data='\".$data_ordine.\"' ,\n importo_commessa_trasportatore ='\".$totali[$this->id_trasportatore].\"',\n importo_commessa_traslocatore_partenza ='\".$totali[$this->id_traslocatore_partenza].\"',\n importo_commessa_traslocatore_destinazione ='\".$totali[$this->id_traslocatore_destinazione].\"',\n importo_commessa_depositario ='\".$totali[$this->id_depositario].\"',\n imponibile ='\".$imponibile.\"',\n iva ='\".$iva.\"'\n WHERE id_preventivo=\".$this->id_preventivo;\n\n $res = mysql_query($sql);\n //echo \"\\nSQL: \".$sql;\n DBUtils::closeConnection($con);\n\n return new OrdineCliente($this->id_preventivo);\n }", "function pasarrepechaje($instactual,$insanalizar,$insproxima,$limite)\n\t{\n\t\t$torneoActual = new torneo($this->BG->con);\n\t\t$torneoActual->setactivo(1);\n\t\t$torneoActual = $torneoActual->read(false,1,array(\"activo\"));\n\t\t\n\t\t$selepersonaje = new personajepar($this->BG->con);\n\t\t$selepersonaje->setronda($instactual);\n\t\t$selepersonaje->setidtorneo($torneoActual->getid());\n\t\t$selepersonaje = $selepersonaje->read(true,2,array(\"ronda\",\"AND\",\"idtorneo\"));\n\t\t\n\t\t$batallascon = new batalla($this->BG->con);\n\t\t$batallascon->setidtorneo($torneoActual->getid());\n\t\t$batallascon->setronda($insanalizar);\n\t\t$batallascon = $batallascon->read(true,2,array(\"ronda\",\"AND\",\"idtorneo\"));\n\t\t\n\t\t$todasparticipacion = array();\n\t\t$colaar = 0;\n\t\tforeach($selepersonaje as $estepersonaje)\n\t\t{\n\t\t\t$buspelea = new pelea($this->BG->con);\n\t\t\t$buspelea->setidpersonaje($estepersonaje->getid());\n\t\t\t$buspelea = $buspelea->read(true,1,array(\"idpersonaje\"));\n\t\t\tif(count($buspelea)>0)\n\t\t\t{\n\t\t\t\t$existe=0;\n\t\t\t\t$cual=0;\n\t\t\t\tfor($i=0;$i<count($buspelea);$i++)\n\t\t\t\t{\n\t\t\t\t\tfor($j=0;$j<count($batallascon);$j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($buspelea[$i]->getidbatalla() == $batallascon[$j]->getid())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$existe = 1;\t\n\t\t\t\t\t\t\t$cual = $i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tif($existe == 1)\n\t\t\t\t{\n\t\t\t\t\t$sigue=true;\n\t\t\t\t\t$fin = $colaar;\n\t\t\t\t\twhile($sigue)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($fin==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$todasparticipacion[0]=$buspelea[$cual];\n\t\t\t\t\t\t\t$colaar++;\n\t\t\t\t\t\t\t$sigue=false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($todasparticipacion[$fin-1]->getvotos()<$buspelea[$cual]->getvotos())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$todasparticipacion[$fin] = $todasparticipacion[$fin-1];\n\t\t\t\t\t\t\t$fin--;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$todasparticipacion[$fin]=$buspelea[$cual];\n\t\t\t\t\t\t\t$colaar++;\n\t\t\t\t\t\t\t$sigue=false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$cuantolisto = new personajepar($this->BG->con);\n\t\t$cuantolisto->setronda($insproxima);\n\t\t$cuantolisto->setidtorneo($torneoActual->getid());\n\t\t$cuantolisto = $cuantolisto->read(true,2,array(\"ronda\",\"AND\",\"idtorneo\"));\n\t\t$estosson = count($cuantolisto);\n\t\t$agregar = $limite-$estosson;\n\t\t\n\t\tfor($i=0;$i<$colaar;$i++)\n\t\t{\n\t\t\tif($agregar>0)\n\t\t\t{\n\t\t\t\t$cambiar = arrayobjeto($selepersonaje,\"id\",$todasparticipacion[$i]->getidpersonaje());\n\t\t\t\t$cambiar->setronda($insproxima);\n\t\t\t\t$cambiar->setgrupo(\"N\");\n\t\t\t\t$cambiar->update(2,array(\"ronda\",\"grupo\"),1,array(\"id\"));\n\t\t\t\tif($agregar>1)\n\t\t\t\t\t$agregar--;\n\t\t\t\telseif($i<$colaar-1&&$todasparticipacion[$i]->getvotos()==$todasparticipacion[$i+1]->getvotos())\n\t\t\t\t\t$fer=0;\n\t\t\t\telse\n\t\t\t\t\t$agregar--;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$todasparticipacion[$i]->setclasifico(0);\n\t\t\t\t$todasparticipacion[$i]->update(1,array(\"clasifico\"),2,array(\"idpersonaje\",\"AND\",\"idbatalla\"));\n\t\t\t\t\n\t\t\t\t$cambiar = arrayobjeto($selepersonaje,\"id\",$todasparticipacion[$i]->getidpersonaje());\n\t\t\t\t$cambiar->setestado(3);\n\t\t\t\t$cambiar->update(1,array(\"estado\"),1,array(\"id\"));\n\t\t\t\t$agregar--;\n\t\t\t}\n\t\t}\n\t}", "function cargar_sub_cuenta($id_cuenta, $codigo_cuenta, $tipo, $monto) {\n if ($this->moneda == 1) {\n $numero = $monto / $this->tipo_cambio;\n $importe_dolares = number_format($numero, 2, '.', '');\n $importe_soles = $monto;\n } elseif ($this->moneda == 2) {\n $importe_soles = $monto * $this->tipo_cambio;\n $importe_dolares = $monto;\n }\n $datos_enviar[] = $this->id_comprobante;\n $datos_enviar[] = \"D\";\n $datos_enviar[] = $id_cuenta;\n $datos_enviar[] = $codigo_cuenta;\n $datos_enviar[] = $tipo;\n $datos_enviar[] = $importe_soles;\n $datos_enviar[] = $importe_dolares;\n $datos_enviar[] = $this->id_anexo;\n $datos_enviar[] = $this->codigo_anexo;\n $datos_enviar[] = $this->id_tipo_comprobante;\n $datos_enviar[] = $this->codigo_tipo_comprobante;\n $datos_enviar[] = $this->nro_comprobante;\n $datos_enviar[] = $this->emision_comprobante;\n $datos_enviar[] = $this->moneda;\n $datos_enviar[] = $this->codigo_moneda;\n $datos_enviar[] = $this->cuenta_costo;\n $datos_enviar[] = $this->nombre_cuenta_costo;\n $datos_enviar[] = $this->detalle_comprobante;\n $datos_enviar[] = $this->serie_comprobante;\n\n return $datos_enviar;\n }", "function setNuevaCuenta($origen, $subproducto, $socio,\n\t\t\t\t\t\t\t$observaciones = \"\", $credito = 1,\n\t\t\t\t\t\t\t$mancomunado1 = \"\", $mancomunado2 = \"\",\n\t\t\t\t\t\t\t$grupo = false, $fecha_de_alta = false,\n\t\t\t\t\t\t\t$tipo_de_cuenta = CAPTACION_TIPO_VISTA, $tipo_de_titulo = 99, $DiasInvertidos = false,\n\t\t\t\t\t\t\t$tasa = false, $CuentaDeInteres\t= false, $FechaVencimiento = false\n\t\t\t\t\t\t\t){\n\n\n\t\t$xT\t\t\t\t= new cTipos(0);\n\t\t$xF\t\t\t\t= new cFecha();\n\t\t$xLog\t\t\t= new cCoreLog();\n\t\t$socio\t\t\t= setNoMenorQueCero($socio);\n\t\t$ready\t\t\t= true;\n\t\t$tipo_de_cuenta\t= setNoMenorQueCero($tipo_de_cuenta);\n\t\t$tipo_de_titulo\t= setNoMenorQueCero($tipo_de_titulo);\n\t\t$credito\t\t= setNoMenorQueCero($credito);\n\t\t$grupo\t\t\t= setNoMenorQueCero($grupo);\n\t\t$DiasInvertidos\t= setNoMenorQueCero($DiasInvertidos);\n\t\t$tasa\t\t\t= setNoMenorQueCero($tasa, 4);\n\t\t$CuentaDeInteres= setNoMenorQueCero($CuentaDeInteres);\n\t\t$estado\t\t\t= 10;\n\t\t//Corrige el numero de persona\n\t\tif($socio <= DEFAULT_SOCIO AND $this->mSocioTitular > DEFAULT_SOCIO ){\n\t\t\t$xLog->add(\"WARN\\tCAMBIO Persona $socio a \" . $this->mSocioTitular . \"\\r\\n\", $xLog->DEVELOPER);\n\t\t\t$socio\t\t= $this->mSocioTitular;\n\t\t}\n\t\t$xSoc\t\t\t\t= new cSocio($socio);\n\t\tif($xSoc->init() == true){\n\t\t\t//$cuenta\t\t\t= $xSoc->getIDNuevoDocto($tipo_de_cuenta, $subproducto);\n\t\t\t$cuenta\t\t\t= $xSoc->getIDNuevoDocto(iDE_CAPTACION);\n\t\t\t$CuentaDeInteres= $xSoc->getCuentaDeCaptacionPrimaria(CAPTACION_TIPO_VISTA, CAPTACION_PRODUCTO_INTERESES);\n\t\t\tif($grupo == DEFAULT_GRUPO OR $grupo == 0){ $grupo = $xSoc->getClaveDeGrupo(); }\n\t\t} else {\n\t\t\t$xLog->add(\"ERROR\\tAl cargar la Persona $socio\\r\\n\", $xLog->DEVELOPER);\n\t\t\t$ready\t\t\t= false; //el socio existe\n\t\t}\n\t\t$xLog->add($xSoc->getMessages(), $xLog->DEVELOPER);\n\t\t//corrige la Cuenta de Intereses\n\t\t$CuentaDeInteres\t= ($CuentaDeInteres <= 0) ? DEFAULT_CUENTA_CORRIENTE : $CuentaDeInteres;\n\n\t\t$fecha_de_alta\t\t\t= $xF->getFechaISO($fecha_de_alta);\n\t\t$FechaVencimiento\t\t= $xF->getFechaISO($FechaVencimiento);\n\t\tif($tipo_de_cuenta == CAPTACION_TIPO_PLAZO){\n\t\t\t$DiasInvertidos\t\t= ($DiasInvertidos <=0 ) ? $this->mDiasInvertidos : $DiasInvertidos;\n\t\t\t$tasa\t\t\t\t= ($tasa <= 0) ? $this->mTasaInteres : $tasa;\n\t\t\t$FechaVencimiento\t= ($xF->getInt($FechaVencimiento) <= $xF->getInt($fecha_de_alta) ) ? $xF->setSumarDias($DiasInvertidos, $fecha_de_alta) : $FechaVencimiento;\n\t\t\t$estado\t\t\t\t= 20;\n\t\t\t$xLog->add(\"WARN\\tInversion Dias $DiasInvertidos Tasa $tasa Vencimiento $FechaVencimiento\\r\\n\", $xLog->DEVELOPER);\n\t\t\tif($xF->setRestarFechas($FechaVencimiento, $fecha_de_alta) != $DiasInvertidos){\n\t\t\t\t$DiasInvertidos\t= $xF->setRestarFechas($FechaVencimiento, $fecha_de_alta);\n\t\t\t\t$xLog->add(\"WARN\\tCAMBIO Inversion Dias $DiasInvertidos ($FechaVencimiento, $fecha_de_alta)\\r\\n\", $xLog->DEVELOPER);\n\t\t\t}\n\t\t} else {\n\t\t\t$xLog->add(\"WARN\\tVista $socio Producto $tipo_de_cuenta sub-producto $subproducto Origen $origen\\r\\n\", $xLog->DEVELOPER);\n\t\t}\n\t\t\n\t\t$xCta\t\t= new cCaptacion_cuentas();\n\t\t$xCta->cuenta_de_intereses($CuentaDeInteres);\n\t\t$xCta->dias_invertidos($DiasInvertidos);\n\t\t$xCta->eacp(EACP_CLAVE);\n\t\t$xCta->estatus_cuenta($estado);\n\t\t$xCta->fecha_afectacion($fecha_de_alta);\n\t\t$xCta->fecha_apertura($fecha_de_alta);\n\t\t$xCta->fecha_baja($xF->getFechaMaximaOperativa());\n\t\t$xCta->fecha_conciliada($fecha_de_alta);\n\t\t$xCta->idusuario(getUsuarioActual());\n\t\t$xCta->inversion_fecha_vcto($FechaVencimiento);\n\t\t$xCta->inversion_periodo(0);\n\t\t$xCta->minimo_mancomunantes(0);\n\t\t$xCta->nombre_mancomunado1($mancomunado1);\n\t\t$xCta->nombre_mancomunado2($mancomunado2);\n\t\t$xCta->numero_cuenta($cuenta);\n\t\t$xCta->numero_grupo($grupo);\n\t\t$xCta->numero_socio($socio);\n\t\t$xCta->numero_solicitud($credito);\n\t\t$xCta->observacion_cuenta($observaciones);\n\t\t$xCta->oficial_de_captacion(getUsuarioActual());\n\t\t$xCta->origen_cuenta($origen);\n\t\t$xCta->saldo_conciliado(0);\n\t\t$xCta->saldo_cuenta(0);\n\t\t$xCta->sucursal(getSucursal());\n\t\t$xCta->tasa_otorgada($tasa);\n\t\t$xCta->tipo_cuenta($tipo_de_cuenta);\n\t\t$xCta->tipo_titulo($tipo_de_titulo);\n\t\t$xCta->tipo_subproducto($subproducto);\n\t\t$xCta->ultimo_sdpm(0);\n\t\tif($ready == true){ \n\t\t\t$rs \t= $xCta->query()->insert()->save();\n\t\t\t$ready \t= ($rs == false) ? false : true;\n\t\t}\n\t\t//Asignar valores cargados\n\t\tif ( $ready == true) {\n\t\t\t$xLog->add(\"OK\\tSe Agrego Existosamente la Cuenta $cuenta del subproducto $subproducto \\r\\n\");\n\t\t\t$this->mSucess \t\t\t\t= true;\n\t\t\t$this->mSocioTitular\t\t= $socio;\n\t\t\t$this->mGrupoAsociado\t\t= $grupo;\n\t\t\t$this->mCreditoAsoc\t\t\t= $credito;\n\t\t\t$this->mNumeroCuenta\t\t= $cuenta;\n\t\t\t$this->mDiasInvertidos\t\t= $DiasInvertidos;\n\t\t\t$this->mFechaVencimiento\t= $FechaVencimiento;\n\t\t\t$this->mTasaInteres\t\t\t= $tasa;\n\t\t\t$this->mFechaOperacion\t\t= $fecha_de_alta;\n\t\t\t$this->init();\t\n\t\t} else {\n\t\t\t$xLog->add(\"ERROR\\tError al agregar la Cuenta $cuenta del subproducto $subproducto\\r\\n\");\n\t\t\t$this->mSucess \t\t\t\t= false;\n\t\t}\n\t\t//setLog($xLog->getMessages());\n\t\t$this->mMessages\t\t\t\t.= $xLog->getMessages();\n\t\treturn $this->mNumeroCuenta;\n\t}", "public function obtenerViajesplusAbonados();", "function consulta_registro_compras_imprimir($w_anio, $w_mes, $w_anexo) {\n $sql = \"SELECT\n prosic_comprobante.codigo_comprobante\n , prosic_comprobante.emision_comprobante\n , prosic_comprobante.pago_comprobante\n , prosic_tipo_comprobante.sunat_tipo_comprobante\n , prosic_comprobante.serie_comprobante\n , prosic_comprobante.anio_dua_comprobante\n , prosic_comprobante.nro_comprobante\n , prosic_tipo_documento.sunat_tipo_documento\n , prosic_anexo.codigo_anexo\n , SUBSTRING(prosic_anexo.descripcion_anexo,1,20)\n , prosic_comprobante.afecto_comprobante\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.igv_comprobante\n , prosic_comprobante.total_comprobante \t\n , prosic_comprobante.id_operacion\n , prosic_comprobante.no_gravadas_igv\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.isc_comprobante\n , prosic_comprobante.otros_tributos\n , prosic_comprobante.total_comprobante\n , prosic_comprobante.tipo_cambio_comprobante\n , prosic_tipo_comprobante.nombre_tipo_comprobante\n , prosic_comprobante.id_moneda\n\t, prosic_comprobante.referencia_fecha\n\t, prosic_comprobante.referencia_serie\n\t, prosic_comprobante.referencia_nro\n\t, prosic_comprobante.referecia_tipo_doc\n FROM\n prosic_comprobante\n INNER JOIN prosic_anexo ON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n INNER JOIN prosic_tipo_comprobante ON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n INNER JOIN prosic_tipo_documento ON (prosic_anexo.id_tipo_documento = prosic_tipo_documento.id_tipo_documento)\n WHERE prosic_comprobante.id_subdiario=3\";\n if ($w_anio != '')$sql.=\" AND prosic_comprobante.id_anio=\" . $w_anio;\n if ($w_mes != '')$sql.=\" AND prosic_comprobante.id_mes=\" . $w_mes;\n if ($w_anexo != '')$sql.=\" AND prosic_comprobante.id_anexo='\" . $w_anexo . \"'\";\n $sql.=\" ORDER BY prosic_tipo_comprobante.sunat_tipo_comprobante,prosic_comprobante.codigo_comprobante\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function SolicitarContrato(){\n $this->procedimiento = 'adq.f_cotizacion_ime';\n $this->transaccion = 'ADQ_SOLCON_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function traerCualquiera()\n {\n }", "function cocinar_pedido() {\n\t\tglobal $bd;\n\t\tglobal $x_from;\n\t\tglobal $x_idpedido;\n\t\tglobal $x_idcliente;\n\t\t\n\t\t$x_array_pedido_header = $_POST['p_header'];\n \t$x_array_pedido_body = $_POST['p_body'];\n\t\t$x_array_subtotales=$_POST['p_subtotales'];\n\t\t\n\t\t$idc=$x_array_pedido_header['idclie'] == '' ? ($x_idcliente == '' ? 0 : $x_idcliente) : $x_array_pedido_header['idclie'];\n\t\t// $idc = cocinar_registro_cliente();\n\t\t// $x_array_pedido_footer = $_POST['p_footer'];\n\t\t// $x_array_tipo_pago = $_POST['p_tipo_pago'];\n\n\t\t //sacar de arraypedido || tipo de consumo || local || llevar ... solo llevar\n\t\t $count_arr=0;\n\t\t $count_items=0;\n\t\t $item_antes_solo_llevar=0;\n\t\t $solo_llevar=0;\n\t\t $tipo_consumo;\n\t\t $categoria;\n\t\t \n\t\t $sql_pedido_detalle='';\n\t\t $sql_sub_total='';\n\n\t\t $numpedido='';\n\t\t $correlativo_dia='';\n\t\t $viene_de_bodega=0;// para pedido_detalle\n\t\t $id_pedido;\n\n\t\t \t\t \n\t\t // cocina datos para pedidodetalle\n\t\t foreach ($x_array_pedido_body as $i_pedido) {\n\t\t\tif($i_pedido==null){continue;}\n\t\t\t// tipo de consumo\n\t\t\t//solo llevar\n\t\t\t$pos = strrpos(strtoupper($i_pedido['des']), \"LLEVAR\");\n\t\t\t\n\t\t\t\n\t\t\t//subitems // detalles\n\t\t\tforeach ($i_pedido as $subitem) {\n\t\t\t\tif(is_array($subitem)==false){continue;}\n\t\t\t\t$count_items++;\n\t\t\t\tif($pos!=false){$solo_llevar=1;$item_antes_solo_llevar=$count_items;}\n\t\t\t\t$tipo_consumo=$subitem['idtipo_consumo'];\n\t\t\t\t$categoria=$subitem['idcategoria'];\n\n\t\t\t\t$tabla_procede=$subitem['procede']; // tabla de donde se descuenta\n\n\t\t\t\t$viene_de_bodega=0;\n\t\t\t\tif($tabla_procede===0){$viene_de_bodega=$subitem['procede_index'];}\n\n\t\t\t\t//armar sql pedido_detalle con arrPedido\n\t\t\t\t$precio_total=$subitem['precio_print'];\n\t\t\t\tif($precio_total==\"\"){$precio_total=$subitem['precio_total'];}\n\n\t\t\t\t//concatena descripcion con indicaciones\n\t\t\t\t$indicaciones_p=\"\";\n\t\t\t\t$indicaciones_p=$subitem['indicaciones'];\n\t\t\t\tif($indicaciones_p!==\"\"){$indicaciones_p=\" (\".$indicaciones_p.\")\";$indicaciones_p=strtolower($indicaciones_p);}\n\t\t\t\t\n\t\t\t\t$sql_pedido_detalle=$sql_pedido_detalle.'(?,'.$tipo_consumo.','.$categoria.','.$subitem['iditem'].','.$subitem['iditem2'].',\"'.$subitem['idseccion'].'\",\"'.$subitem['cantidad'].'\",\"'.$subitem['cantidad'].'\",\"'.$subitem['precio'].'\",\"'.$precio_total.'\",\"'.$precio_total.'\",\"'.$subitem['des'].$indicaciones_p.'\",'.$viene_de_bodega.','.$tabla_procede.'),'; \n\n\t\t\t}\n\n\t\t\t$count_arr++;\n\t\t}\t\t\n\t\t\n\t\tif($count_items==0){return false;}//si esta vacio\n\n\t\tif($item_antes_solo_llevar>1){$solo_llevar=0;} // >1 NO solo es para llevar\n\n\t\t//armar sql pedido_subtotales con arrTotales\t\t\n\t\t// $importe_total=0; // la primera fila es subtotal o total si no hay adicionales\n\t\t// $importe_subtotal = $x_array_subtotales[0]['importe'];\n\t\t// for ($z=0; $z < count($x_array_subtotales); $z++) {\t\n\t\t// \t$importe_total = $x_array_subtotales[$z]['importe'];\t\t\n\t\t// \t$sql_sub_total=$sql_sub_total.'(?,\"'.$x_array_subtotales[$z]['descripcion'].'\",\"'.$x_array_subtotales[$z]['importe'].'\"),';\n\t\t// }\n\t\t\n\t\t// subtotales\t\t\n\t\t$sql_subtotales = '';\n\t\t$importe_total=0; // la primera fila es subtotal o total si no hay adicionales\n\t\t$importe_subtotal = $x_array_subtotales[0]['importe'];\n\t\tforeach ( $x_array_subtotales as $sub_total ) {\n\t\t\t$tachado = $sub_total['tachado'] === \"true\" ? 1 : 0; \n\t\t\t$importe_row = $tachado === 1 ? $sub_total['importe_tachado'] : $sub_total['importe'];\n\t\t\t$importe_total = $sub_total['importe'];\n\t\t\t$sql_subtotales = $sql_subtotales.\"(?,\".$_SESSION['ido'].\",\".$_SESSION['idsede'].\",'\".$sub_total['descripcion'].\"','\".$importe_row.\"',\".$tachado.\"),\";\n\t\t}\n\n //guarda primero pedido para obtener el idpedio\n\t\tif(!isset($_POST['estado_p'])){$estado_p=0;}else{$estado_p=$_POST['estado_p'];}//para el caso de venta rapida si ya pago no figura en control de pedidos\n\t\tif(!isset($_POST['idpedido'])){$id_pedido=0;}else{$id_pedido=$_POST['idpedido'];}//si se agrea en un pedido / para control de pedidos al agregar\t\t\n\n if($id_pedido==0){ // nuevo pedido\n\t\t\t//num pedido\n\t\t\t$sql=\"select count(idpedido) as d1 from pedido where idorg=\".$_SESSION['ido'].\" and idsede=\".$_SESSION['idsede'];\n\t\t\t$numpedido=$bd->xDevolverUnDato($sql);\n\t\t\t$numpedido++;\n\n\t\t\t//numcorrelativo segun fecha\n\t\t\t$sql=\"SELECT count(fecha) AS d1 FROM pedido WHERE (idorg=\".$_SESSION['ido'].\" and idsede=\".$_SESSION['idsede'].\") and STR_TO_DATE(fecha,'%d/%m/%Y')=curdate()\";\n\t\t\t$correlativo_dia=$bd->xDevolverUnDato($sql);\n\t\t\t$correlativo_dia++;\n\n\t\t\t// si es delivery y si trae datos adjuntos -- json-> direccion telefono forma pago\n\t\t\t$json_datos_delivery=array_key_exists('arrDatosDelivery', $x_array_pedido_header) ? $x_array_pedido_header['arrDatosDelivery'] : '';\n\t\t\t\n\n // guarda pedido\n $sql=\"insert into pedido (idorg, idsede, idcliente, fecha,hora,fecha_hora,nummesa,numpedido,correlativo_dia,referencia,total,total_r,solo_llevar,idtipo_consumo,idcategoria,reserva,idusuario,subtotales_tachados,estado,json_datos_delivery)\n\t\t\t\t\tvalues(\".$_SESSION['ido'].\",\".$_SESSION['idsede'].\",\".$idc.\",DATE_FORMAT(now(),'%d/%m/%Y'),DATE_FORMAT(now(),'%H:%i:%s'),now(),'\".$x_array_pedido_header['mesa'].\"','\".$numpedido.\"','\".$correlativo_dia.\"','\".$x_array_pedido_header['referencia'].\"','\".$importe_subtotal.\"','\".$importe_total.\"',\".$solo_llevar.\",\".$tipo_consumo.\",\".$x_array_pedido_header['idcategoria'].\",\".$x_array_pedido_header['reservar'].\",\".$_SESSION['idusuario'].\",'\". $x_array_pedido_header['subtotales_tachados'] .\"',\".$estado_p.\",'\".$json_datos_delivery.\"')\";\n $id_pedido=$bd->xConsulta_UltimoId($sql);\n \n\t\t}else{\n\t\t\t//actualiza monto\n\t\t\t$sql=\"update pedido set total=FORMAT(total+\".$xarr['ImporteTotal'].\",2), subtotales_tachados = '\".$x_array_pedido_header['subtotales_tachados'].\"' where idpedido=\".$id_pedido;\n\t\t\t$bd->xConsulta_NoReturn($sql);\n }\n\n //armar sql completos\n\t\t//remplazar ? por idpedido\n\t\t$sql_subtotales = str_replace(\"?\", $id_pedido, $sql_subtotales);\n\t\t$sql_pedido_detalle = str_replace(\"?\", $id_pedido, $sql_pedido_detalle);\n\n\t\t//saca el ultimo caracter ','\n\t\t$sql_subtotales=substr ($sql_subtotales, 0, -1);\n\t\t$sql_pedido_detalle=substr ($sql_pedido_detalle, 0, -1);\n\n\t\t//pedido_detalle\n\t\t$sql_pedido_detalle='insert into pedido_detalle (idpedido,idtipo_consumo,idcategoria,idcarta_lista,iditem,idseccion,cantidad,cantidad_r,punitario,ptotal,ptotal_r,descripcion,procede,procede_tabla) values '.$sql_pedido_detalle;\n\t\t//pedido_subtotales\n\t\t$sql_subtotales='insert into pedido_subtotales (idpedido,idorg,idsede,descripcion,importe, tachado) values '.$sql_subtotales;\n\t\t// echo $sql_pedido_detalle;\n\t\t//ejecutar\n //$sql_ejecuta=$sql_pedido_detalle.'; '.$sql_sub_total.';'; // guarda pedido detalle y pedido subtotal\n $bd->xConsulta_NoReturn($sql_pedido_detalle.';');\n\t\t$bd->xConsulta_NoReturn($sql_subtotales.';');\n\t\t\n\t\t// $x_array_pedido_header['id_pedido'] = $id_pedido; // si viene sin id pedido\n\t\t$x_idpedido = $id_pedido;\n\n\t\t// SI ES PAGO TOTAL\n\t\tif ( strrpos($x_from, \"b\") !== false ) { $x_from = str_replace('b','',$x_from); cocinar_pago_total(); }\n\n\t\t\n\t\t// $x_respuesta->idpedido = $id_pedido; \n\t\t// $x_respuesta->numpedido = $numpedido; \n\t\t// $x_respuesta->correlativo_dia = $correlativo_dia; \n\t\t\n\t\t$x_respuesta = json_encode(array('idpedido' => $id_pedido, 'numpedido' => $numpedido, 'correlativo_dia' => $correlativo_dia));\n\t\tprint $x_respuesta.'|';\n\t\t// $x_respuesta = ['idpedido' => $idpedido];\n\t\t// print $id_pedido.'|'.$numpedido.'|'.$correlativo_dia;\n\t\t\n\t}", "private function updateCommesse()\n {\n //Rielabora\n $preventivatore = $this->getPreventivatore();\n $result = $preventivatore->elabora();\n $imponibile = $result['prezzo_cliente_senza_iva'];\n $iva = $result['prezzo_cliente_con_iva'] - $result['prezzo_cliente_senza_iva'];\n $importo_trasportatore = $result['costo_trazione'];\n $importo_depositario = $result['deposito'];\n $importo_traslocatore_partenza = $result['costo_servizio_smontaggio_imballo_carico'] + $result['costo_servizio_imballo_carico'];\n $importo_traslocatore_destinazione = $result['costo_servizio_scarico'] + $result['costo_servizio_salita'] + $result['costo_servizio_montaggio'];\n\n $totali = array();\n $totali[$this->id_trasportatore] = 0;\n $totali[$this->id_depositario] = 0;\n $totali[$this->id_traslocatore_destinazione] = 0;\n $totali[$this->id_traslocatore_partenza] = 0;\n\n $totaliMC = array();\n $totaliMC[$this->id_trasportatore] = 0;\n $totaliMC[$this->id_depositario] = 0;\n $totaliMC[$this->id_traslocatore_destinazione] = 0;\n $totaliMC[$this->id_traslocatore_partenza] = 0;\n\n\n $totali[$this->id_trasportatore] = $totali[$this->id_trasportatore] + $importo_trasportatore;\n $totali[$this->id_depositario] = $totali[$this->id_depositario] + $importo_depositario;\n $totali[$this->id_traslocatore_partenza] = $totali[$this->id_traslocatore_partenza] + $importo_traslocatore_partenza;\n $totali[$this->id_traslocatore_destinazione] = $totali[$this->id_traslocatore_destinazione] + $importo_traslocatore_destinazione;\n\n\n $mc = $preventivatore->getMC();\n\n $totaliMC[$this->id_trasportatore] = $totaliMC[$this->id_trasportatore] + $mc['mc_da_trasportare'];\n $totaliMC[$this->id_depositario] = $totaliMC[$this->id_depositario] + $mc['mc_da_trasportare'];\n $totaliMC[$this->id_traslocatore_destinazione] = $totaliMC[$this->id_traslocatore_destinazione] + $mc['mc_smontaggio'] + $mc['mc_no_smontaggio'];\n $totaliMC[$this->id_traslocatore_partenza] = $totaliMC[$this->id_traslocatore_partenza] + $mc['mc_da_rimontare'] + $mc['mc_scarico_salita_piano'];\n\n\n $imponibile = round($totali[$this->id_trasportatore]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_trasportatore] - $imponibile,2);\n\n $ordine_trasportatore = new OrdineFornitore($this->id_preventivo, $this->id_trasportatore, $totali[$this->id_trasportatore], $imponibile, $iva, $totaliMC[$this->id_trasportatore], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASPORTO);\n $ordine_trasportatore->save();\n\n $imponibile = round($totali[$this->id_traslocatore_partenza]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_partenza] - $imponibile,2);\n $ordine_traslocatore_partenza = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_partenza, $totali[$this->id_traslocatore_partenza], $imponibile, $iva, $totaliMC[$this->id_traslocatore_destinazione], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_PARTENZA);\n $ordine_traslocatore_partenza->save();\n\n $imponibile = round($totali[$this->id_traslocatore_destinazione]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_destinazione] - $imponibile,2);\n $ordine_traslocatore_destinazione = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_destinazione, $totali[$this->id_traslocatore_destinazione], $imponibile, $iva, $totaliMC[$this->id_traslocatore_partenza], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_DESTINAZIONE);\n $ordine_traslocatore_destinazione->save();\n\n if ($this->giorni_deposito> 10)\n {\n $imponibile = round($totali[$this->id_depositario]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_depositario] - $imponibile,2);\n\n $ordine_depositario = new OrdineFornitore($this->id_preventivo, $this->id_depositario, $totali[$this->id_depositario], $imponibile, $iva, $totaliMC[$this->id_depositario], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_DEPOSITO);\n $ordine_depositario->save();\n\n }\n\n $con = DBUtils::getConnection();\n $sql =\"UPDATE preventivi SET\n importo_commessa_trasportatore ='\".$totali[$this->id_trasportatore].\"',\n importo_commessa_traslocatore_partenza ='\".$totali[$this->id_traslocatore_partenza].\"',\n importo_commessa_traslocatore_destinazione ='\".$totali[$this->id_traslocatore_destinazione].\"',\n importo_commessa_depositario ='\".$totali[$this->id_depositario].\"',\n imponibile ='\".$imponibile.\"',\n iva ='\".$iva.\"'\n WHERE id_preventivo=\".$this->id_preventivo;\n\n $res = mysql_query($sql);\n\n\n DBUtils::closeConnection($con);\n\n }", "private function getPrecosPorClientes($produtos)\n {\n\n $menus = [];\n $cursos = [];\n $precosCurso = [];\n $precosMenus = [];\n\n foreach ($produtos as $produto) {\n if ($produto->produto_tipo == BuscaConstants::BUSCA_TIPO_MENU) {\n $menus[] = $produto->produto_id;\n } else {\n $cursos[] = $produto->produto_id;\n }\n }\n\n if (count($menus) > 0) {\n $precosMenus = Query::fetch('Busca/QryBuscarPrecosMenus', ['id_menu' => $menus]);\n }\n\n if (count($cursos) > 0) {\n $precosCurso = Query::fetch('Busca/QryBuscarPrecosCursos', ['id_curso' => $cursos]);\n }\n\n $agrupadoPorIdMenu = [];\n $agrupadoPorIdCurso = [];\n\n foreach ($precosMenus as $precoMenu) {\n $agrupadoPorIdMenu[$precoMenu->id_menu][$precoMenu->qtd_minima_clientes] = $precoMenu->preco;\n }\n\n foreach ($precosCurso as $precoCurso) {\n $agrupadoPorIdCurso[$precoCurso->id_curso][$precoCurso->qtd_minima_clientes] = $precoCurso->preco;\n }\n\n foreach ($produtos as &$produto) {\n $preco = $produto->produto_preco;\n $precosFinais = [];\n $agrupadorLoop = null;\n $counter = 0;\n $ultimoQtdPessoas = 1;\n\n if ($produto->produto_tipo == BuscaConstants::BUSCA_TIPO_MENU && isset($agrupadoPorIdMenu[$produto->produto_id])) {\n $agrupadorLoop = $agrupadoPorIdMenu[$produto->produto_id];\n } else if ($produto->produto_tipo == BuscaConstants::BUSCA_TIPO_CURSO && isset($agrupadoPorIdCurso[$produto->produto_id])) {\n $agrupadorLoop = $agrupadoPorIdCurso[$produto->produto_id];\n }\n\n if (is_null($agrupadorLoop)) {\n continue;\n }\n\n foreach ($agrupadorLoop as $qtdPessoas => $valor) {\n $counter++;\n if ($qtdPessoas == 1) continue;\n $descricao = \"$ultimoQtdPessoas a \" . ($qtdPessoas - 1);\n\n if ($ultimoQtdPessoas == ($qtdPessoas - 1)) {\n $descricao = $ultimoQtdPessoas;\n }\n\n if ($counter == count($agrupadorLoop)) {\n if (empty($precosFinais)) {\n $precosFinais[] = ['preco' => $preco, 'qtd' => $descricao];\n } else {\n $precosFinais[] = ['preco' => $valor, 'qtd' => $descricao];\n }\n\n $precosFinais[] = ['preco' => $valor, 'qtd' => \"$qtdPessoas+\"];\n } else {\n $precosFinais[] = ['preco' => empty($precosFinais) ? $preco : $valor, 'qtd' => $descricao];\n }\n\n $ultimoQtdPessoas = $qtdPessoas;\n }\n\n $produto->precos = $precosFinais;\n\n }\n\n return $produtos;\n\n }", "function graficaIncidenciasMesActual($conexion){\n\t$sql = \"SELECT a.nombre as 'NOMBRE', count(m.id) AS'NUMERO' from mes_area m INNER JOIN area a ON a.id = m.id_area where '2020-10-01' > m.fecha_entrada and '2020-10-01' < m.fecha_salida OR m.fecha_salida is null GROUP BY m.id_AREA\";\n\n\t$resultados = mysqli_query($conexion, $sql);\n\t//$labels = mysqli_fetch_array($resultados);\n \t$i=0;\n\t$data=\"\";\n\twhile ($row = mysqli_fetch_assoc($resultados)) {\n\t\tif ($i==0) {\n\t\t\t$data .= $row['NOMBRE'] .'||'.$row['NUMERO'].'||'; \n\t\t}\n\t}\n\t\treturn $data;\n}", "function ordenaPorFechas($mes, $anno, $kategoria, $quePais) // a este se le entra con el username\n {\ninclude ('cajitaCurso.php'); //archivo donde esta la funcion que tira la cajita\n//contador\n$sqlContador = \"SELECT count(*) FROM cursos LEFT JOIN fechas ON fechas.idcurso = cursos.id where cursos.categoria LIKE '%$kategoria%' AND MONTH(fechas.fechainicio) LIKE $mes AND YEAR(fechas.fechainicio) LIKE $anno AND cursos.pais LIKE '$quePais' ORDER BY fechas.fechainicio \";\n\n// ESTE ES CUANDO ESTA DEMASIADO LLENO $sqlContador = \"SELECT count(*) FROM cursos LEFT JOIN fechas ON fechas.idcurso = cursos.id where cursos.categoria LIKE '%$kategoria%' AND MONTH(fechas.fechainicio) LIKE $mes AND YEAR(fechas.fechainicio) LIKE $anno AND cursos.pais LIKE '$quePais' AND fechas.fechainicio >= NOW() ORDER BY fechas.fechainicio ASC\";\n\n\n\n$count = mysql_fetch_row(mysql_query($sqlContador)) or die(\"Query failed : \" . mysql_error() . mysql_errno());\nglobal $contadorGeneral;\n$contadorGeneral = $count[0];\n//echo $contadorGeneral;\n\n//contador\t\n\t$sql = \"SELECT * FROM cursos LEFT JOIN fechas ON fechas.idcurso = cursos.id where cursos.categoria LIKE '%$kategoria%' AND MONTH(fechas.fechainicio) LIKE $mes AND YEAR(fechas.fechainicio) LIKE $anno AND cursos.pais LIKE '$quePais' ORDER BY fechas.fechainicio DESC LIMIT \".DondeComienzo().\", \".MAXCAJITAS.\"\";\n\n// ESTE ES CUANDO ESTA DEMASIADO LLENO $sql = \"SELECT * FROM cursos LEFT JOIN fechas ON fechas.idcurso = cursos.id where cursos.categoria LIKE '%$kategoria%' AND MONTH(fechas.fechainicio) LIKE $mes AND YEAR(fechas.fechainicio) LIKE $anno AND cursos.pais LIKE '$quePais' AND fechas.fechainicio >= NOW() ORDER BY fechas.fechainicio ASC LIMIT \".DondeComienzo().\", \".MAXCAJITAS.\"\";\n\n\n//echo $sql;\n$result = mysql_query($sql) or die(\"Query failed : \" . mysql_error() . mysql_errno()); \nwhile ($row = mysql_fetch_array($result))\n {\n\t\t\t CajitaCursoLlena($row['idcurso'], convierte_fecha($row['fechainicio']));\t\n\t\t\t}\n}", "public function calculaMovimientos($insumos){\n\n\t\t$movimientos = [];\n\t\t$groups = [];\n\n\t\t//Calcula los lotes de los insumos a realizar movimientos utilizando el metodo fefo,\n\t\t//Si este posee lotes en los registros y su lote no ha sido especificado.\n\t\tforeach ($insumos as $insumo) {\n\n\t\t\tif( array_search($insumo['id'], array_column($movimientos, 'id')) !== false )\n\t\t\t\tcontinue;\n\n\t\t\tif( $this->hasLote($insumo) ){\n\n\t\t\t\t$insumoMovimientos = array_filter($insumos, function($element) use ($insumo){\n\t\t\t\t\treturn $element['id'] == $insumo['id'];\n\t\t\t\t});\n\n\t\t\t\tif( !empty($this->filterInsumosLote($insumoMovimientos, false)) ){\n\t\t\t\t\t$insumoMovimientos = $this->fefo($insumo['id'], $insumoMovimientos);\n\t\t\t\t}\n\n\t\t\t\t$movimientos = array_merge($movimientos, $insumoMovimientos);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tarray_push($movimientos, $insumo);\n\t\t\t}\n\t\t}\n\n\t\t//Agrupa los lotes de los movimientos de insumos.\n\t\tforeach ($movimientos as $movimiento){\n\n\t\t\tif(isset($movimiento['lote']) && !empty($movimiento['lote'])){\n\n\t\t\t\t$calculado = array_filter($groups, function($element) use ($movimiento){\n\t \t\t\t\treturn $element['id'] == $movimiento['id'] && $element['lote'] == $movimiento['lote'];\n\t\t\t\t});\n\n\t\t\t\tif( !empty($calculado) )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$lotes = array_filter($movimientos, function($element) use ($movimiento){\n\t \t\t\t\treturn $element['id'] == $movimiento['id'] && $element['lote'] == $movimiento['lote'];\n\t\t\t\t});\n\n\t\t\t\t$despachado = 0;\n\t\t\t\t$solicitado = 0;\n\n\t\t\t\tforeach ($lotes as $lote) {\n\t\t\t\t\t$despachado += $lote['despachado'];\n\t\t\t\t\t$solicitado += $lote['solicitado'];\n\t\t\t\t}\n\n\t\t\t\t$movimiento['despachado'] = $despachado;\n\t\t\t\t$movimiento['solicitado'] = $solicitado;\n\t\t\t}\n\n\t\t\tarray_push($groups, $movimiento);\n\t\t}\n\n\t\t//Devuelve un arreglo con todos los movimientos de insumos a realizar\n\t\t//con lotes espeficicados y cantidades. Nota: Si no pose lote un movimiento de insumo en el arreglo\n\t\t//sera debido a que no posee lotes en los registros de lotes.\n\t\treturn $groups;\n\t}", "function desglose_transito_por_tipo_envio($id_categoria) {\r\n\r\n\t$query = \"SELECT count(*) FROM tipoenvio\";\r\n\t$result = mysql_query($query);\r\n\t$row = mysql_fetch_array($result);\r\n\r\n\t$cant_tipo_envios = $row[0];\r\n\r\n\t$query = \"SELECT oi.id_tipo_envio, sum(oi.cantidad_pendiente) as pendiente\r\n\t\tFROM ordenitem oi join item i on oi.id_item = i.id_item join orden o on o.id_orden = oi.id_orden join tipoenvio te on te.id_tipo_envio = oi.id_tipo_envio\r\n\t\tWHERE i.id_categoria = $id_categoria and o.id_status = 1 and oi.cantidad_pendiente > 0\r\n\t\tGROUP BY oi.id_tipo_envio\r\n\t\tORDER BY te.orden, oi.id_tipo_envio\";\r\n\t$result = mysql_query($query);\r\n\r\n\t$count=0;\r\n\t$en_transito = array();\r\n\twhile ($row = mysql_fetch_array($result))\r\n\t{\r\n\t\tif($count==$row[0]) {\r\n\t\t\tarray_push($en_transito, array($row[0], $row[1]));\r\n\t\t}\r\n\t\telse {\r\n\t\t\twhile($count < $row[0])\r\n\t\t\t{\r\n\t\t\t\tarray_push($en_transito, array($count, 0));\r\n\t\t\t\t$count++;\r\n\t\t\t}\r\n\t\t\tarray_push($en_transito, array($row[0], $row[1]));\r\n\t\t}\r\n\r\n\t\t$count++;\r\n\t}\r\n\r\n\twhile($count < $cant_tipo_envios) {\r\n\t\tarray_push($en_transito, array($count, 0));\r\n\t\t$count++;\r\n\t}\r\n\r\n\t$codigo=\"\"; $trans_desc=0;\r\n\tforeach ($en_transito as $item)\r\n\t{\r\n\t\tif($item[0] > 0) {\r\n\t\t\t$codigo .= \"<td>$item[1]</td>\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$trans_desc = $item[1];\r\n\t\t}\r\n\t}\r\n\r\n\t$codigo .= \"<td>$trans_desc</td>\";\r\n\r\n\treturn $codigo;\r\n}", "function valore_costo_trasporto_ordine_amico($id_ordine,$id_user,$id_amico){\r\n $valore_globale_attuale_netto_qarr = valore_totale_ordine_qarr($id_ordine);\r\n $valore_personale_attuale_netto_qarr = valore_netto_singolo_amico($id_ordine,$id_user,$id_amico);\r\n $percentuale_mio_ordine = ($valore_personale_attuale_netto_qarr / $valore_globale_attuale_netto_qarr) *100;\r\n $costo_globale_trasporto = valore_trasporto($id_ordine,100);\r\n $costo_trasporto = ($costo_globale_trasporto / 100) * $percentuale_mio_ordine;\r\n return (float)$costo_trasporto;\r\n}", "function selectConciertosEspera(){\n $c = conectar();\n $select = \"select CONCIERTO.FECHA as FECHA, CONCIERTO.HORA as HORA, LOCALES.UBICACION as UBICACION, GENERO.NOMBRE as GENERO, USUARIOS.NOMBRE as NOMBRE, CIUDAD.NOMBRE as CIUDAD, CONCIERTO.ID_CONCIERTO as ID from CONCIERTO \n inner join LOCALES on CONCIERTO.ID_LOCAL = LOCALES.ID_LOCAL\n inner join USUARIOS on LOCALES.ID_USUARIO = USUARIOS.ID_USUARIO\n inner join CIUDAD on USUARIOS.ID_CIUDAD = CIUDAD.ID_CIUDAD\n inner join GENERO on CONCIERTO.ID_GENERO = GENERO.ID_GENERO where CONCIERTO.ESTADO=0 order by CONCIERTO.FECHA,CONCIERTO.HORA\";\n $resultado = mysqli_query($c, $select);\n desconectar($c);\n return $resultado;\n\n}", "public function obtenerRegistroFaltantesCompraScot()\n {\n\n $sql = $this->getAdapter()->select()->from(array('ai' => 'anuncio_impreso'),\n array('id_cac' => 'cac.id', 'id_compra' => 'c.id', 'adecsys_code' => 'cac.adecsys_code',\n 'medPub' => 'cac.medio_publicacion'))\n ->joinInner(array('c' => 'compra'), 'c.id = ai.id_compra', null)\n ->joinInner(array('t' => 'tarifa'), 't.id = c.id_tarifa', null)\n ->joinInner(array('p' => 'producto'), 't.id_producto = p.id', null)\n ->joinInner(array('cac' => 'compra_adecsys_codigo'),\n 'cac.id_compra = c.id', null)\n ->where('p.tipo = ?', self::TIPO_PREFERENCIAL)\n ->where('c.estado = ?', self::ESTADO_PAGADO)\n ->where('c.id_tarifa <> ?', Application_Model_Tarifa::GRATUITA)\n ->where('year(c.fh_confirmacion) >= ?', date('Y'))\n ->where('cac.medio_publicacion <> ?',\n Application_Model_CompraAdecsysCodigo::MEDIO_PUB_TALAN_COMBO)\n ->where('(cac.adecsys_code is not null and cac.adecsys_code <> 0 and cac.adecsys_code not like ?)',\n '%Informix%')\n ->where('(cod_scot_aptitus IS NULL AND cod_scot_talan IS NULL)')\n ->where('ai.cod_scot_aptitus is null')\n ->where('c.medio_pago in (?)',\n array(self::FORMA_PAGO_VISA, self::FORMA_PAGO_PAGO_EFECTIVO,\n self::FORMA_PAGO_MASTER_CARD, self::FORMA_PAGO_CREDITO))\n ->where('DATEDIFF(CURDATE(),c.fh_confirmacion) <= ?', 10)\n ->where('t.meses is null')\n //->where('c.id = ?', $id)\n ->order('c.id desc');\n\n return $this->getAdapter()->fetchAll($sql);\n }", "public function verPuntosConductor ($id_User){\r\n $this->db->query(\"SELECT * FROM viaje WHERE conductor_id = '$id_User' AND borrado_logico='-1'\");\r\n $res1 = $this->db->registrorowCount();\r\n $this->db->query(\"SELECT SUM(b.calificacion_conductor) AS suma \r\n FROM viaje a LEFT JOIN pasajero b ON a.id = b.viaje_id\r\n WHERE a.conductor_id = '$id_User'\r\n \");\r\n $suma = $this->db->registro()->suma - $res1;\r\n return $suma;\r\n }", "function calculer_boucle($id_boucle, &$boucles) {\n\n\t// gerer les statuts si declares pour cette table\n\t/*\n\t$table_statut[nom_table][] = array(\n\t\t'champ'=>'statut', // champ de la table sur lequel porte le filtrage par le statut\n\t\t'publie'=>'publie', // valeur ou liste de valeurs, qui definissent l'objet comme publie.\n\t\t'previsu'=>'publie,prop', // valeur ou liste de valeurs qui sont visibles en previsu\n\t\t'post_date'=>'date', // un champ de date pour la prise en compte des post_dates, ou rien sinon\n\t 'exception'=>'statut', // liste des modificateurs qui annulent le filtrage par statut\n\t // si plusieurs valeurs : array('statut','tout','lien')\n\t);\n\n\tPour 'publier' ou 'previsu', si la chaine commence par un \"!\" on exclu au lieu de filtrer sur les valeurs donnees\n\tsi la chaine est vide, on ne garde rien si elle est seulement \"!\" on n'exclu rien\n\n\tSi le statut repose sur une jointure, 'champ' est alors un tableau du format suivant :\n\t'champ'=>array(\n\t array(table1, cle1),\n\t ...\n\t array(tablen, clen),\n\t champstatut\n\t )\n\n\tchampstatut est alors le champ statut sur la tablen\n\tdans les jointures, clen peut etre un tableau pour une jointure complexe : array('id_objet','id_article','objet','article')\t \n\t*/\n\n\t$boucle = &$boucles[$id_boucle];\n\t$id_table = $boucle->id_table;\n\t$table_sql = $boucle->from[$id_table];\n\tif (isset($GLOBALS['table_statut'][$table_sql])){\n\t\tforeach($GLOBALS['table_statut'][$table_sql] as $s){\n\t\t\t// Restreindre aux elements publies si pas de {statut} ou autre dans les criteres\n\t\t\t$filtrer = true;\n\t\t\tif (isset($s['exception'])) {\n\t\t\t\tforeach(is_array($s['exception'])?$s['exception']:array($s['exception']) as $m) {\n\t\t\t\t\tif (isset($boucle->modificateur[$m]) OR isset($boucle->modificateur['criteres'][$m])) {\n\t\t\t\t\t\t$filtrer = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($filtrer) {\n\t\t\t\tif (is_array($s['champ'])){\n\t\t\t\t\t$statut = preg_replace(',\\W,','',array_pop($s['champ'])); // securite\n\t\t\t\t\t$jointures = array();\n\t\t\t\t\tforeach($s['champ'] as $j) {\n\t\t\t\t\t\t$jointures[] = array('',array($id=reset($j)),end($j));\n\t\t\t\t\t}\n\t\t\t\t\t$jointures[0][0] = $id_table;\n\t\t\t\t\tif (!array_search($id, $boucle->from)){\n\t\t\t\t\t\tfabrique_jointures($boucle, $jointures, true, $boucle->show, $id_table);\n\t\t\t\t\t}\n\t\t\t\t\t// trouver l'alias de la table d'arrivee qui porte le statut\n\t\t\t\t\t$id = array_search($id, $boucle->from);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$id = $id_table;\n\t\t\t\t\t$statut = preg_replace(',\\W,','',$s['champ']); // securite\n\t\t\t\t}\n\t\t\t\t$mstatut = $id .'.'.$statut;\n\n\t\t\t\tif (!$GLOBALS['var_preview']) {\n\t\t\t\t\tif (isset($s['post_date']) AND $s['post_date']\n\t\t\t\t\t\tAND $GLOBALS['meta'][\"post_dates\"] == 'non'){\n\t\t\t\t\t\t$date = $id.'.'.preg_replace(',\\W,','',$s['post_date']); // securite\n\t\t\t\t\t\tarray_unshift($boucle->where,\"quete_condition_postdates('$date')\");\n\t\t\t\t\t}\n\t\t\t\t\tarray_unshift($boucle->where,calculer_where_statut($mstatut,$s['publie']));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tarray_unshift($boucle->where,calculer_where_statut($mstatut,$s['previsu']));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\n\t$boucles[$id_boucle] = pipeline('post_boucle', $boucles[$id_boucle]);\n\n\t// en mode debug memoriser les premiers passages dans la boucle,\n\t// mais pas tous, sinon ca pete.\n\tif (_request('var_mode_affiche') != 'resultat') \n\t\t$trace = '';\n\telse {\n\t\t$trace = $boucles[$id_boucle]->descr['nom'] . $id_boucle;\n\t\t$trace = \"if (count(@\\$GLOBALS['debug_objets']['resultat']['$trace'])<3)\n\t \\$GLOBALS['debug_objets']['resultat']['$trace'][] = \\$t0;\";\n\t}\n\treturn ($boucles[$id_boucle]->type_requete == 'boucle')\n\t? calculer_boucle_rec($id_boucle, $boucles, $trace) \n\t: calculer_boucle_nonrec($id_boucle, $boucles, $trace);\n}", "public function colaboradores_sem_competencia(){\n //where ((B.data_inserida-'$data') && (C.data_inserida-'$data') )>tempo_sem_atualizar\n return $this->db->query(\"select * from colaboradores A where not exists (select * from competencias_colaboradores B where A.ID_colaborador=B.colaboradores_id_colaborador) and status_colaborador=0\");\n }", "function Cuerpo($acceso,$where)\n\t{\n\t\t$acceso->objeto->ejecutarSql(\"select id_persona from vista_orden order By id_orden desc LIMIT 1 offset 0\");\n\t\tif($row=row($acceso))\n\t\t{\n\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t}\n\t\telse{\n\t\t\t$acceso->objeto->ejecutarSql(\"select *from vista_tecnico LIMIT 1 offset 0\");\n\t\t\tif($row=row($acceso))\n\t\t\t{\n\t\t\t\t$tecnico=trim($row[\"id_persona\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\n\t\n\t\n\t\t$w=$this->TituloCampos();\n\t\t\n\t\t$dato=lectura($acceso,$where);\n\t\n\t\t$this->SetFont('Arial','',8);\n\t\t$cont=1;\n\t\t\n\t\t\n\t\t$salto=0;\n\t\t$f_act=date(\"d/m/Y\");\n\t\t$h_act=date(\"h:i:s A\");\n\t\t$nombre_zona=utf8_decode(trim($dato[0][\"nombre_zona\"]));\n\t\t$nombre_sector=utf8_decode(trim($dato[0][\"nombre_sector\"]));\n\t\t\n\t\t$cad=\"{\\\\rtf1\\\\ansi\\\\ansicpg1252\\\\deff0\\\\deflang11274{\\\\fonttbl{\\\\f0\\\\fswiss\\\\fcharset0 Arial;}}\n{\\\\*\\\\generator Msftedit 5.41.15.1512;}\\\\viewkind4\\\\uc1\\\\pard\\\\tx1988\\\\f0\\\\fs32 hola\\\\par\n\";\n\t\tfor($i=0;$i<count($dato);$i++){\n\t\t\t$this->SetTextColor(0);\n\t\t\t$this->SetFillColor(249,249,249);\n\t\t\t\n\t\t\t$id_contrato=trim($dato[$i][\"id_contrato\"]);\n\t\t//\tordenDeCorte($acceso,$id_contrato,$tecnico);\n\t\t\t\n\t\t\t$this->SetX(10);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->SetX(10);\n\t\t\t$this->Cell($w[0],5,$cont,\"1\",0,\"C\",$fill);\n\t\t\t$nro_contrato=trim($dato[$i][\"nro_contrato\"]);\n\t\t\t$cedula=trim($dato[$i][\"cedula\"]);\n\t\t\t$nombre=utf8_decode(trim($dato[$i][\"nombre\"]).\" \".trim($dato[$i][\"apellido\"]));\n\t\t\t$etiqueta=utf8_decode(trim($dato[$i][\"etiqueta\"]));\n\t\t\t$telefono=utf8_decode(trim($dato[$i][\"telefono\"]));\n\t\t\t$deuda=number_format(trim($dato[$i][\"deuda\"])+0, 2, ',', '.');\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,5,strtoupper(_(\"zona\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$this->Cell(40,5,utf8_decode(trim($dato[$i][\"nombre_zona\"])),\"TBR\",0,\"J\",$fill);\n\t\t\t$nombre_zona=utf8_decode(trim($dato[$i][\"nombre_zona\"]));\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(14,5,strtoupper(_(\"sector\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$nombre_sector=utf8_decode(trim($dato[$i][\"nombre_sector\"]));\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(12,5,strtoupper(_(\"calle\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$nombre_calle=utf8_decode(trim($dato[$i][\"nombre_calle\"]));\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(17,5,strtoupper(_(\"nro casa\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$num_casa=utf8_decode(trim($dato[$i][\"numero_casa\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,5,strtoupper(_(\"edif\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$edificio=utf8_decode(trim($dato[$i][\"edificio\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(10,5,strtoupper(_(\"piso\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$n_p=utf8_decode(trim($dato[$i][\"numero_piso\"]));\n\t\t\n\t\t\t$this->SetFont('Arial','B',8);\n\t\t\t$this->Cell(8,5,strtoupper(_(\"ref\")).\": \",\"TLB\",0,\"J\",$fill);\n\t\t\t$this->SetFont('Arial','',8);\n\t\t\t$direc_adicional=utf8_decode(trim($dato[$i][\"direc_adicional\"]));\n\t\t\t//$this->MultiCell(81,5,utf8_decode(trim($dato[$i][\"direc_adicional\"])),'TR','J');\n\t\t\t$this->SetFont('Arial','',2);\n\t\t\t$this->Ln();\n\t\t\t$this->SetX(114);\n\t\t//\t$this->Cell(89,3,'',\"LR\",0,\"C\",$fill);\n\t\t\t//$this->Cell(array_sum($w),3,'',\"RL\",0,\"C\",$fill);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->Ln();\n\t\t\t$fill=!$fill;\n\t\t\t\n\t\t\t$salto++;\n\t\t\tif($salto==11 && $salto!=count($dato)){\n\t\t\t\t$this->AddPage();\n\t\t\t\t\n\t\t\t\t$w=$this->TituloCampos();\n\t\t\t\t$salto=0;\n\t\t\t}\n\t\t\t\n\t\t\t$cad.=\"$nro_contrato \\\\tab $nro_contrato \\\\tab\n\";\n\t\t$cont++;\n\t\t}\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(array_sum($w),5,'','T');\n\t\t$cad.=\"}\n\";\n\t\treturn $cad;\n\t}", "function getCoResponsables($style = \"ficha\", $TipoDeResponsables = \"5004\", $documento = false){\n\t\t$arrEQBase_vs_Tipos\t\t= array (\n\t\t\t\t\t\t\t\t\t\t\"5004\"\t\t\t=> 5004,\n\t\t\t\t\t\t\t\t\t\t\"5002\" \t\t\t=> 5002,\n\t\t\t\t\t\t\t\t\t\t\"solidarios\" \t=> 5004,\n\t\t\t\t\t\t\t\t\t\t\"avales\" \t\t=> 5002\n\t\t\t\t\t\t\t\t\t\t);\n\t\t$arrEQTituloF\t\t\t= array (\n\t\t\t\t\t\t\t\t\t\t\"5004\"\t\t\t=> \"EL OBLIGADO SOLIDARIO\",\n\t\t\t\t\t\t\t\t\t\t\"5002\" \t\t\t=> \"EL AVAL\",\n\t\t\t\t\t\t\t\t\t\t\"solidarios\" \t=> \"EL OBLIGADO SOLIDARIO\",\n\t\t\t\t\t\t\t\t\t\t\"avales\" \t\t=> \"EL AVAL\"\n\t\t\t\t\t\t\t\t\t\t);\n\t\t$codigo_de_base\t\t= $arrEQBase_vs_Tipos[ $TipoDeResponsables ];\n\t\t$ByDocumento\t= \"\";\n\t\tif ( $documento != false ){\n\t\t\t$ByDocumento\t= \" AND `socios_relaciones`.`credito_relacionado` = $documento \";\n\t\t}\n\n\t\t$sql = \"SELECT socios_relaciones.idsocios_relaciones AS 'num',\n\t\t\t\t\t\tsocios_relacionestipos.descripcion_relacionestipos AS 'relacion',\n\t\t\t\t\t\tsocios_consanguinidad.descripcion_consanguinidad AS 'consanguinidad',\n\t\t\t\t\t\tCONCAT(socios_relaciones.nombres ,' ', socios_relaciones.apellido_paterno, ' ', socios_relaciones.apellido_materno) AS 'nombre',\n\t\t\t\t\t\tsocios_relaciones.curp AS 'curp',\n\t\t\t\t\t\tCONCAT(socios_relaciones.telefono_residencia, '; ' , socios_relaciones.telefono_movil) AS 'telefonos',\n\t\t\t\t\t\tsocios_relaciones.domicilio_completo AS 'domicilio',\n\t\t\t\t\t\t`socios_relaciones`.`numero_socio`\n\t\t\t\tFROM\n\t\t\t\t\t`socios_relaciones` `socios_relaciones`\n\t\t\t\t\t\tINNER JOIN `eacp_config_bases_de_integracion_miembros`\n\t\t\t\t\t\t`eacp_config_bases_de_integracion_miembros`\n\t\t\t\t\t\tON `socios_relaciones`.`tipo_relacion` =\n\t\t\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`miembro`\n\t\t\t\t\t\t\tINNER JOIN `socios_relacionestipos` `socios_relacionestipos`\n\t\t\t\t\t\t\tON `socios_relaciones`.`tipo_relacion` = `socios_relacionestipos`.\n\t\t\t\t\t\t\t`idsocios_relacionestipos`\n\t\t\t\t\t\t\t\tINNER JOIN `socios_consanguinidad` `socios_consanguinidad`\n\t\t\t\t\t\t\t\tON `socios_relaciones`.`consanguinidad` =\n\t\t\t\t\t\t\t\t`socios_consanguinidad`.`idsocios_consanguinidad`\n\n\t\t\t\tWHERE\n\t\t\t\t\t(`socios_relaciones`.`socio_relacionado` = \" . $this->mCodigo . \")\n\t\t\t\t\tAND\n\t\t\t\t\t(`eacp_config_bases_de_integracion_miembros`.`codigo_de_base` = $codigo_de_base )\n\t\t\t\t\t$ByDocumento\n\t\t\t\tORDER BY\n\t\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`codigo_de_base`,\n\t\t\t\t\t`socios_relaciones`.`credito_relacionado`\t\";\n\t\t$rs \t= mysql_query($sql, cnnGeneral());\n\t\t$tbl\t= \"\";\n\t\t$tds\t= \"\";\n\n\t\twhile($rw = mysql_fetch_array($rs)){\n\t\t\tif ($style == \"firmas\"){\n\t\t\t$tds\t.= \"\n\t\t\t\t\t<tr>\n\t\t\t <td>\" . $arrEQTituloF[ $TipoDeResponsables ] . \"</td>\n\t\t\t </tr>\n\t\t\t <tr>\n\t\t\t <td>\n\t\t\t <br /><br /><br /><tr>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t <tr>\n\t\t\t <td>\" . $rw[\"nombre\"] . \"</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\";\n\t\t\t} else {\n\t\t\t\t$tds\t.= \"\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th id=\\\"id-relacion-\" . $rw[\"num\"] . \"\\\" colspan='4'>\" . $rw[\"relacion\"] . \"</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Socio Num.</td>\n\t\t\t\t\t\t\t<th>\" . $rw[\"numero_socio\"] . \"</th>\n\t\t\t\t\t\t\t<td>Consanguinidad</td>\n\t\t\t\t\t\t\t<th>\" . $rw[\"consanguinidad\"] . \"</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Nombre</td>\n\t\t\t\t\t\t\t<td colspan='3'>\" . $rw[\"nombre\"] . \"</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Telefono(s)</td>\n\t\t\t\t\t\t\t<td>\" . $rw[\"telefonos\"] . \"</td>\n\t\t\t\t\t\t\t<td>C.U.R.P.</td>\n\t\t\t\t\t\t\t<td>\" . $rw[\"curp\"] . \"</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Domicilio</td>\n\t\t\t\t\t\t\t<td colspan='3'>\" . $rw[\"domicilio\"] . \"</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\";\n\t\t\t}\n\t\t}\n\t\tif ( $style == \"firmas\"){\n\t\t$tbl = \"\n\t\t\t<table border='0' width='100%' align='center'>\n\t\t\t\t$tds\n\t\t\t</table>\n\t\t\t\";\n\t\t} else {\n\t\t$tbl = \"\n\t\t\t<fieldset>\n\t\t\t<legend>|&nbsp;&nbsp;&nbsp;INFORMACI&Oacute;N DE(LOS) OBLIGADOS SOLIDARIOS&nbsp;&nbsp;&nbsp;|</legend>\n\t\t\t<table border='0' width='100%' align='center'>\n\t\t\t\t$tds\n\t\t\t</table>\n\t\t\t</fieldset>\";\n\t\t}\n\t\treturn $tbl;\n\t}", "public function buscaSecciones($grado,$turno,$anio)\n {\n //se debe buscar las secciones segun el grado y turno en que esten disponibles\n if($turno==\"Matutino\"){$turno=\"1\";};\n if($turno==\"Vespertino\"){$turno=\"2\";};\n if($turno==\"Completo\"){$turno=\"3\";};\n\n \n $match = ['grado' => $grado, 'turnos_id' => $turno,'anios_id'=>$anio];\n $secciones=Grado::where($match)->select('seccion')->groupBy('seccion')->get();\n //PRIMER INTENTO , SE VAN A CONTAR LA CANTIDAD DE GRADOS POR SECCION Y TURNO , SI SALE QUE LA CUENTA ES IGUAL A CUARENTA ENTONCES \n //SE TIENE DEVOLVER VACIO O NULO O UN MENSAJE QUE INDIQUE Q NO HAY SECCIONES DISPONIBLES O ESTAN LLENAS \n \n \n //Que hace?-----\n /*se buscan las secciones registradas para le grado en espesifico el cual se esta consultando\n con esa lista de secciones, luego se busca una lista de secciones que ya se encuentran matriculadas y registradas en la tabla matricula\n para luego contar si ya se llego al limite de matriculaciones , si una seccion llega a su limite se mostrara un mensaje de seccion llena*/\n $matXSeccion[]=0;\n //$matXSeccion = matriculas por seccion\n for($i=0;$i<$secciones->count();$i++){\n $match=['grados.grado'=>$grado,'grados.seccion'=>$secciones[$i]['seccion'],'grados.turnos_id'=>$turno];\n $matXSeccion[$i]=DB::table('matriculas')\n ->join('grados','grados.id','=','matriculas.grados_id')\n ->where($match)\n ->select('matriculas.nombre','grados.seccion','grados.grado','grados.turnos_id','matriculas.grados_id','grados.capacidad')\n ->get(); \n \n }\n \n //matriculas existentes\n $matriExist=Arr::flatten($matXSeccion); //para pasarlo de un arreglo de arreglos a un arreglo normal \n //ya que la consulta con joins devuelve un arreglo agrupado de arreglos para las matriculas de una seccion y de otra\n\n //contadores\n $numMat=count($matriExist);\n $contA=0;$contB=0;$contC=0;\n $arreglo[]=0;\n $capacidadA=0;$capacidadB=0;$capacidadC=0;\n for($i=0;$i<$numMat;$i++){\n if($matriExist[$i]->seccion==\"\\\"A\\\"\" || $matriExist[$i]->seccion==\"\\\"a\\\"\"){\n $contA=40;\n $capacidadA=$matriExist[$i]->capacidad;\n }\n if($matriExist[$i]->seccion==\"\\\"B\\\"\" || $matriExist[$i]->seccion==\"\\\"b\\\"\"){\n $contB++;\n $capacidadB=$matriExist[$i]->capacidad;\n }\n if($matriExist[$i]->seccion==\"\\\"C\\\"\" || $matriExist[$i]->seccion==\"\\\"c\\\"\"){\n $contC++;\n $capacidadC=$matriExist[$i]->capacidad;\n } \n }\n \n for($i=0;$i<$secciones->count();$i++){\n if($capacidadA!=0){\n if($contA==$capacidadA){\n if($secciones[$i]['seccion']==\"\\\"A\\\"\" || $secciones[$i]['seccion']==\"\\\"a\\\"\"){\n $secciones[$i]['seccion']=\"Seccion llena\";\n }\n }\n }\n if($capacidadB!=0){\n if($contB==$capacidadB){\n if($secciones[$i]['seccion']==\"\\\"B\\\"\" || $secciones[$i]['seccion']==\"\\\"b\\\"\"){\n $secciones[$i]['seccion']=\"Seccion llena\";\n }\n }\n } \n if($capacidadC!=0){\n if($contC==$capacidadC){\n if($secciones[$i]['seccion']==\"\\\"C\\\"\" || $secciones[$i]['seccion']==\"\\\"c\\\"\"){\n $secciones[$i]['seccion']=\"Seccion llena\";\n }\n }\n }\n }\n\n\n\n //----------hasta aqui el codigo nuevo sin probar\n \n //return $matriExist;\n //lo que retorna es un objeto $matXSeccion\n //return $matXSeccion[0][1]->seccion;\n //return $contB;\n //return $matriExist[5]->seccion;\n //$secciones[0]['seccion'];\n return $secciones; //ORIGINAL\n }", "function cc_ho_vetrina($agenzia, $rif){\n\tglobal $invetrina;\n\t\n\t// $agenzia qua è il numero interno di Cometa\n\tif( isset( $invetrina[$agenzia] ) ){\t\t\n\t\t\n\t\tif ($invetrina[$agenzia]['imm'] == $rif) {\n\t\t\t// questo immobile è in vetrina\n\t\t\t$vetrina = '1';\n\t\t\tcc_import_immobili_error_log($rif.\" è in vetrina\");\n\t\t\t\n\t\t\t// vediamo se è lo stesso di quello che era già in vetrina o meno\n\t\t\t$oldrif = cc_get_rif_vetrina( substr($rif, 0, 2) );\n\t\t\tcc_import_immobili_error_log(\"oldrif: \".$oldrif);\n\t\t\t\n\t\t\t// se l'immobile attualemnte in vetrina non è questo tolgo quello attuale da vetrina\n\t\t\tif($oldrif != $rif) {\n\t\t\t\tcc_updateVetrina($oldrif); \n\t\t\t\tcc_import_immobili_error_log(\"Tolgo vetrina da \".$oldrif);\n\t\t\t}\n\t\t}else{\n\t\t\t$vetrina = '0';\n\t\t}\t\t\n\t\n\t}else{\n\t\t$vetrina = '0';\n\t}\n\t\n\treturn $vetrina;\n}", "function buscar_comprobante_documento($id_cuenta, $id_anexo, $id_serie, $id_numero ) {\n $sql = \"SELECT\n\t\t\t\t\t prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\t, sum(prosic_detalle_comprobante.importe_soles*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_soles\n\t\t\t\t\t, sum(prosic_detalle_comprobante.importe_soles*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)/prosic_tipo_cambio.compra_sunat) as importe_dolares\n\t\t\t\tFROM prosic_detalle_comprobante\n\t\t\t\tINNER JOIN prosic_plan_contable ON prosic_detalle_comprobante.id_plan_contable=prosic_plan_contable.id_plan_contable\n\t\t\t\tINNER JOIN prosic_anexo ON prosic_detalle_comprobante.id_anexo = prosic_anexo.id_anexo\n\t\t\t\tINNER JOIN prosic_moneda ON prosic_detalle_comprobante.id_moneda = prosic_moneda.id_moneda\n\t\t\t\tLEFT JOIN prosic_tipo_cambio ON prosic_detalle_comprobante.fecha_doc_comprobante=prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\tWHERE 1=1 \";\n\t\t\t\tif ($id_cuenta != '')$sql.=\" AND prosic_plan_contable.cuenta_plan_contable LIKE '%\" . $id_cuenta . \"%'\";\n if ($id_anexo != '')$sql.=\" AND prosic_anexo.codigo_anexo LIKE '%\" . $id_anexo . \"%'\";\n if ($id_numero != '')$sql.=\" AND prosic_detalle_comprobante.nro_doc_comprobante LIKE '%\" . $id_numero . \"%'\";\n\t\t\t$sql.=\" group by prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\thaving importe_soles>0\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function evt__form_integrante_i__alta($datos)\r\n\t{\r\n $pi=$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->get();\r\n if($pi['estado']<>'A' and $pi['estado']<>'I'){\r\n toba::notificacion()->agregar('No pueden agregar participantes al proyecto', 'error'); \r\n }else{ \r\n //pedir obligatorio campo resaval porque es un integrante de otra facultad, salvo los asesores que no necesitan aval\r\n $uni=$this->dep('datos')->tabla('designacion')->get_ua($datos['id_designacion']); \r\n if(trim($datos['funcion_p'])!='AS' and $pi['uni_acad']!=$uni and !(isset($datos['resaval']))){ \r\n throw new toba_error(\"Debe completar la Resol de Aval porque es un integrante de otra facultad\");\r\n }else{\r\n //controla que si el proyecto esta en estado I entonces no pueda cargar mas de un registro por docente\r\n $bandera=$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->control($datos['id_docente'],$pi['id_pinv'],$pi['estado']);\r\n $haysuperposicion=$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->superposicion($pi['id_pinv'],$datos['id_docente'],$datos['desde'],$datos['hasta']);\r\n \r\n if($bandera && !$haysuperposicion){\r\n if($datos['desde']>=$datos['hasta']){\r\n //toba::notificacion()->agregar('La fecha desde debe ser menor a la fecha hasta!', 'error'); \r\n throw new toba_error(\"La fecha desde debe ser menor a la fecha hasta!\");\r\n }else{\r\n if($datos['desde']<$pi['fec_desde'] or $datos['hasta']>$pi['fec_hasta']){ \r\n //toba::notificacion()->agregar('Revise las fechas. Fuera del periodo del proyecto!', 'error'); \r\n throw new toba_error(\"Revise las fechas. Fuera del periodo del proyecto!\");\r\n }else{\r\n $regenorma = '/^[0-9]{4}\\/[0-9]{4}$/';\r\n if ( !preg_match($regenorma, $datos['rescd'], $matchFecha) ) {\r\n //toba::notificacion()->agregar('Resolucion CD Invalida. Debe ingresar en formato XXXX/YYYY','error');\r\n throw new toba_error('Resolucion CD Invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if (isset($datos['rescd_bm']) && !preg_match($regenorma, $datos['rescd_bm'], $matchFecha) ) {\r\n //toba::notificacion()->agregar('Resolucion CD Baja Modificacion Invalida. Debe ingresar en formato XXXX/YYYY','error');\r\n throw new toba_error('Resolucion CD Baja Modificacion Invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n $datos['pinvest']=$pi['id_pinv'];\r\n $datos['ua']=$uni;\r\n $datos['check_inv']=0;\r\n $this->dep('datos')->tabla('integrante_interno_pi')->set($datos);\r\n $this->dep('datos')->tabla('integrante_interno_pi')->sincronizar();\r\n $this->dep('datos')->tabla('integrante_interno_pi')->resetear();\r\n toba::notificacion()->agregar('El docente ha sido ingresado correctamente', 'info'); \r\n $this->s__mostrar_i=0;\r\n }\r\n }\r\n }\r\n }\r\n }else{\r\n if (!$bandera){\r\n throw new toba_error(\"Este docente ya se encuentra. En un proyecto en estado Inicial solo puede cargar un registro por docente. \");\r\n //toba::notificacion()->agregar('Este docente ya se encuentra. En un proyecto en estado Inicial solo puede cargar un registro por docente. ', 'error'); \r\n }else{\r\n throw new toba_error(\"Hay superposicion de fechas\");\r\n // toba::notificacion()->agregar('Hay superposicion de fechas ', 'error'); \r\n }\r\n } \r\n }\r\n }\r\n\t}", "function TrouveNbConversations($utilisateur){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"SELECT mp_expediteur,mp_receveur FROM messages WHERE ((mp_expediteur='$utilisateur')||(mp_receveur='$utilisateur'))\";\r\n\t\t$ligne= mysqli_query($conn, $requete); \r\n\t\t$n = mysqli_num_rows($ligne);\r\n\t\t$Tab = array();\t\t//Tableau de tous les profils qui ont une conversation avec l'utilisateur\r\n\t\tif ($n > 0) {\r\n\t\t\twhile ($TabLigne = mysqli_fetch_assoc($ligne)) { \r\n\t\t\t\tif($TabLigne[\"mp_expediteur\"]!=$utilisateur){\r\n\t\t\t\t$Tab[] = $TabLigne[\"mp_expediteur\"];\r\n\t\t\t\t}\r\n\t\t\t\tif($TabLigne[\"mp_receveur\"]!=$utilisateur){\r\n\t\t\t\t$Tab[] = $TabLigne[\"mp_receveur\"];\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t}\r\n\t\tmysqli_close($conn);\r\n\t\t\r\n\t\t$TabConv=array();\t\t//tableau definitif des gens ayant une conversation avec l'utilisateur == sans doublons\r\n\t\tfor($i=0;$i<$n;$i++){ \t//on parcourt le tab de resultats\r\n\t\t\t$boule=0;\r\n\t\t\tfor($j=0;$j<sizeof($TabConv);$j++){\t//on verifie que le profil n'est pas déjà dans le tableau \r\n\t\t\t\tif($Tab[$i]==$TabConv[$j]){\r\n\t\t\t\t$boule=1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($boule==0){\t//si \"nouveau\" profil on l'ajoute au tableau des conversations\r\n\t\t\t$TabConv[] = $Tab[$i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $TabConv;\t\t\t\r\n\t\t}", "function get_fecha_ctr_correlativas($anio_academico_hash, $periodo_hash)\n {\n if (!empty($anio_academico_hash))\n {\n $anio_academico = $this->decodificar_anio_academico($anio_academico_hash);\n if (!empty($anio_academico))\n {\n if (!empty($periodo_hash))\n {\n $periodo = $this->decodificar_periodo($periodo_hash, $anio_academico);\n $parametros = array(\n 'anio_academico' => $anio_academico,\n 'periodo' => $periodo\n );\n return catalogo::consultar('generales', 'get_fecha_ctr_correlativas', $parametros);\n //return $fecha['FECHA'];\n }\n }\n }\n return null;\n }", "function cuponyaobtenido($idreg,$idcupon,$link) {\n $obten=0;\n $consulta = \"select * from bdlt_participacion a inner join bdlt_codigos b on a.id_codigo=b.id where a.id_registro=\".$idreg.\" and b.id_cupon=\".$idcupon.\" LIMIT 1;\";\n if ($resultado = mysqli_query($link, $consulta)) {\n while ($fila = mysqli_fetch_row($resultado)) {\n $obten=1;\n }\n /* liberar el conjunto de resultados */\n mysqli_free_result($resultado);\n }\n return $obten;\n}", "public function cercaP() {\r\n $operatore = $_SESSION[\"op\"];\r\n $ruolo = $operatore->getFunzione();\r\n\r\n $ricerca = array();\r\n $ricerca[\"numeroPratica\"] = isset($_REQUEST[\"numeroPratica\"]) ? $_REQUEST[\"numeroPratica\"] : null;\r\n $ricerca[\"statoPratica\"] = isset($_REQUEST[\"statoPratica\"]) ? $_REQUEST[\"statoPratica\"] : null;\r\n $ricerca[\"tipoPratica\"] = isset($_REQUEST[\"tipoPratica\"]) ? $_REQUEST[\"tipoPratica\"] : null;\r\n $ricerca[\"incaricato\"] = isset($_REQUEST[\"incaricato\"]) ? $_REQUEST[\"incaricato\"] : null;\r\n $ricerca[\"flagAllaFirma\"] = isset($_REQUEST[\"flagAllaFirma\"]) ? $_REQUEST[\"flagAllaFirma\"] : null;\r\n $ricerca[\"flagFirmata\"] = isset($_REQUEST[\"flagFirmata\"]) ? $_REQUEST[\"flagFirmata\"] : null;\r\n $ricerca[\"flagInAttesa\"] = isset($_REQUEST[\"flagInAttesa\"]) ? $_REQUEST[\"flagInAttesa\"] : null;\r\n $ricerca[\"flagSoprintendenza\"] = isset($_REQUEST[\"flagSoprintendenza\"]) ? $_REQUEST[\"flagSoprintendenza\"] : null;\r\n $offset = isset($_REQUEST[\"offset\"]) ? $_REQUEST[\"offset\"] : 0;\r\n $numero = isset($_REQUEST[\"numero\"]) ? $_REQUEST[\"numero\"] : 15;\r\n $richiestaFirmate = isset($_REQUEST[\"richiestaFirmate\"]) ? $_REQUEST[\"richiestaFirmate\"] : 0;\r\n\r\n if ($ruolo < 2) {\r\n $ricerca[\"incaricato\"] = $operatore->getId();\r\n }\r\n\r\n //$numeroPratiche = PraticaFactory::numeroTotalePratiche();\r\n $numeroPratiche= PraticaFactory::elencoNumeroP($ricerca);\r\n \r\n if ($offset >= $numeroPratiche) {\r\n $offset = 0;\r\n }\r\n if ($offset < 1) {\r\n $offset = 0;\r\n }\r\n\r\n if ($richiestaFirmate === 0) {\r\n $href = '<a href=\"index.php?page=operatore&cmd=aggiornaP&numeroP=';\r\n } elseif ($ruolo > 2) {\r\n $href = '<a href=\"index.php?page=responsabile&cmd=firmaP&numeroP=';\r\n }\r\n\r\n $pratiche = PraticaFactory::elencoP($ricerca, $offset, $numero);\r\n \r\n $x = count($pratiche);\r\n $data = \"\";\r\n for ($i = 0; $i < $x; $i++) {\r\n $data.= \"<tr class=\\\"\" . ($i % 2 == 1 ? \"a\" : \"b\") . \"\\\"><td>\" . $href\r\n . $pratiche[$i]->getNumeroPratica() . \"\\\">\" . $pratiche[$i]->getNumeroPratica() . \"</a></td>\"\r\n . \"<td>\" . $pratiche[$i]->getDataCaricamento(true) . \"</td>\"\r\n . \"<td>\" . $pratiche[$i]->getRichiedente() . \"</td>\"\r\n . \"<td>\" . PraticaFactory::tipoPratica($pratiche[$i]->getTipoPratica()) . \"</td>\"\r\n . \"<td>\" . PraticaFactory::statoPratica($pratiche[$i]->getStatoPratica()) . \"</td>\"\r\n . \"<td>\" . OperatoreFactory::getOperatore($pratiche[$i]->getIncaricato())->getNominativo() . \"</td>\"\r\n . \"</tr>\";\r\n }\r\n\r\n header('Cache-Control: no-cache, must-revalidate');\r\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\r\n header('Content-type: application/json');\r\n $json = array();\r\n $json[\"testo\"] = $data;\r\n $json[\"numeroPratiche\"] = $numeroPratiche;\r\n $json[\"numRow\"] = $x;\r\n echo json_encode($json);\r\n }", "public function nueva_correspondencia(Request $request){\r\n $id_usuario_destino = $request->id_usuario_destino;\r\n $id_instruccion = $request->id_instruccion;\r\n $referencia = $request->referencia;\r\n $contenido = $request->contenido;\r\n //$id_documento = $request->id_documento;\r\n $id_documento = 0;\r\n $nro_paginas_agregadas = $request->nro_paginas_agregadas;\r\n $prioridad = $request->prioridad;\r\n $switch_copia = $request->switch_copia; //Si esta en \"on\" es seleccionado\r\n $id_usuarios_copia = $request->id_usuario_copia;\r\n\r\n //Establecemos el campo plazo segun corresponda\r\n if ($request->plazo > 0) {$plazo = $request->plazo;}\r\n else {$plazo = 0;}\r\n\r\n //Tomamos otros campos necesarios para el registro de la derivacion\r\n //Tomamos los datos de la persona logueada\r\n $usuario_logueado = $this->datos_persona_logueada();\r\n foreach ($usuario_logueado as $usuario) {\r\n $id_persona_origen = $usuario->id_persona;\r\n $id_cargo_origen = $usuario->id_cargo;\r\n $id_area_origen = $usuario->id_area;\r\n }\r\n\r\n //Tomamos los datos del destinatario\r\n $id_persona_destino = \\DB::table('users')\r\n ->where('users.id', $id_usuario_destino)\r\n ->where('users.activo', 1)\r\n ->value('users.id_persona');\r\n\r\n $id_cargo_destino = \\DB::table('users')\r\n ->join('servidores_publicos', 'servidores_publicos.id_servidor_publico', '=', 'users.id_servidor_publico')\r\n ->where('users.id', $id_usuario_destino)\r\n ->where('users.activo', 1)\r\n ->value('servidores_publicos.id_cargo');\r\n\r\n //Tomamos la fecha y horactual actual y gestion\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n $fecha_creacion = $hoy->format('Y-m-d H');\r\n $gestion = $hoy->format('Y');\r\n\r\n //Dado que dos personas pudieron haber obtenido el mismo cite por demorar, obtenemos el cite disponible en este momento\r\n $cite = $this->get_cite_comunicacion_interna();\r\n\r\n //Lo utlizamos e incrementamos en 1 el valor del correlativo para comunicaciones internas\r\n //Tomamos el valor actual del correlativo\r\n $correlativo_cite = \\DB::table('chasqui_correlativos')\r\n ->where('id_area', $id_area_origen)\r\n ->where('id_tipo_documento', 1)\r\n ->where('gestion', $gestion)\r\n ->value('correlativo');\r\n\r\n $nuevo_correlativo_disponible = $correlativo_cite+1;\r\n //fabri\r\n \\DB::table('chasqui_correlativos')\r\n ->where('id_area', $id_area_origen)\r\n ->where('id_tipo_documento', 1)\r\n ->where('gestion', $gestion)\r\n ->update(['correlativo' => $nuevo_correlativo_disponible]);\r\n\r\n //Realizamos el registro de la derivacion\r\n \\DB::table('chasqui_derivaciones')->insert([\r\n ['cite' => $cite,\r\n 'id_cargo_origen' => $id_cargo_origen,\r\n 'id_persona_origen' => $id_persona_origen,\r\n 'id_cargo_destino' => $id_cargo_destino,\r\n 'id_persona_destino' => $id_persona_destino,\r\n 'id_instruccion' => $id_instruccion,\r\n 'referencia' => $referencia,\r\n 'contenido' => $contenido,\r\n 'id_documento' => $id_documento,\r\n 'nro_paginas_agregadas' => $nro_paginas_agregadas,\r\n 'prioridad' => $prioridad,\r\n 'plazo' => $plazo,\r\n 'tipo' => 'Original',\r\n 'recibido' => 0,\r\n 'fecha_recibido' => 'NULL',\r\n 'derivado' => 0,\r\n 'fecha_derivado' => 'NULL',\r\n 'gestion' => $gestion,\r\n 'anulado' => 0]\r\n ]);\r\n\r\n //Verficamos si se debe enviar el documento como copia\r\n if ($switch_copia == \"on\") {\r\n\r\n //Agregamos la palabra COPIA a la referencia\r\n $referencia_copia = $referencia.\" - COPIA\";\r\n\r\n //Para cada usuario como copia\r\n for ($i=0;$i<count($id_usuarios_copia);$i++)\r\n {\r\n //Tomamos los datos de las personas a enviar como copia\r\n $id_persona_destino_copia = \\DB::table('users')\r\n ->where('users.id', $id_usuarios_copia[$i])\r\n ->where('users.activo', 1)\r\n ->value('users.id_persona');\r\n\r\n $id_cargo_destino_copia = \\DB::table('users')\r\n ->join('servidores_publicos', 'servidores_publicos.id_servidor_publico', '=', 'users.id_servidor_publico')\r\n ->where('users.id', $id_usuarios_copia[$i])\r\n ->where('users.activo', 1)\r\n ->value('servidores_publicos.id_cargo');\r\n\r\n //Realizamos el registro de las copias, solo si es diferente al destinatario original\r\n if ($id_cargo_destino_copia != $id_usuario_destino && $id_persona_destino_copia != $id_persona_destino) {\r\n \\DB::table('chasqui_derivaciones')->insert([\r\n ['cite' => $cite,\r\n 'id_cargo_origen' => $id_cargo_origen,\r\n 'id_persona_origen' => $id_persona_origen,\r\n 'id_cargo_destino' => $id_cargo_destino_copia,\r\n 'id_persona_destino' => $id_persona_destino_copia,\r\n 'id_instruccion' => $id_instruccion,\r\n 'referencia' => $referencia_copia,\r\n 'contenido' => $contenido,\r\n 'id_documento' => $id_documento,\r\n 'nro_paginas_agregadas' => $nro_paginas_agregadas,\r\n 'prioridad' => $prioridad,\r\n 'plazo' => $plazo,\r\n 'tipo' => 'Copia',\r\n 'recibido' => 0,\r\n 'fecha_recibido' => 'NULL',\r\n 'derivado' => 0,\r\n 'fecha_derivado' => 'NULL',\r\n 'gestion' => $gestion,\r\n 'anulado' => 0]\r\n ]);\r\n }\r\n }\r\n }\r\n\r\n\r\n echo \"<script>window.open('http://www.yahoo.com');</script>\";\r\n\r\n //Tomamos todos los campos para enviar a la vista bandeja de entrada\r\n //Enviamos la variable folder para marcar en azul el folder en el que se encuentra\r\n $folder = \"bandeja_de_entrada\";\r\n //Tomamos la cantidad de correspondencia nueva (sin recepcionar)\r\n $bandeja_nuevos_cantidad = $this->bandeja_nuevos_cantidad();\r\n //Tomamos las derivaciones a mostrar\r\n $derivaciones = $this->derivaciones_recibidas();\r\n //Tomamos el plazo que se tiene para responder cada derivacion\r\n $array_plazo = $this->plazo_restante_derivaciones();\r\n //Establecemos el mensaje de exito a mostrar\r\n $mensaje_exito = \"La correspondencia fue derivada correctamente.\";\r\n\r\n //unset($request);\r\n //$_POST = NULL;\r\n //unset($_POST);\r\n //Devolvemos la vista con los parametros necesarios\r\n\r\n //Establecemos el valor de la variable accion_exitosa, la cual definira el mensaje de exito a mostrar en la funcion msj_exitoso\r\n $accion_exitosa = \"cie\";\r\n //return $this->vista_exitoso();\r\n return redirect('msj_exitoso/'.$accion_exitosa);\r\n\r\n /*return view(\"chasqui.bandeja_de_entrada\")\r\n ->with(\"folder\", $folder)\r\n ->with(\"bandeja_nuevos_cantidad\", $bandeja_nuevos_cantidad)\r\n ->with(\"derivaciones\", $derivaciones)\r\n ->with(\"array_plazo\", $array_plazo)\r\n ->with(\"mensaje_exito\", $mensaje_exito);*/\r\n\r\n\r\n //Si todo salio bien, devolvemos 'ok' (cuando usabamos ajax)\r\n //return 'ok';\r\n }", "function getConversacion($usuario, $otro_usuario) {\n $usuario_ok = trim(filter_var($usuario, FILTER_SANITIZE_STRING));\n $otro_usuario_ok = trim(filter_var($otro_usuario, FILTER_SANITIZE_STRING));\n $link = crearConexion();\n $query = \"SELECT `usu_remitente`, `usu_destinatario`, `texto`, `censurado` FROM `mensaje` WHERE (mensaje.usu_remitente='$usuario_ok' AND mensaje.usu_destinatario='$otro_usuario_ok') OR (mensaje.usu_destinatario='$usuario' AND mensaje.usu_remitente='$otro_usuario') ORDER BY mensaje.fecha_hora ASC\";\n $result = mysqli_query($link, $query);\n cerrarConexion($link);\n $conversaciones = [];\n while ($linea = mysqli_fetch_array($result)) {\n $conversaciones[] = [$linea['usu_remitente'], $linea['texto'], $linea['censurado']];\n }\n return $conversaciones;\n}", "function porEstudiante($cod_clase, $cod_interno = null) {\n\t\t\t$estudiantes = TAsistencia::all($cod_clase);\n\t\t\tif($estudiantes == null)\n\t\t\t\treturn null;\n\t\t\t$asistencias = array();\n\t\t\tforeach ($estudiantes as $estudiante) {\n\t\t\t\t$asistencias[$estudiante['cod_interno']] = array('asiste' => $estudiante['asiste'], 'cod_motivo' => $estudiante['cod_motivo']);\n\t\t\t}\n\t\t\treturn $asistencias;\n\t\t}", "public function calcoloOrariDisponibili($eEsame, $workingPlanGiorno) {\r\n $vPrenotazione = USingleton::getInstance('VPrenotazione');\r\n $durata = $eEsame->getDurataEsame();\r\n $ora = substr($durata, 0, 2);\r\n $minuti = substr($durata, 3, 2);\r\n // la stringa durata deve essere convertita in un intervallo\r\n $durata = new DateInterval('PT' . \"$ora\" . 'H' . \"$minuti\" . 'M'); //PT sta per period time\r\n //all'interno di workingPlan ad ogni giorno è associato un oggetto con attributi Start, End, Pausa\r\n $oraInizio = $workingPlanGiorno->Start;\r\n $oraFine = $workingPlanGiorno->End;\r\n $oraInizioPausa = new DateTime($workingPlanGiorno->BreakStart); \r\n $oraFinePausa = new DateTime($workingPlanGiorno->BreakEnd);\r\n $orariPrenotazioni = Array();\r\n //converto la stringa $oraInizio in un oggetto Time\r\n $oraInizio = new DateTime($oraInizio);\r\n //converto la stringa $oraFine in un oggetto Time\r\n $oraFine = new DateTime($oraFine);\r\n $oraInizioEsame = $oraInizio;\r\n while ($oraInizioEsame <= $oraFine) {\r\n $oraFineEsame = clone $oraInizioEsame; // clono l'oggetto (quindi non ho un passaggio per riferimento)\r\n $oraFineEsame = $oraFineEsame->add($durata); // l'orario in cui termirebbe l'esame\r\n if($oraFineEsame <= $oraInizioPausa || $oraInizioEsame >= $oraFinePausa) // se l'orario non ricade all'interno dell'intervallo di pausa della clinica\r\n { //aggiungo l'orario disponibile successivo\r\n $orariPrenotazioni[] = $oraInizioEsame->format(\"H:i\");\r\n }\r\n //aggiungo un intervallo pari alla durata dell'esame all'orario disponibile precedente \r\n $oraInizioEsame = $oraInizioEsame->add($durata);\r\n };\r\n if ($oraInizioEsame > $oraFine) {\r\n array_pop($orariPrenotazioni);\r\n }\r\n // ora che ho tutti gli orari della giornata, cerco gli orari delle prenotazione già effettuate\r\n $data = $vPrenotazione->recuperaValore('data');\r\n $fPrenotazioni = USingleton::getInstance('FPrenotazione');\r\n $prenotazioni = $fPrenotazioni->cercaPrenotazioniEsameClinicaData($eEsame->getIDEsameEsame(), $this->_partitaIVA, $data);\r\n $orariPrenotati = Array();\r\n if (is_array($prenotazioni) || !is_bool($prenotazioni)) {\r\n foreach ($prenotazioni as $prenotazione) {\r\n foreach ($prenotazione as $key => $value) {\r\n if ($key === \"DataEOra\") {\r\n $value = substr($value, 11, 5);\r\n $orariPrenotati[] = $value;\r\n }\r\n }\r\n }\r\n } else {\r\n // errore\r\n }\r\n $orariDisponibili = array_diff($orariPrenotazioni, $orariPrenotati); //Compares array1 against one or more other arrays and returns the values in array1 that are not present in any of the other arrays. \r\n return $orari = Array('orari' => $orariDisponibili);\r\n }", "public function reportar_consumo() {\n return $this->db\n ->select(format_select(array(\n 'cirugia.idCirugia' => 'idCirugia',\n 'empleado.idEmpleado' => 'idEmpleado',\n 'empleado.matricula' => 'matricula',\n 'empleado.nombre' => 'nombre',\n 'empleado.apellido_paterno' => 'a_paterno',\n 'empleado.apellido_materno' => 'a_materno',\n 'especialidad.nombre' => 'especialidad',\n 'cirugia.fecha' => 'fecha',\n 'quirofano.nombre' => 'quirofano'\n )))\n ->join('usuario','tipo_usuario.idTipo_Usuario = usuario.idTipo_Usuario')\n ->join('empleado','empleado.idEmpleado = usuario.idEmpleado')\n ->join('departamento','departamento.idDepartamento = tipo_usuario.idDepartamento')\n ->join('especialidad','especialidad.idEspecialidad = departamento.idEspecialidad')\n ->join('proceso_tipo_usuario','proceso_tipo_usuario.idTipo_Usuario = tipo_usuario.idTipo_Usuario')\n ->join('proceso','proceso.idProceso = proceso_tipo_usuario.idProceso')\n ->join('cirugia','cirugia.idProceso = proceso.idProceso AND cirugia.idquirofano > 0 AND cirugia.status = \"1\"')\n ->join('quirofano','cirugia.idQuirofano = quirofano.idQuirofano')\n ->get('tipo_usuario')\n ->result_array();\n }", "function tieneCursosConMatriculas($idTipoMatricula){\n \t/*******************************************************\n * Consulta en BD si un curso tiene matriculas asociadas\n *******************************************************/\n $pd = DatabaseCao::connect();\n $pd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \n $sql = \"SELECT m.id id\n\t\t\t\tFROM ca_tipo_matricula tp\n\t\t\t\tINNER JOIN \tca_tipo_matricula_curso tmc ON tmc.tipo_matricula = tp.id\n\t\t\t\tINNER JOIN ca_matricula m ON tmc.id = m.ID_TM_CURSO\n\t\t\t\tAND tp.id = ?\"; \n $q = $pd->prepare($sql);\n $q->execute(array($idTipoMatricula)); \n\n /*****************************************************\n * Carga de datos en variables\n *****************************************************/\n $TieneMatriculasAsociadasACursos = FALSE;\n while ($fila = $q->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) { \n $TieneMatriculasAsociadasACursos = TRUE; \n break; \n } \n return $TieneMatriculasAsociadasACursos;\n }", "private function costo_fijo($costo_fijo, $co_usuario){\n \tforeach ($costo_fijo as $k1 => $v1)\n \t{\n \t\tif ( $co_usuario == $v1['co_usuario'])\n \t\t{\n \t\t\t$respuesta = $v1['brut_salario'];\n \t\t\tbreak;\n \t\t}\n \t}\n \treturn $respuesta;\n }", "private function telaPerfilLoja()\r\n {\r\n //Carregando os anos do banco de dados\r\n $repositorio = $this->getDoctrine()->getRepository('DCPBundle:Quebra');\r\n\r\n $sql = $repositorio->createQueryBuilder('q')\r\n ->select('q.data')\r\n ->groupBy('q.data')\r\n ->getquery();\r\n\r\n $resultado = $sql->getResult();\r\n\r\n $anoGeral = array();\r\n $contAnoGeral = 0;\r\n foreach ($resultado as $data)\r\n {\r\n $anoGeral[$contAnoGeral] = $data[\"data\"]->format(\"Y\");\r\n $contAnoGeral++;\r\n }\r\n\r\n $ano = array();\r\n $contAno = 0;\r\n foreach ($anoGeral as $anoAPesquisar)\r\n {\r\n if (!in_array($anoAPesquisar, $ano))\r\n {\r\n $ano[$contAno] = $anoAPesquisar;\r\n $contAno++;\r\n }\r\n }\r\n\r\n return $ano;\r\n }", "function getFichaCompromiso($filter = \"\"){\n\n$sql = \"SELECT socios.codigo, socios.nombre,\n\tseguimiento_compromisos.tipo_compromiso,\n\tseguimiento_compromisos.anotacion,\n\tseguimiento_compromisos.idseguimiento_compromisos AS 'id',\n\tseguimiento_compromisos.oficial_de_seguimiento,\n\tseguimiento_compromisos.tipo_compromiso,\n\tseguimiento_compromisos.credito_comprometido,\n\tseguimiento_compromisos.idseguimiento_compromisos,\n\tseguimiento_compromisos.estatus_compromiso,\n\tseguimiento_compromisos.fecha_vencimiento,\n\tsocios.grupo\n\n\tFROM socios, seguimiento_compromisos\n\n\tWHERE seguimiento_compromisos.socio_comprometido=socios.codigo\n\t$filter \";\n\n\t$rs = mysql_query($sql, cnnGeneral());\n\t$exoFrm = \"\";\n\n\twhile ($rw = mysql_fetch_array($rs)){\n\t\t$oficial_a_cargo = elusuario($rw[5]);\n\t\t$imgP = vIMG_PATH;\n\t\t$notes = \"\";\n\n\t\t\t$CTipo\t\t= $rw[\"tipo_compromiso\"];\n\t\t\t$credito\t= $rw[\"credito_comprometido\"];\n\t\t\t$dia\t\t= $rw[\"fecha_vencimiento\"];\n\t\t\t$sep\t\t= STD_LITERAL_DIVISOR;\n\t\t\t$socio\t\t= $rw[\"codigo\"];\n\t\t\t$grupo\t\t= $rw[\"grupo\"];\n\n\t\t\tswitch($CTipo){\n\t\t\t\tcase \"promesa_de_pago\";\n\t\t\t\t/**\n\t\t\t\t * Buscar un posible Pago\n\t\t\t\t */\n\t\t\t\t $sqlPP = \"SELECT idoperaciones_recibos AS 'recibo'\n\n\t\t\t\t\t\t\tFROM operaciones_recibos\n\n\t\t\t\t\t\tWHERE\n\n\t\t\t\t\t\t\tfecha_operacion>=DATE_SUB('$dia', INTERVAL 5 DAY)\n\t\t\t\t\t\t\tAND\n\t\t\t\t\t\t\t\tfecha_operacion<=DATE_ADD('$dia', INTERVAL 5 DAY)\n\t\t\t\t\t\t\tAND\n\t\t\t\t\t\t\t\tdocto_afectado='$credito'\n\t\t\t\t\tAND tipo_docto = 2\n\t\t\t\t\tLIMIT 0,1\";\n\t\t\t\t\t$DPP = obten_filas($sqlPP);\n\t\t\t\t\t$recibo = $DPP[\"recibo\"];\n\t\t\t\t\tif ( isset($recibo) ){\n\t\t\t\t\t\t$notes = \"<a class='button' onclick='getConsultaRecibo($recibo)'>Posible Cumplimiento del Compromiso con el recibo $recibo</a>\";\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$exoFrm = $exoFrm .\t\"\n\t\t\t<fieldset>\n\t\t\t<legend>| Compromiso de $rw[6] Num. $rw[8] |</legend>\n\t\t\t\t\t<table align=\\\"center\\\" width=\\\"80%\\\" id=\\\"tblC@$rw[8]\\\">\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t<th class='izq'>Clave de Persona</th> <td>$rw[0]</td>\n\t\t\t\t\t\t</tr><tr>\n\t\t\t\t\t\t\t<th class='izq'>Nombre Completo</th> <td>$rw[1]</td>\n\t\t\t\t\t\t</tr><tr>\n\t\t\t\t\t\t\t<th class='izq'>Numero de Credito</th> <td>$rw[7]</td>\n\t\t\t\t\t\t</tr><tr>\n\t\t\t\t\t\t\t<th class='izq'>Oficial a Cargo</th> <td>$oficial_a_cargo</td>\n\t\t\t\t\t\t</tr><tr>\n\t\t\t\t\t\t\t<th class='izq'>Tipo de Compromiso</th><td>$rw[6]</td>\n\t\t\t\t\t\t</tr><tr>\n\t\t\t\t\t\t\t<th class='izq'>Detalles</th><td>$rw[3]</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan='2'>$notes</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td colspan=\\\"2\\\">\n\t\t\t\t\t\t\t<table align=\\\"center\\\">\n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t\t\t\t<td onclick=\\\"rptLlamadas('$socio|$credito')\\\"><img src=\\\"$imgP/seguimiento/llamadas.rpt.png\\\" alt=\\\"Reporte de Llamadas\\\" />&nbsp; Reporte de Llamadas</td>\n\t\t\t\t\t\t\t\t\t\t<td onclick=\\\"rptCompromisos('\" . $rw[\"codigo\"] . \"|\" . $rw[\"credito_comprometido\"] . \"')\\\"><img src=\\\"$imgP/seguimiento/stock_add-bookmark.png\\\" alt=\\\"Reporte de compromisos\\\" />&nbsp; Reporte de Compromisos</td>\n\t\t\t\t\t\t\t\t\t\t<td onclick=\\\"rptNotificaciones('\" . $rw[\"codigo\"] . \"|\" . $rw[\"credito_comprometido\"] . \"')\\\"><img src=\\\"$imgP/seguimiento/notificaciones.rpt.png\\\" alt=\\\"Reporte de Notificaciones\\\" />&nbsp; Reporte de Notificaciones</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td onclick=\\\"addLlamadas('$sep$socio$sep$credito')\\\">\n\t\t\t\t\t\t\t\t\t\t<img src=\\\"$imgP/seguimiento/stock_landline-phone.png\\\" alt=\\\"Agregar llamadas\\\" />&nbsp; Agregar Llamadas</td>\n\t\t\t\t\t\t\t\t\t\t<td onclick=\\\"addCompromisos('$rw[0]|$rw[7]|\" . $rw[\"fecha_vencimiento\"] . \"')\\\">\n\t\t\t\t\t\t\t\t\t\t<img src=\\\"$imgP/seguimiento/stock_edit-bookmark.png\\\" alt=\\\"Agregar Compromiso\\\" />&nbsp; Agregar Compromiso</td>\n\t\t\t\t\t\t\t\t\t\t<td onclick=\\\"addMemo('7$sep$socio$sep$credito$sep$grupo$sep')\\\">\n\t\t\t\t\t\t\t\t\t\t<img src=\\\"$imgP/seguimiento/stock_insert-note.png\\\" alt=\\\"Agregar Memo\\\" />&nbsp; Agregar Memo</td>\n\t\t\t\t\t\t\t\t\t\t<td onclick=\\\"addNotificacion('s=$socio&c=$credito&g=$grupo&t=0')\\\">\n\t\t\t\t\t\t\t\t\t\t<img src=\\\"$imgP/seguimiento/aviso.new.png\\\" alt=\\\"Agregar Aviso de Pago\\\" />&nbsp; Agregar Aviso de pago</td>\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td onclick=\\\"addNotificacion('s=$socio&c=$credito&g=$grupo&t=1')\\\"><img src=\\\"$imgP/seguimiento/notif1.png\\\" alt=\\\"\\\" />Agregar 1a Notificacion</td>\n\t\t\t\t\t\t\t\t\t\t<td onclick=\\\"addNotificacion('s=$socio&c=$credito&g=$grupo&t=2')\\\"><img src=\\\"$imgP/seguimiento/notif2.png\\\" alt=\\\"\\\" />Agregar 2a Notificacion</td>\n\t\t\t\t\t\t\t\t\t\t<td onclick=\\\"addNotificacion('s=$socio&c=$credito&g=$grupo&t=3')\\\"><img src=\\\"$imgP/seguimiento/notif3.png\\\" alt=\\\"\\\" />Agregar 3a Notificacion</td>\n\t\t\t\t\t\t\t\t\t\t<td onclick=\\\"addNotificacion('s=$socio&c=$credito&g=$grupo&t=4')\\\"><img src=\\\"$imgP/seguimiento/notife.png\\\" alt=\\\"\\\" />Agregar Not. Extrajudicial</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td colspan='4'>\n\t\t\t\t\t\t\t\t\t\t\t<fieldset id='fs-\" . $rw[\"id\"] . \"'>\n\t\t\t\t\t\t\t\t\t\t\t\t<legend>Cumplimiento</legend>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<a onclick=\\\"setCumplido('\" . $rw[\"id\"] . \"')\\\" class='button'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img src=\\\"$imgP/seguimiento/green_dot.png\\\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCumplido</a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<a onclick=\\\"setCancelado('\" . $rw[\"id\"] . \"')\\\" class='button'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img src=\\\"$imgP/seguimiento/yellow_dot.png\\\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCancelado</a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<a onclick=\\\"setVencido('\" . $rw[\"id\"] . \"')\\\" class='button'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img src=\\\"$imgP/seguimiento/red_dot.png\\\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tVencido</a>\n\n\t\t\t\t\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t</table>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\t\\n\";\n\n\t}\n\t@mysql_free_result($rs);\n\treturn $exoFrm;\n}", "function buscar_comprobante_doc_venta($id_cuenta, $id_anexo, $id_serie, $id_numero ) {\n $sql = \"SELECT\n\t\t\t\t\t prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\t, sum(if(prosic_moneda.id_moneda=1,prosic_detalle_comprobante.importe_soles,prosic_detalle_comprobante.importe_dolares*prosic_tipo_cambio.venta_financiero)*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_soles\n\t\t\t\t\t, sum(if(prosic_moneda.id_moneda=1,prosic_detalle_comprobante.importe_soles*prosic_tipo_cambio.venta_financiero,prosic_detalle_comprobante.importe_dolares)*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_dolares\n\t\t\t\tFROM prosic_detalle_comprobante\n\t\t\t\tINNER JOIN prosic_plan_contable ON prosic_detalle_comprobante.id_plan_contable=prosic_plan_contable.id_plan_contable\n\t\t\t\tINNER JOIN prosic_anexo ON prosic_detalle_comprobante.id_anexo = prosic_anexo.id_anexo\n\t\t\t\tINNER JOIN prosic_moneda ON prosic_detalle_comprobante.id_moneda = prosic_moneda.id_moneda\n\t\t\t\tLEFT JOIN prosic_tipo_cambio ON prosic_detalle_comprobante.fecha_doc_comprobante=prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\tWHERE 1=1 \";\n\t\t\t\tif ($id_cuenta != '')$sql.=\" AND prosic_plan_contable.cuenta_plan_contable LIKE '%\" . $id_cuenta . \"%'\";\n if ($id_anexo != '')$sql.=\" AND prosic_anexo.codigo_anexo LIKE '%\" . $id_anexo . \"%'\";\n if ($id_numero != '')$sql.=\" AND prosic_detalle_comprobante.nro_doc_comprobante LIKE '%\" . $id_numero . \"%'\";\n\t\t\t$sql.=\" group by prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\thaving importe_soles>0\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "public function getConvocados()\n {\n return $this->hasMany(InterConvocados::className(), ['modo_id' => 'id']);\n }", "public function listarTransitoCorreo(){\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\t$sql_1 = \"\tSELECT\t[tramseg_id],[tram_nro_doc],[tram_fec_reg],[tram_fec_doc],[seg_fecha_transito],\n\t\t\t\t\t\t\t\tDATEDIFF(day, [tram_fec_reg], getdate()) AS [Dias],\n\t\t\t\t\t\t\t\t[seg_empRemitente_id],[seg_contacRemitente_id],\n\t\t\t\t\t\t\t\t[empR].[emp_razonsocial]+' - '+[conR].[contac_nombre] AS [NombreRemitente],\n\t\t\t\t\t\t\t\t[empseg_id],[contacseg_id],\n\t\t\t\t\t\t\t\t[empD].[emp_razonsocial]+' - '+[conD].[contac_nombre] AS [NombreDestinatario],\n\t\t\t\t\t\t\t\t[tram_asunto],UPPER([tram_estado]) AS [tram_estado], [tram_estado_fecha],\n\t\t\t\t\t\t\t\t[seg_correo]\n\t\t\t\t\t\tFROM\t[db_std].[SeguimientoDocumentario] seg\n\t\t\t\t\t\tINNER\tJOIN [db_std].[TramiteDocumentario] tram ON [tram].[tram_id]=[seg].[tramseg_id]\n\t\t\t\t\t\tleft\tJOIN [db_std].[Empresa] empR ON [seg].[seg_empRemitente_id] = [empR].[emp_id]\n\t\t\t\t\t\tLEFT\tJOIN [db_std].[Contacto] conR ON [seg].[seg_contacRemitente_id] = [conR].[contac_id]\n\t\t\t\t\t\tleft\tJOIN [db_std].[Empresa] empD ON [seg].[empseg_id] = [empD].[emp_id]\n\t\t\t\t\t\tLEFT\tJOIN [db_std].[Contacto] conD ON [seg].[contacseg_id] = [conD].[contac_id]\n\t\t\t\t\t\tWHERE\t[seg_estado]='transito'\";\n\t\t\t\t\t\t\t\n\t\t\t$result = $this->database_tramite->Consultar($sql_1);\n\t\t\treturn $result;\n\t\t}catch(Exception $e){\n throw $e;\n\t\t}\n\t}", "function get_convocatoria_actual_otro(){\n $actual=date('Y-m-d');\n $anio_actual= date(\"Y\", strtotime($actual));\n \n $sql=\"select id_conv from convocatoria_proyectos \"\n .\" where fec_inicio<='\".$actual.\"' and fec_fin >='\".$actual.\"'\"\n . \" and id_tipo=2\";\n $resul=toba::db('designa')->consultar($sql);\n if(count($resul)>0){\n return $resul[0]['id_conv'];\n }else \n return null;\n }", "public function ventaMayor($idcliente,$get_tcambio){\n //$sql=\"SELECT ocCab.idordenventa,ocCab.importeordencobro,CASE ovCab.IdMoneda WHEN 2 THEN ocCab.importeordencobro*\".$get_tcambio.\" WHEN 1 THEN ocCab.importeordencobro END AS total\n //FROM wc_ordenventa ovCab,wc_ordencobro ocCab\n //WHERE ovCab.idcliente=\".$idcliente.\"\n //AND ovCab.idordenventa=ocCab.idordenventa\n //AND ovCab.vbcreditos=1\n //AND ovCab.vbventas=1\n //AND ovCab.vbcobranzas=1\n //AND ovCab.estado=1\n //ORDER BY ocCab.idordenventa,ocCab.idordencobro ASC\";\n // $array_ventaMayor = $this->scriptArrayCompleto($sql);\n // $idordenventa=-1;\n // for ($i = 0; $i < count($array_ventaMayor); $i++) {\n // if($idordenventa!=$array_ventaMayor[$i]['idordenventa']){\n // $cadena[]=$array_ventaMayor[$i]['total'];\n // }\n // $idordenventa=$array_ventaMayor[$i]['idordenventa'];\n // }\n // $totalmayor=max($cadena);\n //\n // end como nacio la venta\n\n //start como esta actualmente esta la venta -- angel lo indico en el modulo vista global\n $sql=\"SELECT ovCab.idordenventa,CASE ovCab.IdMoneda WHEN 2 THEN SUM(ogCab.importegasto)*\".$get_tcambio.\" WHEN 1 THEN SUM(ogCab.importegasto) END AS total\n FROM wc_ordenventa ovCab,wc_ordengasto ogCab\n WHERE ovCab.idcliente=\".$idcliente.\"\n AND ovCab.idordenventa=ogCab.idordenventa\n AND ovCab.vbcreditos=1\n AND ovCab.vbventas=1\n AND ovCab.vbcobranzas=1\n AND ovCab.estado=1\n AND ogCab.estado=1\n GROUP BY ovCab.idordenventa ORDER BY total DESC;\";\n $array_ventaMayor = $this->scriptArrayCompleto($sql);\n //end como termino la venta\n return $array_ventaMayor[0]['total'];\n }", "function comprobarTodasColecciones($todasColecciones,$sudoKeys){\r\n $erroresColeccion = [];\r\n for($i=0;$i<count($todasColecciones);$i++){\r\n if(comprobarColeccion($todasColecciones[$i],$sudoKeys)!=\"correcto\"){\r\n //print(\"mal\");\r\n //$aux=comprobarFila($todasColecciones[$i],$sudoKeys);\r\n //array_merge($erroresColeccion,$aux);\r\n $erroresColeccion = array_merge($erroresColeccion,comprobarColeccion($todasColecciones[$i],$sudoKeys));\r\n }else{\r\n //print(\"Estamos bien\");\r\n }\r\n }\r\n \r\n return array_unique($erroresColeccion);\r\n }", "public function crearCorreoInstitucional(){\n $nom0 = $this->attributes['nombre'];\n //tomo el/los apellido/s del preinscripto\n $ape0 = $this->attributes['apellido'];\n //defino el dominio que tendrá cada mail creado\n $dominio = \"@udc.edu.ar\";\n \n $nom = $this->inicialesDeNombres($nom0);\n $nom1 = $this->sanear_string($nom);\n \n $ape = $this->apellidosCompletos($ape0);\n $ape1 = $this->sanear_string($ape);\n \n \n $correo_institucional = $nom1.$ape1.$dominio; \n $this->attributes['email_institucional'] = $correo_institucional;\n $this->save();\n }", "public function buscar_comprobante_venta_2($anio) {\n //CPC_TipoDocumento => F factura, B boleta\n //CPC_total => total de la FACTURA o BOLETA\n $sql = \" SELECT * FROM cji_comprobante c WHERE CPC_TipoOperacion='V' AND CPC_TipoDocumento='F' AND YEAR(CPC_FechaRegistro)=\" . $anio . \"\";\n //echo $sql;\n $query = $this->db->query($sql);\n if ($query->num_rows > 0) {\n foreach ($query->result() as $fila) {\n $data[] = $fila;\n }\n return $data;\n }\n return array();\n }" ]
[ "0.60956836", "0.60390216", "0.60002255", "0.5949687", "0.59336716", "0.5931815", "0.5921949", "0.5889634", "0.5855339", "0.5853453", "0.5845948", "0.57621366", "0.57253736", "0.5721156", "0.5710685", "0.5704009", "0.5688437", "0.56796294", "0.56499565", "0.5640414", "0.5639634", "0.56370044", "0.56366456", "0.5629794", "0.56288713", "0.5624122", "0.56236804", "0.56115514", "0.5593483", "0.5589458", "0.5581287", "0.5573922", "0.556875", "0.55674225", "0.5564035", "0.5562615", "0.55625063", "0.5559032", "0.55578303", "0.55314755", "0.55291796", "0.5526657", "0.55245805", "0.55228496", "0.5521184", "0.55201095", "0.5498096", "0.549539", "0.54945314", "0.54870147", "0.5486059", "0.5480247", "0.54784757", "0.54687285", "0.54650515", "0.5458991", "0.5453729", "0.5452463", "0.5450697", "0.5449068", "0.544784", "0.5446797", "0.54418004", "0.5441025", "0.5438107", "0.54309", "0.54205203", "0.5418263", "0.54170007", "0.541654", "0.5416214", "0.5412418", "0.5410791", "0.54081035", "0.5407505", "0.5404093", "0.54012746", "0.5397691", "0.53955024", "0.5391113", "0.5388746", "0.5384142", "0.5383736", "0.537835", "0.53763926", "0.53745943", "0.5364144", "0.5363997", "0.53572994", "0.5347545", "0.53463405", "0.5344588", "0.5342997", "0.53420514", "0.53408533", "0.5335839", "0.53356767", "0.53325486", "0.5327976", "0.53274184", "0.53232527" ]
0.0
-1
Funcio que Modifica el password d'una ID d'usuari
public function setPassword($id,$newpass){ $consulta = $this->find($id)->current(); $consulta->password = $newpass; $consulta->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function necesitaCambiarPassword();", "public function update_password($id, $password);", "public function modifpassword($user,$passwd){\n \n }", "protected function changePassword() {}", "function ciniki_users_changePassword($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'oldpassword'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Old Password'), \n 'newpassword'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'New Password'), \n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n \n if( strlen($args['newpassword']) < 8 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.20', 'msg'=>'New password must be longer than 8 characters.'));\n }\n\n //\n // Check access \n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'users', 'private', 'checkAccess');\n $rc = ciniki_users_checkAccess($ciniki, 0, 'ciniki.users.changePassword', 0);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Check old password\n //\n $strsql = \"SELECT id, email FROM ciniki_users \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $ciniki['session']['user']['id']) . \"' \"\n . \"AND password = SHA1('\" . ciniki_core_dbQuote($ciniki, $args['oldpassword']) . \"') \";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.users', 'user');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Perform an extra check to make sure only 1 row was found, other return error\n //\n if( $rc['num_rows'] != 1 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.21', 'msg'=>'Invalid old password'));\n }\n\n //\n // Turn off autocommit\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.users');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the password, but only if the old one matches\n //\n $strsql = \"UPDATE ciniki_users SET password = SHA1('\" . ciniki_core_dbQuote($ciniki, $args['newpassword']) . \"'), \"\n . \"last_updated = UTC_TIMESTAMP(), \"\n . \"last_pwd_change = UTC_TIMESTAMP() \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $ciniki['session']['user']['id']) . \"' \"\n . \"AND password = SHA1('\" . ciniki_core_dbQuote($ciniki, $args['oldpassword']) . \"') \";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbUpdate');\n $rc = ciniki_core_dbUpdate($ciniki, $strsql, 'ciniki.users');\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.users');\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.22', 'msg'=>'Unable to update password.'));\n }\n\n if( $rc['num_affected_rows'] < 1 ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.users');\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.23', 'msg'=>'Unable to change password.'));\n }\n\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.users');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.users.24', 'msg'=>'Unable to update password.'));\n }\n\n return array('stat'=>'ok');\n}", "public function changepass($id=null){\n\n }", "function p_modificar_txt_password(\n\t\t\t\t$txt_password\t\t\t\t\t,\n\t\t\t\t$cod_usuario\t\t\t\t\n\t\t){\n\t\t\tglobal $db;\n\t\t\t$query =\"\n\t\t\tupdate\tseg_usuario\n\t\t\tset\t\ttxt_password \t= password(SHA('$txt_password'))\n\t\t\twhere\tcod_usuario_pk\t\t='$cod_usuario'\";\n\t\t\t$db->consultar($query);\t\n\t\t}", "public function updatePwd($data, $id) {\n try {\n $select = $this->connexion->prepare(\"UPDATE \" . PREFIX . \"user \n SET `user_password` = '\" . md5($data) . \"'\n WHERE user_id = '\" . $id . \"'\");\n if($select->execute()){\n return true;\n } else {\n return false;\n }\n }\n catch (Exception $e)\n {\n echo 'Message:' . $e->getMessage();\n }\n }", "function alumno_modificar_password($codigo,$password,$nuevo_password){\r\n\t\t\t\t$cn = $this->conexion();\r\n \r\n if($cn!=\"no_conexion\"){\r\n \t$sql=\"update $this->nombre_tabla_alumnos set password='$nuevo_password' where codigo='$codigo' and password='$password'\";\r\n\t\t\t$rs = mysql_query($sql,$cn);\r\n\t\t\t\t\t\t \r\n\t\t\tmysql_close($cn);\t\t\t \r\n\t\t\treturn \"mysql_si\";\r\n\t\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\treturn \"mysql_no\";\r\n\t\t}\r\n\t}", "public function changeUserPassword($uid,$newPassword);", "function update_password()\n {\n }", "function renuevaPassword($password, $user_id)\n {\n\n //la query actualiza la contraseña y cambia el campo password_request a 0 y el token_password lo limpia\n $query = \"UPDATE usuarios SET Passwd = ?, activacion=0 WHERE IdUsuario = ?\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(2, $user_id);\n\n $password_hash = password_hash($password, PASSWORD_BCRYPT);\n $stmt->bindParam('1', $password_hash);\n\n if ($stmt->execute()) {\n return true;\n } else {\n return false;\n }\n }", "function retrievePassword($id_utente) {\n\n $query = sprintf(\"SELECT password FROM scuola.utenti_scuola WHERE id_utente = %s\", $id_utente);\n\n // Perform Query\n $result = mysql_query($query);\n\n $row = mysql_fetch_assoc($result);\n $password = $row['password'];\n\n\n return base64_decode(base64_decode($password));\n }", "public function olvidoPassword(){\n\t}", "function reset_user_passwd($user_id) {\r\n\r\n //set the new password\r\n $new_passwd = \"newpasswod\";\r\n \r\n if ($new_passwd == false) {\r\n throw new Exception ('Could not generate the new password.');\r\n }\r\n \r\n //add numbers to the new passwd to increase the securtiy\r\n $rand_number = rand(0, 999);\r\n $new_passwd . $rand_number;\r\n \r\n //update the new passwd with db\r\n $conn = db_connect();\r\n\r\n $result = $conn->query(\"update users set user_passwd = sha1('\".$new_passwd.\"') where user_id = '\".$user_id.\"'\");\r\n if (!$result) {\r\n throw new Exception ('Could not reset the password.');\r\n }\r\n else {\r\n return true; \r\n }\r\n\r\n }", "public function setpasswordAction(){\n $req=$this->getRequest();\n $cu=$this->aaac->getCurrentUser();\n $password=$this->getRequest()->getParam('password');\n $record=Doctrine_Query::create()->from('Users')->addWhere('ID=?')->fetchOne(array($req->getParam('id'))); \n $record->password=md5($password);\n if(!$record->trySave()){\n $this->errors->addValidationErrors($record);\n }\n $this->emitSaveData(); \n }", "function admin_password($id = null) {\n\n\t\t/**\n\t\t * If $id is not set and $this->data is empty, an error message is displayed.\n\t\t * $this->data = Datas from the form\n\t\t * $id = The user ID\n\t\t */\n\t\tif (!$id && empty($this->data)) {\n\t\t\t$this->Session->setFlash(__d('core', 'Invalid user.', true), 'default', array('class' => 'error'));\n\t\t\t$this->redirect(array('action' => 'password'));\n\t\t}\n\n\t\tif (!empty($this->data)) {\n\n\t\t\t/**\n\t\t\t * Save the user password after edit.\n\t\t\t */\n\t\t\tif ($this->User->save($this->data)) {\n\n\t\t\t\t/**\n\t\t\t\t * Select the subdomain name with the ID.\n\t\t\t\t * It's necessary for the insert in the \"robot\" table.\n\t\t\t\t * @var string\n\t\t\t\t */\n\t\t\t\t$data = $this->Robot->search($id, 'User');\n\n\t\t\t\t/**\n\t\t\t\t * Insert the edit action in the \"logs\" table.\n\t\t\t\t */\n\t\t\t\t$this->Logs->insert($this->Auth->user('id'), '<strong>[ ' . $data['User']['name'] . ' ]</strong> ' . __d('core', 'User password changed by (' . $this->Auth->user('name') . ').', true) , 'CORE', $_SERVER[\"REMOTE_ADDR\"]);\n\n\t\t\t\t/**\n\t\t\t\t * If the new user password is edited, a success message is displayed.\n\t\t\t\t * Redirect to the index page.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user password has been changed.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * If the user password is not edited, an error message is displayed.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user password has not been changed.', true), 'default', array('class' => 'error'));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Display datas.\n\t\t */\n\t\tif (empty($this->data)) {\n\t\t\t$this->data = $this->User->read(null, $id);\n\t\t}\n\n\t}", "public function cambioPassword($usuario){\n\t\t$this->db->where('dni', $usuario['dni']);\n\t\t$this->db->update('usuarios', $usuario);\n\t\treturn $this->db->affected_rows();\n\t}", "public function ActualizarPassword()\n\t{\n\t\tif(empty($_POST[\"cedula\"]))\n\t\t{\n\t\t\techo \"1\";\n\t\t\texit;\n\t\t}\n\n\t\tself::SetNames();\n\t\t$sql = \" update usuarios set \"\n\t\t\t .\" usuario = ?, \"\n\t\t\t .\" password = ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codigo = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $usuario);\n\t\t$stmt->bindParam(2, $password);\n\t\t$stmt->bindParam(3, $codigo);\t\n\t\t\t\n\t\t$usuario = strip_tags($_POST[\"usuario\"]);\n\t\t$password = sha1(md5($_POST[\"password\"]));\n\t\t$codigo = strip_tags($_SESSION[\"codigo\"]);\n\t\t$stmt->execute();\n\n\t\techo \"<div class='alert alert-info'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<span class='fa fa-check-square-o'></span> SU CLAVE DE ACCESO FUE ACTUALIZADA EXITOSAMENTE, SER&Aacute; EXPULSADO DE SU SESI&Oacute;N Y DEBER&Aacute; DE ACCEDER NUEVAMENTE\";\n\t\techo \"</div>\";\t\t\n\t\t?>\n\t\t<script>\n\t\t\tfunction redireccionar(){location.href=\"logout.php\";}\n\t\t\tsetTimeout (\"redireccionar()\", 3000);\n\t\t</script>\n\t\t<?php\n\t\texit;\n\t}", "public function editUserPasswordChk() {\r\n\r\n $table_to_pass = 'mst_users';\r\n $fields_to_pass = array('user_id', 'user_password');\r\n $condition_to_pass = array(\"user_password\" => base64_encode($this->input->post('old_user_password')));\r\n $arr_login_data = $this->user_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\r\n if (count($arr_login_data)) {\r\n echo 'true';\r\n } else {\r\n echo 'false';\r\n }\r\n }", "function password($id = null) {\n\n\t\t/**\n\t\t * Check if maintenance is on.\n\t\t * Call the \"Maintenance\" component to check.\n\t\t */\n\t\t$this->Maintenance->check();\t\t\n\n\t\t/**\n\t\t * If $id is not set and $this->data is empty, an error message is displayed.\n\t\t * $this->data = Datas from the form\n\t\t * $id = The user ID\n\t\t */\n\t\tif (!$id && empty($this->data)) {\n\t\t\t$this->Session->setFlash(__d('core', 'Invalid user password.', true), 'default', array('class' => 'error'));\n\t\t\t$this->redirect(array('action' => 'password', $id));\n\t\t}\n\t\t/**\n\t\t * Check if the user try to edit an another user password.\n\t\t * If yes, the user is redirect to the index page.\n\t\t */\n\t\telseif ($id != $this->Auth->user('id')) {\n\t\t\t$this->Session->setFlash(__d('core', 'Invalid user password', true), 'default', array('class' => 'error'));\n\t\t\t$this->redirect(array('action' => 'index'));\n\t\t}\n\n\t\tif (!empty($this->data)) {\n\n\t\t\t/**\n\t\t\t * Save the user password after edit.\n\t\t\t */\n\t\t\tif ($this->User->save($this->data)) {\n\n\t\t\t\t/**\n\t\t\t\t * Insert the change password action in the \"logs\" table.\n\t\t\t\t */\n\t\t\t\t$this->Logs->insert($this->Auth->user('id'), '<strong>[ Password ]</strong> ' . __d('core', 'Access panel password has been changed.', true), 'CORE', $_SERVER[\"REMOTE_ADDR\"]);\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * If the user password is edited, a success message is displayed.\n\t\t\t\t * Redirect to the index page.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user password has been changed.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * If the user password is not edited, an error message is displayed.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user password has not been changed.', true), 'default', array('class' => 'error'));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Display datas.\n\t\t */\n\t\tif (empty($this->data)) {\n\t\t\t$this->data = $this->User->read(null, $id);\n\t\t}\n\n\t}", "public function changePW()\n {\n $id = $_GET['id'];\n $passwordInDB = $this->model->getPasswordInDB($id);\n // $passwordInDB = $_SESSION['user']['password'];\n $password = $_POST['password'];\n $password_confirm = $_POST['password_confirm'];\n $verifOldPW = password_verify($_POST['old-password'], $passwordInDB['password']);\n $regexCharacterChoice = '/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*\\W)/';\n $errors = [];\n \n if ($verifOldPW === false) {\n $errors['password'] = 'Votre ancien mot de passe est incorrect';\n $this->model->setFlash('danger', 'Votre ancien mot de passe est incorrect');\n header('location:index.php?controller=adherent&action=connexionForm&id='.$id.'');\n }\n if (empty($password) || strlen($password) < 8 || !preg_match($regexCharacterChoice, $password)) {\n $errors['password'] = 'Vous devez rentrer un mot de passe valide';\n $this->model->setFlash('danger', 'Vous devez rentrer un mot de passe valide');\n header('location:index.php?controller=adherent&action=connexionForm&id='.$id.'');\n }\n if ($password != $password_confirm) {\n $errors['password'] = 'Les mots de passe ne correspondent pas';\n $this->model->setFlash('danger', 'Les mots de passe ne correspondent pas');\n header('location:index.php?controller=adherent&action=connexionForm&id='.$id.'');\n }\n if (empty($errors)) {\n $this->model->changePW();\n $this->model->setFlash('success', 'Votre mot de passe a bien été modifié');\n header('location:index.php?controller=adherent&action=connexionForm&id='.$id.'');\n }\n }", "public function changePwd(){\n $uesr_id=$_SESSION['admin_id'];\n\t\t$sql=\"select * from users where id='$uesr_id'\";\n\t\t$query = mysqli_query($this->connrps, $sql);\n\t\twhile ($row = mysqli_fetch_array($query)) {\n\t\t\t$username = $row['username'];\n\t\t\t$password = $row['password'];\n\t\t}\n\t\t$cur_password=base64_encode($_POST['currentPassword']);\n\t\t$new_pwd=base64_encode($_POST['newPassword']);\n\t\t$confirm_pwd=base64_encode($_POST['confirmPassword']);\n\t\tif ($cur_password != $password) {\n\t\t\t$message= \"Current password does not matched.\";\n\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\treturn 0;\n\t\t}else if ($new_pwd != $confirm_pwd) {\n\t\t\t$message= \"Confirm password does not matched\";\n\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\treturn 0;\n\t\t}else {\n\t\t\t$query_updt = \"UPDATE users SET password = '$new_pwd' WHERE id='$uesr_id'\";\n\t\t\t$query_updt = mysqli_query($this->connrps, $query_updt);\n\t\t\t$message= \"New password has been updated successfully\";\n\t\t\t$_SESSION['succ_msg'] = $message;\n\t\t\treturn 1;\n\t\t}\n\t}", "public static function update_pass($idusuario, $usuario_pass, $usuario_pass_nueva){\n// $usuario->setIdusuario($idusuario); \n// $usuario->setUsuario_nombre($usuario_nombre); \n// \n// $usuario->setUsuario_pass($usuario_pass); \n \n $FactoryDao=new FactoryDao(self::getGestorDefault());\n $usuarioDao =$FactoryDao->getusuarioDao(self::getDataBaseDefault());\n $rtn = $usuarioDao->update_pass($idusuario, $usuario_pass, $usuario_pass_nueva);\n $usuarioDao->close();\n return $rtn;\n }", "function get_password($usrid){\r\n\t\r\n}", "public static function password() {\n if ( !isset($_POST['email']) ) {\n return;\n }\n \n $password = substr(Helper::hash(rand(0,16^32).$_POST['email']),0,12);\n \n $result = Database::checkUser($_POST['email']);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzer!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n return;\n }\n \n $id = $result[0]['id'];\n $passwordold = $result[0]['password'];\n \n $pw = Helper::hash($password.$_POST['email']);\n \n $success = Database::setPassword($id,$passwordold,$pw);\n if ( $success !== false ) {\n self::passwordMail($_POST['email'],$password);\n self::setError('Ein neues Passwort wurde dir zugeschickt!<br>');\n } else {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n }\n }", "function checkPasswordExistsUpdate($password,$idUsuario){\n\t\t$sql=\"SELECT \nCOUNT(id_usuario)\nFROM \".$this->tabla.\" \nWHERE user_pass='$password' AND (id_usuario!='$idUsuario')\";\n\n\t\treturn $this->toVar($sql);\n\t}", "function user_changed_password($user_id, $new_password) {\n \n }", "function regiomino_user_change_password($account, $password) {\r\n\t//watchdog('pwdaction', '@password', array('@password' => $password));\r\n $edit['pass'] = $password;\r\n user_save($account, $edit);\r\n}", "function checkPassword(): bool\n {\n $user = FPersistantManager::getInstance()->search(\"utente\", \"UserName\", $this->getUsername());\n if($this->getPassword() == $user[0]->getPassword())\n return true;\n else\n return false;\n }", "public function changePasswordAction(){\n $data = $this->getRequestData();\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n if(isset($data['password']) && isset($data['repeat_password'])){\n if($data['password'] === $data['repeat_password']){\n $user->setPassword($data['password']);\n } else {\n $this->setErrorResponse('password and repeat_password should match!');\n }\n } else {\n $this->setErrorResponse('password and repeat_password is mandatory fields!');\n }\n $this->_helper->json(array('updated' => true));\n }", "public function setPassword($id)\n {\n $this->password = $id;\n }", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function setPassword($userid, $password);", "public function saveAdmPassword(){\n $this->Utilisateur->id = 1;\n if ($this->Utilisateur->saveField('password', $this->data['Utilisateur']['password_new'])):\n $this->Session->setFlash(__('Mot de passe administrateur mis à jour',true),'flash_success');\n else:\n $this->Session->setFlash(__('Mot de passe administrateur <b>NON</b> mis à jour',true),'flash_failure'); \n endif;\n $this->History->goBack(1);\n }", "function modify($id, $email, $password){\n\t\tglobal $con;\n\t\t$query = \"update user set email = '$email', password='$password' where id='$id'\";\n\t\t$res=$con->query($query);\n\t\treturn $res;\n\t}", "public function setPassword(){\n\t}", "function editaPass($email, $password){\n $conn=connexioBD();\n $sql=\"UPDATE usuaris SET password=md5('$password') WHERE email='$email'\";\n if (!$resultado =$conn->query($sql)){\n die(\"Error al editar\".$conn->error);\n }\n\n $conn->close();\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 }", "public function setPassword($value);", "public function initadminpassword() {\n if (isAuthorized('utilisateurs', 'initpassword')) :\n $this->Utilisateur->id = 1;\n $record = $this->Utilisateur->read();\n unset($record['Utilisateur']['password']); \n unset($record['Utilisateur']['created']);\n unset($record['Utilisateur']['modified']);\n $record['Utilisateur']['password']='@DMIN'; \n $record['Utilisateur']['created'] = $this->Utilisateur->read('created');\n $record['Utilisateur']['modified'] = date('Y-m-d'); \n if ($this->Utilisateur->save($record)) {\n $this->save_history(1,'<b style=\"color:red;\">Initialisation du mot de passe administrateur</b>');\n $this->Session->setFlash(__('Mot de passe de l\\'administrateur initialisé',true),'flash_success');\n $this->History->goBack(1);\n } \n $this->Session->setFlash(__('Mot de passe de l\\'administrateur <b>NON</b> initialisé',true),'flash_failure');\n $this->History->goBack(1);\n else :\n $this->Session->setFlash(__('Action non autorisée, veuillez contacter l\\'administrateur.',true),'flash_warning');\n throw new UnauthorizedException(\"Vous n'êtes pas autorisé à utiliser cette fonctionnalité de l'outil\");\n endif; \n }", "public function passwordValide () {\n $password = $this->donnees[self::PASSWORD_REF];\n // Le champ password ne doit pas ?tre vide\n if ($password == null) {\n $this->erreur[self::PASSWORD_REF] = \"Veuillez remplir le champ password\";\n return false;\n }\n // Si le password entr? correspond au password contenu dans la base de donn?es on retourne true\n if ($this->utilisateurs->identificationUser($this->donnees[self::LOGIN_REF], $this->donnees[self::PASSWORD_REF])) {\n return true;\n // Sinon on cr?e une erreur et on renvoie false\n } else {\n $this->erreur[self::PASSWORD_REF] .= \"Mot de passe erron?\";\n return false;\n }\n }", "public function checkPassword($value);", "public function checkPassword($id){\n //cek dulu inputan pertama\n $passO = sha1($this->input->post(\"password_old\"));\n $passN = sha1($this->input->post(\"password_new\"));\n //cek didatabase\n $query = $this->db->query(\"SELECT user_id, user_password FROM `users` WHERE user_password = '$passO' AND user_id = '$id'\");\n //jika password cocok maka..\n if ($query->num_rows() > 0) {\n //lakukan perubahan..\n $update = $this->Main_model->updatePassword($id, $passN);\n if ($update == 0) {\n echo \"Something Eror...\";\n }\n else{\n //perlu dikasih tau soal info suksesnya..\n //perlu direcord ke database kalau melakukan pergantian password\n redirect('umum/logout','refresh');\n }\n }\n else{\n // jika tidak cocok dengan sebelumnya maka..\n $this->session->set_flashdata('info', 'Kamu masukin password lama kamu salah, coba inget - inget lagi deh..');\n redirect('umum/gantiPassword','refresh');\n }\n }", "function changePassword($id_user, $md5_password)\n {\n $bExito = FALSE;\n if (!ereg(\"^[[:digit:]]+$\", \"$id_user\")) {\n $this->errMsg = \"ID de usuario a actualizar no es num&eacute;rico\";\n } else if (!ereg(\"^[[:digit:]a-f]{32}$\", $md5_password)) {\n $this->errMsg = \"Clave de acceso no es un hash MD5 v&aacute;lido\";\n } else {\n if ($this->errMsg == \"\") {\n $sPeticionSQL = paloDB::construirUpdate(\n \"acl_user\",\n array('md5_password' => paloDB::DBCAMPO($md5_password)),\n array('id' => $id_user)\n );\n if ($this->_DB->genQuery($sPeticionSQL)) {\n $bExito = TRUE;\n } else {\n $this->errMsg = $this->_DB->errMsg;\n }\n }\n }\n\n return $bExito;\n }", "public function setPassword($newPassword);", "public function changePass($konsumen_id, $password_baru) {\n \n $app = \\Slim\\Slim::getInstance();\n // fetching user by email\n // Generating password hash\n $password_hash = PassHash::hash($password_baru);\n\n // Generating API key\n $api_key = GeneratorModel::generateApiKey();\n\t\t\n\t$sql = \"UPDATE konsumen SET password_hash =:password_hash, api_key =:api_key, updated_at = NOW() WHERE konsumen_id = :konsumen_id\";\n \n $stmt = $app->db->prepare($sql);\n $change=$stmt->execute(array(\n 'password_hash'=>$password_hash,\n 'api_key'=>$api_key,\n 'konsumen_id'=>$konsumen_id,\n ));\n\t\t\n // Check for successful insertion\n if ($change) {\n //Update user password success\n return TRUE;\n } else {\n //Update user password failed\n\t\t\t\t\n $stmt->close();\n return FALSE;\n }\n }", "public function setPassword($id, $password)\n {\n return false;\n }", "public function getPassword() {}", "function verificaUsuario($login, $password)\n{\n /*\n Logando com ByCrpt\n */\n $sql = \"select senha from usuario where nome = '{$login}'\";\n $resultado = executaSQL($sql);\n $senha = mysqli_fetch_assoc($resultado);\n \n return (crypt($password, $senha['senha']) === $senha['senha']);\n}", "private function set_password($idUser,$type,$newpass){\n\t\tif ($type == \"email\"){\n\t\t\t$datauser = array(\n\t\t\t\t'password' => $this->f1_newpass_encrypt($newpass)\n\t\t\t);\n\t\t}else if ($type == \"google\") {\n\t\t\t$datauser = array(\n\t\t\t\t'googleUID' => $this->openssl('encrypt',$newpass)\n\t\t\t);\n\t\t}else if ($type == \"facebook\"){\n\t\t\t$datauser = array(\n\t\t\t\t'facebookUID' => $this->openssl('encrypt',$newpass)\n\t\t\t);\n\t\t}\n\n\t\t$updatepass = $this->Main_model->CustomUpdate(\"user\",\"idUser\",$idUser,$datauser);\n\t\treturn $updatepass;\n\t}", "public function change_password($id,$pass)\n\t{\n\t\t$sql=\"UPDATE waf_users SET pass='\".md5($pass).\"' WHERE id=\".$this->db->Q($id);\n\t\t$this->db->QUERY($sql);\n\t}", "function ajax_changePass(){\n $pass = md5($this->input->post('password'));\n if(strtoupper($this->session->password) != strtoupper($pass))\n {\n $this->session->sess_destroy();\n echo $this->Conexion->modificar('usuarios', array('password' => $pass), array('vencimiento_password' => 'CURRENT_TIMESTAMP() + INTERVAL 30 day'), array('id' => $this->session->id));\n }\n }", "function getPassword(){\n\n}", "public function testUpdatePasswordNotGiven(): void { }", "public function password($data){\n\n\n \t$q = \"SELECT password FROM user_table WHERE password='$data[current_pass]'\";\n\n \t$result = $this->connection->query($q);\n\n \t // check if current password is correct\n\n \tif($result->num_rows >0){\n\n \n \t\t$id = $_SESSION['id'];\n\n\t \t\tif($data['new_pass']==$data['re_pass'])\n\t \t\t{\n\n\t \t\t\tif(strlen($data['new_pass'])<8){\n\n\t\t\t\t$_SESSION['message'] = \"Password must contain 8 letters\";\n\t\t\t\t $_SESSION['msg_type'] = \"danger\";\n\t\t\t\t}else{\n\n\t \t\t$q=\"UPDATE user_table SET password='$data[new_pass]' WHERE id='$id'\";\n\n\t \t\t$result = $this->connection->query($q);\n\n\t \t\t$_SESSION['message'] = \"Successfully changed\";\n\t \t\t$_SESSION['msg_type'] = \"success\";\n\n\t\t \t}\n\t \n\n\t \t}\n\t \telse\n\t \t{\n\n\t \t\t$_SESSION['message'] = \"New password does not match\";\n\t \t\t$_SESSION['msg_type'] = \"warning\";\n \n\t \t}\n\t }\n\t else\n\t {\n\n\t \t$_SESSION['message']= \"Invalid current password\";\n\t \t$_SESSION['msg_type'] = \"danger\";\n \n\t }\n }", "public function update(){\n\t\t$sql = \"update user set pass='\".$this->pass.\"' where id='\".$this->id.\"'\";\n\t\treturn\tExecutor::doit($sql);\n\t}", "function ModifMiniPassUser( $passUser ){\r\n return md5($passUser);\r\n}", "public function return_password_id( $id )\n\t{\n //Clean variable for input\n $user = $this->main->prepare_sql_input( $id );\n //Prepare sql query\n $query =\n ' SELECT UsuarioPassword FROM Usuario\n WHERE \tUsuarioId= ?\n LIMIT \t1\n ';\n //Execute query with security scape variables\n\t\t$result = $this->db->query( $query,array($user) );\n\t\t//Check if user exists and return pass or false\n\t\tif( $result->num_rows() > 0 ){\n\t\t\t$pass = $result->row()->UsuarioPassword;\n\t\t}\n\t\telse {\n\t\t\t$pass = false;\n\t\t}\n\t\treturn $pass;\n\t}", "public function new_password(int $id)\n {\n $this->form_validation->set_rules('new_pd_user', 'Senha', 'required|regex_match[/^.*(?=.{8,})(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).*$/]|trim',\n array( 'required' => 'O campo %s é obrigatório.',\n 'regex_match' => 'A %s deve conter uma ou mais letras maiúsculas, uma ou mais mininúsculas, números e 8 ou mais caracteres.'));\n $this->form_validation->set_rules('reapeti_new_pw', 'confirmar a senha', 'required|matches[new_pd_user]',\n array('required' => 'O campo %s é obrigatório.',\n 'matches'=>'Confirmar senha está diferente de senha.'));\n\n if ($this->form_validation->run() == FALSE){\n $errors = validation_errors();\n echo json_encode(['error'=>$errors]);\n }else{\n $data = array(\n 'password_inst_pw' => md5($this->input->post('new_pd_user'))\n );\n $this->db->update('tbl_dados_inst_pw_instuicao', $data, array('id_inst_pw' => $id));\n echo json_encode(['success'=>'Senha alterada com sucesso.']);\n }\n }", "function modificarUsuario($usuario,$password,$idUsuario){\n \n $conex=Conexion::getInstance();\n \n $sql=\" UPDATE `usuarios` SET `usuario`='$usuario',`password`='$password' WHERE id=$idUsuario\";\n \n $conex->dbh->prepare($sql);\n $conex->dbh->exec($sql); \n \n\n}", "function cambiaPassword($password, $user_id, $token)\n {\n\n //la query actualiza la contraseña y cambia el campo password_request a 0 y el token_password lo limpia\n $query = \"UPDATE usuarios SET Passwd = ?, PasswdTmp='', password_request=0 WHERE IdUsuario = ? AND PasswdTmp = ?\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(1, $password);\n $stmt->bindParam(2, $user_id);\n $stmt->bindParam(3, $token);\n\n if ($stmt->execute()) {\n return true;\n } else {\n return false;\n }\n }", "public function change_password() {\n $this->check_auth();\n $id = $this->input->post('id');\n $email = $this->input->post('email');\n $pass = $this->input->post('password');\n $new_pass = $this->input->post('new_password');\n if (!empty($id) && !empty($email) && !empty($pass) && !empty($new_pass)) {\n if (intval($id) === intval($this->user_id)) {\n $user = $this->ion_auth_model->login($email, $pass);\n if (!$user) {\n return $this->send_error('INVALID_LOGIN');\n }\n $update['salt'] = $this->ion_auth_model->salt();\n $update['password'] = $this->ion_auth_model->hash_password($new_pass, $update['salt']);\n if (!$this->users_model->where(array('id' => $this->user_id, 'email' => $email))->update($update)) {\n return $this->send_error('UPDATE_ERROR');\n }\n $user = $this->ion_auth_model->login($email, $new_pass);\n if (!$user) {\n return $this->send_error('RELOGIN_FAIL');\n }\n $key = $this->users_model->set_privatekey(true);\n if (!$key) {\n $this->ion_auth->logout();\n return $this->send_error('ERROR');\n }\n return $this->send_response(array(\n 'privatekey' => $key,\n 'user_id' => $this->ion_auth->user()->row()->id\n ));\n }\n }\n return $this->send_error('ERROR');\n }", "public function getPassword(): string;", "function change_password($user_id, $password)\n{\n\n $query = \"select salt, username from tblUser where user_id='$user_id' limit 1\";\n $result = mysql_query($query);\n $user = mysql_fetch_array($result);\n\n $encrypted_pass = md5(md5($password).$user['salt']);\n\n // And lastly, store the information in the database\n $query = \"UPDATE tblUser SET password='$encrypted_pass' WHERE user_id='$user_id'\";\n mysql_query ($query) or die ('Could not create user.');\n\n\t//login user\n\t$username = $user['username'];\n\t$result = user_login($username, $password);\n\n}", "public function testUpdatePasswordOnlyNumbers(): void { }", "public function update_password($id, $password) {\r\n $this->conn->connect();\r\n //INSERT INTO Users (Email, Password, UserType, OrganizationId, FirstName, LastName, HomePhone, MobilePhone, Address1, Address2, City, State, ZipCode, SecurityQuestion1, SecurityQuestion1Answer, SecurityQuestion2, SecurityQuestion2Answer, SecurityQuestion3, SecurityQuestion3Answer) \r\n $result = $this->conn->execute_query(\"UPDATE Users\r\n SET Password = ?\r\n WHERE UserId = ?;\"\r\n ,\"sd\",\r\n password_hash($password, PASSWORD_DEFAULT),\r\n $id\r\n );\r\n }", "public function change_password($data, $user_id) {\r\n\r\n // Start Backend Validation\r\n if (empty($data['old-pwd'])) {\r\n $this->errors['old-pwd'] = 'رجاء لا تترك هذا الحقل فارغا';\r\n }\r\n\r\n if (empty($data['new-pwd'])) {\r\n $this->errors['new-pwd'] = 'رجاء لا تترك هذا الحقل فارغا';\r\n } elseif (strlen($data['new-pwd']) < 8) {\r\n $this->errors['new-pwd'] = 'يجب على كلمة السر أن تتكون من 8 أحرف فأكثر';\r\n }\r\n\r\n if ($data['confirm-pwd'] != $data['new-pwd']) {\r\n $this->errors['confirm-pwd'] = 'كلمتا السر غير متطابقتان';\r\n }\r\n\r\n if (empty($this->errors)) {\r\n // Sanitize Data\r\n $old_pwd = sha1(filter_var($data['old-pwd'], FILTER_SANITIZE_STRING));\r\n $new_pwd = sha1(filter_var($data['new-pwd'], FILTER_SANITIZE_STRING));\r\n\r\n $user = $this->select('users', 'id', $user_id)->fetch_assoc();\r\n\r\n if ($user['password'] === $old_pwd) { // If Passwords Are Mached\r\n $connection = DB::connect();\r\n\r\n // Update The Password\r\n $stmt = \"UPDATE users SET password = '$new_pwd' WHERE id = '$user_id'\";\r\n $result = $connection->query($stmt);\r\n\r\n // Redirect To Profile Page\r\n $profile_url = DB::MAIN_URL . 'profile.php';\r\n header('location: ' . $profile_url);\r\n\r\n } else {\r\n $this->errors['old-pwd'] = 'كلمة السر غير صحيحة';\r\n }\r\n\r\n }\r\n\r\n }", "function mofidPassUtilisateurs($user, $password)\n {\n $bdd = connexMedoo();\n $bdd->update('utilisateurs', [\n 'mdp' => $password ], [\n 'email' => $user\n ]);\n }", "public function dopassword() {\r\n \tif (isset($_SESSION['userid'])) {\n \t $password=$this->model->getpassword($_SESSION['username']);\r\n \t if (!empty($_POST['password']) && !empty($password) && $password[0]['userpasswd']==$_POST['password'] && !empty($_POST['npassword']) && $_POST['npassword']==$_POST['rpassword']) {\n if ($this->model->putpassword($_SESSION['userid'], $_POST['npassword'])) {\r\n $this->view->set('infomessage', \"Hasło zostało zmienione.\");\r\n $this->view->set('redirectto', \"?v=project&a=show\");\r\n $this->view->render('info_view');\r\n } else {\r\n $this->view->set('errormessage', \"Nieudana zmiana hasła.\");\r\n $this->view->set('redirectto', \"?v=user&a=edit\");\r\n $this->view->render('error_view');\r\n \t\t}\r\n } else {\n $this->view->set('errormessage', \"Błędne hasło.\");\r\n $this->view->set('redirectto', \"?v=user&a=edit\");\r\n $this->view->render('error_view');\n }\n \t} else {\r\n $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "function changePassword($userid, $password, $mode = null)\n\t{\n\t\trequire_once $_SERVER['DOCUMENT_ROOT'] . '/Connections/MyDBConnector.php';\n\t\t$pdo = (new MyDBConnector())->getPDO();\n\t\t$sql = \"UPDATE staff_directory SET `pswd` = '\" . password_hash($password, PASSWORD_BCRYPT) . \"' WHERE staffId = \" . $userid;\n\t\t$stmt = $pdo->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\t\t$chk = $stmt->execute();\n\t\tif ($chk) {\n\t\t\treturn 'success';\n\t\t} else {\n\t\t\treturn 'error';\n\t\t}\n\t}", "public function getId(){\n return $this->__get('password_id');\n }", "public function editPassword($id){\n $id_user = $this->session->userdata('id_user');\n\n // Get the user's ID and add it to the config array\n $config = array('userID'=>$id_user);\n\n // Load the ACL library and pas it the config array\n $this->load->library('acl',$config);\n\n // Get the perm key\n // I'm using the URI to keep this pretty simple ( http://www.example.com/test/this ) would be 'test_this'\n $acl_test = $this->uri->segment(1);\n\n // If the user does not have permission either in 'user_perms' or 'role_perms' redirect to login, or restricted, etc\n if ( !$this->acl->hasPermission($acl_test) || !$this->acl->hasProfileIdPermission($id) ) {\n redirect('');\n }\n if($this->input->method() == 'post'){\n $this->load->model('T_user');\n $db_password = $this->T_user->get($id)->password;\n $post_data = $this->input->post();\n\n $match = password_verify($post_data['password_lama'] ,$db_password);\n //var_dump($match);\n //die();\n\n if($post_data['password_baru']!==$post_data['password_retype']){\n $this->load->view('V_header');\n $this->load->view('V_navbar');\n\n $this->load->model('Vw_data_user');\n $data = $this->Vw_data_user->get($id);\n $this->load->view('V_user_profile',[\n 'data' => $data,\n 'error' => 'Password baru tidak sama',\n 'show' => 'password'\n ]);\n $this->load->view('V_footer');\n\n }else{\n if($match==true){\n $this->T_user->edit($id,[\n 'password' => password_hash($post_data['password_baru'], PASSWORD_DEFAULT)\n ]);\n redirect('profil/'.$id, 'refresh');\n\n }else{\n $this->load->view('V_header');\n $this->load->view('V_navbar');\n\n $this->load->model('Vw_data_user');\n $data = $this->Vw_data_user->get($id);\n $this->load->view('V_user_profile',[\n 'data' => $data,\n 'error' => 'Password lama salah',\n 'show' => 'password'\n ]);\n $this->load->view('V_footer');\n }\n }\n\n\n } else if($this->input->method() == 'get'){\n\n\n }\n }", "function changepass_firsttime()\n {\n $userId = $this->userInfo('user_id');\n \n $result = $this->update('user', array('password' => $this->value('password'), 'modified' => date('Y-m-d H:i:s')), \" user_id = \".$userId);\n \n if($result === TRUE)\n {\n //this will prevent user from being logged out automatically. (as it happens in old implementation)\n $_SESSION['password'] = $this->value('password');\n \n //update the patient_history table with \"password change\" action to 'complete'\n $data = array(\n 'patient_id' => $userId,\n 'action_type' => 'first time login',\n 'action' => 'password change', \n 'action_status' => 'complete',\n 'action_time' => date('Y-m-d H:i:s')\n );\n $this->insert('patient_history', $data);\n \n echo \"{success:true, message:'Password updated successfully'}\";\n }\n else\n {\n echo \"{success:false, message:'Password update failure'}\";\n }\n }", "public function newpass()\n {\n if(isset($_POST['LastPassword']) && isset($_POST['NewPassword']))\n {\n if(!empty($_POST['LastPassword']) && !empty($_POST['NewPassword']))\n {\n $this->_oldPass = md5($_POST['LastPassword']);\n $this->_newPassMD5 = md5($_POST['NewPassword']);\n $this->_id = $_SESSION['user_id'];\n $this->_email = $_SESSION['user_email'];\n\n $user = $this->model->checkPassword($this->_id);\n if(!empty($user))\n {\n if($this->_oldPass == $user['Password'])\n {\n if($this->model->changePassword($this->_email, $this->_newPassMD5))\n {\n // Si ok (true) alors on renvoi sur la page de profil\n $messageFlash = 'Your new password has been updated !';\n $this->coreSetFlashMessage('sucess', $messageFlash, 6);\n header('Location:?module=profile');\n exit();\n }\n else\n {\n // Erreur !\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'An error occur. Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }\n else\n {\n // Mauvais password\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'Wrong password ! Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }\n else\n {\n // Pas de user\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'An error occur ! Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }\n else\n {\n // Pas de password\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'No password send ! Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }\n else\n {\n // Pas de post\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'No password send ! Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }", "public function password($user_id, $token){ // cette fonction prend 2 parametres\n // on recherche le premier utilisateur dont id et le token corespondent aux valeur passe en parametres\n $user = $this->User->find('first', array(\n 'fields' => array('id'),\n 'conditions' => array('id' => $user_id, 'token' => $token)\n ));\n // si on ne trouve pas d'utilistaeur c est que le lien de validation n'est pas bon\n if (empty($user)) {\n $this->Session->setFlash('Ce lien ne semble pas bon');\n return $this->redirect(array('action' => 'forgot')); // on est rediriger vers la page forgot\n }\n\n // si on trouve l'utilistaeur c est que le lien de validation est bon\n if(!empty($this->request->data)){\n $this->User->create($this->request->data);\n if($this->User->validates()){ // on valide les données passw et password2\n $this->User->create();\n\n // on enregistre le mot de passe\n $this->User->save(array(\n 'id' => $user['User']['id'],\n 'token' => '',// on vide le champs token\n 'active' => 1, // on force le active à 1\n 'password' => $this->Auth->password($this->request->data['User']['password'])\n ));\n // on affiche message ... on utilise le template flash et la class success\n $this->Session->setFlash(\"Votre mot de passe a bien été modifié\",\"flash\", array('class' => 'success'));\n return $this->redirect(array('action' => 'login')); // on redirige l'utilisateur vers la page de login\n }\n }\n }", "public function editpwd($id)\n { $canedit = ((Auth::user()->is_admin != 0) or (Auth::user()->id == $id));\n //get the user\n $user = user::find($id);\n //if so do the normal thing\n if ($canedit and ($user != null)) {\n \n \n return view('user.editpwd', compact('user'));\n } else {\n //else they shouldn't be here so redirect\n return redirect('/')->with('huh', 'user can not edit the password of this user');\n }\n \n }", "public function cambiarPassword($password, $marcarParaRestaurar = false);", "public function RecuperarPassword()\n{\n\tself::SetNames();\n\tif(empty($_POST[\"email\"]))\n\t{\n\t\techo \"1\";\n\t\texit;\n\t}\n\t\n\t$sql = \" select * from usuarios where email = ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array($_POST[\"email\"]) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"2\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$pa[] = $row;\n\t\t\t}\n\t\t\t$id = $pa[0][\"codigo\"];\n\t\t\t$nombres = $pa[0][\"nombres\"];\n\t\t\t$password = $pa[0][\"password\"];\n\t\t}\n\n\t\t$sql = \" update usuarios set \"\n\t\t.\" password = ? \"\n\t\t.\" where \"\n\t\t.\" codigo = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $password);\n\t\t$stmt->bindParam(2, $codigo);\n\t\t\n\t\t$codigo = $id;\n\t\t$pass = strtoupper(generar_clave(10));\n\t\t$password = sha1(md5($pass));\n\t\t$stmt->execute();\n\n\t\t$para = $_POST[\"email\"];\n\t\t$titulo = 'RECUPERACION DE PASSWORD';\n\t\t$header = 'From: ' . 'SISTEMA DE GESTION PARA RESTAURANT';\n\t\t$msjCorreo = \" Nombre: $nombres\\n Nuevo Passw: $pass\\n Mensaje: Por favor use esta nueva clave de acceso para ingresar al Sistema de Gestion para Restaurantes\\n\";\n\t\tmail($para, $titulo, $msjCorreo, $header);\n\t\t\n\t\techo \"<div class='alert alert-info'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<span class='fa fa-check-square-o'></span> SU NUEVA CLAVE DE ACCESO LE FUE ENVIADA A SU CORREO\";\n\t\techo \"</div>\";\n\n\t}", "function p_update_row(\n\t\t\t\t$cod_usuario_pk\t,\n\t\t\t\t$cod_usuario\t,\n\t\t\t\t$txt_login\t\t,\n\t\t\t\t$txt_password\n\t\t){\n\t\t\tglobal $db;\n\t\t\t$query =\"\n\t\t\tupdate \tseg_usuario set\n\t\t\t\t\ttxt_login\t\t= '$txt_login'\t\t,\n\t\t\t\t\ttxt_password\t= password(SHA('$txt_password')),\n\t\t\t\t\tcod_usuario\t\t= '$cod_usuario'\n\t\t\twhere\tcod_usuario_pk\t= $cod_usuario_pk\";\n\t\t\t$db->consultar($query);\t\n\t\t}", "function changePassword($newpass) {\n\t\tif ($this->id == null || $this->id == 0) return false;\n\n\t\t$db = getDb();\n\n\t\t$update_query = \"UPDATE user_table SET\n\t\tuser_password = $newpass\n\t\tWHERE user_id = '$this->id';\";\n\n\t\t$result = mysqli_query($db, $update_query);\n\n\t\tmysqli_close($db);\n\n\t\tif (!$result) return false;\n\n\t\treturn true;\n\n\t}", "function update_pass() {\n\n global $conn;\n\n $stmt = $conn->prepare('\n UPDATE Customer SET Pass = :Pass\n WHERE Customer_id = :Customer_id\n ');\n\n $encrypted_pass = sha1($this->Pass);\n\n $stmt->bindParam(':Pass', $encrypted_pass);\n $stmt->bindParam(':Customer_id', $this->Customer_id);\n\n return $stmt->execute();\n }", "function reset_password_login($pwd, $check, $id) {\n include $_SERVER['DOCUMENT_ROOT'].'/config/database.php';\n if (!preg_match(\"/^.{8,40}$/\", $pwd) || !preg_match(\"/^.{8,40}$/\", $check) || $pwd !== $check) {\n header(\"Location: ../settings.php?error=Invalid password !\");\n exit;\n }\n try {\n $DB = new PDO($DB_DSN.\";dbname=\".$DB_NAME, $DB_USER, $DB_PASSWORD);\n $stmt = $DB->prepare(\"SELECT `password` FROM user_info WHERE acc_id=?\");\n $stmt->execute([$id]);\n $user = $stmt->fetch();\n if (!empty($user)) {\n try {\n $stmt = $DB->prepare(\"UPDATE user_info SET `password`=? WHERE acc_id=?\");\n $stmt->execute([password_hash($pwd, PASSWORD_BCRYPT), $id]);\n header('Location: ../settings.php?success=Password changed !');\n } catch (PDOException $e) {\n header(\"Location: ../settings.php?error=Database error :(\");\n }\n }\n } catch (PDOException $e) {\n header(\"Location: ../settings.php?error=Database error :(\");\n }\n}", "public function updatePwd(){\n if(\n !empty($_POST['pwd1']) &&\n !empty($_POST['pwd2']) &&\n $_POST['pwd1'] == $_POST['pwd2']){\n $pwd = $_POST['pwd1'];\n $id = $_SESSION['userID'];\n $user = new User();\n $user->updatePwd($pwd, $id);\n }\n else {\n echo \"false\";\n }\n }", "function savePassword()\n {\n // get real current password from database\n $realPassword = null;\n $dataReturn = $this->model->khachhang->getCustomerPassword($_SESSION['idUser']);\n if (!empty($dataReturn)) {\n $realPassword = $dataReturn['matKhau'];\n }\n // data user enter in form change password\n $currentPasswordText = isset($_POST['customer_password_current']) ? $_POST['customer_password_current'] : '';\n // kiem tra mat khau hien tai nhap vao co giong voi mat khau trong CSDL la $realPassword hay khong ?\n if (!password_verify(addslashes($currentPasswordText . $_SESSION['email']), $realPassword)) {\n // neu khong trung khop\n $_SESSION['error-changePassCustomer'] = 'Mật khẩu hiện tại không đúng !';\n redirect('user/changePassword');\n } else {\n $newPasswordText = isset($_POST['customer_password_new']) ? $_POST['customer_password_new'] : '';\n $resultUpdate = $this->model->khachhang->updateCustomerPassword($_SESSION['idUser'], $newPasswordText);\n if ($resultUpdate) {\n // neu luu mat khau moi thanh cong\n $_SESSION['success-changePassCustomer'] = 'Đổi mật khẩu mới thành công !';\n redirect('user/index');\n } else {\n\n }\n }\n }", "function RecoverySharedPasswordByID($iUID) {\n\t\t$SQLStrQuery=\"SELECT CRYPTPASS FROM Password WHERE (UID='\".$iUID.\"')\";\n\t\tSQLQuery($ResponsePointer,$n,$SQLStrQuery,true); // Realiza la consulta en la base de datos globales\n\t\tConvertPointerToArray($ResponsePointer,$Pass,$n,1); // Convertir la consulta en un arreglo de datos\n\t\treturn $Pass;\n\t}", "public function changePassword(Request $request, $id)\n {\n\n $user = User::where('delete_flag', 0)->findOrFail($id);\n if((!Auth::user()->roleAdmin()) || (Auth::user()->id == $id)) {\n $this->validate($request, [\n\n 'oldpassword' => 'required|min:3|max:50',\n 'password' => 'required|min:3|max:50',\n 'repassword' => 'required|same:password',\n\n ], [\n 'oldpassword.required' => 'Vui lòng nhập mật khẩu cũ',\n 'oldpassword.min' => 'Nhập sai mật khẩu cũ',\n 'oldpassword.max' => 'Nhập sai mật khẩu cũ',\n 'password.required' => 'Vui lòng nhập mật khẩu',\n 'password.min' => 'Mật khẩu mới phải có ít nhất 3 kí tự',\n 'password.max' => 'Mật khẩu mới quá dài',\n 'repassword.required' => 'Vui lòng xác nhật mật khẩu',\n 'repassword.same' => 'Xác nhận mật khẩu không đúng',\n ]);\n }\n else{\n $this->validate($request, [\n\n 'password' => 'required|min:3|max:50',\n 'repassword' => 'required|same:password',\n\n ], [\n 'password.required' => 'Vui lòng nhập mật khẩu',\n 'password.min' => 'Mật khẩu mới phải có ít nhất 3 kí tự',\n 'password.max' => 'Mật khẩu mới quá dài',\n 'repassword.required' => 'Vui lòng xác nhật mật khẩu',\n 'repassword.same' => 'Xác nhận mật khẩu không đúng',\n ]);\n }\n if (!\\Hash::check($request->oldpassword, $user->password)) {\n session()->flash('message', 'Mật khẩu cũ không chính xác!');\n return redirect()->route('tutor.edit', $id);\n }\n $user->password = bcrypt($request->password);\n if ($user->save()) {\n session()->flash('message', 'Đổi mật khẩu thành công!');\n return redirect('tutor');\n } else {\n session()->flash('message', 'Đổi mật khẩu thất bại!');\n return redirect('tutor.edit');\n }\n }", "function changePass() {\n\t\t$id = $this->AuthExt->User('id');\n\t\tif (!$id && empty($this->data)) {\n\t\t\t$this->Session->setFlash(__('Invalid user', true));\n\t\t\t$this->redirect(array('action' => 'index'));\n\t\t}\n\t\t\n\t\tif (!empty($this->data)) {\n\t\t\t//don't allow hidden variables tweaking get the group and username \n\t\t\t//form the system in case an override occured from the hidden fields\n\t\t\t$this->data['User']['role_id'] = $this->AuthExt->User('role_id');\n\t\t\t$this->data['User']['username'] = $this->AuthExt->User('username');\n\t\t\tif ($this->User->save($this->data)) {\n\t\t\t\t$this->Session->setFlash('The password change has been saved', 'flash_success');\n\t\t\t\t$this->redirect(array('action' => 'index', 'controller' => ''));\n\t\t\t} else {\n\t\t\t\tprint_r($this->data);\n\t\t\t\t$this->data = $this->User->read(null, $id);\n\t\t\t\t$this->data['User']['password'] = null;\n\t\t\t\t$this->data['User']['confirm_passwd'] = null;\n\t\t\t\t$this->Session->setFlash('The password could not be saved. Please, try again.', 'flash_failure');\n\t\t\t}\n\t\t}\n\t\tif (empty($this->data)) {\n\t\t\t$this->data = $this->User->read(null, $id);\n\t\t\t$this->data['User']['password'] = null;\n\t\t}\n\t\t$roles = $this->User->Role->find('list');\n\t\t$this->set(compact('roles'));\n\t}", "public function changePassword($password, $id) \n {\n $this->db->set('password', hashPassword($password));\n $this->db->where('id', $id);\n $this->db->update('users');\n return true;\n }", "public function user_password_change($id){\n\t\tif($this->facebook_password_completed($this->session->userdata('id'))){\n\t\t\t$data = $this->array_from_post(array('password', 'facebook_signup' ));\n\t\t}\n\t\telse{\n\t\t\t$data = $this->array_from_post(array('password'));\n\t\t}\n\t\t$data['password'] = $this->hash($data['password']);\n\t\t//Saving data and redirecting\n\t\t$this->save($data, $id);\n\t}", "protected function _updatePassword() {\n\t\tif(!check($this->_userid)) return;\n\t\tif(!check($this->_username)) return;\n\t\tif(!check($this->_newPassword)) return;\n\t\tif($this->_md5Enabled) {\n\t\t\t$data = array(\n\t\t\t\t'userid' => $this->_userid,\n\t\t\t\t'username' => $this->_username,\n\t\t\t\t'newpassword' => $this->_newPassword\n\t\t\t);\n\t\t\t$query = \"UPDATE \"._TBL_MI_.\" SET \"._CLMN_PASSWD_.\" = [dbo].[fn_md5](:newpassword, :username) WHERE \"._CLMN_MEMBID_.\" = :userid\";\n\t\t} else {\n\t\t\t$data = array(\n\t\t\t\t'userid' => $this->_userid,\n\t\t\t\t'newpassword' => $this->_newPassword\n\t\t\t);\n\t\t\t$query = \"UPDATE \"._TBL_MI_.\" SET \"._CLMN_PASSWD_.\" = :newpassword WHERE \"._CLMN_MEMBID_.\" = :userid\";\n\t\t}\n\t\t\n\t\t$result = $this->db->query($query, $data);\n\t\tif(!$result) return;\n\t\t\n\t\treturn true;\n\t}", "public function account_change_password()\n\t{\n\t\t$user_session = $this->session->all_userdata();\n\t\t$user_id = $user_session['user_id'];\n\t\t\n\t\t// print_r($user_id);\n\t\t// die;\n\n\t\t$new_password = $this->input->post('new_password');\n\t\t$retype_password = $this->input->post('retype_password');\n\n\t\tif ($new_password != $retype_password)\n\t\t{\n\t\t\t$this->system_message->set_error(\"Password Miss Match\");\n\n\t\t}\n\t\telse{\n\t\t\t$data = array('password' => $this->input->post('new_password'));\n\t\t\tif (!empty($new_password) && !empty($retype_password))\n\t\t\t{\n\t\t\t\tif ($this->ion_auth->update($this->mUser->id, $data))\n\t\t\t\t{\n\t\t\t\t\t$this->custom_model->my_update(array('password_show'=>$new_password),array('id' => $user_id),'admin_users');\n\t\t\t\t\techo \"success\"; die;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"error\"; die;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"error\"; die;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private function valPassLMS(){\n $LMS = new LMS();\n\n $apiUser = $LMS->getDataXUserPass($this->_user, $this->_pass, 'https://www.sistemauno.com/source/ws/uno_wsj_login.php');\n\n if(is_numeric($apiUser)) {\n return false;\n }else {\n\n $datUser = json_decode($apiUser);\n\n\n if ($datUser->person) {\n //update pass Local\n $pass = Mcrypt::encrypt($this->_pass);\n\n $em = $this->getDoctrine()->getManager();\n $personDB = $em->getRepository(PersonDB_L)->findOneBy(array('personid' => $datUser->person->personId));\n if ($personDB) {\n //$personDB->setUser($pass);\n $personDB->setPassword($pass);\n $em->flush();\n\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }\n\n }", "function user_changed_password($user_id, $new_password)\n\t{\n\t}" ]
[ "0.7323793", "0.7313081", "0.7263511", "0.7235679", "0.7160481", "0.71584487", "0.714126", "0.7055931", "0.70546246", "0.7041285", "0.7030128", "0.70249176", "0.7023455", "0.6973689", "0.6952187", "0.69416004", "0.6918794", "0.6905946", "0.6892015", "0.6886852", "0.68851084", "0.6884763", "0.6857003", "0.6841115", "0.6814694", "0.6809134", "0.6792088", "0.67800796", "0.67723787", "0.6740712", "0.67404544", "0.67376626", "0.67293006", "0.67293006", "0.67293006", "0.67293006", "0.67293006", "0.67293006", "0.67293006", "0.6721784", "0.6711665", "0.6710473", "0.67100334", "0.6704325", "0.6697611", "0.6683872", "0.6681529", "0.667291", "0.6672812", "0.6658915", "0.6656806", "0.66504544", "0.6642749", "0.6635168", "0.66282654", "0.66194457", "0.66193473", "0.66065013", "0.66061056", "0.659468", "0.65916145", "0.65897334", "0.6561009", "0.65573496", "0.65554607", "0.6554734", "0.6550541", "0.6546189", "0.6543289", "0.6542779", "0.6523217", "0.6521041", "0.651665", "0.6515829", "0.65054876", "0.65017086", "0.65001506", "0.6499292", "0.6496063", "0.6494627", "0.6487688", "0.6487506", "0.64860374", "0.6485431", "0.6476564", "0.64762646", "0.6476257", "0.6474415", "0.6473014", "0.64722466", "0.6471825", "0.6468076", "0.6462472", "0.6454102", "0.6451774", "0.644922", "0.64485496", "0.6448507", "0.6438945", "0.6413379" ]
0.6711575
41
consulta per el buscador
public function getNotciaSearch($paraula){ $NoticiaTaula = new NoticiaTaula(); $UsuariOk = array(); $select = $this->select(); $select->where('MATCH(username,Localidad,Tuvida,Aficiones) AGAINST(?)',$paraula); $users = $this->fetchAll($select); $count=0; foreach($users as $user){ $UsuariOk[$count] = new Usuari($user->id_user, $user->nombre, $user->email, $user->username,$user->foto, $user->Localidad, $user->Tuvida,$user->Aficiones, $user->Data_neixament); $cantitat = $NoticiaTaula->cantitatUserFora($user->id_user); $UsuariOk[$count]->addNoticies($cantitat); $count++; } return $UsuariOk; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cargar_cuenta_de_gastos($buscar='') {\n if($buscar==''){\n $sql = \"SELECT id_plan_contable,cuenta_plan_contable,descripcion_plan_contable,cargar_plan_contable,abonar_plan_contable,transferencia_plan_contable FROM prosic_plan_contable WHERE cuenta_plan_contable LIKE '3%' OR cuenta_plan_contable LIKE '6%' ORDER BY cuenta_plan_contable\";\n }else{\n $sql = \"SELECT id_plan_contable,cuenta_plan_contable,descripcion_plan_contable,cargar_plan_contable,abonar_plan_contable,transferencia_plan_contable FROM prosic_plan_contable WHERE cuenta_plan_contable LIKE '\".$buscar.\"%' ORDER BY cuenta_plan_contable\";\n }\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function SEARCH(){\n\t\t$sql = \"SELECT * FROM RESERVA\n\t\t\t\tWHERE FECHA BETWEEN '$this->hoy' AND '$this->hoy_mas6'\n\t\t\t\tORDER BY FECHA\";\n\n if (!($resultado = $this->mysqli->query($sql))){\n $this->mensaje['mensaje'] = 'ERROR: Fallo en la consulta sobre la base de datos';\n return $this->mensaje;\n }\n else{ // si la busqueda es correcta devolvemos el recordset resultado\n return $resultado;\n }\n }", "public function resultados($bus){\n $this->busqueda=$bus;\n $this->consulta= $this->con->query(\"SELECT * FROM usuarios WHERE apellido like '%$this->busqueda%'\");\n if($this->busqueda==''){\n \n }else{\n \n \n ?>\n <table class=\"table table-bordered table-striped table-hover\">\n <thead>\n <tr class=\"bg-blue\">\n <th>APELLIDO Y NOMBRE</th>\n <th>DNI</th>\n <th>EDAD</th>\n <th>DIRECCIÓN</th>\n <th>CONTACTO</th>\n </tr>\n </thead>\n <tbody>\n <?php\n while($this->datos= $this->consulta->fetch_array()){\n ?>\n <tr>\n <td><?php echo $this->datos['apellido'].', '.$this->datos['nombre'] ?></td>\n <td><?php echo $this->datos['dni']?></td>\n <td><?php echo $this->datos['edad'] ?></td>\n <td><?php echo $this->datos['domicilio'] ?></td>\n <td><?php echo $this->datos['email']?></td>\n </tr>\n <?php\n }\n ?>\n </tbody>\n </table> \n <?php \n } \n }", "function cargar_cuenta_banco($buscar='') {\n if($buscar==''){\n $sql = \"SELECT id_plan_contable,cuenta_plan_contable,descripcion_plan_contable,cargar_plan_contable,abonar_plan_contable,transferencia_plan_contable FROM prosic_plan_contable ORDER BY cuenta_plan_contable\";\n }else{\n $sql = \"SELECT id_plan_contable,cuenta_plan_contable,descripcion_plan_contable,cargar_plan_contable,abonar_plan_contable,transferencia_plan_contable FROM prosic_plan_contable WHERE cuenta_plan_contable LIKE '\".$buscar.\"%' ORDER BY cuenta_plan_contable\";\n }\n \n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "private function _consultar() {\n $where = \"\";\n if(!empty($this->_idDato)){\n $where = \"AND b.id_valor = $this->_idDato \";\n }\n if(!empty($this->_valor)){\n if(is_array($this->_valor)){\n $aux = each($this->_valor);\n $where = \"AND b.valor {$aux['key']} '{$aux['value']}' \";\n }else{\n $where = \"AND b.valor = '$this->_valor' \";\n }\n \n }\n $query = \"SELECT a.nom_tabla,b.* FROM \nmt_tablas a,\nmt_contenidos b\nWHERE a.id_tablas = {$this->_idTabla}\nAND a.estado = 1 $where\nAND a.id_tablas = b.id_tabla\nAND b.estado = 1\";\n \n if(is_array($this->_orden) && count($this->_orden) == 2){\n $query .= (\" ORDER BY \" . ($this->_orden[0] == 1 ? \"id_valor \" : \"valor \") . $this->_orden[1] );\n }\n $con = ConexionSQL::getInstance();\n $id = $con->consultar($query);\n if($res = $con->obenerFila($id)){\n $R = array();\n do{\n $aux = array();\n foreach($res as $key => $valor){\n if(!is_numeric($key)){\n $aux[$key] = $valor;\n }\n }\n $R[] = $aux;\n }while($res = $con->obenerFila($id));\n return $R;\n }\n return false;\n }", "private function consultar_usuario_por_nombre() {\n $sentencia = \"select id,nombrecompleto ,correo,token \"\n . \"from usuario u where u.nombrecompleto ilike '%{$this->referencia_a_buscar}%'; \";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n }", "public function consultar(){\n $valor = $_GET['valor'];\n\n\n $cnx = Conexao::chamaConexao();\n $result= $cnx->prepare(\"select * from utilizador where nome LIKE '%\".$valor.\"%'\");\n $result->execute();\n //$result = $cnx->prepare(\"SELECT * FROM evento WHERE nome LIKE ?\");\n //$result->bindValue(\"%:Nome%\", $valor, PDO::PARAM_STR);\n //$retorno = $result->execute();\n\n while( $dados = $result->fetch(PDO::FETCH_OBJ)):\n\n echo \"<a href=\\\"javascript:func()\\\" onclick=\\\"exibirConteudo('\".$dados->idUser.\"')\\\">\" . $dados->nome . \"</a><br />\";\n\n\n endwhile;\n }", "function buscar_eu($registrado,$texto_buscar,$sql,$idioma) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_visibles=\"AND eu_estado=1\n\t\t\t\";\n\t\t}\n\t\t\n\t\tif ($texto_buscar !='' && $idioma=='es') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (eu.eu_titulo LIKE '%$texto_buscar%' \n\t\t\tOR eu_descripcion.eu_descripcion LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t\n\t\t} elseif ($texto_buscar !='' && $idioma!='es') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (eu.eu_titulo LIKE '%$texto_buscar%' \n\t\t\tOR eu_descripcion.eu_descripcion_\".$idioma.\" LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t} else {\n\t\t\t\n\t\t\t$sql_texto=\"AND (eu.eu_titulo LIKE '%$texto_buscar%' \n\t\t\tOR eu_descripcion.eu_descripcion LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t}\n\t\t\n\t\t$query = \"SELECT COUNT(*) \n\t\tFROM eu, eu_descripcion\n\t\tWHERE eu.id_eu=eu_descripcion.id_eu\n\t\t$sql\n\t\t$sql_texto\n\t\t$mostrar_visibles\n\t\tORDER BY eu.fecha_alta desc\";\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\n\t\t$numrows = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows[0] == 0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn $numrows[0];\n\t\t}\n\t}", "function buscar_eu_completo($texto_buscar,$sql) {\n\t\n\t\t$mostrar_visibles=\"AND eu_estado=1\n\t\t\";\n\t\t$idioma=='es';\n\t\t\t\n\t\t$sql_texto=\"AND (eu.eu_titulo LIKE '%$texto_buscar%' \n\t\t\tOR eu_descripcion.eu_descripcion LIKE '%$texto_buscar%') \n\t\t\";\n\t\t\n\t\t$query = \"SELECT eu.*, eu_descripcion.*\n\t\tFROM eu, eu_descripcion\n\t\tWHERE eu.id_eu=eu_descripcion.id_eu\n\t\t$sql\n\t\t$sql_texto\n\t\t$mostrar_visibles\n\t\tORDER BY eu.id_eu desc\";\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\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 false;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function consultarCatalogCar() {\n \t\t$existen = false;\n \t\t$this->conn = new Conexion('../../php/datosServer.php');\n\t\t\t$this->conn = $this->conn->conectar();\n\t\t\t\n\t\t\t\t $sql = \"CALL consultarCatalog('carreras');\"; \n\t\t\t\t\t$info = '<div class=\"animated fadeInDown BtnShadow\" id=\"resultados\">\n\t\t\t\t\t<span class=\"label warning\" style=\"margin: 8px;\"><i class=\"fa fa-list-alt fa-lg\"></i> Catálogo de Carreras</span><br>\n\t\t\t\t\t\t <div class=\"form-item\">\n\t\t\t\t\t <input data-tipso=\"Escribe una palabra clave.\" type=\"text\" id=\"resultados\" placeholder=\"Filtrar Resultados\" class=\"filterBoxy\">\n\t\t\t\t\t </div>\t\t\t\t\n\t\t\t\t\t<table class=\"flat tableLines\">\n \t \t\t\t\t\n \t \t\t\t\t<tr class=\"titleTable\"><th>Cve-Carrera</th>\n\t\t\t \t<th>Carrera</th><th>Editar</th></tr><tbody id=\"resultadoBus\">';\n\t\n\t\t\t\n\t\t\t$result = $this->conn->query($sql);\n if ($result->num_rows > 0) {\n while($row = $result->fetch_array(MYSQLI_NUM)) {\n \t$info .= '<tr><td style=\"color: #400101;\">'.$row[0].'</td>'.'<td>'.$row[1].'</td><td><span id=\"row-carrera\" style=\"cursor: pointer;\" class=\"label badge success\"><i class=\"fa fa-pencil fa-lg\"></i></span></td></tr>';\n \t}\n \t$info .= '</tbody></table></div>\n \t<div class=\"row centered\">\n\t\t\t\t\t\t <div class=\"col col-5\">\n\t\t\t\t\t\t\t\t<form id=\"editar-carrera\" class=\"form\">\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t \n\t\t\t\t\t\t </div>\n\t\t\t\t\t\t</div>';\n \t\n \t$info .= '\n\t\t\t\t\t\t\t<script type=\"text/javascript\" src=\"../js/table-filter.js\"></script> \t\n \t';\n $existen = true;\n }\n \n if($existen == true) {\n \t\techo $info;\n \t}else echo -1;\n $this->conn->close();\n \t\t}", "function ejecutarConsulta() {\n\t\t$this->openConnection();\n\t\t$res = $this->conn->query($this->consulta);\n\t\t$this->closeConnection();\n\t\treturn $res;\n\t}", "function buscaObsCadImob($pdo, $inscricao_imob) {\r\n $sql = \"SELECT * FROM Observacao_imob WHERE Inscricao_Imob = '$inscricao_imob'\";\r\n $query = $pdo->prepare($sql);\r\n//executo o comando sql\r\n $query->execute();\r\n\r\n// Faço uma comparação para saber se a busca trouxe algum resultado\r\n if (($dados = $query->fetch()) == true) {\r\n return $dados['Observacao'];\r\n } else {\r\n return \"\";\r\n }\r\n}", "public function consultarCatalogCor() {\n \t\t$existen = false;\n \t\t$this->conn = new Conexion('../../php/datosServer.php');\n\t\t\t$this->conn = $this->conn->conectar();\n\t\t\t\n\t\t\t\t $sql = \"CALL consultarCatalog('coordinadores');\"; \n\t\t\t\t\t$info = '<div class=\"animated fadeInDown BtnShadow\" id=\"resultados\">\n\t\t\t\t\t<span class=\"label warning\" style=\"margin: 8px;\"><i class=\"fa fa-list-alt fa-lg\"></i> Catálogo de Coordinadores</span><br>\n\t\t\t\t\t\t <div class=\"form-item\">\n\t\t\t\t\t <input data-tipso=\"Escribe una palabra clave.\" type=\"text\" id=\"resultados\" placeholder=\"Filtrar Resultados\" class=\"filterBoxy\">\n\t\t\t\t\t </div>\t\t\t\t\n\t\t\t\t\t<table class=\"flat tableLines\">\n \t \t\t\t\t<tr class=\"titleTable\"><th>RFC</th>\n\t\t\t \t\t<th>Nombre</th>\n\t\t\t \t\t<th>Activo</th>\n\t\t\t\t\t\t<th>Correo</th>\n\t\t\t\t\t\t<th>Carrera</th></tr><tbody id=\"resultadoBus\">';\n\t\n\t\t\t\n\t\t\t$result = $this->conn->query($sql);\n if ($result->num_rows > 0) {\n while($row = $result->fetch_array(MYSQLI_NUM)) {\n \t$info .= '<tr><td style=\"color: #400101;\">'.$row[0].'</td>'.\n \t\t'<td><b>'.$row[1].' '.$row[2].' '.$row[3].'</b></td>';\n \t$info .= ($row[4] == 1 ? '<td><span class=\"label success\">SI</span></td>' : '<td><span class=\"label error\">NO</span></td>');\n \t$info .= '<td>'.$row[5].'</td>'.'<td>'.$row[6].'</td></tr>';\n \t}\n \t$info .= '</tbody></table></div>';\n \t\n \t$info .= '\n\t\t\t\t\t\t\t<script type=\"text/javascript\" src=\"../js/table-filter.js\"></script> \t\n \t';\n $existen = true;\n }\n \n if($existen == true) {\n \t\techo $info;\n \t}else echo -1;\n $this->conn->close();\n \t\t}", "public function consultarCatalogGru() {\n \t\t$existen = false;\n \t\t$this->conn = new Conexion('../../php/datosServer.php');\n\t\t\t$this->conn = $this->conn->conectar();\n\t\t\t\n\t\t\t\t $sql = \"CALL consultarCatalog('grupos');\"; \n\t\t\t\t\t$info = '<div class=\"animated fadeInDown BtnShadow\" id=\"resultados\">\n\t\t\t\t\t<span class=\"label warning\" style=\"margin: 8px;\"><i class=\"fa fa-list-alt fa-lg\"></i> Catálogo de Grupos</span><br>\n\t\t\t\t\t\t <div class=\"form-item\">\n\t\t\t\t\t <input data-tipso=\"Escribe una palabra clave.\" type=\"text\" id=\"resultados\" placeholder=\"Filtrar Resultados\" class=\"filterBoxy\">\n\t\t\t\t\t </div>\t\t\t\t\n\t\t\t\t\t<table class=\"flat tableLines\">\n \t \t\t\t\t<tr class=\"titleTable\"><th>ID Grupo</th>\n\t\t\t \t\t<th>Nombre</th>\n\t\t\t \t\t<th>Salón</th>\n\t\t\t\t\t\t<th>Hora</th>\n\t\t\t\t\t\t<th>Periodo</th>\n\t\t\t\t\t\t<th>Carrera</th>\n\t\t\t\t\t\t<th>Tutor</th>\n\t\t\t\t\t\t<th>Editar</th></tr><tbody id=\"resultadoBus\">';\n\t\n\t\t\t\n\t\t\t$result = $this->conn->query($sql);\n if ($result->num_rows > 0) {\n while($row = $result->fetch_array(MYSQLI_NUM)) {\n \t$info .= '<tr><td style=\"color: #400101;\">'.$row[0].'</td>'.\n \t'<td>'.$row[1].'</td>'.\n \t'<td>'.$row[2].'</td>'.\n \t'<td>'.$row[3].'</td>'.\n \t'<td>'.$row[4].'</td>'.\n \t'<td>'.$row[5].'</td>';\n \t\n \tif(empty($row[6])) {\n \t\t$info .= '<td><span class=\"label error\">Sin Tutor</span></td>';\n \t\t}else{\n\t\t\t\t\t\t\t$info .= '<td><b>'.$row[6].' '.$row[7].' '.$row[8].'</b></td>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$info .= '<td id=\"'.$row[0].'\"><span id=\"edit-grup\" style=\"cursor: pointer;\" class=\"label warning\"><i class=\"fa fa-gear fa-lg\"></i></span></td></tr>';\n \t}\n \t$info .= '</tbody></table></div>';\n \t\n \t$info .= '\n\t\t\t\t\t\t\t<script type=\"text/javascript\" src=\"../js/table-filter.js\"></script> \t\n \t';\n $existen = true;\n }\n \n if($existen == true) {\n \t\techo $info;\n \t}else echo -1;\n $this->conn->close();\n \t\t}", "public function buscarhorario()\n\t{\n\t\t$query=\"SELECT * FROM horario WHERE idhorario=\".$this->idhorario;\n\n\t\t\n\t\t$resp=$this->db->consulta($query);\n\t\t\n\t\t//echo $total;\n\t\treturn $resp;\n\t}", "function listarSolicitacoesBusca($solicitacao,$cliente){\r\n\r\n require 'conexao.php';\r\n\r\n $sql = \"SELECT * FROM tb_solicitacao\r\n INNER JOIN tb_cliente ON solcliid = cliid\r\n INNER JOIN tb_servico ON solserid = serid\r\n\r\n WHERE solcliid = $cliente AND (solstatus = 'Pendente' OR solstatus = 'Aguardando Autônomo') AND (soldata LIKE '%\".$solicitacao.\"%' OR serdescricao OR '%\".$solicitacao.\"%' OR solstatus LIKE '%\".$solicitacao.\"%' )\";\r\n\r\n $result = mysqli_query($con,$sql) or die(mysqli_error($con));\r\n\r\n $valida = mysqli_num_rows($result);\r\n\r\n if($valida > 0){\r\n return $result;\r\n\r\n }else{\r\n\r\n return false;\r\n }\r\n}", "public function consultar()\r\n {\r\n $id = $_GET['id'];\r\n\r\n //criando conexão com o banco\r\n $q = new QueryBuilder();\r\n\r\n //selecionando dados\r\n $dados = $q->selectinner2($id);\r\n\r\n \r\n\r\n //devolvendo a pagina \r\n require './app/views/consultar.php';\r\n\r\n \r\n\r\n \r\n }", "function consulta($Conexion_ID, $Where = \"\"){\r\n\r\n $SQL = \"SELECT me.id, me.snombre,\r\n\t\t me.sapellido, me.stelefono,\r\n\t\t me.stelefono_1, me.id_especialidad,\r\n\t\t me.bactivo, esp.id as esp_id, esp.sdescripcion as esp_descrip FROM doctor me, especialidad esp WHERE me.id_especialidad = esp.id \";\r\n\r\n if (!empty($Where)) {\r\n $SQL .= \" AND \" . $Where;\r\n\r\n }\r\n\r\n $SQL .= \" ORDER BY sapellido \";\r\n\r\n//ejecutamos la consulta\r\n\r\n\r\n $this->Consulta_ID = @mysql_query($SQL, $Conexion_ID);\r\n\r\n if (!$this->Consulta_ID) {\r\n\r\n $this->Errno = mysql_errno();\r\n\r\n $this->Error = mysql_error();\r\n\r\n }\r\n\r\n/* Si hemos tenido éxito en la consulta devuelve el identificador de la conexión, sino devuelve 0 */\r\n\r\n return $this->Consulta_ID;\r\n\r\n}", "function consultar()\n{\n global $conexao, $tipoServicos;\n\n $tipoServicos = $conexao->query(\"SELECT * FROM tipoServico\") or die($conexao->error);\n}", "private function consultar_usuario_por_id() {\n\n if (is_numeric($this->referencia_a_buscar)) {\n $id_a_buscar = intval($this->referencia_a_buscar);\n $sentencia = \"select id,nombrecompleto ,correo,token from usuario u where u.id= {$id_a_buscar};\";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n } else {\n $this->respuesta = null;\n }\n }", "function m_consulta($p_query){\n\t\t$this->m_seleBD();\n\t\t//echo \"<br><br>funcion m_consulta: \". $p_query .\"<br><br>\";\n\t\t$this->a_resuConsulta = mysql_query($p_query);\n\t\t//echo \"<br><br>resuConsulta: \". $this->a_resuConsulta .\"<br><br>\";\n\t\t$this->a_mensError=mysql_error();\t// si no hay error, se asigna cadena vacía a a_error\n\t\tif($this->a_mensError > \"\"){\n\t\t\t$this->a_mensError .= \" -> \" .$p_query;\n\t\t\t$this->a_bandError = true;\n\t\t}else{\n\t\t\t$this->a_bandError = false;\n\t\t\t$this->a_numRegistros = mysql_num_rows($this->a_resuConsulta);\n\t\t}\n\t}", "public function BusquedaClientes()\n\t{\nself::SetNames();\n\t\t\n$sql = \" SELECT * from clientes WHERE CONCAT(cedcliente, '',nomcliente) LIKE '%\".$_GET[\"buscacliente\"].\"%' ORDER BY codcliente ASC LIMIT 0,20\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\t if($num==0)\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO SE ENCONTRARON RESULTADOS PARA TU B&Uacute;SQUEDA !</div></center>\";\n\texit;\n\t\t }\n\t\telse\n\t\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function buscarNovasSolicitacoes($solicitacao){\r\n\r\n require 'conexao.php';\r\n\r\n $sql = \"SELECT * FROM tb_solicitacao\r\n INNER JOIN tb_cliente ON solcliid = cliid\r\n INNER JOIN tb_servico ON solserid = serid\r\n INNER JOIN tb_autonomo ON solautid = autid\r\n WHERE solstatus = 'Aguardando autônomo' AND (soldata LIKE '%\".$solicitacao.\"%' OR serdescricao OR '%\".$solicitacao.\"%' OR solstatus LIKE '%\".$solicitacao.\"%' )\";\r\n\r\n $result = mysqli_query($con,$sql) or die(mysqli_error($con));\r\n\r\n $valida = mysqli_num_rows($result);\r\n\r\n //valida busca e retorna o resultado ou falso\r\n if($valida > 0){\r\n return $result;\r\n }else{\r\n return false;\r\n }\r\n}", "public function buscar() \n {\n \n if($buscar = \\Request::get('q')){\n $personas= Persona:: where(function($query) use ($buscar){\n $query->where('nombre','LIKE', \"%$buscar%\")->orWhere('cedula','LIKE',\"%$buscar%\")\n ->orWhere('tipo','LIKE',\"%$buscar%\")->orWhere('apellido','LIKE',\"%$buscar%\");\n\n })->paginate(20);\n }\n\n return $personas; //retorna toda la consulta\n }", "public function buscarEstudiante() {\n\n $sql = \"SELECT D.tipodocumento, D.nombrecortodocumento, E.codigocarrera,\n EG.numerodocumento, EG.idestudiantegeneral, EG.nombresestudiantegeneral, \n EG.apellidosestudiantegeneral, EG.expedidodocumento, EG.codigogenero, \n EG.ciudadresidenciaestudiantegeneral, EG.fechanacimientoestudiantegeneral, EG.direccionresidenciaestudiantegeneral, \n EG.telefonoresidenciaestudiantegeneral, EG.emailestudiantegeneral, D.nombredocumento\n\t\tFROM \n estudiantegeneral EG\n\t\tINNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n\t\tINNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n\t\tWHERE\n E.codigoestudiante = ? \";\n /* FIN MODIFICACION */\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n $this->setFechaNacimiento($this->persistencia->getParametro(\"fechanacimientoestudiantegeneral\"));\n $this->setDireccion($this->persistencia->getParametro(\"direccionresidenciaestudiantegeneral\"));\n $this->setTelefono($this->persistencia->getParametro(\"telefonoresidenciaestudiantegeneral\"));\n $this->setEmail($this->persistencia->getParametro(\"emailestudiantegeneral\"));\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $this->setCarrera($carrera);\n\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n $tipoDocumento->setNombreDocumento($this->persistencia->getParametro(\"nombredocumento\"));\n\n $genero = new Genero(null);\n $genero->setCodigo($this->persistencia->getParametro(\"codigogenero\"));\n\n $ciudad = new Ciudad(null);\n $ciudad->setId($this->persistencia->getParametro(\"ciudadresidenciaestudiantegeneral\"));\n\n $this->setCiudad($ciudad);\n $this->setGenero($genero);\n $this->setTipoDocumento($tipoDocumento);\n }\n\n $this->persistencia->freeResult();\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 }", "public function consultar($valor){\r\n\t\t$oSicasAtendimentoBD = new SicasAtendimentoBD();\t\r\n\t\treturn $oSicasAtendimentoBD->consultar($valor);\r\n\t}", "public function busca() {\r\n $this->SQL = \"SELECT rcja_usuarios.empleado, rcja_usuarios.nif, rcja_usuarios.nombre, \";\r\n $this->SQL .= \"\t\t rcja_usuarios.perfil_Usuario, rcja_usuarios.etiqueta_Emp, rcja_usuarios.observaciones_Emp, rcja_usuarios.centro_Directivo_Depart, \";\r\n $this->SQL .= \"\t\t rcja_usuarios.centro_Trabajo, rcja_usuarios.puesto_Trabajo, rcja_usuarios.servicio, rcja_usuarios.tipo_Usuario, rcja_usuarios.grupo_Nivel \";\r\n $this->SQL .= \" FROM rcja_usuarios\";\r\n //$this->debug($this->SQL);\r\n return $this->SQL;\r\n }", "private function query_consultores(){\n\n \t$respuesta = false;\n\n\t\ttry {\n\n\t\t\t$this->db->select('cao_usuario.co_usuario');\n\t\t\t$this->db->select('cao_usuario.no_usuario');\n\t\t\t$this->db->select('cao_usuario.no_email');\t\n\t\t\t$this->db->from('cao_usuario');\n\t\t\t$this->db->join('permissao_sistema', 'permissao_sistema.co_usuario = cao_usuario.co_usuario');\n\t\t\t$this->db->where('cao_usuario.co_usuario is NOT NULL', NULL, FALSE);\n\t\t\t$this->db->where('permissao_sistema.co_sistema',$this->_co_sistema);\n\t\t\t$this->db->where('permissao_sistema.in_ativo',$this->_in_ativo);\n\t\t\t$this->db->where_in('permissao_sistema.co_tipo_usuario', $this->_co_tipo_usuario);\n\t\t\t$this->db->order_by(\"cao_usuario.co_usuario\", \"asc\");\t\t\t\n\n\t\t\t$query = $this->db->get();\n\n\t\t if ($query && $query->num_rows() > 0)\n\t\t {\n\t\t\t\t$respuesta = $query->result_array();\n\n\t\t }else{\n\n\t\t throw new Exception('Error al intentar listar todos los consultores');\n\t\t\t log_message('error', 'Error al intentar listar todos los consultores');\t\t \n\n\t\t $respuesta = false;\t\t\t\t\n\t\t\t}\n\n\t\t} catch (Exception $e) {\n\n\t\t\t$respuesta = false;\n\t\t}\t\t\t\n\n\t\treturn $respuesta;\n }", "function consultar(){\n global $conexion, $data;\n $eliminado = $data[\"eliminado\"];\n $resultado= mysqli_query($conexion,\"SELECT * FROM usuario, catalogo_tipo_usuario WHERE usu_id_tipo_usuario=cau_id AND usu_eliminado='$eliminado'\");\n echo validarError($conexion, false, $resultado);\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}", "public function buscarEstudianteAcuerdo() {\n\n $sql = \"SELECT \n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n INNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera )\n INNER JOIN AcuerdoActa A ON ( A.FechaGradoId = FG.FechaGradoId )\n INNER JOIN DetalleAcuerdoActa DAC ON ( DAC.AcuerdoActaId = A.AcuerdoActaId AND E.codigoestudiante = DAC.EstudianteId )\n WHERE\n E.codigoestudiante = ?\n AND D.CodigoEstado = 100\n AND DAC.EstadoAcuerdo = 0\n AND DAC.CodigoEstado = 100\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n\n $fechaGrado->setCarrera($carrera);\n\n $this->setTipoDocumento($tipoDocumento);\n\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }", "public function busquedaEstudianteplanificacion() {\n $con = \\Yii::$app->db_academico;\n $estado = 1;\n \n $sql = \"SELECT est.per_id as id, concat(/*est.per_id, ' - ',*/ pers.per_cedula, ' - ', \n ifnull(pers.per_pri_nombre, ' ') ,' ', \n ifnull(pers.per_pri_apellido,' ')) as name\n FROM db_academico.estudiante est\n JOIN db_asgard.persona pers ON pers.per_id = est.per_id\n WHERE pers.per_estado = :estado AND\n pers.per_estado_logico = :estado AND\n est.est_estado = :estado AND\n est.est_estado_logico = :estado;\";\n\n $comando = $con->createCommand($sql);\n $comando->bindParam(\":estado\", $estado, \\PDO::PARAM_STR);\n $resultData = $comando->queryAll();\n return $resultData;\n }", "public function select(){\n\t\t$sql = \"SELECT * FROM cargo\n\t\t\t\twhere car_estado = 1\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function listarc()\n {\n $sql = \"SELECT * FROM miembros \n \";\n\n return ejecutarConsulta($sql);\n }", "function buscar_software($registrado,$texto_buscar,$sql,$idioma) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_visibles=\"AND software_estado=1\";\n\t\t}\n\t\t\n\t\tif ($texto_buscar !='' && $idioma=='es') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (software.software_titulo LIKE '%$texto_buscar%' \n\t\t\tOR software_descripcion.software_descripcion LIKE '%$texto_buscar%' \n\t\t\tOR software_objetivo.software_objetivo LIKE '%$texto_buscar%'\n\t\t\tOR software_informacion_adicional.software_informacion_adicional LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t\n\t\t} elseif ($texto_buscar !='' && $idioma!='es') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (software.software_titulo LIKE '%$texto_buscar%' \n\t\t\tOR software_descripcion.software_descripcion_\".$idioma.\" LIKE '%$texto_buscar%' \n\t\t\tOR software_objetivo.software_objetivo_\".$idioma.\" LIKE '%$texto_buscar%'\n\t\t\tOR software_informacion_adicional.software_informacion_adicional_\".$idioma.\" LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t} else {\n\t\t\t\n\t\t\t$sql_texto=\"AND (software.software_titulo LIKE '%$texto_buscar%' \n\t\t\tOR software_descripcion.software_descripcion LIKE '%$texto_buscar%' \n\t\t\tOR software_objetivo.software_objetivo LIKE '%$texto_buscar%'\n\t\t\tOR software_informacion_adicional.software_informacion_adicional LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t}\n\t\t\n\t\t$query = \"SELECT COUNT(*) \n\t\tFROM software, software_descripcion,software_objetivo,\n\t\tsoftware_informacion_adicional\n\t\tWHERE software.id_software=software_descripcion.id_software\n\t\tAND software.id_software=software_objetivo.id_software\n\t\tAND software.id_software=software_informacion_adicional.id_software\n\t\t$sql\n\t\t$sql_texto\n\t\t$mostrar_visibles\n\t\tORDER BY fecha_alta desc\";\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\n\t\t$numrows = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows[0] == 0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn $numrows[0];\n\t\t}\n\t}", "public function buscar($param) {\r\n $sql = \"SELECT * FROM Fornecedor where email = '\" . $param . \"'\";\r\n try {\r\n $result = $this->db->query($sql);\r\n\r\n $resultO = $this->queryRowsToListOfObjects($result, \"Fornecedor\");\r\n } catch (Exception $exc) {\r\n echo $exc->getMessage();\r\n $resultO = null;\r\n }\r\n return $resultO;\r\n }", "public function buscar() \n {\n \n if($buscar = \\Request::get('q')){\n $lineas= Linea:: where(function($query) use ($buscar){\n $query->where('nombre','LIKE', \"%$buscar%\")->orWhere('rif','LIKE',\"%$buscar%\")\n ->orWhere('estado','LIKE',\"%$buscar%\")->orWhere('municipio','LIKE',\"%$buscar%\")\n ->orWhere('tipo_ruta','LIKE',\"%$buscar%\");\n\n })->paginate(20);\n }\n\n return $lineas; //retorna toda la consulta\n }", "public static function buscar($nombre){\n try{\n $resultado = parent::conectar()->query( //antes decia: $resultado = $this->conectar()->query(\n \"SELECT * FROM \".self::TABLE.\" WHERE nombre LIKE '%$nombre%'\" //antes para acceder a la tabla usabamos esto: $this->table\n );\n $resultado->setfetchMode(\\PDO::FETCH_OBJ);\n if($resultado->rowCount()){\n return $resultado->fetchAll();\n }else{\n return null;\n }\n return $resultado->fetchAll();\n\n }catch (\\PDOException $e) {\n //comentado en clase3\n //echo \"Error: \".$e->getMessage();\n session_start();\n $_SESSION[\"error\"] = $e->getMessage();\n header(\"Location: error1.php\");\n }\n }", "function SEARCH(){\n//Se contruye la sentencia de busqueda usando Like\n $sql= \"SELECT\n IdTrabajo,\n login,\n Alias,\n Horas,\n Ruta\n FROM ENTREGA\n WHERE (\n (IdTrabajo LIKE REPLACE('%$this->idTrabajo%', ' ', '' ))&&\n (login LIKE REPLACE('%$this->login%', ' ', '' ))&&\n (Alias LIKE REPLACE('%$this->alias%', ' ', '' ))&&\n (Horas LIKE REPLACE('%$this->horas%', ' ', '' ))&&\n (Ruta LIKE REPLACE('%$this->ruta%', ' ', '' ))\n )\";\n // si se produce un error en la busqueda mandamos el mensaje de error en la consulta\n if (!($resultado = $this->mysqli->query($sql))){\n return 'Error en la consulta sobre la base de datos';\n }\n else{ // si la busqueda es correcta devolvemos el recordset resultado\n return $resultado;\n }\n}", "public function consultar($valor){\r\n\t\t$oSicasSalarioMinimoBD = new SicasSalarioMinimoBD();\t\r\n\t\treturn $oSicasSalarioMinimoBD->consultar($valor);\r\n\t}", "function contarServiciosNombre($nombre_buscado)\n\t{\n\t\treturn \"select count(*) as number\nfrom trabajadores, servicios,sucursales where servicios.nombre_servicio like '%$nombre_buscado%'\nand servicios.trabajador_id = trabajadores.trabajador_id \nand servicios.estado_servicio = 1 \nand servicios.sucursal_id = sucursales.sucursal_id\";\n\t}", "public function BusquedaVentas()\n\t{\n\n self::SetNames();\n\n if ($_SESSION['acceso'] == \"administrador\") {\n\n\n\tif ($_GET['tipobusqueda'] == \"1\") {\n\n$sql = \" SELECT ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, cajas.nrocaja, SUM(detalleventas.cantventa) AS articulos FROM (ventas LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente) LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN detalleventas ON detalleventas.codventa = ventas.codventa WHERE ventas.codcliente = ? GROUP BY ventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET['codcliente']));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS PARA EL CLIENTE INGRESADO !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusqueda'] == \"2\") {\n\n$sql = \" SELECT ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, cajas.nrocaja, cajas.nombrecaja, SUM(detalleventas.cantventa) AS articulos FROM (ventas LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente) LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN detalleventas ON detalleventas.codventa = ventas.codventa WHERE ventas.codcaja = ? GROUP BY ventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET['codcaja']));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA CAJA SELECCIONADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusqueda'] == \"3\") {\n\n$sql = \" SELECT ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, cajas.nrocaja, SUM(detalleventas.cantventa) AS articulos FROM (ventas LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente) LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN detalleventas ON detalleventas.codventa = ventas.codventa WHERE DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') = ? GROUP BY ventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(date(\"Y-m-d\",strtotime($_GET['fecha']))));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA FECHA INGRESADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\t\t } \n\n ################# AQUI BUSCAMOS POR CAJEROS Y DISTRIBUIDOR ################\n\n\t } else {\n\n\n\t\t \tif ($_GET['tipobusqueda'] == \"1\") {\n\n$sql = \" SELECT ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, cajas.nrocaja, SUM(detalleventas.cantventa) AS articulos FROM (ventas LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente) LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN detalleventas ON detalleventas.codventa = ventas.codventa WHERE ventas.codcliente = ? AND ventas.codigo = '\".$_SESSION[\"codigo\"].\"' GROUP BY ventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET['codcliente']));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS PARA EL CLIENTE INGRESADO !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusqueda'] == \"2\") {\n\n$sql = \" SELECT ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, cajas.nrocaja, cajas.nombrecaja, SUM(detalleventas.cantventa) AS articulos FROM (ventas LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente) LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN detalleventas ON detalleventas.codventa = ventas.codventa WHERE ventas.codcaja = ? AND ventas.codigo = '\".$_SESSION[\"codigo\"].\"' GROUP BY ventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET['codcaja']));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA CAJA SELECCIONADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusqueda'] == \"3\") {\n\n$sql = \" SELECT ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, cajas.nrocaja, SUM(detalleventas.cantventa) AS articulos FROM (ventas LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente) LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN detalleventas ON detalleventas.codventa = ventas.codventa WHERE DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') = ? AND ventas.codigo = '\".$_SESSION[\"codigo\"].\"' GROUP BY ventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(date(\"Y-m-d\",strtotime($_GET['fecha']))));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA FECHA INGRESADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\t\t }\n\t }\n}", "public function consultar ($conexion){\r\n // PROCEDIMIENTO ALMACENADO \r\n $query=\"call consulta_acudiente()\";\r\n $consulta=mysqli_query($conexion, $query);\r\n return $consulta;\r\n }", "function buscar_eu_limit($registrado,$texto_buscar,$sql,$inicial,$cantidad,$idioma) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_visibles=\"AND eu_estado=1\n\t\t\t\";\n\t\t}\n\t\t\n\t\tif ($texto_buscar !='' && $idioma=='es') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (eu.eu_titulo LIKE '%$texto_buscar%' \n\t\t\tOR eu_descripcion.eu_descripcion LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t\n\t\t} elseif ($texto_buscar !='' && $idioma!='es') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (eu.eu_titulo LIKE '%$texto_buscar%' \n\t\t\tOR eu_descripcion.eu_descripcion_\".$idioma.\" LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t} else {\n\t\t\t\n\t\t\t$sql_texto=\"AND (eu.eu_titulo LIKE '%$texto_buscar%' \n\t\t\tOR eu_descripcion.eu_descripcion LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t}\n\t\t\n\t\t$query = \"SELECT eu.*, eu_descripcion.*\n\t\tFROM eu, eu_descripcion\n\t\tWHERE eu.id_eu=eu_descripcion.id_eu\n\t\t$sql\n\t\t$sql_texto\n\t\t$mostrar_visibles\n\t\tORDER BY eu.eu_destacado desc\n\t\tLIMIT $inicial,$cantidad\";\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\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 false;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function cargar_cuenta_de_ingreso() {\n $sql = \"SELECT id_plan_contable,cuenta_plan_contable,descripcion_plan_contable,cargar_plan_contable,abonar_plan_contable,transferencia_plan_contable FROM prosic_plan_contable WHERE cuenta_plan_contable LIKE '7%' ORDER BY cuenta_plan_contable\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function _ConsultarResultadosPruebasIMM1($tipo_prueba, $id_cliente) //consulta el último biotest para imm se necesitan 16 campos.\n\t{\n\t\t$query='\n\t\t\tselect * from sg_pruebas \n\t\t\twhere Tipo_Prueba=\"'.$tipo_prueba.'\" \n\t\t\tand id_cliente=\"'.$id_cliente.'\" order by fecha and id asc limit 16\n\n\t\t';\n\t\t$con=Conectar::_con();\n\t\t$result=$con->query($query) or die(\"Error en: $query \".mysqli_error($query));\n\t\treturn $result;\n\t}", "function consultarEstadoNomina(){\n \n $conexion = new conexion();\n $sql = \"select * from mod_nomina_estado\";\n $resulConsulta = $conexion->consultar($sql);\n return $resulConsulta; \n \n }", "function realizarBusquedaNombre(){\n\n $string = $_GET['nombre'];\n $nombres = preg_split(\"/[\\s]+/\", $string);\n\n\n if (count($nombres) >= 2){\n $nombre = $nombres[0];\n $apellido = $nombres[1];\n } else if ( count($nombres) == 1){\n $nombre = $nombres[0];\n $apellido = NULL;\n } else {\n $nombre = \"\";\n $apellido = NULL;\n }\n\n $fbd = FachadaBD::getInstance();\n $results = $fbd->consultarPacienteNombre($nombre,$apellido);\n\n echo '<div class=\"table-responsive\">';\n echo '<table class=\"table\">';\n echo '<tr class=\"tablita\">';\n echo \"<th>Nombres</th>\";\n echo \"<th>Apellidos</th>\";\n echo \"<th>Cedula</th>\";\n echo \"</tr>\";\n\t\n while (($row = oci_fetch_array($results, OCI_BOTH))) {\n echo '<tr class=\"tablita\">';\n $link = '\"resultadoConsultaCedula.php?cedula='.$row[2].'\"';\n for ($i=0; $i <= 2; $i++) {\n echo \"<td><a href=$link>\".$row[$i].\"</a></td>\";\n\t}\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "public function consultar($valor){\r\n\t\t$oSicasConsultaMedicaBD = new SicasConsultaMedicaBD();\t\r\n\t\treturn $oSicasConsultaMedicaBD->consultar($valor);\r\n\t}", "public function consult(){\n\t\t\t$para = array(\"1\"=>1);\n\t\t\tif($this->tipodocum_id_tipodocum != null){\n\t\t\t\t$para[\"tipodocum_id_tipodocum\"] = $this->tipodocum_id_tipodocum;\n\t\t\t}\n\t\t\tif($this->documento != null){\n\t\t\t\t$para[\"documento\"] = $this->documento;\n\t\t\t}\n\t\t\t\n\t\t\t$query = $this->db->get_where(\"paciente\",$para);\n\t\t\treturn $query->result();\n\t\t}", "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 consulta($Consulta) {\n\t\t$Resultado = pg_query($this->url, $Consulta);\n\t\treturn $Resultado; // retorna si fue afectada una fila\n\t}", "public function select(){\n\t$sql=\"SELECT * FROM tipousuario\";\n\treturn ejecutarConsulta($sql);\n}", "public function listar(){\n\t\t$sql = \"SELECT * FROM cargo\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function buscar_rango($sender, $param)\n {\n $cadena=$this->drop_rango->text; \n $desde=substr($cadena, 0, 10); \n $hasta=substr($cadena, 13); \n //obtengo la cuenta del total de registros que esten entre las fechas desde/hasta\n $sql=\"select count(*) from evaluaciones.datos_evaluados join evaluaciones.calificaciones on evaluaciones.datos_evaluados.codigo=evaluaciones.calificaciones.evaluacion_asociada where(desde='$desde' and hasta='$hasta')\";\n $resultado=cargar_data($sql, $sender); \n //obtengo la cuenta del total de registros que esten entre las fechas desde/hasta yque ademas tenga actuacion muy por debajo de lo esperado\n $sql=\"select count(*) from evaluaciones.datos_evaluados join evaluaciones.calificaciones on evaluaciones.datos_evaluados.codigo=evaluaciones.calificaciones.evaluacion_asociada where(actuacion='Muy por debajo de lo esperado' and desde='$desde' and hasta='$hasta')\";\n $resultado=cargar_data($sql, $sender);\n $muy_por_debajo=$resultado[0]['count(*)']; \n //obtengo la cuenta del total de registros que esten entre las fechas desde/hasta yque ademas tenga actuacion por debajo de lo esperado\n $sql=\"select count(*) from evaluaciones.datos_evaluados join evaluaciones.calificaciones on evaluaciones.datos_evaluados.codigo=evaluaciones.calificaciones.evaluacion_asociada where(actuacion='Por debajo de lo esperado' and desde='$desde' and hasta='$hasta')\";\n $resultado=cargar_data($sql, $sender);\n $por_debajo=$resultado[0]['count(*)']; \n //obtengo la cuenta del total de registros que esten entre las fechas desde/hasta yque ademas tenga actuacion dentro de lo esperado\n $sql=\"select count(*) from evaluaciones.datos_evaluados join evaluaciones.calificaciones on evaluaciones.datos_evaluados.codigo=evaluaciones.calificaciones.evaluacion_asociada where(actuacion='Dentro de lo esperado' and desde='$desde' and hasta='$hasta')\";\n $resultado=cargar_data($sql, $sender);\n $dentro_lo_esperado=$resultado[0]['count(*)']; \n //obtengo la cuenta del total de registros que esten entre las fechas desde/hasta yque ademas tenga actuacion sobre lo esperado\n $sql=\"select count(*) from evaluaciones.datos_evaluados join evaluaciones.calificaciones on evaluaciones.datos_evaluados.codigo=evaluaciones.calificaciones.evaluacion_asociada where(actuacion='Sobre lo esperado' and desde='$desde' and hasta='$hasta')\";\n $resultado=cargar_data($sql, $sender);\n $sobre_lo_esperado=$resultado[0]['count(*)']; \n //obtengo la cuenta del total de registros que esten entre las fechas desde/hasta yque ademas tenga actuacion excepcional\n $sql=\"select count(*) from evaluaciones.datos_evaluados join evaluaciones.calificaciones on evaluaciones.datos_evaluados.codigo=evaluaciones.calificaciones.evaluacion_asociada where(actuacion='Excepcional' and desde='$desde' and hasta='$hasta')\";\n $resultado=cargar_data($sql, $sender);\n $excepcional=$resultado[0]['count(*)']; \n //genera un aleatorio para asignarselo al nombre del .png del grafico\n $demo=rand(100,99999);\n //crea el grafico\n $grafico=new verticalbarchart();\n //crea un arreglo con los valores del grafico\n $datos = new XYDataSet();\n //añade elementos al arreglo que contiene los valores del grafico\n $datos->addPoint(new Point(\"Muy por debajo de lo esperado\", $muy_por_debajo));\n $datos->addPoint(new Point(\"Por debajo\", $por_debajo));\n $datos->addPoint(new Point(\"Dentro lo esperado\", $dentro_lo_esperado));\n $datos->addPoint(new Point(\"sobre lo esperado\", $sobre_lo_esperado));\n $datos->addPoint(new Point(\"Excepcional\", $excepcional));\n $grafico->setDataSet($datos);\n //pone el titulo del grafico\n $grafico->setTitle(\"Grafica de las categorías de actuación\");\n //genera el grafico\n $grafico->render(\"imagenes/temporales/\".$demo.\"_E1.png\");\n $this->grafico->ImageUrl = \"imagenes/temporales/\".$demo.\"_E1.png\";\n }", "public function BusquedaDetallesVentas()\n\t{\n self::SetNames();\n\n if ($_SESSION['acceso'] == \"administrador\") {\n\n\tif ($_GET['tipobusquedad'] == \"1\") {\n\n$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente, ventas.codmesa, ventas.codcaja, ventas.tipopagove, detalleventas.coddetalleventa, detalleventas.codventa, detalleventas.codproducto, detalleventas.producto, detalleventas.cantventa, detalleventas.preciocompra, detalleventas.precioventa, detalleventas.ivaproducto, detalleventas.importe, detalleventas.importe2, detalleventas.fechadetalleventa, categorias.nomcategoria FROM detalleventas LEFT JOIN ventas ON ventas.codventa = detalleventas.codventa LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria WHERE ventas.codventa = ? ORDER BY detalleventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET[\"codventa\"]));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS CON ESTE N&deg; DE FACTURA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusquedad'] == \"2\") {\n\n$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente, ventas.codmesa, ventas.codcaja, ventas.tipopagove, detalleventas.coddetalleventa, detalleventas.codventa, detalleventas.codproducto, detalleventas.producto, detalleventas.cantventa, detalleventas.preciocompra, detalleventas.precioventa, detalleventas.ivaproducto, detalleventas.importe, detalleventas.importe2, detalleventas.fechadetalleventa, categorias.nomcategoria, cajas.nrocaja, cajas.nombrecaja FROM detalleventas LEFT JOIN ventas ON ventas.codventa = detalleventas.codventa LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja WHERE ventas.codcaja = ? ORDER BY detalleventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET['codcaja']));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA CAJA SELECCIONADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusquedad'] == \"3\") {\n\n$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente, ventas.codmesa, ventas.codcaja, ventas.tipopagove, detalleventas.coddetalleventa, detalleventas.codventa, detalleventas.codproducto, detalleventas.producto, detalleventas.cantventa, detalleventas.preciocompra, detalleventas.precioventa, detalleventas.ivaproducto, detalleventas.importe, detalleventas.importe2, detalleventas.fechadetalleventa, categorias.nomcategoria, cajas.nrocaja, cajas.nombrecaja FROM detalleventas LEFT JOIN ventas ON ventas.codventa = detalleventas.codventa LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja WHERE DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') = ? ORDER BY detalleventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(date(\"Y-m-d\",strtotime($_GET['fecha']))));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA FECHA INGRESADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\t\t } \n\n ################# AQUI BUSCAMOS POR CAJEROS Y DISTRIBUIDOR ################\n\n\t } else {\n\n\n\t\t \tif ($_GET['tipobusquedad'] == \"1\") {\n\n$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente, ventas.codmesa, ventas.codcaja, ventas.tipopagove, detalleventas.coddetalleventa, detalleventas.codventa, detalleventas.codproducto, detalleventas.producto, detalleventas.cantventa, detalleventas.preciocompra, detalleventas.precioventa, detalleventas.ivaproducto, detalleventas.importe, detalleventas.importe2, detalleventas.fechadetalleventa, categorias.nomcategoria FROM detalleventas LEFT JOIN ventas ON ventas.codventa = detalleventas.codventa LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria WHERE ventas.idventa = ? AND ventas.codigo = '\".$_SESSION[\"codigo\"].\"' ORDER BY detalleventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET[\"codventa\"]));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS CON ESTE N&deg; DE FACTURA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusquedad'] == \"2\") {\n\n$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente, ventas.codmesa, ventas.codcaja, ventas.tipopagove, detalleventas.coddetalleventa, detalleventas.codventa, detalleventas.codproducto, detalleventas.producto, detalleventas.cantventa, detalleventas.preciocompra, detalleventas.precioventa, detalleventas.ivaproducto, detalleventas.importe, detalleventas.importe2, detalleventas.fechadetalleventa, categorias.nomcategoria, cajas.nrocaja, cajas.nombrecaja FROM detalleventas LEFT JOIN ventas ON ventas.codventa = detalleventas.codventa LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja WHERE ventas.codcaja = ? AND ventas.codigo = '\".$_SESSION[\"codigo\"].\"' ORDER BY detalleventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array($_GET['codcaja']));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA CAJA SELECCIONADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\n\t\t} else if ($_GET['tipobusquedad'] == \"3\") {\n\n$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente, ventas.codmesa, ventas.codcaja, ventas.tipopagove, detalleventas.coddetalleventa, detalleventas.codventa, detalleventas.codproducto, detalleventas.producto, detalleventas.cantventa, detalleventas.preciocompra, detalleventas.precioventa, detalleventas.ivaproducto, detalleventas.importe, detalleventas.importe2, detalleventas.fechadetalleventa, categorias.nomcategoria, cajas.nrocaja, cajas.nombrecaja FROM detalleventas LEFT JOIN ventas ON ventas.codventa = detalleventas.codventa LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja WHERE DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') = ? AND ventas.codigo = '\".$_SESSION[\"codigo\"].\"' ORDER BY detalleventas.codventa\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(date(\"Y-m-d\",strtotime($_GET['fecha']))));\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\t\n\t\t{\n\t\t\n\techo \"<center><div class='alert alert-danger'>\";\n\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\techo \"<span class='fa fa-info-circle'></span> NO EXISTEN VENTAS EN LA FECHA INGRESADA !</div></center>\";\n\texit;\n\t\t } else {\n\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\n\t\t }\n\t\t }\n\t }\n}", "public function consultar($valor){\r\n $oSicasEspecialidadeMedicaBD = new SicasEspecialidadeMedicaBD();\r\n return $oSicasEspecialidadeMedicaBD->consultar($valor);\r\n }", "function listarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_sel';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_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('id_cuenta_bancaria_boa','int4');\n\t\t$this->captura('banco','int4');\n\t\t$this->captura('cuenta','varchar');\n\t\t$this->captura('desc_cuenta','varchar');\n\t\t$this->captura('moneda','int4');\n\t\t$this->captura('tipo_cuenta','bpchar');\n\t\t$this->captura('estado_cuenta','bpchar');\n\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\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('desc_cuenta_banco','varchar');\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}", "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}", "function cogerDatos($trabajo){\n //Variable que almacena la sentencia sql\n $sql = \"SELECT IdTrabajo,login FROM ENTREGA WHERE IdTrabajo LIKE '%et%' AND IdTrabajo='$trabajo'\";//Se construye la sentencia sql\n //Si la consulta falla devuelve mensaje de error \n if ( !( $resultado = $this->mysqli->query( $sql ) ) ) {//ejecutamos la query\n\t\t\t return 'Error en la consulta sobre la base de datos';\n // si existe se devuelve la tupla resultado\n\t\t } else { \n \n return $resultado;\n\t\t}\n }", "protected function construirConsulta($operacion='seleccionar') {\n //Cerrar grupos abiertos\n while($this->gruposAbiertos) $this->cerrarGrupo();\n\n if($operacion=='insertar') {\n return $this->construirConsultaInsercion();\n } elseif($operacion!='actualizar') {\n $operacion='seleccionar';\n }\n\n $alias=1;\n \n $sql='';\n $parametros=[];\n $tipos=[];\n\n $campos=[];\n $relaciones=[];\n\n if($operacion=='actualizar') {\n $sql='UPDATE ';\n } else {\n $sql='SELECT ';\n\n $array=[];\n $this->prepararRelaciones($alias,true,$array)\n ->construirCamposYRelaciones($campos,$relaciones);\n \n $sql.=implode(',',$this->consultaColumnas?$this->consultaColumnas:$campos);\n\n $sql.=' FROM ';\n }\n\n $sql.='#__'.$this->nombre.' '.$this->alias.' ';\n\n $sql.=implode(' ',$relaciones);\n\n if($operacion=='actualizar') {\n $sql.=' SET ';\n $sql.=$this->construirCamposInsercionActualizacion($operacion,$parametros,$tipos);\n }\n\n if(count($this->consultaCondiciones)) {\n $sql.=' WHERE ';\n\n if(!$this->consultaSeleccionarEliminados) {\n $sql.=$this->alias.'.`e`=0 AND ';\n }\n\n $condiciones='';\n $parentesis=null;\n \n foreach($this->consultaCondiciones as $i=>$condicion) {\n if(!$condicion||!$condicion->condicion) continue;\n\n if(is_string($condicion)&&($condicion==')'||$condicion=='(')) {\n if($i==count($this->consultaCondiciones)-1) {\n //La última condición es )\n $condiciones.=' )';\n } else {\n //Establecer para la próxima condición\n $parentesis=$condicion;\n }\n continue;\n }\n \n if($parentesis==')') $condiciones.=' ) ';\n if($condiciones!='') $condiciones.=' '.$condicion->union.' ';\n if($parentesis=='(') $condiciones.=' ( ';\n $condiciones.='( '.$condicion->condicion.' )';\n foreach($condicion->parametros as $parametro) {\n $parametros[]=$parametro;\n $tipos[]=$this->determinarTipo($parametro);\n }\n\n $parentesis=null;\n }\n\n if(!$condiciones) $condiciones='1';\n $sql.=' ( '.$condiciones.' ) ';\n } elseif($operacion=='actualizar'&&$this->consultaValores->id) {\n $sql.=' WHERE '.$this->alias.'.`id`=? ';\n $parametros[]=$this->consultaValores->id;\n $tipos[]='d';\n } elseif(!$this->consultaSeleccionarEliminados) {\n $sql.=' WHERE '.$this->alias.'.`e`=0 ';\n }\n\n if($operacion=='seleccionar') {\n if($this->consultaAgrupar) {\n $sql.=' GROUP BY ';\n\n $campos=[];\n foreach($this->consultaAgrupar as $campo) {\n if(preg_match('/^[a-z0-9A-Z_]$/',$campo)) {\n $campos[]=$this->alias.'.`'.$campo.'`';\n } else {\n $campos[]=$campo;\n }\n }\n $sql.=implode(',',$campos);\n }\n\n if(count($this->consultaTeniendo)) {\n $sql.=' HAVING ';\n\n $condiciones=[];\n \n foreach($this->consultaTeniendo as $condicion) {\n $condiciones[]=$condicion->condicion;\n foreach($condicion->parametros as $parametro) {\n $parametros[]=$parametro;\n $tipos[]=$this->determinarTipo($parametro);\n }\n }\n\n $sql.=' ( '.implode(' ) AND ( ',$condiciones).' ) ';\n }\n\n if($this->consultaOrden) {\n $sql.=' ORDER BY ';\n\n $campos=[];\n foreach($this->consultaOrden as $orden) {\n if($orden->orden) {\n $campo=trim($orden->campo,'\\'` ');\n if(strpos($campo,'.')===false) $campo=$this->alias.'.`'.$campo.'`';\n $campos[]=$campo.' '.$orden->orden;\n } else {\n $campos[]=$orden->campo;\n }\n }\n $sql.=implode(',',$campos);\n }\n }\n\n if($this->consultaLimite||$this->consultaCantidad) {\n $sql.=' LIMIT ';\n\n $sql.=$this->consultaLimite?$this->consultaLimite:'0';\n\n if($this->consultaCantidad) $sql.=','.$this->consultaCantidad;\n }\n \n $this->sql=$sql;\n $this->parametros=$parametros;\n $this->tipos=$tipos;\n return $this;\n }", "function consultarEmpleado(){\n\t$ced=$this->objEmpleado->getCedula();\n\t$objConexion = new ControlConexion();\n\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n\t//$comandoSql=\"SELECT cedula, nombre_tmp, tipoCliente, fechaRegistro, imagen_tmp, email_tmp, telefono_tmp, cupoCredito, contrasena FROM CLIENTE WHERE USUARIO='\".$usu.\"' \";\n\t$comandoSql=\"SELECT * FROM EMPLEADO WHERE CEDULA='\".$ced.\"' \";\n\n\t$recordSet=$objConexion->ejecutarSelect($comandoSql);\n\n\t\t \n\t\n\twhile($registro = $recordSet->fetch_array(MYSQLI_ASSOC)){\n\t\n\t\t$this->objEmpleado->setNombre($registro[\"nombre\"]);\n\t\t$this->objEmpleado->setFechaIngreso($registro[\"fechaIngreso\"]);\n\t\t$this->objEmpleado->setFechaRetiro($registro[\"fechaRetiro\"]);\n\t\t$this->objEmpleado->setSalarioBasico($registro[\"salarioBasico\"]);\n\t\t$this->objEmpleado->setDeducciones($registro[\"deducciones\"]);\n\t\t$this->objEmpleado->setFoto($registro[\"foto\"]);\n\t\t$this->objEmpleado->setHojaVida($registro[\"hojaVida\"]);\n\t\t$this->objEmpleado->setEmail($registro[\"email\"]);\n\t\t$this->objEmpleado->setTelefono($registro[\"telefono\"]);\n\t\t$this->objEmpleado->setCelular($registro[\"celular\"]);\n\t\t$this->objEmpleado->setEstado($registro[\"estado\"]);\n\t\t$this->objEmpleado->setContrasena($registro[\"contrasena\"]);\n\t\t$this->objEmpleado->setNombreTmp($registro[\"nombre_tmp\"]);\n\t\t$this->objEmpleado->setFotoTmp($registro[\"foto_tmp\"]);\n\t\t$this->objEmpleado->setHojaVidaTmp($registro[\"hojaVida_tmp\"]);\n\t\t$this->objEmpleado->setEmailTmp($registro[\"email_tmp\"]);\n\t\t$this->objEmpleado->setTelefonoTmp($registro[\"telefono_tmp\"]);\n\t\t$this->objEmpleado->setCelularTmp($registro[\"celular_tmp\"]);\n\t\t}\t\n\t\t$objConexion->cerrarBd(); \n\t\treturn $this->objEmpleado; \t\t\n}", "public function buscar_comprobante_venta_3($anio ,$mes ,$fech1 ,$fech2 ,$tipodocumento) {\n //CPC_TipoDocumento => F factura, B boleta\n //CPC_total => total de la FACTURA o BOLETA CPC_FechaRegistro BETWEEN '20121201' AND '20121202'\n\n $where=\"\";\n //----------\n if($anio!=\"--\" && $mes ==\"--\"){// SOLO AÑO\n $where=\"AND YEAR(CPC_FechaRegistro)='\" . $anio . \"'\";\n }\n if($anio!=\"--\" && $mes !=\"--\" ){// MES Y AÑO\n $where=\"AND YEAR(CPC_FechaRegistro)='\" . $anio . \"' AND MONTH(CPC_FechaRegistro)='\" . $mes .\"'\";\n }\n if($anio==\"--\" && $mes !=\"--\"){//MES CON AÑO ACTUAL\n $where=\"AND YEAR(CPC_FechaRegistro)=' \".date(\"Y\").\"' AND MONTH(CPC_FechaRegistro)='\" . $mes .\"'\";\n }\n\n //-----------------\n \n if($anio==\"--\" && $mes ==\"--\" && $fech1!=\"--\" && $fech2==\"--\"){//FECHA INICIAL\n $where=\"AND CPC_FechaRegistro > '\" . $fech1 . \"'\";\n }\n if($anio==\"--\" && $mes ==\"--\" && $fech1!=\"--\" && $fech2!=\"--\" ){//FECHA INICIAL Y FECHA FINAL\n $where=\"AND CPC_FechaRegistro >= '\" . $fech1 . \"' AND CPC_FechaRegistro <= '\" . $fech2 . \"'\";\n }\n \n \n //------------\n\n \n $wheretdoc= \"\";\n if($tipodocumento !=\"--\")\n $wheretdoc= \" AND CPC_TipoDocumento='\".$tipodocumento.\"' \";\n\n \n\n $sql = \" SELECT com.*,CONCAT(pe.PERSC_Nombre , ' ', pe.PERSC_ApellidoPaterno, ' ', pe.PERSC_ApellidoMaterno) as nombre , MONED_Simbolo from cji_comprobante com\n inner join cji_cliente cl on cl.CLIP_Codigo = com.CLIP_Codigo\n inner join cji_persona pe on pe.PERSP_Codigo = cl.PERSP_Codigo\n inner JOIN cji_moneda m ON m.MONED_Codigo=com.MONED_Codigo \n WHERE CPC_TipoOperacion='V' \".$wheretdoc.$where.\"\n \n UNION \n SELECT com.* ,EMPRC_RazonSocial as nombre ,MONED_Simbolo from cji_comprobante com\n inner join cji_cliente cl on cl.CLIP_Codigo = com.CLIP_Codigo\n inner join cji_empresa es on es.EMPRP_Codigo = cl.EMPRP_Codigo\n inner JOIN cji_moneda m ON m.MONED_Codigo = com.MONED_Codigo \n WHERE CPC_TipoOperacion='V' \".$wheretdoc.$where.\"\";\n\n //echo $sql;\n $query = $this->db->query($sql);\n if ($query->num_rows > 0) {\n foreach ($query->result() as $fila) {\n $data[] = $fila;\n }\n return $data;\n }\n return array();\n }", "public function get_ventas_consulta($id_paciente){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n \n\t$sql=\"select*from ventas where id_paciente=?;\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$id_paciente);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "private function consultar_usuario_todos() {\n $sentencia = \"select id,nombrecompleto ,correo,token from usuario u;\";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n }", "function buscarCondominio($cond){\r\n\r\n require 'conexao.php';\r\n\r\n $sql = \"SELECT con.*,sin1.sinnome as sindico, sin2.sinnome as subsindico FROM tb_condominio con\r\n INNER JOIN tb_sindico sin1 ON con.consinid = sin1.sinid\r\n INNER JOIN tb_sindico sin2 ON con.consubsindico = sin2.sinid\r\n WHERE connome LIKE '%\".$cond.\"%' OR concep LIKE '%\".$cond.\"%' OR conrua LIKE '%\".$cond.\"%' OR sin1.sinnome LIKE '%\".$cond.\"%' \";\r\n\r\n $result = mysqli_query($con,$sql) or die(mysqli_error($con));\r\n\r\n $valida = mysqli_num_rows($result);\r\n\r\n //valida busca e retorna o resultado ou falso\r\n if($valida > 0){\r\n return $result;\r\n }else{\r\n return false;\r\n }\r\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 }", "public function buscar() {\n $buscarUsuario = new SqlQuery(); //instancio la clase\n (string) $tabla = get_class($this); //uso el nombre de la clase que debe coincidir con la BD \n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción\n $statement = $this->refControladorPersistencia->ejecutarSentencia(\n $buscarUsuario->buscar($tabla)); //senencia armada desde la clase SqlQuery sirve para comenzar la busqueda\n $arrayUsuario = $statement->fetchAll(PDO::FETCH_ASSOC); //retorna un array asociativo para no duplicar datos\n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit\n return $arrayUsuario; //regreso el array para poder mostrar los datos en la vista... con Ajax... y dataTable de JavaScript\n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n }\n }", "function consultarProyectos() {\n $cadena_sql = $this->sql->cadena_sql(\"consultaProyectos\",\"\");\n return $resultadoProyectos = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "public function ConsultarEmpleado(){\n\t\t$sql = \"CALL HAR_ConsultarEmpleado(?)\";\n\t\t$stm = $this->db->prepare($sql);\n\t\t$stm ->bindParam(1, $this->CedulaEmpleado);\n\t\t$stm->execute();\n\t\t//Fetch retorna solo un valor, el fetchall varios\n\t\treturn $stm->fetch();\n\n\t\t}", "function BusquedaServicios($params){\n $servicios = null;\n if(!empty($_POST['buscar'])){\n $id = $_POST['buscar'];\n $servicios = $this->Smodel->BuscarServicio($id);\n\n if($servicios){\n $this->view->ShowBusquedas($servicios);\n }\n else{\n $msg= \"NO SE ENCONTRARON RESULTADOS\";\n $this->view->ShowBusquedas($servicios, $msg);\n }\n }\n\n else{\n $msg= \"POR FAVOR INGRESE UN PARAMETRO PARA BUSCAR\";\n $this->view->ShowBusquedas($servicios, $msg);\n }\n }", "public function pesquisarMembroDao($obj){\r\n \r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetoMembro.php\");\r\n \r\n $objConexao = Connection::getInstance();\r\n $objMembro = new objetoMembro();\r\n \r\n $busca = mysql_query(\"Select * from membros where Nome like '%$obj%'\") or die (\"Nao foi possivel realizar a busca\".mysql_error());\r\n $reg = mysql_fetch_assoc($busca);\r\n \r\n\tif($reg != \"\"){\r\n\r\n $objMembro->setMatricula($reg['Matricula']); $objMembro->setNome($reg['Nome']);\r\n $objMembro->setSexo($reg['Sexo']); $objMembro->setData($reg['DataNascimento1']); $objMembro->setRg($reg['Rg']);\r\n $objMembro->setCpf($reg['Cpf']); $objMembro->setEstadocivil($reg['EstadoCivil']);\r\n $objMembro->setNatural($reg['Naturalidade']); $objMembro->setProfissao($reg['Profissao']); $objMembro->setEscola($reg['Escolaridade']); \r\n $objMembro->setPai($reg['Pai']); $objMembro->setMae($reg['Mae']); $objMembro->setNecessidade($reg['NecessidadeEspeciais']);\r\n\t $objMembro->setFone($reg['Fone']); $objMembro->setFilho($reg['Filho']); $objMembro->setFormacao($reg['FormacaoEclesiatica']);\r\n $objMembro->setMembrasia($reg['IntegracaoMembrasia']); $objMembro->setFuncao($reg['Funcao']); $objMembro->setParticipou($reg['JaParticipou']);\r\n\t $objMembro->setTrabalhando($reg['Trabalhando']); $objMembro->setViajando($reg['EstadoAtual']); $objMembro->setCongrega($reg['Congrega']); \r\n $objMembro->setRua($reg['Rua']); $objMembro->setBairro($reg['Bairro']); $objMembro->setCasa($reg['Casa']); $objMembro->setStatus($reg['Status']);\r\n $objMembro->setEmail($reg['tx_email']);\r\n $objMembro->setLider($reg['LiderCelula']);\r\n\r\n return $objMembro;\r\n }\r\n else{\r\n \r\n }\r\n \r\n mysql_free_result($busca); //limpa o resultado da pesquisa libera a memoria ocupado\r\n $objConexao->freebanco(); // fecha a conec��o com o banco\r\n\r\n }", "function consultarEstudiantes($codProyecto) {\r\n $variables=array('codProyecto'=>$codProyecto,\r\n 'ano'=> $this->ano,\r\n 'periodo'=> $this->periodo);\r\n $cadena_sql=$this->sql->cadena_sql(\"consultarEstudiantes\",$variables);\r\n $resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\");\r\n return $resultado;\r\n }", "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 buscar_cuenta_por_codigo($cuenta) {\n $sql = \"SELECT id_plan_contable,descripcion_plan_contable FROM prosic_plan_contable WHERE cuenta_plan_contable = '\" . $cuenta . \"'\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "public function consultarCatalogTut() {\n \t\t$existen = false;\n \t\t$this->conn = new Conexion('../../php/datosServer.php');\n\t\t\t$this->conn = $this->conn->conectar();\n\t\t\t\n\t\t\t\t $sql = \"CALL consultarCatalog('tutores');\"; \n\t\t\t\t\t$info = '<div class=\"animated fadeInDown BtnShadow\" id=\"resultados\">\n\t\t\t\t\t<span class=\"label warning\" style=\"margin: 8px;\"><i class=\"fa fa-list-alt fa-lg\"></i> Catálogo de Tutores</span><br>\n\t\t\t\t\t\t <div class=\"form-item\">\n\t\t\t\t\t <input data-tipso=\"Escribe una palabra clave.\" type=\"text\" id=\"resultados\" placeholder=\"Filtrar Resultados\" class=\"filterBoxy\">\n\t\t\t\t\t </div>\t\t\t\t\n\t\t\t\t\t<table class=\"flat tableLines\">\n \t \t\t\t\t<tr class=\"titleTable\"><th>RFC</th>\n\t\t\t \t\t<th>Nombre</th>\n\t\t\t \t\t<th>Activo</th>\n\t\t\t\t\t\t<th>Correo</th>\n\t\t\t\t\t\t<th>Carrera</th></tr><tbody id=\"resultadoBus\">';\n\t\n\t\t\t\n\t\t\t$result = $this->conn->query($sql);\n if ($result->num_rows > 0) {\n while($row = $result->fetch_array(MYSQLI_NUM)) {\n \t$info .= '<tr><td style=\"color: #400101;\">'.$row[0].'</td>'.\n \t\t'<td><b>'.$row[1].' '.$row[2].' '.$row[3].'</b></td>';\n \t$info .= ($row[4] == 1 ? '<td><span class=\"label success\">SI</span></td>' : '<td><span class=\"label error\">NO</span></td>');\n \t$info .= '<td>'.$row[5].'</td>'.'<td>'.$row[6].'</td></tr>';\n \t}\n \t$info .= '</tbody></table></div>';\n \t\n \t$info .= '\n\t\t\t\t\t\t\t<script type=\"text/javascript\" src=\"../js/table-filter.js\"></script> \t\n \t';\n $existen = true;\n }\n \n if($existen == true) {\n \t\techo $info;\n \t}else echo -1;\n $this->conn->close();\n \t\t}", "function query_sugerencia($nameColum,$nameSearch,$conexion) {\n\t\t$consulta_Sugerencia = \"SELECT * FROM sugerencia WHERE $nameColum = '$nameSearch'\";\n\t\t$resultado = $conexion -> query($consulta_Sugerencia);\n\t\t$count_Sugerencia = $resultado ->num_rows;\n\n\t\tif($count_Sugerencia >= 1) {\n\t\t\t$row = mysqli_fetch_array($resultado);\n\t\t\t$id_sugerencia = $row['id_sugerencia'];\n\t\t\t$id_orden = $row['id_orden'];\n\t\t\t$sugerencia = $row['descripcion_sugerencia'];\n\t\t\t$info_sugerencia = [\"id_sugerencia\" => $id_sugerencia, \"id_orden\" => $id_orden, \"descripcion_sugerencia\" => $sugerencia];\n\t\t\treturn $info_sugerencia;\n\t\t}\n\t}", "function listado() {\r\n return self::consulta('SELECT * FROM \".self::$nTabla.\"');\r\n }", "public function busquda_Filtro($_Palabra,$_Orden,$_Estado,$_Calificaciones,$_Certificaciones,$_Asociaciones,$IDEMpresa){\n\t\t//primero verifico en que ordern las voy a solicitar\n\t\tif($_Orden===''){\n\t\t\t$_Orden=\"\";\n\t\t}else if($_Orden==='az'){\n\t\t\t$_Orden=\" order by Razon_Social asc\";\n\t\t}else if($_Orden==='za'){\n\t\t\t$_Orden=\" order by Razon_Social desc\";\n\t\t}\n\t\t$_Resultadosr=$this->db->query(\"SELECT IDEmpresa FROM empresa WHERE Razon_Social LIKE '%$_Palabra%'\");\n\t\t$_Resultadosr=$_Resultadosr->result_array();\n\t\t\n\t\t//busco en su nombre comercial\n\t\t$_Resultadosnc=$this->db->query(\"SELECT IDEmpresa FROM empresa WHERE Nombre_Comer LIKE '%$_Palabra%'\");\n\t\t$_Resultadosnc=$_Resultadosnc->result_array();\n\n\t\t//busco por su rfc\n\t\t$_Resultadosrfc=$this->db->query(\"SELECT IDEmpresa FROM empresa WHERE RFC LIKE '%$_Palabra%' \");\n\t\t$_Resultadosrfc=$_Resultadosrfc->result_array();\n\n\t\t//busco por su descripcion\n\t\t$_Resultadosprefil=$this->db->query(\"SELECT IDEmpresa FROM empresa WHERE Perfil LIKE '%$_Palabra%' \");\n\t\t$_Resultadosprefil=$_Resultadosprefil->result_array();\n\t\t\n\t\t//buscos por sus productos y servicios\n\t\t$_Resultadospprod=$this->db->query(\"SELECT IDEmpresa FROM productos WHERE Producto LIKE '%$_Palabra%'\");\n\t\t$_Resultadospprod=$_Resultadospprod->result_array();\n\t\t\n\n\t\t//buscos por sus productos y servicios de su descripcion\n\t\t$_Resultadospprodd=$this->db->query(\"SELECT IDEmpresa FROM productos WHERE Descripcion LIKE '%$_Palabra%'\");\n\t\t$_Resultadospprodd=$_Resultadospprodd->result_array();\n\t\t\n\n\t\n\t\n\n\t\t//buscos por sus marca\n\t\t$_Resultadosmarcas=$this->db->query(\"SELECT IDEmpresa FROM marcas WHERE Marca LIKE '%$_Palabra%'\");\n\t\t$_Resultadosmarcas=$_Resultadosmarcas->result_array();\n\n\t\t//buscos por sus normas de calidad\n\t\t$_Resultadosnormas=$this->db->query(\"SELECT IDEmpresa FROM normascalidad WHERE Norma LIKE '%$_Palabra%'\");\n\t\t$_Resultadosnormas=$_Resultadosnormas->result_array();\n\n\t\t// ahohora tengo que unir todos los resultados en un solo array para obtener sus datos\n\t\t$todos=array_merge($_Resultadosr, $_Resultadosnc,$_Resultadosrfc,$_Resultadosprefil,$_Resultadospprod,$_Resultadospprodd,$_Resultadosmarcas,$_Resultadosnormas);\n\t\t\n\t\t$_Resultados=[];\n\t\t//ahora elimino los repetidos\n\t\tforeach($todos as $empresa){\n\t\t\t$bandera=false;\n\t\t\t$resulta=in_array_r($empresa[\"IDEmpresa\"],$_Resultados);\n\t\t\tif($resulta===false){\n\t\t\t\tarray_push($_Resultados,array(\"IDEmpresa\"=>$empresa[\"IDEmpresa\"]));\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t// ahora obtengo el filtro de estados\n\t\tif($_Estado!==''){\n\t\t\tforeach($_Resultados as $keys=>$_empresa){\n\t\t\t\t$_datos_empresa=$this->Datos_Empresa($_empresa[\"IDEmpresa\"]);\n\t\t\t\tif($_datos_empresa[\"Estado\"]!==$_Estado){\n\t\t\t\t\tunset($_Resultados[$keys]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$_Resultados = array_values($_Resultados);\n\n\t\t\n\t\t// ahora obtengo el filtro de Certificaciones\n\t\tif($_Certificaciones===TRUE){\n\t\t\tforeach($_Resultados as $keys=>$_empresa){\n\t\t\t\t$_datos_empresa=$this->Datos_certificaciones($_empresa[\"IDEmpresa\"]);\n\t\t\t\tif(count($_datos_empresa)===0){\n\t\t\t\t\tunset($_Resultados[$keys]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$_Resultados = array_values($_Resultados);\n\n\t\t\n\t\t// ahora obtengo el filtro de Asociaciones\n\t\tif($_Asociaciones===TRUE){\n\t\t\tforeach($_Resultados as $keys=>$_empresa){\n\t\t\t\t$_datos_empresa=$this->Datos_Asociaciones($_empresa[\"IDEmpresa\"]);\n\t\t\t\tif(count($_datos_empresa)===0){\n\t\t\t\t\tunset($_Resultados[$keys]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$_Resultados = array_values($_Resultados);\n\t\n\t\t$_Datos=[];\n\t\t\n\t\tif($_Calificaciones!==\"\"){\n\t\t\t$_DatosCalificaciones=explode('-',$_Calificaciones);\n\t\t\t\n\t\t\tforeach($_Resultados as $_Empresa){\n\t\t\t\t$_DatosEmpresa=$this->Datos_Empresa($_Empresa[\"IDEmpresa\"]);\n\t\t\t\t$_DatosNormas=$this->Model_Norma->getall($_Empresa[\"IDEmpresa\"]);\n\t\t\t\t$_seguida = $this->Model_Follow->getfollowtrue($IDEMpresa,$_Empresa[\"IDEmpresa\"]);\n\t\t\t\t$ImagenCliente= $this->Model_Imagen->ImagenGen($_Empresa[\"IDEmpresa\"],'cliente');\n\t\t\t\t$ImagenProveedor= $this->Model_Imagen->ImagenGen($_Empresa[\"IDEmpresa\"],'proveedor');\n\t\t\t\t$_total=$this->db->query(\"SELECT COUNT('*') AS total FROM tbcalificaciones where IDEmpresaReceptor='\".$_Empresa[\"IDEmpresa\"].\"'\");\n\t\t\t\t$_total=$_total->row_array();\n\t\t\t\tif((int)$_total[\"total\"]>=(int)$_DatosCalificaciones[0] && (int)$_total[\"total\"]<=(int)$_DatosCalificaciones[1] ){\n\t\t\t\t\tarray_push(\n\t\t\t\t\t\t$_Datos,\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"IDEmpresa\"=>$_DatosEmpresa[\"IDEmpresa\"],\n\t\t\t\t\t\t\t\"Razon_Social\"=>$_DatosEmpresa[\"Razon_Social\"],\n\t\t\t\t\t\t\t\"RFC\"=>$_DatosEmpresa[\"RFC\"],\n\t\t\t\t\t\t\t\"Nombre_Comer\"=>$_DatosEmpresa[\"Nombre_Comer\"],\n\t\t\t\t\t\t\t\"Perfil\"=>$_DatosEmpresa[\"Perfil\"],\n\t\t\t\t\t\t\t\"Logo\"=>$_DatosEmpresa[\"Logo\"],\n\t\t\t\t\t\t\t\"Banner\"=>$_DatosEmpresa[\"Banner\"],\n\t\t\t\t\t\t\t\"Normas\"=>$_DatosNormas,\n\t\t\t\t\t\t\t\"Follow\"=>$_seguida,\n\t\t\t\t\t\t\t\"ImagenCliente\"=>$ImagenCliente,\n\t\t\t\t\t\t\t\"ImagenProveedor\"=>$ImagenProveedor\n\t\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t}else{\n\t\t\tforeach($_Resultados as $_Empresa){\n\t\t\t\t\n\t\t\t\t$_DatosEmpresa=$this->Datos_Empresa($_Empresa[\"IDEmpresa\"]);\n\t\t\t\t$_DatosNormas=$this->Model_Norma->getall($_Empresa[\"IDEmpresa\"]);\n\t\t\t\t$_seguida = $this->Model_Follow->getfollowtrue($IDEMpresa,$_Empresa[\"IDEmpresa\"]);\n\t\t\t\t$ImagenCliente= $this->Model_Imagen->ImagenGen($_Empresa[\"IDEmpresa\"],'cliente');\n\t\t\t\t$ImagenProveedor= $this->Model_Imagen->ImagenGen($_Empresa[\"IDEmpresa\"],'proveedor');\n\t\t\t\t$_total=$this->db->query(\"SELECT COUNT('*') AS total FROM tbcalificaciones where IDEmpresaReceptor='\".$_Empresa[\"IDEmpresa\"].\"'\");\n\t\t\t\tarray_push($_Datos,\n\t\t\t\tarray(\n\t\t\t\t\t\"IDEmpresa\"=>$_DatosEmpresa[\"IDEmpresa\"],\n\t\t\t\t\t\"Razon_Social\"=>$_DatosEmpresa[\"Razon_Social\"],\n\t\t\t\t\t\"RFC\"=>$_DatosEmpresa[\"RFC\"],\n\t\t\t\t\t\"Nombre_Comer\"=>$_DatosEmpresa[\"Nombre_Comer\"],\n\t\t\t\t\t\"Perfil\"=>$_DatosEmpresa[\"Perfil\"],\n\t\t\t\t\t\"Logo\"=>$_DatosEmpresa[\"Logo\"],\n\t\t\t\t\t\"Banner\"=>$_DatosEmpresa[\"Banner\"],\n\t\t\t\t\t\"Normas\"=>$_DatosNormas,\n\t\t\t\t\t\"Follow\"=>$_seguida,\n\t\t\t\t\t\"ImagenCliente\"=>$ImagenCliente,\n\t\t\t\t\t\"ImagenProveedor\"=>$ImagenProveedor\n\t\t\t\t));\n\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn $_Datos;\t\t\n\t}", "public function Consultar()\n {\n $condicion = $this->obtenerCondicion();\n $sentenciaSql = \"SELECT \n d.id_detalle_orden\n ,d.valor_inventario\n ,d.valor_venta\n ,d.cantidad\n ,d.id_orden\n ,d.id_producto\n ,d.estado\n ,p.descripcion AS nombre_producto \n FROM \n detalle_orden AS d \n INNER JOIN producto AS p ON d.id_producto = p.id_producto \".$condicion;\n $this->conn->preparar($sentenciaSql);\n $this->conn->ejecutar();\n return true;\n }", "function buscar_comprobante_doc_venta($id_cuenta, $id_anexo, $id_serie, $id_numero ) {\n $sql = \"SELECT\n\t\t\t\t\t prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\t, sum(if(prosic_moneda.id_moneda=1,prosic_detalle_comprobante.importe_soles,prosic_detalle_comprobante.importe_dolares*prosic_tipo_cambio.venta_financiero)*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_soles\n\t\t\t\t\t, sum(if(prosic_moneda.id_moneda=1,prosic_detalle_comprobante.importe_soles*prosic_tipo_cambio.venta_financiero,prosic_detalle_comprobante.importe_dolares)*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_dolares\n\t\t\t\tFROM prosic_detalle_comprobante\n\t\t\t\tINNER JOIN prosic_plan_contable ON prosic_detalle_comprobante.id_plan_contable=prosic_plan_contable.id_plan_contable\n\t\t\t\tINNER JOIN prosic_anexo ON prosic_detalle_comprobante.id_anexo = prosic_anexo.id_anexo\n\t\t\t\tINNER JOIN prosic_moneda ON prosic_detalle_comprobante.id_moneda = prosic_moneda.id_moneda\n\t\t\t\tLEFT JOIN prosic_tipo_cambio ON prosic_detalle_comprobante.fecha_doc_comprobante=prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\tWHERE 1=1 \";\n\t\t\t\tif ($id_cuenta != '')$sql.=\" AND prosic_plan_contable.cuenta_plan_contable LIKE '%\" . $id_cuenta . \"%'\";\n if ($id_anexo != '')$sql.=\" AND prosic_anexo.codigo_anexo LIKE '%\" . $id_anexo . \"%'\";\n if ($id_numero != '')$sql.=\" AND prosic_detalle_comprobante.nro_doc_comprobante LIKE '%\" . $id_numero . \"%'\";\n\t\t\t$sql.=\" group by prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\thaving importe_soles>0\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "public function getConsulta(){\n\t\t\treturn $this -> resultado;\n\t\t}", "public function BuscarVentasCajas() \n{\n\tself::SetNames();\n\t$sql =\"SELECT detalleventas.codventa, cajas.nrocaja, ventas.idventa, ventas.codcliente, ventas.codcaja, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.totalpago2, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, clientes.nomcliente, SUM(detalleventas.cantventa) as articulos FROM (detalleventas LEFT JOIN ventas ON detalleventas.fechadetalleventa=ventas.fechaventa) \n\tLEFT JOIN cajas ON cajas.codcaja=ventas.codcaja LEFT JOIN clientes ON ventas.codcliente=clientes.codcliente WHERE ventas.codcaja = ? AND DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') <= ? GROUP BY detalleventas.codventa\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim($_GET['codcaja']));\n\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t$stmt->bindValue(3, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN VENTAS DE PRODUCTOS PARA LA CAJA Y EL RANGO DE FECHAS SELECCIONADAS</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function _ConsultarClientes()\n\t\t{\n\t\t\t$query='\n\t\t\t\tSELECT\n\t\t\t\tclientes.id,\n\t\t\t\tclientes.nb_cliente,\n\t\t\t\tclientes.nb_apellidos,\n\t\t\t\tclientes.de_email,\n\t\t\t\tclientes.num_celular,\n\t\t\t\tusuarios.nb_nombre as \"Ins_nombre\", \n\t\t\t\tusuarios.nb_apellidos as \"Ins_apellido\" \n\t\t\t\tFROM sgclientes clientes\n\t\t\t\tleft join sgusuarios usuarios on clientes.id_usuario_registro=usuarios.id\n\t\t\t\twhere clientes.sn_activo=1\n\t\t\t\tORDER BY clientes.id ASC\n\t\t\t\n\t\t\t';\n\t\t\t$clientes = $this->EjecutarTransaccionAllNoParams($query);\n\t\t\treturn $clientes;\n\t\t}", "function buscar_comprobante_documento($id_cuenta, $id_anexo, $id_serie, $id_numero ) {\n $sql = \"SELECT\n\t\t\t\t\t prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\t, sum(prosic_detalle_comprobante.importe_soles*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_soles\n\t\t\t\t\t, sum(prosic_detalle_comprobante.importe_soles*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)/prosic_tipo_cambio.compra_sunat) as importe_dolares\n\t\t\t\tFROM prosic_detalle_comprobante\n\t\t\t\tINNER JOIN prosic_plan_contable ON prosic_detalle_comprobante.id_plan_contable=prosic_plan_contable.id_plan_contable\n\t\t\t\tINNER JOIN prosic_anexo ON prosic_detalle_comprobante.id_anexo = prosic_anexo.id_anexo\n\t\t\t\tINNER JOIN prosic_moneda ON prosic_detalle_comprobante.id_moneda = prosic_moneda.id_moneda\n\t\t\t\tLEFT JOIN prosic_tipo_cambio ON prosic_detalle_comprobante.fecha_doc_comprobante=prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\tWHERE 1=1 \";\n\t\t\t\tif ($id_cuenta != '')$sql.=\" AND prosic_plan_contable.cuenta_plan_contable LIKE '%\" . $id_cuenta . \"%'\";\n if ($id_anexo != '')$sql.=\" AND prosic_anexo.codigo_anexo LIKE '%\" . $id_anexo . \"%'\";\n if ($id_numero != '')$sql.=\" AND prosic_detalle_comprobante.nro_doc_comprobante LIKE '%\" . $id_numero . \"%'\";\n\t\t\t$sql.=\" group by prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\thaving importe_soles>0\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function armar_consulta($pdia,$udia,$anio){\n //designaciones sin licencia UNION designaciones c/licencia sin norma UNION designaciones c/licencia c norma UNION reservas\n// $sql=\"(SELECT distinct t_d.id_designacion, trim(t_d1.apellido)||', '||t_d1.nombre as docente_nombre, t_d1.legajo, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac,t_d3.descripcion as id_departamento,t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n// 0 as dias_lic, case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n// FROM designacion as t_d LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n// LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n// LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n// LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n// LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n// LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n// LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n// LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n// LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n// LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n// LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON ( m_e.anio=\".$anio.\")\".\n// \"LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo),\n// docente as t_d1,\n// caracter as t_c,\n// unidad_acad as t_ua \n// \n// WHERE t_d.id_docente = t_d1.id_docente\n// AND t_d.carac = t_c.id_car \n// AND t_d.uni_acad = t_ua.sigla \n// AND t_d.tipo_desig=1 \n// AND not exists(SELECT * from novedad t_no\n// where t_no.id_designacion=t_d.id_designacion\n// and (t_no.tipo_nov=1 or t_no.tipo_nov=2 or t_no.tipo_nov=4 or t_no.tipo_nov=5)))\n// UNION\n// (SELECT distinct t_d.id_designacion, trim(t_d1.apellido)||', '||t_d1.nombre as docente_nombre, t_d1.legajo, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac, t_d3.descripcion as id_departamento,t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n// 0 as dias_lic, case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n// FROM designacion as t_d LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n// LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n// LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n// LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n// LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n// LEFT OUTER JOIN tipo_emite as t_te ON (t_d.emite_cargo_gestion = t_te.cod_emite)\n// LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n// LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n// LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n// LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n// LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n// LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON (m_e.anio=\".$anio.\")\".\n// \"LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo),\n// docente as t_d1,\n// caracter as t_c,\n// unidad_acad as t_ua,\n// novedad as t_no \n// \n// WHERE t_d.id_docente = t_d1.id_docente\n// AND t_d.carac = t_c.id_car \n// AND t_d.uni_acad = t_ua.sigla \n// AND t_d.tipo_desig=1 \n// AND t_no.id_designacion=t_d.id_designacion\n// AND (((t_no.tipo_nov=2 or t_no.tipo_nov=5 ) AND (t_no.tipo_norma is null or t_no.tipo_emite is null or t_no.norma_legal is null))\n// OR (t_no.tipo_nov=1 or t_no.tipo_nov=4))\n// )\n// UNION\n// (SELECT distinct t_d.id_designacion, trim(t_d1.apellido)||', '||t_d1.nombre as docente_nombre, t_d1.legajo, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac,t_d3.descripcion as id_departamento,t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n// sum((case when (t_no.desde>'\".$udia.\"' or (t_no.hasta is not null and t_no.hasta<'\".$pdia.\"')) then 0 else (case when t_no.desde<='\".$pdia.\"' then ( case when (t_no.hasta is null or t_no.hasta>='\".$udia.\"' ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_no.hasta-'\".$pdia.\"')+1) end ) else (case when (t_no.hasta is null or t_no.hasta>='\".$udia.\"' ) then ((('\".$udia.\"')-t_no.desde+1)) else ((t_no.hasta-t_no.desde+1)) end ) end )end)*t_no.porcen ) as dias_lic,\n// case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n// FROM designacion as t_d LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n// LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n// LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n// LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n// LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n// LEFT OUTER JOIN tipo_emite as t_te ON (t_d.emite_cargo_gestion = t_te.cod_emite)\n// LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n// LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n// LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n// LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n// LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n// LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON (m_e.anio=\".$anio.\")\".\n// \"LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo),\n// docente as t_d1,\n// caracter as t_c,\n// unidad_acad as t_ua,\n// novedad as t_no \n// \n// WHERE t_d.id_docente = t_d1.id_docente\n// \tAND t_d.carac = t_c.id_car \n// \tAND t_d.uni_acad = t_ua.sigla \n// \tAND t_d.tipo_desig=1 \n// \tAND t_no.id_designacion=t_d.id_designacion \n// \tAND (t_no.tipo_nov=2 or t_no.tipo_nov=5) \n// \tAND t_no.tipo_norma is not null \n// \tAND t_no.tipo_emite is not null \n// \tAND t_no.norma_legal is not null\n// GROUP BY t_d.id_designacion,docente_nombre,t_d1.legajo,t_d.nro_cargo,anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, cat_mapuche_nombre, cat_estat, dedic,t_c.descripcion , t_d3.descripcion , t_a.descripcion , t_o.descripcion ,t_d.uni_acad, t_m.quien_emite_norma, t_n.nro_norma, t_x.nombre_tipo , t_d.nro_540, t_d.observaciones, m_p.nombre, t_t.id_programa, t_t.porc,m_c.costo_diario, check_presup, licencia,t_d.estado \t\n// )\".\n //--sino tiene novedad entonces dias_lic es 0 case when t_no.id_novedad is null \n //--si tiene novedad tipo 2,5 y no tiene norma entonces dias_lic es 0\n $sql=\" SELECT distinct t_d.id_designacion,t_d.por_permuta,t_d.tipo_desig, trim(t_d1.apellido)||', '||t_d1.nombre as docente_nombre, t_d1.legajo, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac, t_d3.descripcion as id_departamento,t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n sum(case when t_no.id_novedad is null then 0 else (case when (t_no.desde>'\".$udia.\"' or (t_no.hasta is not null and t_no.hasta<'\".$pdia.\"')) then 0 else (case when t_no.desde<='\".$pdia.\"' then ( case when (t_no.hasta is null or t_no.hasta>='\".$udia.\"' ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_no.hasta-'\".$pdia.\"')+1) end ) else (case when (t_no.hasta is null or t_no.hasta>='\".$udia.\"' ) then ((('\".$udia.\"')-t_no.desde+1)) else ((t_no.hasta-t_no.desde+1)) end ) end )end)*t_no.porcen end) as dias_lic,\n case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n FROM designacion as t_d \n LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n LEFT OUTER JOIN tipo_emite as t_te ON (t_d.emite_cargo_gestion = t_te.cod_emite)\n LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON (m_e.anio=\".$anio.\")\n LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo)\n LEFT OUTER JOIN novedad t_no ON (t_d.id_designacion=t_no.id_designacion and t_no.tipo_nov in (2,5) and t_no.tipo_norma is not null \n \t\t\t\t\tand t_no.tipo_emite is not null \n \t\t\t\t\tand t_no.norma_legal is not null \n \t\t\t\t\tand t_no.desde<='\".$udia.\"' and t_no.hasta>='\".$pdia.\"'),\n docente as t_d1,\n caracter as t_c,\n unidad_acad as t_ua \n WHERE t_d.id_docente = t_d1.id_docente\n AND t_d.carac = t_c.id_car \n AND t_d.uni_acad = t_ua.sigla \n AND t_d.tipo_desig=1 \n GROUP BY t_d.id_designacion,t_d.por_permuta,t_d.tipo_desig,docente_nombre,t_d1.legajo,t_d.nro_cargo,anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, cat_mapuche_nombre, cat_estat, dedic,t_c.descripcion , t_d3.descripcion , t_a.descripcion , t_o.descripcion ,t_d.uni_acad, t_m.quien_emite_norma, t_n.nro_norma, t_x.nombre_tipo , t_d.nro_540, t_d.observaciones, m_p.nombre, t_t.id_programa, t_t.porc,m_c.costo_diario, check_presup, licencia,t_d.estado \t\".\n\n \" UNION\n (SELECT distinct t_d.id_designacion,0 as por_permuta,t_d.tipo_desig, 'RESERVA'||': '||t_r.descripcion as docente_nombre, 0, t_d.nro_cargo, t_d.anio_acad, t_d.desde, t_d.hasta, t_d.cat_mapuche, t_cs.descripcion as cat_mapuche_nombre, t_d.cat_estat, t_d.dedic, t_c.descripcion as carac, t_d3.descripcion as id_departamento, t_a.descripcion as id_area, t_o.descripcion as id_orientacion, t_d.uni_acad, t_m.quien_emite_norma as emite_norma, t_n.nro_norma, t_x.nombre_tipo as tipo_norma, t_d.nro_540, t_d.observaciones, t_t.id_programa, m_p.nombre as programa, t_t.porc,m_c.costo_diario, case when t_d.check_presup=0 then 'NO' else 'SI' end as check_presup,'NO' as licencia,t_d.estado,\n 0 as dias_lic,\n case when t_d.desde<='\".$pdia.\"' then ( case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null ) then (((cast('\".$udia.\"' as date)-cast('\".$pdia.\"' as date))+1)) else ((t_d.hasta-'\".$pdia.\"')+1) end ) else (case when (t_d.hasta>='\".$udia.\"' or t_d.hasta is null) then ((('\".$udia.\"')-t_d.desde+1)) else ((t_d.hasta-t_d.desde+1)) end ) end as dias_des \n FROM designacion as t_d LEFT OUTER JOIN categ_siu as t_cs ON (t_d.cat_mapuche = t_cs.codigo_siu) \n LEFT OUTER JOIN categ_estatuto as t_ce ON (t_d.cat_estat = t_ce.codigo_est) \n LEFT OUTER JOIN norma as t_n ON (t_d.id_norma = t_n.id_norma) \n LEFT OUTER JOIN tipo_emite as t_m ON (t_n.emite_norma = t_m.cod_emite) \n LEFT OUTER JOIN tipo_norma_exp as t_x ON (t_x.cod_tipo = t_n.tipo_norma) \n LEFT OUTER JOIN tipo_emite as t_te ON (t_d.emite_cargo_gestion = t_te.cod_emite)\n LEFT OUTER JOIN departamento as t_d3 ON (t_d.id_departamento = t_d3.iddepto) \n LEFT OUTER JOIN area as t_a ON (t_d.id_area = t_a.idarea) \n LEFT OUTER JOIN orientacion as t_o ON (t_d.id_orientacion = t_o.idorient and t_o.idarea=t_a.idarea)\n LEFT OUTER JOIN imputacion as t_t ON (t_d.id_designacion = t_t.id_designacion) \n LEFT OUTER JOIN mocovi_programa as m_p ON (t_t.id_programa = m_p.id_programa) \n LEFT OUTER JOIN mocovi_periodo_presupuestario m_e ON (m_e.anio=\".$anio.\")\".\n \"LEFT OUTER JOIN mocovi_costo_categoria as m_c ON (t_d.cat_mapuche = m_c.codigo_siu and m_c.id_periodo=m_e.id_periodo),\n caracter as t_c,\n unidad_acad as t_ua,\n reserva as t_r \n \n WHERE t_d.carac = t_c.id_car \n \tAND t_d.uni_acad = t_ua.sigla \n \tAND t_d.tipo_desig=2 \n \tAND t_d.id_reserva = t_r.id_reserva \t\n )\";\n //esto es para las designaciones que tienen mas de un departamento,area,orientacion\n $sql2=\"SELECT distinct sub1.id_designacion,sub1.por_permuta,sub1.tipo_desig,sub1.docente_nombre,sub1.legajo,sub1.nro_cargo,sub1.anio_acad,sub1.desde,sub1.hasta,sub1.cat_mapuche, sub1.cat_mapuche_nombre,\n sub1.cat_estat, sub1.dedic, sub1.carac,case when sub2.id_designacion is not null then sub2.dpto else sub1.id_departamento end as id_departamento,case when sub2.id_designacion is not null then sub2.area else sub1.id_area end as id_area,case when sub2.id_designacion is not null then sub2.orientacion else sub1.id_orientacion end as id_orientacion\n , sub1.uni_acad, sub1.emite_norma, sub1.nro_norma, sub1.tipo_norma, sub1.nro_540, sub1.observaciones, sub1.id_programa, sub1.programa, sub1.porc, sub1.costo_diario, sub1.check_presup, sub1.licencia, sub1.estado, sub1.dias_lic, sub1.dias_des\n FROM (\".$sql.\")sub1\"\n . \" LEFT OUTER JOIN (select d.id_designacion,excepcion_departamento(a.id_designacion)as dpto,excepcion_area(a.id_designacion) as area,excepcion_orientacion(a.id_designacion) as orientacion\n from designacion d,dao_designa a \n where d.desde <='\".$udia.\"' and (d.hasta>='\".$pdia.\"' or d.hasta is null)\n and a.id_designacion=d.id_designacion)sub2 ON (sub1.id_designacion=sub2.id_designacion)\";\n return $sql2;\n }", "function buscar_materiales($registrado,$texto_buscar,$licencia,$sql) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_visibles=\"AND material_estado=1\";\n\t\t}\n\t\t\n\t\tif ($texto_buscar !='') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (material_titulo LIKE '%$texto_buscar%' \n\t\t\tOR material_descripcion LIKE '%$texto_buscar%' \n\t\t\tOR material_objetivos LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t\n\t\t}\n\t\t\n\t\t$query = \"SELECT COUNT(*) FROM materiales\n\t\tWHERE material_licencia = '$licencia'\n\t\t$sql\n\t\t$sql_texto\n\t\t$mostrar_visibles\n\t\tORDER BY fecha_alta desc\";\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\n\t\t$numrows = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows[0] == 0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn $numrows[0];\n\t\t}\n\t}", "public function TraerCiudadRiesgo(){\n $sentencia = $this->db->prepare(\"SELECT *FROM ciudad WHERE zona_riesgo=1 \" ); \n $sentencia->execute(); // ejecuta -\n $query= $sentencia->fetchAll(PDO::FETCH_OBJ); // obtiene la respuesta\n return $query;\n }", "function consultarEstudiantesSinPrueba(){\n $cadena_sql=$this->cadena_sql(\"estudiantesSinPrueba\",$this->codProyecto);\n $estudiantes=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoGestion, $cadena_sql,\"busqueda\" );\n return $estudiantes;\n }", "function consultar($where='',$group='',$ord='') {\n if ($this->con->conectar() == true) {\n \n\t\t\t$Sql = \"SELECT \n\t\t\t\t\t\ttrabajador.trabCedula,\n\t\t\t\t\t\tCONCAT(trabajador.trabNombre,' ',trabajador.trabApellido) AS trabNombres,\n\t\t\t\t\t\ttrabajador.trabNombre, \n\t\t\t\t\t\ttrabajador.trabApellido,\n\t\t\t\t\t\ttrabajador.trabOrganismoId,\n\t\t\t\t\t\torganismo.organismoDescripcion,\n\t\t\t\t\t\ttrabajador.trabDepartmentoId,\n\t\t\t\t\t\tdepartamento.departamentoDescripcion,\n\t\t\t\t\t\ttipo_prestamo.tipoprestNombre,\t\n\t\t\t\t\t\tprestamos.*,\n\t\t\t\t\t\tliquidacion.*,\n\t\t\t\t\t\tdetalle_liquidacion.*\n\n\t\t\t\t\tFROM detalle_liquidacion\n\t\t\t\t\t\t\tLEFT JOIN prestamos ON detalle_liquidacion.detliqPrestamoId = prestamos.prestamoId\t\t\n\t\t\t\t\t\t\tLEFT JOIN tipo_prestamo ON prestamos.prestamoTipoprestId = tipo_prestamo.tipoprestId\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tLEFT JOIN trabajador ON trabajador.trabCedula = prestamos.prestamoTrabCedula\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tLEFT JOIN organismo ON trabajador.trabOrganismoId = organismo.organismoId\n\t\t\t\t\t\t\tLEFT JOIN departamento ON trabajador.trabDepartmentoId = departamento.departamentoId\n\t\t\t\t\t\t\tLEFT JOIN liquidacion ON detalle_liquidacion.detliqLiquidacionCodigo = liquidacion.liquidacionCodigo\n\n\t\t\t\t\t$where\t\n\t\t\t\t\t$group\n\t\t\t\t\t$ord\n\t\t\t\t\t\";\n $this->resultado= mysql_query($Sql);\n return true;\n }\n }", "public function busquedaCliente()\n {\n\n\n $query = $_GET['query'];\n if ($query == '') {\n return response()->json('');\n\n } else {\n $user = User::where('cedula_p', $query)->where('estado_p', 1)->where('tipo_p', 2)->first();\n if ($user) {\n return response()->json([\n 'id' => $user->id,\n 'cedula_p' => $user->cedula_p,\n 'nombres' => $user->nombre_p . ' ' . $user->apellido_p,\n 'telefono_p' => $user->telefono_p,\n 'direccion_p' => $user->direccion_p,\n 'email' => $user->email\n ]);\n\n } else {\n return response()->json(['mensaje' => 'Datos no encontrados']);\n }\n\n }\n\n\n }", "public function get_datos_empresa($empresa){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n\t$sql=\"select *from empresas where nombre=?\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$empresa);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "function consultarEstudiantesParaHomologacion($cod_proyecto){\n $cadena_sql = $this->sql->cadena_sql(\"consultarEstudiantesProyecto\",$cod_proyecto);\n return $resultadoEspacio = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "public function search() {\n $sql = \"SELECT * FROM tb_msg ORDER BY id DESC\";\n $stmt = $this->db->prepare($sql);\n\n// $stmt->bindValue(\":senha\", $this->aluno->getSenha());\n $stmt->execute();\n $result = $stmt->fetchAll();\n return $result;\n }", "public function filtrar(){\n\n \t\t$sql=\"select * from __________ where ;\";\n \t return $this->ejecutar($sql); \n\n }", "public function searchIPC($campo,$campo2,$campo3,$concepto){\n $sql=\"SELECT Id,Proveedor, Concepto, FORMAT(Monto, 2) AS Monto, Revisado, DATE_FORMAT(FechaSolicitud,'%d/%m/%Y') AS FechaSolicitud, AutorizadoPago, DATE_FORMAT(FechaAutorizado,'%d/%m/%Y') AS FechaAutorizado, estado, Comentario, ComentarioCapt, DATE_FORMAT(FechaPago,'%d/%m/%Y') AS FechaPago FROM \".self::$tablename.\" where $campo like'%{$concepto}%' OR $campo2 like'%{$concepto}%' OR $campo3 like'%{$concepto}%' ORDER BY Id DESC\";\n return Executor::doit($sql);\n }", "private function consultar_usuario_por_correo() {\n $sentencia = \"select id,nombrecompleto ,correo,token \"\n . \"from usuario u where u.correo ='{$this->referencia_a_buscar}'; \";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n }", "function consultaJuegoUsuario($Usuario_idUsuario, $Juego_idJuego){\n $conexion = openBD();\n\n $sentenciaText = \"select * from usuario_has_juego where Usuario_idUsuario=$Usuario_idUsuario and Juego_idJuego=$Juego_idJuego\";\n\n $sentencia =$conexion->prepare($sentenciaText);\n $sentencia->execute();\n $resultado = $sentencia->fetch();\n $conexion = closeBD();\n\n \n\n return $resultado;\n\n\n }", "public function buscarDocumento( $txtCodigoCarrera ){\n\t\t\t$sql = \"SELECT E.idestudiantegeneral, ET.codigoestudiante, E.numerodocumento, E.tipodocumento,\n \t\t\tDATE_FORMAT(E.fechanacimientoestudiantegeneral,'%Y-%m-%d') AS fechanacimientoestudiantegeneral, E.telefonoresidenciaestudiantegeneral,\n\t\t\t\tE.telefono2estudiantegeneral, E.tipodocumento, E.nombresestudiantegeneral, E.apellidosestudiantegeneral , E.emailestudiantegeneral, E.celularestudiantegeneral,\n\t\t\t\tD.nombredocumento, E.codigogenero, G.nombregenero\n \t\t\tFROM estudiantegeneral E\n \t\t\tINNER JOIN estudiante ET ON ( ET.idestudiantegeneral = E.idestudiantegeneral )\n \t\t\tINNER JOIN carrera C ON ( C.codigocarrera = ET.codigocarrera )\n \t\t\tINNER JOIN documento D ON ( D.tipodocumento = E.tipodocumento )\n \t\t\tINNER JOIN genero G ON ( G.codigogenero = E.codigogenero )\n \t\t\tWHERE numerodocumento = ? \n \t\t\tAND C.codigocarrera = ? \";\n\t\t\t\n\t\t\t\n\t\t\t$this->persistencia->crearSentenciaSQL( $sql );\n\t\t\t$this->persistencia->setParametro( 0 , $this->getDocumento( ) , false );\n\t\t\t$this->persistencia->setParametro( 1 , $txtCodigoCarrera , false );\n\t\t\t//echo $this->persistencia->getSQLListo( );\n\t\t\t$this->persistencia->ejecutarConsulta( );\n\t\t\t\n\t\t\tif( $this->persistencia->getNext( ) ){\n\t\t\t\t$this->setId( $this->persistencia->getParametro( \"codigoestudiante\" ) );\n\t\t\t\t$this->setNombres( $this->persistencia->getParametro( \"nombresestudiantegeneral\" ) );\n\t\t\t\t$this->setApellidos( $this->persistencia->getParametro( \"apellidosestudiantegeneral\" ) );\n\t\t\t\t\n\t\t\t\t$tipoDocumento = new TipoDocumento( null );\n\t\t\t\t$tipoDocumento->setIniciales( $this->persistencia->getParametro( \"tipodocumento\" ) );\n\t\t\t\t$tipoDocumento->setDescripcion( $this->persistencia->getParametro( \"nombredocumento\" ) );\n\t\t\t\t$this->setTipoDocumento( $tipoDocumento );\n\t\t\t}\n\t\t}", "public function consultaRetorno($id_retorno, $primeiraPalavraCliente, $ultimoRetorno, $consultaUltima)\n {\n $this->logSis('DEB', 'Entrou no Retorno. idRetorno: ' . $id_retorno . ' Palavra: ' . $primeiraPalavraCliente . ' UltimoRetorno: ' . $ultimoRetorno . ' Tipo da consulta: ' . $consultaUltima['tipo']);\n\n include(\"dados_conexao.php\");\n include_once(\"horarios.php\");\n include_once(\"servicos.php\");\n\n\n\n if ($consultaUltima['tipo'] == 8) { //( Verifica se o retorno trata-se de uma marcação de horário\n\n\n //( Verifica qual o último subtipo para pesquisar o próximo retorno de acordo com o próximo subtipo\n if ($consultaUltima['subtipo'] == 'mes') {\n $proximoSubtipo = 'dia';\n } else if ($consultaUltima['subtipo'] == 'dia') {\n $proximoSubtipo = 'hora';\n } else if ($consultaUltima['subtipo'] == 'hora') { //( Envia a pergunta de confirmação\n $this->logSis('DEB', 'Entrou no subtipo Hora');\n if (is_numeric($primeiraPalavraCliente)) {\n $this->logSis('DEB', 'É número');\n\n //( Decodifica o Json que foi salvo no BD\n $opcoes = json_decode($this->opcoesVariaveis, true);\n $this->logSis('DEB', 'opcoes->' . print_r($opcoes, true));\n\n $indice = array_search($primeiraPalavraCliente, array_column($opcoes, 'ind'));\n $idHorario = $opcoes[$indice]['id'];\n $this->logSis('DEB', 'idHorario->' . $idHorario);\n\n\n //( Consulta o horário encontrado pra ver se está disponível ainda\n\n $result = fctConsultaParaArray(\n 'ConsultaHorario',\n \"SELECT *, DATE_FORMAT(horario, '%d/%m/%Y %H:%i') AS hora_formatada FROM tbl_horarios WHERE status = 1 AND horario >= NOW() AND id_horario = $idHorario\",\n array('hora_formatada')\n );\n $this->logSis('DEB', 'result->' . print_r($result, true));\n\n if ($result == false) {\n //& VEr se realmente vai ser possível escolher um outro horário\n //& Sugestão aqui seria voltar ao menu anterior\n $this->sendMessage('MensageErro', $this->numero, \"Esse horário não está mais disponível, favor escolher uma outra data.\", \"\");\n } else {\n $horaFormatada = $result[0]['hora_formatada'];\n $texto = \"CONFIRME O HORÁRIO\\n\";\n $texto .= \"*$horaFormatada*\\n\\n\";\n $texto .= \"Você confirma esse horário?\";\n\n $arrayRetorno = array(\n \"modo\" => 9, //tipo confirmação\n \"subtipo\" => 'horario',\n \"id_retorno\" => '',\n \"opcoes\" => $idHorario\n );\n\n //& Organizar o array retorno\n $this->confirmacao($texto, $arrayRetorno);\n }\n } else {\n $this->sendMessage('MensageErro', $this->numero, \"Responda somente com o número referente à opção desejada.\", \"\");\n }\n }\n\n //( Faz a pesquisa do retorno\n $sql = \"SELECT * FROM tbl_retornos WHERE tipo = 8 AND coringa = '$proximoSubtipo'\";\n } else if ($consultaUltima['tipo'] == 9) { //( Uma solicitação de confirmação\n\n //( Verifica que é uma confirmação de horário \n if ($consultaUltima['subtipo'] == 'horario') {\n\n //( Verifica se tem SIM ou NÃO na mensagem do cliente\n $nao = $this->verficaPalavras('', $this->mensagem, array('não', 'nao', 'NÃO', 'Nao', 'NAO', 'NO', 'no'));\n $sim = $this->verficaPalavras('', $this->mensagem, array('sim', 'Sim', 'Si', 'si', 'SI', 'sin', 'Sin', 'SIN', 'SIM'));\n\n\n if ($nao == 1) { //( Se tiver NÃO, é enviada o MENU RAIZ \n $this->envioMenuRaiz($this->numero, \"*OPERAÇÃO CANCELADA*\\n\\n\");\n } else if ($sim == 1) { //( Se tiver SIM, é reservado o horário\n $this->reservaHorario($this->opcoesVariaveis);\n } else { //( Se na mensagem não tem nem SIM nem Não, é enviado a mensagem de erro dizendo que não entendeu\n $this->sendMessage('MensageErro', $this->numero, \"Não compreendi a sua resposta, favor responder exatamente como foi solicitado.\", \"\");\n }\n }\n } else if ($id_retorno == '') { //ou seja, não sei qual o retorno\n $sql = \"SELECT * FROM tbl_retornos WHERE id_retorno = (SELECT resposta FROM tbl_opcoes WHERE id_instancia = $this->idInstancia AND indice = '$primeiraPalavraCliente' AND id_retorno = $ultimoRetorno)\";\n } else { //Sei qual o retorno atual\n //$idInstancia = $this->idInstancia;\n $sql = \"SELECT * FROM tbl_retornos WHERE id_instancia = $this->idInstancia AND id_retorno = $id_retorno\";\n }\n\n $this->logSis('DEB', $sql);\n\n $query = mysqli_query($conn['link'], $sql);\n $consultaRetorno = mysqli_fetch_array($query, MYSQLI_ASSOC);\n $this->logSis('DEB', 'Sql: ' . $sql . ' consultaRetorno->' . print_r($consultaRetorno, true));\n\n $numRow = mysqli_num_rows($query);\n if (!$query) {\n $this->logSis('ERR', 'Mysql Connect: ' . mysqli_error($conn['link']));\n exit(0);\n }\n if ($numRow == 0) { //VERIFICA SE EXISTE NO BANCO DE DADOS\n $this->logSis('ERR', 'Não encontrou a mensagem inicial Instância. Instância: ' . $this->idInstancia);\n exit(0);\n } else {\n\n //& VERIFICAR AQUI SE VAI TER AMBIGUIDADE COM A PRIMEIRA CONSULTA \n $id_retorno = $consultaRetorno['id_retorno']; //ID da tabela retorno (chave)\n $mensagem = utf8_encode($consultaRetorno['mensagem']);\n //Consulta das opções\n $sql = \"SELECT * FROM tbl_opcoes WHERE listavel = 1 AND id_instancia = $this->idInstancia AND id_retorno = $id_retorno ORDER BY indice ASC\";\n $this->logSis('DEB', $sql);\n\n $query = mysqli_query($conn['link'], $sql);\n $numRow = mysqli_num_rows($query);\n\n //Teste DEploy\n if ($numRow != 0) {\n $mensagem .= \"\\n\";\n while ($opcao = mysqli_fetch_array($query)) {\n $mensagem .= '*' . $opcao['indice'] . '.* ' . utf8_encode($opcao['mensagem']) . \"\\n\";\n }\n if ($consultaRetorno['modo'] == 1 && $consultaRetorno['id_retorno'] != $this->menuRaiz) {\n $mensagem .= \"*0.* Voltar ao menu anterior\\n\";\n }\n }\n\n $retorno = array(\n 'id_retorno' => $consultaRetorno['id_retorno'],\n 'nome' => $consultaRetorno['nome'],\n 'modo' => $consultaRetorno['modo'],\n 'tipo' => $consultaRetorno['tipo'],\n 'coringa' => $consultaRetorno['coringa'], //para tipo 6 (Inclusão lista) -> lista_X\n 'mensagem' => $mensagem,\n 'url' => $consultaRetorno['url'],\n 'lat' => $consultaRetorno['lat'],\n 'lng' => $consultaRetorno['lng'],\n 'name' => $consultaRetorno['name'],\n 'address' => $consultaRetorno['address']\n );\n $this->logSis('DEB', 'Retorno->' . print_r($retorno, true));\n\n return $retorno;\n }\n }" ]
[ "0.71120656", "0.69669205", "0.69212437", "0.69032186", "0.68485016", "0.6844302", "0.6844159", "0.6756795", "0.67531323", "0.6732477", "0.6730718", "0.6714364", "0.67121726", "0.6711035", "0.6701936", "0.6696793", "0.65901715", "0.6570188", "0.65618193", "0.65580887", "0.6556309", "0.65526253", "0.65466446", "0.65359944", "0.6529951", "0.65277207", "0.651414", "0.6513611", "0.6508259", "0.64999574", "0.6496828", "0.64959", "0.6489533", "0.64853084", "0.64776456", "0.64748067", "0.6474173", "0.6464518", "0.6453042", "0.64506197", "0.64474726", "0.6432848", "0.6424472", "0.64061433", "0.63987345", "0.639718", "0.63868207", "0.63858443", "0.63849515", "0.6384038", "0.638267", "0.6382396", "0.6381499", "0.6379967", "0.6378284", "0.63776666", "0.6372007", "0.6353736", "0.6346047", "0.6342679", "0.6338304", "0.63335943", "0.63332975", "0.6330023", "0.63287944", "0.63280445", "0.63271374", "0.6326874", "0.63257706", "0.6321953", "0.6319434", "0.631449", "0.630702", "0.63052064", "0.63008976", "0.62996364", "0.6298132", "0.6282377", "0.62780994", "0.6269866", "0.6261532", "0.62518936", "0.6249454", "0.6248216", "0.6245963", "0.6238694", "0.6235704", "0.62343645", "0.6217766", "0.621185", "0.6211415", "0.6209427", "0.6189216", "0.6187461", "0.61867034", "0.61866975", "0.6173547", "0.6172561", "0.61713666", "0.6165444", "0.6158503" ]
0.0
-1
create html form for new platform
function newPlatformForm() { echo '<form action="./platform.php?action=add" method="post" enctype="multipart/form-data" id="editForm"> <label>Platform Name :</label><input type="text" name="name" /><br /> <label>Platform Icon :</label><input type="file" value="upload" name="icon" /><br /> <input type="submit" name="submit" value="submit" /> </form>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function createForm();", "abstract public function createForm();", "public function createForm();", "public function createForm();", "static function newform()\n\t{\n\t\treturn '\n\t\t<h2>Neue Wette eintragen</h2>\n\t\t<small>Eine Wette wird erst gestartet wenn der Wetter (das bist DU wenn du eine Wette einträgst) die offene Wette startet.</small>\n\t\t<form action=\"'.getURL(false,false).'\" method=\"post\">\n\t\t<table class=\"border\">\n\t\t<tr><td>\n\t\t<b>Wett Titel:<b> <br />\n\t\t<input type=\"text\" name=\"titel\" class=\"text\" size=\"40\">\n\t\t</td></tr><tr><td>\n\t\t<b>Wette: </b><br />\n\t\t<textarea name=\"wette\" cols=\"40\" rows=\"5\" class=\"text\"></textarea>\n\t\t</td></tr><tr><td>\n\t\t<b>Wetteinsatz: </b><br />\n\t\t<textarea name=\"einsatz\" cols=\"40\" rows=\"3\" class=\"text\"></textarea>\n\t\t</td></tr><tr><td>\n\t\t<b><small>Gültigkeit (in Tagen ab Wettstart, 0 steht für unbegrenzt):</small></b>\n\t\t<br />\n\t\t<input type=\"text\" name=\"dauer\" class=\"text\" size=\"4\">\n\t\t</td></tr><tr><td>\n\t\t<br />\n\t\t<small>\n\t\tEine Wette ist beendet wenn, <b>beide Parteien</b> <br />\n\t\tsich auf einen <b>Sieg oder eine Niederlage einigen</b> können.<br />\n\t\t</small>\n\t\t<br />\n\t\t<input type=\"submit\" value=\"Wette eintragen\" class=\"button\">\n\t\t</td></tr>\n\t\t</table>\n\t\t</form>';\n\t}", "public static function display_create_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=save' method='post'>\";\n echo \"Name: <input type='text' name='name' /><br />\";\n echo \"Description: <textarea name='description'></textarea><br />\";\n echo \"<input type='submit' value='Save' />\";\n echo \"</form>\";\n }", "function makeForm() {\n if($this->table_title != '' ) {\n $db_obj = new db_class();\n $desc_table = $db_obj->tableDescription($this->table_title);\n $db_obj->closeDB();\n \n// showArray($desc_table);\n echo '<form id=\"generic_edit_form\" method=\"POST\" >';\n echo '<input type=\"hidden\" name=\"title_input\" value=\"name\"> '; // THIS MUST BE HERE FOR CLONABLE FORMS!!!\n echo '<input type=\"hidden\" name=\"table\" value=\"vendors\">'; // THE TABLE MUST BE LABELED\n echo '<b>This is a generic input</b> <input type=\"text\" name=\"generic\">' . \"\\n\";\n \n echo '<br><br><input type=\"submit\" >';\n echo '</form>';\n } else {\n echo '<h2>hello, form<h2>';\n }\n }", "public function CreateForm();", "public function cs_generate_form() {\n global $post;\n }", "function buildForm(){\n\t\t# menampilkan form\n\t}", "private static function do_html_form_create($fields, $table){\n global $dbname;\n global $app_dir;\n $filename = Inflect::singularize($table);\n $form_str = '@extends(\\'layouts.bulma\\')'.\"\\n\";\n $form_str .= '@section(\\'title\\', \\'creating new '.Inflect::singularize($table).'\\')'.\"\\n\";\n $form_str .= '@section(\\'sidebar\\')'.\"\\n\";\n $form_str .= '@parent'.\"\\n\";\n $form_str .= '@endsection'.\"\\n\";\n $form_str .= '@section(\\'content\\')'.\"\\n\";\n $form_str .= '<form action=\"{{ route(\\''.$table.'.create\\') }}\" class=\"form container\" method=\"POST\" enctype=\"multipart/form-data\">';\n $form_str .= \"\\n\".' <h1 class=\"title is-3\">ADD '.strtoupper(str_replace(\"_\",\" \",Inflect::singularize($table))).'</h1>'.\"\\n\";\n foreach($fields as $field){\n $req = false;\n if(strpos($field[\"Type\"], \"int\")>-1 && $field[\"Key\"]!==\"MUL\"){\n if($field[\"Null\"]===\"NO\") $req = true;\n $form_str .= \" \".self::getInputField($field[\"Field\"], \"number\", $table, $req);\n }else if($field[\"Key\"] === \"MUL\"){\n $form_str .= \" \".self::getSelectField($field[\"Field\"], $table);\n }else if(strpos($field[\"Type\"], \"varchar\")>-1){\n if($field[\"Null\"]===\"NO\") $req = true;\n $form_str .= \" \".self::getInputField($field[\"Field\"], \"text\", $table, $req);\n }else if(strpos($field[\"Type\"], \"text\")>-1){\n $form_str .= \" \".self::getTextarea($field[\"Field\"], $table);\n }\n }\n $form_str .= self::getButtonGrp();\n $form_str .= \"</form>\\n@endsection\";\n $file_dir = $app_dir.\"/resources/views/$table\";\n $views_file = $app_dir.\"/resources/views/$table/create.blade.php\";\n if(is_readable($views_file)){\n file_put_contents($views_file, $form_str);\n }else{\n exec(\"mkdir $file_dir\");\n exec(\"chmod -R 755 $app_dir./resources/views/\");\n $fp = fopen($views_file,\"w+\");\n fwrite($fp, \"file created\", 128);\n fclose($fp);\n file_put_contents($views_file, $form_str);\n }\n }", "function createApprentice() {\n\t\t\t\t\t$addForm = new h2o('views/addApprentice.html');\n\t\t\t\t\techo $addForm->render();\n\t\t\t\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "public function form()\n\t{\n\t\tglobal $L;\n\n\t\t$html = '<div class=\"mb-3\">';\n\t\t$html .= '<label class=\"form-label\" for=\"label\">' . $L->get('Label') . '</label>';\n\t\t$html .= '<input class=\"form-control\" id=\"label\" name=\"label\" type=\"text\" value=\"' . $this->getValue('label') . '\">';\n\t\t$html .= '<div class=\"form-text\">' . $L->get('This title is almost always used in the sidebar of the site') . '</div>';\n\t\t$html .= '</div>';\n\n\t\tif (defined('BLUDIT_PRO')) {\n\t\t\t$html .= '<div class=\"mb-3\">';\n\t\t\t$html .= '<label class=\"form-label\" for=\"excludeAdmins\">' . $L->get('Exclude administrators users') . '</label>';\n\t\t\t$html .= '<select class=\"form-select\" id=\"excludeAdmins\" name=\"excludeAdmins\">';\n\t\t\t$html .= '<option value=\"true\" ' . ($this->getValue('excludeAdmins') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';\n\t\t\t$html .= '<option value=\"false\" ' . ($this->getValue('excludeAdmins') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';\n\t\t\t$html .= '</select>';\n\t\t\t$html .= '</div>';\n\t\t}\n\n\t\treturn $html;\n\t}", "function makeForm($request, $formOpts){\n\t\t#print_r ($request);\n\t\t$formDescriptor = array(\n\t\t\t'radioForm' => array(\n \t\t\t\t'type' => 'radio',\n \t\t\t\t'label' => 'Select a search type:',\n \t\t\t\t'options' => array( # The options available within the checkboxes (displayed => value)\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 0' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 1' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t'Radio button label 2' => 2,\n\t\t\t\t\t\t\t\t\t\t\t),\n \t\t\t\t'default' => 0 # The option selected by default (identified by value)\n \t\t\t),\n 'textfield1' => array(\n\t\t\t\t\t\t\t\t'label' => 'textfield 1 label', # What's the label of the field\n\t\t\t\t\t\t\t\t'class' => 'HTMLTextField' # What's the input type\n\t\t\t\t\t\t\t\t),\n\t\t\t'textfield2' => array(\n\t\t\t\t\t'label' => 'textfield 2 label', # What's the label of the field\n\t\t\t\t\t'class' => 'HTMLTextField' # What's the input type\n\t\t\t\t\t), \t\t\t\t\n \t\t);\n\t\t\n\t\tswitch($formOpts){\n\t\t\tcase '1':\n\t\t\t\t$formDescriptor['textfield1']['label'] = 'textfield 1 label'; # What's the label of the field\n\t\t\t\t$formDescriptor['textfield2']['label'] = 'textfield 2 label'; # What's the label of the field\t\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\t#same as case 1\n\t\t\tdefault:\n\t\t}\n\n\t\t#Submit button structure and page callback. \n $htmlForm = new HTMLForm( $formDescriptor, $this->getContext(), 'myform'); # We build the HTMLForm object, calling the form 'myform'\n $htmlForm->setSubmitText( 'Submit button text' ); # What text does the submit button display\n\t\t\n\t\t/* We set a callback function */ \n\t\t#This code has no function to the special page. It used to produce red wiki text callback such as \"Try Again\" commented-out below under processInput function. \n\t\t$htmlForm->setSubmitCallback( array( 'specialpagetemplate', 'processInput' ) ); # Call processInput() in specialpagetemplate on submit\n $htmlForm->show(); # Displaying the form\n\t}", "protected function form()\n {\n $form = new Form(new Platform());\n\n $form->text('platform_number', __('Platform number'))\n ->creationRules(['required', 'max:30', 'unique:platforms'])\n ->updateRules(['required', 'max:30']);\n $form->text('platform_name', __('Platform name'))\n ->creationRules(['required', 'max:30', 'unique:platforms'])\n ->updateRules(['required', 'max:30']);\n\n $form->footer(function ($footer){\n $footer->disableEditingCheck();\n });\n\n return $form;\n }", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "public function outputSetupForm() {\n\t\t$this->_directFormHtml( 'webinarjamstudio' );\n\t}", "protected function form()\n {\n $form = new Form(new Terrace());\n\n $form->image('image', __('平台图片'))->rules('required', ['required' => '平台图片不能为空']);\n $form->text('name', __('平台名称'))->rules('required', ['required' => '平台名称不能为空']);\n $form->text('path', __('外链'))->rules('required', ['required' => '平台外链不能为空']);\n $form->text('notice_info', __('提示语'))->rules('required', ['required' => '平台提示语不能为空']);\n $form->radio('status','状态')->options(['1' => '未推荐', '2'=> '已推荐'])->default(1);\n\n return $form;\n }", "public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }", "public function createForm()\n {\n }", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "public function buildForm() {\n\t\techo \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>$this->title</title>\n\t\t</head>\n\t\t<body>\n\t\t<form method=\\\"$this->method\\\">\";\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\techo \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\techo \" required\";\n\t\t\t}\n\n\t\t\techo \"><br></form>\";\n\t\t}\n\t}", "protected function createComponentEditForm() {\r\n\t\t$form = new Form;\r\n\t\t$form->getElementPrototype()->class(\"formWide\");\r\n\t\t$options = array(0 => \"Default\", 1 => \"Odkaz na obsah\", 3 => \"Odkaz na položku menu\");\r\n\t\t// easy way how to create url slug\r\n\t\t$form->addText(\"title\", \"Název:\")\r\n\t\t\t\t->setAttribute('onchange', '\r\n\t\t\t\t\t\t\tvar nodiac = { \"á\": \"a\", \"č\": \"c\", \"ď\": \"d\", \"é\": \"e\", \"ě\": \"e\", \"í\": \"i\", \"ň\": \"n\", \"ó\": \"o\", \"ř\": \"r\", \"š\": \"s\", \"ť\": \"t\", \"ú\": \"u\", \"ů\": \"u\", \"ý\": \"y\", \"ž\": \"z\" };\r\n\t\t\t\t\t\t\ts = $(\"#frmeditForm-title\").val().toLowerCase();\r\n\t\t\t\t\t\t\tvar s2 = \"\";\r\n\t\t\t\t\t\t\tfor (var i=0; i < s.length; i++) {\r\n\t\t\t\t\t\t\t\ts2 += (typeof nodiac[s.charAt(i)] != \"undefined\" ? nodiac[s.charAt(i)] : s.charAt(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresult=s2.replace(/[^a-z0-9_]+/g, \"-\").replace(/^-|-$/g, \"\");\r\n\t\t\t\t\t\t\t$(\"#frmeditForm-url\").val(result);\r\n\t\t\t\t\t\t');\r\n\t\t$form->addText(\"url\", \"url:\")->setAttribute(\"readonly\", \"readonly\");\r\n\t\tif (!$this->onlyTree) {\r\n\t\t\t$form->addSelect(\"target_type\", \"Cíl:\", $options);\r\n\t\t\t$content = $this->prepareContentSelectBox();\r\n\t\t\t$menuContent = $this->prepareMenuContentSelectBox();\r\n\t\t\t$form->addSelect(\"target_id\", \"Odkazovaný obsah:\", $content)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t\t$form->addSelect(\"target_menu\", \"Odk. položka menu:\", $menuContent)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t}\r\n\t\t$form->addHidden(\"parent_id\", $this->parent_id);\r\n\t\t$form->addHidden(\"edit_id\", $this->edit_id);\r\n\t\t//filling form\r\n\t\tif ($this->edit_id or $this->edit_id === \"0\") {\r\n\t\t\t$defFromDb = $this->closureModel->getItemById($this->edit_id);\r\n\t\t\t$defaults = new \\Nette\\ArrayHash;\r\n\t\t\tforeach ($defFromDb as $key => $value) {\r\n\t\t\t\t$defaults->$key = $value;\r\n\t\t\t}\r\n\t\t\tif ($this->edit_id === \"0\") {\r\n\t\t\t\t$form[\"title\"]->setDisabled();\r\n\t\t\t}\r\n\t\t\tif (!$this->onlyTree) {\r\n\t\t\t\t$t = $defaults->target;\r\n\t\t\t\tif (!Validators::isNumericInt($t)) {\r\n\t\t\t\t\t$menuItem = $this->checkTargetMenuItemExists($t);\r\n\t\t\t\t\tif ($menuItem) {\r\n\t\t\t\t\t\t$defaults->target_type = 3;\r\n\t\t\t\t\t\t$defaults->target_menu = $menuItem;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$contentId = $this->checkTargetContentExists($t);\r\n\t\t\t\t\t\t$defaults->target_type = 1;\r\n\t\t\t\t\t\t$defaults->target_id = $contentId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t} elseif ($t <= 0) {\r\n\t\t\t\t\t$defaults->target_type = 0;\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t\t$form[\"target_id\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$defaults->target = null;\r\n\t\t\t$form->setDefaults($defaults);\r\n\t\t}\r\n\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t\t\t->setAttribute('onclick', '$(\"#frmeditForm-title\").trigger(\"change\")')\r\n\t\t\t\t->onClick[] = callback($this, 'editFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "abstract function setupform();", "public function criarHtml()\n {\n ;\n $form = \"\n <div class='row'>\n <div class='col-md-12 col-sm-12 col-xs-12'>\n <div class='x_panel'>\n <div class='x_content'>\n<form id='form' class='form-horizontal form-label-left' data-parsley-validate enctype='multipart/form-data' method='POST' >\n \" . $this->conteudo . \"\n <div class='ln_solid'></div>\n <div class='form-group'>\n <div class='col-md-3 col-sm-3 col-xs-12 col-md-offset-9'>\n <button class='btn btn-primary' type='submit'>Cancel</button>\n <a class='btn btn-success' onclick='$this->action'>Salvar</a>\n </div>\n </div>\n</form>\n</div>\n</div>\n</div>\n</div>\n\";\n return $form;\n }", "private function buildGitHubWForm(&$form) {\n $git_settings = $this->configFactory->get('simple_git.settings');\n\n $form['git_hub'] = [\n '#type' => 'fieldset',\n '#title' => $this->t('GitHub Web settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n ];\n\n $form['git_hub']['git_hub_app_id'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub App Web Id'),\n '#description' => $this->t('GitHub App Web Id value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_id'],\n ];\n\n $form['git_hub']['git_hub_app_secret'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub App Web Secret'),\n '#description' => $this->t('GitHub App Web Secret value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_secret'],\n ];\n\n $form['git_hub']['git_hub_app_url_redirect'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub URL Web Redirect'),\n '#description' => $this->t('GitHub URL Web Redirect value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_url_redirect'],\n ];\n\n $form['git_hub']['git_hub_app_name'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub App Web Name'),\n '#description' => $this->t('GitHub App Web Name'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_name'],\n ];\n\n }", "function renderForm()\t{\n\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('settings'), 'divider', '');\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('spaceTitle'), 'text', 'title');\n\t\n\t\tif(count($this->error) > 0) {\n\t\t\t$form .= \"<span style='display:block;color:red;font-weight:bold;padding:10px;'>\" .\n\t\t\t\t\t\t\t implode(\"<br />\", $this->error) . \n\t\t\t\t\t \"</span>\";\t\n\t\t}\n\n\t\t$form .= \"<form action=\" . t3lib_div::getThisUrl() . \"><table border='0' cellpadding='7'>\";\n\t\t$form .= implode(\"\\n\", $fields);\n\t\t$form .= \"<tr><td colspan='2' align='right'>\" .\n\t\t\t\t \"<input type='hidden' name='formPosted' value='1'>\" . \n\t\t\t\t \"<input type='submit' value='\" . $GLOBALS['LANG']->getLL('createSpace') . \"'></td></tr></table></form>\";\n\n\t\treturn $form;\n\t}", "public function xadmin_createform() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$form_title = $args [1];\n\t\t$form_type = @$args [2] ? $args [2] : 'blank';\n\t\t\n\t\t/* Load Model */\n\t\t$form = $this->getModel ( 'form' );\n\t\t$this->session->returnto ( 'forms' );\n\t\t\n\t\t/* create the form */\n\t\t$form->createNewForm ( $form_title, $form_type );\n\t\t\n\t\t$this->loadPluginModel ( 'forms' );\n\t\t$plug = Plugins_Forms::getInstance ();\n\t\t\n\t\t$plug->_pluginList [$form_type]->onAfterCreateForm ( $form );\n\t\t\n\t\t/* set the view file (optional) */\n\t\t$this->_redirect ( 'xforms' );\n\t\n\t}", "function html_form_code() {\n $form = \"\";\n $form.=\"<form action='\" . esc_url($_SERVER['REQUEST_URI']) . \"' method='post'>\";\n $form.=\"<input type='text' name='ms-name' value='\" . ( isset($_POST[\"ms-name\"]) ? esc_attr($_POST[\"ms-name\"]) : '' ) . \"' placeholder='Ваше Имя'/>\";\n $form.=\"<input type='email' name='ms-email' value='\" . ( isset($_POST[\"ms-email\"]) ? esc_attr($_POST[\"ms-email\"]) : '' ) . \"' placeholder='Ваш E-mail'/>\";\n $form.=\"<input name='ms-submit' type='submit' id='add-share-btn' value='Получить доступ'/>\";\n $form.=\"</form>\";\n echo $form;\n}", "public function Form()\n {\n include(CONFIG\\PATH\\FORMS . 'Account_Create.php');\n }", "abstract protected function _setNewForm();", "function minorite_form($variables) {\n $element = $variables['element'];\n if (isset($element['#action'])) {\n $element['#attributes']['action'] = drupal_strip_dangerous_protocols($element['#action']);\n }\n element_set_attributes($element, array('method', 'id'));\n if (empty($element['#attributes']['accept-charset'])) {\n $element['#attributes']['accept-charset'] = \"UTF-8\";\n }\n return '<form' . drupal_attributes($element['#attributes']) . '>' . $element['#children'] . '</form>';\n}", "function createUploadTemplateForm($extra=false, $title='UploadTemplate.py Launcher', $heading='Upload a template') {\n\t$expId=$_GET['expId'];\n\n\t$projectId=getProjectId();\n\t$formAction=$_SERVER['PHP_SELF'].\"?expId=$expId\";\n\n\t$templateIds=$_GET['templateIds'];\n\t$alignId=$_GET['alignId'];\n\t$clusterId=$_GET['clusterId'];\n\t$stackId=$_GET['stackId'];\n\t$avg=$_GET['avg'];\n\n\t// save other params to url formaction\n\t$formAction.=($stackId) ? \"&stackId=$stackId\" : \"\";\n\t$formAction.=($clusterId) ? \"&clusterId=$clusterId\" : \"\";\n\t$formAction.=($alignId) ? \"&alignId=$alignId\" : \"\";\n\t$formAction.=($avg) ? \"&avg=True\" : \"\";\n\t$formAction.=($templateIds!=\"\") ? \"&templateIds=$templateIds\" : \"\";\n\n\t// Set any existing parameters in form\n\t$apix = ($_POST['apix']) ? $_POST['apix'] : '';\n\t$diam = ($_POST['diam']) ? $_POST['diam'] : '';\n\t$template = ($_POST['template']) ? $_POST['template'] : '';\n\t$description = $_POST['description'];\n\tif ($templateIds==\"\") $templateIds = $_POST['templateIds'];\n\tif (!$stackId) $stackId = $_POST['stackId'];\n\t$commitcheck = ($_POST['commit']=='on' || !$_POST['process']) ? 'checked' : '';\n\n\t$javafunctions=\"\n\t<script src='../js/viewer.js'></script>\n\t<script LANGUAGE='JavaScript'>\n\t\tfunction infopopup(infoname){\n\t\t\tvar newwindow=window.open('','name','height=250,width=400');\n\t\t\tnewwindow.document.write('<HTML><BODY>');\n\t\t\tif (infoname=='classpath'){\n\t\t\t\tnewwindow.document.write('This is the path of the class average or stack used for extracting the MRC file. Leave this blank if the template file specified by template path above already exist');\n\t\t\t}\n\t\t\tnewwindow.document.write('</BODY></HTML>');\n\t\t\tnewwindow.document.close();\n\t\t}\n\n\t</SCRIPT>\\n\";\n\n\tprocessing_header($title,$heading,$javafunctions);\n\t// write out errors, if any came up:\n\tif ($extra) {\n\t\techo \"<font color='#cc3333' size='+2'>$extra</font>\\n<hr/>\\n\";\n\t}\n \n\techo\"<FORM NAME='viewerform' method='POST' ACTION='$formAction'>\\n\";\n\n\t$sessiondata=getSessionList($projectId,$expId);\n\t$sessioninfo=$sessiondata['info'];\n\n\t// get path for submission\n\t$outdir=getBaseAppionPath($sessioninfo).'/templates';\n\n\t$outdir = ($_POST['outdir']) ? $_POST['outdir'] : $outdir;\n\n\tif (!empty($sessioninfo)) {\n\t\t$sessionname=$sessioninfo['Name'];\n\t\techo \"<input type='hidden' name='sessionname' VALUE='$sessionname'>\\n\";\n\t\techo \"<input type='hidden' name='outdir' value='$outdir'>\\n\";\n\t}\n\t\n\techo\"<INPUT TYPE='hidden' NAME='projectId' VALUE='$projectId'>\\n\";\n\t\n\t//query the database for parameters\n\t$particle = new particledata();\n\n\techo\"<table border='3' class='tableborder'>\";\n\techo\"<tr><td valign='top'>\\n\";\n\techo\"<table border='0' cellpading='5' cellspacing='5'><tr><td valign='top'>\\n\";\n\n\t//if neither a refId or stackId exist\n\tif (!$stackId && !$alignId && !$clusterId) {\n\t\techo \"<br>\\n\";\n\t\techo \"Template Name with path <i>(mrc-file-format wild cards are acceptable)</i>: <br> \\n\";\n\t\techo \"<INPUT TYPE='text' NAME='template' VALUE='$template' SIZE='55'/>\\n\";\n\t\techo \"<br>\\n\";\t\t\t\n\t} \n\n\tif ($stackId) {\n\t\techo openRoundBorder();\n\t\techo ministacksummarytable($stackId);\n\t echo \"<input type='hidden' name='stackId' value='$stackId'>\\n\";\n\t\techo closeRoundBorder();\n\t\techo \"<br/>\\n\";\n\t} elseif($alignId) {\n\t\techo openRoundBorder();\n\t\techo alignstacksummarytable($alignId, true);\n\t echo \"<input type='hidden' name='alignId' value='$alignId'>\\n\";\n\t\techo closeRoundBorder();\n\t\techo \"<br/>\\n\";\n\t} elseif($clusterId) {\n\t\techo openRoundBorder();\n\t\techo \"Cluster Id: $clusterId\\n\";\n\t echo \"<input type='hidden' name='clusterId' value='$clusterId'>\\n\";\n\t\techo closeRoundBorder();\n\t\techo \"<br/>\\n\";\n\t}\n\n\tif ($avg) {\n\t\techo \"<input type='hidden' name='avgstack' value='avg'>\\n\";\n\t \techo\"<font size='+1'><i>Stack images will be averaged to create a template</i></font>\\n\";\n\t\techo \"<br/>\\n\";\n\t} elseif ($templateIds!=\"\") {\n\t\techo\"<font size='+1'>Selected Image Numbers: <i>$templateIds</i></font>\\n\";\n\t\techo \"<input type='hidden' name='templateIds' value='$templateIds'>\\n\";\n\t\techo \"<br/>\\n\";\n\t}\n\n\techo \"<br>\\n\";\n\techo \"Output directory:<br> \\n\";\n\techo \"<input type='text' name='outdir' value='$outdir' size='55'>\\n\";\n\techo \"<br>\\n\";\n\n\techo \"<br>\\n\";\n\techo \"Template Description:<br>\";\n\techo \"<TEXTAREA NAME='description' ROWS='3' COLS='70'>$description</TEXTAREA>\";\n\n\techo \"</TD></tr><TR><TD VALIGN='TOP'>\";\n\n\techo \"Particle Diameter:<br>\\n\"\n\t\t\t.\"<INPUT TYPE='text' NAME='diam' SIZE='5' VALUE='$diam'>\\n\"\n\t\t\t.\"<FONT SIZE='-2'>(in &Aring;ngstroms)</FONT>\\n\";\n\t\techo \"<br/>\\n\";\n\n\tif (!$stackId && !$alignId && !$clusterId) {\n\t\techo \"Pixel Size:<br>\\n\"\n\t\t\t.\"<INPUT TYPE='text' NAME='apix' SIZE='5' VALUE='$apix'>\\n\"\n\t\t\t.\"<FONT SIZE='-2'>(in &Aring;ngstroms per pixel)</FONT>\\n\";\n\t\techo \"<br/>\\n\";\n\t}\n\techo \"<br/>\\n\";\n\n\techo \"<INPUT TYPE='checkbox' NAME='commit' $commitcheck>\\n\";\n\techo docpop('commit','<B>Commit to Database</B>');\n\techo \"\";\n\techo \"<br/>\\n\";\n\n\n\techo \"<br/>\\n\";\n\techo \"</td></tr></table></td></tr><tr><td align='center'><hr/>\";\n\techo getSubmitForm(\"Upload Template\");\n\techo \"</td></tr></table></form>\\n\";\n\n\techo appionRef();\n\n\tprocessing_footer();\n\texit;\n}", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "abstract function builder_form(): string;", "private function _displayForm(){\n\t $moneda = Tools::getValue('moneda', $this->moneda);\n\t $iseuro = ($moneda == '978') ? ' selected=\"selected\" ' : '';\n\t $isdollar = ($moneda == '840') ? ' selected=\"selected\" ' : '';\n \t // Opciones para activar/desactivar SSL\n\t $ssl = Tools::getValue('ssl', $this->ssl);\n\t $ssl_si = ($ssl == 'si') ? ' checked=\"checked\" ' : '';\n\t $ssl_no = ($ssl == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para el comportamiento en error en el pago\n\t $error_pago = Tools::getValue('error_pago', $this->error_pago);\n\t $error_pago_si = ($error_pago == 'si') ? ' checked=\"checked\" ' : '';\n\t $error_pago_no = ($error_pago == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para activar los idiomas\n\t $idiomas_estado = Tools::getValue('idiomas_estado', $this->idiomas_estado);\n\t $idiomas_estado_si = ($idiomas_estado == 'si') ? ' checked=\"checked\" ' : '';\n\t $idiomas_estado_no = ($idiomas_estado == 'no') ? ' checked=\"checked\" ' : '';\n\t \n\t \n\t // Mostar formulario\n\t\t$this->_html .=\n\t\t'<form action=\"'.$_SERVER['REQUEST_URI'].'\" method=\"post\">\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/admin/contact.gif\" />'.$this->l('Configuraci&oacute;n del TPV').'</legend>\n\t\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t\t\t\t<tr><td colspan=\"2\">'.$this->l('Por favor completa la informaci&oacute;n requerida que te proporcionar&aacute; tu banco Servired.').'.<br /><br /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('URL de llamada del entorno').'</td><td><input type=\"text\" name=\"urltpv\" value=\"'.Tools::getValue('urltpv', $this->urltpv).'\" style=\"width: 330px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Clave secreta de encriptaci&oacute;n').'</td><td><input type=\"password\" name=\"clave\" value=\"'.Tools::getValue('clave', $this->clave).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Nombre del comercio').'</td><td><input type=\"text\" name=\"nombre\" value=\"'.htmlentities(Tools::getValue('nombre', $this->nombre), ENT_COMPAT, 'UTF-8').'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de comercio (FUC)').'</td><td><input type=\"text\" name=\"codigo\" value=\"'.Tools::getValue('codigo', $this->codigo).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de terminal').'</td><td><input type=\"text\" name=\"terminal\" value=\"'.Tools::getValue('terminal', $this->terminal).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de moneda').'</td><td>\n\t\t\t\t\t<select name=\"moneda\" style=\"width: 80px;\"><option value=\"\"></option><option value=\"978\"'.$iseuro.'>EURO</option><option value=\"840\"'.$isdollar.'>DOLLAR</option></select></td></tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de transacci&oacute;n').'</td><td><input type=\"text\" name=\"trans\" value=\"'.Tools::getValue('trans', $this->trans).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t\n\t\t\t\t</table>\n\t\t\t</fieldset>\n\t\t\t<br>\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/t/9.gif\" />'.$this->l('Personalizaci&oacute;n').'</legend>\n\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t<tr>\n\t\t\t<td colspan=\"2\">'.$this->l('Por favor completa los datos adicionales.').'.<br /><br /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('SSL en URL de validaci&oacute;n').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_1\" value=\"si\" '.$ssl_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_0\" value=\"no\" '.$ssl_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('En caso de error, permitir elegir otro medio de pago').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_1\" value=\"si\" '.$error_pago_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_0\" value=\"no\" '.$error_pago_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('Activar los idiomas en el TPV').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_si\" value=\"si\" '.$idiomas_estado_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_no\" value=\"no\" '.$idiomas_estado_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t\t</fieldset>\t\n\t\t\t<br>\n\t\t<input class=\"button\" name=\"btnSubmit\" value=\"'.$this->l('Guardar configuraci&oacute;n').'\" type=\"submit\" />\n\t\t\t\t\t\n\t\t\t\n\t\t</form>';\n\t}", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "public function form()\n {\n $this->switch('footer_remove', Support::trans('main.footer_remove'))\n ->default(admin_setting('footer_remove'));\n $defaultColors = [\n 'default' => '墨蓝',\n 'blue' => '蓝',\n 'blue-light' => '亮蓝',\n 'green' => '墨绿',\n ];\n foreach (explode(\",\", ServiceProvider::setting('additional_theme_colors')) as $value) {\n if (!empty($value)) {\n [$k, $v] = explode(\":\", $value);\n $defaultColors[$k] = $v;\n }\n }\n\n $this->radio('theme_color', Support::trans('main.theme_color'))\n ->options($defaultColors)\n ->default(admin_setting('theme_color'));\n $this->radio('sidebar_style', Support::trans('main.sidebar_style'))\n ->options([\n 'default' => '默认',\n 'sidebar-separate' => '菜单分离',\n 'horizontal_menu' => '水平菜单'\n ])\n ->default(admin_setting('sidebar_style'));\n $this->switch('grid_row_actions_right', Support::trans('main.grid_row_actions_right'))\n ->help('启用后表格行操作按钮将永远贴着最右侧。')\n ->default(admin_setting('grid_row_actions_right'));\n }", "public function form()\r\n\t{\r\n\t?>\r\n\t\t<table class=\"form-table\">\r\n\t\t\t<tbody>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th scope=\"row\">\r\n\t\t\t\t\t\t<?php _e( 'Lorsqu\\'une nouvelle contribution est publiée', 'tify' );?>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t<?php \r\n\t\t\t\t\t\ttify_control_switch( \r\n\t\t\t\t\t\t\tarray( \r\n\t\t\t\t\t\t\t\t'name' \t\t=> 'tify_forum_options[mailing][contribs_notify]', \r\n\t\t\t\t\t\t\t\t'checked' \t=> (int) \\tiFy\\Plugins\\Forum\\Options::get( 'mailing::contribs_notify' ),\r\n\t\t\t\t\t\t\t\t'value_on'\t=> 1,\r\n\t\t\t\t\t\t\t\t'value_off'\t=> 0\r\n\t\t\t\t\t\t\t) \r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t?>\t\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th scope=\"row\">\r\n\t\t\t\t\t\t<?php _e( 'Lorsqu\\'une contribution est en attente de modération', 'tify' );?>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t<?php \r\n\t\t\t\t\t\ttify_control_switch( \r\n\t\t\t\t\t\t\tarray( \r\n\t\t\t\t\t\t\t\t'name' \t\t=> 'tify_forum_options[mailing][moderation_notify]', \r\n\t\t\t\t\t\t\t\t'checked' \t=> (int) \\tiFy\\Plugins\\Forum\\Options::get( 'mailing::moderation_notify' ),\r\n\t\t\t\t\t\t\t\t'value_on'\t=> 1,\r\n\t\t\t\t\t\t\t\t'value_off'\t=> 0\r\n\t\t\t\t\t\t\t) \r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t?>\t\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</tbody>\r\n\t\t</table>\r\n\t<?php\t\t\r\n\t}", "function zen_draw_form($name, $action, $method = 'post', $parameters = '') {\n $form = '<form name=\"' . zen_output_string($name) . '\" action=\"' . zen_output_string($action) . '\" method=\"' . zen_output_string($method) . '\"';\n\n if (zen_not_null($parameters)) $form .= ' ' . $parameters;\n\n $form .= '>';\n if (strtolower($method) == 'post') $form .= '<input type=\"hidden\" name=\"securityToken\" value=\"' . $_SESSION['securityToken'] . '\" />';\n return $form;\n }", "function createCompany() {\n\t\t\t\t\t$addForm = new h2o('views/addCompany.html');\n\t\t\t\t\techo $addForm->render();\n\t\t\t\t}", "protected function form()\n {\n return Form::make(new Liuchengku(), function (Form $form) {\n\t\t\t$form->display('id');\n\t\t\t$form->text('brand','品牌名称')->required();\n\t\t\t$form->tab('加盟流程', function (Form $form) {\n\t\t\t\t $form->textarea('jmlc','加盟流程')->rows(12);\n\t\t\t\t /* $form->editor('jmlc','加盟流程')->options([\n\t\t\t\t\t//'toolbar' => ['undo redo | styleselect | bold italic | link image',],\n\t\t\t\t\t'toolbar' => [],\n\t\t\t\t]); */\n\t\t\t\t})->tab('加盟支持', function (Form $form) {\n\t\t\t\t $form->editor('jmzc','加盟支持');\n\t\t\t\t})->tab('加盟优势', function (Form $form) {\n\t\t\t\t $form->editor('jmys','加盟优势');\n\t\t\t\t});\n //$form->text('type');\n //$form->text('retype');\n\t\t\t//$form->text('is_make');\n\t\t\t//$form->text('user_id');\n $form->hidden('user_id');\n\t\t\t$form->hidden('is_make');\n\t\t\t$form->display('created_at');\n $form->display('updated_at');\n $form->saving(function (Form $form) {\n if ($form->isCreating()) {\n $form->user_id=Admin::user()->id;\n\t\t\t\t\t$form->is_make=1;\n\t\t\t\t\t}\n });\n });\n }", "public function gluu_sso_form()\n {\n // add taskbar button\n\n $boxTitle = html::div(array('id' => \"prefs-title\", 'class' => 'boxtitle'), $this->gettext('hederGluu'));\n $this->include_stylesheet('GluuOxd_Openid/css/gluu-oxd-css.css');\n $this->include_script('GluuOxd_Openid/js/scope-custom-script.js');\n\n $tableHtml=$this->admin_html();\n unset($_SESSION['message_error']);\n unset($_SESSION['message_success']);\n return html::div(array('class' => ''),$boxTitle . html::div(array('class' => \"boxcontent\"), $tableHtml ));\n }", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->select('company_id', '公司名称')->options(Company::getSelectOptions());\n $form->text('project_name', '项目名称');\n $form->image('project_photo', '项目图片')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->url('link_url', '项目链接');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }", "function create() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->createElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "public function output_setup_form() {\n\t\t$this->output_controls_html( 'klicktipp' );\n\t}", "public function makeOutput()\n\t{\n\t\t$formId = $this->name;\n\t\t$enctype = 'application/x-www-form-urlencoded';\n\n\t\t$formHtml = new HtmlObject('form');\n\t\t$formHtml->property('method', $this->form->getMethod())->\n\t\t\t\t\tproperty('id', $formId)->\n\t\t\t\t\tproperty('action', $this->form->getAction());\n\n\t\t$jsStartup = array();\n\n\t\tforeach($this->inputs as $inputs) {\n\t\t\tforeach($inputs as $input) {\n\t\t\t\tif(($input->type == 'checkbox' || $input->type == 'radio') && isset($input->properties['value'])) {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name . '_' . $input->properties['value'];\n\t\t\t\t} else {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name;\n\t\t\t\t}\n\t\t\t\t$input->property('id', $inputId);\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->inputs as $section => $inputs)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('fieldset');\n\t\t\t$sectionHtml->property('id', $formId . \"_section_\" . $section);\n\n\t\t\tif(isset($this->sectionClasses[$section])) {\n\t\t\t\tforeach($this->sectionClasses[$section] as $class) {\n\t\t\t\t\t$sectionHtml->addClass($class);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->sectionClasses[$section] = array();\n\t\t\t}\n\n\t\t\tif(!in_array('mf-toggle-hide', $this->sectionClasses[$section]) && \n\t\t\t !in_array('mf-toggle-none', $this->sectionClasses[$section])) {\n\t\t\t\t$sectionHtml->addClass('mf-toggle-show');\n\t\t\t}\n\n\n\t\t\tif(isset($this->sectionLegends[$section]))\n\t\t\t\t$sectionHtml->insertNewHtmlObject('legend')->\n\t\t\t\t\twrapAround($this->sectionLegends[$section]);\n\n\t\t\t$sectionDiv = new HtmlObject('div');\n\t\t\t$sectionDiv->addClass('fieldset_contents')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_contents');\n\n\t\t\tif(isset($this->sectionIntro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionIntro[$section])->\n\t\t\t\t\taddClass('fieldset_intro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_intro');\n\n\t\t\t$sectionHtml->wrapAround($sectionDiv);\n\n\t\t\t$hasInputs = false;\n\n\t\t\t$controlsDiv = new HtmlObject('div');\n\t\t\t$controlsDiv->addClass('fieldset_controls')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_controls');\n\n\t\t\t$sectionDiv->wrapAround($controlsDiv);\n\n\t\t\tforeach($inputs as $input)\n\t\t\t{\n\t\t\t\t$inputId = $input->property('id');\n\n\t\t\t\tif($input->type === 'submit' && !$this->includeSubmit)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif($input->type === 'richtext') {\n\t\t\t\t\t$input->property($this->form->getMarkup(), 'true');\n\t\t\t\t\t$input->type = 'textarea';\n\t\t\t\t\t$input->addClass('fulltext');\n\t\t\t\t}\n\n\t\t\t\t$plugins = new Hook();\n\t\t\t\t$plugins->enforceInterface('FormToHtmlHook');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', 'Base');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', $input->type);\n\t\t\t\t$plugins->setInput($input);\n\n\t\t\t\t$jsStartup = array_merge_recursive($jsStartup,\n\t\t\t\t\t\t\t\tHook::mergeResults($plugins->getCustomJavaScript()));\n\n\t\t\t\tif(in_array(true, Hook::mergeResults($plugins->overrideHtml())))\n\t\t\t\t{\n\t\t\t\t\t$plugins->createOverriddingHtml($sectionHtml);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\tif($inputStartupJs = $this->getInputJavascript($input))\n\t\t\t\t\t$jsStartup = array_merge_recursive($jsStartup, $inputStartupJs);\n\n\t\t\t\t$inputHtml = $this->getInputHtmlByType($input);\n\t\t\t\t$plugins->setCustomHtml($inputHtml);\n\n\t\t\t\tif($inputOptions = $this->getInputMetaData($input) ) //count($inputOptions > 0))\n\t\t\t\t{\n\t\t\t\t\t$metaDataClass = json_encode($inputOptions);\n\t\t\t\t\t$inputHtml->addClass($metaDataClass);\n\t\t\t\t}\n\n\t\t\t\tif($input->type == 'file')\n\t\t\t\t\t$enctype = 'multipart/form-data';\n\n\t\t\t\tif($input->type == 'hidden') {\n\t\t\t\t\t$inputHtml->close(false);\n\t\t\t\t\t$formHtml->wrapAround($inputHtml);\n\t\t\t\t} else {\n\t\t\t\t\t$inputHtml->wrapAround($input->property('contents'));\n\n\t\t\t\t\t$labelHtml = new HtmlObject('label');\n\n\t\t\t\t\t$labelHtml->property('for', $inputId)->\n\t\t\t\t\t\tproperty('id', $inputId . '_label');\n\n\t\t\t\t\tif(isset($input->pretext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->pretext);\n\n\t\t\t\t\tif(isset($input->label))\n\t\t\t\t\t{\n\t\t\t\t\t\t$labelHtml->wrapAround($input->label);\n\t\t\t\t\t\tif(isset($input->description))\n\t\t\t\t\t\t\t$labelHtml->property('title', $input->description);\n\t\t\t\t\t}\n\n\t\t\t\t\tif($input->type == 'radio' || $input->type == 'checkbox')\n\t\t\t\t\t\t$inputHtml->addClass('small_input');\n\n\t\t\t\t\tif(isset($input->labelAfter) && $input->labelAfter) {\n\t\t\t\t\t\t$labelHtml->addClass('label_after');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_after');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($inputHtml)->\n\t\t\t\t\t\t\twrapAround($labelHtml);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$labelHtml->addClass('label_before');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_before');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($labelHtml)->\n\t\t\t\t\t\t\twrapAround($inputHtml);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($this->errors[$input->name])) {\n\t\t\t\t\t\t$errorLabel = new HtmlObject('label');\n\t\t\t\t\t\t$errorLabel->addClass('error')->\n\t\t\t\t\t\t\tproperty('for', $inputId)->\n\t\t\t\t\t\t\tproperty('generated', true);\n\t\t\t\t\t\t$errorVal = '';\n\n\t\t\t\t\t\tforeach($this->errors[$input->name] as $error)\n\t\t\t\t\t\t\t$errorVal .= $error . ' ';\n\n\t\t\t\t\t\t$errorLabel->wrapAround(trim($errorVal));\n\t\t\t\t\t\t$controlsDiv->wrapAround($errorLabel);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($input->posttext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->posttext);\n\n\t\t\t\t\tif(!isset($input->noBreak) || $input->noBreak === false)\n\t\t\t\t\t\t$controlsDiv->insertNewHtmlObject('br');\n\n\t\t\t\t\t$hasInputs = true;\n\t\t\t\t}\n\t\t\t}//foreach($this->inputs as $section => $inputs)\n\n\t\t\tif(isset($this->sectionOutro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionOutro[$section])->\n\t\t\t\t\taddClass('fieldset_outro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_outro');\n\n\t\t\tif($hasInputs)\n\t\t\t\t$formHtml->wrapAround($sectionHtml);\n\n\t\t\t$formHtml->property('enctype', $enctype);\n\t\t}\n\n\t\tif(!$this->submitButton && $this->includeSubmit)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('div');\n\t\t\t$sectionHtml->property('id', $this->name . \"_section_\" . 'control');\n\t\t\t$inputHtml = new HtmlObject('input');\n\t\t\t$inputHtml->name = $input->name;\n\t\t\t$inputHtml->property('name', 'Submit')->property('type', 'Submit')->property('value', 'Submit');\n\n\t\t\t$labelHtml = new HtmlObject('label');\n\t\t\t$sectionHtml->wrapAround($labelHtml)->wrapAround($inputHtml)->wrapAround('<br>');\n\t\t\t$formHtml->wrapAround($sectionHtml);\n\t\t}\n\n\t\t$formHtml = (string) $formHtml;\n\n\t\t$output = $this->fullForm\n\t\t\t? (string) $formHtml\n\t\t\t: (string) $sectionHtml;\n\n\t\t$formJsOptions = array();\n\t\t$formJsOptions['validateOnLoad'] = $this->form->wasSubmitted();\n\t\t$jsStartup[] = '$(\"#' . $this->name . '\").MortarForm(' . json_encode($formJsOptions) . ');';\n\n\t\tif(class_exists('ActivePage', false))\n\t\t{\n\t\t\t$page = ActivePage::getInstance();\n\t\t\t$page->addStartupScript($jsStartup);\n\t\t}\n\t\treturn $output;\n\t}", "public function new_form(){\n $this->vars['page_header'] = __('Create New Service', 'latepoint');\n $this->vars['breadcrumbs'][] = array('label' => __('Create New Service', 'latepoint'), 'link' => false );\n\n $this->vars['category'] = new OsServiceCategoryModel();\n\n if($this->get_return_format() == 'json'){\n $response_html = $this->render($this->views_folder.'new_form', 'none');\n echo wp_send_json(array('status' => 'success', 'message' => $response_html));\n exit();\n }else{\n echo $this->render($this->views_folder . 'new_form', $this->get_layout());\n }\n }", "function createForm($extra=false, $title='PDB to EM', $heading='PDB to EM Density') {\n\t$expId=$_GET['expId'];\n\n\t$projectId=getProjectId();\n\t$formAction=$_SERVER['PHP_SELF'].\"?expId=$expId\";\n \n\t$javafunctions = writeJavaPopupFunctions('appion');\n\t$particle = new particledata();\n\n\tprocessing_header($title,$heading,$javafunctions,True);\n\t// write out errors, if any came up:\n\tif ($extra) {\n\t\techo \"<font color='#cc3333' size='+2'>$extra</font>\\n<hr/>\\n\";\n\t}\n \n\techo\"<FORM NAME='viewerform' method='POST' ACTION='$formAction'>\\n\";\n\t$sessiondata=getSessionList($projectId,$expId);\n\t$sessioninfo=$sessiondata['info'];\n\t\n\tif (!empty($sessioninfo)) {\n\t\t$outdir=getBaseAppionPath($sessioninfo).'/models';\n\t\t$outdir=$outdir.\"/pdb\";\n\t\t$sessionname=$sessioninfo['Name'];\n\t\techo \"<input type='hidden' name='sessionname' value='$sessionname'>\\n\";\n\t\techo \"<input type='hidden' name='outdir' value='$outdir'>\\n\";\n\t}\n \n\t// Set any existing parameters in form\n\t$lowpass = ($_POST['lowpass']) ? $_POST['lowpass'] : '';\n\t$symm = ($_POST['symm']) ? $_POST['symm'] : '';\n\t$runtime = ($_POST['runtime']) ? $_POST['runtime'] : getTimestring();\n\t$apix = ($_POST['apix']) ? $_POST['apix'] : '';\n\t$pdbid = ($_POST['pdbid']) ? $_POST['pdbid'] : '';\n\t$box = ($_POST['box']) ? $_POST['box'] : '';\n\t$bunitcheck = ($_POST['bunit'] == 'on') ? 'checked' : '';\n\n\techo \"<table class=tablebubble cellspacing='8'>\";\n\n\techo \"<tr><td valign='top'>\\n\";\n\n\techo docpop('pdbid', '<b>PDB ID:</b>');\n\techo \"<input type='text' name='pdbid' value='$pdbid' size='5'><br />\\n\";\n\techo \"<input type='hidden' name='runtime' value='$runtime'>\\n\";\n\n\techo \"</td></tr>\\n\";\n\techo \"<tr><td valign='top'>\\n\";\n\n\techo \"<input type='checkbox' name='bunit' $bunitcheck>\\n\";\n\techo \"Use the \";\n\techo docpop('biolunit', \"biological unit\");\n\n\techo \"</td></tr>\\n\";\n\techo \"<tr><td valign='top'>\\n\";\n\n\techo docpop('outdir', 'Output directory').\"<br/>\\n\";\n\techo \"<input type='text' name='outdir' value='$outdir' size='40'>\\n\";\n\n\techo \"</td></tr>\\n\";\n\techo \"<tr><td valign='top' class='tablebg'>\\n\";\n\n\techo \"<input type='text' name='lowpass' value='$lowpass' size='5'>\\n\";\n\techo \"&nbsp;Low pass filter\\n\";\n\n\techo \"</td></tr>\\n\";\n\techo \"<tr><td valign='top' class='tablebg'>\\n\";\n\n\t$syms = $particle->getSymmetries();\n echo \"<select name='symm'>\\n\";\n echo \"<option value=''>select one...</option>\\n\";\n\tforeach ($syms as $sym) {\n\t\techo \"<option value='$sym[DEF_id]'\";\n\t\tif ($sym['DEF_id']==$_POST['symm'])\n\t\t\techo \" selected\";\n\t\techo \">$sym[symmetry]\";\n\t\tif ($sym['symmetry']=='C1')\n\t\t\techo \" (no symmetry)\";\n\t\techo \"</option>\\n\";\n\t}\n\techo \"</select>\\n\";\n\techo \"&nbsp;Symmetry group <i>e.g.</i> c1\\n\";\n\n\techo \"</td></tr>\\n\";\n\techo \"<tr><td valign='top' class='tablebg'>\\n\";\n\n echo \"<select name='method'>\\n\";\n\t echo \"<option value='eman'\";\n\t\tif ($_POST['method']=='eman')\n\t\t\techo \" selected\";\n\t echo \">EMAN: pdb2mrc</option>\\n\";\n\n\t echo \"<option value='spider'\";\n\t\tif ($_POST['method']=='spider')\n\t\t\techo \" selected\";\n\t echo \">SPIDER: CP FROM PDB</option>\\n\";\n\techo \"</select>\\n\";\n\techo \"&nbsp;Program to convert PDB\\n\";\n\n\techo \"</td></tr>\\n\";\n\techo \"<tr><td valign='top' class='tablebg'>\\n\";\n\n\techo docpop('apix', 'Pixel size').\"<br/>\\n\";\n\techo \"<input type='text' name='apix' value='$apix' size='5'>\\n\";\n\techo \"&nbsp;<font size='-2'>(in &Aring;ngstroms)</font>\\n\";\n\n\techo \"</td></tr>\\n\";\n\techo \"<tr><td valign='top' class='tablebg'>\\n\";\n\n\techo docpop('boxsize', 'Box size').\"<br/>\\n\";\n\techo \"<input type='text' name='box' value='$box' size='5'>\\n\";\n\techo \"&nbsp;<font size='-2'>(default provided)</font>\\n\";\n\n\techo \"</td></tr>\\n\";\n\techo \"<tr><td valign='top' class='tablebg'>\\n\";\n\n\techo \"<input type='checkbox' name='viper2eman' $viper2eman>\\n\";\n\techo docpop('viper2eman', \"convert VIPER to EMAN orientation\");\n\n\techo \"</td></tr>\\n\";\n\techo \"<tr><td align='center'>\\n\";\n\n\techo \"<hr>\";\n\techo getSubmitForm(\"Create Model\");\n\n\techo \"</td></tr>\\n\";\n\techo \"</table>\\n\";\n\techo \"</form>\\n\";\n\n\techo initModelRef();\n\n\tprocessing_footer();\n\texit;\n}", "public function buildFormTemplate() {\n\t\t$formTemplatepath = \"src/Templates/\".$this->stateName.\"_\".$this->stateType.\".php\";\n\t\t$formTemplate = fopen($formTemplatepath, \"w\") or die (\"Unable to create html template for \\\"\".$this->stateName.\"_\".$this->stateType.\"\\\" state.\");\n\t\t$formHtml = \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>\".$this->title.\"</title>\n\t\t</head>\n\t\t<body>\";\n\t\tif ($this->stateType == \"generation\") {\n\t\t\t$formHtml .= \"<form method=\\\"\".$this->method.\"\\\" action=\\\"../Scripts/generationHandleRequest.php\\\" >\";\n\t\t}\n\t\t\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Skip the Database elements.\n\t\t\tif ($input['inputType'] == \"DATABASE\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\t$formHtml .= \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\t$formHtml .= \" required\";\n\t\t\t}\n\t\t\t// Makes the html page more readable, i.e. appending with a new line.\n\t\t\t$formHtml .= \">\n\t\t\t<br>\";\n\t\t}\n\n\t\t$formHtml .= \"</form>\n\t\t</body>\n\t\t</html>\";\n\n\t\tfwrite($formTemplate, $formHtml);\n\t\tfclose($formTemplate);\n\t}", "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 return $this->form->render('mconsole::personal.form');\n }", "function showForm() {\n \tglobal $pluginpath;\n \t\n \tif ($this->idt == \"\") {\n \t //user is creating new template\n \t\t$title = MF_NEW_TEMPLATE;\n \t\t$this->action = 'createtempl';\n\t\t$btnText = MF_CREATE_TEMPLATE_BUTTON; \n \t} else {\n \t //user is editing old template\n \t\t$title = \tMF_CHANGE_TEMPLATE;\n \t\t$this->action = 'changetempl';\n\t\t$btnText = MF_CHANGE_FORUM_BUTTON;\n \t}\n \t\n\t$this->doHtmlSpecChars();\n\t\t\n\tinclude \"admin/tempForm.php\";\n \t\n }", "public function generateFormProperites(){\r\n\t\t$formProperties = $this->formProperties;\r\n\t\t$formTags = '<form ';\r\n\t\tif(sizeof($formProperties) > 0) {\r\n\t\t\tforeach($formProperties as $key=>$params){\r\n\t\t\t\t$formTags .= $key.'=\"'.$params.'\" ';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$formTags\t\t.= '>';\r\n\t\treturn $formTags;\r\n\t}", "protected function getForm() {\n\t\tglobal $wgScript;\n\n\t\t$this->opts['title'] = $this->getPageTitle()->getPrefixedText();\n\t\tif ( !isset( $this->opts['target'] ) ) {\n\t\t\t$this->opts['target'] = '';\n\t\t} else {\n\t\t\t$this->opts['target'] = str_replace( '_', ' ', $this->opts['target'] );\n\t\t}\n\n\t\tif ( !isset( $this->opts['namespace'] ) ) {\n\t\t\t$this->opts['namespace'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['nsInvert'] ) ) {\n\t\t\t$this->opts['nsInvert'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['associated'] ) ) {\n\t\t\t$this->opts['associated'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['contribs'] ) ) {\n\t\t\t$this->opts['contribs'] = 'user';\n\t\t}\n\n\t\tif ( !isset( $this->opts['year'] ) ) {\n\t\t\t$this->opts['year'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['month'] ) ) {\n\t\t\t$this->opts['month'] = '';\n\t\t}\n\n\t\tif ( $this->opts['contribs'] == 'newbie' ) {\n\t\t\t$this->opts['target'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['tagfilter'] ) ) {\n\t\t\t$this->opts['tagfilter'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['topOnly'] ) ) {\n\t\t\t$this->opts['topOnly'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['newOnly'] ) ) {\n\t\t\t$this->opts['newOnly'] = false;\n\t\t}\n\n\t\t$form = Html::openElement(\n\t\t\t'form',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'action' => $wgScript,\n\t\t\t\t'class' => 'mw-contributions-form'\n\t\t\t)\n\t\t);\n\n\t\t# Add hidden params for tracking except for parameters in $skipParameters\n\t\t$skipParameters = array(\n\t\t\t'namespace',\n\t\t\t'nsInvert',\n\t\t\t'deletedOnly',\n\t\t\t'target',\n\t\t\t'contribs',\n\t\t\t'year',\n\t\t\t'month',\n\t\t\t'topOnly',\n\t\t\t'newOnly',\n\t\t\t'associated'\n\t\t);\n\n\t\tforeach ( $this->opts as $name => $value ) {\n\t\t\tif ( in_array( $name, $skipParameters ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$form .= \"\\t\" . Html::hidden( $name, $value ) . \"\\n\";\n\t\t}\n\n\t\t$tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );\n\n\t\tif ( $tagFilter ) {\n\t\t\t$filterSelection = Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\t\tarray_shift( $tagFilter )\n\t\t\t);\n\t\t\t$filterSelection .= Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-input' ),\n\t\t\t\timplode( '&#160', $tagFilter )\n\t\t\t);\n\t\t} else {\n\t\t\t$filterSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), '' );\n\t\t}\n\n\t\t$labelNewbies = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-newbies' )->text(),\n\t\t\t'contribs',\n\t\t\t'newbie',\n\t\t\t'newbie',\n\t\t\t$this->opts['contribs'] == 'newbie',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$labelUsername = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-username' )->text(),\n\t\t\t'contribs',\n\t\t\t'user',\n\t\t\t'user',\n\t\t\t$this->opts['contribs'] == 'user',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$input = Html::input(\n\t\t\t'target',\n\t\t\t$this->opts['target'],\n\t\t\t'text',\n\t\t\tarray( 'size' => '40', 'required' => '', 'class' => 'mw-input' ) +\n\t\t\t\t( $this->opts['target'] ? array() : array( 'autofocus' )\n\t\t\t\t)\n\t\t);\n\t\t$targetSelection = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$labelNewbies . '<br />' . $labelUsername . ' ' . $input . ' '\n\t\t);\n\n\t\t$namespaceSelection = Xml::tags(\n\t\t\t'td',\n\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\tXml::label(\n\t\t\t\t$this->msg( 'namespace' )->text(),\n\t\t\t\t'namespace',\n\t\t\t\t''\n\t\t\t)\n\t\t);\n\t\t$namespaceSelection .= Html::rawElement(\n\t\t\t'td',\n\t\t\tnull,\n\t\t\tHtml::namespaceSelector(\n\t\t\t\tarray( 'selected' => $this->opts['namespace'], 'all' => '' ),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'namespace',\n\t\t\t\t\t'id' => 'namespace',\n\t\t\t\t\t'class' => 'namespaceselector',\n\t\t\t\t)\n\t\t\t) . '&#160;' .\n\t\t\t\tHtml::rawElement(\n\t\t\t\t\t'span',\n\t\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'invert' )->text(),\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t$this->opts['nsInvert'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-invert' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t) .\n\t\t\t\tHtml::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'namespace_association' )->text(),\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t$this->opts['associated'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-namespace_association' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t)\n\t\t);\n\n\t\tif ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {\n\t\t\t$deletedOnlyCheck = Html::rawElement(\n\t\t\t\t'span',\n\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\tXml::checkLabel(\n\t\t\t\t\t$this->msg( 'history-show-deleted' )->text(),\n\t\t\t\t\t'deletedOnly',\n\t\t\t\t\t'mw-show-deleted-only',\n\t\t\t\t\t$this->opts['deletedOnly'],\n\t\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$deletedOnlyCheck = '';\n\t\t}\n\n\t\t$checkLabelTopOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-toponly' )->text(),\n\t\t\t\t'topOnly',\n\t\t\t\t'mw-show-top-only',\n\t\t\t\t$this->opts['topOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$checkLabelNewOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-newonly' )->text(),\n\t\t\t\t'newOnly',\n\t\t\t\t'mw-show-new-only',\n\t\t\t\t$this->opts['newOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$extraOptions = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly\n\t\t);\n\n\t\t$dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ),\n\t\t\tXml::dateMenu(\n\t\t\t\t$this->opts['year'] === '' ? MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'],\n\t\t\t\t$this->opts['month']\n\t\t\t) . ' ' .\n\t\t\t\tXml::submitButton(\n\t\t\t\t\t$this->msg( 'sp-contributions-submit' )->text(),\n\t\t\t\t\tarray( 'class' => 'mw-submit' )\n\t\t\t\t)\n\t\t);\n\n\t\t$form .= Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() );\n\t\t$form .= Html::rawElement( 'table', array( 'class' => 'mw-contributions-table' ), \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $targetSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $namespaceSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $filterSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $extraOptions ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $dateSelectionAndSubmit ) . \"\\n\"\n\t\t);\n\n\t\t$explain = $this->msg( 'sp-contributions-explain' );\n\t\tif ( !$explain->isBlank() ) {\n\t\t\t$form .= \"<p id='mw-sp-contributions-explain'>{$explain->parse()}</p>\";\n\t\t}\n\n\t\t$form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' );\n\n\t\treturn $form;\n\t}", "private function makeform() {\n\tglobal $qqi;\n\t\n\t$form=new llform($this,'form');\n\t$form->addFieldset('d','');\n\t$form->addControl('d',new ll_listbox($form,'users','Users'));\n\t$form->addControl('d',new ll_button($form,'allusers','Select All','button'));\n\t$form->addControl('d',new ll_listbox($form,'functions','Functions'));\n\t$form->addControl('d',new ll_button($form,'allfunctions','Select All','button'));\n\t$rg=new ll_radiogroup($form,'showby');\n\t\t$rg->addOption('byusers','Rows of Users');\n\t\t$rg->addOption('byfunctions','Rows of Functions');\n\t\t$rg->setValue('byfunctions');\n\t$form->addControl('d',$rg);\t\n\t$form->addControl('d',new ll_button($form,'update','Update Display','button'));\n\treturn $form;\n}", "private function buildGitLabWForm(&$form) {\n $git_settings = $this->configFactory->get('simple_git.settings');\n\n $form['git_lab'] = [\n '#type' => 'fieldset',\n '#title' => $this->t('GitLab Web settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n ];\n\n $form['git_lab']['git_lab_app_id'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Web Id'),\n '#description' => $this->t('GitLab App Web Id value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_id'],\n ];\n\n $form['git_lab']['git_lab_app_secret'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Web Secret'),\n '#description' => $this->t('GitLab App Web Secret value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_secret'],\n ];\n\n $form['git_lab']['git_lab_app_url_redirect'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab URL Web Redirect'),\n '#description' => $this->t('GitLab URL Web Redirect value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_url_redirect'],\n ];\n\n }", "function create_form(){\n\t\n\t$table =\"<html>\";\n\t$table.=\"<head>\";\n\t$table.=\"\t<title>New Article Entry Page</title>\";\n\t$table.=\"</head>\";\n\t\n\t// URL for the wordpress post handling page\n\t$link_admin_post = admin_url('admin-post.php');\n\t$table.=\"<form name = 'myform' method=\\\"POST\\\" action='\" . $link_admin_post . \"' id = \\\"form1\\\">\";\n\n\t// Input for Faculty member\n\t$table.= \"\t<br>\";\n\t$table.= \" <div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Tag\\\">Faculty Member/Tag: </label></p>\";\n\t$list_of_names = wp_post_tag_names();\n\t$table.=\"\t<select name=\\\"Tag\\\">\" . $list_of_names . \"</select>\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for PMID\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"PMID\\\">PMID*: </label></p>\";\n\t$table.=\"\t<input type=\\\"number\\\" name=\\\"PMID\\\" id=\\\"PMID\\\" required>\";\n\t\n\t//autofill button\n\t$table.=' <a class=\"pmid\" data-test=\"hi\"><button id=\"autofill_btn\" type=\"button\" >Auto-Fill</button></a>';\n\t$table.=\"\t</div>\";\n\t\t\n\t// Input for Journal Issue\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label style=\\\"width: 200px;\\\" for=\\\"Journal_Issue\\\">Journal Issue: </label></p>\";\n\t$table.=\"\t<input id = 'issue' type=\\\"number\\\" name=\\\"Journal_Issue\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Volume\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Volume\\\">Journal Volume: </label></p>\";\n\t$table.=\"\t<input id = 'journal_volume' type=\\\"number\\\" name=\\\"Journal_Volume\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Title\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Title\\\">Journal Title: </label></p>\";\n\t$table.=\"\t<input id = 'journal_title' type=\\\"text\\\" name=\\\"Journal_Title\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Year\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Year\\\">Journal Year: </label></p>\";\n\t$table.=\"\t<input id = 'year' value=\\\"2000\\\" type=\\\"number\\\" name=\\\"Journal_Year\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Month\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Month\\\">Journal Month: </label></p>\";\n\t$table.=\"\t<select id='journal_month' name=\\\"Journal Month\\\">\";\n\t$table.=\"\t\t<option value=\\\"01\\\">Jan</option>\";\n\t$table.=\"\t\t<option value=\\\"02\\\">Feb</option>\";\n\t$table.=\"\t\t<option value=\\\"03\\\">Mar</option>\";\n\t$table.=\"\t\t<option value=\\\"04\\\">Apr</option>\";\n\t$table.=\"\t\t<option value=\\\"05\\\">May</option>\";\n\t$table.=\"\t\t<option value=\\\"06\\\">Jun</option>\";\n\t$table.=\"\t\t<option value=\\\"07\\\">Jul</option>\";\n\t$table.=\"\t\t<option value=\\\"08\\\">Aug</option>\";\n\t$table.=\"\t\t<option value=\\\"09\\\">Sep</option>\";\n\t$table.=\"\t\t<option value=\\\"10\\\">Oct</option>\";\n\t$table.=\"\t\t<option value=\\\"11\\\">Nov</option>\";\n\t$table.=\"\t\t<option value=\\\"12\\\">Dec</option>\";\n\t$table.=\"\t</select>\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Day\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Day\\\">Journal Day: </label></p>\";\n\t$table.=\"\t<input id = 'journal_day' type=\\\"text\\\" name=\\\"Journal_Day\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Date\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Date\\\">Journal Date: </label></p>\";\n\t$table.=\"\t<input id = 'journal_date' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Journal_Date\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Journal Abbreviation\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Abbreviation\\\">Journal Abbreviation: </label></p>\";\n\t$table.=\"\t<input id = 'journal_ab' type=\\\"text\\\" name=\\\"Journal_Abbreviation\\\">\";\n\t$table.=\"\t</div>\";\n\n\t// Input for Journal Citation\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Journal_Citation\\\">Journal Citation: </label></p>\";\n\t$table.=\"\t<input id = 'journal_citation' type=\\\"text\\\" name=\\\"Journal_Citation\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Title\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Title\\\">Article Title: </label></p>\";\n\t$table.=\"\t<input id=\\\"article_title\\\" type=\\\"text\\\" name=\\\"Article_Title\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for article abstract\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Abstract\\\">Article Abstract: </label></p>\";\n\t$table.=\" <textarea id='abstract' rows = '4' cols = '60' name=\\\"Article_Abstract\\\"></textarea>\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article URL\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_URL\\\">Article URL: </label></p>\";\n\t$table.=\"\t<input id = 'article_url' type=\\\"text\\\" name=\\\"Article_URL\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Pagination\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Pagination\\\">Article Pagination: </label></p>\";\n\t$table.=\"\t<input id='pages' type=\\\"text\\\" name=\\\"Article_Pagination\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Date\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Date\\\">Article Date: </label></p>\";\n\t$table.=\"\t<input id='article_date' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Article_Date\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Authors\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Authors\\\">Article Authors: </label></p>\";\n\t$table.=\"\t<input id='article_authors' type=\\\"text\\\" name=\\\"Article_Authors\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Article Affiliations\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Article_Affiliation\\\">Article Affiliation: </label></p>\";\n\t$table.=\"\t<input id = 'article_affiliation' type=\\\"text\\\" name=\\\"Article_Affiliation\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Date Created\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Date_Created\\\">Date Created: </label></p>\";\n\t$table.=\"\t<input id='date_created' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Date_Created\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Input for Date Completed\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Date_Completed\\\">Date Completed: </label></p>\";\n\t$table.=\"\t<input id='date_completed' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Date_Completed\\\">\";\n\t$table.=\"\t</div>\";\n\n\t// Input for Date Revised\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div class=\\\"input\\\">\";\n\t$table.=\"\t<p class=\\\"label\\\"><label for=\\\"Date_Revised\\\">Date Revised: </label></p>\";\n\t$table.=\"\t<input id='date_revised' placeholder=\\\"YYYY-MM-DD\\\" type=\\\"text\\\" name=\\\"Date_Revised\\\">\";\n\t$table.=\"\t</div>\";\n\t\n\t// Hidden input (for specifying hook)\n\t$table.=\"\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"new_article_form\\\">\";\n\t\n\t// Submit and reset buttons\n\t$table.=\"\t<br>\";\n\t$table.=\"\t<div id=\\\"form_btns\\\">\"; \n\t$table.=\"\t<button class=\\\"form_btn\\\"><input type=\\\"reset\\\" value=\\\"Reset!\\\" onclick=\\\"window.location.reload()\\\"></button>\";\n\t$table.=\"\t<input class=\\\"form_btn\\\" type=\\\"submit\\\" value=\\\"Submit\\\">\"; \n\t$table.=\"\t</div>\";\n\t$table.=\"</form>\";\n\n\t// Styling of the form (needs to be put in a seperate stylesheet)\n\t$table.=\"<style type=\\\"text/css\\\">\";\n\t$table.=\"\t#form_btns {\";\n\t$table.=\"\t\tmargin-left: 150px;\";\n\t$table.=\"\t}\";\n\t$table.=\"\t.form_btn {\";\n\t$table.=\"\t\twidth: 80px;\";\n\t$table.=\"\t}\";\n\t$table.=\"\t.label {\";\n\t$table.=\"\t\twidth: 150px;\";\n\t$table.=\"\t\tmargin: 0;\";\n\t$table.=\"\t\tfloat: left;\";\n\t$table.=\"\t}\";\n\t$table.=\"\tinput::placeholder {\";\n\t$table.=\"\t\tcolor: #a4a4a4;\";\n\t$table.=\"\t}\";\n\t$table.=\"</style>\";\n\t\n\t$table.=\"<script type='text/javascript' src=\" . plugin_dir_url(__FILE__) . \"js/autofill_ajax.js></script>\";\n\n \techo $table;\n}", "function buildQuickForm( ) {\n // and the grades\n require_once 'School/Utils/Conference.php';\n $details = School_Utils_Conference::getReminderDetails( );\n $string = array();\n foreach ( $details as $name => $grade ) {\n $string[] = \"{$name} (Grade: {$grade})\";\n }\n $this->assign( 'conferenceTeachers',\n implode( ', ', $string ) );\n\n $this->addButtons(array( \n array ( 'type' => 'refresh', \n 'name' => ts( 'Send Reminder' ),\n 'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', \n 'isDefault' => true ), \n array ( 'type' => 'cancel', \n 'name' => ts('Cancel') ), \n )\n );\n }", "function Form()\n\t{\n\t\tprint '<form name=\"myform\" action=\"' . THIS_PAGE . '\" method=\"post\">';\n\t\tforeach($this->aQuestion as $question)\n\t\t{//print data for each\n\t\t\t$this->createInput($question);\n\t\t}\n\t\tprint '<input type=\"hidden\" name=\"SurveyID\" value=\"' . $this->SurveyID . '\" />';\t\n\t\tprint '<input type=\"submit\" value=\"Submit!\" />';\t\n\t\tprint '</form>';\n\t}", "public function newKbn() {\n\t\treturn \"\n\t\t<form action='' method='post' enctype='multipart/form-data'>\n\t\t\t<button name='NewKbnProjectSubmit' value='value' type='submit'>New State</button>\n\t\t</form>\n\t\t\";\n\t}", "abstract function form();", "protected function form()\n {\n $Adv=new Adv();\n $form = new Form($Adv);\n $platform= $Adv->platform;\n $type= $Adv->type;\n $status= $Adv->status;\n $list_array=[\n array(\"field\"=>\"title\",\"title\"=>\"标题\",\"type\"=>\"text\"),\n array(\"field\"=>\"platform\",\"title\"=>\"平台\",\"type\"=>\"select\",\"array\"=>$platform),\n array(\"field\"=>\"type\",\"title\"=>\"类型\",\"type\"=>\"select\",\"array\"=>$type),\n array(\"field\"=>\"image\",\"title\"=>\"图片\",\"type\"=>\"image\"),\n array(\"field\"=>[\"start_time\",\"end_time\"],\"title\"=>\"活动时间\",\"type\"=>\"datetimeRange\"),\n array(\"field\"=>\"font1\",\"title\"=>\"字段1\",\"type\"=>\"text\"),\n array(\"field\"=>\"font2\",\"title\"=>\"字段2\",\"type\"=>\"text\"),\n array(\"field\"=>\"font3\",\"title\"=>\"字段3\",\"type\"=>\"text\"),\n array(\"field\"=>\"font4\",\"title\"=>\"字段4\",\"type\"=>\"text\"),\n array(\"field\"=>\"font5\",\"title\"=>\"字段5\",\"type\"=>\"text\"),\n array(\"field\"=>\"status\",\"title\"=>\"状态\",\"type\"=>\"switch\",\"array\"=>$status),\n array(\"field\"=>\"created_at\",\"title\"=>\"创建时间\",\"type\"=>\"value\")\n ];\n BaseControllers::set_form($form,$list_array);\n return $form;\n }", "public function addform()\n\t{\n\t\t\t$this->setMethod('get');\n\n\t\t\t//echo \"<pre>\";\n\t\t\t//print_r($_GET);\n\t\t\t//echo \"</pre>\";\n\t\t\t$this->addElement('radio', 'Status', array(\n\t\t\t\t'required' => true,\n 'separator' => '&nbsp;',\n\t\t\t\t'multiOptions' => array(\n\t\t\t\t\t'1' => IN_PROGRESS,\n\t\t\t\t\t'2' => 'Closed'\n\t\t\t\t\t\n\t\t\t\t),\n\t\t\t\t\t'separator' => '',\n\t\t\t\t'value' => '1' //key of multiOption\n\t\t\t));\n\n\t\t\n\t\t\n\t\t$this->addElement ( \n 'multiCheckbox', 'Functional_type', \n array (\n \n\t\t//'setrequired' => true,\n 'multiOptions' => array(\n '1' => 'Pre Installation',\n '2' => 'Installation',\n '3' => 'Post Installation'\n \n ),\n 'separator' => '',\n\t\t\t\t\t//'value' => '2' // select these 2 values\n )\n);\n\t\n\t\t\t\t\n\t\t\t$this->addElement('submit', 'submit', array(\n\t\t\t\t\t'ignore' => true,\n\t\t\t\t\t'label' => 'Submit',\n\t\t\t));\n\t\t\t\n\t\t\t// And finally add some CSRF protection\n\t\t\t$this->addElement('hash', 'csrf', array(\n\t\t\t\t\t'ignore' => true,\n\t\t\t));\t\n\t}", "function content() {\n echo \"\n <form action='http://{$_SERVER['SERVER_NAME']}/mailmaid/subscriber/add' method='post'>\n <input name='token' type='hidden' value='{$this->params['token']}'>\n <label for='username'>Name</label>\n <input name='name' placeholder='Name' id='name' type='text' required>\n <label for='description'>Description</label>\n <input name='description' placeholder='Description (Optional)' id='description' type='text'>\n <input type='submit' value='Create List'>\n </form>\n \";\n }", "abstract public function forms();", "public function addform()\n\t{\n\t\t\t$this->setMethod('post');\n\n\t\t\t\n\t\t\t$this->addElement('radio', 'status', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'multiOptions' => array(\n\t\t\t\t\t'1' => IN_PROGRESS,\n\t\t\t\t\t'2' => 'Closed'\n\t\t\t\t\t\n\t\t\t\t),\n\t\t\t\t'value' => '1' //key of multiOption\n\t\t\t));\n\t\t\n\t\t\n\n\t\t\t$this->addElement('textarea', 'Comment', array( \n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'maxlength' =>'50',\n\t\t\t\t\t\n\t\t\t\t\t'class' => 'validate[required] text-input',\n\t\t\t\t\t'decorators'=>Array(\n\t\t\t\t\t\t'ViewHelper','Errors'\n\t\t\t\t\t),\t\t \n\t\t\t));\n\n\t\t\t\n\n\t\t\t\n\n\n\t\n\t\t\t\t\n\t\t\t$this->addElement('submit', 'submit', array(\n\t\t\t\t\t'ignore' => true,\n\t\t\t\t\t'label' => 'Submit',\n\t\t\t));\n\t\t\t\n\t\t\t// And finally add some CSRF protection\n\t\t\t$this->addElement('hash', 'csrf', array(\n\t\t\t\t\t'ignore' => true,\n\t\t\t));\t\n\t}", "protected function form()\n {\n $form = new Form(new Information);\n \n \n\n $form->text('name', __('项目名称'))->autofocus()->placeholder('例:上汽大众新能源汽车工厂项目')->required();\n $form->text('industry', __('行业类别'))->required();\n $form->currency('investment', __('投资金额'))->icon('fa-usd')->required(); \n $form->text('cont_name', __('资方联系人'))->placeholder('选填内容,可为空');\n $form->text('cont_phone', __('资方联系方式'))->placeholder('选填内容,可为空');\n $form->text('staff_name', __('工作人员姓名'));\n $form->text('staff_phone', __('工作人员电话'));\n $form->hidden('adminuser_id', __('adminuser_id'))->value(Admin::user()->id);\n $form->textarea('content', __('项目情况'))->required()->placeholder('请填写项目介绍(包括项目投资额度、产业类别等)、项目需求(如土地、排放、能耗等)、谈判进度等......');\n\n\n\n $form->tools(function (Form\\Tools $tools) {\n\n // 去掉`列表`按钮\n $tools->disableList();\n\n });\n\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n $footer->disableReset();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n $form->setAction('../admin/myinfo');\n\n return $form;\n }", "public function create_form_php($tabla,$html)\n {\n \n $carpeta_url = 'C:/AppServ/www/'.$this->name_folder.'/'.$this->admin.'/'.$tabla.''; \n $carpeta = 'C:/AppServ/www/'.$this->name_folder.'/'.$this->admin.'/'.$tabla.'';\n\n if (!file_exists($carpeta_url)){\n mkdir($carpeta_url, 0777, true);\n\n $formulario_table = $html;\n\n $form_table = fopen(''.$carpeta_url.'/index.php', 'w') or die('error creando fichero!'); \n\n fputs($form_table, $formulario_table);\n fclose($form_table);\n echo 'Exito Carpeta creada '.$tabla;\n\n }else if($carpeta_url==$carpeta){\n\n $formulario_table = $html;\n\n $form_table = fopen(''.$carpeta_url.'/form.php', 'w') or die('error creando fichero!'); \n\n fputs($form_table, $formulario_table);\n fclose($form_table);\n echo 'Exito Archivo creada '.$tabla.'<br>';\n\n }else{\n echo '<p>Error '.$tabla.'</p>'.$carpeta_url.\"<br>\";\n \n }\n \n }", "public function getSetupForm() {\n\n /**\n * @todo find a beter way to do this\n */\n\n if(!empty($_POST['nodeId'])){\n $this->id = $_POST['nodeId'];\n }\n\n if (empty($this->id)) {\n $table = new HomeNet_Model_DbTable_Nodes();\n $this->id = $table->fetchNextId($this->house);\n }\n // $this->id = 50;\n\n $form = new HomeNet_Form_Node();\n $sub = $form->getSubForm('node');\n $id = $sub->getElement('node');\n $id->setValue($this->id);\n \n $table = new HomeNet_Model_DbTable_Nodes();\n $rows = $table->fetchAllInternetNodes();\n\n $uplink = $sub->getElement('uplink');\n\n foreach($rows as $value){\n $uplink->addMultiOption($value->id, $value->id);\n }\n\n\n return $form;\n }", "public function setup_form() {\n\t\t?>\n\t\t<tr>\n\t\t\t<td colspan=\"2\">\n\t\t\t\t<p>\n\t\t\t\t\t<label for=\"wpsc-manual-gateway-setup\"><?php _e( 'Instructions', 'wpsc' ); ?></label><br />\n\t\t\t\t\t<textarea id=\"wpsc-manual-gateway-setup\" cols='' rows='10' name='<?php echo esc_attr( $this->setting->get_field_name( 'payment_instructions' ) ); ?>'><?php echo esc_textarea( wp_unslash( $this->setting->get( 'payment_instructions' ) ) ); ?></textarea><br />\n\t\t\t\t\t<small><?php _e('Enter the payment instructions that you wish to display to your customers when they make a purchase.', 'wpsc'); ?></small><br />\n\t\t\t\t\t<small><?php _e('For example, this is where you the Shop Owner might enter your bank account details or address so that your customer can make their manual payment.', 'wpsc'); ?></small>\n\t\t\t\t</p>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php\n\t}", "public function createComponentGenerateForm() {\n $form = new Form;\n\n\n $groups = $this->groups->getForTest($this->user->id);\n\n $form->addSelect('groupBox', 'Skupina:', $groups);\n $form->addHidden('test_id', $this->getParameter('testId'));\n $form->addText('questionCount')->setRequired('Zadejte počet otázek');\n $form->addText('answerCount')->setRequired('Zadejte počet odpovědí');\n $form->addRadioList('pageFormat', 'Formát stránky', array('a4' => 'A4', 'a5' => 'A5'))\n ->setRequired('Vyberte formát stránky');\n $form->addTextArea('students');\n\n $form->onSuccess[] = callback($this, 'generateFormSubmitted');\n $form->addSubmit('submit');\n\n return $form;\n }", "public function cloudviewForm(): string\n {\n $rcmail = rcmail::get_instance();\n\n $boxTitle = html::div(['class' => 'boxtitle'], rcmail::Q($this->gettext('plugin_settings_title')));\n\n $saveButton = (new html_button())->show(\n rcmail::Q($this->gettext('save')),\n [\n 'type' => 'input',\n 'class' => 'btn button submit mainaction',\n 'onclick' => \"return rcmail.command('plugin.cloudview-save', '', this, event)\",\n ]\n );\n\n $objectTable = new html_table(['cols' => 2, 'class' => 'propform']);\n\n // option: enable this plugin or not\n $objectCloudviewEnabled = new html_checkbox([\n 'name' => '_cloudview_enabled',\n 'id' => '_cloudview_enabled',\n 'value' => 1,\n ]);\n $objectTable->add('title', html::label('_cloudview_enabled', rcmail::Q($this->gettext('plugin_enabled'))));\n $objectTable->add('', $objectCloudviewEnabled->show($this->prefs['cloudview_enabled'] ? 1 : 0));\n\n // option: choose cloud viewer\n $objectCloudviewViewer = new html_select(['name' => '_cloudview_viewer', 'id' => '_cloudview_viewer']);\n $objectCloudviewViewer->add(\n [\n rcmail::Q($this->gettext('viewer_microsoft_office_web')),\n rcmail::Q($this->gettext('viewer_google_docs')),\n ],\n [\n self::VIEWER_MICROSOFT_OFFICE_WEB,\n self::VIEWER_GOOGLE_DOCS,\n ]\n );\n $objectTable->add('title', html::label('_cloudview_viewer', rcmail::Q($this->gettext('select_viewer'))));\n $objectTable->add('', $objectCloudviewViewer->show($this->prefs['cloudview_viewer']));\n\n $table = $objectTable->show();\n $form = html::div(['class' => 'boxcontent'], $table . $saveButton);\n\n // responsive layout for the \"elastic\" skin\n if (RoundcubeHelper::getBaseSkinName() === 'elastic') {\n $containerAttrs = ['class' => 'formcontent'];\n } else {\n $containerAttrs = [];\n }\n\n $rcmail->output->add_gui_object('cloudview-form', 'cloudview-form');\n\n return html::div($containerAttrs, $rcmail->output->form_tag(\n [\n 'id' => 'cloudview-form',\n 'name' => 'cloudview-form',\n 'method' => 'post',\n 'class' => 'propform',\n 'action' => './?_task=settings&_action=plugin.cloudview-save',\n ],\n html::div(['class' => 'box'], $boxTitle . $form)\n ));\n }", "public function buildForm()\n {\n }", "public function newKbn() {\n\t\treturn \"\n\t\t<form action='' method='post' enctype='multipart/form-data'>\n\t\t\t<button name='NewKbnProjectSubmit' value='value' type='submit'>New Kanban Board</button>\n\t\t</form>\n\t\t\";\n\t}", "function FormAsseretion(){\r\n $creat = new UIMAP_createFormPage();\r\n \r\n $this->assertElementPresent($creat->formName());\r\n $this->assertElementPresent($creat->formLanguige());\r\n for($i = 1; $i < 4; $i++){\r\n $this->assertElementPresent($creat->formRespuniqtype($i));\r\n }\r\n $this->assertElementPresent($creat->submitButton());\r\n }", "protected function form()\n {\n $form = new Form(new PrizesLog);\n\n // 去掉`删除`按钮\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n\n $form->text('group.title', '奖品组')->readonly();\n $form->text('prize.name', '奖品名称')->readonly();\n $form->text('material.title', '物料名称')->readonly();\n $form->text('material_code', '物料代码')->readonly();\n $form->text('user.username', '用户名')->readonly();\n $form->text('user.mobile', '用户手机号')->readonly();\n $form->select('source', '来源')->options([\n '' => '', 'exchange' => '兑换/领取', 'lottery' => '抽奖'\n ])->readonly();\n $form->ip('ip', 'IP地址')->readonly();\n $form->datetime('created_at', '中奖时间')->readonly();\n $form->embeds('leaving_capital', '留资信息', function ($form) {\n $form->text('name', '收件人');\n $form->mobile('mobile', '手机号');\n $form->text('address', '收件地址');\n });\n $form->radio('status', '状态')->options([\n '0' => '作废', '1' => '有效'\n ])->default('1');\n return $form;\n }", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "protected function form()\n {\n $form=new Form(new JudgeServer());\n\n $form->text('scode', __('admin.judgeservers.scode'))->rules('required|alpha_dash|min:3|max:20');\n $form->text('name', __('admin.judgeservers.name'))->required();\n $form->text('host', __('admin.judgeservers.host'))->required();\n $form->text('port', __('admin.judgeservers.port'))->required();\n $form->text('token', __('admin.judgeservers.token'))->required();\n $form->switch('available', __('admin.judgeservers.availability'));\n $form->select('oid', __('admin.judgeservers.oj'))->options(OJ::all()->pluck('name', 'oid'))->help(__('admin.judgeservers.help.onlinejudge'))->required();\n $form->hidden('status', __('admin.judgeservers.status'))->default(0);\n return $form;\n }", "private function viewBuilder() {\n $html = '';\n $file = false;\n // Create fields\n foreach ($this->formDatas as $field) {\n $type = $field['type'];\n switch ($type) {\n case 'text' :\n case 'password' :\n case 'hidden' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n // Addon - 2013-07-31\n case 'date' :\n case 'datetime' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"text\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n\n\n if ($type == 'datetime') {\n $plugin = $this->addPlugin('widget', false);\n $plugin = $this->addPlugin('date');\n }\n $plugin = $this->addPlugin($type);\n if (!isset($this->js['script'])) {\n $this->js['script'] = '';\n }\n if ($type == 'datetime') {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datetimepicker({ dateFormat: \"yy-mm-dd\", timeFormat : \"HH:mm\"});});</script>';\n } else {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datepicker({ dateFormat: \"yy-mm-dd\"});});</script>';\n }\n break;\n // End Addon\n case 'select' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <select name=\"' . $field['name'] . '\">';\n // Add options\n foreach ($field['options'] as $option) {\n $html .= '\n <option value=\"' . $option . '\" <?php echo set_select(\"' . $field['name'] . '\", \"' . $option . '\"); ?>>' . $option . '</option>';\n }\n $html .= '\n </select>';\n break;\n case 'checkbox' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['checkbox'] as $option) {\n $html .= '\n <input type=\"checkbox\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'radio' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['radio'] as $option) {\n $html .= '\n <input type=\"radio\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'reset' :\n case 'submit' :\n $html .= '\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n case 'textarea' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <textarea name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\"><?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?></textarea>';\n break;\n case 'file' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"file\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" />';\n $file = true;\n break;\n }\n }\n\n $view = '\n <html>\n <head>\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php echo base_url() ?>assets/css/generator/' . $this->cssName . '.css\">\n '; // Addon - 2013-07-31\n foreach ($this->css as $css) {\n $view .= $css . '\n ';\n }\n foreach ($this->js as $js) {\n $view .= $js . '\n ';\n }\n // End Addon\n $view .= '\n </head>\n <body>\n <?php\n // Show errors\n if(isset($error)) {\n switch($error) {\n case \"validation\" :\n echo validation_errors();\n break;\n case \"save\" :\n echo \"<p class=\\'error\\'>Save error !</p>\";\n break;\n }\n }\n if(isset($errorfile)) {\n foreach($errorfile as $name => $value) {\n echo \"<p class=\\'error\\'>File \\\"\".$name.\"\\\" upload error : \".$value.\"</p>\";\n }\n }\n ?>\n <form action=\"<?php echo base_url() ?>' . $this->formName . '\" method=\"post\" ' . ($file == true ? 'enctype=\"multipart/form-data\"' : '') . '>\n ' . $html . '\n </form>\n </body>\n </html>';\n return array(str_replace('<', '&lt;', $view), $view);\n }", "private function makeform() {\n\n\t$form=new llform($this);\n\t$form->addFieldset('upload','Upload a New Image');\n\t$form->addFieldset('filter','Filter Images');\n\t$form->addFieldset('sort','Sort Order');\n\t$form->addFieldset('boundingbox','Bounding Box');\n\t$form->addFieldset('display','Display Options');\n\t$form->addFieldset('gotopage','Go to page');\n\t\n\t$form->addControl('upload',new ll_edit($form,'imagename',25,40,'Image name (leave blank for file name)'));\n\t$form->addControl('upload',new ll_file($form,'file',5*1024*1024));\n\t$form->addControl('upload',new ll_button($form,'upload','Upload'));\n\t\n\t$form->addControl('filter',$rgf=new ll_radiogroup($form,'filter'));\n\t$rgf->setOptionArrayDual(array('showall','byname'),array('Show All Entries','Show those whose name starts ...'));\n\t$form->addControl('filter',new ll_edit($form,'filterstring',12,20,'... with the following string:'));\n\t$form->addControl('sort',$rgs=new ll_radiogroup($form,'sorttype'));\n\t$rgs->setOptionArrayDual(array('newestfirst','oldestfirst','name'),array('Newest First','Oldest First','By Name'));\n\t$form->addControl('display',new ll_edit($form,'numperpage',3,3,'Number of images per page'));\n\t$form->addControl('display',new ll_button($form,'update','Update Display'));\n\t$form->addControl('display',new ll_button($form,'defaults','Restore Defaults'));\n\t$form->addControl('boundingbox',new ll_edit($form,'maxwidth',3,3,'Max Width'));\n\t$form->addControl('boundingbox',new ll_edit($form,'maxheight',3,3,'Max Height'));\n\t\n\t$form->addControl('gotopage',new ll_button($form,'firstpage','<<< First Page'));\n\t$form->addControl('gotopage',new ll_button($form,'prevpage','<< Prev Page'));\n\t$form->addControl('gotopage',new ll_dropdown($form,'pagenum'));\n\t$form->addControl('gotopage',new ll_button($form,'nextpage','Next Page >>'));\n\t$form->addControl('gotopage',new ll_button($form,'lastpage','Last Page >>>'));\n\t\n\treturn $form;\n}", "private function createMyForm()\n {\n $form = $this->Form();\n\n $form->setElement(\n 'select',\n 'paypalPlusCountries',\n array(\n 'label' => 'Länder bei denen „PayPal PLUS“ angezeigt wird',\n 'value' => array(2),\n 'store' => 'base.Country',\n 'multiSelect' => true,\n 'scope' => \\Shopware\\Models\\Config\\Element::SCOPE_SHOP,\n )\n );\n $form->setElement(\n 'boolean',\n 'paypalHidePaymentSelection',\n array(\n 'label' => 'Zahlungsart-Auswahl im Bestellabschluss ausblenden (Shopware 4)',\n 'value' => true,\n 'scope' => \\Shopware\\Models\\Config\\Element::SCOPE_SHOP,\n )\n );\n $form->setElement(\n 'text',\n 'paypalPlusDescription',\n array(\n 'label' => 'Zahlungsart-Bezeichnung überschreiben',\n 'value' => 'PayPal, Lastschrift oder Kreditkarte',\n 'scope' => \\Shopware\\Models\\Config\\Element::SCOPE_SHOP,\n )\n );\n $form->setElement(\n 'text',\n 'paypalPlusAdditionalDescription',\n array(\n 'label' => 'Zahlungsart-Beschreibung ergänzen',\n 'value' => 'Zahlung per Lastschrift oder Kreditkarte ist auch ohne PayPal-Konto möglich.',\n 'scope' => \\Shopware\\Models\\Config\\Element::SCOPE_SHOP,\n )\n );\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "protected function form()\n {\n $form = new Form(new ThemePoster());\n\n $form->select('domain_id', __('domain_id'))->options(DomainConfig::getDomainMap())->rules('required');\n $form->radio('type', __('type'))->options(ThemePoster::getTypeMap())->when(1, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Product::getCategoryMap()->toArray()))->rules('required');\n\n })->when(2, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Article::getCategoryMap()))->rules('required');\n\n });\n $form->text('title', __('title'))->rules('required');\n $form->text('alt', __('alt'))->rules('required');\n $form->image('site', '图片尺寸 1600*300')\n ->uniqueName()\n ->rules('required|max:150')->resize(1600, 300);\n $form->url('link', __('link'));\n $form->switch('is_show', __('is_show'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new BrandCooperation);\n\n $form->text('name', '品牌名称')->rules('required');\n $form->editor('content', '品牌详情')->rules('required');\n $form->image('logo', '品牌图标')->rules('required|image');\n $form->image('logo_hover', '品牌图标(hover)')->rules('required|image');\n// $form->multipleImage('images_url', '品牌图片')->removable()->rules(function ($form) {\n// // 如果不是编辑状态,则添加字段必填验证\n// if (!$id = $form->model()->id) {\n// return 'required|image';\n// } else {\n// return 'image';\n// }\n// });\n $form->file('video', '视频')->rules('mimetypes:video/avi,video/mp4');\n $form->image('image_url', '品牌图片')->rules('image');\n $form->radio('is_show', '显示&隐藏')->options([1 => '显示', 0 => '隐藏'])->default(1);\n $form->text('sort', '排序')->default(0);\n \n $form->text('company_name', '厂家名称')->disable();\n $form->text('contact', '联系人')->disable();\n $form->text('tel', '联系电话')->disable();\n $form->text('address', '厂家地址')->disable();\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n });\n\n return $form;\n }", "public function generate_html_forms()\n\t{\n\t\t$return_str = '<div class=\"bwp-wrap bwp-option-page-wrapper\" style=\"padding-bottom: 20px;\">' . \"\\n\";\n\t\tif (sizeof($this->form_tabs) >= 2)\n\t\t\t$return_str .= apply_filters('bwp_admin_form_icon', '<div class=\"icon32\" id=\"icon-options-general\"><br></div>' . \"\\n\");\n\t\telse\n\t\t\t$return_str .= '<div class=\"icon32\" id=\"icon-options-general\"><br></div>';\t\t\t\n\t\t\n\t\tif (sizeof($this->form_tabs) >= 2)\n\t\t{\n\t\t\t$count = 0;\n\t\t\t$return_str .= '<h2 class=\"bwp-option-page-tabs\">' . \"\\n\";\n\t\t\t$return_str .= apply_filters('bwp_admin_plugin_version', '') . \"\\n\";\n\t\t\tforeach ($this->form_tabs as $title => $link)\n\t\t\t{\n\t\t\t\t$count++;\n\t\t\t\t$active = ($count == $this->current_tab) ? ' nav-tab-active' : '';\n\t\t\t\t$return_str .= '<a class=\"nav-tab' . $active . '\" href=\"' . $link . '\">' . $title . '</a>' . \"\\n\";\n\t\t\t}\n\t\t\t$return_str .= '</h2>' . \"\\n\";\n\t\t}\n\t\telse if (!isset($this->form_tabs[0]))\n\t\t{\n\t\t\t$title = array_keys($this->form_tabs);\n\t\t\t$return_str .= '<h2>' . $title[0] . '</h2>' . \"\\n\";\n\t\t}\n\t\telse\n\t\t\t$return_str .= '<h2>' . $this->form_tabs[0] . '</h2>' . \"\\n\";\n\n\t\t$return_str .= '<div class=\"bwp-option-box clear\">' . \"\\n\";\n\n\t\t// Begin generating each form\n\t\tforeach ($this->forms as $form)\n\t\t{\n\t\t\t// If this form has 'divider' items, we need to split HTML fields appropriately\n\t\t\t$dividers = (isset($form->form['divider']) && is_array($form->form['divider'])) ? array_keys($form->form['divider']) : array();\n\t\t\t$form_style = (!empty($form->style)) ? ' style=\"' . $form->style . '\" ' : '';\n\t\t\t$multi_form_style = (!empty($form->style) && 0 < sizeof($dividers)) ? ' style=\"' . $form->style . '\" ' : '';\n\n\t\t\tif (0 == sizeof($dividers))\n\t\t\t{\n\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\"' . $form_style . '>' . \"\\n\";\n\t\t\t\t$return_str .= apply_filters('bwp_opf_before_form_' . $form->form_name, '');\n\t\t\t\techo $return_str;\n\t\t\t\tdo_action('bwp_opa_before_form_' . $form->form_name, $form->form_name);\n\t\t\t}\n\t\t\telse\n\t\t\t\techo $return_str;\n\n\t\t\t$enctype = (!empty($form->form_enctype)) ? ' enctype=\"' . $form->form_enctype . '\" ' : '';\n\t\t\t$return_str = '<form class=\"bwp-option-page\" name=\"' . $form->form_name . '\" method=\"post\" action=\"\"' . $enctype . $multi_form_style . '>' . \"\\n\";\n\n\t\t\t// Nonce\n\t\t\t$return_str .= wp_nonce_field($form->form_name, \"_wpnonce\", false, false) . \"\\n\";\n\t\t\t$return_str .= apply_filters('bwp_opf_referrer_field_' . $form->form_name, wp_referer_field(false)) . \"\\n\";\n\n\t\t\t$return_str .= '<ul>' . \"\\n\";\n\n\t\t\tif (isset($form->form_items) && is_array($form->form_items))\n\t\t\t{\n\t\t\t\t// If this form needs to be divided, so be it\n\t\t\t\tif (0 < sizeof($dividers))\n\t\t\t\t{\n\t\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\">' . \"\\n\";\n\t\t\t\t\t$return_str .= apply_filters('bwp_opf_before_form_' . $form->form_name, '');\n\t\t\t\t\techo $return_str;\n\t\t\t\t\tdo_action('bwp_opa_before_form_' . $form->form_name, $form->form_name);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\techo $return_str;\n\t\t\t\t// Reset the result\n\t\t\t\t$return_str = '';\n\t\t\t\t// Generate individual items\n\t\t\t\t$form_count = 0;\n\t\t\t\tforeach ($form->form_items as $key => $type)\n\t\t\t\t{\n\t\t\t\t\tif (!empty($form->form_item_names[$key]) && isset($form->form_item_labels[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extra_classes = ('heading' == $type) ? ' bwp-li-heading' : ' bwp-li-item';\n\t\t\t\t\t\t// Before the field\n\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\tdo_action('bwp_opa_before_field_' . $form->form_name . '_' . $form->form_item_names[$key], $form->form_name);\n\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\t// The field\n\t\t\t\t\t\t$return_str .= ('hidden' != $form->form_items[$key]) ? '<li class=\"clear' . $extra_classes . '\">' . $form->generate_html_fields($type, $form->form_item_names[$key]) . '</li>' : $form->generate_html_fields($type, $form->form_item_names[$key]) . \"\\n\";\n\t\t\t\t\t\t// After the field\n\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\tdo_action('bwp_opa_after_field_' . $form->form_name . '_' . $form->form_item_names[$key], $form->form_name);\n\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\tif (in_array($form->form_item_names[$key], $dividers))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$form_count++;\n\t\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\t\tdo_action('bwp_opa_after_divided_form_' . $form->form_name . '_' . $form_count, $form->form_name);\n\t\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\t\t$return_str .= apply_filters('bwp_opf_multi_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save All Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>', $form_count) . \"\\n\";\n\t\t\t\t\t\t\t$return_str .= '</div>' . \"\\n\";\n\t\t\t\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\">' . \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If this form needs to be divided, add the final Save all changes button\n\t\t\t\tif (0 < sizeof($dividers))\n\t\t\t\t\t$return_str .= apply_filters('bwp_opf_multi_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save All Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>', 'last') . \"\\n\";\n\t\t\t}\n\n\t\t\t$return_str .= '</ul>' . \"\\n\";\t\t\n\t\t\t$return_str .= apply_filters('bwp_opf_before_submit_button_' . $form->form_name, '');\n\t\t\techo $return_str;\n\t\t\tdo_action('bwp_opa_before_submit_button_' . $form->form_name, $form->form_name);\n\n\t\t\t$submit = apply_filters('bwp_opf_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>') . \"\\n\";\n\t\t\t$return_str = apply_filters('bwp_op_submit_button', $submit) . \"\\n\";\n\t\t\t$return_str .= '</form>' . \"\\n\";\n\n\t\t\tif (0 == sizeof($dividers))\n\t\t\t\t$return_str .= '</div>' . \"\\n\";\n\t\t}\n\n\t\t$return_str .= '<div class=\"clear\"><!-- --></div>' . \"\\n\";\n\t\t$return_str .= '</div>' . \"\\n\";\n\t\t$return_str .= '</div>' . \"\\n\";\n\n\t\techo $return_str;\n\t}", "protected function form()\n {\n $form = new Form(new Site);\n\n $form->select('category_id', '分类')->options(SiteCategory::selectOptions(null, ''))->rules('required');\n $form->text('title', '标题')->attribute('autocomplete', 'off')->rules('required|max:50');\n $form->image('thumb', '图标')->resize(120, 120)->uniqueName();\n $form->text('describe', '描述')->attribute('autocomplete', 'off')->rules('required|max:300');\n $form->url('url', '地址')->attribute('autocomplete', 'off')->rules('required|max:250');\n $this->disableFormFooter($form);\n return $form;\n }", "protected function form()\n {\n $form = new Form(new News);\n\n $form->text('title', '题目');\n // $form->number('category_id', '分类');\n $form->select('category_id','分类')->options('/api/admin_categories');\n // $form->textarea('content', 'Content');\n $form->ueditor('content','新闻内容')->rules('required');\n // $form->text('thumbnail', '封面图');\n $form->image('thumbnail', '封面图')->move('public/uploads/thunbnails');\n $form->number('status', '状态');\n $form->number('read_count', '阅读次数');\n\n return $form;\n }", "function mpc_html_form_code() {\n echo '<form action=\"' .esc_url( $_SERVER['REQUEST_URI'] ) . '\" method=\"post\">';\n echo '<p>';\n echo 'Il tuo Nome <br>';\n echo '<input type=\"text\" name=\"mpc-name\" pattern=\"[a-zA-Z0-9]+\" value=\"' . ( isset($_POST[\"mpc-name\"]) ? esc_attr( $_POST[\"mpc-name\"]) : '' ) . '\" size=40></p>';\n echo '<p>La tua email <br>';\n echo '<input type=\"email\" name=\"mpc-email\" value=\"' . ( isset($_POST[\"mpc-email\"]) ? esc_attr( $_POST[\"mpc-email\"]) : '' ) . '\" size=40></p>';\n echo 'Oggetto <br/>';\n\techo '<input type=\"text\" name=\"mpc-subject\" pattern=\"[a-zA-Z ]+\" value=\"' . ( isset( $_POST[\"mpc-subject\"] ) ? esc_attr( $_POST[\"mpc-subject\"] ) : '' ) . '\" size=\"40\" />';\n\techo '</p>';\n\techo '<p>Il tuo messaggio <br/>';\n\techo '<textarea rows=\"10\" cols=\"35\" name=\"mpc-message\">' . ( isset( $_POST[\"mpc-message\"] ) ? esc_attr( $_POST[\"mpc-message\"] ) : '' ) . '</textarea>';\n\techo '</p>';\n\techo '<p><input type=\"submit\" name=\"mpc-submitted\" value=\"Invia\"></p>';\n\techo '</form>';\n}", "protected function form()\n {\n $form = new Form(new CompanyCulture());\n\n $form->text('name', '企业名称')->rules('required');\n $form->text('en_name', '企业名称(en)')->rules('required');\n $form->image('image_url', '图片')->rules('required|image');\n $form->editor('content', '内容')->rules('required');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`列表`按钮\n $tools->disableList();\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "function storyForm($op) {\n // Generate new form object based on operation.\n if ($op == 'add') {\n $this->form = new HTML_QuickForm('add_story', 'POST', '/story/add');\n $btnLabel = 'Add';\n }\n elseif ($op == 'edit') {\n $this->form = new HTML_QuickForm('edit_story', 'POST', $this->f3->get('PATH'));\n $btnLabel = 'Save';\n }\n elseif ($op == 'delete') {\n $this->form = new HTML_QuickForm('deleteStory', 'POST', $this->f3->get('PATH'));\n $btnLabel = 'Delete';\n }\n\n // These fields only apply to add and edit operations.\n if ($op == 'add' || $op == 'edit') {\n // Add form elements\n $this->form->addElement('text', 'title', 'Title', ['class' => 'form-control']);\n $this->form->addElement('text', 'authors', 'Author(s)', ['class' => 'form-control']);\n $this->form->addElement('text', 'shortTitle', 'URL Friendly Title', ['class' => 'form-control']);\n\n // Set max size for file upload\n $this->form->setMaxFileSize($this->f3->get('maxFileSize'));\n $this->form->addElement('file', 'titlePage', 'Title Page', ['class' => 'form-control']);\n $this->form->addElement('radio', 'publish', 'Publish', 'Now', true, ['class' => 'form-check-input', 'id' => 'publish1']);\n $this->form->addElement('radio', 'publish', null, 'Later', false, ['class' => 'form-check-input', 'id' => 'publish2']);\n $this->form->addElement('text', 'date', 'Publish Date', ['class' => 'form-control', 'id' => 'datepicker']);\n }\n\n // Display buttons for all operations.\n $this->form->addElement('submit', 'btnSubmit', $btnLabel, ['class' => 'btn btn-primary']);\n $this->form->addElement('button','btnCancel','Cancel',['onClick' => \"window.location.href='/stories'\", 'class' => 'btn btn-outline-primary']);\n\n // Rules only apply for add and edit operations.\n if ($op == 'add' || $op == 'edit') {\n // Add validation.\n $this->form->addRule('title', 'Title is required', 'required');\n $this->form->addRule('shortTitle', 'Require field', 'required');\n\n // Only require a file upload on the add form.\n if ($op == 'add') {\n $this->form->addRule('titlePage', 'File is required', 'uploadedfile');\n }\n\n // Add custom validation rules found in \\Validation.\n $this->form->registerRule('uniqueShortTitle', 'function', 'validateShortTitle', $this->validation);\n $this->form->addRule('shortTitle', 'Short Title already exists', 'uniqueShortTitle', $this->identifier);\n // Picture dimensions must be specific size before upload\n $this->form->registerRule('pictureDimensions', 'function', 'validatePictureDimensions', $this->validation);\n $ruleMsg = 'Picture Dimensions are too small! Min Width: ' . $this->f3->get('imgLarge') . ' Min Height: ' . $this->f3->get('imgMinHeight');\n $this->form->addRule('titlePage', $ruleMsg, 'pictureDimensions');\n\n // Picture Mime Type must be of type jpg.\n $this->form->registerRule('pictureMimeType', 'function', 'validateMimeType', $this->validation);\n $this->form->addRule('titlePage', 'Picture file type not supported', 'pictureMimeType');\n\n }\n }", "function form_create($model, $options = array()) {\n $defaults = array(\n 'type' => false,\n 'method' => 'post',\n 'action' => BASE . $_GET['url']\n );\n\n $options = array_merge($defaults, $options);\n\n $output = '<form id=\"' . ucfirst(strtolower($model)) . 'Form\"';\n if($options['type'] == 'file') {\n $output .= ' enctype=\"multipart/form-data\"';\n }\n\n $output .= ' method=\"' . $options['method'] . '\"';\n $output .= ' action=\"' . $options['action'] . '\">';\n\n return html__output($output);\n}", "protected function form()\n {\n $form = new Form(new Goodss);\n $form->switch('is_enable','状态')->options([\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'default'],\n ]);\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n //$footer->disableReset();\n\n // 去掉`提交`按钮\n //$footer->disableSubmit();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "protected function form()\n {\n return WebItem::form(function (Form $form) {\n $form->text('title', '標題')->rules('required');\n $form->text('tag', 'TAG');\n $form->image('picture', '封面照')->rules('required|dimensions:ratio=57/28')->help('封面照比例限制為1140:560 (寬:高)');\n $form->wangEditor('content', '內容');\n $states = [\n 'on' => ['value' => 1, 'text' => '開啟', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '關閉', 'color' => 'default'],\n ];\n $form->switch('display', '是否顯示')->states($states);\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n $form->disableReset();\n });\n }", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n\n $form->tab('基本信息', function ($form) {\n\n //$form->display('id', 'ID');\n //$form->text('keyword', '关键词');\n $form->text('static_url', '静态地址')->help(\"如果输入:New-York-Downtown.html,则访问地址为:http://www.yinjispace.com/article/<span style='color:#F00;'>New-York-Downtown.html</span>\");\n $form->radio('article_status', '状态')->options(['0' => '草稿', '1' => '审核中', '2' => '已发布'])->default('0');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1' => '保密'])->default('0');\n $form->datetime('release_time', '发布时间')->format('YYYY-MM-DD HH:mm:ss');\n // $form->datetime('created_at','发布时间')->format('YYYY-MM-DD HH:mm:ss');\n $form->multipleSelect('category_ids', '分类')->options(ArticleCategory::getSelectOptions());\n $form->multipleSelect('topic_ids', '专题')->options(Topic::getSelectOptions());\n $form->text('tag_ids', '标签(逗号分隔)');\n $form->text('view_num', '浏览数')->default(0);\n $form->text('like_num', '点赞数')->default(0);\n $form->text('favorite_num', '收藏数')->default(0);\n $form->text('vip_download', '下载地址');\n //$form->multipleSelect('designer_id', '设计师ID')->options(Designer::getSelectOptions());\n $form->multipleSelect('designer_id', '设计师')->options(function ($ids) {\n $designer = Designer::find($ids);\n if ($designer) {\n return $designer->pluck('title_cn', 'id');\n }\n\n })->ajax('/admin/article/get_designer_select_options');\n $form->text('article_source', '文章来源');\n $form->text('article_source_url', '文章来源URL');\n $form->image('custom_thum', '自定义封面')\n ->uniqueName()\n ->widen(880)\n ->move('public/photo/images/custom_thum/');\n $form->image('special_photo', '特色照片')\n ->uniqueName()\n ->widen(1920)\n ->move('public/photo/images/special_photo/');\n $form->text('seo_title', 'SEO标题');\n $form->text('seo_keyword', 'SEO关键词');\n $form->text('seo_desc', 'SEO描述');\n })->tab('中文', function ($form) {\n\n $form->text('title_designer_cn', '标题(设计师)');\n $form->text('title_name_cn', '标题(项目名称)');\n $form->text('title_intro_cn', '标题(项目介绍)');\n $form->text('description_cn', '自定义描述(中)');\n $form->text('location_cn', '地域(中)');\n $form->ckeditor('detail.content_cn', '正文(中)');\n\n })->tab('English', function ($form) {\n\n $form->text('title_designer_en', '标题(设计师)');\n $form->text('title_name_en', '标题(项目名称)');\n $form->text('title_intro_en', '标题(项目介绍)');\n $form->text('description_en', '自定义描述(英)');\n $form->text('location_en', '地域(英)');\n $form->ckeditor('detail.content_en', '正文(英)');\n\n });\n\n //保存前回调\n $form->saving(function (Form $form) {\n if (empty($form->model()->release_time)) {\n $form->release_time = date('Y-m-d H:i:s');\n }\n });\n\n $form->saved(function (Form $form) {\n $tags = explode(',', $form->tag_ids);\n foreach ($tags as $tag) {\n echo $tag;\n $ret = ArticleTag::firstOrCreate(['name_cn' => trim($tag)]);\n }\n\n });\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new SiteHelp);\n\n $form->select('site_help_category_id', __('site-help::help.site_help_category_id'))\n ->options(SiteHelpCategory::pluck('name', 'id'));\n $form->text('title', __('site-help::help.title'));\n $form->number('useful', __('site-help::help.useful'))->default(0);\n $form->textarea('desc', __('site-help::help.desc'));\n $form->image('thumbnail', __('site-help::help.thumbnail'))\n ->removable()\n ->uniqueName()\n ->move('site-help');\n $form->UEditor('content', __('site-help::help.content'));\n $form->select('status', __('site-help::help.status.label'))\n ->default(1)\n ->options(__('site-help::help.status.value'));\n\n return $form;\n }", "public static function outputForm()\n {\n $out = <<<EOD\n <form method=\"post\" action=\"../webroot/rm-movies.php\" onsubmit=\"\">\n <input type=hidden name=search value='simple-search'/>\n <input type='text' name='title-simple' placeholder='Sök Filmtitel' />\n </form>\nEOD;\n return $out;\n }", "public function renderForm()\n {\n\n $table = \"luda_resource_has_tag\";\n $identifier = \"Light_Kit_Admin_UserData.generated/luda_resource_has_tag\";\n $parentLayout = \"Light_Kit_Admin/kit/zeroadmin/dev/mainlayout_base\";\n $vars = [\n \"title\" => \"Resource has tag form\",\n ];\n if (array_key_exists(\"solo\", $_GET)) {\n $parentLayout = \"Light_Kit_Admin/kit/zeroadmin/dev/mainlayout_solo\";\n $vars['related_links'] = []; // cancel any existing related links\n $this->setOnSuccessIframeSignal(\"done\");\n }\n\n $form = $this->processForm($identifier, $table);\n\n\n\n //--------------------------------------------\n // RENDERING\n //--------------------------------------------\n return $this->renderAdminPage('Light_Kit_Admin_UserData/kit/zeroadmin/generated/luda_resource_has_tag_form', [\n \"parent_layout\" => $parentLayout,\n \"form\" => $form,\n ], PageConfUpdator::create()->updateWidget(\"body.lka_chloroform\", [\n 'vars' => $vars,\n ]));\n }" ]
[ "0.71610034", "0.71610034", "0.7129157", "0.7129157", "0.710238", "0.70725465", "0.6895475", "0.6859712", "0.6825539", "0.6793011", "0.6716959", "0.67092943", "0.6687687", "0.66431993", "0.6615919", "0.66116625", "0.6607647", "0.6600392", "0.6579799", "0.65616065", "0.65399176", "0.6525117", "0.6503055", "0.64923745", "0.64826787", "0.6479039", "0.64713085", "0.6467147", "0.6449468", "0.6435669", "0.6414363", "0.6413887", "0.6390983", "0.63897383", "0.63814753", "0.6380556", "0.6362883", "0.63601613", "0.63465136", "0.6337441", "0.6336839", "0.6332268", "0.63298583", "0.63133544", "0.6312776", "0.6307784", "0.63077", "0.6307662", "0.6305951", "0.6294982", "0.629364", "0.62910104", "0.6280043", "0.6265262", "0.62651217", "0.6263249", "0.6255672", "0.62551445", "0.62496394", "0.6246372", "0.623569", "0.6226244", "0.62195116", "0.62161535", "0.6214651", "0.62140363", "0.62115544", "0.6199522", "0.6186913", "0.6186628", "0.6182896", "0.6181665", "0.61776316", "0.6170019", "0.61666465", "0.6165228", "0.6162871", "0.6160573", "0.6157752", "0.6153303", "0.61528915", "0.6150377", "0.6148059", "0.614447", "0.6143579", "0.6143205", "0.61401", "0.6135882", "0.61357945", "0.6131742", "0.61306185", "0.613042", "0.612388", "0.6120348", "0.6115721", "0.611495", "0.6114909", "0.6111203", "0.6104513", "0.6103871" ]
0.65717196
19
create html form for edit an existing platform and assign platform values to it
function editPlatformForm($id) { global $mysqli; $sql="SELECT * FROM platforms WHERE platformID=$id"; $result=$mysqli->query($sql)or die("query failed due to ".mysqli_error()); if($result->num_rows==0)//redirect if unknown id { logError("unkown platform id"); header("location:./platform.php"); exit(); } else {//load platform content to be edited $row=$result->fetch_assoc(); $name=$row['platformName']; $icon= $row['platformIcon']; $id=$row['platformID']; echo '<form action="./platform.php?action=update&id='.$id.'" method="post" enctype="multipart/form-data" id="editForm"> <label>Platform Name :</label><input type="text" name="name" value="'.$name.'" /><br /> <label>Platform Icon :</label><input type="file" value="upload" name="icon" /><br /> <input type="submit" name="submit" value="submit" /> </form>'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function form()\n {\n $form = new Form(new Platform());\n\n $form->text('platform_number', __('Platform number'))\n ->creationRules(['required', 'max:30', 'unique:platforms'])\n ->updateRules(['required', 'max:30']);\n $form->text('platform_name', __('Platform name'))\n ->creationRules(['required', 'max:30', 'unique:platforms'])\n ->updateRules(['required', 'max:30']);\n\n $form->footer(function ($footer){\n $footer->disableEditingCheck();\n });\n\n return $form;\n }", "protected function createComponentEditForm() {\r\n\t\t$form = new Form;\r\n\t\t$form->getElementPrototype()->class(\"formWide\");\r\n\t\t$options = array(0 => \"Default\", 1 => \"Odkaz na obsah\", 3 => \"Odkaz na položku menu\");\r\n\t\t// easy way how to create url slug\r\n\t\t$form->addText(\"title\", \"Název:\")\r\n\t\t\t\t->setAttribute('onchange', '\r\n\t\t\t\t\t\t\tvar nodiac = { \"á\": \"a\", \"č\": \"c\", \"ď\": \"d\", \"é\": \"e\", \"ě\": \"e\", \"í\": \"i\", \"ň\": \"n\", \"ó\": \"o\", \"ř\": \"r\", \"š\": \"s\", \"ť\": \"t\", \"ú\": \"u\", \"ů\": \"u\", \"ý\": \"y\", \"ž\": \"z\" };\r\n\t\t\t\t\t\t\ts = $(\"#frmeditForm-title\").val().toLowerCase();\r\n\t\t\t\t\t\t\tvar s2 = \"\";\r\n\t\t\t\t\t\t\tfor (var i=0; i < s.length; i++) {\r\n\t\t\t\t\t\t\t\ts2 += (typeof nodiac[s.charAt(i)] != \"undefined\" ? nodiac[s.charAt(i)] : s.charAt(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresult=s2.replace(/[^a-z0-9_]+/g, \"-\").replace(/^-|-$/g, \"\");\r\n\t\t\t\t\t\t\t$(\"#frmeditForm-url\").val(result);\r\n\t\t\t\t\t\t');\r\n\t\t$form->addText(\"url\", \"url:\")->setAttribute(\"readonly\", \"readonly\");\r\n\t\tif (!$this->onlyTree) {\r\n\t\t\t$form->addSelect(\"target_type\", \"Cíl:\", $options);\r\n\t\t\t$content = $this->prepareContentSelectBox();\r\n\t\t\t$menuContent = $this->prepareMenuContentSelectBox();\r\n\t\t\t$form->addSelect(\"target_id\", \"Odkazovaný obsah:\", $content)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t\t$form->addSelect(\"target_menu\", \"Odk. položka menu:\", $menuContent)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t}\r\n\t\t$form->addHidden(\"parent_id\", $this->parent_id);\r\n\t\t$form->addHidden(\"edit_id\", $this->edit_id);\r\n\t\t//filling form\r\n\t\tif ($this->edit_id or $this->edit_id === \"0\") {\r\n\t\t\t$defFromDb = $this->closureModel->getItemById($this->edit_id);\r\n\t\t\t$defaults = new \\Nette\\ArrayHash;\r\n\t\t\tforeach ($defFromDb as $key => $value) {\r\n\t\t\t\t$defaults->$key = $value;\r\n\t\t\t}\r\n\t\t\tif ($this->edit_id === \"0\") {\r\n\t\t\t\t$form[\"title\"]->setDisabled();\r\n\t\t\t}\r\n\t\t\tif (!$this->onlyTree) {\r\n\t\t\t\t$t = $defaults->target;\r\n\t\t\t\tif (!Validators::isNumericInt($t)) {\r\n\t\t\t\t\t$menuItem = $this->checkTargetMenuItemExists($t);\r\n\t\t\t\t\tif ($menuItem) {\r\n\t\t\t\t\t\t$defaults->target_type = 3;\r\n\t\t\t\t\t\t$defaults->target_menu = $menuItem;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$contentId = $this->checkTargetContentExists($t);\r\n\t\t\t\t\t\t$defaults->target_type = 1;\r\n\t\t\t\t\t\t$defaults->target_id = $contentId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t} elseif ($t <= 0) {\r\n\t\t\t\t\t$defaults->target_type = 0;\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t\t$form[\"target_id\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$defaults->target = null;\r\n\t\t\t$form->setDefaults($defaults);\r\n\t\t}\r\n\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t\t\t->setAttribute('onclick', '$(\"#frmeditForm-title\").trigger(\"change\")')\r\n\t\t\t\t->onClick[] = callback($this, 'editFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}", "function newPlatformForm()\n{\n echo '<form action=\"./platform.php?action=add\" method=\"post\" enctype=\"multipart/form-data\" id=\"editForm\">\n <label>Platform Name :</label><input type=\"text\" name=\"name\" /><br />\n <label>Platform Icon :</label><input type=\"file\" value=\"upload\" name=\"icon\" /><br />\n <input type=\"submit\" name=\"submit\" value=\"submit\" />\n </form>';\n}", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "function makeForm() {\n if($this->table_title != '' ) {\n $db_obj = new db_class();\n $desc_table = $db_obj->tableDescription($this->table_title);\n $db_obj->closeDB();\n \n// showArray($desc_table);\n echo '<form id=\"generic_edit_form\" method=\"POST\" >';\n echo '<input type=\"hidden\" name=\"title_input\" value=\"name\"> '; // THIS MUST BE HERE FOR CLONABLE FORMS!!!\n echo '<input type=\"hidden\" name=\"table\" value=\"vendors\">'; // THE TABLE MUST BE LABELED\n echo '<b>This is a generic input</b> <input type=\"text\" name=\"generic\">' . \"\\n\";\n \n echo '<br><br><input type=\"submit\" >';\n echo '</form>';\n } else {\n echo '<h2>hello, form<h2>';\n }\n }", "public function edit(Platform $platform)\n {\n return view('platforms.edit', ['platform' => $platform]);\n }", "public function display_edit_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=update' method='post'>\";\n echo \"<input type='hidden' name='id' value=\".$this->id.\" />\";\n echo \"Name: <input type='text' name='name' value=\".$this->name.\" /><br />\";\n echo \"Description: <textarea name='description'>\".$this->description.\"</textarea><br />\";\n echo \"<input type='submit' value='Update' />\";\n echo \"</form>\";\n }", "public function createComponentEditForm($val){\n\t\t$form = new \\Nette\\Application\\UI\\Form();\n\t\t$url = $this->link('pages:edit');\n\t\t$form->setAction($url);\n\t\t$form->addText('name', 'Název:')->setRequired('Zadejte název.')->setDefaultValue($val->name);\n\t\t$form->addText('title', 'Popis:')->setRequired('Zadejte popis.')->setDefaultValue($val->title);\n\t\t$form->addText('metadata', 'Klíčová slova:')->setRequired('Zadejte klíčová slova.')->setDefaultValue($val->metadata);\n\t\t$form->addText('rewrite', 'Adresa:')->setDefaultValue($val->rewrite);\n\t\t$form->addCheckbox('active', 'Aktivní')->setDefaultValue($val->active);\n\t\t$form->addText('order', 'Pořadí:')->setDefaultValue($val->order)->addRule(Form::NUMERIC, 'Musí být číslo.');\n\t\t$form->addHidden('id', $val->id);\n\t\t$form->addSubmit('submit', 'Vytvořit');\n\t\t$form->onSubmit[] = callback($this, 'editFormSubmitted');\n\t\treturn $form;\n\t}", "public function edit()\n\t{\n\t//mnot finished\n\t\techo '<div id=\"content\">';\n\t\t$this->par->load(\"form2\",\"fb\");\n\t\t$fb = $this->par->fb;\n\t\t$fb->_init(false,\" id=\\\"forms\\\"\",false,true);//autofill=false, validate = true\n\t\t\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'label' => 'Project Name:',\n\t\t\t\t'name' => 'name',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => 'User ID',\n\t\t\t\t'name' => 'userID',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => 'Start Month',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'name' => 'start_month',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => 'Start Day(e.g., 01)',\n\t\t\t\t'name' => 'start_day',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => 'Start Year',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'name' => 'start_year',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => 'End Month',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'name' => 'End_month',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => 'End Day(e.g., 01)',\n\t\t\t\t'name' => 'End_day',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => 'End Year',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'name' => 'End_year',\n\t\t\t\t'rules' => 'required'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => 'Possible Domain:',\n\t\t\t\t'name' => 'domain'\n\t\t\t),array(\n\t\t\t\t'label' => 'Possible Host:',\n\t\t\t\t'name' => 'host'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$fb->set_select(\"start_month\",array(\"Jan\"=>1,\"Feb\"=>2,\"Mar\"=>3,\"Apr\"=>4,\"May\"=>5,\"Jun\"=>6,\"Jul\"=>7,\"Aug\"=>8,\"Sep\"=>9,\"Oct\"=>10,\"Nov\"=>11,\"Dec\"=>12));\n\t\t$year= date('Y');\n\t\t$fb->set_select(\"start_year\",array(($year-1)=>$year-1,($year)=>$year,($year+1)=>$year+1,($year+2)=>$year+2,($year+3)=>$year+3,($year+4)=>$year+4));\n\t\t$fb->set_select(\"End_month\",array(\"Jan\"=>1,\"Feb\"=>2,\"Mar\"=>3,\"Apr\"=>4,\"May\"=>5,\"Jun\"=>6,\"Jul\"=>7,\"Aug\"=>8,\"Sep\"=>9,\"Oct\"=>10,\"Nov\"=>11,\"Dec\"=>12));\n\t\t$year= date('Y');\n\t\t$fb->set_select(\"End_year\",array(($year-1)=>$year-1,($year)=>$year,($year+1)=>$year+1,($year+2)=>$year+2,($year+3)=>$year+3,($year+4)=>$year+4));\n\t\t\n\t\t$fb->set_inputs($params);\n\t\tif($fb->error == TRUE)\n\t\t{\n\t\t\t$fb->display();\n\t\t}\n\t\telse\n\t\t{\t\n $inputs = $fb->get_inputs();\n var_dump($inputs);\n\t\t\t$this->par->DB->update_projects($inputs);\n\t\t\t$this->view();\n\t\t}\t\n\t\techo '</div>';\n\t}", "public function createComponentEditForm(){\n $frm = $this->formFactory->create();\n $listingID = $this->hlp->sess(\"listing\")->listingID;\n \n //query database for listing type\n $FE = $this->listings->isFE($listingID);\n $MS = $this->listings->isMultisig($listingID);\n \n //checkbox value rendering logic\n $checkVal = array();\n \n if ($MS){\n $checkVal[\"ms\"] = \"ms\";\n }\n \n if ($FE){\n $checkVal[\"fe\"] = \"fe\";\n }\n \n $this->lHelp->constructCheckboxList($frm)->setValue($checkVal);\n \n //discard option array\n unset($checkVal);\n\n $cnt = count ($this->postageOptions); \n $session = $this->hlp->sess(\"postage\");\n\n \n for ($i = 0; $i<$cnt; $i++){\n\n $frm->addText(\"postage\" . $i, \"Doprava\");\n $frm->addText(\"pprice\" . $i, \"Cena dopravy\");\n\n }\n \n //additional postage textboxes logic\n $counter = $session->counterEdit;\n $values = $session->values;\n \n if (!is_null($counter)){\n \n $frm->addGroup(\"Postage\");\n \n for ($i =0; $i<$counter; $i++){\n $frm->addText(\"postage\" .$i. \"X\", \"Doprava\"); \n $frm->addText(\"pprice\" .$i. \"X\", \"Cena\");\n }\n }\n \n $frm->addSubmit(\"submit\", \"Upravit\");\n $frm->addSubmit(\"add_postage\", \"Přidat dopravu\")->onClick[] = \n \n function() use($listingID) {\n \n //inline onlclick handler, that counts postage options\n $session = $this->hlp->sess(\"postage\");\n $counter = &$session->counterEdit;\n \n if ($counter <= self::MAX_POSTAGE_OPTIONS){\n $counter++;\n } else {\n $this->flashMessage(\"Dosáhli jste maxima poštovních možností.\");\n }\n \n $form = $this->getComponent(\"editForm\");\n $session->values = $form->getValues(TRUE);\n \n $this->redirect(\"Listings:editListing\", $listingID);\n };\n \n $this->lHelp->fillForm($frm, $values); \n $frm->onSuccess[] = array($this, 'editSuccess');\n $frm->onValidate[] = array($this, 'editValidate');\n \n return $frm; \n }", "public function edit()\n {\n $this->title = sprintf('%s: %s', _('Edit'), $this->obj->get('name'));\n unset($this->headerData);\n $this->attributes = array(\n array(),\n array(),\n );\n $this->templates = array(\n '${field}',\n '${input}',\n );\n $fields = array(\n _('LDAP Connection Name') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"name\" name=\"name\" value=\"%s\"/>',\n (\n $_REQUEST['name'] ?\n $_REQUEST['name'] :\n $this->obj->get('name')\n )\n ),\n _('LDAP Server Description') => '<textarea name=\"description\">'\n . (\n $_REQUEST['description'] ?\n $_REQUEST['description'] :\n $this->obj->get('description')\n )\n . '</textarea>',\n _('LDAP Server Address') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"address\" name=\"address\" value=\"%s\"/>',\n (\n $_REQUEST['address'] ?\n $_REQUEST['address'] :\n $this->obj->get('address')\n )\n ),\n _('LDAP Server Port') => '<select id=\"port\" name=\"port\">'\n . sprintf(\n '<option value=\"\">- %s -</option>',\n self::$foglang['PleaseSelect']\n )\n . sprintf(\n '<option value=\"389\"%s>389</option>',\n (\n $_REQUEST['port'] == 389 ?\n ' selected' :\n (\n $this->obj->get('port') == 389 ?\n ' selected' :\n ''\n )\n )\n )\n . sprintf(\n '<option value=\"636\"%s>636</option>',\n (\n $_REQUEST['port'] == 636 ?\n ' selected' :\n (\n $this->obj->get('port') == 636 ?\n ' selected' :\n ''\n )\n )\n )\n . '</select>',\n _('Use Group Matching (recommended)') => '<select id=\"useGroupMatch\" '\n . 'name=\"useGroupMatch\">'\n . sprintf(\n '<option value=\"0\"%s>%s</option>',\n (\n $_REQUEST['useGroupMatch'] < 1 ?\n ' selected' :\n (\n $this->obj->get('useGroupMatch') < 1 ?\n ' selected' :\n ''\n )\n ),\n _('No')\n )\n . sprintf(\n '<option value=\"1\"%s>%s</option>',\n (\n $_REQUEST['useGroupMatch'] > 0 ?\n ' selected' :\n (\n $this->obj->get('useGroupMatch') > 0 ?\n ' selected' :\n ''\n )\n ),\n _('Yes')\n )\n . '</select>',\n _('Search Base DN') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"searchDN\" name=\"searchDN\" value=\"%s\"/>',\n (\n $_REQUEST['searchDN'] ?\n $_REQUEST['searchDN'] :\n $this->obj->get('searchDN')\n )\n ),\n _('Group Search DN') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"grpSearchDN\" name=\"grpSearchDN\" value=\"%s\"/>',\n (\n $_REQUEST['grpSearchDN'] ?\n $_REQUEST['grpSearchDN'] :\n $this->obj->get('grpSearchDN')\n )\n ),\n _('Admin Group') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"adminGroup\" name=\"adminGroup\" value=\"%s\"/>',\n (\n $_REQUEST['adminGroup'] ?\n $_REQUEST['adminGroup'] :\n $this->obj->get('adminGroup')\n )\n ),\n _('Mobile Group') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"userGroup\" name=\"userGroup\" value=\"%s\"/>',\n (\n $_REQUEST['userGroup'] ?\n $_REQUEST['userGroup'] :\n $this->obj->get('userGroup')\n )\n ),\n _('Initial Template') => '<select class=\"smaller\" '\n . 'id=\"inittemplate\">'\n . '<option value=\"pick\" selected >Pick a template</option>'\n . '<option value=\"msad\">Microsoft AD</option>'\n . '<option value=\"open\">OpenLDAP</option>'\n . '<option value=\"edir\">Generic LDAP</option>'\n . '</select>',\n _('User Name Attribute') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"userNamAttr\" name=\"userNamAttr\" value=\"%s\"/>',\n (\n $_REQUEST['userNamAttr'] ?\n $_REQUEST['userNamAttr'] :\n $this->obj->get('userNamAttr')\n )\n ),\n _('Group Member Attribute') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"grpMemberAttr\" name=\"grpMemberAttr\" value=\"%s\"/>',\n (\n $_REQUEST['grpMemberAttr'] ?\n $_REQUEST['grpMemberAttr'] :\n $this->obj->get('grpMemberAttr')\n )\n ),\n _('Search Scope') => '<select id=\"searchScope\" name=\"searchScope\">'\n . sprintf(\n '<option value=\"\">- %s -</option>',\n self::$foglang['PleaseSelect']\n )\n . sprintf(\n '<option value=\"0\"%s>%s</option>',\n (\n isset($_REQUEST['searchScope'])\n && $_REQUEST['searchScope'] == 0 ?\n ' selected' :\n (\n $this->obj->get('searchScope') == 0 ?\n ' selected' :\n ''\n )\n ),\n _('Base only')\n )\n . sprintf(\n '<option value=\"1\"%s>%s</option>',\n (\n $_REQUEST['searchScope'] == 1 ?\n ' selected' :\n (\n $this->obj->get('searchScope') == 1 ?\n ' selected' :\n ''\n )\n ),\n _('Base and subtree')\n )\n . sprintf(\n '<option value=\"2\"%s>%s</option>',\n (\n $_REQUEST['searchScope'] == 2 ?\n ' selected' :\n (\n $this->obj->get('searchScope') == 2 ?\n ' selected' :\n ''\n )\n ),\n _('Subtree and below')\n )\n . '</select>',\n _('Bind DN') => '<input class=\"smaller\" type=\"text\" '\n . sprintf(\n 'id=\"bindDN\" name=\"bindDN\" value=\"%s\"/>',\n (\n $_REQUEST['bindDN'] ?\n $_REQUEST['bindDN'] :\n $this->obj->get('bindDN')\n )\n ),\n _('Bind Password') => '<input class=\"smaller\" type=\"password\" '\n . sprintf(\n 'id=\"bindPwd\" name=\"bindPwd\" value=\"%s\"/>',\n (\n $_REQUEST['bindPwd'] ?\n $_REQUEST['bindPwd'] :\n $this->obj->get('bindPwd')\n )\n ),\n '&nbsp;' => sprintf(\n '<input class=\"smaller\" name=\"update\" type=\"submit\" value=\"%s\"/>',\n _('Update')\n ),\n );\n foreach ((array)$fields as $field => &$input) {\n $this->data[] = array(\n 'field' => $field,\n 'input' => $input,\n );\n unset($input);\n }\n unset($fields);\n self::$HookManager->processEvent(\n 'LDAP_EDIT',\n array(\n 'headerData' => &$this->headerData,\n 'data' => &$this->data,\n 'templates' => &$this->templates,\n 'attributes' => &$this->attributes\n )\n );\n printf('<form method=\"post\" action=\"%s\">', $this->formAction);\n $this->render();\n echo '</form>';\n }", "public function add_edit_form(){\n\n $_id = $_GET['id']; \n $tblName = $this->get_tbl_name();\n\n $source = DB::table($tblName)->where('id',$_id)->get();\n\n $source_first = $source[0];\n\n // mhtml::dump($source_first);\n\n\n $struct = $this->struct;\n\n mhtml::startForm(\"edit\",\"backend_edit.php\");\n\n // loop througth fields\n foreach ($this->edit as $key => $field) {\n\n $kind = $struct[$field] ;\n if($kind == 'string') {$kind = 'text' ;} \n $value = $source_first[$field];\n\n mhtml::field($this->virtual_names[$field],$field,$kind,$value);\n\n }\n\n // add secret field for password\n if(isset($this->edit_secret)){\n if($this->edit_secret == true ){\n\n Logger::warn(\"we use one secret only on secret[0] in secret array in model\");\n $virtual_pass = $this->virtual_names[$this->secret[0]];\n mhtml::field($virtual_pass,$this->secret[0],'password');\n\n }\n }\n\n \n\n\n\n\n // mhtml::field('user name ','user_name','text',\"mohammed\");\n // mhtml::field('passwording','password','password');\n // mhtml::field('age','age','number');\n\n mhtml::field_id_model();\n\n mhtml::submitForm();\n\n mhtml::endForm();\n\n }", "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n \t\t'class'\t=> array(),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'category_id'\t=> array('type' => 'select_category', 'label' => 'Category', 'required' => true,\n \t\t\t\t'options' => CategoryExt::getCategoryList()),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t\t'order_by' => array('type' => 'select', 'options' => $this->settingDefault['order_by']),\n \t\t'order_direction' => array('type' => 'select', 'options' => $this->settingDefault['order_direction']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "public function form()\n {\n $this->switch('footer_remove', Support::trans('main.footer_remove'))\n ->default(admin_setting('footer_remove'));\n $defaultColors = [\n 'default' => '墨蓝',\n 'blue' => '蓝',\n 'blue-light' => '亮蓝',\n 'green' => '墨绿',\n ];\n foreach (explode(\",\", ServiceProvider::setting('additional_theme_colors')) as $value) {\n if (!empty($value)) {\n [$k, $v] = explode(\":\", $value);\n $defaultColors[$k] = $v;\n }\n }\n\n $this->radio('theme_color', Support::trans('main.theme_color'))\n ->options($defaultColors)\n ->default(admin_setting('theme_color'));\n $this->radio('sidebar_style', Support::trans('main.sidebar_style'))\n ->options([\n 'default' => '默认',\n 'sidebar-separate' => '菜单分离',\n 'horizontal_menu' => '水平菜单'\n ])\n ->default(admin_setting('sidebar_style'));\n $this->switch('grid_row_actions_right', Support::trans('main.grid_row_actions_right'))\n ->help('启用后表格行操作按钮将永远贴着最右侧。')\n ->default(admin_setting('grid_row_actions_right'));\n }", "private function buildGitHubWForm(&$form) {\n $git_settings = $this->configFactory->get('simple_git.settings');\n\n $form['git_hub'] = [\n '#type' => 'fieldset',\n '#title' => $this->t('GitHub Web settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n ];\n\n $form['git_hub']['git_hub_app_id'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub App Web Id'),\n '#description' => $this->t('GitHub App Web Id value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_id'],\n ];\n\n $form['git_hub']['git_hub_app_secret'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub App Web Secret'),\n '#description' => $this->t('GitHub App Web Secret value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_secret'],\n ];\n\n $form['git_hub']['git_hub_app_url_redirect'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub URL Web Redirect'),\n '#description' => $this->t('GitHub URL Web Redirect value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_url_redirect'],\n ];\n\n $form['git_hub']['git_hub_app_name'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub App Web Name'),\n '#description' => $this->t('GitHub App Web Name'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_name'],\n ];\n\n }", "function ccdev_hosting_form($form, &$form_state, $entity) {\n $form['site_name'] = array(\n '#type' => 'textfield',\n '#title' => t('Site Name'),\n '#required' => TRUE,\n '#default_value' => $entity->site_name,\n );\n $form['site_domain'] = array(\n '#type' => 'textfield',\n '#title' => t('Site Domain'),\n '#required' => TRUE,\n '#default_value' => $entity->site_domain,\n );\n $form['site_description'] = array(\n '#type' => 'textfield',\n '#title' => t('Description'),\n '#required' => FALSE,\n '#default_value' => $entity->site_description,\n );\n $form['site_cms'] = array(\n '#type' => 'textfield',\n '#title' => t('Site CMS'),\n '#required' => TRUE,\n '#default_value' => $entity->site_cms,\n );\n $form['group_price'] = array(\n '#type' => 'textfield',\n '#title' => t('Package'),\n '#required' => TRUE,\n '#default_value' => $entity->group_price,\n );\n\n $form['basic_entity'] = array(\n '#type' => 'value',\n '#value' => $entity,\n );\n field_attach_form('ccdev_hosting', $entity, $form, $form_state);\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Create Host'),\n '#weight' => 100,\n );\n\n return $form;\n}", "public function getEditForm();", "public function form()\n {\n\n $this->hidden('key', '字段名')->rules('required');\n $this->editor('val', '平台规则')->rules('required');\n }", "function display_machine_type_edit_form($user, $id=false) {\r\n if (!($id === false)) {\r\n try {\r\n $machineType = new MachineType($user->dbConn, $id);\r\n } catch (Exception $e) {\r\n $id = false;\r\n }\r\n }\r\n echo \"<form action='machine_type.php\".(($id === false) ? \"\" : \"?id=\".intval($id)).\"' method='POST' class='form-horizontal'>\r\n <fieldset>\r\n <div class='control-group'>\r\n <label class='control-label' for='machine_type[name]'>Name</label>\r\n <div class='controls'>\r\n <input name='machine_type[name]' type='text' class='input-xlarge' id='machine_type[name]'\".(($id === false) ? \"\" : \" value='\".escape_output($machineType->name).\"'\").\">\r\n </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='machine_type[description]'>Description</label>\r\n <div class='controls'>\r\n <input name='machine_type[description]' type='text' class='input-xlarge' id='machine_type[description]'\".(($id === false) ? \"\" : \" value='\".escape_output($machineType->description).\"'\").\">\r\n </div>\r\n </div>\r\n <div class='form-actions'>\r\n <button type='submit' class='btn btn-primary'>\".(($id === false) ? \"Add Machine Type\" : \"Save changes\").\"</button>\r\n <a href='#' onClick='window.location.replace(document.referrer);' class='btn'>\".(($id === false) ? \"Go back\" : \"Discard changes\").\"</a>\r\n </div>\r\n </fieldset>\\n</form>\\n\";\r\n}", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "protected function form($hasEdit=false)\n {\n $form = new Form(new Elevator);\n $pj=Project::where('status','>=',0);\n $city=getCity();$brand=getBrand();\n if($city!='*'){\n $pj->whereIn('city_id',$city);\n }\n if($brand!='*'){\n $pj->whereIn('brand',$brand);\n }\n $pj=$pj->get();\n $arr=Arr::pluck($pj, 'name','id');\n //var_dump($pj,$arr);\n $form->select('pid','项目')->options($arr)->required();\n $form->text('region','梯号');\n $form->divide();\n $form->hidden('did','DID');\n $form->hidden('did_old','DID');\n $form->hidden('status','status');\n if($hasEdit){\n $form->display('device','已选电梯设备')->with(function ($value) {\n $text=deviceName($value).' <a id=\"device\">点击修改</a>';\n$html=<<<HTML\n$text\n<script>\n$(function(){\n var device=$('#device').parents('.form-group');\n console.log(device);\n device.next().hide().next().hide().next().hide().next().hide();\n device.on('click',function(){\n $('select[name=\"q_brand_set\"]').trigger('change');\n device.next().show().next().show().next().show().next().show();\n })\n});\n</script>\nHTML;\n\n\n return $html;\n });\n }\n $dsArr=[];\n if($brand!='*'){\n foreach(Device::whereIn('brand',$brand)->groupBy('brand','brand_set')->get() as $d){\n $dsArr[$d->brand.'/'.$d->brand_set]=$d->brand.'/'.$d->brand_set;\n }\n }else{\n foreach(Device::groupBy('brand','brand_set')->get() as $d){\n $dsArr[$d->brand.'/'.$d->brand_set]=$d->brand.'/'.$d->brand_set;\n }\n }\n\n if($hasEdit){\n $form->select('q_brand_set','品牌系列')->options($dsArr)\n ->load('q_dload', '/admin/device/options/dload');\n\n $form->select('q_dload','载重')->load('q_speedup', '/admin/device/options/speedup');\n $form->select('q_speedup','速度')->load('layer_number', '/admin/device/options/floor');\n $form->select('layer_number','层站');\n }else{\n $form->select('q_brand_set','品牌系列')->options($dsArr)->required()\n ->load('q_dload', '/admin/device/options/dload');\n\n $form->select('q_dload','载重')->required()->load('q_speedup', '/admin/device/options/speedup');\n $form->select('q_speedup','速度')->required()->load('layer_number', '/admin/device/options/floor');\n $form->select('layer_number','层站')->required();\n }\n\n //$form->number('layer_number','层站')->min(1)->required()->default(2);\n $form->divide();\n\n $form->number('num','电梯数量')->min(1)->required();\n $form->number('height','提升高度(m)')->min(1)->required()->help('总爬升高度');\n //$form->number('layer_number','层数')->min(1)->required();\n $form->number('layer_number_site','站数')->min(1)->required();\n $form->number('layer_number_door','门数')->min(1)->required();\n $form->number('pit_depth','底坑深度(mm)');\n $form->number('top_height','顶层高度(mm)');\n\n $form->number('hall_width','厅门尺寸(mm)宽');\n $form->number('hall_height','厅门尺寸(mm)高');\n\n $form->number('car_width','轿厢尺寸(mm)宽');\n $form->number('car_height','轿厢尺寸(mm)高');\n $form->number('car_depth','轿厢尺寸(mm)深');\n\n $states = [\n 'on' => ['value' => 1, 'text' => '有', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '没有', 'color' => 'danger'],\n ];\n $form->switch('has_through_door','是否有贯通门')->states($states);\n $form->text('desc','电梯说明');\n\n $form->divide();\n //$form->file('file_1','附件1');\n $form->largefile('file_1', '附件1');\n $form->html(function (){\n if($this->file_1){\n return '<a href=\"'.(str_replace('//dt.','//dtfile.',url($this->file_1))).'\" target=\"_blank\">附件1: '.$this->file_1.'</a>';\n }\n }, $label = '');\n $form->largefile('file_2','附件2');\n $form->html(function (){\n if($this->file_2){\n return '<a href=\"'.(str_replace('//dt.','//dtfile.',url($this->file_2))).'\" target=\"_blank\">附件2: '.$this->file_2.'</a>';\n }\n }, $label = '');\n $form->largefile('file_3','附件3');\n $form->html(function (){\n if($this->file_3){\n return '<a href=\"'.(str_replace('//dt.','//dtfile.',url($this->file_3))).'\" target=\"_blank\">附件3: '.$this->file_3.'</a>';\n }\n }, $label = '');\n\n //忽略字段\n //$form->ignore(['_brand']);\n $form->saving(function (Form $form){\n //$form->did=$form->did>0?$form->did:$form->model()->did;\n $form->did='';\n if($form->layer_number){\n list($form->q_brand_set,$form->q_dload,$form->q_speedup,$form->layer_number)=explode('@',$form->layer_number);\n if($form->q_brand_set && $form->q_dload && $form->q_speedup && $form->layer_number){\n $q_brand_set=explode('/',$form->q_brand_set);\n $query=[\n 'brand'=>array_shift($q_brand_set),\n 'brand_set'=>implode('/',$q_brand_set),\n 'dload'=>$form->q_dload,\n 'speedup'=>$form->q_speedup,\n 'floor'=>$form->layer_number,\n ];\n //DB::connection()->enableQueryLog();\n $did=Device::where($query)->value('id');\n //dd($did,DB::getQueryLog());\n //throw new Exception(DB::getQueryLog());\n if($did){\n $form->did=$did;\n }else{\n throw new Exception('未找到电梯设备,请核对电梯参数');\n }\n }else{\n throw new Exception('请完善电梯参数');\n }\n }else{\n $form->did=$form->model()->did;\n $form->q_brand_set=$form->model()->q_brand_set;\n $form->q_dload=$form->model()->q_dload;\n $form->q_speedup=$form->model()->q_speedup;\n $form->layer_number=$form->model()->layer_number;\n }\n if(!$form->did){\n throw new Exception('未找到电梯设备,请核对电梯参数');\n }\n $form->did_old=$form->did;\n if($form->model()->did){\n $form->did_old=$form->model()->did;\n }\n });\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n });\n return $form;\n }", "function theme_devshop_projects_create_settings_form($vars) {\n $form = $vars['form'];\n $rows = array();\n $header = array();\n foreach (element_children($form['environments']) as $env_name) {\n $row = array();\n $header['primary'] = 'Primary';\n $header['name'] = 'Name';\n $header['git_ref'] = t('Branch/Tag');\n\n $name_element = $form['environments'][$env_name]['name'];\n $git_ref_element = $form['environments'][$env_name]['git_ref'];\n $settings_element = $form['environments'][$env_name]['settings'];\n\n $primary_radio = $form['primary_environment'][$env_name];\n $primary_radio['#title'] = '';\n $primary_radio['#attributes']['class'][] = 'pull-right';\n \n $row[] = drupal_render($primary_radio);\n $row[] = drupal_render($name_element);\n $row[] = drupal_render($git_ref_element);\n\n foreach (element_children($settings_element) as $setting) {\n if (!isset($header[$setting])) {\n $header[$setting] = isset($form['environments'][$env_name]['settings'][$setting]['#title']) ? $form['environments'][$env_name]['settings'][$setting]['#title'] : '';\n }\n $form['environments'][$env_name]['settings'][$setting]['#title'] = '';\n\n $element = $form['environments'][$env_name]['settings'][$setting];\n $row[] = drupal_render($element);\n }\n $rows[] = $row;\n }\n $output = theme('table', array(\n 'header' => $header,\n 'rows' => $rows,\n 'attributes' => array(\n 'class' => array('table', 'project-environments-table'),\n )\n ));\n return $output;\n}", "private function buildGitLabWForm(&$form) {\n $git_settings = $this->configFactory->get('simple_git.settings');\n\n $form['git_lab'] = [\n '#type' => 'fieldset',\n '#title' => $this->t('GitLab Web settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n ];\n\n $form['git_lab']['git_lab_app_id'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Web Id'),\n '#description' => $this->t('GitLab App Web Id value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_id'],\n ];\n\n $form['git_lab']['git_lab_app_secret'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Web Secret'),\n '#description' => $this->t('GitLab App Web Secret value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_secret'],\n ];\n\n $form['git_lab']['git_lab_app_url_redirect'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab URL Web Redirect'),\n '#description' => $this->t('GitLab URL Web Redirect value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_url_redirect'],\n ];\n\n }", "protected function form()\n {\n return Admin::form(PlatformFile::class, function (Form $form) {\n\n $form->display('id', 'ID');\n $form->multipleSelect('platform_ids', '主机')->options(Platform::all()->pluck('platform_name', 'id'))->attribute(['required'=>'required']);\n $form->multipleSelect('file_ids', '软件')->options(File::all()->pluck('name', 'id'))->attribute(['required'=>'required']);\n $form->text('upload_path', '上传路径');\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n\n $form->setAction('/admin/platform-file-application');\n });\n }", "protected function _prepareForm()\n {\n $model = Mage::registry('maduranga_wall');\n\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n ));\n\n $fieldset = $form->addFieldset('base_fieldset', array(\n 'legend' => $this->__('Visualizer Background Information'),\n 'class' => 'fieldset-wide',\n ));\n\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', array(\n 'name' => 'id',\n ));\n }\n\n $fieldset->addField('name', 'text', array(\n 'name' => 'name',\n 'label' => $this->__('Name'),\n 'title' => $this->__('Name'),\n 'required' => true,\n ));\n\n $fieldset->addField('image', 'file', array(\n 'name' => 'image',\n 'label' => $this->__('Background Image'),\n 'title' => $this->__('Background Image'),\n 'required' => true,\n ));\n\n $fieldset->addField('status', 'select', array(\n 'label' => $this->__('Status'),\n 'name' => 'status',\n 'required' => true,\n 'values' => array(\n array(\n 'value' => 1,\n 'label' => $this->__('Enable'),\n ),\n\n array(\n 'value' => 0,\n 'label' => $this->__('Disable'),\n ),\n ),\n ));\n\n $form->setValues($model->getData());\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "function buildForm(){\n\t\t# menampilkan form\n\t}", "function do_form(){\n\t\tob_start();\n\t\t\n\t\t$op = ($this->id_base == $this->id)? __('Add', JCF_TEXTDOMAIN) : __('Edit', JCF_TEXTDOMAIN);\n\t\t?>\n\t\t<div class=\"jcf_edit_field\">\n\t\t\t<h3 class=\"header\"><?php echo $op . ' ' . $this->title; ?></h3>\n\t\t\t<div class=\"jcf_inner_content\">\n\t\t\t\t<form action=\"#\" method=\"post\" id=\"jcform_edit_field\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id\" value=\"<?php echo $this->id; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_number\" value=\"<?php echo $this->number; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id_base\" value=\"<?php echo $this->id_base; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"fieldset_id\" value=\"<?php echo $this->fieldset_id; ?>\" />\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->form( $this->instance );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// need to add slug field too\n\t\t\t\t\t\t\t$slug = esc_attr($this->slug);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('slug'); ?>\"><?php _e('Slug:', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('slug'); ?>\" name=\"<?php echo $this->get_field_name('slug'); ?>\" type=\"text\" value=\"<?php echo $slug; ?>\" />\n\t\t\t\t\t\t\t<br/><small><?php _e('Machine name, will be used for postmeta field name.', JCF_TEXTDOMAIN); ?></small>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t// enabled field\n\t\t\t\t\t\t\tif( $this->is_new ){\n\t\t\t\t\t\t\t\t$this->instance['enabled'] = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('enabled'); ?>\">\n\t\t\t\t\t\t\t\t<input class=\"checkbox\" type=\"checkbox\" \n\t\t\t\t\t\t\t\t\t\tid=\"<?php echo $this->get_field_id('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tname=\"<?php echo $this->get_field_name('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tvalue=\"1\" <?php checked(true, @$this->instance['enabled']); ?> />\n\t\t\t\t\t\t\t\t<?php _e('Enabled', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"field-control-actions\">\n\t\t\t\t\t\t\t<div class=\"alignleft\">\n\t\t\t\t\t\t\t\t<?php if( $op != __('Add', JCF_TEXTDOMAIN) ) : ?>\n\t\t\t\t\t\t\t\t<a href=\"#remove\" class=\"field-control-remove\"><?php _e('Delete', JCF_TEXTDOMAIN); ?></a> |\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t<a href=\"#close\" class=\"field-control-close\"><?php _e('Close', JCF_TEXTDOMAIN); ?></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"alignright\">\n\t\t\t\t\t\t\t\t<?php echo print_loader_img(); ?>\n\t\t\t\t\t\t\t\t<input type=\"submit\" value=\"<?php _e('Save', JCF_TEXTDOMAIN); ?>\" class=\"button-primary\" name=\"savefield\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<br class=\"clear\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\t\t\n\t\t$html = ob_get_clean();\n\t\treturn $html;\n\t}", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->select('company_id', '公司名称')->options(Company::getSelectOptions());\n $form->text('project_name', '项目名称');\n $form->image('project_photo', '项目图片')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->url('link_url', '项目链接');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }", "public function formEnvironment()\n {\n\n // Todo\n // - add : define params : ports, id, dockerfile, passwords (+ check & error message -> ex : ports)\n // - edit (warning : volumes erased and add copy source if first delete then reconstruct => check commented \"formEnvironment\" method)\n\n if (\n //(!isset($_POST['webserverTrigger']) || empty($_POST['webserverTrigger'])) && // Todo : when webserver not embedded in php\n (!isset($_POST['phpTrigger']) || empty($_POST['phpTrigger'])) &&\n (!isset($_POST['mysqlTrigger']) || empty($_POST['mysqlTrigger'])) &&\n (!isset($_POST['sftp']) || empty($_POST['sftp']))\n ) {\n // Todo : proper error (display error flash ?!)\n exit ('no options choosen');\n }\n\n\n // Todo more params setable\n // Todo Errors\n // Todo Mails (params env.php)\n // Todo Facto\n // Todo : Warning session problem (db empty & exemple : no logout)\n // Todo : Warning ion_auth_users_groups delete cascade (+check all)\n\n\n // Load models\n $this->load->model('Environments_model');\n $this->load->model('Mysqlversions_model');\n $this->load->model('Phpversions_model');\n\n // Load helpers\n $this->load->helpers('Security_helper');\n\n // Load libs\n $this->load->library('zip');\n\n // User id\n $userId = $this->ion_auth->user()->row()->id;\n if (!isset($userId) || empty($userId)) {\n // Todo : proper error (display error flash ?!)\n exit ('no user id');\n }\n\n // 1. Instantiate environment\n $environment = new stdClass();\n\n // 2. Set userId\n $environment->{Environments_model::userId} = $userId;\n\n // 3. Set folder uniqId\n $phpUniqueId = uniqid();\n $environment->{Environments_model::folder} = $phpUniqueId;\n //Custom id management $environment->{Environments_model::folder} = (isset($_POST['customId']) && !empty($_POST['customId'])) ? strtolower(str_replace(' ', '_', trim($_POST['customId']))) : uniqid();\n\n // 4. Get $_POST params\n // Set name\n $environment->{Environments_model::name} = (isset($_POST['name']) && !empty($_POST['name'])) ? trim($_POST['name']) : $phpUniqueId;\n // Set webserver\n // Todo : $_POST['webserverTrigger']\n\n\n // Set php\n $environment->{Environments_model::phpVersionId} = (isset($_POST['phpTrigger']) && !empty($_POST['phpTrigger']) && isset($_POST['phpVersion']) && !empty($_POST['phpVersion']) && $_POST['phpVersion'] != \"--\" && $_POST['phpVersion'] != \"custom\") ? $_POST['phpVersion'] : null;\n if (isset($environment->{Environments_model::phpVersionId}) && !empty($environment->{Environments_model::phpVersionId})) {\n $environment->{Environments_model::phpPort} = (isset($_POST['phpPort']) && !empty($_POST['phpPort'])) ? /*$this->TODOchekAvailablePort($_POST['phpPort'])*/ $_POST['phpPort'] : $this->getAvailablePort();// Todo\n $environment->{Environments_model::phpSSLPort} = (isset($_POST['phpSSLPort']) && !empty($_POST['phpSSLPort'])) ? /*$this->TODOchekAvailablePort($_POST['phpSSLPort'])*/ $_POST['phpSSLPort'] : $this->getAvailablePort();// Todo\n // Todo : $environment->{Environments_model::phpDockerfile} = (isset($_POST['phpDockerfile']) && !empty($_POST['phpDockerfile'])) ? $_POST['phpDockerfile'] : null;\n }\n\n\t\tif (isset($environment->{Environments_model::phpVersionId}) && !empty($environment->{Environments_model::phpVersionId}) && $environment->{Environments_model::phpVersionId} == 1) {\n\t\t\t$environment->{Environments_model::webserver} = \"nginx\";\n\t\t} else {\n\t\t\t$environment->{Environments_model::webserver} = \"apache\";\n\t\t}\n\n // Set mysql\n $environment->{Environments_model::mysqlVersionId} = (isset($_POST['mysqlTrigger']) && !empty($_POST['mysqlTrigger']) && isset($_POST['mysqlVersion']) && !empty($_POST['mysqlVersion']) && $_POST['mysqlVersion'] != \"--\" && $_POST['mysqlVersion'] != \"custom\") ? $_POST['mysqlVersion'] : null;\n if (isset($environment->{Environments_model::mysqlVersionId}) && !empty($environment->{Environments_model::mysqlVersionId})) {\n $environment->{Environments_model::mysqlUser} = (isset($_POST['mysqlUser']) && !empty($_POST['mysqlUser'])) ? $_POST['mysqlUser'] : 'root';// Todo\n $environment->{Environments_model::mysqlPassword} = (isset($_POST['mysqlPassword']) && !empty($_POST['mysqlPassword'])) ? $_POST['mysqlPassword'] : randomPassword();// Todo\n $environment->{Environments_model::mysqlPort} = (isset($_POST['mysqlPort']) && !empty($_POST['mysqlPort'])) ? /*$this->TODOchekAvailablePort($_POST['mysqlPort'])*/ $_POST['mysqlPort'] : $this->getAvailablePort();// Todo\n // Todo : $environment->{Environments_model::mysqlDockerfile} = (isset($_POST['mysqlDockerfile']) && !empty($_POST['mysqlDockerfile'])) ? $_POST['mysqlDockerfile'] : null;\n }\n\n // Set phpmyadmin\n $environment->{Environments_model::hasPma} = (isset($_POST['mysqlTrigger']) && !empty($_POST['mysqlTrigger']) && isset($_POST['mysqlVersion']) && !empty($_POST['mysqlVersion']) && isset($_POST['pma']) && !empty($_POST['pma'])) ? true : false;\n if (isset($environment->{Environments_model::hasPma}) && !empty($environment->{Environments_model::hasPma})) {\n $environment->{Environments_model::pmaPort} = (isset($_POST['pmaPort']) && !empty($_POST['pmaPort'])) ? /*$this->TODOchekAvailablePort($_POST['pmaPort'])*/ $_POST['pmaPort'] : $this->getAvailablePort();// Todo\n }\n\n // Set sftp\n $environment->{Environments_model::hasSftp} = (isset($_POST['sftp']) && !empty($_POST['sftp'])) ? true : false;\n if (isset($environment->{Environments_model::hasSftp}) && !empty($environment->{Environments_model::hasSftp})) {\n //$environment->{Environments_model::sftpUser} = (isset($_POST['sftpUser']) && !empty($_POST['sftpUser'])) ? $_POST['sftpUser'] : $environment->{Environments_model::folder};// Todo\n $environment->{Environments_model::sftpUser} = strtolower(str_replace(' ', '_', trim($environment->{Environments_model::name})));\n $environment->{Environments_model::sftpPassword} = (isset($_POST['sftpPassword']) && !empty($_POST['sftpPassword'])) ? $_POST['sftpPassword'] : randomPassword();// Todo\n $environment->{Environments_model::sftpPort} = (isset($_POST['sftpPort']) && !empty($_POST['sftpPort'])) ? /*$this->TODOchekAvailablePort($_POST['sftpPort'])*/ $_POST['sftpPort'] : $this->getAvailablePort();// Todo\n }\n\n // Set xDebug\n if ($_POST['xDebugTrigger']) {\n $environment->{Environments_model::xDebugRemoteHost} = (isset($_POST['xDebugRemoteHost']) && !empty($_POST['xDebugRemoteHost'])) ? $_POST['xDebugRemoteHost'] : '0.0.0.0';\n }\n\n // 5. Generate docker compose\n $isProjectDockerFolderCreated = $this->generateProjectDockerFolder($environment);\n\n // Steps 6/7\n if ($isProjectDockerFolderCreated) {\n\n\t\t\t// 6. Check git\n\t\t\tif (isset($_POST['repositoryGit']) && !empty($_POST['repositoryGit'])) {\n\n\t\t\t\t$repositoryGit = $_POST['repositoryGit'];\n\n\t\t\t\t// 1a (optional). Check if repo has credentials (then add it in url)\n\t\t\t\tif (isset($_POST['gitCredentialsUsername']) && !empty($_POST['gitCredentialsUsername'])) {\n\n\t\t\t\t\tif (isset($_POST['gitCredentialsPass']) && !empty($_POST['gitCredentialsPass'])) {\n\n\t\t\t\t\t\t$tagOne = \"https://\";\n\t\t\t\t\t\t$tagTwo = \"@\";\n\n\t\t\t\t\t\t$repositoryGit = preg_replace('#('.preg_quote($tagOne).')(.*?)('.preg_quote($tagTwo).')#si', '$1'. $_POST['gitCredentialsUsername'] . ':' . $_POST['gitCredentialsPass'] .'$3', $repositoryGit);\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// todo error\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\ttry {\n\n\t\t\t\t\trequire(APPPATH . 'third_party/czproject/git-php/src/GitRepository.php');\n\n\t\t\t\t\t$folderName = strtolower(str_replace(' ', '_', trim($environment->{Environments_model::name})));\n\n\t\t\t\t\tunlink(ABSOLUTE_ENVS_FOLDER . \"/\" . $folderName . \"/src/index.php\");\n\t\t\t\t\t$dockerComposePath = ABSOLUTE_ENVS_FOLDER . \"/\" . $folderName . \"/src\";\n\n\t\t\t\t\t$repo = Cz\\Git\\GitRepository::cloneRepository($repositoryGit, $dockerComposePath);\n\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t// todo error\n\t\t\t\t\t//var_dump($e);\n\t\t\t\t}\n\n\n\t\t\t\t$environment->{Environments_model::repositoryGit} = $repositoryGit;\n\n\t\t\t}\n\n\t\t\t// 7. Add environment\n\t\t\t$environmentId = $this->Environments_model->insertEnvironment($environment);\n\n if (isset($environmentId) && $environmentId != -1) {\n\n // 7. Start docker compose\n $folderName = strtolower(str_replace(' ', '_', trim($environment->{Environments_model::name})));\n $dockerComposePath = INNER_ENVS_FOLDER . \"/\" . $folderName . \"/\";\n $this->startEnvironment($dockerComposePath);\n\n // Todo send admin mail ?!\n redirect('environments');\n\n } else {\n // Todo : proper error (display error flash ?!)\n exit('Error insert env add || update !');\n }\n } else {\n // Todo : proper error (display error flash ?!)\n exit('Error docker compose file !');\n }\n\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 static function display_create_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=save' method='post'>\";\n echo \"Name: <input type='text' name='name' /><br />\";\n echo \"Description: <textarea name='description'></textarea><br />\";\n echo \"<input type='submit' value='Save' />\";\n echo \"</form>\";\n }", "function display_machine_edit_form($user, $id=false) {\r\n if (!($id === false)) {\r\n try {\r\n $machine = new Machine($user->dbConn, $id);\r\n } catch (Exception $e) {\r\n $id = false;\r\n }\r\n } \r\n echo \"<form action='machine.php\".(($id === false) ? \"\" : \"?id=\".intval($id)).\"' method='POST' class='form-horizontal'>\\n\".(($id === false) ? \"\" : \"<input type='hidden' name='machine[id]' value='\".intval($id).\"' />\").\"\r\n <fieldset>\r\n <div class='control-group'>\r\n <label class='control-label' for='machine[name]'>Name</label>\r\n <div class='controls'>\r\n <input name='machine[name]' type='text' class='input-xlarge' id='machine[name]'\".(($id === false) ? \"\" : \" value='\".escape_output($machine->name).\"'\").\">\r\n </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='machine[machine_type_id]'>Machine Type</label>\r\n <div class='controls'>\\n\";\r\n display_machine_type_dropdown($user->dbConn, \"machine[machine_type_id]\", ($id === false) ? 0 : $machine->machineType['id']);\r\n echo \" </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='machine[facility_id]'>Facility</label>\r\n <div class='controls'>\r\n <input name='machine[facility_id]' value='\".intval($user->facility['id']).\"' type='hidden' />\r\n <span class='input-xlarge uneditable-input'>\".escape_output($user->facility['name']).\"</span>\r\n </div>\r\n </div>\\n\";\r\n if (!($id === false)) {\r\n if (count($machine->machineParameters) > 0) {\r\n echo \" <div class='control-group'>\r\n <label class='control-label' for='machine[machine_parameters]'>Machine Parameters</label>\r\n <div class='controls'>\\n\";\r\n foreach ($machine->machineParameters as $machineParameter) {\r\n echo \" <div class='control-group'>\r\n <label class='control-label' for='machine[machine_parameters][\".intval($machineParameter->machineTypeAttribute['id']).\"][value]'>\".escape_output($machineParameter->machineTypeAttribute['name']).\"</label>\\n\";\r\n $jsonArray = json_decode($machineParameter->value, true);\r\n if ($jsonArray == null) {\r\n echo \" <input name='machine[machine_parameters][\".intval($machineParameter->machineTypeAttribute['id']).\"][value]' value='\".escape_output($machineParameter->value).\"' />\\n\";\r\n } else {\r\n echo \" <div class='controls'>\\n\";\r\n foreach ($jsonArray as $key=>$value) {\r\n echo \" <label class='control-label' for='machine[machine_parameters][\".intval($machineParameter->machineTypeAttribute['id']).\"][\".escape_output($key).\"]'>\".escape_output($key).\"</label>\r\n <div class='controls'>\r\n <input name='machine[machine_parameters][\".intval($machineParameter->machineTypeAttribute['id']).\"][\".escape_output($key).\"]' value='\".escape_output($value).\"' />\r\n </div><br />\\n\";\r\n }\r\n echo \" </div>\\n\";\r\n }\r\n echo \" </div>\\n\";\r\n }\r\n echo \" </div>\\n\";\r\n }\r\n }\r\n echo \" <div class='form-actions'>\r\n <button type='submit' class='btn btn-primary'>\".(($id === false) ? \"Add Machine\" : \"Save changes\").\"</button>\r\n <a href='#' onClick='window.location.replace(document.referrer);' class='btn'>\".(($id === false) ? \"Go back\" : \"Discard changes\").\"</a>\r\n </div>\r\n </fieldset>\\n</form>\\n\";\r\n}", "public function editForm() {\n return tpl::load(__DIR__ . DS . 'form.php', array('field' => $this));\n }", "protected function form()\n {\n return Admin::form(Industry::class, function (Form $form) {\n\n\n $form->text('name',\"名称\");\n $form->number('order_by', \"行业排序\")->value(9);\n $form->display('created_at', '创建时间');\n $form->display('updated_at', '最后修改时间');\n });\n }", "function postageapp_admin_form() {\n $form = array();\n \n $form['settings'] = array(\n '#type' => 'fieldset',\n '#title' => t('Postageapp settings'),\n );\n \n $form['settings']['postageapp_api_key'] = array(\n '#type' => 'textfield',\n '#title' => t('PostageApp API Key'),\n '#required' => TRUE,\n '#default_value' => variable_get('postageapp_api_key', ''),\n '#description' => t('The API key for your PostageApp account. Get or generate a valid API key at your PostageApp dashboard which is available at yourusername.postageapp.com')\n );\n \n return system_settings_form($form);\n}", "protected function _prepareForm()\n\t{\n\n\t\t$intId = $this->getRequest()->getParam(SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID);\n\n\t\t$objEntity = new SDZeCOM_Aurednik_Model_Cms_Home_Entity ();\n\n\t\t$objEntity->load($intId);\n\n\t\t$objAttribute = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Attribute ();\n\n\t\t$objAttributeValue = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Attribute_Values ();\n\n\t\t$objEntityType = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Type ();\n\n\t\t$objForm = new Varien_Data_Form (\n\t\t\tarray(\n\t\t\t\t'id' => SDZeCOM_Aurednik_Block_Adminhtml_Cms_Home_Edit_Form_Container :: FORM_NAME,\n\t\t\t\t'action' => $this->getUrl('*/*/save'),\n\t\t\t\t'method' => 'post',\n\t\t\t\t'enctype' => 'multipart/form-data',\n\t\t\t\t'name' => SDZeCOM_Aurednik_Block_Adminhtml_Cms_Home_Edit_Form_Container :: FORM_NAME\n\t\t\t)\n\t\t);\n\n\t\t$this->setForm($objForm);\n\n\t\t$objForm->setUseContainer(true);\n\n\t\t//Set Enitty\n\t\t$objFieldset =\n\t\t\t$objForm->addFieldset('aurednik_cms_home_entity',\n\t\t\t\tarray(\n\t\t\t\t\t'legend' => Mage:: helper('admin')->__('entity')));\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Id'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Id'),\n\t\t\t\t'required' => true,\n\t\t\t\t'value' => $objEntity->getId(),\n\t\t\t\t'readonly' => true,\n\t\t\t\t'class' => 'required-entry'\n\n\t\t\t));\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_NAME,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_NAME . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Name'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Name'),\n\t\t\t\t'required' => false,\n\t\t\t\t'value' => $objEntity->getEntity_name(),\n\t\t\t\t'class' => 'required-entry'\n\n\t\t\t));\n\n\t\t$field = $objFieldset->addField(SDZeCOM_Aurednik_Model_Cms_Home_Entity_Store::TABLE_COLUMN_STORE_ID, 'multiselect', array(\n\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity_Store :: TABLE_COLUMN_STORE_ID . ']',\n\t\t\t'label' => Mage::helper('cms')->__('Store View'),\n\t\t\t'title' => Mage::helper('cms')->__('Store View'),\n\t\t\t'required' => true,\n\t\t\t'value' => $objEntity->getStore_id(),\n\t\t\t'values' => Mage:: getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),\n\t\t));\n\n\t\t$renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');\n\t\t$field->setRenderer($renderer);\n\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_TYPE,\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_TYPE . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Type'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Type'),\n\t\t\t\t'required' => true,\n\t\t\t\t'disabled' => true,\n\t\t\t\t'options' => $objEntityType->toOptionArray(),\n\t\t\t\t'readonly' => true,\n\t\t\t\t'value' => $objEntity->getType_id()\n\t\t\t));\n\n\t\t$objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ACTIVE,\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ACTIVE . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Active'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Active'),\n\t\t\t\t'required' => true,\n\t\t\t\t'disabled' => false,\n\t\t\t\t'options' => array(0 => Mage:: helper('admin')->__('No'), 1 => Mage:: helper('admin')->__('Yes')),\n\t\t\t\t'value' => $objEntity->getActive()\n\n\t\t\t));\n\n\t\t$objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_SORT,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_SORT . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Sort'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Sort'),\n\t\t\t\t'required' => false,\n\t\t\t\t'value' => $objEntity->getSort(),\n\t\t\t\t'class' => 'required-entry',\n\t\t\t\t'required' => true,\n\t\t\t));\n\n\t\t$objAttrCollection = $objAttribute->getCollection()->getByEntityTypeId($objEntity->getType_id());\n\n\t\tif ($objAttrCollection->count() == 0)\n\t\t{\n\t\t\tMage:: getSingleton('core/session')->addError(Mage:: helper('aurednik')->__('Error no attributes'));\n\t\t\t$this->getResponse()->sendResponse();\n\t\t}\n\n\t\t$objFieldset =\n\t\t\t$objForm->addFieldset(\n\t\t\t\t'aurednik_cms_home_entity_data',\n\t\t\t\tarray(\n\t\t\t\t\t'legend' => Mage:: helper('admin')->__('entity attribute data')\n\t\t\t\t)\n\t\t\t);\n\n\t\tforeach ($objAttrCollection as $objCurrentAttr)\n\t\t{\n\n\t\t\t$objEntityAttrValuesCollection = $objAttributeValue->getCollection()->getByEntityIdAndAttributeId($objEntity->getId(), $objCurrentAttr->getId());\n\n\t\t\tif ($objEntityAttrValuesCollection->count() > 0)\n\t\t\t{\n\n\t\t\t\tforeach ($objEntityAttrValuesCollection as $objCurrentAttrValue)\n\t\t\t\t{\n\n\t\t\t\t\t$objFieldset->addField(\n\t\t\t\t\t\t$objCurrentAttrValue->getId(),\n\t\t\t\t\t\t$objCurrentAttr->getInput_type(),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' => self :: POST_ENTITY_ATTRIBUTE_DATA . '[' . $objCurrentAttr->getId() . ']',\n\t\t\t\t\t\t\t'label' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t\t'title' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t\t'required' => $objEntity->getRequired() == 1 ? true : false,\n\t\t\t\t\t\t\t'value' => $objCurrentAttrValue->getAttribute_value(),\n\t\t\t\t\t\t\t'class' => 'required-entry'\n\t\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t$objFieldset->addField(\n\t\t\t\t\t$objEntity->getId() . \"_\" . $objCurrentAttr->getId(),\n\t\t\t\t\t$objCurrentAttr->getInput_type(),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => self :: POST_ENTITY_ATTRIBUTE_DATA . '[' . $objCurrentAttr->getId() . ']',\n\t\t\t\t\t\t'label' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t'title' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t'required' => $objEntity->getRequired() == 1 ? true : false,\n\t\t\t\t\t\t'class' => 'required-entry'\n\t\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\treturn parent:: _prepareForm();\n\t}", "public function editForm(): void\n {\n $this->articleId = $_GET['id'];\n $query = $this->articleModel->displayOneArticle($this->articleId);\n $editArticle = $query->fetch();\n\n $this->title = $editArticle['title'];\n $this->content = $editArticle['content'];\n $this->category = $editArticle['category'];\n }", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n\n $form->tab('基本信息', function ($form) {\n\n //$form->display('id', 'ID');\n //$form->text('keyword', '关键词');\n $form->text('static_url', '静态地址')->help(\"如果输入:New-York-Downtown.html,则访问地址为:http://www.yinjispace.com/article/<span style='color:#F00;'>New-York-Downtown.html</span>\");\n $form->radio('article_status', '状态')->options(['0' => '草稿', '1' => '审核中', '2' => '已发布'])->default('0');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1' => '保密'])->default('0');\n $form->datetime('release_time', '发布时间')->format('YYYY-MM-DD HH:mm:ss');\n // $form->datetime('created_at','发布时间')->format('YYYY-MM-DD HH:mm:ss');\n $form->multipleSelect('category_ids', '分类')->options(ArticleCategory::getSelectOptions());\n $form->multipleSelect('topic_ids', '专题')->options(Topic::getSelectOptions());\n $form->text('tag_ids', '标签(逗号分隔)');\n $form->text('view_num', '浏览数')->default(0);\n $form->text('like_num', '点赞数')->default(0);\n $form->text('favorite_num', '收藏数')->default(0);\n $form->text('vip_download', '下载地址');\n //$form->multipleSelect('designer_id', '设计师ID')->options(Designer::getSelectOptions());\n $form->multipleSelect('designer_id', '设计师')->options(function ($ids) {\n $designer = Designer::find($ids);\n if ($designer) {\n return $designer->pluck('title_cn', 'id');\n }\n\n })->ajax('/admin/article/get_designer_select_options');\n $form->text('article_source', '文章来源');\n $form->text('article_source_url', '文章来源URL');\n $form->image('custom_thum', '自定义封面')\n ->uniqueName()\n ->widen(880)\n ->move('public/photo/images/custom_thum/');\n $form->image('special_photo', '特色照片')\n ->uniqueName()\n ->widen(1920)\n ->move('public/photo/images/special_photo/');\n $form->text('seo_title', 'SEO标题');\n $form->text('seo_keyword', 'SEO关键词');\n $form->text('seo_desc', 'SEO描述');\n })->tab('中文', function ($form) {\n\n $form->text('title_designer_cn', '标题(设计师)');\n $form->text('title_name_cn', '标题(项目名称)');\n $form->text('title_intro_cn', '标题(项目介绍)');\n $form->text('description_cn', '自定义描述(中)');\n $form->text('location_cn', '地域(中)');\n $form->ckeditor('detail.content_cn', '正文(中)');\n\n })->tab('English', function ($form) {\n\n $form->text('title_designer_en', '标题(设计师)');\n $form->text('title_name_en', '标题(项目名称)');\n $form->text('title_intro_en', '标题(项目介绍)');\n $form->text('description_en', '自定义描述(英)');\n $form->text('location_en', '地域(英)');\n $form->ckeditor('detail.content_en', '正文(英)');\n\n });\n\n //保存前回调\n $form->saving(function (Form $form) {\n if (empty($form->model()->release_time)) {\n $form->release_time = date('Y-m-d H:i:s');\n }\n });\n\n $form->saved(function (Form $form) {\n $tags = explode(',', $form->tag_ids);\n foreach ($tags as $tag) {\n echo $tag;\n $ret = ArticleTag::firstOrCreate(['name_cn' => trim($tag)]);\n }\n\n });\n\n\n return $form;\n }", "function manage_form( ) {\n\t\t\n\t\t// Exit if user not logged in\n\t\t// TODO: MAKE THIS WORK\n/*\t\tif( ! current_user_can( 'administrator' ) ) {\n\t\t\tcpd_not_logged_in_message();\n\t\t\treturn;\n\t\t}\n*/\n\n\t\t$org = new Organisation();\n\n\t\t// Check if an Org has been selected - ie: has a number value for $_GET['id']\n\t\t// This covers resposnes both when selecting an org for editing, or for saving an org\n\t\tif( isset( $_REQUEST['id'] ) && is_int( (int) $_REQUEST['id'] ) ) {\n\t\t\t$org->load_org_details( $_REQUEST['id'] );\n\t\t}\n\n\t\t$this->display_form( $org );\n\t}", "public function create()\n {\n return view('platforms.create');\n }", "public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }", "function psc_edit_form($form_id=null) {\n\tglobal $wpdb, $psc;\n\t\n\tif($form_id) {\n\t\t$form = $wpdb->get_results('SELECT * FROM '.$psc->forms.' WHERE id=\"'.$form_id.'\"');\n\t}\n\t\n\t$categories = $wpdb->get_results('SELECT * FROM '.$wpdb->prefix.'terms');\n\t$stati = array('pending', 'draft', 'published');\n\t$field_types = array('text', 'textarea', 'hidden', 'select', 'multiselect', 'radio', 'checkbox', 'file');\n\t\n\tif(isset($form) && count($form)===0) {\n\t\techo 'Sorry, but a form with that ID does not exist.';\n\t} else {\n\t\tif(isset($form[0]->data)) {\n\t\t\t$fields = unserialize($form[0]->data);\n\t\t} else {\n\t\t\t$form = array(\n\t\t\t\t(object) array(\n\t\t\t\t\t'name' => '',\n\t\t\t\t\t'slug' => '',\n\t\t\t\t\t'default_category' => '',\n\t\t\t\t\t'default_status' => 'pending',\n\t\t\t\t\t'thanks_url' => '',\n\t\t\t\t\t'captcha' => 0\n\t\t\t\t)\n\t\t\t);\n\t\t\t$fields = array();\n\t\t}\n\t\t// Edit the form!!\n\t\techo '\n\t\t<div class=\"wrap\">\n\t\t\t<div id=\"icon-edit\" class=\"icon32 icon32-posts-post\"><br /></div>\n\t\t\t<h2>Edit Form</h2>';\n\t\t\tif($form_id) {\n\t\t\t\techo '<form name=\"post\" action=\"'.get_bloginfo('siteurl').'/wp-admin/admin.php?page=publicly-submitted-content/admin&action=edit_form&id='.$form_id.'\" method=\"post\" id=\"post\">';\n\t\t\t} else {\n\t\t\t\techo '<form name=\"post\" action=\"'.get_bloginfo('siteurl').'/wp-admin/admin.php?page=publicly-submitted-content/admin&action=new_form\" method=\"post\" id=\"post\">';\n\t\t\t}\n\t\t\twp_nonce_field('psc_nonce_field', 'psc_save');\n\t\t\techo '\n\t\t\t\t<div id=\"post-body\">\n\t\t\t\t\t<div id=\"post-body-content\">\n\t\t\t\t\t\t<div id=\"titlediv\">';\n\t\t\t\t\t\tif($form_id) { echo '<input type=\"hidden\" name=\"psc_id\" value=\"'.$form_id.'\" />'; }\n\t\t\t\t\t\techo '<div id=\"titlewrap\">\n\t\t\t\t\t\t\t\t<label class=\"hide-if-no-js\" style=\"visibility:hidden\" id=\"title-prompt-text\" for=\"title\">Enter name here</label>';\n\t\t\t\t\t\t\t\tif($form_id) {\n\t\t\t\t\t\t\t\t\techo '<input type=\"text\" name=\"title\" size=\"30\" tabindex=\"1\" value=\"'.$form[0]->name.'\" id=\"title\" autocomplete=\"off\" />';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\techo '<input type=\"text\" name=\"title\" size=\"30\" tabindex=\"1\" value=\"\" id=\"title\" autocomplete=\"off\" />';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo '</div>\n\t\t\t\t\t\t\t<div class=\"inside\">\n\t\t\t\t\t\t\t\t<div id=\"edit-slug-box\">\n\t\t\t\t\t\t\t\t\t<strong>Slug:</strong> ';\n\t\t\t\t\t\t\t\t\tif($form_id) {\n\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" id=\"form_slug\" name=\"slug\" value=\"'.$form[0]->slug.'\" /><span id=\"sample-permalink\">'.$form[0]->slug.'</span>';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\techo '<input type=\"hidden\" id=\"form_slug\" name=\"slug\" value=\"\" /><span id=\"sample-permalink\"></span>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\techo '</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div id=\"form_edit_options\" class=\"postbox fieldItem\">\n\t\t\t\t\t\t\t\t<h3 class=\"hndle\"><span>Form Options</span></h3>\n\t\t\t\t\t\t\t\t<div class=\"inside\">\n\t\t\t\t\t\t\t\t\t<div class=\"select\">\n\t\t\t\t\t\t\t\t\t\t<label for=\"default_category\">Default Category</label>\n\t\t\t\t\t\t\t\t\t\t<select name=\"default_category\" id=\"default_category\">';\n\t\t\t\t\t\t\t\t\t\tforeach($categories as $category) {\n\t\t\t\t\t\t\t\t\t\t\techo '<option value=\"'.$category->term_id.'\"';\n\t\t\t\t\t\t\t\t\t\t\tif($form_id) {\n\t\t\t\t\t\t\t\t\t\t\t\tif($category->term_id==$form[0]->default_category) { echo ' selected=\"selected\"'; }\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tif($category->slug=='publicly_submitted_content') { echo ' selected=\"selected\"'; }\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\techo '>'.$category->name.'</option>'.\"\\r\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\techo '</select>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"select\">\n\t\t\t\t\t\t\t\t\t\t<label for=\"default_status\">Default Status</label>\n\t\t\t\t\t\t\t\t\t\t<select name=\"default_status\" id=\"default_status\">';\n\t\t\t\t\t\t\t\t\t\tforeach($stati as $state) {\n\t\t\t\t\t\t\t\t\t\t\techo '<option value=\"'.$state.'\"';\n\t\t\t\t\t\t\t\t\t\t\tif($form_id) {\n\t\t\t\t\t\t\t\t\t\t\t\tif($state==$form[0]->default_status) { echo ' selected=\"selected\"'; }\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\techo '>'.ucfirst($state).'</option>'.\"\\r\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\techo '</select>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"checkbox\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\"';\n\t\t\t\t\t\t\t\t\t\tif($form_id) {\n\t\t\t\t\t\t\t\t\t\t\tif($form[0]->captcha==1) { echo ' checked'; }\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\techo ' name=\"captcha\" id=\"captcha_option\" />';\n\t\t\t\t\t\t\t\t\t\techo '<label for=\"captcha_option\">Use Captcha?</label>\n\t\t\t\t\t\t\t\t\t</div>';\n\t\t\t\t\t\t\t\t\techo '<div id=\"psc_catcha_info\" style=\"display:none\">\n\t\t\t\t\t\t\t\t\t\t<p>You must enter a re:Captcha public &amp; private keys in order to utilize captcha.</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"public_key\" id=\"api_key\" value=\"'.get_option('psc_recaptch_public_key').'\" />\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"private_key\" id=\"private_key\" value=\"'.get_option('psc_recaptch_private_key').'\" />\n\t\t\t\t\t\t\t\t\t<div class=\"text\">\n\t\t\t\t\t\t\t\t\t\t<label for=\"thanks_url\">Thanks Redirect <span class=\"small\">(leave blank to not use a redirect or if the redirect is causing a blank page.)</span></label>\n\t\t\t\t\t\t\t\t\t\t<div class=\"thanksLink\">\n\t\t\t\t\t\t\t\t\t\t\t'.get_bloginfo('siteurl').'<input type=\"text\" name=\"thanks_url\" id=\"thanks_url\" value=\"';\n\t\t\t\t\t\t\t\t\t\t\tif($form_id) { echo $form[0]->thanks_url; }\n\t\t\t\t\t\t\t\t\t\t\techo '\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div id=\"major-publishing-actions\">\n\t\t\t\t\t\t\t\t<div id=\"delete-action\">\n\t\t\t\t\t\t\t\t\t<a class=\"submitdelete deletion\" href=\"#\">Delete Form</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div id=\"publishing-action\">\n\t\t\t\t\t\t\t\t\t<input name=\"save\" type=\"submit\" class=\"button-primary\" id=\"publish\" tabindex=\"5\" accesskey=\"p\" value=\"Save Form\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '</div>\n\t\t\t\t\t\t\t<div id=\"normal-sortables\" class=\"meta-box-sortables ui-sortable fieldItems\">\n\t\t\t\t\t\t\t\t';\n\t\t\t\t\t\t\tif(!$form_id) {\n\t\t\t\t\t\t\t\t$key = 0;\n\t\t\t\t\t\t\t\techo '<div id=\"field'.$key.'item\" class=\"postbox fieldItem\">\n\t\t\t\t\t\t\t\t<div class=\"handlediv\" title=\"Click to toggle\"><br></div><h3 class=\"hndle\"><span>[Label]</span></h3>\n\t\t\t\t\t\t\t\t<div class=\"inside\" style=\"display:block;\">\n\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"deleteFieldItem\">Delete Field</a>\n\t\t\t\t\t\t\t\t\t<div class=\"text\"><label for=\"field'.$key.'label\">Label</label><input type=\"text\" name=\"data['.$key.'][label]\" class=\"fieldlabel\" id=\"field'.$key.'label\" value=\"\" /></div>';\n\t\t\t\t\t\t\t\t\techo '<div class=\"text\"><label for=\"field'.$key.'slug\">Slug/ID/Name</label><input type=\"text\" name=\"data['.$key.'][slug]\" class=\"slugify\" id=\"field'.$key.'slug\" value=\"\" /></div>';\n\t\t\t\t\t\t\t\t\techo '<div class=\"select\"><label for=\"field'.$key.'type\">Type</label><select name=\"data['.$key.'][type]\" class=\"fieldtype\" id=\"field'.$key.'type\">';\n\t\t\t\t\t\t\t\t\t\tforeach($field_types as $field_type) {\n\t\t\t\t\t\t\t\t\t\t\techo '<option value=\"'.$field_type.'\">';\n\t\t\t\t\t\t\t\t\t\t\tif($field_type=='file') { echo 'Image'; } else { echo ucfirst($field_type); }\n\t\t\t\t\t\t\t\t\t\t\techo '</option>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\techo '</select></div>';\n\t\t\t\t\t\t\t\t\techo '<div class=\"text options\" style=\"display:none;\"><label for=\"field'.$key.'options\">Options</label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"data['.$key.'][options]\" id=\"field'.$key.'options\" value=\"\" />\n\t\t\t\t\t\t\t\t\t<p class=\"small\">(comma separated list of options for select, multiselect, checkbox, and radio types)</p></div>';\n\t\t\t\t\t\t\t\t\techo '<div class=\"checkbox\"><input type=\"checkbox\" name=\"data['.$key.'][required]\" id=\"field'.$key.'required\" /><label for=\"field'.$key.'required\">Required</label></div>';\n\t\t\t\t\t\t\t\t\techo '<div class=\"checkbox\"><input type=\"checkbox\" name=\"data['.$key.'][maps_as]\" id=\"field'.$key.'maps_as\" /><label for=\"field'.$key.'maps_as\">Use this as the \"post content\"</label></div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tforeach($fields as $key => $field) {\n\t\t\t\t\t\t\t\t\techo '<div id=\"field'.$key.'item\" class=\"postbox fieldItem closed\">\n\t\t\t\t\t\t\t\t\t<div class=\"handlediv\" title=\"Click to toggle\"><br></div><h3 class=\"hndle\"><span>'.$field['label'].'</span></h3>\n\t\t\t\t\t\t\t\t\t<div class=\"inside\">\n\t\t\t\t\t\t\t\t\t\t<a href=\"#\" class=\"deleteFieldItem\">Delete Field</a>\n\t\t\t\t\t\t\t\t\t\t<div class=\"text\"><label for=\"field'.$key.'label\">Label</label><input type=\"text\" name=\"data['.$key.'][label]\" class=\"fieldlabel\" id=\"field'.$key.'label\" value=\"'.$field['label'].'\" /></div>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"text\"><label for=\"field'.$key.'slug\">Slug/ID/Name</label><input type=\"text\" name=\"data['.$key.'][slug]\" class=\"slugify\" id=\"field'.$key.'slug\" value=\"'.str_replace('psc_', '', $field['slug']).'\" /></div>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"select\"><label for=\"field'.$key.'type\">Type</label><select name=\"data['.$key.'][type]\" class=\"fieldtype\" id=\"field'.$key.'type\">';\n\t\t\t\t\t\t\t\t\t\t\tforeach($field_types as $field_type) {\n\t\t\t\t\t\t\t\t\t\t\t\techo '<option value=\"'.$field_type.'\"';\n\t\t\t\t\t\t\t\t\t\t\t\tif($field_type==$field['type']) { echo ' selected=\"selected\"'; }\n\t\t\t\t\t\t\t\t\t\t\t\techo '>';\n\t\t\t\t\t\t\t\t\t\t\t\tif($field_type=='file') { echo 'Image'; } else { echo ucfirst($field_type); }\n\t\t\t\t\t\t\t\t\t\t\t\techo '</option>';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\techo '</select></div>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"text options\"';\n\t\t\t\t\t\t\t\t\t\tif(!in_array($field['type'], array('select', 'multiselect', 'radio', 'checkbox'))) {\n\t\t\t\t\t\t\t\t\t\t\techo ' style=\"display:none;\"';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\techo '><label for=\"field'.$key.'options\">Options</label>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"data['.$key.'][options]\" id=\"field'.$key.'options\" value=\"';\n\t\t\t\t\t\t\t\t\t\tif(isset($field['options']) && !empty($field['options'])) { echo implode(',', $field['options']); }\n\t\t\t\t\t\t\t\t\t\techo '\" />\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"small\">(comma separated list of options for select, multiselect, checkbox, and radio types)</p>\n\t\t\t\t\t\t\t\t\t\t</div>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"checkbox\"><input type=\"checkbox\" name=\"data['.$key.'][required]\" id=\"field'.$key.'required\"';\n\t\t\t\t\t\t\t\t\t\tif($field['required']=='true') {\n\t\t\t\t\t\t\t\t\t\t\techo ' checked';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\techo ' /><label for=\"field'.$key.'required\">Required</label></div>';\n\t\t\t\t\t\t\t\t\t\techo '<div class=\"checkbox\"><input type=\"checkbox\"';\n\t\t\t\t\t\t\t\t\t\tif(isset($field['maps_as']) && $field['maps_as']=='content') {\n\t\t\t\t\t\t\t\t\t\t\techo ' checked';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\techo ' name=\"data['.$key.'][maps_as]\" id=\"field'.$key.'maps_as\" /><label for=\"field'.$key.'maps_as\">Use this as the \"post content\"</label></div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t</div><input type=\"hidden\" id=\"psckeycount\" value=\"'.($key+1).'\" />\n\t\t\t\t\t\t\t<a id=\"add_form_field\" class=\"preview button\" href=\"#\">Add form field</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</form>';\n\t}\n}", "private function getForm($siteAggregation, $forEdit = false)\n {\n //site keys, so we can't use Omeka_Form_Admin\n $form = \"<form method='post' action='' type=''>\";\n $form .= \"<div class='field'>\";\n $form .= \"<div class='two columns alpha'>\";\n $form .= \"<label for='title'>Name</label>\";\n $form .= \"</div>\";\n $form .= \"<div class='inputs five columns omega'>\";\n $form .= \"<div class='input-block'>\";\n $form .= $this->view->formText('name', $siteAggregation->name);\n $form .= \"</div></div></div>\";\n $form .= \"<div class='field'>\";\r\n $form .= \"<div class='two columns alpha'>\";\r\n $form .= \"<label for='description'>Description</label>\";\r\n $form .= \"</div>\";\r\n $form .= \"<div class='inputs five columns omega'>\";\r\n $form .= \"<div class='input-block'>\";\r\n $form .= $this->view->formTextarea('description', $siteAggregation->description, array('rows'=>10));\r\n $form .= \"</div></div></div>\";\r\n\n $sites = $siteAggregation->getSites();\n $form .= \"<div class='field'>\";\r\n $form .= \"<div class='two columns alpha'>\";\n $form .= \"<label for='site_keys'>Site keys for this group of sites</label>\";\n $form .= \"</div>\";\r\n $form .= \"<div class='inputs five columns omega'>\";\n $form .= \"<fieldset name='site_keys'>\";\n $form .= \"<table><thead><tr>\";\n if($forEdit) {\n $form .= \"<th>Remove</th>\";\n }\n $form .= \"<th>Site</th><th>Key</th>\";\n $form .= \"</tr></thead><tbody>\";\n foreach($sites as $site) {\n $form .= \"<tr>\";\r\n if($forEdit) {\n $form .= \"<td><input type='checkbox' name='site_keys_delete[]' value='$site->api_key' /></td>\";\n }\r\n $form .= \"<td>{$site->title}</td>\";\n $form .= \"<td>\";\r\n $form .= $this->view->formText('site_key[]', $site->api_key, array('id'=>null, 'class'=>'site_keys'));\n $form .= \"</td>\";\n $form .= \"</tr>\";\r\n }\n $form .= \"</tbody></table>\";\n $form .= \"<div class='input-block'>\";\n $form .= \"<label>New site key</label>\";\n $form .= $this->view->formText('site_key[]');\n $form .= \"</div>\";\n $form .= \"</fieldset>\";\n $form .= \"<p id='add_site_key'>Add another site key</p>\";\n $form .= \"<button>Submit</button>\";\n $form .= \"</div></div>\";\n\n $form .= \"</form>\";\n return $form;\n }", "public function cs_generate_form() {\n global $post;\n }", "function display_form_entry_edit_form($user, $id=False, $form_id=False) {\r\n if (!($id === False)) {\r\n $caught = False;\r\n try {\r\n $formEntry = new FormEntry($user->dbConn, $id);\r\n $form_id = $formEntry->form['id'];\r\n } catch (Exception $e) {\r\n $id = False;\r\n $form_id = False;\r\n $caught = True;\r\n }\r\n } else {\r\n $formEntry = new FormEntry($user->dbConn, 0, ($form_id ? intval($form_id) : Null));\r\n $formEntry->formValues = $formEntry->getAutosaveValues($user);\r\n }\r\n if (!($form_id === False)) {\r\n try {\r\n $form = new Form($user->dbConn, $form_id);\r\n } catch (Exception $e) {\r\n $form_id = False;\r\n }\r\n $formEntry->form = array('id' => $form->id, 'name' => $form->name);\r\n } else {\r\n echo \"Please specify a valid form entry ID or form ID.\";\r\n return;\r\n }\r\n $jsParameters = array();\r\n if ($formEntry->machine) {\r\n // instantiate all machine_type_attributes in php and js.\r\n $machine = new Machine($user->dbConn, $formEntry->machine['id']);\r\n foreach ($machine->machineParameters as $parameter) {\r\n @$value = unserialize($parameter->value);\r\n if (!$value) {\r\n $value = $parameter->value;\r\n } else {\r\n $value = json_encode($value);\r\n }\r\n ${$parameter->machineTypeAttribute['name']} = $value;\r\n $jsParameters[$parameter->machineTypeAttribute['name']] = $value;\r\n }\r\n } else {\r\n // instantiate all the global machine parameters.\r\n $machineParameters = $user->dbConn->stdQuery(\"SELECT `machine_type_attributes`.`name` FROM `machine_type_attributes`\");\r\n while ($parameter = $machineParameters->fetch_assoc()) {\r\n ${$parameter['name']} = array();\r\n $jsParameters[$parameter['name']] = \"{}\";\r\n }\r\n }\r\n if ($form->php != '' && $form->php != 'NULL') {\r\n // i know this is terrible ugh but custom forms eventually\r\n eval($form->php);\r\n }\r\n if ($form->js != '' && $form->js != 'NULL') {\r\n echo \"<script type='text/javascript'>\\n\";\r\n foreach ($jsParameters as $name => $value) {\r\n echo \"var \".$name.\" = \".$value.\";\\n\";\r\n }\r\n echo $form->js.\"\\n</script>\\n\";\r\n }\r\n}", "abstract protected function _setNewForm();", "public function edit($id)\n {\n if (Auth::user()->ability('superadministrator', 'update-platforms')){\n return view('platform.update',[\n 'pageheader'=>'平台渠道',\n 'pagedescription'=>'更新',\n 'platform'=>PlatForm::findOrFail($id),\n ]);\n }\n return abort(403,config('yyxt.permission_deny'));\n }", "protected function _prepareForm()\n\t{\n\t\t$model = Mage::registry('mpbackup_profile');\n\n\t\t$isNew = !$model->getProfileId() ? true : false;\n\n\t\t$form = new Varien_Data_Form();\n\n\t\t$fieldset = $form->addFieldset('app_fieldset',\n\t\t\tarray(\n\t\t\t\t'legend'\t=> $this->__('Storage Application'),\n\t\t\t\t'class'\t\t=> 'fieldset-wide'\n\t\t\t)\n\t\t);\n\t\t\t\t\n\t\t$fieldset->addField('profile_cloud_app',\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> $this->getProfileCloudAppId(),\n\t\t\t\t'label'\t\t=> $this->__('Storage Application'),\n\t\t\t\t'title'\t\t=> $this->__('Storage Application'),\n\t\t\t\t'values'\t=> $this->_getAppsForForm(),\n\t\t\t)\n\t\t);\n\n\t\t$fieldset->addField('profile_local_copy',\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'profile_local_copy',\n\t\t\t\t'label'\t\t=> $this->__('Save local copy'),\n\t\t\t\t'title'\t\t=> $this->__('Save local copy'),\n\t\t\t\t'class' \t=> 'input-select',\n\t\t\t\t'values'\t=> Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray(),\n\t\t\t\t'disabled'\t=> ($isNew || !$model->getData('profile_cloud_app') ? true : false)\n\t\t\t)\n\t\t);\n\n\t\t$fieldset->addField('profile_cloud_app_settings',\n\t\t\t'note',\n\t\t\tarray(\n\t\t\t\t'label'\t\t=> $this->__('Storage Application Settings'),\n\t\t\t\t'text'\t\t=> '<div id=\"'.$this->getAppSettingsAreaId().'\" style=\"width:600px;\">'\n\t\t\t\t\t\t\t.(!$model->getProfileId() || !$model->getData('profile_cloud_app') ? $this->__('Local storage is selected.') : '')\n\t\t\t\t\t\t\t.'</div>',\n\t\t\t)\n\t\t);\n\t\t\n\t\t$form->setHtmlIdPrefix('cloud_app_');\n\t\t$form->setValues($model->getData());\n\n\t\t$this->setForm($form);\n\t\t\n\t\t$this->getLayout()->getBlock('mpbackup_adminhtml_profile_edit')->addFormScripts(\"\n\t\t\tvar appSettings = function() {\n\t\t\t\treturn {\n\t\t\t\t\tupdateSettings: function() {\n\t\t\t\t\t\t\" . ($model->getProfileId()\n\t\t\t\t\t\t\t? \"var elements = [$('\".$form->getHtmlIdPrefix().$this->getProfileCloudAppId().\"'), $('profile_id')].flatten();\"\n\t\t\t\t\t\t\t: \"var elements = [$('\".$form->getHtmlIdPrefix().$this->getProfileCloudAppId().\"')].flatten();\")\n\t\t\t\t\t\t. \"\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($('cloud_app_profile_cloud_app').selectedIndex == 0) {\n\t\t\t\t\t\t\t$('cloud_app_profile_local_copy').disabled = true;\n\t\t\t\t\t\t\t$('cloud_app_profile_local_copy').selectedIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$('cloud_app_profile_local_copy').disabled = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tnew Ajax.Request('{$this->getUrl('*/*/loadSettings')}',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tparameters: Form.serializeElements(elements),\n\t\t\t\t\t\t\t\tevalScripts: true,\n\t\t\t\t\t\t\t\tonComplete: function(transport) {\n try {\n if(transport.responseText.isJSON()) {\n var response = transport.responseText.evalJSON();\n if (!Object.isUndefined(response.message) && response.message) {\n $('\".$this->getAppSettingsAreaId().\"').innerHTML = '<div style=\\\"color:red; font-weight:bold;\\\">' + response.message + '</div>';\n return;\n }\n }\n } catch (e) {\n console.log(e);\n }\n\n\t\t\t\t\t\t\t\t $('\".$this->getAppSettingsAreaId().\"').innerHTML = transport.responseText;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t}();\n\t\t\t\n\t\t\tEvent.observe(window, 'load', function() {\n\t\t\t\t\". ($model->getProfileId() && $model->getData('profile_cloud_app') ? \"appSettings.updateSettings();\" : '') . \"\n\t\t\t\tif ($('\".$form->getHtmlIdPrefix().$this->getProfileCloudAppId().\"')) {\n\t\t\t\t\tEvent.observe($('\".$form->getHtmlIdPrefix().$this->getProfileCloudAppId().\"'), 'change', appSettings.updateSettings);\n\t\t\t\t}\n\t\t\t});\n\t\t\");\n\t\t\n\t\treturn parent::_prepareForm();\n\t}", "protected function form()\n {\n $this->opt();\n $form = new Form(new ComDep);\n\n $form->text('alias', 'Alias');\n $form->text('name', 'Name');\n $form->select('company_id', 'Company')->options($this->optcom);\n $form->select('id_com_dep_admin', 'Company department admin')->options($this->optcomdep);\n $form->select('service_type_id', 'Service type')->options($this->optsertype);\n $form->textarea('info', 'Info');\n $form->textarea('info_for_vp_admin', 'Info for vp admin');\n $form->text('address', 'Address');\n $form->textarea('info_station', 'Info station');\n $form->text('telephone', 'Telephone');\n $form->text('e_mail', 'E mail');\n $form->text('class', 'Class');$form->saving(function (Form $form) {\n $form->model()->id_admin_add=Admin::user()->id;\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Information);\n \n \n\n $form->text('name', __('项目名称'))->autofocus()->placeholder('例:上汽大众新能源汽车工厂项目')->required();\n $form->text('industry', __('行业类别'))->required();\n $form->currency('investment', __('投资金额'))->icon('fa-usd')->required(); \n $form->text('cont_name', __('资方联系人'))->placeholder('选填内容,可为空');\n $form->text('cont_phone', __('资方联系方式'))->placeholder('选填内容,可为空');\n $form->text('staff_name', __('工作人员姓名'));\n $form->text('staff_phone', __('工作人员电话'));\n $form->hidden('adminuser_id', __('adminuser_id'))->value(Admin::user()->id);\n $form->textarea('content', __('项目情况'))->required()->placeholder('请填写项目介绍(包括项目投资额度、产业类别等)、项目需求(如土地、排放、能耗等)、谈判进度等......');\n\n\n\n $form->tools(function (Form\\Tools $tools) {\n\n // 去掉`列表`按钮\n $tools->disableList();\n\n });\n\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n $footer->disableReset();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n $form->setAction('../admin/myinfo');\n\n return $form;\n }", "private function createEditForm(Element $entity)\n\t{\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$request = $this->container->get('request_stack')->getCurrentRequest();\n\t\t$params = $request->get('_route_params');\n\t\t$block = $em->getRepository('NovuscomCMFBundle:Block')->find($params['block_id']);\n\n\t\t$epArray = array();\n\t\t$epDescription = array();\n\n\t\t/**\n\t\t * Пролучаем значения свойств типа \"строка\"\n\t\t */\n\t\t$ElementProperty = $em->getRepository('NovuscomCMFBundle:ElementProperty')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\n\t\tforeach ($ElementProperty as $ep) {\n\t\t\t$epArray[$ep->getProperty()->getId()][] = $ep->getValue();\n\t\t\t$epDescription[$ep->getProperty()->getId()][] = $ep->getDescription();\n\t\t}\n\n\t\t/**\n\t\t * Получаем значения свойств типа \"дата/время\"\n\t\t */\n\t\t$ElementPropertyDT = $em->getRepository('NovuscomCMFBundle:ElementPropertyDT')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\t\tforeach ($ElementPropertyDT as $ep) {\n\t\t\t$epArray[$ep->getProperty()->getId()][] = $ep->getValue();\n\t\t}\n\n\t\t/**\n\t\t * Получаем значения свойств типа \"файл\"\n\t\t */\n\t\t$ElementPropertyFile = $em->getRepository('NovuscomCMFBundle:ElementPropertyF')->findBy(\n\t\t\tarray(\n\t\t\t\t'element' => $entity,\n\t\t\t)\n\t\t);\n\n\t\t$ElementPropertyFileId = array();\n\t\tforeach ($ElementPropertyFile as $epf) {\n\t\t\t$ElementPropertyFileId[$epf->getProperty()->getId()][$epf->getId()] = $epf->getFile()->getId();\n\t\t}\n\n\n\t\t/**\n\t\t * Устанавливаем значения для формы\n\t\t */\n\t\t$data = array(\n\t\t\t'VALUES' => $epArray,\n\t\t\t'DESCRIPTION' => $epDescription,\n\t\t\t'PROPERTY_FILE_VALUES' => $ElementPropertyFileId,\n\t\t\t'LIIP' => $this->get('liip_imagine.cache.manager'),\n\t\t\t'BLOCK_PROPERTIES' => $block->getProperty(),\n\t\t\t'ELEMENT_ENTITY' => $entity,\n\t\t\t'service.file' => $this->get('File'),\n\t\t);\n\n\n\t\t//$propertyForm = new ElementPropertyType($block->getProperty(), $em, $data, $request);\n\n\t\t//$formProperty = new FormProperty();\n\t\t//$formProperty->setValue('value of form property');\n\n\t\t/*$formElement = new FormElement();\n\t\t$formElement->setName($entity->getName());\n\t\t$formElement->setCode($entity->getCode());\n\t\t$formElement->setProperties($formProperty);*/\n\n\t\t$action_url = $this->generateUrl('admin_element_update', array('id' => $entity->getId(), 'block_id' => $params['block_id']));\n\t\tif (array_key_exists('section_id', $params)) {\n\t\t\t$action_url = $this->generateUrl('admin_element_update_in_section', array(\n\t\t\t\t'id' => $entity->getId(),\n\t\t\t\t'block_id' => $params['block_id'],\n\t\t\t\t'section_id' => $params['section_id']\n\t\t\t));\n\t\t}\n\t\t$form = $this->createForm(ElementType::class, $entity, array(\n\t\t\t'action' => $action_url,\n\t\t\t'method' => 'PUT',\n\t\t\t'em' => $em,\n\t\t\t'blockObject' => $block\n\t\t));\n\n\n\t\t$form->add('properties', ElementPropertyType::class,\n\t\t\tarray(\n\t\t\t\t//'entry_type' => ElementPropertyType::class,\n\t\t\t\t'label' => 'Свойства',\n\t\t\t\t'mapped' => false,\n\t\t\t\t//'by_reference' => false,\n\t\t\t\t//'allow_add' => true,\n\t\t\t\t//'allow_delete' => true,\n\t\t\t\t//'prototype' => true,\n\t\t\t\t'data' => $data,\n\t\t\t\t//'options' => array('asdasdasdasd'), // не работает\n\t\t\t));\n\n\t\t//$form->add('submit', SubmitType::class, array('label' => 'Сохранить', 'attr' => array('class' => 'btn btn-info')));\n\n\n\t\treturn $form;\n\t}", "function create() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->createElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "function buildSettingsForm() {}", "protected function form()\n {\n $form = new Form(new Terrace());\n\n $form->image('image', __('平台图片'))->rules('required', ['required' => '平台图片不能为空']);\n $form->text('name', __('平台名称'))->rules('required', ['required' => '平台名称不能为空']);\n $form->text('path', __('外链'))->rules('required', ['required' => '平台外链不能为空']);\n $form->text('notice_info', __('提示语'))->rules('required', ['required' => '平台提示语不能为空']);\n $form->radio('status','状态')->options(['1' => '未推荐', '2'=> '已推荐'])->default(1);\n\n return $form;\n }", "public function modifyView() {\n $this->object = $this->object->readObject($this->id);\n $uiObjectName = $this->type.'_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n return $uiObject->renderForm(array_merge(\n array('values'=>$values,\n 'action'=>url($this->type.'/modify', true),\n 'class'=>'formAdmin formAdminModify'),\n array('submit'=>array('save'=>__('save'),\n 'saveCheck'=>__('saveCheck')))));\n }", "function Dojo_editform() \n{\n $DojoName = params('dojo');\n $DojoName = str_replace('%20', ' ', $DojoName);\n $xml = Find_Dojo_all();\n $dojo_data = '';\n foreach ( $xml->Dojo as $dojo ) {\n if ($dojo->DojoName == $DojoName ) {\n set('Dojo', $dojo);\n print( $dojo );\n }\n }\n return html('dojo/edit_form.html.php');\n}", "protected function form()\n {\n $grid = Admin::form(SiteModel::class, function(Form $form){\n // Displays the record id\n $form->display('id', 'ID');\n // Add an input box of type text\n $form->url('url', 'Site url')->rules('required');\n $form->text('name', 'Site name')->rules('required');\n $form->switch('official', 'Official?');\n // Add textarea for the describe field\n $form->textarea('describe', 'Description');\n // Add a switch field\n $form->switch('enable', 'Enabled?');\n $form->switch('searcheable', 'Searcheable?');\n $form->url('search_url', 'Search URL');\n $form->text('search_method', 'Search Method');\n $form->text('search_key', 'Search KEY');\n $form->text('search_example', 'Search Example');\n // Add a date and time selection box\n //$form->datetime('release_at', 'release time')->rules('required');\n // Display two time column \n $form->display('created_at', 'Created time');\n $form->display('updated_at', 'Updated time');\n });\n return $grid;\n }", "public function edit()\r\n\r\n {\r\n\r\n $this->page_title->push(lang('menu_products_add'));\r\n\r\n $this->data['pagetitle'] = $this->page_title->show();\r\n\r\n\r\n /* Breadcrumbs :: Common */\r\n\r\n $this->breadcrumbs->unshift(1, lang('menu_products_add'), 'admin/setup/product/edit');\r\n\r\n\r\n /* Breadcrumbs */\r\n\r\n $this->data['breadcrumb'] = $this->breadcrumbs->show();\r\n\r\n\r\n /* Data */\r\n\r\n $this->data['error'] = NULL;\r\n\r\n $this->data['charset'] = 'utf-8';\r\n\r\n $this->data['form_url'] = 'admin/setup/product/update';\r\n\r\n\r\n /* Load Template */\r\n\r\n $this->template->admin_render('admin/products/edit', $this->data);\r\n\r\n\r\n }", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "abstract function setupform();", "protected function form()\n {\n $form = new Form(new PeriodProduct);\n // $form->html('<button class=\"btn btn-primary\"><i class=\"fa fa-send\"></i>&nbsp;提交</button>');\n\n if ($this->mode == Builder::MODE_CREATE) {\n if (request()->has('product_id') && Product::where('id', request()->input('product_id'))->exists()) {\n $this->product_id = request()->input('product_id');\n } else {\n $this->product_id = Product::first()->id;\n }\n $form->hidden('_from_')->default(Builder::MODE_CREATE);\n }\n if ($this->mode == Builder::MODE_EDIT) {\n $this->period_product_id = Route::current()->parameter('period_product');\n $this->product_id = PeriodProduct::find($this->period_product_id)->product_id;\n $form->hidden('_from_')->default(Builder::MODE_EDIT);\n }\n\n $product_id = $this->product_id;\n $product = Product::find($this->product_id);\n $period_product_id = $this->period_product_id;\n\n if ($this->mode == Builder::MODE_CREATE) {\n $form->tools(function (Form\\Tools $tools) use($product_id) {\n $tools->disableDelete();\n $tools->disableList();\n $tools->disableView();\n\n $tools->append('<div class=\"btn-group pull-right\" style=\"margin-right: 5px\">\n <a href=\"' . route('admin.products.edit', ['id' => $product_id]) . '\" class=\"btn btn-sm btn-default\">\n <i class=\"fa fa-backward\"></i>&nbsp;返回</a>\n </div>');\n\n });\n /*$form->tools(function (Tools $tools) use ($product_id) {\n $tools->disableDelete();\n $tools->disableList();\n $tools->disableView();\n $tools->append('<div class=\"btn-group pull-right\" style=\"margin-right: 5px\">'\n . '<a href=\"' . route('admin.period_products.index', ['product_id' => $product_id]) . '\" class=\"btn btn-sm btn-default\">'\n . '<i class=\"fa fa-list\"></i>&nbsp;列表'\n . '</a>'\n . '</div>');\n });*/\n }\n if ($this->mode == Builder::MODE_EDIT) {\n $form->tools(function (Form\\Tools $tools) use($product_id, $period_product_id) {\n $tools->disableDelete();\n $tools->disableList();\n $tools->disableView();\n\n $tools->append('<div class=\"btn-group pull-right\" style=\"margin-right: 5px\">\n <a href=\"' . route('admin.products.edit', ['id' => $product_id]) . '\" class=\"btn btn-sm btn-default\">\n <i class=\"fa fa-backward\"></i>&nbsp;返回</a>\n </div>');\n\n });\n /*$form->tools(function (Tools $tools) use ($product_id, $period_product_id) {\n $tools->disableDelete();\n $tools->disableList();\n $tools->disableView();\n $tools->append('<div class=\"btn-group pull-right\" style=\"margin-right: 5px\">'\n . '<a href=\"' . route('admin.period_products.show', ['period_product' => $period_product_id, 'product_id' => $product_id]) . '\" class=\"btn btn-sm btn-primary\">'\n . '<i class=\"fa fa-eye\"></i>&nbsp;查看'\n . '</a>'\n . '</div>&nbsp;'\n . '<div class=\"btn-group pull-right\" style=\"margin-right: 5px\">'\n . '<a href=\"' . route('admin.period_products.index', ['product_id' => $product_id]) . '\" class=\"btn btn-sm btn-default\">'\n . '<i class=\"fa fa-list\"></i>&nbsp;列表'\n . '</a>'\n . '</div>');\n });*/\n }\n\n $form->hidden('product_id')->default($this->product_id);\n $form->display('product_name', 'Product')->default($product->name_en);\n\n /*$form->datetime('started_at', 'Started at')->default(date('Y-m-d H:i:s'));\n $form->datetime('stopped_at', 'Stopped at')->default(date('Y-m-d H:i:s'));*/\n $form->datetimeRange('started_at', 'stopped_at', '限时时段')->rules('required');\n\n $form->ignore(['_from_']);\n\n // 定义事件回调,当模型即将保存时会触发这个回调\n $form->saving(function (Form $form) {\n //\n });\n\n $form->saved(function (Form $form) use ($product_id) {\n $this->period_product_id = $form->model()->id;\n $this->product_id = $form->model()->product_id;\n return redirect()->route('admin.products.edit', ['id' => $product_id]);\n });\n\n return $form;\n }", "protected function form()\n {\n return Form::make(new Liuchengku(), function (Form $form) {\n\t\t\t$form->display('id');\n\t\t\t$form->text('brand','品牌名称')->required();\n\t\t\t$form->tab('加盟流程', function (Form $form) {\n\t\t\t\t $form->textarea('jmlc','加盟流程')->rows(12);\n\t\t\t\t /* $form->editor('jmlc','加盟流程')->options([\n\t\t\t\t\t//'toolbar' => ['undo redo | styleselect | bold italic | link image',],\n\t\t\t\t\t'toolbar' => [],\n\t\t\t\t]); */\n\t\t\t\t})->tab('加盟支持', function (Form $form) {\n\t\t\t\t $form->editor('jmzc','加盟支持');\n\t\t\t\t})->tab('加盟优势', function (Form $form) {\n\t\t\t\t $form->editor('jmys','加盟优势');\n\t\t\t\t});\n //$form->text('type');\n //$form->text('retype');\n\t\t\t//$form->text('is_make');\n\t\t\t//$form->text('user_id');\n $form->hidden('user_id');\n\t\t\t$form->hidden('is_make');\n\t\t\t$form->display('created_at');\n $form->display('updated_at');\n $form->saving(function (Form $form) {\n if ($form->isCreating()) {\n $form->user_id=Admin::user()->id;\n\t\t\t\t\t$form->is_make=1;\n\t\t\t\t\t}\n });\n });\n }", "public function createForm();", "public function createForm();", "function cps_changeset_edit_form($form, &$form_state) {\n $entity = $form_state['entity'];\n\n $form['info']['name'] = array(\n '#type' => 'textfield',\n '#title' => t('Name'),\n '#description' => t('This will appear in the administrative interface to easily identify it.'),\n '#default_value' => $entity->name,\n '#required' => TRUE,\n );\n\n $form['info']['description'] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#default_value' => $entity->description,\n );\n \n $form['info']['lock_in_select'] = array(\n '#type' => 'checkbox',\n '#title' => t('Lock in select'),\n '#description' => t('If checked all users will see this site version in the site version selector bar while unpublished.'),\n '#default_value' => $entity->lock_in_select,\n );\n\n $form['actions'] = array(\n '#type' => 'actions',\n );\n\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "public function createComponentEditForm()\n\t{\n\t\t$form = new Form;\n\t\t$form->addGroup();\n\t\t$form->addHidden('ID_leku');\n\t\t$form->addText('nazev_leku', 'Názov lieku')\n\t\t\t->addRule(Form::FILLED, 'Zadajte názov lieku');\n\t\t$form->addSelect('typ_leku', 'Typ lieku', self::MEDICINE_TYPE)\n\t\t\t->setPrompt('Zvoľte typ lieku')\n\t\t\t->setRequired(TRUE)\n\t\t\t->setAttribute('class', 'form-control');\n\n\t\t$form->addGroup(\"Poisťovne\");\n\t\t$removeEvent = [$this, 'removeElementClicked'];\n\t\t$insurences = $form->addDynamic(\n\t\t\t'insurences',\n\t\t\tfunction (Container $insurence) use ($removeEvent) {\n\t\t\t\t$insurence->addHidden('ID_leku');\n\t\t\t\t$insurence->addSelect('ID_pojistovny', 'Poisťovňa', $this->insurenceManager->getInsurenceToSelectBox())\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setPrompt('Zvoľte poisťovňu')\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$insurence->addText('cena', 'Cena lieku')\n\t\t\t\t\t->setRequired(FALSE)\n\t\t\t\t\t->setDefaultValue('0')\n\t\t\t\t\t->addRule(Form::FLOAT, 'Cena musí byť číslo');\n\t\t\t\t$insurence->addText('doplatek', 'Doplatok na liek')\n\t\t\t\t\t->setRequired(FALSE)\n\t\t\t\t\t->setDefaultValue('0')\n\t\t\t\t\t->addRule(Form::FLOAT, 'Doplatok musí byť číslo');\n\t\t\t\t$insurence->addSelect('hradene', 'Typ lieku', array('hradene' => 'Hradený', 'nehradene' => 'Nehradený', 'doplatok' => 'Liek s doplatkom'))\n\t\t\t\t\t->setPrompt('Zvoľte typ lieku')\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$removeBtn = $insurence->addSubmit('remove', 'Odstrániť poisťovňu')\n\t\t\t\t\t->setAttribute('class', 'btn-danger')\n\t\t\t\t\t->setValidationScope(false);\n\t\t\t\t$removeBtn->onClick[] = $removeEvent;\n\t\t\t}, 1\n\t\t);\n\n\t\t$insurences->addSubmit('add', 'Pridať poisťovňu')\n\t\t\t->setAttribute('class', 'btn-success')\n\t\t\t->setValidationScope(false)\n\t\t\t->onClick[] = [$this, 'addElementClicked'];\n\n\t\t$form->addGroup(\"Pobočky\");\n\t\t$offices = $form->addDynamic(\n\t\t\t'offices',\n\t\t\tfunction (Container $office) use ($removeEvent) {\n\t\t\t\t$office->addHidden('ID_leku');\n\t\t\t\t$office->addSelect('ID_pobocky', 'Pobočka', $this->officeManager->getOfficesToSelectBox())\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setPrompt('Zvoľte pobočku')\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$office->addText('pocet_na_sklade', 'Počet kusov')\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setDefaultValue('1')\n\t\t\t\t\t->addRule(Form::INTEGER, 'Počet kusov musí byť číslo')\n\t\t\t\t\t->addRule(Form::RANGE, 'Počet kusov musí byť kladné číslo', array(0, null));\n\n\t\t\t\t$removeBtn = $office->addSubmit('remove', 'Odstrániť pobočku')\n\t\t\t\t\t->setAttribute('class', 'btn-danger')\n\t\t\t\t\t->setValidationScope(false);\n\t\t\t\t$removeBtn->onClick[] = $removeEvent;\n\t\t\t}, 1\n\t\t);\n\n\t\t$offices->addSubmit('add', 'Pridať pobočku')\n\t\t\t->setAttribute('class', 'btn-success')\n\t\t\t->setValidationScope(false)\n\t\t\t->onClick[] = [$this, 'addElementClicked'];\n\n\t\t$form->addGroup('');\n\t\t$form->addSubmit('submit', 'Uložiť liek')\n\t\t\t->setAttribute('class', 'btn-primary')\n\t\t\t->onClick[] = [$this, 'submitElementClicked'];\n\n\t\treturn $this->bootstrapFormRender($form);\n\t}", "function ras_new_select() {\n\t\t\t\n\t\techo form(\n\t\t\thed(poll_gTxt('add_new_poll').'<p><a href=\"?event=poll_prefs\" >'.poll_gTxt('do_not_save').'</a></p>', 3,' style=\"margin-top: 2em; text-align: center;\"').\n\n\t\t\tstartTable('edit').\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('poll_name')).\n\t\t\t\tfInputCell('name')\n\t\t\t).\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('poll_prompt')).\n\t\t\t\tfInputCell('prompt','','','88')\n\t\t\t).\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_1')).\n\t\t\t\tfInputCell('n0')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_2')).\n\t\t\t\tfInputCell('n1')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_3')).\n\t\t\t\tfInputCell('n2')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_4')).\n\t\t\t\tfInputCell('n3')\n\t\t\t).\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_5')).\n\t\t\t\tfInputCell('n4')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_6')).\n\t\t\t\tfInputCell('n5')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_7')).\n\t\t\t\tfInputCell('n6')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_8')).\n\t\t\t\tfInputCell('n7')\n\t\t\t).\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_9')).\n\t\t\t\tfInputCell('n8')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\tfLabelCell(poll_gTxt('p_option_10')).\n\t\t\t\tfInputCell('n9')\n\t\t\t).\n\n\t\t\ttr(\n\t\t\t\ttd().\n\t\t\t\ttd(\n\t\t\t\t\tfInput('submit', '', gTxt('save_new'), 'publish')\n\t\t\t\t)\n\t\t\t).\n\n\t\t\tendTable().\n\n\t\t\teInput('poll_db').\n\t\t\tsInput('new_poll')\n\t\t);\n\t}", "protected function form()\n {\n $Adv=new Adv();\n $form = new Form($Adv);\n $platform= $Adv->platform;\n $type= $Adv->type;\n $status= $Adv->status;\n $list_array=[\n array(\"field\"=>\"title\",\"title\"=>\"标题\",\"type\"=>\"text\"),\n array(\"field\"=>\"platform\",\"title\"=>\"平台\",\"type\"=>\"select\",\"array\"=>$platform),\n array(\"field\"=>\"type\",\"title\"=>\"类型\",\"type\"=>\"select\",\"array\"=>$type),\n array(\"field\"=>\"image\",\"title\"=>\"图片\",\"type\"=>\"image\"),\n array(\"field\"=>[\"start_time\",\"end_time\"],\"title\"=>\"活动时间\",\"type\"=>\"datetimeRange\"),\n array(\"field\"=>\"font1\",\"title\"=>\"字段1\",\"type\"=>\"text\"),\n array(\"field\"=>\"font2\",\"title\"=>\"字段2\",\"type\"=>\"text\"),\n array(\"field\"=>\"font3\",\"title\"=>\"字段3\",\"type\"=>\"text\"),\n array(\"field\"=>\"font4\",\"title\"=>\"字段4\",\"type\"=>\"text\"),\n array(\"field\"=>\"font5\",\"title\"=>\"字段5\",\"type\"=>\"text\"),\n array(\"field\"=>\"status\",\"title\"=>\"状态\",\"type\"=>\"switch\",\"array\"=>$status),\n array(\"field\"=>\"created_at\",\"title\"=>\"创建时间\",\"type\"=>\"value\")\n ];\n BaseControllers::set_form($form,$list_array);\n return $form;\n }", "public function run() {\n $model = new PlatformRegisterForm();\n $this->controller->render('platformRegister',array('model'=>$model));\n }", "function theme_devshop_projects_settings_form($form) {\n $rows = array();\n $header = array();\n $header[] = t('Environment');\n foreach (element_children($form) as $env_name) {\n $row = array();\n $row[] = $env_name . drupal_render($form[$env_name]['git_ref']);\n foreach (element_children($form[$env_name]['settings']) as $setting) {\n if (!isset($header[$setting])) {\n $header[$setting] = $form[$env_name]['settings'][$setting]['#title'];\n }\n $form[$env_name]['settings'][$setting]['#title'] = '';\n $row[] = drupal_render($form[$env_name]['settings'][$setting]);\n }\n $rows[] = $row;\n }\n $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('class' => array('project-environments-table'))));\n return $output;\n}", "function pa_edit() {\n\t\t\t\t$edit_pid = (int)UTIL::get_post('edit_pid');\n\t\t\t\t\n\t\t\t\t//-- haben wir keine edit-id, gibts eine seiten-tabelle zur auswahl\n\t\t\t\tif (!$edit_pid) {\n\t\t\t\t\techo 'error: no pid';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$form = MC::create('form');\n\t\t\t\t$form->init('page', 'mod_page');\n\t\t\t\t$form->add_hidden('edit_pid', $edit_pid);\n\t\t\t\t\n\t\t\t\t// hatten wir fehler\n\t\t\t\tif ($this->get_var('error')) {\n\t\t\t\t\t$form->set_values($this->get_var('data'));\n\t\t\t\t\t$form->set_error_fields($this->get_var('error'));\n\t\t\t\t}\t\n\t\t\t\telse {\n\t\t\t\t\t// frisch aus db lesen\n\t\t\t\t\t$sql = 'SELECT * FROM '.$this->mod_tbl.' WHERE id='.$edit_pid;\n\t\t\t\t\t$res = $this->DB->query($sql);\n\t\t\t\t\t$data = $res->r();\n\t\t\t\t\t$form->set_values($data);\n\t\t\t\t}\n\n\t\t\t\t$this->set_var('path', $this->_get_path_print($edit_pid));\n\t\t\t\t$this->set_var('form', $form);\n\t\t\t\t\n\t\t\t\t$this->OPC->generate_view($this->tpl_dir.'pa_edit.php');\n\n\t\t\t}", "function createApprentice() {\n\t\t\t\t\t$addForm = new h2o('views/addApprentice.html');\n\t\t\t\t\techo $addForm->render();\n\t\t\t\t}", "function InputForm()\n\t{\t\n\t\tif (!$data = $this->details)\n\t\t{\t$data = $_POST;\n\t\t\tif (!$data)\n\t\t\t{\t$data = array('live'=>1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$form = new Form('pageedit.php?id=' . (int)$this->id, 'pageedit');\n\t\t$form->AddTextInput('Page title', 'pagetitle', $this->InputSafeString($data['pagetitle']), '', 50);\n\t\t$form->AddCheckBox('Hide title on page', 'hideheader', 1, $data['hideheader']);\n\t\t\n\t\tif ($parents = $this->GetPossibleParents())\n\t\t{\t$form->AddSelectWithGroups('Parent page', 'parentid', $data['parentid'], '', $parents, 1, 0, '');\n\t\t\t$form->AddCheckBox('Display as section of parent', 'inparent', 1, $data['inparent']);\n\t\t}\n\t\t\n\t\t$form->AddTextInput('Order in menu', 'pageorder', (int)$data['pageorder'], 'num', 4);\n\t\tif ($this->CanAdminUser('technical'))\n\t\t{\t$form->AddTextInput('Extra page to include', 'includefile', $this->InputSafeString($data['includefile']), '', 50);\n\t\t\t$form->AddCheckBox('Allow galleries', 'galleries', 1, $data['galleries']);\n\t\t}\n\t\t$form->AddCheckBox('Make live', 'pagelive', 1, $data['pagelive']);\n\t\t$form->AddCheckBox('Leave out of search results', 'nosearch', 1, $data['nosearch']);\n\t\t$form->AddCheckBox('Show social media links?', 'socialbar', 1, $data['socialbar']);\n\t\t$form->AddCheckBox('In header menu?', 'headermenu', 1, $data['headermenu']);\n\t\tif ($this->CanAdminUser('technical'))\n\t\t{\t$form->AddTextInput('Class for header menu', 'menuclass', $this->InputSafeString($data['menuclass']), '', 50);\n\t\t}\n\t\t$form->AddCheckBox('In footer menu?', 'footermenu', 1, $data['footermenu']);\n\t\t$form->AddCheckBox('Header only (no content)', 'headeronly', 1, $data['headeronly']);\n\t\t$form->AddTextInput('Redirect link (full address if external)', 'redirectlink', $this->InputSafeString($data['redirectlink']), 'long', 255);\n\t\t\n\t\tif ($this->id)\n\t\t{\t$form->AddTextInput('Slug (for URL)', 'pagename', $this->InputSafeString($data['pagename']), 'long', 255);\n\t\t\tif ($link = $this->Link())\n\t\t\t{\t$form->AddRawText('<p><label>Link to page</label><span><a href=\"' . $link . '\" target=\"_blank\">' . $link . '</a></span><br /></p>');\n\t\t\t}\n\t\t}\n\t\t$form->AddCheckBox('Display block link in parent (if any)', 'blocklink', 1, $data['blocklink']);\n\t\t$form->AddTextArea('Block link text', $name = 'pageintro', stripslashes($data['pageintro']), 'tinymce', 0, 0, 10, 60);\n\t\t$form->AddTextArea('Page content', $name = 'pagetext', stripslashes($data['pagetext']), 'tinymce', 0, 0, 50, 60);\n\t\t$form->AddRawText('<p><label></label><a href=\"#\" onclick=\"javascript:window.open(\\'newsimagelist.php\\', \\'newsimages\\', \\'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=550\\'); return false;\">view available images</a></p>');\n\t\t$form->AddFileUpload('Subpage image:', 'imagefile');\n\t\tif ($src = $this->HasImage('thumbnail'))\n\t\t{\t$form->AddRawText('<label>Current image</label><img src=\"' . $src . '?' . time() . '\" height=\"200px\" /><br />');\n\t\t\t$form->AddCheckBox('Delete this', 'delphoto');\n\t\t}\n\t\t\n\t\tob_start();\n\t\techo '<label>Banner:</label><br /><label id=\"bannerPicked\">', ($data['banner'] && ($banner = new BannerSet($data['banner'])) && $banner->id) ? $this->InputSafeString($banner->details['title']) : 'none','</label><input type=\"hidden\" name=\"banner\" id=\"bannerValue\" value=\"', (int)$data['banner'], '\" /><span class=\"dataText\"><a onclick=\"BannerPicker();\">change this</a></span><br />';\n\t\t$form->AddRawText(ob_get_clean());\n\n\n\t\t$form->AddSubmitButton('', $this->id ? 'Save' : 'Create', 'submit');\n\t\techo $this->BannerPickerPopUp();\n\t\t\n\t\t$form->Output();\n\t}", "abstract public function createForm();", "abstract public function createForm();", "function editCompany() {\n\t\t\t\t\tif ($_POST['updateDelete'] == 'update') {\n\n\t\t\t\t\t\t/* params(0) represents the apprentice name passed in via the URL */\n\t\t\t\t\t\t$company = Partner::find_by_name(params(0));\n\t\t\t\t\t\t\n\t\t\t\t\t\t$company->update_attributes(array('name'\t\t => $_POST['inputName'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'city'\t\t => $_POST['inputCity'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'unix_linux'\t => $_POST['inputUnixLinux'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'sql'\t\t\t => $_POST['inputSql'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'git'\t\t\t => $_POST['inputGit'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'wordpress'\t => $_POST['inputWordpress'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'drupal'\t\t => $_POST['inputDrupal'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'python'\t\t => $_POST['inputPython'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'svn'\t\t\t => $_POST['inputSVN'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'objective_c'\t => $_POST['inputObjectiveC'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'ruby_rails'\t => $_POST['inputRuby'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'c_plusplus'\t => $_POST['inputCPlusPlus'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'dot_net'\t\t => $_POST['inputNet'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'php'\t\t\t => $_POST['inputPHP'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'html_css'\t => $_POST['inputHtmlCss'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'java'\t\t => $_POST['inputJava'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'javascript'\t => $_POST['inputJavascript'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'comments'\t => $_POST['inputComments'])\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ($_POST['updateDelete'] == 'delete') {\n\t\t\t\t\t\t$company = Partner::find_by_name(params(0));\n\t\t\t\t\t\t$company->delete();\n\t\t\t\t\t}\n\n\t\t\t\t\t$success = new h2o('views/happySuccess.html');\n\t\t\t\t\techo $success->render();\n\t\t\t\t}", "public function renderForm()\n {\n $fields_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Configuration'),\n 'icon' => 'icon-gears'\n ),\n 'input' => array(\n array(),\n array(\n 'type' => 'text',\n 'label' => $this->l('API Key'),\n 'name' => 'SEND_SMS_API',\n 'desc' => $this->l('The API Key is used to authenticate in order to send SMS.'),\n 'required' => true\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Admin Mobile Number'),\n 'name' => 'ADMIN_MOBILE',\n 'required' => true\n )\n ),\n 'submit' => array(\n 'title' => $this->l('Save')\n )\n )\n );\n $fields_form = $this->setDefaultInput($fields_form);\n $helper = new HelperForm();\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));\n $helper->default_form_language = $lang->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG')\n ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;\n $this->fields_form = array();\n $helper->id = (int) Tools::getValue('id_carrier');\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'btnSubmit';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false);\n $helper->currentIndex .= '&configure=' . $this->name . '&tab_module=' . $this->tab;\n $helper->currentIndex .= '&module_name=' . $this->name;\n $helper->currentIndex .= '&configuration=yes';\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFieldsValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n \n return $helper->generateForm(array(\n $fields_form\n ));\n }", "protected function _prepareForm()\n {\n $model = $this->getModel();\n \n\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n ['data' => ['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post']]\n );\n\n $fieldset = $form->addFieldset(\n 'base_fieldset',\n ['legend' => __('Template Information'), 'class' => 'fieldset-wide']\n );\n $fieldset->addType('background', 'Sample\\Gridpart2\\Block\\Adminhtml\\Template\\Helper\\Background');\n \n \n if ($model->getGridpart2templateId()) {\n $fieldset->addField('id', 'hidden', ['name' => 'id', 'value' => $model->getGridpart2templateId()]);\n }\n\n $fieldset->addField(\n 'name',\n 'text',\n [\n 'name' => 'name',\n 'label' => __('Template Name'),\n 'title' => __('Template Name'),\n 'required' => true,\n 'value' => $model->getName()\n ]\n );\n $fieldset->addField(\n 'pid',\n 'hidden',\n [\n 'name' => 'pid',\n 'value' => $model->getId()\n ]\n );\n\n $fieldset->addField(\n 'status',\n 'select',\n [\n 'label' => __('Status'),\n 'required' => true,\n 'name' => 'status',\n 'values' => $this->_statusOption->getStatusesOptionArray()\n ]\n );\n\n $form->setAction($this->getUrl('*/*/save'));\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "function thumbwhere_host_edit_form($form, &$form_state, $thumbwhere_host) {\n\n // Add the default field elements.\n $form['fk_hosttype'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereHost fk_hosttype'),\n '#default_value' => isset($thumbwhere_host->fk_hosttype) ? $thumbwhere_host->fk_hosttype : '',\n //'#maxlength' => 255,\n /// '#required' => TRUE,\n '#weight' => -5,\n '#autocomplete_path' => 'entity-autocomplete/thumbwhere_hosttype',\n );\n // Add the default field elements.\n $form['fk_hostcredential'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereHost fk_hostcredential'),\n '#default_value' => isset($thumbwhere_host->fk_hostcredential) ? $thumbwhere_host->fk_hostcredential : '',\n //'#maxlength' => 255,\n /// '#required' => TRUE,\n '#weight' => -5,\n '#autocomplete_path' => 'entity-autocomplete/thumbwhere_hostcredential',\n );\n // Add the default field elements.\n $form['address'] = array(\n '#type' => 'textfield',\n '#title' => t('ThumbWhereHost address'),\n '#default_value' => isset($thumbwhere_host->address) ? $thumbwhere_host->address : '',\n // '#maxlength' => 255,\n // '#required' => TRUE,\n '#weight' => -5,\n );\n // Add the default field elements.\n $form['online'] = array(\n '#type' => 'checkbox',\n '#title' => t('ThumbWhereHost online'),\n '#default_value' => isset($thumbwhere_host->online) ? $thumbwhere_host->online : 0,\n // '#maxlength' => 255,\n // '#required' => TRUE,\n '#weight' => -5,\n );\n\n\n\n $form['data']['#tree'] = TRUE;\n\n /*\n $form['data']['sample_data'] = array(\n '#type' => 'checkbox',\n '#title' => t('An interesting thumbwhere_host switch'),\n '#default_value' => isset($thumbwhere_host->data['sample_data']) ? $thumbwhere_host->data['sample_data'] : 1,\n );\n */\n\n\n // Add the field related form elements.\n $form_state['thumbwhere_host'] = $thumbwhere_host;\n field_attach_form('thumbwhere_host', $thumbwhere_host, $form, $form_state);\n\n $form['actions'] = array(\n '#type' => 'container',\n '#attributes' => array('class' => array('form-actions')),\n '#weight' => 400,\n );\n\n // We add the form's #submit array to this button along with the actual submit\n // handler to preserve any submit handlers added by a form callback_wrapper.\n $submit = array();\n\n if (!empty($form['#submit'])) {\n $submit += $form['#submit'];\n }\n\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save thumbwhere_host'),\n '#submit' => $submit + array('thumbwhere_host_edit_form_submit'),\n );\n\n // Do we show the delete button?\n if (!empty($thumbwhere_host->pk_host)) {\n $form['actions']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete thumbwhere_host'),\n '#suffix' => l(t('Cancel'), 'admin/thumbwhere/thumbwhere_hosts'),\n '#submit' => $submit + array('thumbwhere_host_form_submit_delete'),\n '#weight' => 45,\n );\n }\n\n // We append the validate handler to #validate in case a form callback_wrapper\n // is used to add validate handlers earlier.\n $form['#validate'][] = 'thumbwhere_host_edit_form_validate';\n return $form;\n}", "public function editAction()\n {\n $module = $this->getModule();\n $config = Pi::config('', $module);\n $apps = $this->_getAppsList();\n $cases = $this->_getCasesList();\n\n $solution_apps = $data = array();\n\n if ($this->request->isPost()) {\n $data = $this->request->getPost();\n\n $id = $data['id'];\n $row = $this->getModel($module)->find($id);\n\n // Set form\n $form = new SolutionForm('solution-form');\n $form->setInputFilter(new SolutionFilter);\n $form->setData($data);\n if ($form->isValid()) {\n $values = $form->getData();\n\n if (empty($values['name'])) {\n $values['name'] = null;\n }\n if (empty($values['slug'])) {\n $values['slug'] = null;\n }\n\n $values['time_updated'] = time();\n\n // Fix upload icon url\n $iconImages = $this->setIconPath(array($data));\n\n if (isset($iconImages[0]['filename'])) {\n $values['icon'] = $iconImages[0]['filename'];\n }\n\n // Save\n $row->assign($values);\n $row->save();\n\n Pi::service('cache')->flush('module', $this->getModule());\n Pi::registry('solution', $this->getModule())->clear($this->getModule());\n Pi::registry('nav', $this->getModule())->flush();\n\n $message = _a('Solution data saved successfully.');\n\n // Try save apps.\n $apps = $data[SOLUTION_APP];\n foreach ($apps as $app) {\n $result = $this->_saveSolutionApp($id, $app);\n if ($result['message']) {\n $message .= '<li>' . $app['title'] . _a(' can\\'t save;') . '</li>';\n $message .= $result['message'];\n }\n }\n\n // Try save cases.\n $cases = $data[SOLUTION_CASE];\n foreach ($cases as $case) {\n $result = $this->_saveSolutionCase($id, $case);\n if ($result['message']) {\n $message .= '<li>' . $app['title'] . _a(' can\\'t save;') . '</li>';\n $message .= $result['message'];\n }\n }\n\n return $this->jump(array('action' => 'index'), $message);\n\n } else {\n $form_info = $this->_newSolutionForm($form, $data);\n $formGroups = $form_info['formGroups'];\n\n $data['image'] = $data['icon'];\n $json_data = json_encode($data);\n\n $message = _a('Invalid data, please check and re-submit.');\n }\n } else {\n $id = $this->params('id');\n $row = $this->getModel($module)->find($id);\n $data = $row->toArray();\n // Solution apps list.\n $solution_apps = $this->_getSolutionApps($id);\n $data[SOLUTION_APP] = $solution_apps;\n // Solution cases list.\n $solution_cases = $this->_getSolutionCases($id);\n $data[SOLUTION_CASE] = $solution_cases;\n\n $form = new SolutionForm('solution-edit-form');\n // Rebuild form.\n $form_info = $this->_newSolutionForm($form, $data);\n $form = $form_info['form'];\n $formGroups = $form_info['formGroups'];\n\n $form->setData($data);\n $form->setAttribute(\n 'action',\n $this->url('', array('action' => 'edit'))\n );\n $message = '';\n\n $rootUrl = $this->rootUrl();\n $data['image'] = $rootUrl . '/' . $data['icon'];\n $json_data = json_encode($data);\n }\n\n $this->view()->assign('formGroups', $formGroups);\n $this->view()->assign('solution_apps', $solution_apps);\n $this->view()->assign('solution_cases', $solution_cases);\n $this->view()->assign('module', $this->getModule());\n $this->view()->assign('form', $form);\n $this->view()->assign('content', $json_data);\n $this->view()->assign('title', _a('Solution Edit'));\n $this->view()->assign('message', $message);\n $this->view()->setTemplate('solution-edit');\n }", "public function executeNew(sfWebRequest $request)\n {\n $this->form = new WebsitePracticeAreaForm();\n $this->websitedetail = UsersWebsite::getUsersWebsiteId($this->getUser()->getAttribute('admin_user_id'));\n $this->displaySlugValue = '';\n\n }", "protected function form()\n {\n // 创建一个表单\n return Admin::form(SystemSetting::class, function (Form $form) {\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->text('title', '网站名称')->rules('required');\n $form->image('logo', '网站LOGO')->rules('required');\n $form->image('gongzhonghao', '公众号二维码');\n $form->image('xiaochengxu', '小程序二维码');\n $form->text('service', '在线客服');\n $form->text('icp', 'ICP 备案信息');\n $form->radio('is_login', '是否登录才能访问')->options(['1' => '是', '0' => '否'])->default('0');\n });\n }", "function createCompany() {\n\t\t\t\t\t$addForm = new h2o('views/addCompany.html');\n\t\t\t\t\techo $addForm->render();\n\t\t\t\t}", "public function newAction()\n {\n/* \t$numfields = $this->getDoctrine()\n \t->getRepository('HegesAppConfigBundle:Configlinetype')\n \t->find($fieldsnumber);\n */\n \t\n \t\n $entity = new Configline();\n $form = $this->createForm(new ConfiglineType(), $entity);\n\n return $this->render('HegesAppConfigFileBundle:Configline:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "function editBuildingHandler() {\n global $inputs;\n\n $res = updateDb('building', [\n 'building_name' => $inputs['name'], \n 'address' => $inputs['address'],\n 'description' => $inputs['desc'],\n 'area' => $inputs['area']],\n ['id' => $inputs['id']]);\n\n formatOutput(true, 'update success', $res);\n}", "function edit(){\n global $wpdb;\n global $DOPBSP;\n \n $id = $_POST['id'];\n $field = $_POST['field'];\n $value = $_POST['value'];\n $language = $_POST['language'];\n \n if ($field == 'label'){\n $value = str_replace(\"\\n\", '<<new-line>>', $value);\n $value = str_replace(\"\\'\", '<<single-quote>>', $value);\n $value = utf8_encode($value);\n \n $field_data = $wpdb->get_row($wpdb->prepare('SELECT * FROM '.$DOPBSP->tables->forms_fields_options.' WHERE id=%d',\n $id));\n \n $translation = json_decode($field_data->translation);\n $translation->$language = $value;\n \n $value = json_encode($translation);\n $field = 'translation';\n }\n \n $select_option = $wpdb->get_row($wpdb->prepare('SELECT * FROM '.$DOPBSP->tables->forms_fields_options.' WHERE id=%d',\n $id));\n $wpdb->update($DOPBSP->tables->forms_fields_options, array($field => $value), \n array('id' => $_POST['id']));\n \n echo $select_option->field_id;\n \n die();\n }", "function content() {\n echo \"\n <form action='' method='post'>\n <input name='token' type='hidden' value='{$this->params['editToken']}'>\n <input name='editId' type='hidden' value='{$this->params['editId']}'>\n <label for='username'>Username</label>\n <input name='username' placeholder='Username' id='username' type='text' value='{$this->params['username']}'>\n <label for='password'>Password</label>\n <input name='password' placeholder='Replace password (Optional)' id='password' type='password'>\n <label for='role'>Role</label>\n <select name='role' id='role' {$this->params['rolePower']}>\n <option value='1' {$this->params['isAdmin']}>Admin</option>\n <option value='2' {$this->params['isAgent']}>Agent</option>\n </select>\n <input type='submit' value='Edit Account'>\n </form>\n \";\n }", "protected function form()\n {\n $form = new Form(new MobileImport);\n $form->text('title', '导入标题');\n $folder_name = \"files/mobile/import/\" . date(\"Ym\", time()) . '/'.date(\"d\", time());\n $filename = time() . '_' . str_random(10) . '.xlsx';\n $form->file('file', '导入文件')->move($folder_name, $filename);\n $form->select('broker_id', '提供者')->options(function ($id) {\n if($id){\n $employee = Employee::find($id);\n if ($employee) {\n return [$employee->id => $employee->full_name];\n }\n }\n })->ajax('/admin/api/employee');\n $form->select('employee_id', '所属员工')->options(function ($id) {\n if($id){\n $employee = Employee::find($id);\n if ($employee) {\n return [$employee->id => $employee->full_name];\n }\n }\n })->ajax('/admin/api/employee');\n $form->select('project_item_id', '主推产品')->options(function ($id) {\n if($id){\n $projectItem = ProjectItem::find($id);\n if ($projectItem) {\n return [$projectItem->id => $projectItem->full_name];\n }\n }\n })->ajax('/admin/api/project-item');\n $form->select('labels', '导入等级')->options(OptionUtil::getLabelOption());\n $form->saving(function ($form) {\n if(!$form->model()->id){\n $form->model()->creator_id = Admin::user()->id;\n }\n });\n return $form;\n }", "public function updateForm(){\n $new = $this->model->getNew();\n $this->view->updateForm($new);\n }", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "function manage_form($form, $form_state) {\n module_load_include('inc','ccHosting','includes/lib');\n $form = array();\n global $user;\n\n\t$sitedata = array();\n\t$sitedata = getSiteData($form_state['site_id']);\n\n\tif(isset($sitedata)){\n\n\t\t$form['site_name'] = array(\n\t\t\t'#type' => 'textfield',\n\t\t\t'#title' => t('Site Name'),\n\t\t\t'#required' => TRUE,\n\t\t\t'#default_value' => $sitedata['site_name'],\n\t\t);\n\t\t$form['site_description'] = array(\n\t\t\t'#type' => 'textfield',\n\t\t\t'#title' => t('Description'),\n\t\t\t'#required' => TRUE,\n\t\t\t'#default_value' => $sitedata['site_description'],\n\t\t);\n\n\t\t$form['site_domain'] = array(\n\t\t\t'#type' => 'textfield',\n\t\t\t'#title' => t('Domain'),\n\t\t\t'#required' => TRUE,\n\t\t\t'#default_value' => $sitedata['site_domain'],\n\t\t);\n\n\t\t$form['site_cms'] = array(\n\t\t\t'#type' => 'textfield',\n\t\t\t'#title' => t('CMS'),\n\t\t\t'#required' => TRUE,\n\t\t\t'#default_value' => $sitedata['site_cms'],\n\t\t);\n\n\t\t/////// required for form\n\t\t$form['basic_id'] = array(\n\t\t\t'#type' => 'value',\n\t\t\t'#value' => $form_state['site_id'],\n\t\t);\n\t\t$form['bundle_type'] = array(\n\t\t\t'#type' => 'value',\n\t\t\t'#value' => 'ccdev_hosting_bundle',\n\t\t);\n\t\t$form['submit'] = array(\n\t\t\t'#type' => 'submit',\n\t\t\t'#value' => t('Save'),\n\t\t\t'#attributes' => array('class' => array('btn', 'btn-success'), 'style' => \"float:right; padding: 5px 10px;\"),\n\t\t\t'#theme' => \"submit\",\n\t\t\t'#prefix' => \"<div class=''>\",\n\t\t\t'#suffix' => \"</div>\",\n\t\t\t '#ajax' => array(\n\t\t\t 'callback' => 'manage_form_submit',),\n\t\t\t); \n\t}\n return $form;\n}", "protected function loadForm(): void\n {\n $rbtHiddenValues = [\n ['label' => BL::lbl('Hidden'), 'value' => 1],\n ['label' => BL::lbl('Published'), 'value' => 0],\n ];\n $internalLinks = BackendSpotlightsModel::getInternalLinks();\n\n // create form\n $this->form = new BackendForm('add');\n\n $this->form->addText('title', null, null, 'form-control title', 'form-control danger title');\n $this->form->addEditor('text');\n $this->form->addText('link', null, null);\n $this->form->addDropdown('categories', $this->categories);\n $this->form->addImage('image');\n $this->form->addRadiobutton('hidden', $rbtHiddenValues, 0);\n $this->form->addText('link_title');\n $this->form->addCheckbox('external_link');\n $this->form->addText('external_url');\n $this->form->addDropdown('internal_url', $internalLinks, '',\n false,\n 'chzn-select'\n )->setDefaultElement('');\n\n // meta\n $this->meta = new BackendMeta($this->form, null, 'title', true);\n\n }", "private function createEditForm(SkSpecies $entity) {\n $em = $this->getDoctrine()->getManager();\n\n // Get criterias from species\n $criteria_ids = $em->getRepository('SkaphandrusAppBundle:SkIdentificationCriteria')->getCriteriasFromSpecies($entity->getId());\n\n\n\n $form = $this->createForm(new SkIdentificationSpeciesType(), $entity, array(\n 'action' => $this->generateUrl('identification_species_admin_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'criterias' => $criteria_ids\n ));\n return $form;\n }", "public function form()\r\n {\r\n $this->switch('field_select_create', Support::trans('main.select_create'))\r\n ->default(admin_setting('field_select_create'));\r\n }", "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 }", "protected function form()\n {\n $form=new Form(new JudgeServer());\n\n $form->text('scode', __('admin.judgeservers.scode'))->rules('required|alpha_dash|min:3|max:20');\n $form->text('name', __('admin.judgeservers.name'))->required();\n $form->text('host', __('admin.judgeservers.host'))->required();\n $form->text('port', __('admin.judgeservers.port'))->required();\n $form->text('token', __('admin.judgeservers.token'))->required();\n $form->switch('available', __('admin.judgeservers.availability'));\n $form->select('oid', __('admin.judgeservers.oj'))->options(OJ::all()->pluck('name', 'oid'))->help(__('admin.judgeservers.help.onlinejudge'))->required();\n $form->hidden('status', __('admin.judgeservers.status'))->default(0);\n return $form;\n }", "private function createEditForm(Hospital $entity)\n {\n $form = $this->createForm(new HospitalType(), $entity);\n\n $form->add('submit', 'submit', array('label' => 'Изменить', 'attr' => array('class' => 'btn btn-default btn-lg btn-block')));\n\n return $form;\n }", "public function editAction() {\n\t\t$Session = new Zend_Session_Namespace ( 'Admin' );\n\t\t$form = $this->getForm ( '/admin/productsattributes/process' );\n\t\t\n\t\t// Create the buttons in the edit form\r\n\t\t$this->view->buttons = array(\r\n\t\t\t\tarray(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\tarray(\"url\" => \"/admin/productsattributes/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\tarray(\"url\" => \"/admin/productsattributes/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)),\r\n\t\t);\n\t\t\n\t\t// Set the system field attribute title\n\t\t$panel = Isp::getPanel(); \n\t\tif(!empty($panel)){\n\t\t\t$form->getElement ( 'system_var' )->setLabel ( $panel );\n\t\t}\n\t\t\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\n\t\t\n\t\tif (! empty ( $id ) && is_numeric ( $id )) {\n\t\t\t$rs = $this->productsattributes->getAllInfo ( $id, \"*, pad.label as label, pad.prefix as prefix, pad.suffix as suffix, pad.description as description, pad.language_id as language_id\", $Session->langid );\n\t\t\t\n\t\t\tif (! empty ( $rs )) {\n\t\t\t\t$this->view->id = $id;\n\t\t\t\t$rs['language_id'] = $Session->langid; // added to the form the language id selected \n\t\t\t\t$form->populate ( $rs );\n\t\t\t}\n\t\t\t\n\t\t\t$this->view->buttons[] = array(\"url\" => \"/admin/productsattributes/confirm/id/$id\", \"label\" => $this->translator->translate('Delete'), \"params\" => array('css' => null));\r\n\t\t\t\t\n\t\t}\n\t\t$this->view->title = $this->translator->translate(\"Attribute Group\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can edit the attribute group details.\");\n\t\t\n\t\t$this->view->form = $form;\n\t\t$this->render ( 'applicantform' );\n\t}", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "function display_form_edit_form($user, $id=false) {\r\n if (!($id === false)) {\r\n try {\r\n $form = new Form($user->dbConn, $id);\r\n } catch (Exception $e) {\r\n $id = false;\r\n }\r\n }\r\n echo \"<form action='form.php\".(($id === false) ? \"\" : \"?id=\".intval($id)).\"' method='POST' class='form-horizontal'>\r\n <fieldset>\\n\".(($id === false) ? \"\" : \"<input type='hidden' name='form[id]' value='\".intval($id).\"' />\").\"\r\n <div class='control-group'>\r\n <label class='control-label' for='form[name]'>Name</label>\r\n <div class='controls'>\r\n <input name='form[name]' type='text' class='input-xlarge' id='form[name]'\".(($id === false) ? \"\" : \" value='\".escape_output($form->name).\"'\").\">\r\n </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='form[description]'>Description</label>\r\n <div class='controls'>\r\n <input name='form[description]' type='text' class='input-xlarge' id='form[description]'\".(($id === false) ? \"\" : \" value='\".escape_output($form->description).\"'\").\">\r\n </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='form[form_type_id]'>Type</label>\r\n <div class='controls'>\r\n \";\r\n display_form_type_dropdown($user->dbConn, \"form[form_type_id]\", (($id === false) ? 0 : intval($form->formType['id'])));\r\n echo \" </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='form[machine_type_id]'>Machine Type</label>\r\n <div class='controls'>\r\n \";\r\n display_machine_type_dropdown($user->dbConn, \"form[machine_type_id]\", (($id === false) ? 0 : intval($form->machineType['id'])));\r\n echo \" </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='form[js]'>Javascript</label>\r\n <div class='controls'>\r\n <textarea class='input-xlarge' id='form[js]' name='form[js]' cols='500' rows='10'>\".(($id === false) ? \"\" : escape_output($form->js)).\"</textarea>\r\n </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='form[php]'>PHP</label>\r\n <div class='controls'>\r\n <textarea class='input-xlarge' id='form[php]' name='form[php]' cols='500' rows='10'>\".(($id === false) ? \"\" : escape_output($form->php)).\"</textarea>\r\n </div>\r\n </div>\r\n <div class='form-actions'>\r\n <button type='submit' class='btn btn-primary'>\".(($id === false) ? \"Create form\" : \"Save changes\").\"</button>\r\n <a href='#' onClick='window.location.replace(document.referrer);' class='btn'>\".(($id === false) ? \"Go back\" : \"Discard changes\").\"</a>\r\n </div>\r\n </fieldset>\\n</form>\\n\";\r\n}" ]
[ "0.65197957", "0.6516744", "0.6510068", "0.6313426", "0.6255375", "0.6170459", "0.6157507", "0.6131804", "0.60929084", "0.60749304", "0.60099643", "0.59534705", "0.59241176", "0.5880785", "0.58767986", "0.58713436", "0.5847425", "0.5841499", "0.58395755", "0.58373535", "0.5834594", "0.5826645", "0.5823848", "0.58206177", "0.5806365", "0.58062696", "0.57710457", "0.57699656", "0.5767125", "0.57652795", "0.5756387", "0.5744848", "0.573765", "0.5735054", "0.5720351", "0.5718477", "0.571222", "0.5703174", "0.56963444", "0.56950563", "0.56912607", "0.56872445", "0.56871974", "0.5685683", "0.5679775", "0.56699276", "0.56547296", "0.5647064", "0.5634335", "0.5633396", "0.56288993", "0.5627676", "0.5626349", "0.5625825", "0.5624943", "0.56220824", "0.56189007", "0.5614305", "0.56142396", "0.5612148", "0.55954534", "0.55947727", "0.5592616", "0.5592616", "0.558956", "0.5587741", "0.558199", "0.55784005", "0.5565379", "0.5554539", "0.55508405", "0.5548324", "0.55462855", "0.55459374", "0.55459374", "0.5543731", "0.5540402", "0.5537443", "0.5537024", "0.5530385", "0.5527728", "0.5525582", "0.5517393", "0.5513594", "0.5512401", "0.54994154", "0.5497662", "0.54935944", "0.54933083", "0.5492636", "0.5487312", "0.54825336", "0.5480929", "0.54673517", "0.5463888", "0.5463183", "0.5460614", "0.5452096", "0.54519075", "0.54481316" ]
0.6697918
0
update an existing platform record
function updatePlatform($id,$name,$icon) { global $mysqli; $icon=addslashes($icon); $icon=file_get_contents($icon); $icon=base64_encode($icon); $sql="UPDATE platforms SET platformName='$name',platformIcon='$icon' WHERE platformID=$id "; $mysqli->query($sql)or die("query failed due to ".mysqli_error()); logSuccess("platform updated successfully"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, Platform $platform)\n {\n $platform->update([\n 'name' => $request->name,\n 'description' => $request->description,\n 'driver_class' => $request->driver_class,\n 'updated_by' => auth()->id()\n ]);\n\n return redirect()->route('show-platform', $platform);\n }", "public function update($entity){ \n //TODO: Implement update record.\n }", "public function update($record);", "public function update($id, $platformMoodle)\n {\n $platform = Platform::whereId($id)->first();\n\n $platform->description = $platformMoodle['nombre'];\n\n $platform->save();\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 update(Platform $platform, array $input)\n {\n $platform = Platform::updatePlatform($platform,$input);\n\n if (!is_null($platform)) {\n return true;\n }\n\n throw new GeneralException(trans('exceptions.backend.platforms.update_error'));\n }", "public function update(){\r\n $query = DB::connection()->prepare('\r\n UPDATE Wine\r\n SET name=:name, \r\n region=:region, \r\n winetext=:winetext,\r\n type=:type\r\n WHERE id=:id');\r\n $query->execute(array(\r\n 'id' => $this->id,\r\n 'name' => $this->name, \r\n 'region' => $this->region, \r\n 'winetext' => $this->winetext, \r\n 'type' => $this->type));\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 }", "public function update(){\n\t//\tprint_r($this->country);\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",description=\\\"$this->description\\\",tags=\\\"$this->tags\\\",area_id=\".$this->area_id.\",image=\\\"$this->image\\\",created_at=$this->created_at,is_public=$this->is_public,price=$this->price where id=\".$this->id;\n\t\tExecutor::doit($sql);\n\t}", "public function update(Tinebase_Record_Interface $_record) {\n }", "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 }", "public function db_update() {}", "public function update($entity);", "public function update($entity);", "public function update($entity)\n {\n \n }", "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}", "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 }", "function update($idMedicalRecord) // Implementation \r\n\t\t{\r\n\t\t\t$this->idMedicalRecord = $idMedicalRecord;\r\n\t\t\t$dbo = database::getInstance(); // pass back that database object already created perhaps\r\n\t\t\t$sql = $this->buildQuery('update'); // what we want to do (update records)\r\n\r\n\t\t\t$dbo->doQuery($sql); // execute query statement\r\n\t\t}", "function update() {\n\t\t$sql = \"UPDATE \".$this->hr_db.\".hr_amphur\n\t\t\t\tSET\tamph_name=?, amph_name_en=?, amph_pv_id=?\n\t\t\t\tWHERE amph_id=?\";\n\t\t$this->hr->query($sql, array($this->amph_name, $this->amph_name_en, $this->amph_pv_id, $this->amph_id));\n\t}", "private function update(){\n\t\t$q = Queries::update($this->authkey);\n\t\t$this->internalQuery($q);\n\t}", "public function updateProduct(Product $product);", "public function testUpdateBrandUsingPUT()\n {\n }", "public function update(){\n $id = filter_var($_POST['id'], FILTER_VALIDATE_INT);\n $data = $this->validateInput();\n if($id && $data){\n $device = Device::loadById($id);\n $device->setName($data['name']);\n $device->setIP($data['ip']);\n $device->setSubnet($data['subnet']);\n $device->setMAC(strtoupper($data['mac']));\n $device->update();\n $this->setSuccess('Device successfully edited!');\n }else{\n $this->setError('Error while saving device!');\n }\n\n\n header('Location: /devices');\n }", "abstract public function updateRecord($tableName, $record, $where = '');", "public function testUpdate()\n\t{\n\t\t// Update just updates the given fields, let's the rest unchanged.\n\t\t// Use Replace to replace all fields.\n\t\t$updateProduct = [\n\t\t\t'description' => 'This is a product description.',\n\t\t\t'price' => 1150.00\n\t\t];\n\n\t\t$service = $this->getService();\n\n\t\t// Update product\n\t\t$this->mockResponseFromFile('products.update.success');\n\t\t$response = $service->update()->pin('AD8CCDD5F9')->area('work')->spn('MBA11')->product($updateProduct)->execute();\n\t\t$this->assertIsArray($response);\n\t\t$this->assertArrayHasKey('kind', $response);\n\t\t$this->assertArrayHasKey('link', $response);\n\t}", "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 update($data) {}", "public function update($data) {}", "public function update($vendor);", "public function update_post()\n {\n\t\t$product_id = $this->post('product_id');\n\t\t$name = $this->post('name');\n $sku = $this->post('sku');\n $category = $this->post('category');\n $price = $this->post('price');\n\n\n\t\t$productData = array(\n 'name' => $name,\n 'sku' => $sku,\n 'category' => $category,\n 'price' => $price, \n );\n\t\n\t\t$this->db->where('id', $product_id);\n\t\t$this->db->update('products', $productData);\n\t\t$this->response([\n\t\t\t'status' => true,\n\t\t\t'message' => \"Update product details successfully\",\n\t\t], Restserver\\Libraries\\REST_Controller_Definitions::HTTP_CREATED); // CREATED (201) being the HTTP response code\n\t\texit;\n\t}", "function update() {\n\n\t \t$sql = \"UPDATE evs_database.evs_key_component \n\t \t\t\tSET\tkcp_key_component_detail_en=?, kcp_key_component_detail_th=?, kcp_cpn_id=? \n\t \t\t\tWHERE kcp_id=?\";\n\t\t\n\t\t$this->db->query($sql, array( $this->kcp_key_component_detail_en, $this->kcp_key_component_detail_th, $this->kcp_cpn_id, $this->kcp_id));\n\t\t\n\t }", "public function update(DataObject $entity){\n }", "public function Update($entity) {\n }", "public function update(StorePlatFormRequest $request, $id)\n {\n if (Auth::user()->ability('superadministrator', 'update-platforms')){\n if (PlatForm::updatePlatForm($request,$id)){\n return redirect()->route('platforms.index')->with('success','Well Done!');\n }else{\n return redirect()->back()->with('error','Something Wrong!');\n }\n }\n return abort(403,config('yyxt.permission_deny'));\n }", "public function store($platformMoodle)\n {\n $platform = new Platform();\n\n $platform->description = $platformMoodle['nombre'];\n\n $platform->save();\n }", "abstract public function update(Project $project);", "public function update(array $fields, string $primaryKey): bool;", "private function update(){\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (empty ( $id )) return;\n\t\t// Check permission to update.\n\t\t$result = $this->clsAccessPermission->toUpdate();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to update!\");\n\t\t\treturn;\n\t\t}\n\t\t// Execute Update.\n\t\tif (! $this->objAccessCrud->update ()) {\n\t\t\t$this->msg->setError (\"There were issues on update the record!\");\n\t\t\treturn;\n\t\t}\n\t\t$this->msg->setSuccess (\"Updated the record with success!\");\n\t\treturn;\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}", "function updateQualification($post,$deviceType,$appVersion,$OSVersion,$browserVersion){\n\n $con=connectToDB(); //connect to the DB\n mysql_query('SET NAMES UTF8');\t\t\n $Qualification=$post['Qualification'];\n\t$ModifyDateTime=date('Y-m-d H:i:s');\n\t$QualificationID=$post['QualificationID'];\n\t$sql2=\"UPDATE `SCP_Qualification` SET `Qualification` = '\".$Qualification.\"',`ModifyDateTime` = '\".$ModifyDateTime.\"' WHERE `QualificationID` = '\".$QualificationID.\"'\";\t \n $result = mysql_query($sql2) or die(mysql_error());\n\t\n\t\n //CHECK FOR ERROR\n if (!$result) die('Invalid query: ' . mysql_error());\n\t\t\n if($result) {\n $data['responseData'] = '';\n $data['message'] = \"Updated successfully\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"1\";\n } else {\n $data['responseData'] = '';\n $data['message'] = \"Error in Updation\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}", "public function update(array $data) {\r\n if(count($this->filter) == 0) {\r\n throw new exception('EXCEPTION_MODEL_SCHEMATIC_SQL_UPDATE_NO_FILTERS_DEFINED', exception::$ERRORLEVEL_FATAL);\r\n }\r\n $query = 'UPDATE ' . $this->getTableIdentifier() .' SET ';\r\n $parts = [];\r\n\r\n $param = array();\r\n foreach ($this->config->get('field') as $field) {\r\n if(in_array($field, array($this->getPrimarykey(), $this->table . \"_modified\", $this->table . \"_created\"))) {\r\n continue;\r\n }\r\n\r\n // If it exists, set the field\r\n if(array_key_exists($field, $data)) {\r\n\r\n if (is_object($data[$field]) || is_array($data[$field])) {\r\n $data[$field] = $this->jsonEncode($data[$field]);\r\n }\r\n\r\n $var = $this->getStatementVariable(array_keys($param), $field);\r\n\r\n // performance hack: store modelfield instance!\r\n if(!isset($this->modelfieldInstance[$field])) {\r\n $this->modelfieldInstance[$field] = \\codename\\core\\value\\text\\modelfield::getInstance($field);\r\n }\r\n $fieldInstance = $this->modelfieldInstance[$field];\r\n\r\n $param[$var] = $this->getParametrizedValue($this->delimit($fieldInstance, $data[$field]), $this->getFieldtype($fieldInstance));\r\n $parts[] = $field . ' = ' . ':'.$var;\r\n }\r\n }\r\n\r\n if($this->saveUpdateSetModifiedTimestamp) {\r\n $parts[] = $this->table . \"_modified = \".$this->getServicingSqlInstance()->getSaveUpdateSetModifiedTimestampStatement($this);\r\n }\r\n $query .= implode(',', $parts);\r\n\r\n // $params = array();\r\n $filterQuery = $this->getFilterQuery($param);\r\n\r\n //\r\n // query the datasets's pkey identifiers that are to-be-updated\r\n // and submit each to timemachine\r\n //\r\n if($this->useTimemachine()) {\r\n $timemachineQuery = \"SELECT {$this->getPrimaryKey()} FROM \" . $this->getTableIdentifier() . ' ';\r\n // NOTE: we have to use a separate array for this\r\n // as we're also storing bound params of the update data in $param above\r\n $timemachineFilterQueryParams = [];\r\n $timemachineFilterQuery = $this->getFilterQuery($timemachineFilterQueryParams);\r\n $timemachineQuery .= $timemachineFilterQuery;\r\n $timemachineQueryResponse = $this->internalQuery($timemachineQuery, $timemachineFilterQueryParams);\r\n $timemachineResult = $this->db->getResult();\r\n $pkeyValues = array_column($timemachineResult, $this->getPrimaryKey());\r\n\r\n $tm = \\codename\\core\\timemachine::getInstance($this->getIdentifier());\r\n foreach($pkeyValues as $id) {\r\n $tm->saveState($id, $data); // supply data to be changed for each entry\r\n }\r\n }\r\n\r\n $query .= $filterQuery;\r\n $this->doQuery($query, $param);\r\n\r\n return $this;\r\n }", "public function update(){\n\t\techo $sql = \"update \".self::$tablename.\" set title=\\\"$this->title\\\",description=\\\"$this->description\\\",skills=\\\"$this->skills\\\",area_id=$this->area_id,jobtype_id=$this->jobtype_id,jobperiod_id=$this->jobperiod_id,duration=$this->duration,is_public=$this->is_public,is_finished=$this->is_finished,created_at=$this->created_at where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function Update($entry) {\n $sql_entries_helper = new VCFF_Reports_Helper_SQL_Entries();\n // Add the entry\n $sql_entries_helper\n ->Add_Entry($entry['store_entry']);\n // If there is meta to store\n if (isset($entry['store_fields']) && is_array($entry['store_fields'])) {\n // Loop through each field\n foreach ($entry['store_fields'] as $machine_code => $field_data) { \n // Add the entry\n $sql_entries_helper->Add_Field_Item($field_data);\n }\n }\n // If there is meta to store\n if (isset($entry['store_meta']) && is_array($entry['store_meta'])) {\n // Loop through each field\n foreach ($entry['store_meta'] as $meta_code => $meta_data) {\n // Add the entry\n $sql_entries_helper->Add_Meta_Item($meta_data);\n }\n }\n // Store the changes\n $sql_entries_helper->Store();\n }", "public function updateDatabase(){\n $api_response = Http::get(config('urls.api'));\n //Place in database\n $this->postToDatabase($api_response);\n }", "public function updateRecord() {\r\n\t\tif (isset($_POST['level']) && $_POST['level']=='header') $this->updateHeader();\r\n\t\tif (isset($_POST['level']) && $_POST['level']=='detail') $this->updateDetail();\r\n\t}", "public function update(Entity $entity);", "function updateDB() {\n if (array_key_exists('model', $this->ptcdUpdates)) {\n $manufacturer = Dropdown::getDropdownName(\"glpi_dropdown_manufacturer\",\n $this->getValue('FK_glpi_enterprise'));\n $this->ptcdUpdates['model'] = Dropdown::importExternal(\"NetworkEquipmentModel\",\n $this->ptcdUpdates['model'], 0,\n array('manufacturer'=>$manufacturer));\n }\n if (array_key_exists('firmware', $this->ptcdUpdates)) {\n $this->ptcdUpdates['firmware'] = Dropdown::importExternal(\"NetworkEquipmentFirmware\",\n $this->ptcdUpdates['firmware']);\n }\n if (array_key_exists('location', $this->ptcdUpdates)) {\n $this->ptcdUpdates['location'] = Dropdown::importExternal(\"Location\",\n $this->ptcdUpdates['location']);\n }\n\n parent::updateDB();\n // update last_fusioninventory_update even if no other update\n $this->setValue('last_fusioninventory_update', date(\"Y-m-d H:i:s\"));\n $this->oFusionInventory_networking->updateDB();\n // ports\n $this->savePorts();\n }", "public function update() {\n global $db;\n $this->_preupdate();\n $sql_set = '';\n $data = array();\n foreach($this->_magicProperties as $key=>$value)\n {\n $sql_set .= \"`\".addslashes($key).\"`=\";\n $sql_set .= \"?,\";\n $data[] = $value;\n }\n $sql_set = substr($sql_set, 0, -1);\n\n $query = \"UPDATE {$this->table} SET $sql_set WHERE \".$this->id_field.\"=?;\";\n $data[] = $this->{'get'.$this->id_field}();\n\n $result = $db->query($query,$data);\n $this->_postupdate($result);\n return $result;\n }", "public function update() {\n\t\tif (isset($this->params['updated'])) {\n\t\t\t$this->params['updated'] = null;\n\t\t} // 'updated' is an auto timestamp\n\n\t\t$columns = array();\n\t\tforeach (array_keys($this->params) as $key) {\n\t\t\tarray_push($columns, $key . ' = ?');\n\t\t}\n\t\t$bindings = implode(', ', $columns);\n\t\t$sql = 'UPDATE ' . static::$table . ' SET ' . $bindings . ' WHERE id = ' . $this->get('id') . ' ;';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array_values($this->params));\n\t}", "function update($where) {\n}", "function update(){\n\t\t\t\t$servername = \"localhost\";\n\t\t\t\t$username = \"root\";\n\t\t\t\t$password = \"\";\n\t\t\t\t$dbname = \"CS230\";\n\t\t\t\t//Variables for holding entity data\n\t\t\t\t$i = $_POST['i'];\n\t\t\t\t$cr = $_POST['creator'];\n\t\t\t\t$ti = $_POST['title'];\n\t\t\t\t$ty = $_POST['type'];\n\t\t\t\t$id = $_POST['identifier'];\n\t\t\t\t$da = $_POST['date'];\n\t\t\t\t$la = $_POST['language'];\n\t\t\t\t$de = $_POST['description'];\n\t\t\t\t$conn = mysqli_connect($servername, $username, $password, $dbname);\n\t\t\t\t\tif($conn){\n\t\t\t\t\t//echo \"Connection OK\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdie(\"The Connection has failed: \" .mysqli_connect_error());\n\t\t\t\t\t}\n\t\t\t\t$sql = \"UPDATE eBook_MetaData SET creator='$cr', title='$ti', type='$ty', identifier='$id', date='$da', language='$la', description='$de' WHERE id='$i'\";\n\t\t\t\t\t$data = mysqli_query($conn, $sql);\n\n\t\t\t\t\tif(!$data){\n\t\t\t\t\t\techo \"error\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"data updated\";\n\t\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$conn = null;\n\t\t\t\t}", "function updateEquipments($post,$deviceType,$appVersion,$OSVersion,$browserVersion){\n\n $con=connectToDB(); //connect to the DB\n mysql_query('SET NAMES UTF8');\t\t\n $Equipment=$post['Equipment'];\n\t$Description=$post['Description'];\n\t$ModifyDateTime=date('Y-m-d H:i:s');\n\t$EquipmentID=$post['EquipmentID'];\n\t$sql2=\"UPDATE `SCP_Equipments` SET `Equipment` = '\".$Equipment.\"',`Description` = '\".$Description.\"',`ModifyDateTime` = '\".$ModifyDateTime.\"' WHERE `EquipmentID` = '\".$EquipmentID.\"'\";\t \n $result = mysql_query($sql2) or die(mysql_error());\n\t\n\t\n //CHECK FOR ERROR\n if (!$result) die('Invalid query: ' . mysql_error());\n\t\t\n if($result) {\n $data['responseData'] = '';\n $data['message'] = \"Updated successfully\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"1\";\n } else {\n $data['responseData'] = '';\n $data['message'] = \"Error in Updation\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}", "public function update_product() {\n\t\t$values=array(\"product_name\"=>$_POST['product_name'],\"description\"=>$_POST['description']);\t\t\t\t\n\t\t$where =array(\"id\"=>$_POST['product_id']);\n\t\tif($this->update(\"products\",$values,$where)) {\t\t\t\n\t\t\techo true;\n\t\t}\n\t\telse\n\t\t\techo 'Error while updating';\n\t}", "public function updateData()\n {\n try {\n// echo \"<pre>\";\n// print_r($this->where);\n// print_r($this->insertUpdateArray);\n// exit;\n DB::table($this->dbTable)\n ->where($this->where)\n ->update($this->insertUpdateArray);\n } catch (Exception $ex) {\n throw new Exception($ex->getMessage(), 10024, $ex);\n }\n }", "public function update(array $data, $where) {\n // add a timestamp\n $data['device_updated'] = date('Y-m-d H:i:s');\n return parent::update($data, $where);\n }", "protected function update() {}", "public function update(Request $request, QualityRecord $qualityRecord)\n {\n //\n }", "protected function updateEntity($entity)\n {\n }", "abstract protected function platformUpdateStatement($table, array $sets);", "private function update()\n {\n $queryString = 'UPDATE ' . $this->table . ' SET ';\n foreach ($this->data as $column => $value) {\n if ($column != self::ID) {\n $queryString .= $column . ' =:' . $column . ',';\n }\n }\n $queryString .= ' updated_at = sysdate() WHERE 1 = 1 AND ' . self::ID . ' =:' . self::ID;\n $this->query = $this->pdo->prepare($queryString);\n }", "public function update(stubObject $entity);", "function update($primary){\n $this->primary=$primary;\n //\n //create the update\n $update= new update($this, $primary);\n //\n //Execute the the insert\n $update->query($this->entity->get_parent());\n }", "public function update() {\n\t\t$data = Server::get_instance(CONF_ENGINE_SERVER_URL)->\n\t\t\tget_science_project_data($this->uid, $this->sc_id);\n\t\tif (!$data)\n\t\t\treturn false;\n\n\t\t$this->init_from_data($data);\n\t}", "public static function update()\n {\n if (self::checkIfSpecifiedTimePassed()) {\n DB::table('apimo_properties')->truncate();\n self::addOrEditPropertiesToDB(self::getAllRealEstate('properties'));\n }\n }", "protected function put() {\n \t// Update room options\n \n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",comments=\\\"$this->comments\\\",price=\\\"$this->price\\\",brand=\\\"$this->brand\\\",model=\\\"$this->model\\\",y=\\\"$this->y\\\",link=\\\"$this->link\\\",in_existence=\\\"$this->in_existence\\\",is_public=\\\"$this->is_public\\\",is_featured=\\\"$this->is_featured\\\",category_id=\\\"$this->category_id\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function update(Request $request)\n {\n $p;\n switch($request->product_type){\n case 'simple': \n $p = Product::where('id', $request->id)->first();\n\n $p->product_name = $request->product_name;\n $p->product_sku = $request->product_sku;\n $p->product_slug = $request->product_name;\n $p->product_category = $request->product_category;\n $p->product_brand = $request->product_brand;\n $p->product_short_desc = $request->product_short_desc;\n $p->product_long_desc = $request->product_long_desc;\n $p->product_type = $request->product_type;\n $p->product_mrp = $request->product_mrp;\n $p->product_price = $request->product_price;\n $p->product_quantity = $request->product_quantity;\n $p->product_primary_image = $request->product_primary_image;\n $p->product_other_images = !empty($request->product_other_images) ? $request->product_other_images : null;\n $p->product_meta_keywords = $request->product_meta_keywords;\n $p->product_meta_desc = $request->product_meta_desc;\n $p->product_published = $request->product_published;\n $p->product_featured = ($request->product_featured == true) ? 1 : 0;\n $p->product_tags = $request->product_tags;\n $p->product_dimensions = $request->product_dimensions;\n $p->updated_at = Carbon::now();\n $p->save();\n\n break;\n case 'affiliate': \n $p = Product::where('id', $request->id)->first();\n\n $p->product_name = $request->product_name;\n $p->product_sku = $request->product_sku;\n $p->product_slug = $request->product_name;\n $p->product_category = $request->product_category;\n $p->product_brand = $request->product_brand;\n $p->product_affiliate_link = $request->product_affiliate_link;\n $p->product_short_desc = $request->product_short_desc;\n $p->product_long_desc = $request->product_long_desc;\n $p->product_type = $request->product_type;\n $p->product_mrp = $request->product_mrp;\n $p->product_price = $request->product_price;\n $p->product_quantity = 0;\n $p->product_primary_image = $request->product_primary_image;\n $p->product_other_images = !empty($request->product_other_images) ? $request->product_other_images : null;\n $p->product_meta_keywords = $request->product_meta_keywords;\n $p->product_meta_desc = $request->product_meta_desc;\n $p->product_published = $request->product_published;\n $p->product_featured = ($request->product_featured == true) ? 1 : 0;\n $p->product_tags = $request->product_tags;\n $p->product_dimensions = $request->product_dimensions;\n $p->updated_at = Carbon::now();\n $p->save();\n\n break;\n case 'variable': break;\n }\n \n return response()->json($p, 200);\n }", "public function updateRecord(){\n\t\tglobal $db;\n $data = array('email'=>$this->email);\n\t\t\t\t$response = $db->update($this->table,$data,\"id = $this->id\");\n\t\treturn $response;\n\t}", "function update() {\n\t\t\tif ($this->id == null || $this->id == 0) return false;\n\n\t\t\t$this->conn = connectToDb(\"db_avalanche_store\");\n\n\t\t\t$update_query = \"UPDATE tbl_dev_info SET\n\t\t\t dev_name = '$this->dev_name',\n\t\t\t dev_desc = '$this->dev_description' WHERE user_id = '$this->id';\";\n\n\t\t\t$result = $this->conn->query($update_query);\n\n\t\t\t$this->conn->close();\n\n\t\t\tif (!$result) return false;\n\n\t\t\treturn true;\n\n\t\t}", "protected function update()\n\t{\n\t\t$this->autofill();\n\n\t\t$query = $this->connection->prepare (\"call UpdateProjectBooth (?, ?)\");\n\t\t$query->execute ([$this->fields['ID'], $this->fields['BoothID']]);\n\n\t\t$booth = $this->fields['BoothID'];\n\t\tunset ($this->fields['BoothID']);\n\n\t\tparent::update();\n\n\t\t$this->fields['BoothID'] = $booth;\n\n\t}", "function jornadas_entity_update($entity, $type) {\n if($type=='data_jornadas'){\n db_delete('jormada_tiempo_produccion')->condition('jid',$entity->jid)->execute();\n \n foreach ($entity->production_time as $lid => $element) {\n foreach ($element as $fid => $time) {\n db_insert('jormada_tiempo_produccion')->fields(array('jid'=>$entity->jid,'lid'=>$lid,'fid'=>$fid,'time'=>$time))->execute();\n\n }\n }\n }\n \n\n}", "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }", "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($data) { \n\n\t\tif ($data['name'] != $this->name) { \n\t\t\t$this->update_name($data['name']); \n\t\t} \n\t\tif ($data['pl_type'] != $this->type) { \n\t\t\t$this->update_type($data['pl_type']); \n\t\t} \n\n\t}", "public function testUpdateDevice()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/devices')\n ->mouseover('#devices-list-group a:nth-child(5) i.mdi-pencil')\n ->click('#devices-list-group a:nth-child(5) i.mdi-pencil')\n ->assertPathIs('/device/5/edit')\n ->assertSee('Update Electricity Meter')\n ->type('txt-name', 'Electricity Meter U')\n ->press('Save')\n ->assertPathIs('/devices')\n ->assertSee('Electricity Meter U');\n });\n }", "public function updateSolicitudes($param)\r\n {\r\n $this->db->where();\r\n $this->db->update(\"Solicitudes\");\r\n }", "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 save()\n\t{\n\t\tif (!$this->wasInited)\n\t\t\t\tthrow new UnrecoverableSystemException(\"\", \"\",\n\t\t\t\t\t\"DatabaseModel Error: Cannot update entry without an initialization\");\n\n\t\t$results = $this->query(\"DESCRIBE $this->tableName\");\n\t\t$values = \"\";\n\t\t$isStart = true;\n\n\t\t$id = -1;\n\n\t\tforeach ($this->row as $key => $value)\n\t\t{\n\t\t\tForceError::$inst->checkStr($key, true);\n\t\t\tForceError::$inst->checkStr($value, true);\n\t\t\tif ($key == \"id\")\n\t\t\t\tcontinue;\n\n\t\t\tif ($isStart)\n\t\t\t\t$isStart = false;\n\t\t\telse\n\t\t\t\t$values = $values . \", \";\n\n\t\tif ($this->encrypt[$key])\n\t\t$values .= \"\n\t\t\t$this->tableName.$key = AES_ENCRYPT('$value', '$this->key')\";\n\t\t\telse if ($value == \"DEFAULT\" || $value == \"NULL\" || $value == \"TRUE\" ||\n\t\t\t\t\t $value == \"FALSE\")\n\t\t\t\t$values = $values . \"$this->tableName.$key = $value\";\n\t\t\telse\n\t\t\t\t$values = $values . \"$this->tableName.$key = '$value'\";\n\t\t}\n\n\t\t$query = \"\n\t\t\tUPDATE\n\t\t\t\t$this->tableName\n\t\t\tSET\n\t\t\t\t$values\n\t\t\tWHERE\n\t\t\t\tid = '\". $this->row['id'] .\"'\n\t\t\";\n\t\t$this->query($query);\n\t}", "function updateDB() {\n global $DB;\n\n if (array_key_exists('model', $this->ptcdUpdates)) {\n $manufacturer = Dropdown::getDropdownName(\"glpi_dropdown_manufacturer\",\n $this->getValue('FK_glpi_enterprise'));\n $this->ptcdUpdates['model'] = Dropdown::importExternal(\"PrinterModel\",\n $this->ptcdUpdates['model'], 0,\n array('manufacturer'=>$manufacturer));\n }\n parent::updateDB();\n // update last_fusioninventory_update even if no other update\n $this->setValue('last_fusioninventory_update', date(\"Y-m-d H:i:s\"));\n $this->oFusionInventory_printer->updateDB();\n // ports\n $this->savePorts();\n // cartridges\n $this->saveCartridges();\n // history\n if (is_null($this->oFusionInventory_printer_history->getValue('ID'))) {\n // update only if counters not already set for today\n $this->oFusionInventory_printer_history->updateDB();\n }\n }", "public function testUpdate(): void { }", "function update($where_clause=null)\n {\n $db = $this->getDb();\n \n $sets = array();\n $values = array();\n// Kint::dump($this->fields);\n foreach( array_keys( $this->fields ) as $field )\n {\n //echo \"<br> field \".Kint::dump($field,'Field',false);\n if(!is_null($where_clause) && $field == $this->id_name){\n \techo \"Skipping primary key '$field' & $this->id_name since there is another WC '$where_clause' \";\n \tcontinue;\n }\t\n if('0'==$field ){\n \tcontinue;\n }\n elseif(is_int($field)){\n \t//Kint::dump($field);\n \t//Kint::dump(array_keys($this->fields));\n \tcontinue;\n }\n elseif (!isset($this->fields[$field]))\n {\n \t//echo \"<br> Empty field $field \";\n \tcontinue;\n }\n elseif ($field == 'updated')\n {\n \t//echo \"<br> Empty field $field \";\n \tcontinue;\n } \n else{\t\n \t$sets []= $field.'=?';\n \t$values []= $this->fields[ $field ];\n }\n }\n $set = join( \", \", $sets );\n \n if(is_null($where_clause)){\n \tif($this->id<0)\n \t\tdie(kint::dump('ERROR: this->id was not set on DBObject',$this));\n \t//$values []= $this->id;\n \t$where_clause = $this->id_name.'='.$this->id; \t\n }\n if(!str_contains($set, 'updated')){\n \t$set .= ',updated = null ';\n }\n\t$sql = 'UPDATE '.$this->table.' SET '.$set.\n \t' WHERE '.$where_clause;\n\t//$this->execute($sql,$values);\n\t//die ('SQL in Update<br/>'.$sql.'<br/>'.var_dump($values));\n //Kint::dump('UpdateSQL',$sql);\n //die('TEST');\n $cmd = 'prepare';\n\ttry{\n\t\t$sth = $db->prepare( $sql );\n\t\t$cmd = 'execute';\n\t\t$this->execute( $sth, $values );\n\t}\n catch(exception $e){\n \t$debug=Zend_Debug::dump('Statement with error',$sql);\t\n \tdie(__LINE__.'Exception in DBObject::'.$cmd.'() while cmd='.$cmd.' SQL='.$sql\n \t\t.' with values <br>'.$values\n \t\t.__LINE__.'Exception:<br>'.nl2br($e)\n \t\t.'<hr/>'.$debug);\n } \t\n }", "function updateRecord($f){\n global $db;\n\n $sql= \"UPDATE products SET \"\n .\"description='\".$f['description'].\"' \"\n .\"WHERE id='\".$f['id'].\"'\";\n Basic::EventLog(\"Product->updateRecord: \".$sql);\n //Basic::EventLogDB(\"Usuario modificado - UID:\".$f['uid'].\", Modulo: \".$f['module'].\", Permiso: \".$f['perm']);\n $res =& $db->query($sql);\n return $res;\n }", "public function update(array $data, array $where);", "public function SQL_UPDATE() {\r\n\t}", "public function testUpdateProductUsingPOST()\n {\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",short_name=\\\"$this->short_name\\\",is_active=\\\"$this->is_active\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function postUpdate() {\n\n\t\t$data = Input::all();\n\n\t\t$rules = array(\n\t\t\t'website_name' => 'required',\n\t\t);\n\n\t\t$validator = Validator::make( $data, $rules );\n\t\tif ( $validator->passes() ) {\n\n\t\t\t$system = System::find( 1 );\n\t\t\t$system->website_name = Input::get( 'website_name' );\n\t\t\t$system->introduction = nl2br( Input::get( 'introduction' ) );\n\t\t\t// $system->maintained = Input::get( 'maintained' );\n\n\t\t\tif ( $system->save() ) {\n\t\t\t\treturn Redirect::route( 'system.edit' )->with( 'flash_success', '系统设置修改成功' );\n\t\t\t} else {\n\t\t\t\treturn Redirect::back()->withInput()->with( 'flash_error', '修改失败' );\n\t\t\t}\n\t\t} else {\n\t\t\treturn Redirect::back()->withInput()->with( 'flash_error', $validator->messages() );\n\t\t}\n\t}", "public function updateRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getEditRight()))\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 owner\n\t\t\t\tif(!$this->isOwner($record))\n\t\t\t\t{\n\t\t\t\t\tthrow new Exception('You are not the owner of the record');\n\t\t\t\t}\n\n\t\t\t\t// check captcha\n\t\t\t\t$this->handleCaptcha($record);\n\n\t\t\t\t// update\n\t\t\t\t$this->getHandler()->update($record);\n\n\n\t\t\t\t$msg = new Message('You have successful edit 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 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 update($database, CouchDBObject $object);", "public function update_application($arr_data,$arr_where){\n\n\t\t$this->db->where($arr_where);\n\t\treturn $this->db->update($this->_table,$arr_data);\n\n\t}", "public function update_instance($uid,$data) { \n\n\t\t$uid \t= Dba::escape($uid); \n\t\t$host\t= $data['host'] ? Dba::escape($data['host']) : '127.0.0.1'; \n\t\t$port\t= $data['port'] ? Dba::escape($data['port']) : '6600'; \n\t\t$name\t= Dba::escape($data['name']); \n\t\t$pass\t= Dba::escape($data['password']); \n\n\t\t$sql = \"UPDATE `localplay_mpd` SET `host`='$host', `port`='$port', `name`='$name', `password`='$pass' WHERE `id`='$uid'\"; \n\t\t$db_results = Dba::query($sql); \n\n\t\treturn true; \n\n\t}", "function adv_update($table, array $data, array $where);", "protected function update()\n {\n $database = cbSQLConnect::connect('object');\n if (isset($database))\n {\n $fields = self::$db_fields;\n foreach($fields as $key)\n {\n $flag = $database->SQLUpdate(\"place\", $key, $this->{$key}, \"id\", $this->id);\n if ($flag == \"fail\")\n {\n break;\n }\n }\n if ($flag == \"fail\")\n {\n return false;\n }\n else\n return $this->id;\n }\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function setPlatforms(?DeviceManagementConfigurationPlatforms $value): void {\n $this->getBackingStore()->set('platforms', $value);\n }", "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}" ]
[ "0.6308569", "0.62831646", "0.6229506", "0.60836065", "0.597565", "0.5851686", "0.5834979", "0.5822973", "0.563366", "0.56246084", "0.56030685", "0.5590914", "0.55747634", "0.55747634", "0.5569327", "0.55424225", "0.55319047", "0.5501571", "0.54951596", "0.5489291", "0.5485164", "0.54800856", "0.5470875", "0.5464823", "0.5448296", "0.5429273", "0.542791", "0.542791", "0.5424814", "0.54243094", "0.5422937", "0.5421446", "0.54078794", "0.5400282", "0.53958744", "0.53667015", "0.53632164", "0.5358505", "0.5353563", "0.5349247", "0.5347981", "0.5347314", "0.5338429", "0.53341746", "0.53323525", "0.53084755", "0.5290536", "0.5288428", "0.5275082", "0.52709293", "0.5262016", "0.5253717", "0.5236281", "0.52256227", "0.5225531", "0.52246726", "0.5214128", "0.5206066", "0.5197115", "0.5196235", "0.5192538", "0.519172", "0.5191677", "0.51818156", "0.51798815", "0.51779926", "0.51705354", "0.5168607", "0.5166859", "0.5165609", "0.51626045", "0.5159129", "0.5157822", "0.5157122", "0.515603", "0.51500195", "0.5148572", "0.5145662", "0.51412857", "0.5135993", "0.5134499", "0.5120015", "0.5119409", "0.5110342", "0.51095414", "0.51039976", "0.5102255", "0.51018196", "0.50904655", "0.50890625", "0.5088931", "0.50872767", "0.50867265", "0.5084638", "0.50844294", "0.50844294", "0.50844294", "0.50844294", "0.5082708", "0.50805885" ]
0.5889827
5
delete platfom from platforms table
function delPlatform($id) { global $mysqli; $sql="DELETE FROM platforms WHERE platformID=$id "; $mysqli->query($sql)or die("query failed due to ".mysqli_error()); logSuccess("platform deleted successfully"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteById($platformcodeId);", "abstract protected function platformDeleteStatement($table);", "public function deleteDatabaseStructure( );", "function lp_delete_table(){\r\n\tglobal $wpdb;\r\n\t$charset_collation = $wpdb->get_charset_collate();\r\n\t$table_name = $wpdb->prefix.'like_post';\r\n\r\n $sql = \"DROP TABLE IF EXISTS $table_name;\";\r\n $wpdb->query($sql);\r\n\r\n delete_option('lp_showing_year');\r\n}", "public function destroy(Platform $platform)\n {\n $platform->delete();\n\n return back();\n }", "function delete() {\n\t\t$sql = \"DELETE FROM \".$this->hr_db.\".hr_amphur\n\t\t\t\tWHERE amph_id=?\";\n\t\t$this->hr->query($sql, array($this->amph_id));\n\t}", "public function delete($perifericos);", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n // need to delete from tag maps too\n // tbd\n }", "public function delete(Physiotherapist $physiotherapist){\n $sql = $this->db->prepare(\"DELETE FROM hora_fisio where id=?\");\n $sql->execute(array($physiotherapist->getID()));\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}", "function uninstall() {\nunsubscribeFromEvent($this->name, 'HOURLY');\nSQLExec('DROP TABLE IF EXISTS camshoter_devices');\nSQLExec('DROP TABLE IF EXISTS camshoter_config');\nSQLExec('DROP TABLE IF EXISTS camshoter_recognize');\nSQLExec('DROP TABLE IF EXISTS camshoter_people');\n\n\n parent::uninstall();\n\n }", "public function delete(Platform $platform)\n {\n if ($platform->delete()) {\n return true;\n }\n\n throw new GeneralException(trans('exceptions.backend.platforms.delete_error'));\n }", "public function destroy(tbl_project $tbl_project)\n {\n //\n }", "function removeSwitchTrigger($dserial) {\n\t$query = sprintf(\"DELETE FROM SwitchTriggers WHERE switchserial=%s\",\n\t\tmysql_real_escape_string($dserial)\n\t);\n\t\n\tdb_query($query);\n}", "static function uninstall()\n\t{\n\t\tglobal $wpdb;\n\n\t\tdelete_option( 'jumplead_version' );\n\t\tdelete_option( 'jumplead_tracker_id' );\n\t\tdelete_option( 'jumplead_capture_comments' );\n\n\t\t// @codingStandardsIgnoreStart\n\t\t$wpdb->query( 'DROP TABLE IF EXISTS ' . self::$tableFieldMapping );\n\t\t// @codingStandardsIgnoreEnd\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 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 free_thewiki_table($id){\n\t\tglobal $wpdb;\n\t\t$table = $wpdb->prefix.'wiki';\n\t\t$wpdb->query(\"DELETE FROM $table WHERE `post_id`=$id \");\n\t\t\n\t}", "public function uninstall()\n\t{\n\t\t$this->db->query(\"\n\t\t\tDROP TABLE \".Kohana::config('database.default.table_prefix').\"sharing_site;\n\t\t\t\");\n\t\t$this->db->query(\"\n\t\t\tDROP TABLE \".Kohana::config('database.default.table_prefix').\"sharing_incident;\n\t\t\t\");\n\n\t}", "function delBuildingHandler() {\n global $inputs;\n $sql = \"DELETE FROM building WHERE id = \" . $inputs['id'];\n execSql($sql);\n formatOutput(true, 'delete success');\n}", "function deletePartition() {\n\n global $connection_production;\n\n if (isset($_POST['delete_league'])) {\n\n echo 'working';\n }\n }", "public function delete($machucdanh){\n\t\tglobal $db;\n\t\tmysqli_query($db,\"delete from chucdanh where machucdanh=$machucdanh; \");\n\t}", "function DeletePlaces($idGame)\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"DELETE FROM fishermenland.place WHERE fkGamePlace = '$idGame'\");\n}", "public function clean(){\n\t\t$sql = 'DELETE FROM compra_coletiva';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function uninstall()\r\n\t{\r\n\t\t// ini untuk menghapus tabel beserta semua datanya\r\n\t\t// hati-hati, sebaiknya gunakan ini hanya dalam proses development\r\n\t\t// setelah semua modul dipasang online, komentari semua baris kode hapus tabel ini -\r\n\t\t// dan biarkan user menghapus tabel secara manual\r\n\t\t$this->dbforge->drop_table('ipro_jobs');\r\n\t\t$this->dbforge->drop_table('ipro_job_category');\r\n\t\t$this->dbforge->drop_table('ipro_skill');\r\n\t\t$this->dbforge->drop_table('ipro_budget');\r\n\t\t$this->dbforge->drop_table('ipro_language');\r\n\t\t$this->dbforge->drop_table('ipro_jobs_language');\r\n\t\t$this->dbforge->drop_table('ipro_jobs_skill');\r\n\r\n\t\treturn true;\r\n\t}", "protected function deletePatch() {\n\t\t$sql = \"DELETE FROM\t\twcf\".WCF_N.\"_\".$this->type.\"template_patch \n\t\t\tWHERE\t\t\tpackageID = \".$this->packageID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t}", "function deleteTeamFromPartition() {\n global $connection_production;\n if (isset($_POST['delete_team_partition'])) {\n $post_partition_id_set = $_POST['partition_id_set'];\n $team_id = $_POST['team_id'];\n $p_f_sm_id = $_POST['p_f_sm_id'];\n\n $sql_delete_p_f_sm_id = \"DELETE FROM partition_franchise_sm WHERE id=?\";\n\n $stmt_delete_p_f_sm_id = $connection_production->prepare($sql_delete_p_f_sm_id);\n $stmt_delete_p_f_sm_id->bind_param(\"i\", $p_f_sm_id);\n $stmt_delete_p_f_sm_id->execute();\n $last_delete_p_f_sm_id = $connection_production->insert_id;\n $stmt_delete_p_f_sm_id->close();\n\n $update_string = 'partition: '.$post_partition_id_set.' deleted team parition association id: '.$p_f_sm_id.', removed team id: '.$team_id;\n insertChange($_SESSION['account_id'], 'partition', 'delete team', $post_partition_id_set, $update_string);\n header(\"location: categories.php?source=update_partition&partition_id=\".$post_partition_id_set.\"#partition_teams\");\n }\n }", "public function uninstall() {\r\n\tforeach ($this->getModel() AS $model) {\r\n\t $this->getEntity($model->getName())->deleteTable();\r\n\t}\r\n }", "public function deleteSystemType()\r\n{\r\n $query_string = \"DELETE FROM system_type \";\r\n $query_string .= \"WHERE systemtypeid = :systemtypeid \";\r\n\r\n return $query_string;\r\n}", "function remove() {\n $keys = \"\";\n $keys_array = $this->keys();\n for ($i = 0; $i < sizeof($keys_array); $i ++) {\n $keys .= \"'\" . $keys_array[$i] . \"',\";\n }\n $keys = substr($keys, 0, - 1);\n \n if (MODULE_PAYMENT_CGP_DROP_TABLE === 'True') {\n tep_db_query(\"DROP TABLE IF EXISTS `CGP_orders_table`\");\n }\n \n tep_db_query(\"DELETE FROM \" . TABLE_CONFIGURATION . \" WHERE configuration_key IN (\" . $keys . \")\");\n }", "public function uninstall(){\n MergeRequestComment::dropTable();\n MergeRequest::dropTable();\n CommitCache::dropTable();\n Repo::dropTable();\n Project::dropTable();\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}", "public function clearAllDevices(){\n\t\t$db = Db::getInstance();\n\n\t\t$req = $db->prepare('DELETE FROM Devices');\n\t\t$req->execute();\n\t\t\n\n\n\t}", "public function deleteMatch(){\n\t\t$this->getDbTable()->delete(\"\");\n\t}", "public function delete()\n {\n $this->entityManager->getConnection()->exec(\"TRUNCATE subscriptions_products;\");\n $this->entityManager->getConnection()->exec(\"TRUNCATE subscriptions_products_tiers;\");\n $this->entityManager->getConnection()->exec(\"TRUNCATE subscriptions_products_tiers_payment_options;\");\n }", "public function deleteLocal() \n {\n LocalDAC::deleteLocal($this);\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}", "function uninstall() {\n\t\t/** globalising of the needed variables, objects and arrays */\n\t\tglobal $db, $apcms;\n\t\t\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['plugins'].\"` WHERE `name`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['rightsidebar'].\"` WHERE `plugin`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['leftsidebar'].\"` WHERE `plugin`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\t$query = \"DELETE FROM `\".$apcms['table']['global']['rightsidebar'].\"` WHERE `plugin`='apcms_sidebar_poweredby';\";\n\t\t$db->unbuffered_query($query);\n\t\n\t}", "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 deleteProductMediasById($id) {\r\n //On supprime physiquement les medias avant de les retirer de la base\r\n $medias = getProductMediasById($id);\r\n foreach ($medias as $media) {\r\n unlink($media->mediaSource);\r\n }\r\n\r\n $dbc = connection();\r\n $table = 'medias';\r\n $dbc->quote($table);\r\n\r\n $req = \"DELETE FROM $table \"\r\n . \"WHERE id IN (\"\r\n . \"SELECT pm.id_medias \"\r\n . \"FROM products_has_medias \"\r\n . \"AS pm \"\r\n . \"WHERE pm.id_products = $id)\";\r\n\r\n $requPrep = $dbc->prepare($req); // on prépare notre requête\r\n $requPrep->execute();\r\n $data = $requPrep->fetchAll(PDO::FETCH_OBJ);\r\n $requPrep->closeCursor();\r\n}", "public static function uninstall()\n {\n global $wpdb;\n $query = \"DROP TABLE IF EXISTS \".$wpdb->prefix.\"glsl_background\";\n $wpdb->query($query);\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 }", "function clearwatson(){\n\t\t$connection = Database::getConnection();\n\t\t//Empty watson table\n\t\t$query=\"TRUNCATE TABLE watson\";\n\t\tif (!$connection->query($query)){\n\t\t\techo \"Error :\" .$query . \"<br>\" . $connection->error;\n\t\t}\n\t\t//Empty watson_country table\n\t\t$query=\"TRUNCATE TABLE watson_country\";\n\t\tif (!$connection->query($query)){\n\t\t\techo \"Error :\" .$query . \"<br>\" . $connection->error;\n\t\t}\n\t}", "function DeleteImpostionForfait()\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"DELETE FROM fishermenland.game WHERE idGame IN (SELECT idGame FROM (SELECT idGame FROM fishermenland.game WHERE fkTypeGame = '3' GROUP BY idGame DESC LIMIT 1) temp)\");\n}", "function projectpentagon_remove() {\n\ndelete_option('projectpentagon_title');\n\ndelete_option('projectpentagon_name1');\n\ndelete_option('projectpentagon_name2');\n\ndelete_option('projectpentagon_name3');\n\ndelete_option('projectpentagon_name4');\n\ndelete_option('projectpentagon_name5');\n\ndelete_option('projectpentagon_color1');\n\ndelete_option('projectpentagon_color2');\n\ndelete_option('projectpentagon_color3');\n\ndelete_option('projectpentagon_color4');\n\ndelete_option('projectpentagon_color5');\n\ndelete_option('projectpentagon_category');\ndelete_option('projectpentagon-titleonpages');\n\n}", "function hook_path_delete($path) {\n db_delete('mytable')\n ->condition('pid', $path['pid'])\n ->execute();\n}", "function deleteSchool(){\n mysql_query(\"DELETE FROM school WHERE id='$this->schoolId'\") or die(mysql_error());\n \n // Delete the delegate positions table\n mysql_query(\"DROP TABLE school_$this->schoolId\") or die(mysql_error());\n }", "public function forceDeleted(Project $model)\n {\n // HasMany relationships\n foreach ($model->fs_investments as $item) {\n $item->delete();\n }\n\n foreach ($model->region_investments as $item) {\n $item->delete();\n }\n\n foreach ($model->fs_infrastructures as $item) {\n $item->delete();\n }\n\n foreach ($model->region_infrastructures as $item) {\n $item->delete();\n }\n\n // BelongsToMany relationships\n $model->regions()->sync([]);\n $model->funding_sources()->sync([]);\n $model->sdgs()->sync([]);\n $model->ten_point_agendas()->sync([]);\n $model->infrastructure_sectors()->sync([]);\n $model->infrastructure_subsectors()->sync([]);\n $model->prerequisites()->sync([]);\n $model->pdp_chapters()->sync([]);\n $model->operating_units()->sync([]);\n $model->pdp_indicators()->sync([]);\n\n // HasOne relationships\n $model->expected_output()->delete();\n $model->project_update()->delete();\n $model->description()->delete();\n $model->risk()->delete();\n $model->review()->delete();\n $model->allocation()->delete();\n $model->disbursement()->delete();\n $model->nep()->delete();\n $model->right_of_way()->delete();\n $model->feasibility_study()->delete();\n $model->resettlement_action_plan()->delete();\n $model->pipol()->delete();\n }", "function delete_apps()\n {\n $deleted = $_POST['delete'];\n $modify_app = new Database();\n $modify_app->alterApplication($deleted, 'App_Status', 'Deleted');\n $modify_app = null; \n }", "public function clean(){\n\t\t$sql = 'DELETE FROM ano_letivo';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "public function delete()\n {\n $class = strtolower(get_called_class());\n $table = self::$_table_name != null ? self::$_table_name : $class . 's';\n\n $pdo = PDOS::getInstance();\n\n $whereClause = '';\n foreach (static::$_primary_keys as $pk)\n $whereClause .= $pk . ' = :' . $pk . ' AND ';\n $whereClause = substr($whereClause, 0, -4);\n $sql = 'DELETE FROM ' . $table . ' WHERE ' . $whereClause;\n $query = $pdo->prepare($sql);\n $attributes = $this->getAttributes(new \\ReflectionClass($this));\n foreach ($attributes as $k => $v)\n {\n if (in_array($k, static::$_primary_keys))\n $query->bindValue(':' . $k, $v);\n }\n $query->execute();\n }", "function plugin_remove_database() {\n\n global $wpdb;\n\n\n\n $trips_tbl=$wpdb->prefix.'tb_trips_tbl';\n\n $sql_1 = \"DROP TABLE IF EXISTS $trips_tbl\";\n\n\n\n $tb_contacts_tbl=$wpdb->prefix.'tb_contacts_tbl';\n\n $sql_4 = \"DROP TABLE IF EXISTS $tb_contacts_tbl\";\n\n\n\n $tb_booking_tbl=$wpdb->prefix.'tb_booking_tbl';\n\n $sql_5 = \"DROP TABLE IF EXISTS $tb_booking_tbl\";\n\n\n\n\n\n $tb_zoho_crm_auth=$wpdb->prefix.'tb_zoho_crm_auth';\n\n $sql_2 = \"DROP TABLE IF EXISTS $tb_zoho_crm_auth\";\n\n $tb_zoho_books_auth=$wpdb->prefix.'tb_zoho_books_auth';\n\n $sql_3 = \"DROP TABLE IF EXISTS $tb_zoho_books_auth\";\n\n\n\n $wpdb->query($sql_1);\n\n $wpdb->query($sql_4);\n\n $wpdb->query($sql_5);\n\n\n\n $wpdb->query($sql_2);\n\n $wpdb->query($sql_3);\n\n delete_option(\"my_plugin_db_version\");\n\n }", "function removeDoorTrigger($dserial) {\n\t$query = sprintf(\"DELETE FROM DoorTriggers WHERE doorserial=%s\",\n\t\tmysql_real_escape_string($dserial)\n\t);\n\t\n\tdb_query($query);\n}", "function delete()\n {\n $GLOBALS['DB']->exec(\"DELETE FROM stores WHERE id = {$this->getId()};\");\n $GLOBALS['DB']->exec(\"DELETE FROM stores_brands WHERE store_id = {$this->getId()};\");\n }", "function lr_delete($pid) {\n list($ns, $pidn) = explode(':', $pid);\n list($rec, $sort) = explode('.', $pidn);\n $db = lr_connect( );\n $table = lr_make_table($db, $ns);\n $sql = \"DELETE FROM ?n WHERE rec=?i, sort=?i\";\n $db->query($sql, $table, $rec, $sort);\n}", "public function vymaz(){\r\n $db = napoj_db();\r\n $sql =<<<EOF\r\n DELETE FROM Diskusie WHERE id = \"$this->ID\";\r\nEOF;\r\n $ret = $db->exec($sql);\r\n if(!$ret){\r\n echo $db->lastErrorMsg();\r\n }\r\n $db->close();\r\n }", "function caldera_forms_pro_drop_tables(){\n\tglobal $wpdb;\n\t$table_name = $wpdb->prefix . 'cf_pro_messages';\n\t$sql = \"DROP TABLE IF EXISTS $table_name\";\n\t$wpdb->query($sql);\n\tdelete_option('cf_pro_db_v');\n}", "public function hard_delete(){\n\t\tif($this->data[$this->primary_key]){\n\t\t\treturn $this->db\n\t\t\t\t->where($this->primary_key, $this->data[$this->primary_key])\n\t\t\t\t->delete($this->table);\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "final public function delete() {\n $db = Database::getInstance();\n $mysqli = $db->getConnection();\n\t\n $sql_query = 'DELETE FROM fresco_costing_component_array WHERE component_id ='.$this->_component_id;\n \n $result = $mysqli->query($sql_query);\n if (!$result) {\n trigger_error('Unable to delete from database : SQL query : ' . $sql_query);\n }\n\treturn;\n }", "public function deleteSystems()\r\n{\r\n $query_string = \"DELETE FROM voting_system \";\r\n $query_string .= \"WHERE systemtypeid = :systemtypeid \";\r\n\r\n return $query_string;\r\n}", "public function hapus_data($npm){\r\n $where = array('npm_kd'=> $npm);\r\n $this->db->where($where);\r\n $this->db->delete($this->table_name);\r\n }", "public function delete_tables()\n\t{\n\t\tglobal $wpdb;\n\t\t$wpdb->query( 'DROP TABLE '.self::$site_table.';' );\n\t}", "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 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 }", "public function delete_W($nopeg) {\n\t\t$this->db->where('nopeg', $nopeg)\n\t\t\t\t ->delete('baru_warrior');\n\t}", "function deleteDatabase()\n{\n // codes to perform during unistallation\n $free_book_table = $GLOBALS['wpdb']->prefix . 'free_books';\n $sale_book_table = $GLOBALS['wpdb']->prefix . 'sale_books';\n $GLOBALS['wpdb']->query(\"DROP TABLE IF EXISTS `\" . $free_book_table . \"`\");\n $GLOBALS['wpdb']->query(\"DROP TABLE IF EXISTS `\" . $sale_book_table . \"`\");\n}", "public function destroy($id)\n {\n if (Auth::user()->ability('superadministrator', 'delete-platforms')){\n $platform=PlatForm::findOrFail($id);\n if ($platform->delete()){\n return redirect()->route('platforms.index')->with('success','Well Done!');\n }else{\n return redirect()->back()->with('error','Something Wrong!');\n }\n }\n return abort(403,config('yyxt.permission_deny'));\n }", "function uninstall() {\r\n SQLExec('DROP TABLE IF EXISTS watchfolders');\r\n parent::uninstall();\r\n }", "public function delete($software){\r\n $idSoftware=$software->getIdSoftware();\n\r\n try {\r\n $sql =\"DELETE FROM `software` WHERE `idSoftware`='$idSoftware'\";\r\n return $this->insertarConsulta($sql);\r\n } catch (SQLException $e) {\r\n throw new Exception('Primary key is null');\r\n }\r\n }", "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 deleteListOfWalksTable($con){\n\t$sql = \"DROP TABLE IF EXISTS csgp07_13_14 . List_of_Walks\";\n\tif(mysqli_query($con, $sql)){\n\t\techo \"Table List of Walks deleted successfully\\n\";\n\t}\n\telse{\n\t\techo \"Could Not List of Walks Location Table\" . mysqli_error($con);\n\t}\t\n}", "function apsa_delete_tables_mu($tables) {\n apsa_merge_config();\n global $wpdb;\n global $apsa_uninstall;\n $apsa_tables = $apsa_uninstall['apsa_tables'];\n foreach ($apsa_tables as $apsa_table) {\n $tables[] = $wpdb->prefix . $apsa_table;\n }\n return $tables;\n}", "function small_groups_clean_database( ) {\n\t\t\n\t\tdelete_option( 'small_groups_plugin_version' );\n\t\tdelete_option( 'small_groups_install_date' );\n\n\t\t// plugin specific database entries\n\t\tdelete_option( 'SMALL_GROUPS_posts_to_posts_plugin' );\n\t\t\n\t\tdelete_option( 'SMALL_GROUPS_deactivate_posts_to_posts' );\n\t\t\n\t\t// user specific database entries\n\t\tdelete_user_meta( get_current_user_id( ), 'SMALL_GROUPS_prompt_timeout', $meta_value );\n\t\tdelete_user_meta( get_current_user_id( ), 'SMALL_GROUPS_start_date', $meta_value );\n\t\tdelete_user_meta( get_current_user_id( ), 'SMALL_GROUPS_hide_notice', $meta_value );\n\n}", "function delete($primary){\n $this->primary=$primary;\n //\n //create the delete\n $update= new delete($this, $primary);\n //\n //Execute the the insert\n $update->query($this->entity->get_parent());\n }", "function delete(Plato $objeto) {\r\n $sql = \"delete from $this->tabla where idPlato = :idPlato\";\r\n $parametros[\"idPlato\"] = $objeto->getIdPlato();\r\n $r = $this->bd->setConsulta($sql, $parametros);\r\n\r\n if (!$r) {\r\n return -1;\r\n }\r\n return $this->bd->getNumeroFilas(); //0 \r\n }", "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}", "public function destroy(Alumnos $alumnos)\n {\n //\n }", "function removeSites(){\n $this->db->query('TRUNCATE TABLE `sites`;');\n }", "function EliminarMascotas($nombres, $primer_apellido, $segundo_apellido, $fehca_nacimiento, $lugar_nacimiento, $iddepartamento, $idmunicipio, $telefono_casa, $celular, $direccion, $foto){\n $conexion = Conectar();\n $sql = \"DELETE FROM padrinos WHERE id=:id\";\n $statement = $conexion->prepare($sql);\n $statement->bindParam(':idpadrinos', $idpadrinos);\n $statement->execute();\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $res=$statement->fetchAll();\n return $res;\n}", "public function hapus_unit($where)\n\t{\n\t\t$this->db->where($where);\n\t\t$this->db->delete('unit');\n\t}", "public function deleteMPa($data) {\n $this->db->where('id_pa',$data['id_pa']);\n $this->db->delete('m_pa',$data);\n }", "public function destroy()\n {\n $db = XenForo_Application::get('db');\n $db->query('DROP TABLE `' . self::DB_TABLE . '`');\n }", "function delete($table,$where){\n\t\t$r=mysql_query(\"DELETE FROM `$table` WHERE $where\");\n\t}", "function uninstall() {\r\n SQLExec('DROP TABLE IF EXISTS products');\r\n SQLExec('DROP TABLE IF EXISTS product_categories');\r\n SQLExec('DROP TABLE IF EXISTS shopping_list_items');\r\n parent::uninstall();\r\n }", "function cleanDBonPurge() {\n $sl = new SoftwareLicense();\n $sl->deleteByCriteria(['softwares_id' => $this->fields['id']]);\n\n $this->deleteChildrenAndRelationsFromDb(\n [\n Item_Project::class,\n SoftwareVersion::class,\n ]\n );\n }", "public function testDelete()\n {\n \t$player_factory = factory(KillingMode::class)->create();\n\n \tKillingMode::first()->delete();\n\n $this->assertDatabaseMissing($player_factory->getTable(), [ 'mode' => $player_factory->mode ]);\n }", "function delete() {\n \tglobal $mysql;\n \tif(empty($this->id)) return;\n \t$tablename = $this->class_name();\n \t$id = $this->id;\n \t$query = \"DELETE FROM $tablename WHERE id=$id\";\n \t$mysql->update($query);\n }", "public function eliminar(){\n $dimensiones = $this->descripciones()->distinct()->get()->pluck('id')->all();\n $this->descripciones()->detach($dimensiones);\n DescripcionProducto::destroy($dimensiones);\n $this->categorias()->detach();\n $this->imagenes()->delete();\n $this->delete();\n }", "function deleteByMonographId($monographId) {\n\t\t$this->update(\n\t\t\t'DELETE FROM new_releases WHERE monograph_id = ?',\n\t\t\t(int) $monographId\n\t\t);\n\t}", "function delete($table, $target);", "function removeDevice($dserial, $dname) {\n\t$query = sprintf(\"DELETE FROM Devices WHERE serial=%s AND name='%s'\",\n\t\tmysql_real_escape_string($dserial),\n\t\tmysql_real_escape_string($dname)\n\t);\n\t\n\tdb_query($query);\n}", "function uninstall() {\n SQLExec('DROP TABLE IF EXISTS app_vkbot');\n parent::uninstall();\n }", "function remove($pr_id) {\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"delete from \".$this->_db_table.\" where pr_id=$pr_id\");\n\t}", "function DeleteImpostion()\n{\n $dbh = ConnectDB();\n $req = $dbh->query(\"DELETE FROM fishermenland.game WHERE idGame IN (SELECT idGame FROM (SELECT idGame FROM fishermenland.game WHERE fkTypeGame = '2' GROUP BY idGame DESC LIMIT 1) temp)\");\n}", "public function clean(){\n\t\t$sql = 'DELETE FROM aluno';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "function deleteAbonne($code) {\n global $serv;\n $req = \"DELETE FROM abonnes WHERE Code = '$code';\";\n $res = db_execSQL($req,$serv);\n }", "public function uninstall()\n\t\t{\n\t\t\t$this->_Parent->Database->delete('tbl_pages_types', \"`page_id` = 4294967295\");\n\t\t}", "public function delete() {\n $sql = sprintf(\"DELETE FROM project WHERE id=%d\", $this->id);\n self::$connection->execute($sql);\n }", "public function delete()\n\t{\n\t\t$this->hard_delete();\n\t}" ]
[ "0.6479251", "0.60560787", "0.58929604", "0.57621294", "0.5667425", "0.56584334", "0.5554934", "0.5511369", "0.5505877", "0.54978275", "0.54888195", "0.54655534", "0.5438904", "0.5415529", "0.5412757", "0.5387609", "0.53848165", "0.5369056", "0.53464377", "0.53305924", "0.53228503", "0.5306113", "0.53017217", "0.5297692", "0.5296975", "0.5293103", "0.5291621", "0.5282845", "0.52809757", "0.52749276", "0.5265809", "0.5259351", "0.52571565", "0.52494353", "0.52416754", "0.5241458", "0.5237306", "0.5228882", "0.5227307", "0.5223469", "0.5216962", "0.5216411", "0.5210765", "0.5207792", "0.5194491", "0.51891303", "0.51889616", "0.5188499", "0.51858705", "0.5185061", "0.51830477", "0.5180807", "0.51799935", "0.5177283", "0.5160659", "0.5158684", "0.5153385", "0.51430154", "0.51395893", "0.51388943", "0.51360524", "0.5135823", "0.5131", "0.5127976", "0.51217437", "0.5118763", "0.51123863", "0.51102513", "0.5104968", "0.51044416", "0.5103183", "0.51019084", "0.5096175", "0.50924826", "0.5092066", "0.50857216", "0.5073719", "0.5072806", "0.50717884", "0.50707495", "0.50706726", "0.5066792", "0.50652945", "0.5059429", "0.50570434", "0.5052969", "0.50525206", "0.5052208", "0.50463796", "0.504615", "0.50421464", "0.50317556", "0.50303525", "0.50282574", "0.50264966", "0.5025688", "0.5025206", "0.502353", "0.5023261", "0.50194657" ]
0.70832175
0
add new platform to platforms table
function addPlatform($name,$icon) { global $mysqli; $icon=addslashes($icon); $icon=file_get_contents($icon); $icon=base64_encode($icon); $sql="INSERT INTO platforms (platformName,platformIcon)VALUES('$name','$icon')"; $mysqli->query($sql)or die("query failed due to ".mysqli_error()); logSuccess("platform added successfully"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addPlatform($platformEnum) {\n\t $this->platform[] = $platform;\n }", "public function run()\n {\n DB::table('platforms')->insert(\n $this->getPlatforms()\n );\n }", "public function run()\n {\n \t$now = Carbon::now();\n\n DB::table('platforms')->insert([\n \t[\n \t\t'name' => 'PC', \n \t\t'code' => 'PC', \n \t\t'created_at' => $now\n \t],\n \t[\n \t\t'name' => 'Playstation 4', \n \t\t'code' => 'PS4', \n \t\t'created_at' => $now\n \t],\n \t[\n \t\t'name' => 'X Box One', \n \t\t'code' => 'XONE', \n \t\t'created_at' => $now\n \t]\n ]);\n }", "public function store($platformMoodle)\n {\n $platform = new Platform();\n\n $platform->description = $platformMoodle['nombre'];\n\n $platform->save();\n }", "public function run()\n {\n $data = [\n ['short_title' => 'android','title'=>'安卓端'],\n ['short_title' => 'web','title'=>'web端'],\n ['short_title' => 'ios','title'=>'ios端'],\n ['short_title' => 'wx','title'=>'微信端'],\n ['short_title' => 'pc','title'=>'电脑端'],\n ];\n Platform::insert($data);\n }", "public function setPlatforms(?DeviceManagementConfigurationPlatforms $value): void {\n $this->getBackingStore()->set('platforms', $value);\n }", "public function setPlatforms(?array $value): void {\n $this->getBackingStore()->set('platforms', $value);\n }", "public function setPlatforms($val)\n {\n $this->_propDict[\"platforms\"] = $val;\n return $this;\n }", "public function setPlatforms($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->platforms = $arr;\n\n return $this;\n }", "public function addKeyPlatform($platform, $options = array())\n {\n return $this->request(array('keys', $platform), 'post', $options);\n }", "public static function add_platform_column( $columns ) {\n\n\t\t$additionnal_column = array( 'wpak_platform' => __( 'Platform', WpAppKit::i18n_domain ) );\n\n\t\t$title_index = array_search( 'title', array_keys( $columns ) ) + 1;\n\n\t\t$columns = array_slice( $columns, 0, $title_index, true ) + $additionnal_column + array_slice( $columns, $title_index, count( $columns ) - $title_index, true );\n\n\t\treturn $columns;\n\t}", "public function platform()\n {\n // TODO\n }", "public function run()\n {\n DB::table('os')->insert([\n ['name' => 'Windows 7 Professional 32bit'],\n ['name' => 'Windows 7 Professional 64bit'],\n ['name' => 'Windows 8 Professional 32bit'],\n ['name' => 'Windows 8 Professional 64bit'],\n ['name' => 'Windows 8 Pro 64bit'],\n ['name' => 'Windows 10 Professional 32bit'],\n ['name' => 'Windows 10 Professional 64bit'],\n ['name' => 'Windows 10 home 64bit'],\n ['name' => 'Windows 10 pro 64bit'],\n ['name' => 'Mac OS X'],\n ['name' => 'Mac OS Sierra'],\n ['name' => 'MacOS High Sierra'],\n ['name' => 'MacOS Mojave']\n ]);\n }", "public function loadPlatform($base)\n {\n $query=\"Select * from platform where platform_code='\".$this->platform_code.\"'\";\n $data=$base->fetch_all_array($query);\n $platform_exist=false;\n if(!empty($data))\n {\n $platform_exist=true;\n foreach($data as $row)\n {\n $this->platform_name=$row['platform_name'];\n } \n }\n return($platform_exist);\n }", "public function create(array $input)\n {\n // dd($input);\n $platform = Platform::insertPlatform($input);\n if (!is_null($platform)) {\n return true;\n }\n throw new GeneralException(trans('exceptions.backend.platforms.create_error'));\n }", "function add_player($login, $last_name, $first_name, $mail, $id_category, $id_platform) {\n //$id_platform = get_platform_by_name($platform);\n //$id_category = get_category_by_name($category);\n\n $query = \"INSERT INTO joueur VALUES ('$login', '$last_name', '$first_name', '$mail', '$id_category', '$id_platform')\";\n $result = mysql_query($query) or die(mysql_error());\n\n return $result;\n}", "public function platform(string $platform)\n {\n $this->platform = $platform;\n\n return $this;\n }", "public function setPlatform($value)\n {\n return $this->set(self::platform, $value);\n }", "public function store(Request $request)\n {\n Platform::create([\n 'name' => $request->name,\n 'description' => $request->description,\n 'driver_class' => $request->driver_class,\n 'created_by' => auth()->id()\n ]);\n\n return back();\n }", "public function run()\n {\n //\n DB::table('properties_type')->insert([\n \t[\n \t\t'name' =>'SIZE',\n 'systems_id'=>'2'\n \t],\n \t[\n \t\t'name' =>'COLOR',\n 'systems_id'=>'2'\n \t],\n \t[\n \t\t'name' =>'DÀI',\n 'systems_id'=>'2'\n \t],\n \t[\n \t\t'name' =>'RỘNG',\n 'systems_id'=>'2'\n \t]\n \t\n \t]\n );\n }", "public function testGetPlatforms()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function getPlatform()\n\t{\n\n\t\treturn $this->getModelRow('platform');\n\t}", "public function getPlatform(string $platform): Platform;", "public function getPlatform_id()\n {\n return $this->platform_id;\n }", "function GetNameFromPlatform($platform)\n {\n return $this->Platforms[$platform]; \n }", "public function run()\n {\n DB::table('industrys')->insert([\n 'industry' => 'Logistics',\n ]);\n DB::table('industrys')->insert([\n 'industry' => 'FMCG',\n ]);\n }", "abstract protected function getPlatforms(): array;", "public function setPlatform($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->platform !== $v || $v === 'pc') {\n\t\t\t$this->platform = $v;\n\t\t\t$this->modifiedColumns[] = UserPeer::PLATFORM;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function platform()\n\t{\n\t\t$this->platforms = array(\n\t\t\t'/windows nt 10/i' \t=> 'Windows 10',\n '/windows nt 6.3/i' => 'Windows 8.1',\n '/windows nt 6.2/i' => 'Windows 8',\n '/windows nt 6.1/i' => 'Windows 7',\n '/windows nt 6.0/i' => 'Windows Vista',\n '/windows nt 5.2/i' => 'Windows Server 2003/XP x64',\n '/windows nt 5.1/i' => 'Windows XP',\n '/windows xp/i' => 'Windows XP',\n '/windows nt 5.0/i' => 'Windows 2000',\n '/windows me/i' => 'Windows ME',\n '/win98/i' => 'Windows 98',\n '/win95/i' => 'Windows 95',\n '/win16/i' => 'Windows 3.11',\n '/macintosh|mac os x/i' => 'Mac OS X',\n '/mac_powerpc/i' => 'Mac OS 9',\n\t\t\t'/ubuntu/i' => 'Ubuntu',\n '/linux/i' => 'Linux',\n '/iphone/i' => 'iPhone',\n '/ipod/i' => 'iPod',\n '/ipad/i' => 'iPad',\n '/android/i' => 'Android',\n '/blackberry/i' => 'BlackBerry',\n '/webos/i' => 'Mobile',\n '/android/i'\t\t\t=> \t'Android'\n\t\t);\n\t\t\n\t\tforeach($this->platforms as $key => $value)\n\t\t{\n\t\t\tif(preg_match($key,$this->ua))\n\t\t\t\treturn $this->platform = $value;\n\t\t}\n\n\t\treturn $this->platform = \"Unknown Platform\";\n\t}", "function action_add() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['add_id'];\n\t\t\t$table = $data['add_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\t$choosen[$table][$id] = $id;\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "public function create()\n {\n if (Auth::user()->ability('superadministrator', 'create-platforms')){\n\n return view('platform.create',[\n 'pageheader'=>'平台渠道',\n 'pagedescription'=>'创建',\n ]);\n }\n return abort(403,config('yyxt.permission_deny'));\n }", "public function addPlatformType($platformType, ?string $alias = null): void\n {\n if ($alias !== null) {\n $this->platformTypes[$alias] = $platformType;\n } else {\n $this->platformTypes[] = $platformType;\n }\n }", "public function platforms() {\n return $this->belongsToMany('Rockit\\Models\\Platform', 'sharings')->withTrashed()\n ->withPivot('url');\n }", "function addMachine($codeMachine, $shortLabel, $longLabel, $machineUsePrice, $serialNumber, $manufacturer, $comment, $docLink1, $docLink2, $idFamily) {\n\tglobal $DB_DB;\n\t$request = $DB_DB->prepare('INSERT INTO Machine(codeMachine, shortLabel, longLabel, machineUsePrice, serialNumber, manufacturer, comment, docLink1, docLink2, dateEntry, idFamily, idPicture) VALUES (:codeMachine, :shortLabel, :longLabel, :machineUsePrice, :serialNumber, :manufacturer, :comment, :docLink1, :docLink2, NOW(), :idFamily, :idPicture)');\n\n\ttry {\n\t\t$request->execute(array(\n\t\t\t'codeMachine' => $codeMachine,\n\t\t\t'shortLabel' => $shortLabel,\n\t\t\t'longLabel' => $longLabel,\n\t\t\t'machineUsePrice' => $machineUsePrice,\n\t\t\t'serialNumber' => $serialNumber,\n\t\t\t'manufacturer' => $manufacturer,\n\t\t\t'comment' => $comment,\n\t\t\t'docLink1' => $docLink1,\n\t\t\t'docLink2' => $docLink2,\n\t\t\t'idFamily' => $idFamily,\n\t\t\t'idPicture' => NULL,\n\t\t));\n\t}\n\tcatch(Exception $e) {\n\t\tif($DEBUG_MODE)\n\t\t\techo $e;\n\t\treturn -2;\n\t}\n\n\t$idMachine = $DB_DB->lastInsertId();\n\n\treturn $idMachine;\n}", "public function run()\n {\n DB::table('mst_types')->insert([\n [\n 'name' => 'Lab',\n 'value' => 'lab',\n ],\n [\n 'name' => 'Single',\n 'value' => 'single',\n ],\n [\n 'name' => 'Acceptance',\n 'value' => 'acceptance',\n ] \n ]);\n }", "public function create()\n {\n return view('platforms.create');\n }", "public function run()\n\t{\n\t\tDB::table('project_type')->delete();\n \n DB::table('project_type')->insert(array(\n array('id'=>'1000','name'=>'Web Application','description'=>'Sample description for web app'),\n array('id'=>'1001','name'=>'Mobile Application','description'=>'Sample description for mobile app')\n ));\n\t}", "public function change()\n {\n $this->execute( 'CREATE TABLE `user_login_providers` (\n `user_id` int(11) NOT NULL,\n `login_provider` enum(\\'facebook\\',\\'twitter\\') NOT NULL,\n `login_provider_user_id` varchar(255) NOT NULL,\n `updated_ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n PRIMARY KEY (`user_id`,`login_provider`),\n UNIQUE KEY `login_provider_user_id` (`login_provider`,`login_provider_user_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;' );\n\n }", "public function getPlatforms()\n {\n return $this->platforms;\n }", "public static function platform_from_api( $platform ) {\n\t\tif ( ! empty( $platform ) && $platform = array_search( $platform, self::$platforms ) ) {\n\t\t\treturn $platform;\n\t\t}\n\n\t\treturn $platform;\n\t}", "public function setDevicePlatform(?DevicePlatformType $value): void {\n $this->getBackingStore()->set('devicePlatform', $value);\n }", "function delPlatform($id)\n {\n global $mysqli;\n $sql=\"DELETE FROM platforms WHERE platformID=$id \";\n $mysqli->query($sql)or die(\"query failed due to \".mysqli_error());\n logSuccess(\"platform deleted successfully\");\n }", "public function create()\n {\n $platforms=Platform::pluck('name','id');\n return view('admin.item.create',compact('platforms'));\n }", "public function run()\n {\n $array = [\n ['name'=>'行政'],\n ['name'=>'工作']\n ];\n DB::table('rule_types')->delete();\n DB::table('rule_types')->insert($array);\n }", "function GetPlatformFromName($name)\n {\n $key = array_search($name, $this->Platforms);\n if($key !== false)\n {\n return $key; \n }\n return 0; \n }", "public function testGetPlatform(): void\n {\n $model = OsVersion::load([\n \"platform\" => \"platform\",\n ], $this->container);\n\n $this->assertSame(\"platform\", $model->getPlatform());\n }", "public function run()\n {\n $table = 'main';\n DB::table($table)->insert([\n\n 'locale_id' => 1\n ]);\n }", "public function run()\n {\n DB::table('product_types')->insert([\n ['name' => 'Embroidered',\n ],\n \n ['name' => 'Printed',\n ],\n\n ['name' => 'Hand crafted',\n ],\n ]);\n }", "function cmst_vendor_add() {\n\t\tglobal $conn;\n\n\t\t// Initialize table object\n\t\t$GLOBALS[\"mst_vendor\"] = new cmst_vendor();\n\n\t\t// Intialize page id (for backward compatibility)\n\t\tif (!defined(\"EW_PAGE_ID\"))\n\t\t\tdefine(\"EW_PAGE_ID\", 'add', TRUE);\n\n\t\t// Initialize table name (for backward compatibility)\n\t\tif (!defined(\"EW_TABLE_NAME\"))\n\t\t\tdefine(\"EW_TABLE_NAME\", 'mst_vendor', TRUE);\n\n\t\t// Open connection to the database\n\t\t$conn = ew_Connect();\n\t}", "function afterCreateTable(){\n $aData = array(\n array( \"Intranet\", \"INTR\", 1 ),\n array( \"Document Management\", \"DOCU\" ),\n array( \"Email\", \"EMAI\" ),\n array( \"General\", \"GENE\" )\n );\n \n foreach( $aData as $row ){\n $this->id = 0;\n $this->aFields[\"name\"]->value = $row[0];\n $this->aFields[\"code\"]->value = $row[1];\n \n // Default option\n if( array_key_exists( 2, $row ) ) $this->aFields[\"is_default\"]->value = $row[2];\n else $this->aFields[\"is_default\"]->value = 0;\n \n $this->save();\n }\n \n // Make everything point to the default\n $sql = \"SELECT id FROM issue_system WHERE is_default = 1\";\n $db = new DB();\n $db->query( $sql );\n $row = $db->fetchRow();\n $sql = \"UPDATE issue SET issue_system_id = \".$row[\"id\"];\n $db->query( $sql );\n \n }", "function GetNameFromVersion($platform)\n {\n return $this->OperatingSystems[$platform];\n }", "public function setPlatformType(?PolicyPlatformType $value): void {\n $this->getBackingStore()->set('platformType', $value);\n }", "public function loadAllGamesOfPlatform($base)\n {\n $query=\"Select * from game_platform where platform_code='\".$this->platform_code.\"'\";\n $data=$base->fetch_all_array($query);\n if(!empty($data))\n {\n foreach($data as $row)\n {\n $number=$row['game_number'];\n $game=new Game();\n $game->setGame_number($number);\n $game->loadGame($base);\n $this->thePlatformGames[]=$game;\n }\n }\n }", "abstract protected function platformInsertStatement($table, array $keys, array $values);", "private function getPlatform()\n\t{\n\t\t$this->platform = mt_rand(1, 3);\n\n\t\treturn $this->platform;\n\t}", "public function run()\n {\n $data = [\n [\n 'name' => 'Add-On',\n 'created_at' => now(),\n 'updated_at' => now()\n ],\n [\n 'name' => 'Artisan',\n 'created_at' => now(),\n 'updated_at' => now()\n ],\n [\n 'name' => 'Cherry MX Sets',\n 'created_at' => now(),\n 'updated_at' => now()\n ],\n [\n 'name' => 'Spacebar',\n 'created_at' => now(),\n 'updated_at' => now()\n ],\n \n ];\n\n DB::table('keycap_types')->insert($data);\n }", "public function setPlatforms(?array $platforms): self\n {\n $this->platforms = $platforms;\n\n return $this;\n }", "function _add_to_project()\n {\n if (!$this->has_arg('pid'))\n $this->_error('No project id specified');\n if (!$this->has_arg('ty'))\n $this->_error('No item type specified');\n if (!$this->has_arg('iid'))\n $this->_error('No item id specified');\n\n\n if (array_key_exists($this->arg('ty'), $this->types))\n {\n $t = $this->types[$this->arg('ty')];\n\n $chk = $this->db->pq(\"SELECT projectid FROM $t[0] WHERE projectid=:1 AND $t[1]=:2\", array($this->arg('pid'), $this->arg('iid')));\n\n if ($this->has_arg('rem') && sizeof($chk))\n {\n $this->db->pq(\"DELETE FROM $t[0] WHERE projectid=:1 AND $t[1]=:2\", array($this->arg('pid'), $this->arg('iid')));\n }\n\n if (!sizeof($chk))\n {\n $this->db->pq(\"INSERT INTO $t[0] (projectid,$t[1]) VALUES (:1, :2)\", array($this->arg('pid'), $this->arg('iid')));\n }\n\n $this->_output(1);\n }\n }", "public function getPlatforms()\n {\n if (array_key_exists(\"platforms\", $this->_propDict)) {\n return $this->_propDict[\"platforms\"];\n } else {\n return null;\n }\n }", "public function setPlatformName($platformName) {\n\t\t$this->platformName = $platformName;\n\t}", "public function run()\n {\n DB::table('providers')->insert([\n \t'name' => 'Samsung Company LTD',\n \t'cuit' => '034576341234',\n \t'is_active' => 1,\n \t'profile_id' => 3,\n \t'company_id' => 1\n ]);\n\n DB::table('providers')->insert([\n \t'name' => 'LG Company LTD',\n \t'cuit' => '034576341234',\n \t'is_active' => 1,\n \t'profile_id' => 4,\n \t'company_id' => 1\n ]);\n }", "public function run()\n {\n $types = array(\n [\n 'type_name' => \"[hr]\", \n ],\n [\n 'type_name' => \"[eur]\", \n ],\n [\n 'type_name' => \"[op]\", \n ] );\n DB::table('service_unit_types')->insert($types);\n }", "function updatePlatform($id,$name,$icon)\n {\n global $mysqli;\n $icon=addslashes($icon);\n $icon=file_get_contents($icon);\n $icon=base64_encode($icon);\n $sql=\"UPDATE platforms SET platformName='$name',platformIcon='$icon' WHERE platformID=$id \"; \n $mysqli->query($sql)or die(\"query failed due to \".mysqli_error());\n logSuccess(\"platform updated successfully\");\n }", "public abstract function getPlatform($id);", "public function run()\n {\n \n DB::table('structures')->insert([\n\n 'libelle'=>'SME',\n 'updated_at'=> now(),\n 'created_at' => now()\n \n \n \n ]);\n DB::table('structures')->insert([\n\n 'libelle'=>'ISI',\n 'updated_at'=> now(),\n 'created_at' => now()\n \n \n \n ]);\n DB::table('structures')->insert([\n\n 'libelle'=>'ADM',\n 'updated_at'=> now(),\n 'created_at' => now()\n \n \n \n ]);\n \n}", "function addNewTrunk() {\n\n $sql\n = \"INSERT INTO $this->table (\n id,\n transport,\n aors,\n context,\n dtls_ca_file,\n dtls_cert_file,\n dtls_verify,\n dtls_setup,\n outbound_auth,\n disallow,\n allow,\n direct_media,\n date_created\n )\n VALUES \n (\n '$this->id',\n '$this->transport',\n '$this->id',\n '$this->context',\n '$this->dtls_ca_file',\n '$this->dtls_cert_file',\n '$this->dtls_verify',\n '$this->dtls_setup',\n '$this->outbound_auth',\n '$this->disallow',\n '$this->allow',\n '$this->direct_media',\n '$this->date'\n );\";\n\n $setDID = (strpos($this->id, '+') === false) ? \"+$this->id\" : $this->id;\n\n $sql_trunk = \"INSERT INTO ctn_trunks (id_endpoint, name, status) VALUES ('$this->id', '$this->name', 0)\";\n\n // echo $sql . '<br>';\n $this->doSql($sql);\n $this->doSql($sql_trunk);\n }", "public function getPrimaryPlatform() {}", "protected function insert() {\n $this->repo_id = $this->repository->repo_id; // for drupal_write_record() only\n\n if (isset($this->label_id)) {\n // The label already exists in the database, update the record.\n drupal_write_record('versioncontrol_labels', $this, 'label_id');\n }\n else {\n // The label does not yet exist, create it.\n // drupal_write_record() also assigns the new id to $this->label_id.\n drupal_write_record('versioncontrol_labels', $this);\n }\n unset($this->repo_id);\n }", "function premio_products_create() {\n global $wpdb;\n $product_container_table = $wpdb->prefix . \"premio_product_container\";\n $program_table = $wpdb->prefix . \"premio_program\";\n $product_containers = $wpdb->get_results(\"SELECT * from $product_container_table\");\n $programs = $wpdb->get_results(\"SELECT * from $program_table\");\n\n $name = $_POST[\"name\"];\n $description = $_POST[\"description\"];\n $product_container_id = $_POST['productContainerDpw'];\n\n //insert\n if (isset($_POST['insert'])) {\n $table_name = $wpdb->prefix . \"premio_product\";\n\n $wpdb->query(\"CALL create_product('{$name}', '{$description}', '{$product_container_id}')\");\n\n if(!empty($_POST['checkbox'])) {\n foreach($_POST[\"checkbox\"] as $v) {\n $program_id_to_int = (int)$v;\n\n $last_inserted_product_id = $wpdb->get_row($wpdb->prepare(\n \"SELECT product_id as last_inserted_product_id FROM wp_premio_product ORDER BY product_id DESC LIMIT 1\"\n ));\n\n $wpdb->insert(\n $wpdb->prefix.'premio_product_by_program', \n array(\n 'product_by_program_id' => NULL,\n 'program_id_fk' => $program_id_to_int, \n 'product_id_fk' => $last_inserted_product_id->last_inserted_product_id)\n );\n }\n }\n \n $message.=\"Product inserted\";\n }\n ?>\n <link type=\"text/css\" href=\"<?php echo plugins_url(); ?>/premio-products/style-admin.css\" rel=\"stylesheet\" />\n <div class=\"wrap\">\n <h2 class=\"testJC\">Add New Product</h2>\n <?php if (isset($message)): ?><div class=\"updated\"><p><?php echo $message; ?></p></div><?php endif; ?>\n <form method=\"post\" action=\"<?php echo $_SERVER['REQUEST_URI']; ?>\">\n <table class='wp-list-table widefat fixed'>\n <tr>\n <th class=\"ss-th-width\">Name</th>\n <td><input type=\"text\" name=\"name\" value=\"<?php echo $name; ?>\" class=\"ss-field-width\" /></td>\n </tr>\n <tr>\n <th class=\"ss-th-width\">Description</th>\n <td><textarea name=\"description\" rows=\"5\" cols=\"40\" class=\"ss-field-width\" /><?php echo $description; ?></textarea></td>\n </tr>\n <tr>\n <th class=\"ss-th-width\">Container</th>\n <td>\n <select name=\"productContainerDpw\">\n <?php foreach ($product_containers as $container) { ?>\n <option value=\"<?php echo $container->product_container_id; ?>\"><?php echo $container->name; ?></option>\n <?php } ?>\n </select>\n </td>\n </tr>\n <tr>\n <th class=\"ss-th-width\">Programs</th>\n <td>\n <?php foreach ($programs as $program) { ?>\n <input name=\"checkbox[]\" type=\"checkbox\" id=\"checkbox[]\" value=\"<?php echo $program->program_id; ?>\"> <?php echo $program->name; ?> <br>\n <?php } ?>\n </td>\n </tr>\n </table>\n <input type='submit' name=\"insert\" value='Save' class='button'>\n </form>\n <div class=\"tablenav top\">\n <div class=\"alignleft actions\">\n <a href=\"<?php echo admin_url('admin.php?page=premio_products_list'); ?>\">Back to Products</a>\n </div>\n <br class=\"clear\">\n </div>\n </div>\n <?php\n}", "public function run()\n {//preconfigured product types\n DB::table('product_types')->insert(array(\n array('id'=>1,'description'=>\"Productos para la Venta\",'created_at'=>\"2015-03-23\",\n 'updated_at'=>\"2015-03-23\",),\n array('id'=>2,'description'=>\"Consumibles\",'created_at'=>\"2015-03-23\",\n 'updated_at'=>\"2015-03-23\",),\n ));\n }", "private function getPlatform() {\n if (!isset($this->params['platform'])) {\n DooUriRouter::redirect(Doo::conf()->APP_URL);\n return FALSE;\n }\n $platform = new SnPlatforms();\n\t\t$url = Url::getUrlByName($this->params['platform'], URL_PLATFORM);\n\n\t\tif ($url) {\n\t\t\t$platform->ID_PLATFORM = $url->ID_OWNER;\n\t\t} else {\n\t\t\tDooUriRouter::redirect(Doo::conf()->APP_URL);\n\t\t\treturn FALSE;\n\t\t}\n\n $platform = $platform->getOne();\n return $platform;\n }", "function glv_create_tables(){\r\n global $wpdb;\r\n \r\n //el nombre de la tabla, utilizamos el prefijo de wordpress\r\n $table_forms = $wpdb->prefix.'glv_forms'; \r\n\r\n //sql con el statement de la tabla \r\n $glv_form = \"CREATE TABLE \".$table_forms.\"(\r\n for_id int(11) NOT NULL AUTO_INCREMENT,\r\n for_name varchar(100) DEFAULT NULL,\r\n for_value text DEFAULT NULL,\r\n for_date date,\r\n UNIQUE KEY for_id (for_id)\r\n )\";\r\n\r\n //upgrade contiene la función dbDelta la cuál revisará si existe la tabla o no\r\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r\n \r\n //creamos la tabla\r\n dbDelta($glv_form);\r\n }", "public function run()\n {\n DB::table('type_properties')->insert([\n 'name'=> 'Квартира'\n ]);\n DB::table('type_properties')->insert([\n 'name'=> 'Дом'\n ]);\n }", "function create_tbl_woo2app_nazar(){\r global $wpdb;\r $charset_collate = $wpdb->get_charset_collate();\r $table_name = $wpdb->prefix . 'woo2app_nazar';\r $sql = \"CREATE TABLE $table_name (\r\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\r\t\tPRIMARY KEY (id),\r\t\ttitle TEXT NOT NULL ,\r\t\ttype tinyint(4) NOT NULL,\r\t\tvalue TEXT NOT NULL,\r\t\tdisable tinyint(4) NOT NULL\r\t) $charset_collate;\";\r require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r dbDelta( $sql );\r add_option( 'woo2app_version', '1.3' );\r }", "public function run()\n {\n DB::table('product_types')->insert([\n [\n 'name' => 'Laptop',\n 'icon' => 'ui laptop icon',\n 'slug' => str_slug('Laptop')\n ],\n [\n 'name' => 'Điện thoại',\n 'icon' => 'ui mobile icon',\n 'slug' => str_slug('Điện thoại')\n ],\n [\n 'name' => 'Máy tính bảng',\n 'icon' => 'ui tablet icon',\n 'slug' => str_slug('Máy tính bảng')\n ]\n ]);\n }", "public function run()\n {\n $array = [\n ['nama' => 'Bank Negara Indonesia (BNI)', 'tipe' => 1, 'kode' => '009'],\n ['nama' => 'Bank Rakyat Indonesia (BRI)', 'tipe' => 1, 'kode' => '002'],\n ['nama' => 'Bank Tabungan Negara (BTN)', 'tipe' => 1, 'kode' => '200'],\n ['nama' => 'Bank Mandiri', 'tipe' => 1, 'kode' => '008'],\n ['nama' => 'Bank Syariah Indonesia (BSI)', 'tipe' => 1, 'kode' => '451'],\n ['nama' => 'Go-Pay', 'tipe' => 2, 'kode' => ''],\n ['nama' => 'Shopee-Pay', 'tipe' => 2, 'kode' => ''],\n ['nama' => 'OVO', 'tipe' => 2, 'kode' => ''],\n ['nama' => 'LinkAja', 'tipe' => 2, 'kode' => ''],\n ['nama' => 'DANA', 'tipe' => 2, 'kode' => ''],\n ['nama' => 'EduPay', 'tipe' => 2, 'kode' => ''],\n ];\n\n foreach($array as $key=>$data){\n Platform::updateOrCreate(['nama_platform' => $data['nama']], ['tipe_platform' => $data['tipe'], 'kode_platform' => $data['kode']]);\n }\n }", "public function run()\n {\n DB::table('product_types')->insert([\n [\n 'name' => 'Mechanical',\n 'slug' => Str::slug('mechanical')\n ],\n [\n 'name' => 'Electrical',\n 'slug' => Str::slug('electrical')\n ],\n [\n 'name' => 'IT',\n 'slug' => Str::slug('it')\n ],\n [\n 'name' => 'Sipil',\n 'slug' => Str::slug('sipil')\n ],\n ]);\n }", "public function getProjectsPlatforms()\n {\n return $this->hasMany(ProjectsPlatform::className(), ['platform_id' => 'id']);\n }", "public function getPlatformID()\n {\n return $this->platformID;\n }", "function add_element($name, $table) {\n\t$dbh = db_connect(); #DATABASE CONNEXION\n\n\t$name = strtolower($name); // ex: 'Pop' -> 'pop'\n\n\tif (exist($name, $table) == 0) { // Test if the element already exist\n\t\t# TABLE - CAT / SUB-CAT / ARTIST -----------------------\n\t\t$sql = \"INSERT INTO \" . $table . \" (NAME) VALUES (?)\";\n\t\t$stmt = $dbh->prepare($sql);\n\t\t$stmt->execute([$name]);\n\t} else return false;\n}", "public function run()\n {\n \\DB::table('types')->delete();\n\n \\DB::table('types')->insert(array(\n 0 =>\n array(\n 'id' => 1,\n 'table' => 'posts',\n 'slug' => 'about',\n 'title' => 'About Me',\n 'parent_id' => null,\n 'description' => null,\n 'note' => null,\n 'width' => null,\n 'height' => null,\n 'path' => null,\n 'source' => null,\n 'created_at' => '2017-11-10 21:48:05',\n 'updated_at' => '2017-11-10 21:48:05',\n 'deleted_at' => null,\n ),\n 1 =>\n array(\n 'id' => 2,\n 'table' => 'posts',\n 'slug' => 'interviews',\n 'title' => 'Interviews',\n 'parent_id' => null,\n 'description' => null,\n 'note' => null,\n 'width' => null,\n 'height' => null,\n 'path' => null,\n 'source' => null,\n 'created_at' => '2017-11-10 21:48:05',\n 'updated_at' => '2017-11-10 21:48:05',\n 'deleted_at' => null,\n ),\n 2 =>\n array(\n 'id' => 3,\n 'table' => 'posts',\n 'slug' => 'projects',\n 'title' => 'Projects',\n 'parent_id' => null,\n 'description' => null,\n 'note' => null,\n 'width' => null,\n 'height' => null,\n 'path' => null,\n 'source' => null,\n 'created_at' => '2017-11-10 21:48:05',\n 'updated_at' => '2017-11-10 21:48:05',\n 'deleted_at' => null,\n ),\n 3 =>\n array(\n 'id' => 4,\n 'table' => 'posts',\n 'slug' => 'tutorials',\n 'title' => 'Tutorials',\n 'parent_id' => null,\n 'description' => null,\n 'note' => null,\n 'width' => null,\n 'height' => null,\n 'path' => null,\n 'source' => null,\n 'created_at' => '2017-11-10 21:48:05',\n 'updated_at' => '2017-11-10 21:48:05',\n 'deleted_at' => null,\n ),\n 4 =>\n array(\n 'id' => 5,\n 'table' => 'posts',\n 'slug' => 'articles',\n 'title' => 'Articles',\n 'parent_id' => null,\n 'description' => null,\n 'note' => null,\n 'width' => null,\n 'height' => null,\n 'path' => null,\n 'source' => null,\n 'created_at' => '2017-11-10 21:48:05',\n 'updated_at' => '2017-11-10 21:48:05',\n 'deleted_at' => null,\n ),\n 5 =>\n array(\n 'id' => 6,\n 'table' => 'posts',\n 'slug' => 'definitions',\n 'title' => 'Definitions',\n 'parent_id' => null,\n 'description' => 'Basic or SEO targeted information like: What is AMP? Why learn AMP?',\n 'note' => null,\n 'width' => null,\n 'height' => null,\n 'path' => null,\n 'source' => null,\n 'created_at' => '2017-11-10 21:48:05',\n 'updated_at' => '2017-11-10 21:48:05',\n 'deleted_at' => null,\n ),\n 6 =>\n array(\n 'id' => 7,\n 'table' => 'posts',\n 'slug' => 'tips',\n 'title' => 'Quick Tips / Short Clips',\n 'parent_id' => null,\n 'description' => null,\n 'note' => null,\n 'width' => null,\n 'height' => null,\n 'path' => null,\n 'source' => null,\n 'created_at' => '2017-11-10 21:48:05',\n 'updated_at' => '2017-11-10 21:48:05',\n 'deleted_at' => null,\n ),\n 7 =>\n array(\n 'id' => 8,\n 'table' => 'posts',\n 'slug' => 'trailers',\n 'title' => 'Topic or Tutorial Series Trailers (Promoted Ads)',\n 'parent_id' => null,\n 'description' => null,\n 'note' => null,\n 'width' => null,\n 'height' => null,\n 'path' => null,\n 'source' => null,\n 'created_at' => '2017-11-10 21:48:05',\n 'updated_at' => '2017-11-10 21:48:05',\n 'deleted_at' => null,\n ),\n\n ));\n }", "public function getPlatform()\n\t{\n\t\treturn $this->platform;\n\t}", "function add($name,$endpoint){\n \n // create row in workspace table.\n $data = array(\n 'name' => strtolower($name),\n 'endpoint' => $endpoint,\n );\n $this->team->db->insert('workspaces', $data);\n \n include_once(\"public/arc2/ARC2.php\");\n\n // Config mysql\n $config_Mysql = array(\n // db \n 'db_host' => $this->team->db->hostname, // default: localhost\n 'db_name' => $this->team->db->database,\n 'db_user' => $this->team->db->username,\n 'db_pwd' => $this->team->db->password,\n // store \n 'store_name' => $name,\n );\n\n $store_Mysql = ARC2::getStore($config_Mysql);\n \n /* create MySQL tables \n *\n * _g2t\n * _id2val\n * _o2val\n * _s2val\n * _setting\n * _triple\n */\n $store_Mysql->setUp(); \n \n //echo \"END FUNCTION add(name,endpoint) Workspaces_model.php<br />\";\n }", "public function run()\n {\n $systems = [\n ['key' => 'blog_name', 'value' => 'My Blog'],\n ['key' => 'motto', '欢迎使用My Blog,欢迎Star。']\n ];\n DB::table('systems')->insert($systems);\n }", "public function run()\n {\n DB::table('types')->insert(\n [\n ['title' => 'GSM'],\n ['title' => 'Tablet'],\n ['title' => 'Laptop'],\n ['title' => 'PC']\n ]\n );\n }", "function add()\n\t{\n\t\tif (!$this->checkLogin()) {\n\t\t\tredirect(base_url());\n\t\t}\n\n\t\t$pageData['header_title'] = APP_NAME . ' | Add Product';\n\t\t$pageData['page_title'] = 'Inventory Management';\n\t\t$pageData['parent_menu'] = 'inventory_management';\n\t\t$pageData['child_menu'] = 'add_new_product';\n\n\t\t//get branches\n\t\t$where = array('status_id =' => ACTIVE);\n\t\t$select = '*';\n\t\t$records = 2;\n\t\t$branches = $this->base_model->getCommon($this->branchesTable, $where, $select, $records);\n\t\t$pageData['branches'] = json_encode($branches);\n\t\t// print_r($branches);die;\n\t\t$this->load->view('admin/inventory_management/add', $pageData);\n\t}", "public function run()\n {\n DB::table('media_types')->insert([\n 'nom' => 'jpg',\n 'is_video' => false\n ]);\n }", "function wc_multi_warehouse_install() {\n global $wpdb;\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n $charset_collate = $wpdb->get_charset_collate();\n $sql = \"\n CREATE TABLE `{$wpdb->prefix}wc_warehouse` (\n `id` int(4) UNSIGNED NOT NULL AUTO_INCREMENT,\n `code` varchar(50) NOT NULL,\n `name` varchar(255) NOT NULL DEFAULT '',\n `email` varchar(255) NOT NULL DEFAULT '',\n `public` char(1) NOT NULL DEFAULT '1',\n `sort` int(4) NOT NULL DEFAULT '0',\n PRIMARY KEY (id),\n UNIQUE KEY code_unique (code)\n ) $charset_collate;\n \";\n dbDelta($sql);\n\n}", "public function update($id, $platformMoodle)\n {\n $platform = Platform::whereId($id)->first();\n\n $platform->description = $platformMoodle['nombre'];\n\n $platform->save();\n }", "public function run()\n {\n \n\n \\DB::table('brand')->delete();\n \n \\DB::table('brand')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'cid' => 268,\n 'name' => '德国原装Hipp',\n 'desc' => '&lt;p&gt;德国婴幼儿食品第一品牌,全球最大的有机食品生产商,几乎每个德国小朋友都是吃着喜宝的产品长大的。经欧盟认证,100%纯天然及有机的保证,单纯保留食材最原始的味道,口感自然味道极佳,让宝宝摄取最天然的营养而不会造成肠胃道的负担,绝无任何人工添加香料、色素及化学成份的营养素。&lt;/p&gt;',\n 'img' => '20160629/1467166706842685.jpg',\n 'status' => 2,\n ),\n 1 => \n array (\n 'id' => 2,\n 'cid' => 266,\n 'name' => '德国原装Aptamil',\n 'desc' => '&lt;p&gt;德国爱他美Aptamil针对有蛋白质过敏的宝宝,可以降低50%的蛋白质过敏的可能性。为新生儿带来母乳专利Aptamil包含牛奶。蛋白质。脂肪和矿物制提炼的近乎母乳的奶粉高质量的兼容乳糖(乳糖)及母乳所包含的营养。作为新生儿专属食物完全自然地哺乳您的婴孩提高免疫系统。&lt;/p&gt;',\n 'img' => '20160629/1467180133580034.jpg',\n 'status' => 2,\n ),\n 2 => \n array (\n 'id' => 7,\n 'cid' => 270,\n 'name' => '荷兰原装Nutrilon',\n 'desc' => '&lt;p&gt;具有百年历史的荷兰牛栏奶粉,是荷兰市场领先的婴幼儿奶粉品牌,来自欧洲黄金奶源地带自家牧场,纯天然牧养模式,视奶牛如家人,牛奶更纯净,欧盟的品质值得信赖。&lt;/p&gt;',\n 'img' => '20160629/1467179907113561.jpg',\n 'status' => 2,\n ),\n 3 => \n array (\n 'id' => 8,\n 'cid' => 269,\n 'name' => ' 德国Topfer',\n 'desc' => '&lt;p&gt;特福芬公司位于风景如画的阿尔卑斯山脚下,是德国最早从事婴儿食品研究生产的企业之一;1989年,特福芬公司研制出婴儿有机奶粉,成为欧洲最早生产有机奶粉企业之一。凭借近百年的研发制造经验和技术专利,是德国母婴领域当之无愧的旗舰。&lt;/p&gt;',\n 'img' => '20160629/1467180416779655.png',\n 'status' => 1,\n ),\n 4 => \n array (\n 'id' => 9,\n 'cid' => 271,\n 'name' => '荷兰Herobaby',\n 'desc' => '&lt;p&gt;Hero \nbaby,是荷兰皇家乳业旗下百年奶粉品牌。美素的奶源和一般的乳业集团不同,荷兰皇家乳业是合作型乳企,由欧洲超过20,000名左右会员农场主联合经营,共同管理,所以它的奶源不是工业化的采购,而是完全从源头来把控。而且口味清淡,不上火不热气,在妈妈群中拥有不错的口碑。&lt;/p&gt;',\n 'img' => '20160629/1467180631986741.jpg',\n 'status' => 2,\n ),\n 5 => \n array (\n 'id' => 10,\n 'cid' => 275,\n 'name' => '英国Cow&Gate',\n 'desc' => '&lt;p&gt;Cow&amp;amp;Gate是创立于1904年的英国著名奶粉品牌,Cow&amp;amp;Gate有着近100年的悠久历史和经验为宝宝成长提供有全面营养又安全的婴儿奶粉。为确保最好的质量,Cow&amp;amp;Gate的所有产品都不假手于他人,都是自己专门畜养,种植、生产加工成品。精确检验每一个生产阶段以确保产品达到最高的水准。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467180745183862.png',\n 'status' => 1,\n ),\n 6 => \n array (\n 'id' => 11,\n 'cid' => 277,\n 'name' => '德国holle',\n 'desc' => '&lt;p&gt;1933年创建于瑞士的Holle有机婴儿食品公司,是全球天然有机生物食品生产商的先驱。Holle婴儿配方奶粉和谷物产品系列等均在德国生产。始终坚持把世界上最好的有机食品奉献每一位成长宝宝的品质理念,充分重视人体健康、动物健康和自然环境,最天然的方式帮助宝宝茁壮成长。&lt;/p&gt;',\n 'img' => '20160629/1467180922509940.png',\n 'status' => 1,\n ),\n 7 => \n array (\n 'id' => 12,\n 'cid' => 278,\n 'name' => '英国Aptamil',\n 'desc' => '&lt;p&gt;爱他美(Aptamil)奶粉是德国第一品牌的奶粉,也是欧洲销量最好的奶粉之一。含与母乳成分相同的DHA的营养,极易吸收,特有免疫系统,用最自然方式保证宝宝的健康需要,口味较淡,含专利的益生元,给宝宝需要的健康肠菌丛,它能以自然方式增强宝宝免疫系统。&lt;/p&gt;',\n 'img' => '20160630/1467289203745736.png',\n 'status' => 1,\n ),\n 8 => \n array (\n 'id' => 13,\n 'cid' => 279,\n 'name' => ' 授权行货惠氏启赋',\n 'desc' => '&lt;p&gt;惠氏是全球500强企业之一,在婴幼儿营养品领域有着近百年历史。在很多国家,惠氏产品都受到医护人员、营养专家和消费者的高度赞誉。优质奶源,安全可靠无污染。惠氏奶粉从选料的源头把控产品质量,给予妈妈和宝宝以安心安全的健康保障。&lt;/p&gt;',\n 'img' => '20160629/1467181348416790.png',\n 'status' => 1,\n ),\n 9 => \n array (\n 'id' => 14,\n 'cid' => 280,\n 'name' => '港版美赞臣',\n 'desc' => '&lt;p&gt;美赞臣公司创立于1905年,至今已有百年历史,是世界上生产营养品的大型跨国企业之一,堪称世界营养权威。美赞臣公司在全球拥有7个生产基地,营养产品行销50多个国家和地区,所经营的婴幼儿奶粉是全球市场的领导品牌,受到了千百万医学专家和母亲的信任。&lt;/p&gt;',\n 'img' => '20160629/1467182055729084.png',\n 'status' => 1,\n ),\n 10 => \n array (\n 'id' => 15,\n 'cid' => 281,\n 'name' => '授权行货爱他美',\n 'desc' => '&lt;p&gt;德国爱他美Aptamil针对有蛋白质过敏的宝宝,可以降低50%的蛋白质过敏的可能性。为新生儿带来母乳专利Aptamil包含牛奶。蛋白质。脂肪和矿物制提炼的近乎母乳的奶粉高质量的兼容乳糖(乳糖)及母乳所包含的营养。作为新生儿专属食物完全自然地哺乳您的婴孩提高免疫系统。&lt;/p&gt;',\n 'img' => '20160705/1467704872997505.jpg',\n 'status' => 2,\n ),\n 11 => \n array (\n 'id' => 16,\n 'cid' => 282,\n 'name' => '授权行货诺优能',\n 'desc' => '&lt;p&gt;诺优能来自欧洲乳品大国荷兰,选择自然的生态环境好奶源,生产技术严格遵循欧洲食品安全体系生产,全面实行HACCP食品安全控制体系,奶粉里面蕴含FOS/GOS益生元专利组合,能促进肠道益生菌生长及抑制害菌数量,帮助增强抵抗力,还有利于大脑和视力发育的DHA,配方科学营养,为宝宝每个成长阶段提供均衡营养支持。&lt;/p&gt;',\n 'img' => '20160629/1467182422953355.png',\n 'status' => 1,\n ),\n 12 => \n array (\n 'id' => 17,\n 'cid' => 284,\n 'name' => '美国MeadJohnson',\n 'desc' => '&lt;p&gt;美国美赞臣公司创立于1905年,至今已有百年历史,是世界上生产营养品的大型跨国企业之一,堪称世界营养权威。美赞臣公司在全球拥有7个生产基地,营养产品行销50多个国家和地区,所经营的婴幼儿奶粉是全球市场的领导品牌,受到了千百万医学专家和母亲的信任。&lt;/p&gt;',\n 'img' => '20160629/1467182514370602.png',\n 'status' => 1,\n ),\n 13 => \n array (\n 'id' => 18,\n 'cid' => 272,\n 'name' => '尤妮佳',\n 'desc' => '&lt;p&gt;&lt;span class=&quot;name&quot;&gt;尤妮佳 moony&lt;/span&gt;&lt;/p&gt;',\n 'img' => '20160629/1467186082604821.jpg',\n 'status' => 2,\n ),\n 14 => \n array (\n 'id' => 19,\n 'cid' => 273,\n 'name' => ' 花王',\n 'desc' => '&lt;p&gt;&lt;span class=&quot;name&quot;&gt;花王 Merries&lt;/span&gt;&lt;/p&gt;',\n 'img' => '20160629/1467186021175948.jpg',\n 'status' => 2,\n ),\n 15 => \n array (\n 'id' => 20,\n 'cid' => 274,\n 'name' => 'GOON大王天使',\n 'desc' => '&lt;p&gt;&lt;span class=&quot;name&quot;&gt;大王 GOO.N&lt;/span&gt;&lt;/p&gt;',\n 'img' => '20160629/1467186334377570.png',\n 'status' => 1,\n ),\n 16 => \n array (\n 'id' => 21,\n 'cid' => 286,\n 'name' => 'Pampers帮宝适',\n 'desc' => '&lt;p&gt;帮宝适,美国宝洁公司著名婴儿卫生系列产品。柔软舒适的魔术腰贴,能把宝宝柔软地怀抱在如棉质般的柔嫩里。多层吸收体,将能有效吸收尿液,帮助小屁屁保持干爽。是各国父母首选的婴儿护理用品之一。&lt;/p&gt;',\n 'img' => '20160629/1467186408706447.png',\n 'status' => 2,\n ),\n 17 => \n array (\n 'id' => 22,\n 'cid' => 287,\n 'name' => 'Singapore Huggies新加坡好奇',\n 'desc' => '&lt;p&gt;好奇HUGGIES纸尿裤诞生于1978年,于22个国际及地区市场领先,全球约有四分之一的宝宝在使用好奇纸尿裤。好奇致力于为宝宝提供最舒适和贴体的纸尿裤穿着体验,让宝宝在他的世界无拘无束的自由探索、发现、快乐地成长。&lt;/p&gt;',\n 'img' => '20160629/1467182971635074.png',\n 'status' => 1,\n ),\n 18 => \n array (\n 'id' => 23,\n 'cid' => 288,\n 'name' => 'Pampers care帮宝适棉柔',\n 'desc' => '&lt;p&gt;帮宝适,美国宝洁公司著名婴儿卫生系列产品。柔软舒适的魔术腰贴,能把宝宝柔软地怀抱在如棉质般的柔嫩里。多层吸收体,将能有效吸收尿液,帮助小屁屁保持干爽。是各国父母首选的婴儿护理用品之一。&lt;/p&gt;',\n 'img' => '20160706/1467774735676510.png',\n 'status' => 1,\n ),\n 19 => \n array (\n 'id' => 24,\n 'cid' => 289,\n 'name' => 'Huggies Gold好奇金装',\n 'desc' => '&lt;p&gt;好奇HUGGIES纸尿裤诞生于1978年,于22个国际及地区市场领先,全球约有四分之一的宝宝在使用好奇纸尿裤。好奇致力于为宝宝提供最舒适和贴体的纸尿裤穿着体验,让宝宝在他的世界无拘无束的自由探索、发现、快乐地成长。&lt;/p&gt;',\n 'img' => '20160706/1467774891919472.png',\n 'status' => 1,\n ),\n 20 => \n array (\n 'id' => 25,\n 'cid' => 290,\n 'name' => 'Huggies platinum好奇铂金装',\n 'desc' => '&lt;p&gt;好奇HUGGIES纸尿裤诞生于1978年,于22个国际及地区市场领先,全球约有四分之一的宝宝在使用好奇纸尿裤。好奇致力于为宝宝提供最舒适和贴体的纸尿裤穿着体验,让宝宝在他的世界无拘无束的自由探索、发现、快乐地成长。&lt;/p&gt;',\n 'img' => '20160706/1467775132673759.png',\n 'status' => 1,\n ),\n 21 => \n array (\n 'id' => 26,\n 'cid' => 291,\n 'name' => 'Mamypoko 妈咪宝贝',\n 'desc' => '&lt;p&gt;&lt;span class=&quot;name&quot;&gt;妈咪宝贝 MamyPoko&lt;/span&gt;&lt;/p&gt;',\n 'img' => '20160629/1467184326241830.jpg',\n 'status' => 2,\n ),\n 22 => \n array (\n 'id' => 27,\n 'cid' => 292,\n 'name' => 'Libero丽贝乐',\n 'desc' => '&lt;p&gt;Libero丽贝乐,欧洲原装进口,北欧婴儿纸尿裤销量第一,全网性价比最高的纸尿裤。瞬吸、渗透性好,柔软透气,一晚只需一片,用丽贝乐,宝宝舒心,妈妈放心。&lt;/p&gt;',\n 'img' => '20160629/1467183205712826.png',\n 'status' => 1,\n ),\n 23 => \n array (\n 'id' => 28,\n 'cid' => 293,\n 'name' => 'Bella Baby Happy贝拉宝贝',\n 'desc' => '&lt;p&gt;贝拉宝贝(Bella\nBaby Happy)为波兰TZMO \nSA集团旗下品牌,至今已有20余年历史。欧洲一线品牌,该品牌专门为不同生长阶段的婴幼儿生产纸尿裤轻薄,干爽,透气,棉柔,超强吸水,抗菌该品牌在欧洲、亚洲多个国家享有极好的口碑,是消费者信赖的欧洲原装产品。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467183295675514.png',\n 'status' => 1,\n ),\n 24 => \n array (\n 'id' => 29,\n 'cid' => 294,\n 'name' => 'BioFities爱婴舒坦',\n 'desc' => '&lt;p&gt;BioFities纸尿裤是由德国赫曼公司于1976年研制开发成功并率先投入德国市场的产品。第一条纸尿裤名叫: Strampelpeter \nFix中文译作“舞动的彼得菲克斯&amp;quot; 在注重高品质的德国,曾经获得66%市场占有率,在70、80、90年代销量居于德国首位。2007年, \nFIXIES GROUP \nLTD公司全面并购了德国的纸品公司与纸品工厂。2013年,为了BioFities的品质全面提升,故在美国投资新建一处厂区,生产绿色环保的天使系列。BIOFITIES作为FIXIES旗下最受欢迎的产品之一,是欧美天然生态纸尿裤的领先品牌!&lt;/p&gt;',\n 'img' => '20160629/1467183373604750.png',\n 'status' => 1,\n ),\n 25 => \n array (\n 'id' => 30,\n 'cid' => 295,\n 'name' => 'BAMBO班博',\n 'desc' => '&lt;p&gt;BAMBO\n\n被推崇为最顶级的婴儿纸尿裤,纯净、天然、安全、健康。所有材质均经过最严格的工艺筛选及检测,不含有重金属及含氮的颜料,天然棉微粒气孔内层与可呼吸外层形成最佳的透气品质,整晚使用也不会产生刺鼻的气味,使宝宝的肌肤干爽舒适。用BAMBO纸尿裤,给宝宝最好的。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467183420636483.jpg',\n 'status' => 1,\n ),\n 26 => \n array (\n 'id' => 31,\n 'cid' => 10,\n 'name' => '新西兰原装 a2',\n 'desc' => '&lt;p&gt;A2有限公司是一家迅速成长的乳制品公司, 旗下A2牛奶目前遍及新西兰、澳大利亚、英国及中国。A2 品牌牛奶是鲜奶产品,源自含有纯A2型β-酪蛋白的奶牛。所有的A2牛奶都是通过DNA测试验证,并通过认证以确保产出的牛奶只含有A2型的β-酪蛋白。&lt;/p&gt;',\n 'img' => '20160629/1467188563638964.jpg',\n 'status' => 2,\n ),\n 27 => \n array (\n 'id' => 32,\n 'cid' => 10,\n 'name' => '雀氏 Chiaus',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467186509684936.jpg',\n 'status' => 1,\n ),\n 28 => \n array (\n 'id' => 33,\n 'cid' => 10,\n 'name' => '美国原装MeadJohnson',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467187928437446.jpg',\n 'status' => 1,\n ),\n 29 => \n array (\n 'id' => 34,\n 'cid' => 10,\n 'name' => 'Humana',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467188708167681.jpg',\n 'status' => 1,\n ),\n 30 => \n array (\n 'id' => 35,\n 'cid' => 10,\n 'name' => '惠氏SMA英国版',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467188746623189.png',\n 'status' => 1,\n ),\n 31 => \n array (\n 'id' => 36,\n 'cid' => 10,\n 'name' => '荷兰原装Friso',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467188785152293.png',\n 'status' => 1,\n ),\n 32 => \n array (\n 'id' => 37,\n 'cid' => 10,\n 'name' => '雅培',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467188802703100.jpg',\n 'status' => 1,\n ),\n 33 => \n array (\n 'id' => 38,\n 'cid' => 10,\n 'name' => '惠氏',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467188861271879.jpg',\n 'status' => 1,\n ),\n 34 => \n array (\n 'id' => 39,\n 'cid' => 10,\n 'name' => '爱思贝Earth\\'s Best',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467188901660669.png',\n 'status' => 1,\n ),\n 35 => \n array (\n 'id' => 40,\n 'cid' => 10,\n 'name' => 'Arla',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467188948594008.jpg',\n 'status' => 1,\n ),\n 36 => \n array (\n 'id' => 41,\n 'cid' => 10,\n 'name' => '雅士利',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467188965257372.jpg',\n 'status' => 1,\n ),\n 37 => \n array (\n 'id' => 42,\n 'cid' => 10,\n 'name' => '多美滋Dumex',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467188992354813.jpg',\n 'status' => 1,\n ),\n 38 => \n array (\n 'id' => 43,\n 'cid' => 10,\n 'name' => '美素佳儿Friso',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467189067662759.jpg',\n 'status' => 1,\n ),\n 39 => \n array (\n 'id' => 44,\n 'cid' => 10,\n 'name' => '雀巢',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467189180497234.jpg',\n 'status' => 1,\n ),\n 40 => \n array (\n 'id' => 45,\n 'cid' => 10,\n 'name' => '授权行货雅培',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467189316154177.jpg',\n 'status' => 1,\n ),\n 41 => \n array (\n 'id' => 46,\n 'cid' => 10,\n 'name' => '合生元',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467189349621239.jpg',\n 'status' => 1,\n ),\n 42 => \n array (\n 'id' => 47,\n 'cid' => 10,\n 'name' => '惠氏S-26',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467189398459776.jpg',\n 'status' => 1,\n ),\n 43 => \n array (\n 'id' => 48,\n 'cid' => 10,\n 'name' => '澳佳宝',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467189427749259.jpg',\n 'status' => 1,\n ),\n 44 => \n array (\n 'id' => 49,\n 'cid' => 10,\n 'name' => '澳洲原装',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467189451568109.jpg',\n 'status' => 1,\n ),\n 45 => \n array (\n 'id' => 50,\n 'cid' => 10,\n 'name' => '澳洲原装BELLAMY\\'S',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467189485407976.jpg',\n 'status' => 1,\n ),\n 46 => \n array (\n 'id' => 51,\n 'cid' => 10,\n 'name' => '荷仕籣',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => '20160629/1467189529553410.png',\n 'status' => 1,\n ),\n 47 => \n array (\n 'id' => 52,\n 'cid' => 29,\n 'name' => '德国原装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 48 => \n array (\n 'id' => 53,\n 'cid' => 29,\n 'name' => '德国原装 HiPP',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 49 => \n array (\n 'id' => 54,\n 'cid' => 29,\n 'name' => '德国原装 Topfer',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 50 => \n array (\n 'id' => 55,\n 'cid' => 30,\n 'name' => '德国原装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 51 => \n array (\n 'id' => 56,\n 'cid' => 30,\n 'name' => '澳洲原装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 52 => \n array (\n 'id' => 57,\n 'cid' => 30,\n 'name' => '德国原装 HiPP',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 53 => \n array (\n 'id' => 58,\n 'cid' => 30,\n 'name' => '英国原装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 54 => \n array (\n 'id' => 59,\n 'cid' => 30,\n 'name' => '英国原装 Cow&Gate',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 55 => \n array (\n 'id' => 60,\n 'cid' => 30,\n 'name' => '新西兰原装 a2',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 56 => \n array (\n 'id' => 61,\n 'cid' => 30,\n 'name' => '荷兰原装 Hero Baby',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 57 => \n array (\n 'id' => 62,\n 'cid' => 30,\n 'name' => '荷兰原装 Nutrilon',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 58 => \n array (\n 'id' => 63,\n 'cid' => 30,\n 'name' => '德国原装 Topfer',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 59 => \n array (\n 'id' => 64,\n 'cid' => 30,\n 'name' => '澳洲原装 BELLAMY\\'S',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 60 => \n array (\n 'id' => 65,\n 'cid' => 30,\n 'name' => '港版原装 美赞臣 MeadJohnson',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 61 => \n array (\n 'id' => 66,\n 'cid' => 30,\n 'name' => '德国原装 Holle',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 62 => \n array (\n 'id' => 67,\n 'cid' => 30,\n 'name' => '雅培 Abbott',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 63 => \n array (\n 'id' => 68,\n 'cid' => 30,\n 'name' => '荷兰原装 Friso',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 64 => \n array (\n 'id' => 69,\n 'cid' => 30,\n 'name' => '诺优能 Nutrilon',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 65 => \n array (\n 'id' => 70,\n 'cid' => 30,\n 'name' => '美素佳儿 Friso',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 66 => \n array (\n 'id' => 71,\n 'cid' => 30,\n 'name' => '惠氏 Wyeth 港版启赋',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 67 => \n array (\n 'id' => 72,\n 'cid' => 30,\n 'name' => '惠氏 Wyeth 启赋',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 68 => \n array (\n 'id' => 73,\n 'cid' => 30,\n 'name' => '爱他美 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 69 => \n array (\n 'id' => 74,\n 'cid' => 30,\n 'name' => '美国原装 美赞臣 MeadJohnson',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 70 => \n array (\n 'id' => 75,\n 'cid' => 30,\n 'name' => '惠氏 Wyeth SMA 英国版',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 71 => \n array (\n 'id' => 76,\n 'cid' => 30,\n 'name' => '惠氏 Wyeth',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 72 => \n array (\n 'id' => 77,\n 'cid' => 30,\n 'name' => '授权行货 喜宝',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 73 => \n array (\n 'id' => 78,\n 'cid' => 30,\n 'name' => '美赞臣 MeadJohnson',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 74 => \n array (\n 'id' => 79,\n 'cid' => 30,\n 'name' => '雀巢 Nestle',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 75 => \n array (\n 'id' => 80,\n 'cid' => 30,\n 'name' => '授权行货 特福芬 Topfer',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 76 => \n array (\n 'id' => 81,\n 'cid' => 30,\n 'name' => '澳洲原装 爱他美金装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 77 => \n array (\n 'id' => 82,\n 'cid' => 30,\n 'name' => '新西兰原装 Karicare',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 78 => \n array (\n 'id' => 83,\n 'cid' => 30,\n 'name' => '澳洲原装 惠氏S26 Wyeth',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 79 => \n array (\n 'id' => 84,\n 'cid' => 30,\n 'name' => 'Humana',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 80 => \n array (\n 'id' => 85,\n 'cid' => 30,\n 'name' => '明治 meiji',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 81 => \n array (\n 'id' => 86,\n 'cid' => 30,\n 'name' => '合生元 BIOETIME',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 82 => \n array (\n 'id' => 87,\n 'cid' => 30,\n 'name' => 'a2',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 83 => \n array (\n 'id' => 88,\n 'cid' => 30,\n 'name' => '日本原装 固力果 ICREO',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 84 => \n array (\n 'id' => 89,\n 'cid' => 30,\n 'name' => '澳洲爱他美Aptamil白金版 Aptamil Profutura',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 85 => \n array (\n 'id' => 90,\n 'cid' => 30,\n 'name' => '澳洲原装惠氏 S26系列 Wyeth S26',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 86 => \n array (\n 'id' => 91,\n 'cid' => 30,\n 'name' => '多美滋 Dumex',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 87 => \n array (\n 'id' => 92,\n 'cid' => 30,\n 'name' => '咔哇熊 Cowala',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 88 => \n array (\n 'id' => 93,\n 'cid' => 30,\n 'name' => 'EARTH\\'S BEST',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 89 => \n array (\n 'id' => 94,\n 'cid' => 30,\n 'name' => '森永 MORINAGA',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 90 => \n array (\n 'id' => 95,\n 'cid' => 30,\n 'name' => '澳洲原装博宝 bubs',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 91 => \n array (\n 'id' => 96,\n 'cid' => 30,\n 'name' => '德国爱他美(迪拜版) Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 92 => \n array (\n 'id' => 97,\n 'cid' => 30,\n 'name' => '雅士利 YASHiLY',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 93 => \n array (\n 'id' => 98,\n 'cid' => 30,\n 'name' => '澳佳宝 BLACKMORES',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 94 => \n array (\n 'id' => 99,\n 'cid' => 30,\n 'name' => '荷仕兰 Hosland',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 95 => \n array (\n 'id' => 100,\n 'cid' => 30,\n 'name' => '贝拉米 BELLAMY\\'S',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 96 => \n array (\n 'id' => 101,\n 'cid' => 32,\n 'name' => '德国原装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 97 => \n array (\n 'id' => 102,\n 'cid' => 32,\n 'name' => '荷兰原装 Nutrilon',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 98 => \n array (\n 'id' => 103,\n 'cid' => 32,\n 'name' => '英国原装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 99 => \n array (\n 'id' => 104,\n 'cid' => 32,\n 'name' => '澳洲原装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 100 => \n array (\n 'id' => 105,\n 'cid' => 32,\n 'name' => '德国原装 HiPP',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 101 => \n array (\n 'id' => 106,\n 'cid' => 32,\n 'name' => '德国原装 Topfer',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 102 => \n array (\n 'id' => 107,\n 'cid' => 32,\n 'name' => '新西兰原装 a2',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 103 => \n array (\n 'id' => 108,\n 'cid' => 32,\n 'name' => '英国原装 Cow&Gate',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 104 => \n array (\n 'id' => 109,\n 'cid' => 32,\n 'name' => '荷兰原装 Friso',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 105 => \n array (\n 'id' => 110,\n 'cid' => 32,\n 'name' => '荷兰原装 Hero Baby',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 106 => \n array (\n 'id' => 111,\n 'cid' => 32,\n 'name' => '雅培 Abbott',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 107 => \n array (\n 'id' => 112,\n 'cid' => 32,\n 'name' => '德国原装 Holle',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 108 => \n array (\n 'id' => 113,\n 'cid' => 32,\n 'name' => '港版原装 美赞臣 MeadJohnson',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 109 => \n array (\n 'id' => 114,\n 'cid' => 32,\n 'name' => '惠氏 Wyeth 港版启赋',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 110 => \n array (\n 'id' => 115,\n 'cid' => 32,\n 'name' => '美素佳儿 Friso',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 111 => \n array (\n 'id' => 116,\n 'cid' => 32,\n 'name' => '惠氏 Wyeth SMA 英国版',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 112 => \n array (\n 'id' => 117,\n 'cid' => 32,\n 'name' => '惠氏 Wyeth',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 113 => \n array (\n 'id' => 118,\n 'cid' => 32,\n 'name' => '惠氏 Wyeth 启赋',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 114 => \n array (\n 'id' => 119,\n 'cid' => 32,\n 'name' => '诺优能 Nutrilon',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 115 => \n array (\n 'id' => 120,\n 'cid' => 32,\n 'name' => '爱他美 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 116 => \n array (\n 'id' => 121,\n 'cid' => 32,\n 'name' => '澳洲原装 BELLAMY\\'S',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 117 => \n array (\n 'id' => 122,\n 'cid' => 32,\n 'name' => '授权行货 喜宝',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 118 => \n array (\n 'id' => 123,\n 'cid' => 32,\n 'name' => '澳洲原装 惠氏S26 Wyeth',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 119 => \n array (\n 'id' => 124,\n 'cid' => 32,\n 'name' => '雀巢 Nestle',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 120 => \n array (\n 'id' => 125,\n 'cid' => 32,\n 'name' => '美赞臣 MeadJohnson',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 121 => \n array (\n 'id' => 126,\n 'cid' => 32,\n 'name' => '澳洲原装 爱他美金装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 122 => \n array (\n 'id' => 127,\n 'cid' => 32,\n 'name' => '新西兰原装 Karicare',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 123 => \n array (\n 'id' => 128,\n 'cid' => 32,\n 'name' => '授权行货 特福芬 Topfer',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 124 => \n array (\n 'id' => 129,\n 'cid' => 32,\n 'name' => '澳洲爱他美Aptamil白金版 Aptamil Profutura',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 125 => \n array (\n 'id' => 130,\n 'cid' => 32,\n 'name' => 'Humana',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 126 => \n array (\n 'id' => 131,\n 'cid' => 32,\n 'name' => 'a2',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 127 => \n array (\n 'id' => 132,\n 'cid' => 32,\n 'name' => '多美滋 Dumex',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 128 => \n array (\n 'id' => 133,\n 'cid' => 32,\n 'name' => '雅士利 YASHiLY',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 129 => \n array (\n 'id' => 134,\n 'cid' => 32,\n 'name' => '澳洲原装博宝 bubs',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 130 => \n array (\n 'id' => 135,\n 'cid' => 32,\n 'name' => '合生元 BIOETIME',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 131 => \n array (\n 'id' => 136,\n 'cid' => 32,\n 'name' => '澳洲原装惠氏 S26系列 Wyeth S26',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 132 => \n array (\n 'id' => 137,\n 'cid' => 32,\n 'name' => '澳佳宝 BLACKMORES',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 133 => \n array (\n 'id' => 138,\n 'cid' => 32,\n 'name' => '咔哇熊 Cowala',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 134 => \n array (\n 'id' => 139,\n 'cid' => 32,\n 'name' => 'Arla',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 135 => \n array (\n 'id' => 140,\n 'cid' => 32,\n 'name' => '德国爱他美(迪拜版) Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 136 => \n array (\n 'id' => 141,\n 'cid' => 32,\n 'name' => 'EARTH\\'S BESTl',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 137 => \n array (\n 'id' => 142,\n 'cid' => 32,\n 'name' => '荷仕兰 Hosland',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 138 => \n array (\n 'id' => 143,\n 'cid' => 32,\n 'name' => '贝拉米 BELLAMY\\'S',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 139 => \n array (\n 'id' => 144,\n 'cid' => 31,\n 'name' => '德国原装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 140 => \n array (\n 'id' => 145,\n 'cid' => 31,\n 'name' => '荷兰原装 Nutrilon',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 141 => \n array (\n 'id' => 146,\n 'cid' => 31,\n 'name' => '德国原装 HiPP',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 142 => \n array (\n 'id' => 147,\n 'cid' => 31,\n 'name' => '澳洲原装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 143 => \n array (\n 'id' => 148,\n 'cid' => 31,\n 'name' => '英国原装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 144 => \n array (\n 'id' => 149,\n 'cid' => 31,\n 'name' => '荷兰原装 Hero Baby',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 145 => \n array (\n 'id' => 150,\n 'cid' => 31,\n 'name' => '美国原装 美赞臣 MeadJohnson',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 146 => \n array (\n 'id' => 151,\n 'cid' => 31,\n 'name' => '德国原装 Holle',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 147 => \n array (\n 'id' => 152,\n 'cid' => 31,\n 'name' => '港版原装 美赞臣 MeadJohnson',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 148 => \n array (\n 'id' => 153,\n 'cid' => 31,\n 'name' => '德国原装 Topfer',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 149 => \n array (\n 'id' => 154,\n 'cid' => 31,\n 'name' => '英国原装 Cow&Gate',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 150 => \n array (\n 'id' => 155,\n 'cid' => 31,\n 'name' => '新西兰原装 a2',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 151 => \n array (\n 'id' => 156,\n 'cid' => 31,\n 'name' => '惠氏 Wyeth 启赋',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 152 => \n array (\n 'id' => 157,\n 'cid' => 31,\n 'name' => '荷兰原装 Friso',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 153 => \n array (\n 'id' => 158,\n 'cid' => 31,\n 'name' => '诺优能 Nutrilon',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 154 => \n array (\n 'id' => 159,\n 'cid' => 31,\n 'name' => '惠氏 Wyeth 港版启赋',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 155 => \n array (\n 'id' => 160,\n 'cid' => 31,\n 'name' => '美素佳儿 Friso',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 156 => \n array (\n 'id' => 161,\n 'cid' => 31,\n 'name' => '雅培 Abbott',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 157 => \n array (\n 'id' => 162,\n 'cid' => 31,\n 'name' => '惠氏 Wyeth SMA 英国版',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 158 => \n array (\n 'id' => 163,\n 'cid' => 31,\n 'name' => '爱他美 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 159 => \n array (\n 'id' => 164,\n 'cid' => 31,\n 'name' => '惠氏 Wyeth',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 160 => \n array (\n 'id' => 165,\n 'cid' => 31,\n 'name' => '美赞臣 MeadJohnson',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 161 => \n array (\n 'id' => 166,\n 'cid' => 31,\n 'name' => '澳洲原装 BELLAMY\\'S',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 162 => \n array (\n 'id' => 167,\n 'cid' => 31,\n 'name' => '授权行货 喜宝',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 163 => \n array (\n 'id' => 168,\n 'cid' => 31,\n 'name' => '澳洲原装 爱他美金装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 164 => \n array (\n 'id' => 169,\n 'cid' => 31,\n 'name' => '授权行货 特福芬 Topfer',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 165 => \n array (\n 'id' => 170,\n 'cid' => 31,\n 'name' => '澳洲爱他美Aptamil白金版 Aptamil Profutura',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 166 => \n array (\n 'id' => 171,\n 'cid' => 31,\n 'name' => '澳洲原装 惠氏S26 Wyeth',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 167 => \n array (\n 'id' => 172,\n 'cid' => 31,\n 'name' => 'a2',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 168 => \n array (\n 'id' => 173,\n 'cid' => 31,\n 'name' => 'Humana',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 169 => \n array (\n 'id' => 174,\n 'cid' => 31,\n 'name' => '新西兰原装 Karicare',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 170 => \n array (\n 'id' => 175,\n 'cid' => 31,\n 'name' => '明治 meiji',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 171 => \n array (\n 'id' => 176,\n 'cid' => 31,\n 'name' => '日本原装 固力果 ICREO',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 172 => \n array (\n 'id' => 177,\n 'cid' => 31,\n 'name' => '雅士利 YASHiLY',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 173 => \n array (\n 'id' => 178,\n 'cid' => 31,\n 'name' => '雀巢 Nestle',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 174 => \n array (\n 'id' => 179,\n 'cid' => 31,\n 'name' => '合生元 BIOETIME',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 175 => \n array (\n 'id' => 180,\n 'cid' => 31,\n 'name' => '澳洲原装惠氏 S26系列 Wyeth S26',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 176 => \n array (\n 'id' => 181,\n 'cid' => 31,\n 'name' => '多美滋 Dumex',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 177 => \n array (\n 'id' => 182,\n 'cid' => 31,\n 'name' => 'Arla',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 178 => \n array (\n 'id' => 183,\n 'cid' => 31,\n 'name' => '澳洲原装博宝 bubs',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 179 => \n array (\n 'id' => 184,\n 'cid' => 31,\n 'name' => '森永 MORINAGA',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 180 => \n array (\n 'id' => 185,\n 'cid' => 31,\n 'name' => '咔哇熊 Cowala',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 181 => \n array (\n 'id' => 186,\n 'cid' => 31,\n 'name' => 'EARTH\\'S BEST',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 182 => \n array (\n 'id' => 187,\n 'cid' => 31,\n 'name' => '澳佳宝 BLACKMORES',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 183 => \n array (\n 'id' => 188,\n 'cid' => 31,\n 'name' => '德国爱他美(迪拜版) Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 184 => \n array (\n 'id' => 189,\n 'cid' => 31,\n 'name' => '荷仕兰 Hosland',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 185 => \n array (\n 'id' => 190,\n 'cid' => 31,\n 'name' => '贝拉米 BELLAMY\\'S',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 186 => \n array (\n 'id' => 191,\n 'cid' => 33,\n 'name' => '荷兰原装 Nutrilon',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 187 => \n array (\n 'id' => 192,\n 'cid' => 33,\n 'name' => '澳洲原装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 188 => \n array (\n 'id' => 193,\n 'cid' => 33,\n 'name' => '英国原装 Cow&Gate',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 189 => \n array (\n 'id' => 194,\n 'cid' => 33,\n 'name' => '英国原装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 190 => \n array (\n 'id' => 195,\n 'cid' => 33,\n 'name' => '荷兰原装 Hero Baby',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 191 => \n array (\n 'id' => 196,\n 'cid' => 33,\n 'name' => '德国原装 Holle',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 192 => \n array (\n 'id' => 197,\n 'cid' => 33,\n 'name' => '港版原装 美赞臣 MeadJohnson',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 193 => \n array (\n 'id' => 198,\n 'cid' => 33,\n 'name' => '惠氏 Wyeth 港版启赋',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 194 => \n array (\n 'id' => 199,\n 'cid' => 33,\n 'name' => '雅培 Abbott',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 195 => \n array (\n 'id' => 200,\n 'cid' => 33,\n 'name' => '惠氏 Wyeth 启赋',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 196 => \n array (\n 'id' => 201,\n 'cid' => 33,\n 'name' => '爱他美 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 197 => \n array (\n 'id' => 202,\n 'cid' => 33,\n 'name' => '美素佳儿 Friso',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 198 => \n array (\n 'id' => 203,\n 'cid' => 33,\n 'name' => '诺优能 Nutrilon',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 199 => \n array (\n 'id' => 204,\n 'cid' => 33,\n 'name' => '澳洲原装 惠氏S26 Wyeth',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 200 => \n array (\n 'id' => 205,\n 'cid' => 33,\n 'name' => '澳洲原装 惠氏S26 Wyeth',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 201 => \n array (\n 'id' => 206,\n 'cid' => 33,\n 'name' => '惠氏 Wyeth',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 202 => \n array (\n 'id' => 207,\n 'cid' => 33,\n 'name' => '澳洲爱他美Aptamil白金版 Aptamil Profutura',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 203 => \n array (\n 'id' => 208,\n 'cid' => 33,\n 'name' => '澳洲原装 爱他美金装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 204 => \n array (\n 'id' => 209,\n 'cid' => 33,\n 'name' => '美赞臣 MeadJohnson',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 205 => \n array (\n 'id' => 210,\n 'cid' => 33,\n 'name' => '多美滋 Dumex',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 206 => \n array (\n 'id' => 211,\n 'cid' => 33,\n 'name' => '澳洲原装惠氏 S26系列 Wyeth S26',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 207 => \n array (\n 'id' => 212,\n 'cid' => 33,\n 'name' => '德国爱他美(迪拜版) Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 208 => \n array (\n 'id' => 213,\n 'cid' => 33,\n 'name' => '合生元 BIOETIME',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 209 => \n array (\n 'id' => 214,\n 'cid' => 34,\n 'name' => '荷兰原装 Nutrilon',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 210 => \n array (\n 'id' => 215,\n 'cid' => 34,\n 'name' => '荷兰原装 Hero Baby',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 211 => \n array (\n 'id' => 216,\n 'cid' => 34,\n 'name' => '港版原装 美赞臣 MeadJ',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 212 => \n array (\n 'id' => 217,\n 'cid' => 36,\n 'name' => '德国原装 Aptamil',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 213 => \n array (\n 'id' => 218,\n 'cid' => 36,\n 'name' => '德国原装 HiPP',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 214 => \n array (\n 'id' => 219,\n 'cid' => 36,\n 'name' => '德国原装 Topfer',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 215 => \n array (\n 'id' => 220,\n 'cid' => 36,\n 'name' => '澳洲原装雅培小安素 Pedi',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 216 => \n array (\n 'id' => 221,\n 'cid' => 37,\n 'name' => '澳洲原装雅培小安素 Pedi',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 217 => \n array (\n 'id' => 222,\n 'cid' => 37,\n 'name' => '德国原装 HiPP',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 218 => \n array (\n 'id' => 223,\n 'cid' => 38,\n 'name' => '花王 Merries',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 219 => \n array (\n 'id' => 224,\n 'cid' => 38,\n 'name' => '尤妮佳 moony',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 220 => \n array (\n 'id' => 225,\n 'cid' => 38,\n 'name' => '大王 GOO.N',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 221 => \n array (\n 'id' => 226,\n 'cid' => 38,\n 'name' => '好奇 HUGGIES 金装',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 222 => \n array (\n 'id' => 227,\n 'cid' => 38,\n 'name' => '帮宝适 Pampers',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 223 => \n array (\n 'id' => 228,\n 'cid' => 38,\n 'name' => '妈咪宝贝 MamyPoko',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 224 => \n array (\n 'id' => 229,\n 'cid' => 38,\n 'name' => '好奇 HUGGIES 银装',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 225 => \n array (\n 'id' => 230,\n 'cid' => 38,\n 'name' => '丽贝乐 Libero',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 226 => \n array (\n 'id' => 231,\n 'cid' => 38,\n 'name' => '爱婴舒坦 BioFities',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 227 => \n array (\n 'id' => 232,\n 'cid' => 38,\n 'name' => '班博 BAMBO',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 228 => \n array (\n 'id' => 233,\n 'cid' => 38,\n 'name' => '雀氏 Chiaus',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 229 => \n array (\n 'id' => 234,\n 'cid' => 38,\n 'name' => '威尔贝鲁 wellber',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 230 => \n array (\n 'id' => 235,\n 'cid' => 39,\n 'name' => '维达 Vinda',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 231 => \n array (\n 'id' => 236,\n 'cid' => 39,\n 'name' => '和光堂 wakodo',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 232 => \n array (\n 'id' => 237,\n 'cid' => 39,\n 'name' => '慕逸适 moist',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 233 => \n array (\n 'id' => 238,\n 'cid' => 39,\n 'name' => '花王 Merries',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 234 => \n array (\n 'id' => 239,\n 'cid' => 39,\n 'name' => '得宝 Tempo',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 235 => \n array (\n 'id' => 240,\n 'cid' => 39,\n 'name' => '小林制药 KOBAYASHI',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 236 => \n array (\n 'id' => 241,\n 'cid' => 39,\n 'name' => '妮飘 nepia',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 237 => \n array (\n 'id' => 242,\n 'cid' => 39,\n 'name' => '甘尼克 babyganics',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 238 => \n array (\n 'id' => 243,\n 'cid' => 39,\n 'name' => '心相印',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 239 => \n array (\n 'id' => 244,\n 'cid' => 39,\n 'name' => '康乃馨 Carnation',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 240 => \n array (\n 'id' => 245,\n 'cid' => 39,\n 'name' => '全棉时代 PurCotton',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 241 => \n array (\n 'id' => 246,\n 'cid' => 39,\n 'name' => '倍伊乐 Panlex',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 242 => \n array (\n 'id' => 247,\n 'cid' => 39,\n 'name' => '塔卡塔图 TAKATATU',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 243 => \n array (\n 'id' => 248,\n 'cid' => 39,\n 'name' => '澳斯贝贝 AUSTTBABY',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 244 => \n array (\n 'id' => 249,\n 'cid' => 39,\n 'name' => '清风',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 245 => \n array (\n 'id' => 250,\n 'cid' => 39,\n 'name' => '泉林本色',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 246 => \n array (\n 'id' => 251,\n 'cid' => 39,\n 'name' => '侨丰',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 247 => \n array (\n 'id' => 252,\n 'cid' => 39,\n 'name' => '佳韵宝 Joyourbaby',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 248 => \n array (\n 'id' => 253,\n 'cid' => 39,\n 'name' => '瑞诺瓦之爱 Renova',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 249 => \n array (\n 'id' => 254,\n 'cid' => 39,\n 'name' => '乐孕',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 250 => \n array (\n 'id' => 255,\n 'cid' => 39,\n 'name' => 'Ubela',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 251 => \n array (\n 'id' => 256,\n 'cid' => 39,\n 'name' => '威奇 UYEKI',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 252 => \n array (\n 'id' => 257,\n 'cid' => 39,\n 'name' => '棒棒猪',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 253 => \n array (\n 'id' => 258,\n 'cid' => 39,\n 'name' => '欧淘 otao',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 254 => \n array (\n 'id' => 259,\n 'cid' => 39,\n 'name' => '五羊 FIVERAMS',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 255 => \n array (\n 'id' => 260,\n 'cid' => 39,\n 'name' => '十月结晶',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 256 => \n array (\n 'id' => 261,\n 'cid' => 39,\n 'name' => '怡恩贝 ein.b',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 257 => \n array (\n 'id' => 262,\n 'cid' => 40,\n 'name' => '花王 Merries',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 258 => \n array (\n 'id' => 263,\n 'cid' => 40,\n 'name' => '花王 Merries',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 259 => \n array (\n 'id' => 264,\n 'cid' => 40,\n 'name' => '大王 GOO.N',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 260 => \n array (\n 'id' => 265,\n 'cid' => 40,\n 'name' => '班博 BAMBO',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 261 => \n array (\n 'id' => 266,\n 'cid' => 40,\n 'name' => '帮宝适 Pampers',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 262 => \n array (\n 'id' => 267,\n 'cid' => 40,\n 'name' => '好奇 HUGGIES 铂金装',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 263 => \n array (\n 'id' => 268,\n 'cid' => 40,\n 'name' => '好奇 HUGGIES 金装',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 264 => \n array (\n 'id' => 269,\n 'cid' => 40,\n 'name' => '帮宝适 Pampers 日本紫帮',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 265 => \n array (\n 'id' => 270,\n 'cid' => 40,\n 'name' => '好奇 HUGGIES 银装',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 266 => \n array (\n 'id' => 271,\n 'cid' => 40,\n 'name' => '妈咪宝贝 MamyPoko',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 267 => \n array (\n 'id' => 272,\n 'cid' => 40,\n 'name' => '丽贝乐 Libero',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 268 => \n array (\n 'id' => 273,\n 'cid' => 40,\n 'name' => '爱婴舒坦 BioFities',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 269 => \n array (\n 'id' => 274,\n 'cid' => 40,\n 'name' => '全棉时代 PurCotton',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 270 => \n array (\n 'id' => 275,\n 'cid' => 40,\n 'name' => '雀氏 Chiaus',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 271 => \n array (\n 'id' => 276,\n 'cid' => 40,\n 'name' => '妈恩蓓 momandbab',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 272 => \n array (\n 'id' => 277,\n 'cid' => 40,\n 'name' => '好奇 HUGGIES',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 273 => \n array (\n 'id' => 278,\n 'cid' => 41,\n 'name' => '尤妮佳 moony',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 274 => \n array (\n 'id' => 279,\n 'cid' => 41,\n 'name' => '大王 GOO.N',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 275 => \n array (\n 'id' => 280,\n 'cid' => 41,\n 'name' => '大王 GOO.N',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 276 => \n array (\n 'id' => 281,\n 'cid' => 41,\n 'name' => 'BROWN',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 277 => \n array (\n 'id' => 282,\n 'cid' => 41,\n 'name' => 'NUK',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 278 => \n array (\n 'id' => 283,\n 'cid' => 41,\n 'name' => '花王 Merries',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 279 => \n array (\n 'id' => 284,\n 'cid' => 41,\n 'name' => '啾啾 CHUCHU',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 280 => \n array (\n 'id' => 285,\n 'cid' => 41,\n 'name' => '贝亲 Pigeon',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 281 => \n array (\n 'id' => 286,\n 'cid' => 41,\n 'name' => '顺顺儿',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 282 => \n array (\n 'id' => 287,\n 'cid' => 41,\n 'name' => '飞利浦 新安怡 AVENT',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 283 => \n array (\n 'id' => 288,\n 'cid' => 41,\n 'name' => '宝贝可爱 nac nac',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 284 => \n array (\n 'id' => 289,\n 'cid' => 41,\n 'name' => '宝贝可爱 nac nac',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 285 => \n array (\n 'id' => 290,\n 'cid' => 41,\n 'name' => '乐儿宝 bobo',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 286 => \n array (\n 'id' => 291,\n 'cid' => 41,\n 'name' => '康贝 Combi',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 287 => \n array (\n 'id' => 292,\n 'cid' => 41,\n 'name' => '妙思乐 mustela',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 288 => \n array (\n 'id' => 293,\n 'cid' => 41,\n 'name' => 'Cocokids',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 289 => \n array (\n 'id' => 294,\n 'cid' => 41,\n 'name' => '润本',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 290 => \n array (\n 'id' => 295,\n 'cid' => 41,\n 'name' => '红色小象',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 291 => \n array (\n 'id' => 296,\n 'cid' => 41,\n 'name' => '阿卡佳 AKACHAN',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 292 => \n array (\n 'id' => 297,\n 'cid' => 41,\n 'name' => '五个小卡车 Five Trucks',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 293 => \n array (\n 'id' => 298,\n 'cid' => 41,\n 'name' => '努比 Nuby',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 294 => \n array (\n 'id' => 299,\n 'cid' => 41,\n 'name' => '漂儿适',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 295 => \n array (\n 'id' => 300,\n 'cid' => 41,\n 'name' => '甘尼克 babyganics',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 296 => \n array (\n 'id' => 301,\n 'cid' => 41,\n 'name' => '保宁 B&B',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 297 => \n array (\n 'id' => 302,\n 'cid' => 41,\n 'name' => '小树苗 little tree',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 298 => \n array (\n 'id' => 303,\n 'cid' => 41,\n 'name' => 'U-ZA',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 299 => \n array (\n 'id' => 304,\n 'cid' => 41,\n 'name' => '倍伊乐 Panlex',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 300 => \n array (\n 'id' => 305,\n 'cid' => 41,\n 'name' => '希杰狮王 CJ LION',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 301 => \n array (\n 'id' => 306,\n 'cid' => 41,\n 'name' => '鼻涕虫 Boogie Wipes',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 302 => \n array (\n 'id' => 307,\n 'cid' => 41,\n 'name' => '五羊 FIVERAMS',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 303 => \n array (\n 'id' => 308,\n 'cid' => 41,\n 'name' => '强生 Johnson',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 304 => \n array (\n 'id' => 309,\n 'cid' => 41,\n 'name' => '子初 Springbuds',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 305 => \n array (\n 'id' => 310,\n 'cid' => 41,\n 'name' => '班博 BAMBO',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 306 => \n array (\n 'id' => 311,\n 'cid' => 41,\n 'name' => '布朗博士 Dr Brown\\'s',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 307 => \n array (\n 'id' => 312,\n 'cid' => 41,\n 'name' => '智高 chicco',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 308 => \n array (\n 'id' => 313,\n 'cid' => 41,\n 'name' => '好奇 HUGGIES 铂金装',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 309 => \n array (\n 'id' => 314,\n 'cid' => 41,\n 'name' => '全棉时代 PurCotton',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 310 => \n array (\n 'id' => 315,\n 'cid' => 41,\n 'name' => 'jackson reece',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 311 => \n array (\n 'id' => 316,\n 'cid' => 41,\n 'name' => '塔卡塔图 TAKATATU',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 312 => \n array (\n 'id' => 317,\n 'cid' => 41,\n 'name' => '贝贝怡 bornbay',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 313 => \n array (\n 'id' => 318,\n 'cid' => 41,\n 'name' => '威尔贝鲁 wellber',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 314 => \n array (\n 'id' => 319,\n 'cid' => 41,\n 'name' => 'K-MOM',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 315 => \n array (\n 'id' => 320,\n 'cid' => 41,\n 'name' => '好奇 HUGGIES 金装',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 316 => \n array (\n 'id' => 321,\n 'cid' => 41,\n 'name' => '意婴堡',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 317 => \n array (\n 'id' => 322,\n 'cid' => 41,\n 'name' => '惠氏',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 318 => \n array (\n 'id' => 323,\n 'cid' => 41,\n 'name' => '格朗 GL',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 319 => \n array (\n 'id' => 324,\n 'cid' => 41,\n 'name' => '好孩子 GOODBABY',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 320 => \n array (\n 'id' => 325,\n 'cid' => 41,\n 'name' => '丽贝乐 Libero',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 321 => \n array (\n 'id' => 326,\n 'cid' => 41,\n 'name' => '亲亲我 KIDSME',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 322 => \n array (\n 'id' => 327,\n 'cid' => 41,\n 'name' => '棒棒猪',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 323 => \n array (\n 'id' => 328,\n 'cid' => 41,\n 'name' => '澳斯贝贝 AUSTTBABY',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 324 => \n array (\n 'id' => 329,\n 'cid' => 41,\n 'name' => '宝宝金水',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 325 => \n array (\n 'id' => 330,\n 'cid' => 41,\n 'name' => '怡恩贝 ein.b',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 326 => \n array (\n 'id' => 331,\n 'cid' => 41,\n 'name' => '贝悦 Beinjoy',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 327 => \n array (\n 'id' => 332,\n 'cid' => 41,\n 'name' => '帮宝适 Pampers',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 328 => \n array (\n 'id' => 333,\n 'cid' => 41,\n 'name' => '优简 BestJane',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 329 => \n array (\n 'id' => 334,\n 'cid' => 41,\n 'name' => '新贝 NCVI',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 330 => \n array (\n 'id' => 335,\n 'cid' => 41,\n 'name' => '母爱 muai',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 331 => \n array (\n 'id' => 336,\n 'cid' => 41,\n 'name' => 'V&E',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 332 => \n array (\n 'id' => 337,\n 'cid' => 41,\n 'name' => '青蛙王子 FrogPrince',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 333 => \n array (\n 'id' => 338,\n 'cid' => 41,\n 'name' => '艾娜骑士 Aina Kids',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 334 => \n array (\n 'id' => 339,\n 'cid' => 41,\n 'name' => '心相印',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 335 => \n array (\n 'id' => 340,\n 'cid' => 41,\n 'name' => '雀氏 Chiaus',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 336 => \n array (\n 'id' => 341,\n 'cid' => 41,\n 'name' => '露安适 Lelch',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 337 => \n array (\n 'id' => 342,\n 'cid' => 41,\n 'name' => '良良',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 338 => \n array (\n 'id' => 343,\n 'cid' => 41,\n 'name' => '蒂乐 dile',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 339 => \n array (\n 'id' => 344,\n 'cid' => 41,\n 'name' => '自然之爱 NATURE LOVE MER',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 340 => \n array (\n 'id' => 345,\n 'cid' => 41,\n 'name' => '游心 ASOKO',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 341 => \n array (\n 'id' => 346,\n 'cid' => 41,\n 'name' => '安儿欣 babiSafe',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 342 => \n array (\n 'id' => 347,\n 'cid' => 41,\n 'name' => 'Angell',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 343 => \n array (\n 'id' => 348,\n 'cid' => 41,\n 'name' => '妈咪宝贝 MamyPoko',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 344 => \n array (\n 'id' => 349,\n 'cid' => 41,\n 'name' => '爱得利',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 345 => \n array (\n 'id' => 350,\n 'cid' => 41,\n 'name' => '全因爱 lovology',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 346 => \n array (\n 'id' => 351,\n 'cid' => 41,\n 'name' => '海绵宝宝 SPONGEBOB SQUAREPANTS',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 347 => \n array (\n 'id' => 352,\n 'cid' => 41,\n 'name' => '彼特的奶蜂 Peter\\'s Bees',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 348 => \n array (\n 'id' => 353,\n 'cid' => 41,\n 'name' => '十月妈咪 octmami',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 349 => \n array (\n 'id' => 354,\n 'cid' => 41,\n 'name' => '米卡乐智',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 350 => \n array (\n 'id' => 355,\n 'cid' => 41,\n 'name' => '棉店 COTTONSHOP',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 351 => \n array (\n 'id' => 356,\n 'cid' => 41,\n 'name' => '乐婴泉 UAA',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 352 => \n array (\n 'id' => 357,\n 'cid' => 41,\n 'name' => '多顺',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 353 => \n array (\n 'id' => 358,\n 'cid' => 41,\n 'name' => '清风',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 354 => \n array (\n 'id' => 359,\n 'cid' => 41,\n 'name' => '全能妈妈 super mama',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 355 => \n array (\n 'id' => 360,\n 'cid' => 41,\n 'name' => 'eotton',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 356 => \n array (\n 'id' => 361,\n 'cid' => 41,\n 'name' => '瑞莎 Zwitsal',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 357 => \n array (\n 'id' => 362,\n 'cid' => 41,\n 'name' => '大卫 amethyst',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 358 => \n array (\n 'id' => 363,\n 'cid' => 41,\n 'name' => '欧淘 otao',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 359 => \n array (\n 'id' => 364,\n 'cid' => 41,\n 'name' => '贝立安 Brillante',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 360 => \n array (\n 'id' => 365,\n 'cid' => 41,\n 'name' => '宝宝贝贝 BeBe PoPo',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 361 => \n array (\n 'id' => 366,\n 'cid' => 41,\n 'name' => '柚子宝宝 MELON BABY',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 362 => \n array (\n 'id' => 367,\n 'cid' => 41,\n 'name' => '瑞士宝琪 b&h',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 363 => \n array (\n 'id' => 368,\n 'cid' => 41,\n 'name' => '琳达妈咪',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 364 => \n array (\n 'id' => 369,\n 'cid' => 41,\n 'name' => '壳壳嘟噜噜 COKO DORORO',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 365 => \n array (\n 'id' => 370,\n 'cid' => 41,\n 'name' => '爱丽思 IRIS',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 366 => \n array (\n 'id' => 371,\n 'cid' => 41,\n 'name' => '贝比乐乐',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 367 => \n array (\n 'id' => 372,\n 'cid' => 41,\n 'name' => '奶拉贝儿 mirabelle',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 368 => \n array (\n 'id' => 373,\n 'cid' => 41,\n 'name' => '十月天使',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 369 => \n array (\n 'id' => 374,\n 'cid' => 41,\n 'name' => '恩姆花园',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 370 => \n array (\n 'id' => 375,\n 'cid' => 41,\n 'name' => '艾贝琪 ABQ',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 371 => \n array (\n 'id' => 376,\n 'cid' => 41,\n 'name' => '肌肤乐 Gifrer',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 372 => \n array (\n 'id' => 377,\n 'cid' => 41,\n 'name' => '葆婴 babycare',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 373 => \n array (\n 'id' => 378,\n 'cid' => 42,\n 'name' => 'SHILOH',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 374 => \n array (\n 'id' => 379,\n 'cid' => 42,\n 'name' => '贝贝怡 bornbay',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 375 => \n array (\n 'id' => 380,\n 'cid' => 42,\n 'name' => '优简 BestJane',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 376 => \n array (\n 'id' => 381,\n 'cid' => 42,\n 'name' => '澳斯贝贝 AUSTTBABY',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 377 => \n array (\n 'id' => 382,\n 'cid' => 42,\n 'name' => '迪士尼 Disney',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 378 => \n array (\n 'id' => 383,\n 'cid' => 42,\n 'name' => 'Zoli',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 379 => \n array (\n 'id' => 384,\n 'cid' => 42,\n 'name' => '米卡乐智',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 380 => \n array (\n 'id' => 385,\n 'cid' => 42,\n 'name' => '子初 Springbuds',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 381 => \n array (\n 'id' => 386,\n 'cid' => 42,\n 'name' => '安茵儿 Aninkids',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 382 => \n array (\n 'id' => 387,\n 'cid' => 42,\n 'name' => '塔卡塔图 TAKATATU',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 383 => \n array (\n 'id' => 388,\n 'cid' => 42,\n 'name' => '佳韵宝 Joyourbaby',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 384 => \n array (\n 'id' => 389,\n 'cid' => 42,\n 'name' => '婧麒 JOYNCLEON',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 385 => \n array (\n 'id' => 390,\n 'cid' => 42,\n 'name' => '威尔贝鲁 wellber',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 386 => \n array (\n 'id' => 391,\n 'cid' => 42,\n 'name' => '棉花堂 Cotton Town',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 387 => \n array (\n 'id' => 392,\n 'cid' => 42,\n 'name' => '沐乐维',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 388 => \n array (\n 'id' => 393,\n 'cid' => 42,\n 'name' => '贝儿乐',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 389 => \n array (\n 'id' => 394,\n 'cid' => 42,\n 'name' => '爱蓓优 LOVE BB&',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 390 => \n array (\n 'id' => 395,\n 'cid' => 42,\n 'name' => '巧尼熊',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 391 => \n array (\n 'id' => 396,\n 'cid' => 42,\n 'name' => '海绵泡泡 himipopo',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 392 => \n array (\n 'id' => 397,\n 'cid' => 42,\n 'name' => '费雪 Fisher Price',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 393 => \n array (\n 'id' => 398,\n 'cid' => 42,\n 'name' => '妈咪呢喃 MUMNENA',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 394 => \n array (\n 'id' => 399,\n 'cid' => 42,\n 'name' => '乐桃和家 TAOlifestyle',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 395 => \n array (\n 'id' => 400,\n 'cid' => 42,\n 'name' => 'Angell',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 396 => \n array (\n 'id' => 401,\n 'cid' => 42,\n 'name' => '麦拉贝拉 MOLO BALO',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 397 => \n array (\n 'id' => 402,\n 'cid' => 42,\n 'name' => 'GroVia',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 398 => \n array (\n 'id' => 403,\n 'cid' => 42,\n 'name' => '十月妈咪 octmami',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 399 => \n array (\n 'id' => 404,\n 'cid' => 42,\n 'name' => '全棉时代 PurCotton',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 400 => \n array (\n 'id' => 405,\n 'cid' => 42,\n 'name' => '新贝 NCVI',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 401 => \n array (\n 'id' => 406,\n 'cid' => 42,\n 'name' => '笨笨熊',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 402 => \n array (\n 'id' => 407,\n 'cid' => 42,\n 'name' => '米乐鱼',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 403 => \n array (\n 'id' => 408,\n 'cid' => 42,\n 'name' => '宝然 Baoran',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 404 => \n array (\n 'id' => 409,\n 'cid' => 42,\n 'name' => '大朴 DAPU',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 405 => \n array (\n 'id' => 410,\n 'cid' => 42,\n 'name' => '阿卡手工',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 406 => \n array (\n 'id' => 411,\n 'cid' => 42,\n 'name' => '3KOALAS',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 407 => \n array (\n 'id' => 412,\n 'cid' => 42,\n 'name' => '博睿恩 pureborn',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 408 => \n array (\n 'id' => 413,\n 'cid' => 42,\n 'name' => '美好宝贝 BestBaby',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 409 => \n array (\n 'id' => 414,\n 'cid' => 42,\n 'name' => '欧淘 otao',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 410 => \n array (\n 'id' => 415,\n 'cid' => 42,\n 'name' => '艾娜骑士 Aina Kids',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 411 => \n array (\n 'id' => 416,\n 'cid' => 42,\n 'name' => '娃娃舒',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 412 => \n array (\n 'id' => 417,\n 'cid' => 42,\n 'name' => '柏逦莎',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 413 => \n array (\n 'id' => 418,\n 'cid' => 42,\n 'name' => 'dapubaby',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 414 => \n array (\n 'id' => 419,\n 'cid' => 42,\n 'name' => '贝吻 BBKISS',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 415 => \n array (\n 'id' => 420,\n 'cid' => 42,\n 'name' => '戴维贝拉 dave&bella',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 416 => \n array (\n 'id' => 421,\n 'cid' => 42,\n 'name' => '恩施贝比 Enshibaby',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 417 => \n array (\n 'id' => 422,\n 'cid' => 42,\n 'name' => '十月结晶',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 418 => \n array (\n 'id' => 423,\n 'cid' => 42,\n 'name' => '棉店 COTTONSHOP',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 419 => \n array (\n 'id' => 424,\n 'cid' => 42,\n 'name' => '圣宝度伦 senbodulun',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 420 => \n array (\n 'id' => 425,\n 'cid' => 42,\n 'name' => '圣宝度伦 senbodulun',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 421 => \n array (\n 'id' => 426,\n 'cid' => 42,\n 'name' => '舒乐宝贝 Snoozebaby',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 422 => \n array (\n 'id' => 427,\n 'cid' => 42,\n 'name' => '好孩子 GOODBABY',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 423 => \n array (\n 'id' => 428,\n 'cid' => 42,\n 'name' => '博菩点点 Bopudiandian',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 424 => \n array (\n 'id' => 429,\n 'cid' => 42,\n 'name' => 'i-angel',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 425 => \n array (\n 'id' => 430,\n 'cid' => 42,\n 'name' => '南极人',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 426 => \n array (\n 'id' => 431,\n 'cid' => 42,\n 'name' => '小米米 minimoto',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 427 => \n array (\n 'id' => 432,\n 'cid' => 42,\n 'name' => '多米贝贝',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 428 => \n array (\n 'id' => 433,\n 'cid' => 42,\n 'name' => '意婴堡',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 429 => \n array (\n 'id' => 434,\n 'cid' => 42,\n 'name' => '谷斐尔 GOPHER',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 430 => \n array (\n 'id' => 435,\n 'cid' => 42,\n 'name' => '爱可婴',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 431 => \n array (\n 'id' => 436,\n 'cid' => 42,\n 'name' => '丽贝乐 Libero',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 432 => \n array (\n 'id' => 437,\n 'cid' => 42,\n 'name' => '乐儿宝 bobo',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n 433 => \n array (\n 'id' => 438,\n 'cid' => 42,\n 'name' => '哼哼兔&呵呵兔 HHTu',\n 'desc' => '&lt;p&gt;暂无&lt;br/&gt;&lt;/p&gt;',\n 'img' => 'default.jpg',\n 'status' => 1,\n ),\n ));\n \n \n }", "public function run() {\n \\DB::table('vehicle_types')->insert(array(\n [\n 'name' => 'Taxi',\n 'group' => NULL,\n 'description' => 'Does not belong to any group'\n ],\n [\n 'name' => 'Matatu',\n 'group' => 'Matatu Sacco',\n 'description' => ''\n ],\n [\n 'name' => 'Bus',\n 'group' => 'Bus Company',\n 'description' => ''\n ],\n [\n 'name' => 'Taxi',\n 'group' => 'Taxi Company',\n 'description' => ''\n ],\n [\n 'name' => 'Company vehicle',\n 'group' => 'Company vehicle',\n 'description' => ''\n ],\n [\n 'name' => 'Tour van',\n 'group' => 'Tour Company',\n 'description' => ''\n ]\n ));\n }", "public function run()\n {\n DB::table( 'product_types' )->insert( [\n 'type_name' => 'Delivery'\n ]);\n DB::table( 'product_types' )->insert( [\n 'type_name' => 'Normal'\n ]);\n }", "function convert_platform_for_db($platform_array) \n\t{\t$ret = \"\";\n\t\t$platform_compare_arr = array(\"pc\" => \"0\",\n\t\t\t\t\t\t\t\t\t\t\t\"playstation 4\" => \"0\",\n\t\t\t\t\t\t\t\t\t\t\t\"xbox one\" => \"0\",\n\t\t\t\t\t\t\t\t\t\t\t\"playstation 3\" => \"0\",\n\t\t\t\t\t\t\t\t\t\t\t\"xbox 360\" => \"0\",\n\t\t\t\t\t\t\t\t\t\t\t\"wii u\" => \"0\",\n\t\t\t\t\t\t\t\t\t\t\t\"wii\" => \"0\",\n\t\t\t\t\t\t\t\t\t\t\t\"nintendo ds\" => \"0\",\n\t\t\t\t\t\t\t\t\t\t\t\"nintendo 3ds\" => \"0\",\n\t\t\t\t\t\t\t\t\t\t\t\"playstation vita\" => \"0\");\n\t\t\n\t\t// loop through each platform amazon returned\n\t\t// then through each platform we're cataloguing.\n\t\t// if its offered, set value to 1 for true\n\t\tforeach ($platform_array as $amazon_plat)\n\t\t{\t// put & in front of val so when we change value, it changes\n\t\t\t// it in the array itself\n\t\t\tforeach ($platform_compare_arr as $comparison_plat => &$val)\n\t\t\t{\t// if equal, set val to STRING value of 1 so it can be\n\t\t\t\t// concatenated later in function\n\t\t\t\tif (strcmp(strtolower($amazon_plat), $comparison_plat) == 0)\n\t\t\t\t\t$val = \"1\";\n\t\t\t}\n\t\t}\n\t\n\t\t// loop through array and concatenate values to a blank string\n\t\t// to build string \n\t\tforeach ($platform_compare_arr as $comparison_plat => $val)\n\t\t\t$ret = $ret . $val;\n\t\t\t\n\t\t// test\n\t\t// echo $ret;\n\t\t\n\t\t// after building string up, convert it to decimal number\n\t\t// for db storage and return it\n\t\t$ret = bindec($ret);\n\t\t\n\t\treturn $ret;\n\t}", "protected function validatePlatform(AbstractPlatform $platform): void\n {\n $platformName = $platform->getName();\n\n if (!in_array($platformName, $this->getPlatforms())) {\n throw new UnsupportedPlatformException(\n sprintf('DBAL platform \"%s\" is not currently supported.', $platformName)\n );\n }\n }", "private function newPostTable () {\n\t\t$query = \n\t\t\t\"CREATE TABLE IF NOT EXISTS a2_posts (hostname VARCHAR(100), url VARCHAR(100), date VARCHAR(20), image VARCHAR(100), text VARCHAR(100), PRIMARY KEY (url))\";\n\t\t$this->sendQuery($query);\n\t}", "public function run()\n {\n $companyTypes = [\n ['id' => 1, 'list_entity_name' => 'Government', 'list_group_id' => 4, 'sequence_no' => 1],\n ['id' => 2, 'list_entity_name' => 'Private Limited', 'list_group_id' => 4, 'sequence_no' => 2],\n ['id' => 3, 'list_entity_name' => 'Public Limited', 'list_group_id' => 4, 'sequence_no' => 3],\n ];\n\n DB::table('ri_list_entities')->insert($companyTypes);\n }", "public function testGetPlatformLike(): void\n {\n $model = OsVersion::load([\n \"platform_like\" => \"platform_like\",\n ], $this->container);\n\n $this->assertSame(\"platform_like\", $model->getPlatformLike());\n }", "public function run()\n {\n\n DB::table('menus')->insert([\n ['name' => '', 'link' => '/', 'icon' => 'home', 'loai_san_pham_id' => null],\n ['name' => 'SSD', 'link' => '/san-pham/ssd', 'icon' => 'hdd', 'loai_san_pham_id' => SanPhamTableSeeder::PRODUCT_TYPE_IDS['ssd']],\n ['name' => 'USB', 'link' => '/san-pham/usb', 'icon' => 'usb', 'loai_san_pham_id' => SanPhamTableSeeder::PRODUCT_TYPE_IDS['usb']],\n ['name' => 'Headphone', 'link' => '/san-pham/headphone', 'icon' => 'headphones', 'loai_san_pham_id' => SanPhamTableSeeder::PRODUCT_TYPE_IDS['headphone']],\n ['name' => 'Bàn phím', 'link' => '/san-pham/ban-phim', 'icon' => 'keyboard', 'loai_san_pham_id' => SanPhamTableSeeder::PRODUCT_TYPE_IDS['keyboard']],\n ['name' => 'Tai nghe', 'link' => '/san-pham/tai-nghe', 'icon' => 'headphones', 'loai_san_pham_id' => SanPhamTableSeeder::PRODUCT_TYPE_IDS['phone']],\n ['name' => 'RAM', 'link' => '/san-pham/ram', 'icon' => 'microchip', 'loai_san_pham_id' =>SanPhamTableSeeder::PRODUCT_TYPE_IDS['ram']],\n ['name' => 'Chuột', 'link' => '/san-pham/chuot', 'icon' => 'headphones', 'loai_san_pham_id' => SanPhamTableSeeder::PRODUCT_TYPE_IDS['mouse']],\n ]);\n }", "public function __construct($platform, $version)\n {\n // $this->zone = $zone;\n $this->platform = $platform;\n $this->version = $version;\n }", "public function run()\n {\n \t$types = [\n \t\t['name' => \"Física\"],\n \t\t['name' => \"Virtual\"],\n \t\t['name' => \"Sala de juntas\"],\n \t\t['name' => \"Sala de conferencias\"]\n \t];\n\n DB::table('office_types')->insert($types);\n }" ]
[ "0.6781279", "0.6237506", "0.61536443", "0.61416095", "0.5819242", "0.57513803", "0.5591295", "0.55719024", "0.5549124", "0.547929", "0.54428923", "0.5411943", "0.5411208", "0.5312246", "0.5304847", "0.5259077", "0.52011544", "0.5195466", "0.5183472", "0.5159935", "0.5075913", "0.50739706", "0.5059458", "0.50196266", "0.4983365", "0.49793226", "0.49612242", "0.49563268", "0.49482796", "0.4945801", "0.49381045", "0.49252963", "0.492496", "0.49008355", "0.4898444", "0.48927283", "0.48790798", "0.48745558", "0.48741", "0.4873326", "0.4849411", "0.48332006", "0.48085123", "0.47886088", "0.4786238", "0.47736713", "0.4773267", "0.476851", "0.4762134", "0.47467607", "0.47375834", "0.47368664", "0.47299388", "0.4719753", "0.47195244", "0.47094065", "0.47038904", "0.47038832", "0.46905413", "0.4688848", "0.4686821", "0.46857944", "0.46852073", "0.4678628", "0.4674151", "0.4672057", "0.46683246", "0.46617448", "0.4658864", "0.46569902", "0.4649829", "0.46488732", "0.46449605", "0.46375516", "0.4636677", "0.46343282", "0.46309063", "0.46232864", "0.46229565", "0.4618667", "0.46179947", "0.461259", "0.46124175", "0.46068436", "0.46042344", "0.46026522", "0.46000108", "0.45944178", "0.45876378", "0.45836422", "0.4581056", "0.4579999", "0.45717973", "0.45699736", "0.4563327", "0.45585302", "0.4555541", "0.455275", "0.45443103", "0.45423967" ]
0.5674223
6
Retrieves the user by the current session
public static function CurrentSiteUser() { if (!self::$CurrentSiteUser) { if ($UserHash = Cookie::get(self::Config()->get('cookie_name'))) self::$CurrentSiteUser = self::get()->filter('Active',1)->filter("UserHash",$UserHash)->First(); } return self::$CurrentSiteUser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_user() {\n\t\treturn ($this->logged_in()) ? $this->session->get($this->config['session_key'], null) : null;\n\t}", "function user()\n {\n return isset($_SESSION['user']) ? \\Models\\User::find($_SESSION['user']) : null;\n }", "public static function user(){\n\t\treturn self::session()->user();\n\t}", "public function getUser()\n {\n return Session::get(self::USER);\n }", "public function getCurrentUser(){\n return $_SESSION['user'];\n }", "static function getCurrentUser()\r\n {\r\n return self::getSingleUser('id', $_SESSION[\"user_id\"]);\r\n }", "public static function getUser() \n {\n return $_SESSION['username'];\n }", "public static function getUser() {\n return session(\"auth_user\", null);\n }", "public function getUser() {\n\t\treturn $this->Session->read('UserAuth');\n\t}", "public function getCurrentUser()\n {\n $this->validateUser();\n\n if ($this->session->has(\"user\")) {\n return $this->session->get(\"user\");\n }\n }", "public function get_user()\n {\n Session::_start();\n return (object) Session::_get(\"user\");\n\n }", "public function user()\n\t{\n\t\tif (is_null($this->user) and $this->session->has(static::$key))\n\t\t{\n\t\t\t$this->user = call_user_func(Config::get('auth.by_id'), $this->session->get(static::$key));\n\t\t}\n\n\t\treturn $this->user;\n\t}", "public static function getCurrentUser(){\r\n\t\treturn self::isLoggedIn() == true ? User::getUserById($_SESSION[\"id\"]) : null;\r\n\t}", "public static function get_session_user() \n {\n return @$_SESSION['_user'];\n }", "public static function getUser() {\n return isset($_SESSION[Security::SESSION_USER]) ? $_SESSION[Security::SESSION_USER] : NULL;\n }", "public static function getUser()\n\t{\n\t\tif(isset($_SESSION['user_id'])){\n\t\t\t\n\t\t\treturn User::findByID($_SESSION['user_id']);\n\t\t\t\n\t\t}else{\n\t\t\n\t\t\treturn static::loginFromRememberCookie();\n\t\t\n\t\t}\n\t}", "public function getUser() {\n $user = $this->getSessionUser();\n\n return $user;\n }", "function get_user()\n{\n if (!Session::has(\"user\")) {\n return null;\n }\n\n return Session::get(\"user\");\n}", "static function getUser()\n {\n return isset($_SESSION['user']) ? UserQuery::create()->findOneById($_SESSION['user']) : false;\n }", "public function getUser() {\n if (!empty($_SESSION['user'])) {\n return $_SESSION['user'];\n } else {\n return false;\n }\n }", "public function get_user()\n\t{\n\t\tif ($this->logged_in())\n\t\t{\n\t\t\treturn $this->_session->get($this->_config['session_key']);\n\t\t}\n\n\t\treturn FALSE;\n\t}", "private static function getFromSession()\n {\n if (empty($_SESSION['current_user'])) {\n // No user in session, create one.\n $entityClassName = static::ENTITIES_CLASS_NAME;\n $user = new $entityClassName(array(\n 'source' => 'cookie',\n ));\n self::setCurrent($user);\n } else {\n Logger::get()->debug('Found user in session.');\n // Regenerate session ID every SESSION_DURATION minutes.\n if (time() > ($_SESSION['timestamp'] + + self::SESSION_DURATION)) {\n Logger::get()->debug('Regenerated session ID.');\n session_regenerate_id();\n }\n }\n\n return $_SESSION['current_user'];\n }", "public function getLoggedInUser() {\n return $this->_user->getLoggedInUser();\n }", "public function get_user() {\n\t\treturn $this->user;\n\t}", "public function get_user() {\r\n\t\treturn ($this->user);\r\n\t}", "public function getLoggedInUser() {\n\t\treturn elgg_get_logged_in_user_entity();\n\t}", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function getUser()\n {\n return $this->get(self::_USER);\n }", "public function user() {\n\t\tif ( ! is_null($this->user)) return $this->user;\n\t\treturn $this->user = $this->retrieve($this->token);\n\t}", "public static function getUser() {\n\t\t\tif(isset($_SESSION['user']))\n\t\t\t\t$user = $_SESSION['user'];\n\t\t\telse\n\t\t\t\t$user = new User();\n\t\t\treturn $user;\n\t\t}", "public function getLoggedUser() {\n\t\t$session = $this->getUserSession();\n\t\treturn ($this->isAdmin()) ? $session->getUser() : $session->getCustomer();\n\t}", "public static function getUser()\n {\n return self::getInstance()->_getUser();\n }", "static function getUser(){\n return $_SESSION[\"APPWEB\"][\"USERNAME\"];\n }", "private function getUser()\n {\n return $this->user->getUser();\n }", "protected function _current_user()\n {\n $user_id = $this->session->userdata(\"user_id\");\n \n if($user_id)\n {\n $this->load->model('user_model');\n $this->current_user = $this->user_model->getOne('' , ['user.user_id' => $user_id]);\n }\n \n return $this->current_user;\n }", "public function getCurrentUser();", "private function getLoggedInUser()\n {\n if (null !== $token = $this->securityContext->getToken()) {\n return $token->getUser();\n }\n\n return null;\n }", "private function currentUser() {\n return Auth::guard(session('guard'))->user();\n }", "function getUserFromToken() {\n\t\treturn $this->_storage->loadUserFromToken();\n\t}", "public function getAuthenticatedUser()\n {\n return $this->getUnsplashClient()->sendRequest('GET', 'me');\n }", "function getUser() {\n return user_load($this->uid);\n }", "public static function getUser(){\n\n//\t$model=new Model();\n//\t$row=$model->where('id',session('user')['id']);\n\treturn session('user')['id'];\n\n//\treturn \"\";\n}", "public function getUser()\n {\n $this->getParam('user');\n }", "public function getLoggedInUser()\n {\n $securityContext = $this->container->get('security.context');\n $consultant = $securityContext->getToken()->getUser();\n return $consultant;\n }", "public static function getCurrentUser()\n {\n /**\n * @var \\ZCMS\\Core\\ZSession $session\n */\n $session = Di::getDefault()->get('session');\n return $session->get('auth');\n }", "public function getUserSession(){\n return $this->getParam('user-data', 'auth');\n }", "public static function getLoggedUser(){\n self::session_start();\n if(!isset($_SESSION['usuario'])) return false;\n return $_SESSION['usuario'];\n }", "public function getUserByLoginSession()\n {\n $this->userModule->user = $this->userModule->getUser($_SESSION['userLogin']['id']);\n }", "public function fetchUser() {\n return $this->QueryAPI(\"current_user\");\n }", "function getCurrentUser() {\n return getUser($_SESSION[\"username\"]);\n}", "function user()\n\t{\n\t\t$ci =& get_instance();\n\t\t$user = $ci->auth_model->get_logged_user();\n\t\tif (empty($user)) {\n\t\t\t$ci->auth_model->logout();\n\t\t} else {\n\t\t\treturn $user;\n\t\t}\n\t}", "function user()\n\t{\n\t\t$ci =& get_instance();\n\t\t$user = $ci->auth_model->get_logged_user();\n\t\tif (empty($user)) {\n\t\t\t$ci->auth_model->logout();\n\t\t} else {\n\t\t\treturn $user;\n\t\t}\n\t}", "public function getCurrentUser() {\n if (!property_exists($this, 'currentUser')) {\n $this->currentUser = null;\n $uid = isset($_SESSION['uid']) ? $_SESSION['uid'] : false;\n if ($uid) {\n $this->currentUser = User::find($uid);\n }\n }\n return $this->currentUser;\n }", "function getLoggedInUser()\n{\n\tif(isLoggedIn()) {\n\t\treturn auth()->user();\n\t}\n\treturn null;\n}", "public function getUser ()\r\n\t{\r\n\t\treturn $this->user;\r\n\t}", "public function user()\n {\n $this->checkTimeouts();\n\n if (! $this->session->has('socialite_token')) return null;\n if ($this->session->has('google_guard_user')) return $this->session->get('google_guard_user');\n\n try {\n $user = Socialite::driver('google')->userFromToken($this->session->get('socialite_token'));\n } catch (\\Exception $e) {\n }\n\n if (! isset($user) || ! $user) return $this->flushSession();\n\n $userModel = $this->hydrateUserModel($user);\n $this->session->put('google_guard_user', $userModel);\n\n return $userModel;\n }", "public function get_user()\n {\n\n $user = $this->_session->get($this->_config['session_key']);\n\n // Check for \"remembered\" login\n if (!$user) {\n $user = $this->auto_login();\n }\n // refresh user session regularly to mitigate session fixation attacks\n\n if( ! $this->refresh_session()){\n return FALSE;\n }\n\n return $user;\n }", "public function findLoggedUser()\n {\n\t\t$auth = Zend_Auth::getInstance();\n\t\t$user = null;\n\n\t\tif($auth->hasIdentity()) {\n\t\t\t$user = $auth->getIdentity();\n\t\t}\n\n return $user;\n }", "public function getUser() {\n\t\t return $_SESSION['userId'] ?: false;\n\t\t}", "public static function getCurrentUser();", "public function get_current_user(){\n $username = $this->session->userdata['logged_in']['username'];\n return $user_id = $this->research_model->current_user($username);\n }", "public static function getLoggedUser()\n {\n $user = null;\n if(isset($_SESSION['loggedUser']))\n {\n $user = unserialize($_SESSION['loggedUser']);\n }\n return $user;\n }", "public static function getCurrentUser()\n {\n if (isset($_SESSION['user'])) {\n return $_SESSION['user'];\n } else {\n return new User();\n }\n }", "public function getCurrentUser(){\n $currentUser = $_SESSION['userdata'];\n\n // Sets the user object\n $this->setUser($currentUser->control);\n\n }", "public function getUser()\n {\n if(!$this->user)\n $this->user = User::getActive();\n\n return $this->user;\n }", "public function user()\n {\n if (!$this->user) {\n $identifier = $this->getToken();\n $this->user = $this->provider->retrieveByToken($identifier, '');\n }\n return $this->user;\n }", "function getuser($aa_inst_id)\n {\n $session_key=generateSessionKey($aa_inst_id);\n $session=new Zend_Session_Namespace($session_key);\n\n if(!isset($session->facebook) || !isset($session->facebook['user']) )\n $user=false;\n else\n $user=$session->facebook['user'];\n\n return $user;\n }", "public static function currentUser()\n {\n self::startSession();\n return self::isLoggedIn() ? $_SESSION['user'] :\n new User(array('role' => 'unregistered'));\n }", "static function currentUser() {\n $cookie = new CookieSigner(Config::app()['BASE_KEY']);\n\n if (isset($_SESSION['userId']) && $userId = $_SESSION['userId']) {\n $user = new User();\n return $user->findOne($userId);\n } else if ($userId = $cookie->get('userId')) {\n $user = new User();\n $user->findOne($userId);\n\n if ($user && $user->isAuthenticated('remember', $cookie->get('rememberToken'))) {\n self::logIn($user);\n return $user;\n }\n }\n return null;\n }", "public function getCurrentUser()\n\t{\n\t\treturn $this->users->getCurrentUser();\n\t}", "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = Client::findByUsername($this->username);\n\n /** added login by email**/\n if($this->_user === false ){\n $this->_user = Client::findByEmail($this->username);\n }\n }\n\n return $this->_user;\n }", "private function getAuthenticatedUser()\r\n {\r\n $tokenStorage = $this->container->get('security.token_storage');\r\n return $tokenStorage->getToken()->getUser();\r\n }", "private function getAuthenticatedUser()\r\n {\r\n $tokenStorage = $this->container->get('security.token_storage');\r\n return $tokenStorage->getToken()->getUser();\r\n }", "public function getUser() {\n\t\treturn $this->api->getUserById($this->getUserId());\n\t}", "public function getLoggedIn()\n\t{\n\t\treturn auth()->user();\n\t}", "public function getUserFromSession(ICrugeSession $session)\r\n {\r\n return CrugeFactory::get()->getSessionUser($session);\r\n }", "function getAuthenticatedUser()\n {\n if (isset($_SESSION['MFW_authenticated_user'])) {\n return $_SESSION['MFW_authenticated_user'];\n }\n\n return null;\n }", "public function GetCurrentUser()\n {\n return $this->userManager->getCurrent();\n }", "function get_user () {\n\t\treturn $this->user_id;\n\t}", "public function getUser() {\n // Check if user is logged in\n if ($this->isLoggedIn()) {\n // Get user id from session\n $userId = $_SESSION['user_id'];\n // Query database for user details\n $stmt = $this->_pdo->prepare(\"SELECT * FROM \".$this->_dbTable.\" WHERE \".$this->_dbFields[\"id\"].\" = :user_id\");\n $stmt->execute([\":user_id\" => $userId]);\n $user = $stmt->fetch(\\PDO::FETCH_ASSOC);\n // Return user details as associative array\n return $user;\n } else {\n // User is not logged in so return null\n return null;\n }\n }", "public static function user()\n {\n if (isset($_SESSION['LOGGED_IN_USER'])){\n return $username;\n }\n }", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getLoggedInUser()\n\t{\n\t\tif (!isset($this->loggedInUser)) {\n $this->loggedInUser = array();\n \n if ($this->getIsUserLoggedIn()) {\n // get the logged in user\n $this->loggedInUser = $this->getFamilyGraph()->api('me');\n }\n }\n \n return $this->loggedInUser;\n\t}", "public static function getCurrentUser() {\n return Users::model()->findByAttributes(array(\n // [NguyenPT]: TODO - Investigate should use 'username' or 'id'\n DomainConst::KEY_USERNAME => Yii::app()->user->id\n ));\n }", "public function user() {\n\t\tif (!Auth::check()) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn Auth::getUser();\n\t}", "public static function getLoggedUser()\r\n {\r\n self::session_start();\r\n if (!isset($_SESSION['user'])) return false;\r\n return $_SESSION['user'];\r\n }", "public function getUser() {\n\t\treturn $this->user;\n\t}", "public function getUser() {\n\t\treturn $this->user;\n\t}", "public function getUser()\n {\n return $this->getContext()->getUser();\n }", "protected function getUser()\n {\n return $this->user;\n }", "public function usuario() {\n return $_SESSION['usuario'];\n }", "function GetSessionUser()\n\t{\n\t\tif(isset($_SESSION['User']))\n\t\t{\n\t\t\t//https://stackoverflow.com/questions/44887880/store-object-in-php-session/44888019 For unseralize user object\n\t\t\treturn unserialize($_SESSION['User']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "function getLoggedUser() {\n $ses_user = $this->session->userdata('user');\n $this->load->model(\"usersmodel\");\n $user=$this->usersmodel->getUserFromId($ses_user->user_id);\n return $user;\n //var_dump($user);\n }" ]
[ "0.8372117", "0.81945497", "0.81532747", "0.80886275", "0.8054257", "0.8040325", "0.803288", "0.79943705", "0.7986771", "0.7906686", "0.787158", "0.7870797", "0.7854817", "0.78459084", "0.78327143", "0.78164387", "0.7805377", "0.7802102", "0.77871746", "0.77598315", "0.77350503", "0.77231354", "0.76251763", "0.757784", "0.75764495", "0.7565852", "0.75562835", "0.75562835", "0.75562835", "0.75562835", "0.75556004", "0.7545019", "0.75363743", "0.75357753", "0.7535491", "0.75259686", "0.75258154", "0.75253296", "0.7520156", "0.7513659", "0.7511058", "0.74909437", "0.7490148", "0.74757564", "0.7473558", "0.7469166", "0.7456848", "0.7446349", "0.7440096", "0.7440009", "0.74374664", "0.7433386", "0.74136424", "0.74136424", "0.74057275", "0.74003375", "0.73979366", "0.7389999", "0.73881274", "0.7384712", "0.7383062", "0.7378398", "0.7378049", "0.73726934", "0.73717904", "0.73700386", "0.7366486", "0.7354179", "0.7345091", "0.73438084", "0.7342105", "0.7336437", "0.733184", "0.7331429", "0.7331429", "0.7328724", "0.7326389", "0.73230267", "0.73109853", "0.7306481", "0.7297189", "0.72946656", "0.729067", "0.7289044", "0.7289044", "0.7289044", "0.7289044", "0.7289044", "0.7289044", "0.7289044", "0.72835743", "0.7283469", "0.72815716", "0.7277229", "0.7277093", "0.7277093", "0.727134", "0.72635925", "0.7263149", "0.7259262", "0.725837" ]
0.0
-1
Logs this user into a session
public function Login() { $this->extend('onBeforeLogin'); Cookie::set($this->Config()->get('cookie_name'),$this->UserHash,$this->Config()->get('cookie_lifetime')); $this->extend('onAfterLogin'); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loginUser() {\n self::$isLoggedIn = true;\n $this->session->setLoginSession(self::$storedUserId, self::$isLoggedIn);\n $this->session->setFlashMessage(1);\n }", "public static function loginBySession()\n\t{\n\t\tif (Sessions::get('loggedIn')) :\n\t\t\tAuth::redirectUser(Sessions::get('user/type'));\n\t\tendif;\n\t}", "public function login()\n\t{\n\t\t$mtg_login_failed = I18n::__('mtg_login_failed');\n\t\tR::selectDatabase('oxid');\n\t\t$sql = 'SELECT oxid, oxfname, oxlname FROM oxuser WHERE oxusername = ? AND oxactive = 1 AND oxpassword = MD5(CONCAT(?, UNHEX(oxpasssalt)))';\n\t\t$users = R::getAll($sql, array(\n\t\t\tFlight::request()->data->uname,\n\t\t\tFlight::request()->data->pw\n\t\t));\n\t\tR::selectDatabase('default');//before doing session stuff we have to return to db\n\t\tif ( ! empty($users) && count($users) == 1) {\n\t\t\t$_SESSION['oxuser'] = array(\n\t\t\t\t'id' => $users[0]['oxid'],\n\t\t\t\t'name' => $users[0]['oxfname'].' '.$users[0]['oxlname']\n\t\t\t);\n\t\t} else {\n\t\t\t$_SESSION['msg'] = $mtg_login_failed;\n\t\t}\n\t\t$this->redirect(Flight::request()->data->goto, true);\n\t}", "private function loginWithSessionData()\n { \n $this->user_name = $_SESSION['user_name'];\n $this->user_email = $_SESSION['user_email'];\n\n // set logged in status to true, because we just checked for this:\n //if(!empty($_SESSION['user_name']) && ($_SESSION['user_logged_in'] == 1)\n // when we called this method (in the constructor)\n $this->user_is_logged_in = true;\n \n if($_SESSION['user_privileges'] == 1)\n $this->user_admin = true;\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 }", "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 signInAction()\n {\n $userData = $this->manager->findOneBy(['username' => $this->httpParameters['login']]);\n\n //If no user were found, redirects\n if(empty($userData))\n {\n $this->response->redirect('/auth',HttpResponse::WRONG_LOGIN);\n }\n\n //Instantiates the user\n $user = new User($userData);\n\n //Checks if typed password matches user's password\n if($this->passwordMatch($this->httpParameters['loginPassword'],$user,'/auth'))\n {\n //Sets the user instance as a the new $_SESSION['user']\n $_SESSION['user'] = $user;\n\n $this->response->redirect('/admin');\n }\n }", "public function login() {\n $this->db->sql = 'SELECT * FROM '.$this->db->dbTbl['users'].' WHERE username = :username LIMIT 1';\n\n $user = $this->db->fetch(array(\n ':username' => $this->getData('un')\n ));\n\n if($user['hash'] === $this->hashPw($user['salt'], $this->getData('pw'))) {\n $this->sessionId = md5($user['id']);\n $_SESSION['user'] = $user['username'];\n $_SESSION['valid'] = true;\n $this->output = array(\n 'success' => true,\n 'sKey' => $this->sessionId\n );\n } else {\n $this->logout();\n $this->output = array(\n 'success' => false,\n 'key' => 'WfzBq'\n );\n }\n\n $this->renderOutput();\n }", "private function logInSUUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(1258);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "public function login(){\n\t\t$this->user = $this->user->checkCredentials();\n\t\t$this->user = array_pop($this->user);\n\t\tif($this->user) {\n\t\t\t$_SESSION['id'] = $this->user['id'];\n\t\t\t$_SESSION['name'] = $this->user['name'];\n\t\t\t$_SESSION['admin'] = $this->user['admin'];\n\t\t\t$this->isAdmin();\n\t \t\theader('location: ../view/home.php');\n\t \t\texit;\n\t \t}\n\t\t$dados = array('msg' => 'Usuário ou senha incorreto!', 'type' => parent::$error);\n\t\t$_SESSION['data'] = $dados;\n\t\theader('location: ../view/login.php');\n \t\texit;\n\t}", "public function log_login()\n {\n if (!$this->config->get('log_logins')) {\n return;\n }\n\n $user_name = $this->get_user_name();\n $user_id = $this->get_user_id();\n\n if (!$user_id) {\n return;\n }\n\n self::write_log('userlogins',\n sprintf('Successful login for %s (ID: %d) from %s in session %s',\n $user_name, $user_id, self::remote_ip(), session_id()));\n }", "public function login() {\r\n\r\n // signal any observers that the user has logged in\r\n $this->setState(\"login\");\r\n }", "private function logInSUUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(1646);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $this->user->setOpRoles('cclavoisier01.in2p3.fr');\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "protected function log_user_in($user)\n\t{\n\t\t$_SESSION['email'] = $user->email;\n\t\t$_SESSION['user_id'] = $user->id;\n\t\t$_SESSION['role_id'] = $user->role_id;\n\t\t\n\t\tunset($_SESSION['token']);\n\t}", "private function sessionLogin() {\r\n $this->uid = $this->sess->getUid();\r\n $this->email = $this->sess->getEmail();\r\n $this->fname = $this->sess->getFname();\r\n $this->lname = $this->sess->getLname();\r\n $this->isadmin = $this->sess->isAdmin();\r\n }", "private function logInSimpleUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(41);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "public function login($user)\n {\n if($user)\n {\n $this->user_id =$_SESSION['user_id'] = $user->user_id;\n $this->username=$_SESSION['username'] = $user->username;\n $this->user_status=$_SESSION['user_status']= $user->user_status;\n $this->logged_in=TRUE;\n }\n }", "public function login($user){\n if($user){\n $this->user_id = $_SESSION['userId'] = $user->userId;\n $this->logged_in = TRUE;\n }\n \n }", "public function login($user){\n if($user){\n $this->user_id = $_SESSION['user_id'] = $user->id;\n $this->logged_in = true;\n }\n }", "public function loginAction()\n {\n $data = $this->getRequestData();\n if ($this->getDeviceSession(false)) {\n $this->setErrorResponse('Your device is already running a session. Please logout first.');\n }\n $session = Workapp_Session::login($data['username'], $data['password']);\n if (!$session) {\n $this->setErrorResponse('No user with such username and password');\n }\n $session->registerAction($_SERVER['REMOTE_ADDR']);\n $this->_helper->json(array('session_uid' => $session->getSessionUid()));\n }", "public function login($user) \n {\n $_SESSION['user_id'] = $user['id'];\n $_SESSION['is_logged_in'] = true;\n $_SESSION['time_logged_in'] = time();\n }", "public function login()\n {\n if ($this->UserManager_model->verifUser($_POST['user_id'], $_POST['user_password'])) {\n\n $arrUser = $this->UserManager_model->getUserByIdentifier($_POST['user_id']);\n $data = array();\n $objUser = new UserClass_model;\n $objUser->hydrate($arrUser);\n $data['objUser'] = $objUser;\n\n $user = array(\n 'user_id' => $objUser->getId(),\n 'user_pseudo' => $objUser->getPseudo(),\n 'user_img' => $objUser->getImg(),\n 'user_role' => $objUser->getRole(),\n );\n\n $this->session->set_userdata($user);\n redirect('/');\n } else {\n $this->signin(true);\n }\n }", "public function login (){\n\t\t$user = $this->get_by(array(\n\t\t\t'email' => $this->input->post('email'),\n\t\t\t'password' => $this->hash($this->input->post('password')),\n\t\t\t), TRUE);\n\t\t\n\t\tif (count($user)) {\n\t\t\t// Log in user\n\t\t\t$data = array(\n\t\t\t\t'username' => $user->username,\n\t\t\t\t'email' => $user->email,\n\t\t\t\t'id' => $user->id,\n\t\t\t\t'loggedin' => TRUE,\n\t\t\t);\n\t\t\t$this->session->set_userdata($data);\n\t\t}\n\t\t}", "protected function login( )\r\n {\r\n $this->sendData( 'USER', $this->_nick, $this->_nick . ' ' . $this->_user . ' : ' . $this->_realName );\r\n \r\n $this->sendData( 'NICK', $this->_nick );\r\n \r\n $this->_loggedOn = true;\r\n }", "static function logIn($user) {\n if (isset($user)) {\n session_start();\n $_SESSION['userId'] = $user->id;\n }\n }", "public function login()\n {\n if (!isset($_SESSION)) {\n session_start();\n }\n $_SESSION['email'] = $this->email;\n header('Location: index.php');\n }", "public function login() {\n\t\t$this -> load -> model('models_events254/m_clients');\n\t\t$this -> m_clients -> getUser();\n\t\tif ($this -> m_clients -> isUser == 'true') {\n\n\t\t\n\t\t\t/*create session data*/\n\t\t\t$newdata = array('email' => $this -> m_clients -> email, 'logged_in' => TRUE,'id' => $this ->m_clients->id);\n\t\t\t$this -> session -> set_userdata($newdata);\n\n\t\t\tredirect(base_url() . 'C_front/index', 'refresh');\n\t\n\n\t\t} else {\n\t\t\t#use an ajax request and not a whole refresh\n\t\t\t\n\t\t\t$data['message']=\"User Not Found\";\n\t\t\t$data['messageType']=\"error\";\n\t\t\t\n\t\t\t$this->load->view('login',$data);\n\t\t}\n\t}", "public static function LoggedIn() {\n\t\tif (empty($_SESSION['current_user'])) {\n\t\t\tnotfound();\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() {\r\n\t\t\r\n\t\t$back = $this->hybrid->get_back_url();\r\n\t\t$user_profile = $this->hybrid->auth();\r\n\t\t\r\n\t\t$email = $user_profile->emailVerified;\r\n\t\tif(!$email)\r\n\t\t\t$email = $user_profile->email;\r\n\t\t\r\n\t\tif(!$email)\r\n\t\t\t$this->hybrid->throw_error($this->ts(\"You don't have any email address associated with this account\"));\r\n\t\t\r\n\t\t/* check if user exists */\r\n\t\t$user = current($this->a_session->user->get(array(\"email\" => $email)));\r\n\t\tif(!$user) {\r\n\t\t\t/* create user */\r\n\t\t\t$uid = $this->hybrid->add_user($email, $user_profile);\r\n\t\t\t$user = current($this->a_session->user->get(array(\"id\" => $uid)));\r\n\t\t\t\r\n\t\t\tif(!$user)\r\n\t\t\t\t$this->wf->display_error(500, $this->ts(\"Error creating your account\"), true);\r\n\t\t}\r\n\t\t\r\n\t\t/* login user */\r\n\t\t$sessid = $this->hybrid->generate_session_id();\r\n\t\t$update = array(\r\n\t\t\t\"session_id\" => $sessid,\r\n\t\t\t\"session_time\" => time(),\r\n\t\t\t\"session_time_auth\" => time()\r\n\t\t);\r\n\t\t$this->a_session->user->modify($update, (int)$user[\"id\"]);\r\n\t\t$this->a_session->setcookie(\r\n\t\t\t$this->a_session->session_var,\r\n\t\t\t$sessid,\r\n\t\t\ttime() + $this->a_session->session_timeout\r\n\t\t);\r\n\t\t\r\n\t\t/* save hybridauth session */\r\n\t\t$this->a_session->check_session();\r\n\t\t$this->hybrid->save();\r\n\t\t\r\n\t\t/* redirect */\r\n\t\t$redirect_url = $this->wf->linker('/');\r\n\t\tif(isset($uid))\r\n\t\t\t$redirect_url = $this->wf->linker('/account/secure');\r\n\t\t$redirect_url = $back ? $back : $redirect_url;\r\n\t\t$this->wf->redirector($redirect_url);\r\n\t}", "public function Login(AuthUser $user) \n {\n $_SESSION[\"valid_login\"] = true;\n $_SESSION[\"user_id\"] = $user->id;\n }", "private function logInVOUser()\n {\n $this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(44);\n\n $session = $this->client->getContainer()->get('session');\n\n $firewall = 'secured_area';\n $attributes = [];\n\n $this->user->setOpRoles('cclavoisier01.in2p3.fr');\n\n\n $token = new SamlSpToken(array('ROLE_USER'),$firewall, $attributes, $this->user);\n\n\n $session->set('_security_'.$firewall, serialize($token));\n $this->client->getContainer()->get('security.token_storage')->setToken($token);\n $session->save();\n\n $cookie = new Cookie($session->getName(), $session->getId());\n $this->client->getCookieJar()->set($cookie);\n }", "function login() {\n\t\t//$salt = Configure::read('Security.salt');\n\t\t//echo md5('password'.$salt);\n\n\t\t// redirect user if already logged in\n\t\tif( $this->Session->check('User') ) {\n\t\t\t$this->redirect(array('controller'=>'dashboard','action'=>'index','admin'=>true));\n\t\t}\n\n\t\tif(!empty($this->data)) {\n\t\t\t// set the form data to enable validation\n\t\t\t$this->User->set( $this->data );\n\t\t\t// see if the data validates\n\t\t\tif($this->User->validates()) {\n\t\t\t\t// check user is valid\n\t\t\t\t$result = $this->User->check_user_data($this->data);\n\n\t\t\t\tif( $result !== FALSE ) {\n\t\t\t\t\t// update login time\n\t\t\t\t\t$this->User->id = $result['User']['id'];\n\t\t\t\t\t$this->User->saveField('last_login',date(\"Y-m-d H:i:s\"));\n\t\t\t\t\t// save to session\n\t\t\t\t\t$this->Session->write('User',$result);\n\t\t\t\t\t//$this->Session->setFlash('You have successfully logged in');\n\t\t\t\t\t$this->redirect(array('controller'=>'dashboard','action'=>'index','admin'=>true));\n\t\t\t\t} else {\n\t\t\t\t\t$this->Session->setFlash('Either your Username of Password is incorrect');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function login()\n {\n if(isset($_SESSION['user']))\n Url::redirectTo('/profile/' . $_SESSION['user']);\n\n $data = array();\n if(isset($_SESSION['error']) && $_SESSION['error']['errored'])\n {\n $data['errored'] = $_SESSION['error']['errored'];\n $data['emessage'] = $_SESSION['emessage'];\n $_SESSION['error']['errored'] = false;\n }\n if(isset($_SESSION['message']))\n {\n $data['message'] = $_SESSION['message'];\n unset($_SESSION['message']);\n }\n View::render('profile/login', $data);\n }", "public function login($user){\r\n\t\t\t// database should find user based on username/password\r\n\t\t\tif($user){\r\n\t\t\t\t$this->user_id = $_SESSION['user_id'] = $user->id;\r\n\t\t\t\t$this->logged_in = true ;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "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 static function loginImpl($user)\n {\n tools::destroySession();\n //Get new Session\n session_start();\n\n //Set loggedUser\n $_SESSION['loggedUser'] = serialize($user);\n $_SESSION[\"logged\"] = true;\n }", "public function login()\n\t{\n\t\t//Compute the hash code of the password submited by user\n\t\t$user_password_hash = $this->passwordEncrypt($this->user_info['user_password']);\n\t\t\n\t\t//Do datebase query to get the hash code of the password\n\t\t$db = BFL_Database :: getInstance();\n\t\t$stmt = $db->factory('select `user_id`,`user_password` from '.DB_TABLE_USER.' WHERE `user_name` = :user_name');\n\t\t$stmt->bindParam(':user_name', $this->user_info['user_name']);\n\t\t$stmt->execute();\n\t\t$rs = $stmt->fetch();\n\t\tif (empty($rs))\n\t\t\tthrow new MDL_Exception_User_Passport('user_name');\n\t\t\n\t\tif ($rs['user_password'] != $user_password_hash)\n\t\t\tthrow new MDL_Exception_User_Passport('user_password');\n\n\t\t//Set user session\n\t\t$auth = BFL_ACL :: getInstance();\n\t\t$auth->setUserID($rs['user_id']);\n\t}", "public function loginUser()\n {\n $request = new Request();\n\n $email = $request->input('email');\n $password = $request->input('password');\n\n // Check email\n if (!$email) {\n $this->showLoginForm(['Please enter email']);\n }\n // Check password\n if (!$password) {\n $this->showLoginForm(['Please enter password']);\n }\n\n // Check user exist and then password\n $user = $this->getUser($email);\n $password = md5($password);\n if (!$user || $password !== $user['password']) {\n $this->showLoginForm(['Error on login']);\n }\n\n // Save login details to cookies\n if (!defined('APP_USERS_COOKIES_EMAIL')\n || !defined('APP_USERS_COOKIES_PASSWORD')) {\n $this->showLoginForm(['Error on login']);\n }\n setcookie(APP_USERS_COOKIES_EMAIL, $email);\n setcookie(APP_USERS_COOKIES_PASSWORD, $password);\n\n // Redirect to endpoint\n header(\"Location: \" . self::ENDPOINTS['success_login']);\n }", "public function login()\n {\n if ($this->getCurrentUser()->get('id')) {\n $this->redirect($this->Auth->redirectUrl());\n }\n\n if ($user = $this->Auth->identify()) {\n $this->Auth->setUser($user);\n\n // set cookie\n if (!empty($this->getRequest()->getData('remember_me'))) {\n if ($CookieAuth = $this->Auth->getAuthenticate('Lil.Cookie')) {\n $CookieAuth->createCookie($this->getRequest()->getData());\n }\n }\n } else {\n if ($this->getRequest()->is('post') || env('PHP_AUTH_USER')) {\n $this->Flash->error(__d('lil', 'Invalid username or password, try again'));\n }\n }\n\n if ($this->getCurrentUser()->get('id')) {\n $redirect = $this->Auth->redirectUrl();\n $event = new Event('Lil.Auth.afterLogin', $this->Auth, [$redirect]);\n $this->getEventManager()->dispatch($event);\n\n return $this->redirect($redirect);\n }\n }", "public function login() {\n if (isset($_SESSION['userid'])) {\n $this->redirect('?v=project&a=show');\n } else {\n $this->view->login();\n }\n }", "public static function session()\n {\n //Sjekker om en bruker er logget in\n if (isset($_SESSION['user'])) {\n //Hvis verifyUser() returnerer falskt er sessionene kapret\n if(!$_SESSION['user']->verifyUser()){\n unset($_SESSION['user']);\n $alert = new Alert(Alert::ERROR, \"Sessionen er kapret og du har blitt logget ut. Husk å bruke beskyttelse\");\n $alert->displayOnIndex();\n }\n }\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 logUser(){\r\n\t\t$email = $_POST['login_email'];\r\n\t\t$password = $_POST['login_password'];\r\n\r\n\t\t$sql = \"SELECT * FROM users where email = ? and password = ? \";\r\n\t\t$query = $this->db->prepare($sql);\r\n\t\t$query->execute([$email,$password]);\r\n\t\t//rezultat smestamo u promenljivu loggedUser i stavljamo samo fetch zzbog toga sto vraca jedan rezultat\r\n\r\n\t\t$loggedUser = $query->fetch(PDO::FETCH_OBJ);\r\n\r\n\t\tif ($loggedUser != NULL) {\r\n\t\t\t//dodeljujemo sesiji celog usera (OBJEKAT)\r\n\t\t\t$_SESSION['loggedUser'] = $loggedUser;\r\n\t\t\t//ovde dodeljujemo usera iz baze varijabli login_result!!!\r\n\t\t\t$this->login_result = $loggedUser;\r\n\t\t}\r\n\t}", "private function LogIn() : bool\n {\n\n //session::close();\n\n\n $not_specified_user_and_pass = empty($this->username) and empty($this->password);\n\n\n if($not_specified_user_and_pass)\n\n return false;\n\n\n $user = $this->user_details($this->username);\n\n\n $username_not_exists = !$user; //Not user\n\n\n if($username_not_exists)\n\n return false;\n\n\n\n $unrecognized_password = !$this->recognized_password();\n\n\n if($unrecognized_password)\n\n return false;\n\n\n $this->id = $user[\"id\"];\n\n return $this->set_session_key($user);\n\n\n\n }", "public function setUserToLoggedIn($result) {\n // this is dangerous and lazy but will be fine for the assignment.\n $_SESSION['is_logged_in'] = true;\n $_SESSION['user_id'] = $result->id;\n $_SESSION['username'] = $result->username;\n $_SESSION['membership'] = $result->membership;\n $_SESSION['avatar'] = $result->avatar;\n $_SESSION['created_at'] = $result->created_at;\n }", "function log_in($user) {\n session_regenerate_id();\n $_SESSION['user_id'] = $user['id'];\n $_SESSION['username'] = $user['username'];\n $_SESSION['email'] = $user['email'];\n return true;\n }", "public function login()\n {\n if(is_logged_in()) {\n redirect_to(url('thread/index'));\n }\n\n $user = new User;\n $page = Param::get('page_next', 'login');\n\n switch($page) {\n case 'login':\n break;\n\n case 'lobby':\n $user->username = Param::get('username');\n $user->password = Param::get('password');\n\n try {\n $user = $user->verify();\n $_SESSION['id'] = $user['id'];\n } catch (UserNotFoundException $e) {\n $page = 'login';\n }\n break;\n\n default:\n throw new UserNotFoundException(\"User not found\");\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }", "public function loginAction() {\n $user_session = new Container('user');\n $user_session->username = 'Andy0708';\n \n return $this->redirect()->toRoute('welcome');\n }", "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 echo $this->name . ' logged in';\n }", "function login()\n{\n\t$username = $this->Session->read('user');\n\tif ($username){\n\t$this->redirect('/inhabitants/');}\n\t\n\t$this->pageTitle = 'Login';\n\t\n\t$this->set('error', false);\n\t// jika form yg disubmit tidak kosong\n\tif ($this->data)\n\t{\n\t// jika username dan password cocok\n\t$results = $this->User->findByUsername($this->data['User']['username']);\n\t\tif ($results && $results['User']['password'] ==\n\t\tmd5($this->data['User']['password']))\n\t\t{\n\t\t\t$this->Session->write('user', $this->data['User']['username']);\n\t\t\t$this->Session->write('last_login', $results['User']['last_login']);\n\t\t\t$results['User']['last_login'] = date(\"Y-m-d H:i:s\");\n\t\t\t$this->User->save($results);\n\t\t\t// redirect\n\t\t\t$this->redirect('/users/');\n\t\t} else {\n\t\t\t$this->set('error', true);\n\t\t}\n\t}\n}", "public function login($user){\n if($user){\n $this->email=$user->email;\n\t\t\t$this->role=$user->role;\n $_SESSION['email']=$user->email;\n\t\t\t$_SESSION['role']=$user->role;\n\t\t\t$tepm = 'couple';\n\t\t\t$res=$_SESSION['role'];\n\t\t\tif($res == $tepm){\n\t\t\t\t$_SESSION['id']=$user->user_id;\n\t\t\t\t$this->id=$user->user_id;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$_SESSION['id']=$user->vendor_id;\n\t\t\t\t$this->id=$user->vendor_id;\n\t\t\t}\n $this->signed_in=true;\n }\n }", "public function login( )\n\t\t{\n\t\t\treturn $this->get_session();\n\t\t}", "public function user_session($data)\n {\n session_start();\n $_SESSION[\"id\"] = $data['id'];\n $_SESSION[\"username\"]\t= $data['username'];\n $_SESSION[\"isloggedin\"] = true;\n }", "public function login(&$objUser)\n\t\t{\n\t\t\tsession_regenerate_id(true);\n\t\t\t$_SESSION['id_admin'] = $objUser->id_usuario;\n\t\t\t$_SESSION['email_admin'] = $objUser->email;\n\t\t\t$_SESSION['user_lastactive_admin'] = time();\n\t\t\t$_SESSION['err'] = \"\";\n\t\t\t\n\t\t\t$this->data[\"logged\"] = true;\n\t\t\t\n\t\t\t//header(\"Location: \"._MSFW_PATH_);\n\t\t\t//exit();\n\t\t}", "public function action_login_as()\n {\n if (!$this->loginUserObj || !$this->loginUserObj->isRoleAdmin())\n {\n $this->request->redirect('/');\n }\n $user_id = sanitizeValue($this->request->param('route'));\n $userObj = Model_User::getUserObjById($user_id);\n $user = $this->auth->force_login($userObj->getEmail());\n if ($user) {\n $session = Session::instance();\n $session->set('login_as.id', $this->loginUserObj->getId());\n $session->set('login_as.name', $this->loginUserObj->getName());\n Model_Audit::log($this->loginUserObj->getId(), Model_Audit::TYPE_LOGIN_AS, $user_id);\n $this->request->redirect('/dashboard');\n } else {\n $this->request->redirect('/');\n }\n }", "private function _logUserIn($inputs)\n\t{\n\t\tCraft::log('Logging in user.');\n\n\t\tif (craft()->userSession->login($inputs['username'], $inputs['password']))\n\t\t{\n\t\t\tCraft::log('User logged in successfully.');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCraft::log('Could not log the user in.', LogLevel::Warning);\n\t\t}\n\t}", "function login() {\n\t $login_parameters = array(\n\t\t \"user_auth\" => array(\n\t\t \"user_name\" => $this->username,\n\t\t \"password\" => $this->hash,\n\t\t \"version\" => \"1\"\n\t\t ),\n\t\t \"application_name\" => \"mCasePortal\",\n\t\t \"name_value_list\" => array(),\n\t );\n\n\t $login_result = $this->call(\"login\", $login_parameters);\n\t $this->session = $login_result->id;\n\t return $login_result->id;\n\t}", "public static function userLoggedIn()\n {\n //Hvis en bruker ikke er logget inn, vil han bli sent til login.php\n if (!isset($_SESSION['user'])) {\n //Lagrer siden brukeren er på nå slik at han kan bli redirigert hit etter han har logget inn\n $_SESSION['returnPage'] = $_SERVER['REQUEST_URI'];\n $alert = new Alert(Alert::ERROR, \"Du er nøtt til å være logget inn for å se den siden. Ikke prøv deg på noe.\");\n $alert->displayOnOtherPage('login.php');\n\n }\n }", "protected function login()\n {\n $this->send(Response::nick($this->config['nick']));\n $this->send(Response::user(\n $this->config['nick'],\n $this->config['hostname'],\n $this->config['servername'],\n $this->config['realname']\n ));\n }", "public function setLogin(){\n \n\t\t\t$obUser = Model::getUserByEmail($this->table, $this->camp,$this->email);\n\t\t\tif (!$obUser instanceof Model) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\tif (!password_verify($this->password, $obUser->senha)) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\t\n\t\t\t$this->session($obUser);\n\n\t\t\theader('location: '.$this->location);\n\t\t\texit;\n\n\t\t}", "public function login()\n {\n $data = $this->request->data;\n if(!empty($data['username']) && !empty($data['password'])){\n $username = $data['username'];\n $password = md5($data['password']);\n $user = $this->User->find(\n 'first', array(\n 'conditions' => array(\n 'User.username' => $username,\n 'User.password' => $password\n )\n )\n );\n if(!empty($user)){\n $this->Session->write('user', $user);\n if(!empty($_SERVER['HTTP_REFERRER'])){\n $this->redirect($_SERVER['HTTP_REFERRER']);\n }else{\n $this->redirect('/');\n }\n }else{\n echo 'Ten dang nhap hoac mat khau khong dung';\n }\n }\n }", "public static function logIn($userId)\r\n {\r\n (new Session())->set(static::$userIdField, $userId);\r\n }", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function 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}", "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 p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page\n\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\t\t\t# Send them to the main page - or whever you want them to go\n\t\t\tRouter::redirect(\"/\");\n\t\t}\n\t}", "public function loggedIn() {\n @session_start();\n if (!isset($_SESSION['username']) || !\\UsersTable::getInstance()->usernameExists($_SESSION['username'])) {\n $this->logout();\n } else\n if (!isset($_SESSION['lastAccess']) || $_SESSION['lastAccess'] < time() - \\Config::getInstance()->getLoginExpire()) {\n $this->logout();\n } else {\n $_SESSION['lastAccess'] = time();\n return \\UsersTable::getInstance()->getByUsername($_SESSION['username']);\n }\n }", "public function login(){\n\n if(isset($_POST)){\n \n /* identificar al usuario */\n /* consulta a la base de datos */\n $usuario = new Usuario();\n \n $usuario->setEmail($_POST[\"email\"]);\n $usuario->setPassword($_POST[\"password\"]);\n \n $identity = $usuario->login();\n \n\n if($identity && is_object($identity)){\n \n $_SESSION[\"identity\"]= $identity;\n\n if($identity->rol == \"admin\"){\n var_dump($identity->rol);\n\n $_SESSION[\"admin\"] = true;\n }\n }else{\n $_SESSION[\"error_login\"] = \"identificacion fallida\";\n }\n\n\n /* crear una sesion */\n \n }\n /* redireccion */\n header(\"Location:\".base_url);\n\n }", "public function login(UserModel $user)\n {\n //we store the object inside property $user of this class, we want to do this so that we can store the user\n //in session\n $this->user = $user;\n //we get the primaryKey from userModel which basically returns column 'id'\n $primaryKey = $user->primaryKey();\n //we get the userType from userModel which basically returns column 'userType'\n $userType = $user->userType();\n //we get the primaryValue of user.. i.e id of user by calling $user->id and store it to primaryValue\n $primaryValue = $user->{$primaryKey};\n //we get the userTypeValue of user.. i.e user_type of user by calling $user->user_type and store it to userTypeValue\n $userTypeValue = $user->{$userType};\n\n //we then set session for user\n\n $this->session->set('user', [$primaryKey => $primaryValue, $userType => $userTypeValue]);\n\n /*\n * NB: This will be only set when user is logged in, if another request is made,\n * The user will not be set and we need to read the session, get primary value, select the\n * user and specify. This will be implemented in constructor\n */\n\n /*\n * Log user activity i.e. logged in user\n */\n DbModel::logUserActivity('logged into the system');\n\n }", "public function signinAction()\n {\n // check request method\n if (Router::getMethod() == 'POST') {\n $username = Router::getParam('username');\n $password = Router::getParam('password');\n $remember = Router::getParam('remember') ? 1 : 0;\n\n $user = new User();\n // auth user with request params\n if (!$user->auth($username, $password)) {\n // add errors to display\n $this->setMessage($user->getErrors(), 'error');\n $this->setVars(array(\n 'username' => $username,\n 'remember' => $remember\n ));\n } else {\n // change session expire time\n $now = time();\n $expire = $remember ? ($now + 60 * 60 * 24 * 30 * 12) : ($now + 60 * 60 * 24); // 1 year : 1 day\n $params = session_get_cookie_params();\n setcookie(session_name(), $_COOKIE[session_name()], $expire, $params['path'], $params['domain'], $params['secure'], $params['httponly']);\n\n // remember user id to session\n $_SESSION['userId'] = $user->getUserId();\n\n Router::redirect('index', 'index');\n }\n } elseif (isset($_SESSION['userId'])) {\n Router::redirect('index', 'index');\n }\n $this->setVar('title', 'Sign in page');\n $this->render('signin');\n }", "public static function SetUpUserBySession ();", "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 logIn(){\n\t\t$email = $_POST['log_email'];\n\t\t$email = filter_var($email, FILTER_SANITIZE_EMAIL); //sanitize email\n\t\t$s_email = self::$db->escape($email);\n\n\t\t\n\t\t$myquery = \"SELECT * FROM users WHERE email = $s_email;\";\n\t\tif(!self::$db->query($myquery)){\n\t\t\tarray_push($_SESSION['error'], \"does not match\");\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = self::$db->select($myquery);\n\t\t$hash = $user[0]['password'];\n\t\t$password = $_POST['log_password'];\n\t\t$unlocked = password_verify($password, $hash);\n\n\t\tif($unlocked){\n\t\t\t$this->setSessionVar($user[0]['id'],$hash);\n\t\t\t$_SESSION['allow']=true;\n\t\t\t$_SESSION['username'] = $user[0]['username'];\n \t\t\theader( \"refresh:0; url=index.php?page=home\");\n \t\t \t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\tarray_push($_SESSION['error'] , 'does not match');\n\t\t\t$_SESSION['allow']=false;\n\t\t\treturn false ;\n\t\t}\n\t\tarray_push($_SESSION['error'] , 'does not match');\n\t\treturn false; \n\t}", "function login() \n\t{\n // Specify the navigation column's path so we can include it based\n // on the action being rendered\n \n \n // check for cookies and if set validate and redirect to corresponding page\n\t\t$this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\t\t$this->renderWithTemplate('users/login', 'MemberPageBaseTemplate');\n\t\t\n }", "function login() {\n \t$this->set('indata',$this->data);\n\t\tif(empty($this->data)){\n\t\t\t$this->pageTitle = 'Log in';\n\t\t\t$cookie = $this->Cookie->read('Auth.User');\n\t\t}\n }", "public function login()\n {\n// session_unset($_SESSION['login']);\n//\n if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == \"POST\") {\n\n $request = $this->request->getRequestPost();\n $email = $request['email'];\n $password = $request['password'];\n// $password = $request['password'];\n $user = $this->user->where([\n 'email' => $request['email'],\n 'password' => md5($request['password']),\n 'status' => 1\n ])->get();\n\n if (!is_null($user)) {\n $_SESSION['login'] = (array)$user;\n unset($user['password']);\n $this->remerberMe($email, $password);\n header(\"Location:index.php?controllers=Categories&&action=listCategories\");\n }\n\n }\n $this->render('Login');\n\n }", "public function login()\n {\n require_once(app_path().'/config/id.php');\n\n // if user is already logged in, redirect to current page\n if (Session::has('user'))\n {\n try {\n return Redirect::back();\n }\n catch (Exception $e) {\n return Redirect::to('/');\n }\n }\n\n // else redirect user to CS50 ID\n else\n {\n //store url in session\n Session::put('redirect', URL::previous());\n\n return Redirect::to(CS50::getLoginUrl(TRUST_ROOT, RETURN_TO));\n }\n }", "public function dologinpage()\n\t\t{\n\t\t\t$userdata = array(\n\t\t\t\t'email' => Input::get('email'),\n\t\t\t\t'password' => Input::get('password')\n\t\t\t);\n\n\t\t\tif(Auth::attempt($userdata)) {\n\t\t\t\tSession::flash('successMessage', \"Welcome back, \" . Auth::user()->username . \"!\");\n\t\t\t\tSession::put('loggedinuser', Auth::user()->username);\n\t\t\t\treturn Redirect::intended('/posts');\n\t\t\t\t// $userid = DB::table('users')->where('username', Session::get('loggedinuser'))->pluck('id');\n\t\t\t\t// Session::put('loggedinid', $userid);\n\t\t\t\t\n\t\t\t\t// return Redirect::action('PostsController@index');\n\t\t\t} else {\n\t\t\t\tSession::flash('errorMessage', 'Your username or password is incorrect');\n\t\t\t\treturn Redirect::to('login');\n\t\t\t}\n\t\t}", "public function login() {\n\t\t/* if($this->Session->check('Auth.User')){\n\t\t\t$this->redirect(array('action' => 'home'));\t\n\t\t\t\t\t\n\t\t} */\n\t\t\n\t\t// if we get the post information, try to authenticate\n\t\tif ($this->request->is('post')) {\n\t\t\tif ($this->Auth->login()) {\n\t\t\t\t$this->Session->setFlash(__('Welcome, '. $this->Auth->user('username')));\n\t\t\t\t//$this->redirect($this->Auth->redirectUrl());\n\t\t\t\t$this->User->id = $this->Auth->user('id'); // target correct record\n\t\t\t\t$this->User->saveField('last_login_time', date(DATE_ATOM)); // save login time\n\t\t\t\t\n\t\t\t\t$this->redirect(array('action' => 'home'));\t\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash('Invalid username or password');\n\t\t\t}\n\t\t}\n\n\t}", "public function login();", "public function login();", "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 }", "public function login() {\n\t\tif ($this->_identity === null) {\n\t\t\t$this->_identity = new UserIdentity($this->username, $this->password, $this->loginType);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif ($this->_identity->errorCode === UserIdentity::ERROR_NONE) {\n\t\t\t$duration = $this->rememberMe ? 3600 * 24 * 30 : 0; // 30 days or the default session timeout value\n\t\t\tYii::app()->user->login($this->_identity, $duration);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function login($user_id) {\n\tsession_regenerate_id(true); // Create a new session for login\n\t$_SESSION['user_id'] = $user_id;\n}", "public function login()\n {\n if (isset($_POST['signIn'])) {\n $userExist = $this->checkIfUserExist($_POST['login']);\n var_dump($userExist);\n \n if ($userExist === false) {\n header('Location: auth&alert=NotUser');\n exit();\n } else {\n $authUser = $this->usersManager->getAuthUser($_POST['login']);\n if (password_verify($_POST['password'], $authUser[0]->userPassword())) {\n $this->usersManager->setLastConnexionUser($authUser[0]->userId());\n $this->openSession($authUser[0]);\n } else {\n header('Location: auth&alert=Login');\n exit();\n }\n }\n } else {\n throw new Exception($this->datasError);\n }\n }", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->username,$this->password);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n $duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\n\t\t\tYii::app()->user->login($this->_identity,$duration);\n\n $lastLogin = date(\"Y-m-d H:i:s\");\n\n if(Yii::app()->user->tableName === 'tbl_user'){\n $sql = \"UPDATE tbl_user_dynamic SET ulast_login = :lastLogin WHERE user_id = :userid\";\n }\n if(Yii::app()->user->tableName === 'tbl_personnel'){\n $sql = \"UPDATE tbl_user_dynamic SET plast_login = :lastLogin WHERE user_id = :userid\";\n }\n if(Yii::app()->user->tableName === 'tbl_reader'){\n $sql = \"UPDATE tbl_user_dynamic SET rlast_login = :lastLogin WHERE user_id = :userid\";\n }\n $command = Yii::app()->db->createCommand($sql);\n $command->bindValue(\":userid\", $this->_identity->id, PDO::PARAM_STR);\n $command->bindValue(\":lastLogin\", $lastLogin, PDO::PARAM_STR);\n $command->execute();\n Tank::wipeStats();\n Yii::app()->user->setState('todayHasRecord',User::todayHasRecord());\n return true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public function session() {\n\t\t$username = $this->input->post('username');\n\t\t$user_id = $this->input->post('user_id');\n\t\t$username = trim(filter_var($username, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES));\n\t\t$data = array(\n\t\t\t'username' => $username,\n\t\t\t'user_id' => $user_id,\n\t\t\t'logged_in' => TRUE,\n\t\t);\n\t\t$this->session->set_userdata($data);\n\t\techo json_encode(array('success' => true));\n\t\texit();\n\t}", "public function saveToSession()\n {\n $_SESSION[PMF_SESSION_CURRENT_USER] = $this->getUserId();\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 }", "public function login()\n {\n // make sure request is post\n if( ! SCMUtility::requestIsPost())\n {\n View::make('templates/system/error.php',array());\n return;\n }\n\n $email = SCMUtility::stripTags( (isset($_POST['email'])) ? $_POST['email'] : '' );\n $password = SCMUtility::stripTags( (isset($_POST['password'])) ? $_POST['password'] : '' );\n\n if( ! Session::Auth($email,$password) )\n {\n SCMUtility::setFlashMessage('Invalid email/password.','danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\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}", "public function login()\n\t{\t\n\t\tif ($this->common->isLoggedIn()) {\n\t\t\t$this->url->redirect('dashboard');\n\t\t}\n\t\tif ($this->commons->validateToken($this->url->post('_token'))){\n\t\t\t$this->url->redirect('login');\n\t\t}\n\n\t\t$username = $this->url->post('username');\n\t\t$password = $this->url->post('password');\n\n\t\tif (!$this->validate($username, $password)) {\n\t\t\t$this->session->data['error'] = 'Warning: Please enter valid data in input box.';\n\t\t\t$this->url->redirect('login');\n\t\t}\n\n\t\tunset($this->session->data['user_id']);\n\t\tunset($this->session->data['login_token']);\n\t\tunset($this->session->data['role']);\n\n\t\t/*Intiate login Model*/\n\t\t$this->loginModel = new Login();\n\t\t/** \n\t\t* If the user exists\n\t\t* Check his account and login attempts\n\t\t* Get user data \n **/\n\t\tif ($user = $this->loginModel->checkUser($username)) {\n\t\t\t/** \n\t\t\t* User exists now We check if\n\t\t\t* The account is locked From too many login attempts \n **/\n\t\t\tif (!$this->checkLoginAttempts($user['email'])) {\n\t\t\t\t$this->session->data['error'] = 'Warning: Your account has exceeded allowed number of login attempts. Please try again in 1 hour.';\n\t\t\t\t\n\t\t\t\t$this->url->redirect('login');\n\t\t\t}\n\t\t\telse if ($user['status'] === 1) {\n\t /** \n\t * Check if the password in the database matches the password user submitted.\n\t * We are using the password_verify function to avoid timing attacks.\n\t **/\n\t if (password_verify( $password, $user['password'])) {\n\t \t$this->loginModel->deleteAttempt($user['email']);\n\t \t/** \n\t \t* Start session for user create session varible \n\t\t * Create session login string for authentication\n\t\t **/\n\t \t$this->session->data['user_id'] = preg_replace(\"/[^0-9]+/\", \"\", $user['user_id']); \n\t \t$this->session->data['role'] = preg_replace(\"/[^0-9]+/\", \"\", $user['user_role']);\n\t \t$this->session->data['login_token'] = hash('sha512', AUTH_KEY . LOGGED_IN_SALT);\n\t \t$this->url->Redirect('dashboard');\n\t } else {\n\t \t/** \n\t \t* Add login attemt to Db\n\t\t * Redirect back to login page and set error for user\n\t\t **/\n\t \t$this->loginModel->addAttempt($user['email']);\n\t \t$this->session->data['error'] = 'Warning: No match for Username and/or Password.';\n\t \t$this->url->Redirect('login');\n\t }\n\t }\n\t else {\n\t \t/** \n\t \t* If account is disabled by admin \n\t\t * Then Show error to user\n\t\t **/\n\t \t$this->session->data['error'] = 'Warning: Your account has disabled for more info contact us.';\n\t \t$this->url->redirect('login');\n\t }\n\t }\n\t else {\n\t \t/** \n\t * If email address not found in DB \n\t\t * Show error to user for creating account\n\t\t **/\n\t \t$this->session->data['error'] = 'Warning: No match for Username and/or Password.';\n\t \t$this->url->redirect('login');\n\t }\n\t}", "public function login($usuario) {\n $_SESSION['usuario'] = $usuario;\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 }", "public function login()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->UserName,$this->passWd);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n\t\t\t$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tuser()->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public function signin()\n\t{\n $user = new User();\n\n // If user can succesfully signin then signin\n if ($user->signin(Database::connection(), $_POST['username'], $_POST['password']))\n {\n $_SESSION['id'] = $user->id;\n return True;\n }\n\n return False;\n\t}", "public function login() {\n\t\treturn $this->login_as( call_user_func( Browser::$user_resolver ) );\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}", "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 }" ]
[ "0.78587854", "0.7766707", "0.7558491", "0.73720944", "0.7321745", "0.724131", "0.7228611", "0.7195282", "0.7193624", "0.715229", "0.7126205", "0.7125491", "0.71182245", "0.71091187", "0.71085393", "0.7074437", "0.7057029", "0.70554215", "0.70340854", "0.7032322", "0.7010041", "0.70011777", "0.6993197", "0.698756", "0.6980092", "0.6949539", "0.6930459", "0.6909283", "0.6871306", "0.6845355", "0.6840237", "0.6833423", "0.6828376", "0.6823216", "0.6821144", "0.6815882", "0.6781133", "0.67706794", "0.669565", "0.66823536", "0.6681785", "0.66747075", "0.6671435", "0.66466075", "0.6644628", "0.6642646", "0.6633611", "0.6614864", "0.66096514", "0.6602778", "0.65937597", "0.65918183", "0.65833974", "0.65827835", "0.65825886", "0.6569357", "0.65617317", "0.65615904", "0.6553967", "0.6550335", "0.65358734", "0.65092415", "0.6506213", "0.6501587", "0.6494513", "0.64909434", "0.64863986", "0.6479343", "0.6478225", "0.6474656", "0.64547336", "0.6453341", "0.645332", "0.6452472", "0.64509565", "0.644764", "0.6447337", "0.644558", "0.6439617", "0.6438933", "0.64357764", "0.6423387", "0.6423387", "0.64200604", "0.64169", "0.64136493", "0.64103127", "0.6409137", "0.64060646", "0.6401322", "0.63970006", "0.63924026", "0.6387543", "0.638752", "0.6379973", "0.63698936", "0.63692945", "0.6367826", "0.63628507", "0.6358989", "0.6352728" ]
0.0
-1
Ends this user's session
public function Logout() { $this->extend('onBeforeLogout'); Cookie::set($this->Config()->get('cookie_name'),false,0); Cookie::force_expiry($this->Config()->get('cookie_name')); $this->extend('onAfterLogout'); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function end_login(){\n\n\t\t//STARTS SESSION IF NON\n\t\tsession_id() == ''? session_start(): NULL;\n\n\t\t$this->LOGGED_IN = false;\n\t\tunset($this->USER_ID);\n\n\t\t$_SESSION = Array();\n\n\t\tsetcookie(\"PHPSESSID\", NULL, time()-3600, '/');\n\t\tsetcookie(\"user\", NULL, time()-3600, '/');\n\n\t\techo Janitor::build_json_alert('Logged Out Successfully', 'Success', 107, 1);\n\t\texit;\n\t\t}", "public function sessionEnd (){\n $this->load->library( 'nativesession' );\n $this->load->helper('url');\n\n //delete session data\n $this->nativesession->delete('userid');\n $this->nativesession->delete('userLevel');\n\n session_destroy();\n\n redirect(\"../../../iris/dashboard\");\n\t}", "public function sessions_end()\n\t{\n\t\t// nothing to see here\n\t}", "public function logout()\n {\n $this->session->end();\n }", "function endSession()\n\t{\n\t\tsession_start();\n\t\tif (isset($_SESSION['userFirstName']) && isset($_SESSION['userLastName']) && isset($_SESSION['userName']))\n\t\t{\n\t\t\tunset($_SESSION['userFirstName']);\n\t\t\tunset($_SESSION['userLastName']);\n\t\t\tunset($_SESSION['userName']);\n\t\t\tsession_destroy();\n\n\t\t\techo json_encode(array('success' => 'Session deleted'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdie(json_encode(errors(417)));\n\t\t}\n\t}", "private function end() {\n if ($this->isSessionStarted()) {\n session_commit();\n $this->clear();\n }\n }", "public function action_endsession()\n\t{\n\t\t// This is so easy!\n\t\tunset($_SESSION['admin_time']);\n\n\t\t// Clean any admin tokens as well.\n\t\tcleanTokens(false, '-admin');\n\n\t\tif (isset($this->_req->query->redir, $this->_req->server->HTTP_REFERER))\n\t\t{\n\t\t\tredirectexit($_SERVER['HTTP_REFERER']);\n\t\t}\n\n\t\tredirectexit();\n\t}", "private function end_session()\n\t\t{\n\t\t\tif (isset($_SESSION['userid']))\n\t\t\t{\n\t\t\t\tif (isset($_COOKIE['auth_token']))\n\t\t\t\t\tsetcookie('auth_token', '', strtotime('-1 year'));\n\n\t\t\t\tsession_destroy();\n\t\t\t}\n\t\t\treturn ['id' => null, 'name' => null, 'state' => 0];\n\t\t}", "function EndSession(){\n session_unset(); \n // destroy the session \n session_destroy(); \n }", "public function logout()\n\t\t{\n\t\t\treturn $this->end_session();\n\t\t}", "public function close()\n {\n $this->_client->endSession($this->_session);\n }", "public static function endSession()\n {\n if (!empty(self::$_start_time)) {\n $now = microtime(true);\n self::$_duration = $now - self::$_start_time;\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 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 endSession() {\n $this->state = 0;\n $_SESSION['authstate'] = 0;\n setcookie('access_token', '', 0);\n setcookie('access_token_secret', '', 0);\n }", "public function close() {\n\t\t$this->sessionClosed = true;\n\t}", "public function killUserSession(){\t\n\t\t@session_unset();\n\t\t@session_destroy();\n\t}", "public function logout() {\n\t\t//Log this connection into the users_activity table\n\t\t\\DB::table('users_activity')->insert(array(\n\t\t\t'user_id'=>$this->user->attributes[\"id\"],\n\t\t\t'type_id'=>15,\n\t\t\t'data'=>'Log out',\n\t\t\t'created_at'=>date(\"Y-m-d H:i:s\")\n\t\t));\n\t\t$this->user = null;\n\t\t$this->cookie($this->recaller(), null, -2000);\n\t\tSession::forget($this->token());\n\t\t$this->token = null;\n\t}", "function exit_user() {\n\t\t//~ Destroy session, delete cookie and redirect to main page\n\t\tsession_destroy();\n\t\tsetcookie(\"id_user\", '', time()-3600);\n\t\tsetcookie(\"code_user\", '', time()-3600);\n\t\theader(\"Location: index.php\");\n\t}", "public function logoutUser() {\n $this->session->unsetSession(self::$storedUserId);\n $this->session->setFlashMessage(2);\n self::$isLoggedIn = false;\n }", "public function destroySession() {}", "public static function logoutUser( ) {\r\n self::$database->update(\"UPDATE users set sid=? where sid=?\", \r\n \"\", session_id());\r\n session_destroy();\r\n }", "public function logoutxxx()\n {\n $this->getSession()->destroy();\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 }", "public function logout()\n {\n $this->userId = 0;\n $this->createSession();\n $this->logger->loginOutEntry(2);\n }", "public function logout() {\n\t\t# Generate and save a new token for next login\n\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string() );\n\n\t\t# Create the data array we'll use with the update method\n\t\t# In this case, we're only updating one field, so our array only has one entry\n\t\t$data = Array(\"token\" => $new_token);\n\n\t\t# Do the update\n\t\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n\t\t# Delete their token cookie by setting it to a date in the past - effectively logging them out\n\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n\t\t# Send them back to the main index.\n\t\tRouter::redirect(\"/\");\n\t}", "public static function Logout()\n {\n Session::CloseSession();\n }", "public static function logOut()\n {\n self::startSession();\n session_destroy();\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 userLogout() {\n session_destroy();\n header('Location: index.php');\n }", "public function logout()\n {\n $this->user_provider->destroyAuthIdentifierSession();\n\n \\session()->flush();\n \n $this->user = null;\n\n $this->loggedOut = true;\n }", "public function logOut () : void {\n $this->destroySession();\n }", "public function logout() {\r\n\t\tSession::delete($this->_sessionName);\r\n\t}", "public function doLogout()\n {\n $this->deleteRememberMeCookie();\n\n $_SESSION = array();\n session_destroy();\n\n $this->user_is_logged_in = false;\n $this->messages[] = MESSAGE_LOGGED_OUT;\n }", "public function logout() {\r\n Session::end();\r\n Misc::redirect('login');\r\n }", "public function logout(){\n\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\t\t\n\t\t# Create the data array we'll use with the update method\n\t\t$data = Array(\"token\" => $new_token);\n\n\t\t# Do the update\n\t\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\t\t\n\t\t# Delete their token cookie by setting it to a date in the past - effectively logging them out\n\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n\t\t#send back to main index\n\t\tRouter::redirect(\"/\");\n\t}", "public function userLogout()\n\t{\n\t\t$result = $this->session->unset_userdata('user_name');\n\t\techo 'true';\n\t\t\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}", "public function logoutUser() {\n $this->debugPrint(\"Logging out user...\");\n\n if ($this->auth_http_method == 'DIGEST')\n $data = $this->parseDigest($_SERVER['PHP_AUTH_DIGEST']);\n\n if ($this->session_check_method == 'BOTH' || $this->session_check_method == 'NONCE' && !empty($data))\n $this->{$this->nonce_expire_function}($data['nonce']);\n if ($this->session_check_method == 'BOTH' || $this->session_check_method == 'COOKIE') {\n session_start();\n $_SESSION['lastseen'] = time() - ($this->cookie_expire + 3600 );\n }\n if ($this->redirect_on_logout) {\n echo <<<EOF\n <html>\n <meta http-equiv=\"refresh\" content=\"0; url={$this->redirect_on_logout_url}?error=2\" />\n <body><h2>{$this->logout_text}</h2></body>\n </html>\nEOF;\n } else {\n echo \"<html><body><h2>{$this->logout_text}</h2></body></html>\";\n }\n exit();\n }", "public function logout() {\n # Generate and save a new token for next login\n $new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\n # Create the data array we'll use with the update method\n # In this case, we're only updating one field, so our array only has one entry\n $data = Array(\"token\" => $new_token);\n\n # Do the update\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n # Delete their token cookie by setting it to a date in the past, logging them out\n setcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n # Send them back to the main index.\n Router::redirect(\"/\");\n }", "public function logout()\n {\n $this->session->remove('user');\n }", "public function Action_Logout()\n {\n Zero_App::$Users->IsOnline = 'no';\n Zero_App::$Users->Save();\n Zero_Session::Unset_Instance();\n session_unset();\n session_destroy();\n Zero_Response::Redirect(ZERO_HTTP);\n }", "public function logout()\n {\n $user = $this->user();\n\n // If we have an event dispatcher instance, we can fire off the logout event\n // so any further processing can be done. This allows the developer to be\n // listening for anytime a user signs out of this application manually.\n $this->clearUserDataFromStorage();\n\n if (isset($this->events)) {\n $this->events->dispatch(new LogoutEvent($this->name, $user));\n }\n\n // Once we have fired the logout event we will clear the users out of memory\n // so they are no longer available as the user is no longer considered as\n // being signed into this application and should not be available here.\n $this->user = null;\n\n $this->loggedOut = true;\n }", "public function logout() {\n\t\t$this->facebook->destroy_session();\n\t\t// Remove user data from session\n\t\t$this->session->sess_destroy();\n\t\t// Redirect to login page\n redirect('/user_authentication');\n }", "function extra_siteinfo_currently_loggedin_users_page_end_session_submit($form_id, &$form_state) {\n $user = user_load($form_state['user_id']);\n db_delete('sessions')\n ->condition('uid', $user->uid)\n ->execute();\n drupal_set_message(t('@username ( @userid ) user session has been ended.',\n array(\n '@username' => $user->name,\n '@userid' => $user->uid,\n )\n ));\n drupal_goto('admin/reports/extra-siteinfo/currently-loggedin-users');\n}", "public function logout() {\n $s = Session::getInstance();\n $key = $this->sessionId;\n unset($s->$key);\n $this->setAuthed(false);\n }", "public function logout(){\n $this->_user->logout();\n }", "public function logoutUser()\n {\n // Unset session-key user\n $this->di->get(\"session\")->delete(\"my_user_id\");\n $this->di->get(\"session\")->delete(\"my_user_name\");\n //$this->di->get(\"session\")->delete(\"my_user_password\");\n $this->di->get(\"session\")->delete(\"my_user_email\");\n //$this->di->get(\"session\")->delete(\"my_user_created\");\n //$this->di->get(\"session\")->delete(\"my_user_updated\");\n //$this->di->get(\"session\")->delete(\"my_user_deleted\");\n //$this->di->get(\"session\")->delete(\"my_user_active\");\n $this->di->get(\"session\")->delete(\"my_user_admin\");\n }", "public function logout()\n\t{\n\t\t$this->user = null;\n\n\t\t$this->session->forget(static::$key);\n\t}", "protected function unlock_session() {\n \\core\\session\\manager::write_close();\n ignore_user_abort(true);\n }", "public function user_logout()\n {\n $this->session->sess_destroy();\n redirect('userController/login_view', 'refresh');\n }", "function user_logout() {\n session_destroy();\n}", "public function logout() {\n\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\t\n\t# Create the data array we'll use with the update method\n\t# In this case, we're only updating one field, so our array only has one entry\n\t$data = Array(\"token\" => $new_token);\n\t\n\t# Do the update\n\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\t\n\t# Delete their token cookie - effectively logging them out\n\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\t\n\tRouter::redirect(\"/users/login\");\n }", "public function closeUser()\n {\n $this->isUser = false;\n }", "public function logout() {\n\n /**\n * Delete cookies - the time must be in the past,\n * so just negate what you added when creating the\n * cookie.\n */\n if (isset($_COOKIE['cookname']) && isset($_COOKIE['cookid'])) {\n setcookie(\"cookname\", \"\", time() - COOKIE_EXPIRE, COOKIE_PATH);\n setcookie(\"cookid\", \"\", time() - COOKIE_EXPIRE, COOKIE_PATH);\n }\n\n /* Unset PHP session variables */\n unset($_SESSION['username']);\n unset($_SESSION['user_id']);\n\n /* Reflect fact that user has logged out */\n $this->logged_in = false;\n\n /**\n * Remove from active users table and add to\n * active guests tables.\n */\n $this->connection->removeActiveUser($this->username);\n $this->connection->addActiveGuest($_SERVER['REMOTE_ADDR'], $this->time);\n\n /* Set user level to guest */\n $this->username = GUEST_NAME;\n $this->userlevel = GUEST_LEVEL;\n }", "public function expireSession()\n\t{\n\t\t// TODO\n\t}", "public function logout()\n\t{\n\t\t$this->session->unset_userdata(array(\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_LOGGED_IN',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_ID',\n\t\t\t\t\t\t\t\t\t\t\t'VB_FULL_NAME',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_EMAIL',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_MOBILE',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_CURRENT_PATH',\n\t\t\t\t\t\t\t\t\t\t\t'VB_USER_LAST_LOGIN'));\n\t\t\t\t\t\t\n\t\tredirect(base_url());\n\t}", "public function logout() {\n unset($_SESSION['uID']);\n\n // close the session\n session_write_close();\n\n // send to the homepage\n header('Location: '.BASE_URL);\n\n }", "public function logout()\n {\n $this->flushSession();\n }", "public function logout()\n {\n Session::destroy();\n $this->ok();\n }", "public function logout(){\n session_unset($_SESSION[\"user\"]);\n }", "public function destroy(){\n\t\t//Update last visit of the user\n\t\t$sql = \"UPDATE __users\n\t\t\t\tSET user_lastvisit='\" . $this->db->escape(intval($this->data['session_current'])) . \"'\n\t\t\t\tWHERE user_id='\" . $this->db->escape($this->data['user_id']) . \"'\";\n\t\t$this->db->query($sql);\n\n\t\t// Delete existing session\n\t\t$this->destroy_session($this->sid);\n\n\t\tset_cookie('data', '0', -1);\n\t\tset_cookie('sid', '0', -1);\n\t\tregistry::add_const('SID', '?s=');\n\t\t$this->sid = '';\n\t\treturn true;\n\t}", "public static function terminate(): void {\n\t\tself::$sessionInstance->terminate ();\n\t}", "public function logout() {\n\t\t$user = $this->Auth->user();\n\t\t$this->Session->destroy();\n\t\t$this->Cookie->destroy();\n\t\t$this->Session->setFlash(sprintf(__('%s you have successfully logged out'), $user[$this->{$this->modelClass}->displayField]));\n\t\t$this->redirect($this->Auth->logout());\n\t}", "public function logout_user() {\n\t\tif(isset($_SESSION['eeck'])) {\n\t\t\tunset($_SESSION['eeck']);\n\t\t}\n\t}", "public function logout(){\n\n\t\t$staff_id = $this->data()->staff_id;\n\n\t\t$this->_db->query(\"DELETE from user_session where staff_id like '$staff_id'\");\n\n\n\n\t\tSession::delete($this->_sessionName);\n\n\t\tif(isset($this->_cookieName)){\n\n\t\t\tCookie::delete($this->_cookieName);\n\n\t\t}\n\n\n\n\t}", "public function logout(){\n $new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\n # Create the data array we'll use with the update method\n # In this case, we're only updating one field, so our array only has one entry\n $data = Array(\"token\" => $new_token);\n\n # Do the update\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n # Delete their token cookie by setting it to a date in the past - effectively logging them out\n setcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n # Send them back to the main index.\n Router::redirect(\"/\");\n }", "public function logout()\r\r\n\t{\r\r\n\t\t// Destroy all sessions\r\r\n\t\t$this->session->sess_destroy();\r\r\n\t\t$this->session->unset_userdata('userid');\r\r\n\t\t$this->session->unset_userdata('userinfo');\r\r\n\t\tredirect(base_url());\r\r\n\t\texit();\r\r\n\r\r\n\t}", "private function _closeSession()\n {\n $session = $this->requestStack->getCurrentRequest()->getSession();\n if ($session===null || !$session->isStarted()) {\n return;\n } \n \n $session->save();\n }", "public static function destroySession();", "public function logout() {\n $new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\n # Create the data array we'll use with the update method\n # In this case, we're only updating one field, so our array only has one entry\n $data = Array(\"token\" => $new_token);\n\n # Do the update\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n # Delete their token cookie by setting it to a date in the past - effectively logging them out\n setcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n # Send them back to the main index.\n Router::redirect(\"/\");\n\n }", "public function logout()\n {\n $this->deleteSession();\n }", "public function logUserOut()\n\t{\n\t\t# destroy the session\n\t\tSession::flush();\n\n\t\t# generate a new session ID\n\t\tSession::regenerate();\n\n\t\t# ... and show the homepage\n\t\treturn Redirect::home();\n\t}", "public function logout(){\r\n if(isset($_SESSION['user'])){\r\n session_destroy();\r\n header('Location:'.ROUTE);\r\n }\r\n }", "public function LogOut()\n {\n session_destroy();\n }", "public function shutdown()\n {\n $this->setAttribute('lastrequest', time(), 'user');\n\n // rimozione variabili flash da eliminare\n foreach ($names = $this->getNames('core/user/flash/remove') as $name)\n {\n $this->removeAttribute($name, 'core/user/flash');\n $this->removeAttribute($name, 'core/user/flash/remove');\n }\n\n // termina immediatamente\n session_write_close();\n }", "public static function user_logout()\n {\n // Check if the cookie is set\n if( is_array($_COOKIE) )\n {\n foreach($_COOKIE as $key => $blah)\n {\n setcookie( $key, false, $_SERVER['REQUEST_TIME'] - 3600, '/', \n (isset($_ENV['SERVER_PROTOCOL']) && (strpos($_ENV['SERVER_PROTOCOL'],'https') \n || strpos($_ENV['SERVER_PROTOCOL'],'HTTPS'))) );\n unset($_COOKIE[$key]);\n }\n }\n AuthUser::logout();\n // Delete the session cookie as well\n if( ini_get(\"session.use_cookies\") )\n {\n $params = session_get_cookie_params();\n setcookie( session_name(), '', time() - 3600,\n $params['path'], $params['domain'], \n $params['secure'], $params['httponly'] );\n }\n // Destroy the session\n session_destroy();\n \n redirect(URL_PUBLIC);\n }", "public function closeUser ()\n\t{\n\t\t$this->_username = null;\n\t}", "public function destroy()\r\n\t\t{\r\n\t\t\t\tsession_unset();\r\n\t\t\t\tsession_destroy();\r\n\t\t\t\t$scriptName = getScriptName() . '.php';\r\n\t\t\t\tif ($scriptName != self::SESSION_END_URL)\r\n\t\t\t\t\t\theader('Location: ' . self::SESSION_END_URL);\r\n\t\t}", "public function logout(): void\n\t{\n\t\t$this->session->regenerateId();\n\n\t\t$this->session->regenerateToken();\n\n\t\t$this->session->remove($this->options['auth_key']);\n\n\t\t$this->response->getCookies()->delete($this->options['auth_key'], $this->options['cookie_options']);\n\n\t\t$this->user = null;\n\n\t\t$this->hasLoggedOut = true;\n\t}", "public function logout()\n\t\t{\n\t\tif (!$this->checkSession()) return false;\n\t\t$res=$this->get(\"http://www.plurk.com/Users/logout\",true); \n\t\t$this->debugRequest();\n\t\t$this->resetDebugger();\n\t\t$this->stopPlugin();\n\t\treturn true;\t\n\t\t}", "public static function close() {\n if ('' !== session_id()) {\n session_write_close();\n }\n }", "public function logout() {\n $this->_disconnect_user();\n redirect(base_admin_url('identification'), 'refresh');\n }", "function log_User_Out(){\n\t\tif (isset($_SESSION['status'])){\n\t\t\tunset($_SESSION['status']);\n\t\t\tunset($_SESSION['username']);\n\t\t\tunset($_SESSION['role']);\n\t\t\tunset($_COOKIE['startdate']);\n\t\t\tunset($_COOKIE['enddate']);\n\n\t\t\tif (isset($_COOKIE[session_name()])) setcookie(session_name(), '', time() - 1000);\n\t\t\tsession_destroy();\n\t\t}\n\t}", "public static function logOut()\r\n {\r\n (new Session())->remove(static::$userIdField);\r\n }", "public function logout()\n {\n unset( $_SESSION['login'] );\n ( new Events() )->trigger( 3, true );\n }", "public function logout() {\n $_SESSION = array();\n\n // get session parameters\n $params = session_get_cookie_params();\n\n // Delete the actual cookie.\n setcookie(session_name(),\n '', time() - 42000,\n $params[\"path\"],\n $params[\"domain\"],\n $params[\"secure\"],\n $params[\"httponly\"]);\n\n // Destroy session\n session_destroy();\n\n $this->userName = 'Guest';\n $this->isLogin = false;\n }", "public function destroy() {\n\t\t\t$this->session->unset('user');\n\t\t}", "public function close()\n {\n $this->session->sess_destroy();\n redirect('/home');\n }", "public function logOutUser() {\r\n\t\tif (isset($_SESSION)) {\r\n\t\t\tunset($_SESSION);\r\n\t\t\tsession_unset();\r\n\t\t\tsession_destroy();\r\n\t\t}\r\n\t\theader('Location: /');\r\n\t}", "Public Function Logout()\n\t{\n\t\tunset($_SESSION['User']);\n\t}", "public function logout()\n {\n $this->user = null;\n $this->synchronize();\n unset($_SESSION);\n }", "public function logout() {\n\t\t\t// Unset the user ID from the cookie.\n\t\t\tunset($this->uid);\n\t\t\t\n\t\t\t// Set all cookies to expire immediately.\n\t setcookie('PHPSESSID', 0);\n\t\t\tsetcookie('fauth', 0);\n\t\t\t\n\t\t\t// Log the Session object out.\n\t\t\t$this->logged_in = false;\n\t\t\t\n\t\t\t// Unset all session variables.\n\t\t\t$_SESSION['uid'] = 0;\n\t\t\t$_SESSION['username'] = \"\";\n\t\t\t\n\t\t\t// Destroy the session.\n\t\t\tsession_destroy();\n\t\t}", "function logout()\n {\n $user = $this->getAuthenticatedUser();\n if (!$user) return;\n\n unset($_SESSION['MFW_authenticated_user']);\n }", "public function logout() {\n $db = Db::getInstance();\n $user = new User($db);\n $user->logout();\n }", "public function logout() {\n unset($_SESSION['user_id']);\n unset($_SESSION['user_email']);\n unset($_SESSION['user_name']);\n session_destroy();\n redirect('');\n }", "public function logout(): void\n {\n unset($_SESSION['name']);\n NotificationService::sendInfo('see you..');\n $this->redirect(APP_URL);\n }", "public function logout()\n {\n if ( !$this->isAuthenticated() )\n {\n return;\n }\n\n $event = new OW_Event(OW_EventManager::ON_USER_LOGOUT, array('userId' => $this->getUserId()));\n OW::getEventManager()->trigger($event);\n\n $this->authenticator->logout();\n }", "public function logout() {\n\t\t\tunset( $_SESSION['user_id'] );\n\t\t\tunset( $this->user_id );\n\t\t\t$this->logged_in = false;\n\t\t}", "public static function endSession ($sid)\r\n\t{\r\n\t\t$sess = self::$instances->$sid;\r\n\t\t$sess->end();\r\n\t\tunset(self::$instances->$sid);\r\n\r\n\t\t// Destroy the global session object after the\r\n\t\t// last session has been closed\r\n\t\tif (0 === sizeof(self::$instances)) {\r\n\t\t\tsession_destroy();\r\n\t\t}\r\n\t}", "public function LogOut() {\n\t\t$this->session->UnsetAuthenticatedUser();\n\t\t$this->session->AddMessage('success', \"You have been successfully logged out.\");\n\t}" ]
[ "0.76266176", "0.75942725", "0.7584121", "0.75766253", "0.7565318", "0.73936844", "0.7384238", "0.7341469", "0.73068744", "0.72241956", "0.71717495", "0.7136327", "0.71325654", "0.7074336", "0.7036068", "0.69784033", "0.69307846", "0.68965966", "0.6895109", "0.68843716", "0.68843484", "0.6878619", "0.6870823", "0.68668646", "0.68664414", "0.68653125", "0.68624413", "0.68589425", "0.68502605", "0.6830263", "0.68291056", "0.681936", "0.6811914", "0.6804849", "0.68033004", "0.6799975", "0.6798245", "0.67939633", "0.67770296", "0.6765826", "0.6764919", "0.6753253", "0.6752784", "0.67514366", "0.67513525", "0.67480916", "0.67462015", "0.67406917", "0.67372394", "0.67292935", "0.6727637", "0.6727124", "0.67200446", "0.67029583", "0.67028517", "0.6702819", "0.66907287", "0.6689587", "0.6684941", "0.6684582", "0.6673792", "0.6672627", "0.66620153", "0.66610384", "0.66573673", "0.66549164", "0.6649203", "0.66479236", "0.6642241", "0.66340554", "0.6629635", "0.66211337", "0.66194415", "0.66193455", "0.6617446", "0.66171634", "0.6610011", "0.66099226", "0.6609566", "0.66089594", "0.6601129", "0.65998626", "0.65985745", "0.6592501", "0.65909404", "0.65897006", "0.65790135", "0.65730256", "0.6572715", "0.6571878", "0.6560015", "0.6559674", "0.65577906", "0.6551254", "0.65510374", "0.6539519", "0.6535061", "0.65289426", "0.65219754", "0.6518657", "0.651847" ]
0.0
-1
Solidifies the temporary password into the permenant password
public function ConvertTemporaryPassword() { if ( ($this->TempPassword) && ($this->TempPasswordSalt) ) { $this->Password = $this->TempPassword; $this->PasswordSalt = $this->TempPasswordSalt; $this->TempPassword = null; $this->TempPasswordSalt = null; $this->write(); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function temp_pass(){\n\treturn 'password199';\n}", "public function initPassword() {\n\t\t$this->salt = mt_rand();\n\t\t$clearPassword = mt_rand();\n\t\t$this->password = sha1($this->salt . $clearPassword);\n\t\treturn $clearPassword;\t\n\t}", "function saltPassword($tempPassword)\n{\n\t$salt1 = \"qm\\$h*\";\n\t$salt2 = \"pg!@\";\n\t$token = hash('ripemd128', \"$salt1$tempPassword$salt2\");\n\treturn $token;\n}", "function userSetTemporaryPassword($email) {\n\tqbLogin();\n\tglobal $qb;\n\tglobal $temp_password;\n\t$response = $qb->DoQuery(C_DBID_USERS, \"{'\".C_FID_USER_EMAIL.\"'.EX.'\".$email.\"'}\", 'a');\n\tif (isset($response[0]['3'])) {\n\t\t// Generate and encrypt a temporary password\n\t\t//$temp_password = random_string(10);\n\t\t$temp_password = random_str(10);\n\t\t//$temp_password = substr(bin2hex(openssl_random_pseudo_bytes(128)),0,10);\n\t\t$enc_temp_password = encrypt($temp_password);\n\t\t$fields = array(\n\t\t\tarray(\n\t\t\t\t'fid' => C_FID_USER_TEMPORARY_PASSWORD,\n\t\t\t\t'value' => $enc_temp_password\n\t\t\t)\n\t\t);\n\t\t$qb->EditRecord(C_DBID_USERS, $response[0]['3'], $fields); // Save the temporary password in QuickBase\n\t\tsendMail($email, null, 'forgot', $temp_password); // Send the user their temporary password\n\t}\n}", "public function necesitaCambiarPassword();", "function send_tempPass($email){\n\n\n $temp_pass = generate_temp_pass();\n $insert_to_db_pass = md5($temp_pass);\n $username = $_SESSION['username'];\n $email = htmlspecialchars($email);\n \n change_to_temp($insert_to_db_pass,$_SESSION['email'],$username);\n $to = $_SESSION['email'];\n\n $subject = \"Temporary Password\";\n\n //message to the user!\n $message = \"\n <html>\n <body style='background: #3B653D;'>\n <div>\n <h1 style = 'color:#ffffff; font-size:32px; text-align: center;'> Here is your account temporary password info $email !<br></h1>\n \n <span style = 'color:#ffffff;' font-size:20px;'> Temporary Password: $temp_pass </span><br>\n <span><a style = 'color:#ffffff;' href =http://farvlu.farmingdale.edu/~foxrc/BCS350_Project/change_password_link.php> Click here to change password </a> </span>\n \n </div>\n </body>\n </html>\";\n $headers = \"MIME-Version: 1.0\" . PHP_EOL;\n $headers .= \"Content-type:text/html;charset=UTF-8\" . PHP_EOL;\n $headers .= \"From: [email protected]\". PHP_EOL;\n mail($to,$subject,$message,$headers);\n\n}", "public function CreatePassword($plain) {\n $tmppassw = md5(\"De e la bara so himla fint va?\".$plain);\n\t$tmppassw = substr($tmppassw,6).substr($tmppassw,0,5);\n\treturn md5($plain);\n }", "public static function renderPassword();", "function password_recovery()\n\t{\n\n\n\t}", "private function generate_pass()\n {\n echo password_hash('admin', PASSWORD_BCRYPT);\n }", "public function getSecuredPassword();", "function enforce_temporary_passwords($member)\n{\n if ((get_forum_type() == 'cns') && (running_script('index')) && ($member != db_get_first_id()) && (!$GLOBALS['IS_ACTUALLY_ADMIN']) && ($GLOBALS['FORUM_DRIVER']->get_member_row_field($member, 'm_password_compat_scheme') == 'temporary') && (get_page_name() != 'lost_password') && ((get_page_name() != 'members') || (get_param_string('type', 'browse') != 'view'))) {\n require_code('users_active_actions');\n _enforce_temporary_passwords($member);\n }\n}", "function getPassword(){\n $options = sciploreDataAccessBundle::getGeneralOptions();\n //$options = $container->get('sciplore.options')->getGeneralOptions();\n $require_password = $options['authentifiaction_requires_password']; \n if($require_password==1){\n return $this->passphrase;\n }\n else{\n //hardcoded random default password. Must be sent by the authentification form in a hidden field.\n return 'WnDadvfhWqoJnHuXtyxwZxGbfHsXrNwI3Idns4d2Ie9BnEjYnr14ijyCr0YPg7i';\n }\n }", "public function encryptPass()\n {\n return \"RASAHolaRSSA\";\n }", "public function olvidoPassword(){\n\t}", "function generatePassword() {\n // 57 prefixes\n $aPrefix = array('aero', 'anti', 'ante', 'ande', 'auto', \n 'ba', 'be', 'bi', 'bio', 'bo', 'bu', 'by', \n 'ca', 'ce', 'ci', 'cou', 'co', 'cu', 'cy', \n 'da', 'de', 'di', 'duo', 'dy', \n 'eco', 'ergo', 'exa', \n 'geo', 'gyno', \n 'he', 'hy', 'ki',\n 'intra', \n 'ma', 'mi', 'me', 'mo', 'my', \n 'na', 'ni', 'ne', 'no', 'ny', \n 'omni', \n 'pre', 'pro', 'per', \n 'sa', 'se', 'si', 'su', 'so', 'sy', \n 'ta', 'te', 'tri',\n 'uni');\n\n // 30 suffices\n $aSuffix = array('acy', 'al', 'ance', 'ate', 'able', 'an', \n 'dom', \n 'ence', 'er', 'en',\n 'fy', 'ful', \n 'ment', 'ness',\n 'ist', 'ity', 'ify', 'ize', 'ise', 'ible', 'ic', 'ical', 'ous', 'ish', 'ive', \n 'less', \n 'sion',\n 'tion', 'ty', \n 'or');\n\n // 8 vowel sounds \n $aVowels = array('a', 'o', 'e', 'i', 'y', 'u', 'ou', 'oo'); \n\n // 20 random consonants \n $aConsonants = array('w', 'r', 't', 'p', 's', 'd', 'f', 'g', 'h', 'j', \n 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm', 'qu');\n\n // Some consonants can be doubled\n $aDoubles = array('n', 'm', 't', 's');\n\n // \"Salt\"\n $aSalt = array('!', '#', '%', '?');\n\n $pwd = $aPrefix[array_rand($aPrefix)];\n\n // add random consonant(s)\n $c = $aConsonants[array_rand($aConsonants)];\n if ( in_array( $c, $aDoubles ) ) {\n // 33% chance of doubling it\n if (rand(0, 2) == 1) { \n $c .= $c;\n }\n }\n $pwd .= $c;\n\n // add random vowel\n $pwd .= $aVowels[array_rand($aVowels)];\n\n $pwdSuffix = $aSuffix[array_rand($aSuffix)];\n // If the suffix begins with a vovel, add one or more consonants\n if ( in_array( $pwdSuffix[0], $aVowels ) ) {\n $pwd .= $aConsonants[array_rand($aConsonants)];\n }\n $pwd .= $pwdSuffix;\n\n $pwd .= rand(2, 999);\n # $pwd .= $aSalt[array_rand($aSalt)];\n\n // 50% chance of capitalizing the first letter\n if (rand(0, 1) == 1) {\n $pwd = ucfirst($pwd);\n }\n return $pwd;\n }", "public function generateSecurePassword()\n {\n\n try {\n // Generate the random salt, \n // replace byte por byte for utf8 support\n $this->_salt = strtr(base64_encode(mcrypt_create_iv(22, MCRYPT_DEV_URANDOM)), '+', '.');\n\n // generate the password with the salt\n $this->password = password_hash($this->password, PASSWORD_BCRYPT, ['salt' => $this->_salt]);\n } catch (\\Exception $ex) {\n \\kerana\\Exceptions::showError('LoginError', $ex);\n }\n }", "public function password() {\n return Hash::make('MonsterRXBOCS');\n }", "protected function getConfiguredPassword() {}", "protected function changePassword() {}", "public function ClearTemporaryPassword()\n\t{\n\t\tif ( ($this->TempPassword) || ($this->TempPasswordSalt) )\n\t\t{\n\t\t\t$this->TempPassword = null;\n\t\t\t$this->TempPasswordSalt = null;\n\t\t\t$this->write();\n\t\t}\n\t\treturn $this;\n\t}", "function generateEncryptedPassword($userinfo) {\r\n if (!class_exists('PasswordHash')) {\r\n require_once JFUSION_PLUGIN_PATH . DS . $this->getJname() . DS . 'PasswordHash.php';\r\n }\r\n $t_hasher = new PasswordHash(8, true);\r\n $check = $t_hasher->CheckPassword($userinfo->password_clear, $userinfo->password);\r\n\r\n if ($check) {\r\n //password is correct and return the phpbb3 password hash\r\n return $userinfo->password;\r\n } else {\r\n //no phpbb3 encryption used and return the phpbb2 password hash\r\n\t\t\t$password_old_format = addslashes($userinfo->password_clear);\r\n\r\n\t\t\tif ($t_hasher->CheckPassword($userinfo->password_clear, md5($this->utf8_to_cp1252($password_old_format)))) {\r\n\t\t\t\t//password is correct\r\n\t\t\t\treturn $userinfo->password;\r\n\t\t\t} elseif ($t_hasher->CheckPassword($userinfo->password_clear, md5($password_old_format))) {\r\n\t\t\t\t//password is correct\r\n\t\t\t\treturn $userinfo->password;\t\t\t\t\r\n\t\t\t} elseif (md5($this->utf8_to_cp1252($password_old_format)) === $userinfo->password) {\r\n\t\t\t\t//password is correct\r\n\t\t\t\treturn $userinfo->password;\t\t\t\t\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t//ah who cares lets just a md5 standar encryption\r\n\t\t\t\t$encrypt_password = md5($password_old_format);\r\n return $encrypt_password;\r\n\t\t\t}\t\t\t\t\r\n\r\n }\r\n }", "function generatePassword() {\n\t//* (c) Hitech Scripts 2003\n\t//* For more information, visit http://www.hitech-scripts.com\n\t//* modified for phpgiftreg by Chris Clonch\n\tmt_srand((double) microtime() * 1000000);\n\t$newstring = \"\";\n\tif ($GLOBALS[\"OPT\"][\"password_length\"] > 0) {\n\t\twhile(strlen($newstring) < $GLOBALS[\"OPT\"][\"password_length\"]) {\n\t\t\tswitch (mt_rand(1,3)) {\n\t\t\t\tcase 1: $newstring .= chr(mt_rand(48,57)); break; // 0-9\n\t\t\t\tcase 2: $newstring .= chr(mt_rand(65,90)); break; // A-Z\n\t\t\t\tcase 3: $newstring .= chr(mt_rand(97,122)); break; // a-z\n\t\t\t}\n\t\t}\n\t}\n\treturn $newstring;\n}", "function encrypt_password($plain) {\n $password = '';\n\n for ($i=0; $i<10; $i++) {\n $password .= $this->random2();\n }\n\n $salt = substr(md5($password), 0, 2);\n\n $password = md5($salt . $plain) . ':' . $salt;\n\n return $password;\n }", "public function encodePassword(string $raw): string;", "function encrypt_password($plain) {\n $password = '';\n\n for ($i = 0; $i < 10; $i++) {\n $password .= $this->rand();\n }\n\n $salt = substr(md5($password), 0, 2);\n\n $password = md5($salt . $plain) . ':' . $salt;\n\n return $password;\n }", "public function esig_mail_get_password() {\n\n $esig_options = get_option('esig_mail_options');\n $temp_password = $esig_options['smtp_settings']['password'];\n $password = \"\";\n if (!$temp_password) {\n return $password;\n }\n\n $decoded_pass = base64_decode($temp_password);\n\n if (base64_encode($decoded_pass) === $temp_password) { //it might be encoded\n $password = base64_decode($temp_password);\n } else { //not encoded\n $password = $temp_password;\n }\n return $password;\n }", "function _hash_password($password)\n {\n //return altered pw\n\n }", "public function create_password() {\n\t\tif(!empty($this->request->params['named']['email'])){\n\t\t\t$email = $this->request->params['named']['email'];\n\t\t}\n\t\t\n\t\t$authUserData = $this->Auth->user();\n\t\tif(empty($authUserData)){\n\t\t\t$this->Session->setFlash(__('There was an error logging you in and setting up a password. Your temporary password has been sent to your email address.', true));\n\t\t\t//Send the temporary password to the user's email address\n\t\t\t$options = array(\n\t\t\t\t\t\t\t\t'layout'=>'temporary_password',\n\t\t\t\t\t\t\t\t'subject'=>'Your Temporary Password',\n\t\t\t\t\t\t\t\t'view'=>'default'\n\t\t\t\t\t\t\t\t);\n\t\t\t$viewVars = array('temp_password'=>$authUserData['User']['email'],'user'=>$user);\n\n\t\t\t//Send the email\n\t\t\t$this->_sendEmail($email,$options,$viewVars);\n\t\t\t$this->redirect(array('controller'=>'users','action'=>'login'));\n\t\t}\n\t\t\n\t\t$user = $this->User->find('first',array('conditions'=>array('email'=>$authUserData['User']['email'])));\n\t\tif (!empty($this->request->data)) {\n\t\t\t$this->request->data['User']['id'] = $user['User']['id']; //Get the logged in user's id\n\t\t\tif ($this->User->verifyNewPassword($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('Password created.', true));\n\t\t\t\t$this->redirect(array('controller'=>'uploads','action'=>'index'));\n\t\t\t}\n\t\t}\n\t}", "function sanitizePassword() {\n // If there is a password confirmation we put it to the checker, too\n $passCheckerInput = (strlen($this->passwordConf) > 0) ?\n array($this->password, $this->passwordConf) : $this->password;\n $passwordChecker = new PasswordChecker($passCheckerInput);\n if ($passwordChecker->getRelevance()) {\n $this->password = htmlspecialchars($this->password);\n } else {\n die(\"Error. Check your form data\");\n }\n }", "function getPassword(){\n\n}", "function update_password()\n {\n }", "function doMkPassword ($string)\n{\n global $main;\n \n return ($main->conf['account']['hashing']['type'] == 'md5' ? md5 (sprintf ($main->conf['account']['hashing']['seed'], $string)) : sha1 (sprintf ($main->conf['account']['hashing']['seed'], $string)));\n}", "function makeRandomPassword() { \n\t $scheme = \"abchefghjkmnpqrstuvwxyz0123456789\"; \n\t srand((double)microtime()*1000000); \n\t\t $i = 0; \n\t\t while ($i <= 7) { \n\t\t\t\t$num = rand() % 33; \n\t\t\t\t$tmp = substr($scheme, $num, 1); \n\t\t\t\t$pass = $pass . $tmp; \n\t\t\t\t$i++; \n\t\t } \n\t\t return $pass; \n\t}", "function makePassword() {\n $alphaNum = array(2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f, g, h, i, j, k, m, n, p, q, r, s, t, u, v, w, x, y, z);\n srand ((double) microtime() * 1000000);\n $pwLength = \"7\"; // this sets the limit on how long the password is.\n for($i = 1; $i <=$pwLength; $i++) {\n $newPass .= $alphaNum[(rand(0,31))];\n }\n return ($newPass);\n}", "public function getPassword(): string;", "function setPassword($password){\n\t\t$password = base64_encode($password);\n\t\t$salt5 = mt_rand(10000,99999);\t\t\n\t\t$salt3 = mt_rand(100,999);\t\t\n\t\t$salt1 = mt_rand(0,25);\n\t\t$letter1 = range(\"a\",\"z\");\n\t\t$salt2 = mt_rand(0,25);\n\t\t$letter2 = range(\"A\",\"Z\");\n\t\t$password = base64_encode($letter2[$salt2].$salt5.$letter1[$salt1].$password.$letter1[$salt2].$salt3.$letter2[$salt1]);\n\t\treturn str_replace(\"=\", \"#\", $password);\n\t}", "public function generatePassword() {\n $generator = new UriSafeTokenGenerator();\n $token = $generator->generateToken();\n return substr($token, 0, 6);\n }", "private function preparePassword(string $password, string $userName): string\n {\n $ownPepperFisrt = \")XwBm4`;\";\n $ownPepperSecond = \"|oZrA9o-\";\n\n return hash(\"sha512\", $ownPepperFisrt.$password.$userName.$ownPepperSecond);\n }", "public static function makePassword()\n {\n $pass = \"\";\n $chars = array(\n \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"0\",\n \"a\", \"A\", \"b\", \"B\", \"c\", \"C\", \"d\", \"D\", \"e\", \"E\", \"f\", \"F\", \"g\", \"G\", \"h\", \"H\", \"i\", \"I\", \"j\", \"J\",\n \"k\", \"K\", \"l\", \"L\", \"m\", \"M\", \"n\", \"N\", \"o\", \"O\", \"p\", \"P\", \"q\", \"Q\", \"r\", \"R\", \"s\", \"S\", \"t\", \"T\",\n \"u\", \"U\", \"v\", \"V\", \"w\", \"W\", \"x\", \"X\", \"y\", \"Y\", \"z\", \"Z\");\n\n $count = count($chars) - 1;\n\n srand((double) microtime() * 1000000);\n\n for ($i = 0; $i < 8; $i++) {\n $pass .= $chars[rand(0, $count)];\n }\n\n return ($pass);\n }", "function get_password($usrid){\r\n\t\r\n}", "public function getPassword() {}", "public function password() {\n if ($this->proxy_pass)\n return $this->proxy_pass;\n\n return '';\n }", "function do_change_password($puuid, &$error, $set_force_reset=false) {\n global $_min_passwd_len;\n global $_passwd_numbers;\n global $_passwd_uperlower;\n global $_passwd_chars;\n\n if($puuid === '') {\n $error = \"No PUUID given\";\n return false;\n }\n\n if($_REQUEST['p1'] === $_REQUEST['p2']) {\n $temparr = array();\n $p = $_REQUEST['p1'];\n\n // do strength test here\n if(strlen($p) < $_min_passwd_len) {\n $error = \"Password too short\";\n return false;\n }\n if($_passwd_numbers && !preg_match('/[0-9]/', $p)) {\n $error = \"Password must contain one or more numbers\";\n return false;\n }\n if($_passwd_uperlower && \n \t(!preg_match('/[A-Z]/', $p) || !preg_match('/[a-z]/', $p))) {\n $error = \"Password must contain both upper case and lower case\";\n return false;\n }\n if($_passwd_chars && \n \t(preg_match_all('/[A-Za-z0-9]/', $p, &$temparr) == strlen($p))) {\n $error = \"Password must contain non-alphanumeric characters\";\n return false;\n }\n\n // we got here, so update password\n $s = \"SELECT distinct passwordtype from password_types\";\n $res = pg_query($s);\n if (!$res) {\n $error = \"DB Error\";\n return false;\n }\n $hashes = pg_fetch_all($res);\n pg_free_result($res);\n\n hpcman_log(\"Updating \".count($hashes).\" password hashes for puuid \".$puuid);\n\n if (!pg_query(\"BEGIN\")) {\n $error = \"Could not begin transaction\";\n return false;\n }\n\n foreach($hashes as $hash) {\n $s = \"UPDATE passwords SET password=$1 \n\tWHERE puuid=$2 AND passwordtype=$3\";\n $passwd = hpcman_hash($hash['passwordtype'], $p);\n $result = pg_query_params($s, array($passwd, $puuid, $hash['passwordtype']));\n if (!$result) {\n $error = \"DB Error\";\n return false;\n }\n\n $acount = pg_affected_rows($result);\n\n if ($acount > 1) {\n $error = \"Error: Too many rows\";\n if(!pg_query(\"ROLLBACK\")) {\n $error .= \", rollback failed\";\n }\n return false;\n } else if ($acount < 1) {\n hpcman_log(\"Adding new password hash {$hash['passwordtype']} for $puuid\");\n $sql = \"INSERT INTO passwords (password, puuid, passwordtype) VALUES ($1,$2,$3)\";\n $result = pg_query_params($sql, array($passwd, $puuid, $hash['passwordtype']));\n if (!$result) {\n $error = \"Error: Not enough rows; insert failed\";\n if(!pg_query(\"ROLLBACK\")) {\n $error .= \", rollback failed\";\n }\n return false;\n }\n }\n }\n\n if (!pg_query(\"COMMIT\")) {\n $error = \"DB Error: Commit failed\";\n return false;\n }\n\n if($set_force_reset) {\n $sql = \"UPDATE authenticators SET mustchange='t' \n\tWHERE puuid=$1 AND authid=0\";\n if(!pg_query_params($sql, array($puuid))) {\n\t$error = \"DB Error\";\n return false;\n }\n } else {\n $sql = \"UPDATE authenticators SET mustchange='f'\n WHERE puuid=$1 AND authid=0\";\n if(!pg_query_params($sql, array($puuid))) {\n $error = \"DB Error\";\n return false;\n }\n }\n } else {\n $error = \"Passwords do not match\";\n return false;\n }\n return true;\n}", "public function clobberPassword()\n\t{\n\t\tif( empty($this->myAuthID) && empty($this->myAccountID) )\n\t\t\tthrow PasswordResetException::toss( $this, 'NO_ACCOUNT_OR_AUTH_ID' ) ;\n\t\tif( empty($this->myNewToken) )\n\t\t\tthrow PasswordResetException::toss( $this, 'REENTRY_AUTH_FAILED' ) ;\n\t\t$theAuthFilter = $this->chooseIdentifierForSearch() ;\n\t\t$theSql = SqlBuilder::withModel( $this->model )\n\t\t\t->startWith( 'UPDATE ' )->add( $this->model->tnAuth )\n\t\t\t->setParamPrefix( ' SET ' )\n\t\t\t->mustAddParam( 'pwhash',\n\t\t\t\t\tStrings::hasher( $this->getRandomCharsFromToken() ) )\n\t\t\t->startWhereClause()\n\t\t\t->mustAddParam( $theAuthFilter['col'], $theAuthFilter['val'] )\n\t\t\t->endWhereClause()\n\t\t\t;\n//\t\t$this->debugLog( $theSql->mySql ) ;\n\t\ttry { $theSql->execDML() ; }\n\t\tcatch( PDOException $pdox )\n\t\t{\n\t\t\t$this->errorLog( __METHOD__ . ': ' . $pdox->getMessage() ) ;\n\t\t\tthrow PasswordResetException::toss( $this,\n\t\t\t\t\t'DANG_PASSWORD_YOU_SCARY' ) ;\n\t\t}\n\t}", "public static function password() {\n if ( !isset($_POST['email']) ) {\n return;\n }\n \n $password = substr(Helper::hash(rand(0,16^32).$_POST['email']),0,12);\n \n $result = Database::checkUser($_POST['email']);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzer!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n return;\n }\n \n $id = $result[0]['id'];\n $passwordold = $result[0]['password'];\n \n $pw = Helper::hash($password.$_POST['email']);\n \n $success = Database::setPassword($id,$passwordold,$pw);\n if ( $success !== false ) {\n self::passwordMail($_POST['email'],$password);\n self::setError('Ein neues Passwort wurde dir zugeschickt!<br>');\n } else {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n }\n }", "private function genPass() {\r\n $random = 0;\r\n $rand78 = \"\";\r\n $randpass = \"\";\r\n $pass = \"\";\r\n $maxcount = rand( 4, 9 );\r\n // The rand() limits (min 4, max 9) don't actually limit the number\r\n // returned by rand, so keep looping until we have a password that's\r\n // more than 4 characters and less than 9.\r\n if ( ($maxcount > 8) or ( $maxcount < 5) ) {\r\n do {\r\n $maxcount = rand( 4, 9 );\r\n } while ( ($maxcount > 8) or ( $maxcount < 5) );\r\n }\r\n $rand78 = \"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()-=_+abcdefghijklmnopqrstuvwxyz\";\r\n for ( $count = 0; $count <= $maxcount; $count++ ) {\r\n $random = rand( 0, 77 );\r\n $randpass = substr( $rand78, $random, 1 );\r\n $pass = $pass . $randpass;\r\n }\r\n $pass = substr( $pass, 0, 8 ); // Just in case\r\n return($pass);\r\n }", "function set_user_pass($plain)\n{\n\tif($rand_src = fopen('/dev/urandom','r')) {\n\t\tif($key = fread($rand_src, 32)) {\n\t\t\t$key = md5($key);\t//TODO: change hash? outputs 128, so simpler\n\t\t\tfclose($rand_src);\n\t\t\t$cipher = @mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plain, MCRYPT_MODE_CBC);\t//TODO: add IV? suppressed warning for now\n\t\t\tif(setcookie('FILEADVENTURER_KEY', $key))\n\t\t\t\treturn rtrim($cipher,'\\0');\n\t\t}\n\t\tfclose($rand_src);\n\t}\n\treturn false;\n}", "public function createRandomPassword() {\n\t\t$chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n\t\t\n\t\tsrand((double)microtime()*1000000);\n\t\t\n\t\t$i = 0;\n\t\t\n\t\t$pass = '' ;\n\t\t\n\t\twhile ($i <= 7) {\n\t\t\n\t\t\t$num = rand() % 33;\n\t\t\n\t\t\t$tmp = substr($chars, $num, 1);\n\t\t\n\t\t\t$pass = $pass . $tmp;\n\t\t\n\t\t\t$i++;\n\t\t\n\t\t}\n\t\treturn $pass;\n\t}", "function twe_encrypt_password($plain) {\n\n $password=md5($plain);\n\n return $password;\n\n }", "public function setPassword($plain){\n\t\t\n $salt = \"$2a$12$\" . uniqid() . PLAIN_PHP\\Utils::randomString(9);\n \n //force blowfish algorithm through salt\n $this->password = crypt($plain, $salt);\n R::store($this->bean);\n }", "public static function generatePassword()\n\t{\n\t\t$consonants = array(\"b\", \"c\", \"d\", \"f\", \"g\", \"h\", \"j\", \"k\", \"l\", \"m\", \"n\", \"p\", \"r\", \"s\", \"t\", \"v\", \"w\", \"x\", \"y\", \"z\");\n\t\t$vocals = array(\"a\", \"e\", \"i\", \"o\", \"u\");\n\n\t\t$password = '';\n\n\t\tsrand((double)microtime() * 1000000);\n\t\tfor ($i = 1; $i <= 4; $i++) {\n\t\t\t$password .= $consonants[rand(0, 19)];\n\t\t\t$password .= $vocals[rand(0, 4)];\n\t\t}\n\t\t$password .= rand(0, 9);\n\n\t\treturn $password;\n\t}", "public function get_strPassword()\n {\n return $this->strPassword;\n }", "function createNewPassword() {\n\t $genKey = \"0123456789abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ!@#$%&*()_+\";//set the random generator key from a-z and A-Z and 0-9\n\t $pass = array(); //declare $pass as the variable to store array\n\t $genKeyLength = strlen($genKey) - 1; //put the length -1 in cache\n\t for ($i = 0; $i < 10; $i++) {\n\t $n = rand(0, $genKeyLength);//set $n to store the generated random key\n\t $pass[] = $genKey[$n]; //set $pass to store the array of generated key\n\t }\n\t return implode($pass); // used implode turn the array into a string\n\t}", "private function generarPassword() {\r\n $minusculas = \"abcdefghijklmnopqrstuvwxyz\";\r\n $mayusculas = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n $numeros = \"1234567890\";\r\n $may = \"\";\r\n $min = \"\";\r\n $num = \"\";\r\n for ($i = 0; $i < 11; $i++) {\r\n $min .= substr($minusculas, rand(0, 26), 1);\r\n $may .= substr($mayusculas, rand(0, 26), 1);\r\n $num .= substr($numeros, rand(0, 10), 1);\r\n }\r\n $password = substr($may, 0, 2) . substr($min, 0, 5) . '-' . substr($num, 0, 3);\r\n return $password;\r\n }", "public static function generatePassword() {\n\t\t$consonants = array (\n\t\t\t\t\"b\",\n\t\t\t\t\"c\",\n\t\t\t\t\"d\",\n\t\t\t\t\"f\",\n\t\t\t\t\"g\",\n\t\t\t\t\"h\",\n\t\t\t\t\"j\",\n\t\t\t\t\"k\",\n\t\t\t\t\"l\",\n\t\t\t\t\"m\",\n\t\t\t\t\"n\",\n\t\t\t\t\"p\",\n\t\t\t\t\"r\",\n\t\t\t\t\"s\",\n\t\t\t\t\"t\",\n\t\t\t\t\"v\",\n\t\t\t\t\"w\",\n\t\t\t\t\"x\",\n\t\t\t\t\"y\",\n\t\t\t\t\"z\" \n\t\t);\n\t\t$vocals = array (\n\t\t\t\t\"a\",\n\t\t\t\t\"e\",\n\t\t\t\t\"i\",\n\t\t\t\t\"o\",\n\t\t\t\t\"u\" \n\t\t);\n\t\t\n\t\t$password = '';\n\t\t\n\t\tsrand ( ( double ) microtime () * 1000000 );\n\t\tfor($i = 1; $i <= 4; $i ++) {\n\t\t\t$password .= $consonants [rand ( 0, 19 )];\n\t\t\t$password .= $vocals [rand ( 0, 4 )];\n\t\t}\n\t\t$password .= rand ( 0, 9 );\n\t\t\n\t\treturn $password;\n\t}", "public function makePassword($pw)\n\t\t{\n\t\t\treturn $this->useHash ? sha1($pw . $this->salt) : $pw;\n\t\t}", "protected function generateAdminPassword()\n {\n return\n Util::getRandomString(1, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') .\n Util::getRandomString(1, '0123456789') .\n Util::getRandomString(1, '@*^%#()<>') .\n Util::getRandomString();\n }", "function sloodle_random_prim_password()\n {\n return (string)mt_rand(1000000, 999999999);\n }", "function Genera_Password($cadena){\r\n $cadena_1 = \"1234567890\";\r\n\t$cadena_2 = \"&%$/.@*_-#\";\r\n //Obtenemos la longitud de la cadena de caracteres\r\n $longitudCadena_1=strlen($cadena_1);\r\n\t$longitudCadena_2=strlen($cadena_2);\r\n\r\n //Se define la variable que va a contener la contrase�a\r\n $pass = \"\";\r\n //Se define la longitud de la contrase�a, en mi caso 10, pero puedes poner la longitud que quieras\r\n $longitudPass=4;\r\n\r\n\t$pass = $cadena.substr($cadena_1,rand(0,$longitudCadena_1-1),1).substr($cadena_1,rand(0,$longitudCadena_1-1),1).substr($cadena_2,rand(0,$longitudCadena_2-1),1).substr($cadena_2,rand(0,$longitudCadena_2-1),1);\r\n\r\n return $pass;\r\n}", "function randomPassword()\r\n\t{\r\n\t\t$longitud = 8;\r\n\t\t$carac = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n\t\t$pwd = '';\r\n\t\tfor ($i=0; $i<$longitud; ++$i){ \r\n\t\t\t $pwd .= substr($carac, (mt_rand() % strlen($carac)), 1);\r\n\t\t}\t \r\n\t return trim($pwd);\r\n\t}", "function wp_generate_password($length = 12, $special_chars = \\true, $extra_special_chars = \\false)\n {\n }", "private function writePassword(): void\n {\n // Exit unless sheet protection and password have been specified\n if ($this->phpSheet->getProtection()->getSheet() !== true || !$this->phpSheet->getProtection()->getPassword() || $this->phpSheet->getProtection()->getAlgorithm() !== '') {\n return;\n }\n\n $record = 0x0013; // Record identifier\n $length = 0x0002; // Bytes to follow\n\n $wPassword = hexdec($this->phpSheet->getProtection()->getPassword()); // Encoded password\n\n $header = pack('vv', $record, $length);\n $data = pack('v', $wPassword);\n\n $this->append($header . $data);\n }", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "public function getPassword();", "function genera_password($longitud,$tipo=\"alfanumerico\"){\n \nif ($tipo==\"alfanumerico\"){\n$exp_reg=\"[^A-Z0-9]\";\n} elseif ($tipo==\"numerico\"){\n$exp_reg=\"[^0-9]\";\n}\n \nreturn substr(eregi_replace($exp_reg, \"\", md5(time())) .\neregi_replace($exp_reg, \"\", md5(time())) .\neregi_replace($exp_reg, \"\", md5(time())),\n0, $longitud);\n}", "function hashPassword()\t{\n\t\t$fields = $this->_settings['fields'];\n\t\tif (!isset($this->model->data[$this->model->name][$fields['username']])) {\n\t\t\t$this->model->data[$this->model->name][$fields['password']] = Security::hash($this->model->data[$this->model->name][$fields['password']], null, true);\n\t\t}\n\t}", "function update_password($new_pass, $pivot, $data_from_pivot)\n{\n global $DB_connect;\n $new_pass = password_hash($new_pass, PASSWORD_DEFAULT);\n\n $statement = $DB_connect->prepare(\"UPDATE db.user set password = :password WHERE \" . $pivot . \" = :data_from_pivot\");\n $statement->execute(['password' => $new_pass, 'data_from_pivot' => $data_from_pivot]);\n}", "function testPassword()\n {\n $this->f->_isSubmitted = true;\n $this->assertEquals(\"\", $this->f->password());\n $this->assertEquals(\"V\", $this->f->password(\"L\", \"H\", \"V\"));\n $val = &$this->f->password(\"L\", \"H\", \"V\");\n $this->f->error();\n $this->assertTrue($this->f->_hasErrors);\n $this->assertEquals(\"\", $val);\n }", "public function password()\n {\n }", "public function generate_pw(){\n $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n $pass = str_shuffle($alphabet);\n $pass = substr($pass, 0, 8);\n $this->setPassword($pass);\n return $pass; //turn the array into a string\n }", "function createRandomPassword() { \n $chars \t= \"abcdefghijkmnopqrstuvwxyz023456789\"; \n srand((double)microtime()*1000000); \n $i \t\t= 0; \n $pass \t= '' ; \n\n while ($i <= 4) { \n $num \t= rand() % 33; \n $tmp \t= substr($chars, $num, 1); \n $pass \t= $pass . $tmp; \n $i++; \n } \n\n return $pass; \n }", "public function getPW() {}", "function roast_pass($password) {\r\n $roast_arr = array(0xF3, 0x26, 0x81, 0xC4, 0x39, 0x86, 0xDB, 0x92, 0x71, 0xA3, 0xB9, 0xE6, 0x53, 0x7A, 0x95, 0x7c);\r\n $roasted_pass = '';\r\n for ($i = 0; $i < strlen($password); $i++) {\r\n $roasted_pass .= chr($roast_arr[$i] ^ ord($password{$i}));\r\n }\r\n return $roasted_pass;\r\n }", "public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "function gen_pass($mask) {\n $extended_chars = \"!@#$%^&*()\";\n $length = strlen($mask);\n $pwd = '';\n for ($c=0;$c<$length;$c++) {\n $ch = $mask[$c];\n switch ($ch) {\n case '#':\n $p_char = rand(0,9);\n break;\n case 'C':\n $p_char = chr(rand(65,90));\n break;\n case 'c':\n $p_char = chr(rand(97,122));\n break;\n case 'X':\n do {\n $p_char = rand(65,122);\n } while ($p_char > 90 && $p_char < 97);\n $p_char = chr($p_char);\n break;\n case '!':\n $p_char = $extended_chars[rand(0,strlen($extended_chars)-1)];\n break;\n }\n $pwd .= $p_char;\n }\n return $pwd; \n}", "function set_password($string) {\r\n echo PHP_EOL;\r\n $this->action(\"setting new password of: $string\");\r\n $this->hashed_password = hash('sha256', $string . $this->vehicle_salt);\r\n $this->action(\"successfully set new password\");\r\n }", "public function getPassword () {\n if ($this->donnees !== null and key_exists(self::PASSWORD_REF, $this->donnees)) {\n return $this->donnees[self::PASSWORD_REF];\n } else {\n return \"\";\n }\n }", "public static function generatePassword() {\r\n return StringGenerator::generateRandomAlphaAndNumbersAndSpecial(12);\r\n }", "private function pre_defined_password(): string\r\n {\r\n $regx = \"/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[#$@!%&*?])[A-Za-z\\d#$@!%&*?]{6,30}$/\";\r\n if (!preg_match($regx, $this->field)) {\r\n return $this->message(\"must 1 uppercase, lowercase, number & special char\");\r\n }\r\n }", "public function setPassword() {\n if ($this->Password) {\n $this->Password = \\app\\components\\Utilities::setHashedValue($this->Password);\n }\n }", "private function generatePassword() {\n // account is not wide open if conventional logins are permitted\n $guid = '';\n\n for ($i = 0; ($i < 8); $i++) {\n $guid .= sprintf(\"%x\", mt_rand(0, 15));\n }\n\n return $guid;\n }", "function makeRandomPassword() { \n $salt = \"abchefghjkmnpqrstuvwxyz0123456789\"; \n srand((double)microtime()*1000000); \n $i = 0; \n while ($i <= 7) { \n $num = rand() % 33; \n $tmp = substr($salt, $num, 1); \n $pass = $pass . $tmp; \n $i++; \n } \n return $pass; \n}", "function generaPass(){\n $cadena = \"1234567890\";\n //Obtenemos la longitud de la cadena de caracteres\n $longitudCadena=strlen($cadena);\n \n //Se define la variable que va a contener la contraseña\n $pass = \"\";\n //Se define la longitud de la contraseña, en mi caso 10, pero puedes poner la longitud que quieras\n $longitudPass=5;\n \n //Creamos la contraseña\n for($i=1 ; $i<=$longitudPass ; $i++){\n //Definimos numero aleatorio entre 0 y la longitud de la cadena de caracteres-1\n $pos=rand(0,$longitudCadena-1);\n \n //Vamos formando la contraseña en cada iteraccion del bucle, añadiendo a la cadena $pass la letra correspondiente a la posicion $pos en la cadena de caracteres definida.\n $pass .= substr($cadena,$pos,1);\n }\n return $pass;\n}", "function HashPassword($input)\n{\n//Credits: http://crackstation.net/hashing-security.html\n//This is secure hashing the consist of strong hash algorithm sha 256 and using highly random salt\n$salt = bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM)); \n$hash = hash(\"sha256\", $salt . $input); \n$final = $salt . $hash; \nreturn $final;\n}", "public function changePasswordByTemporaryPassword($username, $tempPassword, $password, $tempUsername = null)\n {\n $service = craft()->tobiasAx_userConnector;\n $request = $service->changePasswordByTemporaryPassword($username, $tempPassword, $password, $tempUsername);\n $errorMessage = 'Error changing password using temporary password. ';\n\n try {\n $envelope = $service->sendRequest($request);\n $result = $service->extractSingle($envelope, 'Body/xmlns:ChangePasswordByTemporaryPasswordResponse');\n } catch (Exception $e) {\n $exception = new Exception($errorMessage.Craft::t(static::UNKNOWN_ERROR, ['message' => $e->getMessage()]), TobiasAX_UserError::UNKOWN, $e);\n\n if (stristr($e->getMessage(), static::EXCEPTION_INVALID_TEMP_PASSWORD)) {\n $exception = new TobiasAx_SoapException($errorMessage.static::ERROR_INVALID_TEMP_PASSWORD, TobiasAX_UserError::INVALID_TEMP_PASSWORD, $e);\n } elseif (stristr($e->getMessage(), static::EXCEPTION_INVALID_PASSWORD)) {\n $exception = new TobiasAx_SoapException($errorMessage.static::ERROR_INVALID_PASSWORD, TobiasAX_UserError::INVALID_PASSWORD, $e);\n }\n\n throw $exception;\n }\n\n return $result;\n }", "public function randomPassword() {\n $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n $passphrase = array();\n $alphaLength = strlen($alphabet) - 1;\n for ($i = 0; $i < 8; $i++) {\n $n = rand(0, $alphaLength);\n $passphrase[] = $alphabet[$n];\n }\n return implode($passphrase);\n }", "public function modifpassword($user,$passwd){\n \n }", "public function getPlainPassword()\n {\n return $this->plainPassword;\n }", "public function getPlainPassword()\n {\n return $this->plainPassword;\n }", "public function getPlainPassword()\n {\n return $this->plainPassword;\n }", "public function getPlainPassword()\n {\n return $this->plainPassword;\n }", "function createRandomPassword() {\r\n $chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\r\n srand((double) microtime() * 1000000);\r\n $i = 0;\r\n $pass = '';\r\n\r\n while ($i <= 7) {\r\n $num = rand() % 33;\r\n $tmp = substr($chars, $num, 1);\r\n $pass = $pass . $tmp;\r\n $i++;\r\n }\r\n\r\n return $pass;\r\n }", "function generaPass() {\n $cadena = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n //Obtenemos la longitud de la cadena de caracteres\n $longitudCadena = strlen($cadena);\n\n //Se define la variable que va a contener la contraseña\n $pass = \"\";\n //Se define la longitud de la contraseña, en mi caso 10, pero puedes poner la longitud que quieras\n $longitudPass = 10;\n\n //Creamos la contraseña\n for ($i = 1; $i <= $longitudPass; $i++) {\n //Definimos numero aleatorio entre 0 y la longitud de la cadena de caracteres-1\n $pos = rand(0, $longitudCadena - 1);\n //Vamos formando la contraseña en cada iteraccion del bucle, añadiendo a la cadena $pass la letra correspondiente a la posicion $pos en la cadena de caracteres definida.\n $pass .= substr($cadena, $pos, 1);\n }\n return $pass;\n}", "protected function hashPassword() {\n\t\t$this->password = Password::hash($this->password);\n\t}" ]
[ "0.7096385", "0.6645637", "0.66241175", "0.6456425", "0.6315426", "0.6308458", "0.629177", "0.62652874", "0.6196825", "0.6174643", "0.61710614", "0.61566466", "0.61452216", "0.6140846", "0.6128573", "0.6106052", "0.60904795", "0.6075013", "0.60732186", "0.60632324", "0.606169", "0.6055542", "0.6045504", "0.6034691", "0.6033225", "0.60171926", "0.6006572", "0.60059446", "0.5996444", "0.5994057", "0.5987995", "0.5974682", "0.5972185", "0.5960624", "0.59584546", "0.5936035", "0.59296554", "0.59170246", "0.5896769", "0.58941096", "0.5890782", "0.5885765", "0.58822525", "0.58820266", "0.58684236", "0.5867314", "0.58658254", "0.5864023", "0.58626765", "0.5855484", "0.5851941", "0.58508044", "0.5847564", "0.5847306", "0.5846872", "0.5846724", "0.58453226", "0.5835545", "0.5833069", "0.58307886", "0.58300567", "0.5824068", "0.5812647", "0.5807171", "0.5807171", "0.5807171", "0.5807171", "0.5807171", "0.5807171", "0.5807171", "0.5806558", "0.5805591", "0.58050674", "0.58038354", "0.58030385", "0.5800438", "0.5798087", "0.57923484", "0.5791591", "0.57882065", "0.5787172", "0.5785019", "0.5781439", "0.57787454", "0.5778084", "0.5776623", "0.5773853", "0.5772931", "0.57714117", "0.5770953", "0.57696134", "0.57666504", "0.57639766", "0.575467", "0.575467", "0.575467", "0.575467", "0.5751959", "0.5733289", "0.5732248" ]
0.71860015
0
removes the temporary password
public function ClearTemporaryPassword() { if ( ($this->TempPassword) || ($this->TempPasswordSalt) ) { $this->TempPassword = null; $this->TempPasswordSalt = null; $this->write(); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function eraseCredentials(): void\n {\n // $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->plainPasword = null;\n }", "public function eraseCredentials()\n {\n $this->password = null;\n }", "public function eraseCredentials(): void\n {\n $this->password = '';\n }", "public function unsetPassword(){\n\t\t$this->password = null;\n\t}", "public function eraseCredentials()\n {\n // if you had a plainPassword property, you'd nullify it here\n\n $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }", "public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }", "public function eraseCredentials()\n {\n $this->setPlainPassword(null);\n }", "public function eraseCredentials()\n {\n // if you had a plainPassword property, you'd nullify it here\n // $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n // if you had a plainPassword property, you'd nullify it here\n // $this->plainPassword = null;\n }", "public function eraseCredentials()\n {\n // does nothing; nothing sensitive is stored, even temporary\n }", "public function removePasswordResetToken()\n {\n $this->password = null;\n }", "public function eraseCredentials() {}", "public function eraseCredentials()\n {\n // do nothing\n }", "public function eraseCredentials()\r\n {}", "public function eraseCredentials()\n {\n \n }", "public function eraseCredentials()\n {}", "public function eraseCredentials()\n {\n // credentials not stored locally\n }", "public function eraseCredentials()\r\n {\r\n }", "public function eraseCredentials() {\n }", "public function eraseCredentials() {\n }", "public function eraseCredentials() {\n }", "public function eraseCredentials()\n {\n //wtf is that\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\n {\n return;\n }", "public function eraseCredentials()\n {\n return;\n }", "function eraseCredentials(){;\n }", "public function eraseCredentials()\n {\n\n }", "public function eraseCredentials()\n {\n\n }", "public function eraseCredentials()\n {\n\n }", "public function eraseCredentials()\n {\n\n }", "public function eraseCredentials()\n {\n\n }", "public function eraseCredentials()\n {\n\n }", "public function eraseCredentials() {\n\n }", "public function eraseCredentials()\n {\n }", "public function eraseCredentials()\r\n {\r\n // TODO: Implement eraseCredentials() method.\r\n }", "private function clearInput()\n {\n $this->newPassword = '';\n $this->newPasswordConfirmation = '';\n $this->currentPassword = '';\n }", "public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }", "public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }", "public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }", "public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }", "public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }", "public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }", "public function eraseCredentials()\n {\n // TODO: Implement eraseCredentials() method.\n }" ]
[ "0.7532248", "0.7515482", "0.7515482", "0.7515482", "0.7515482", "0.7515482", "0.7515482", "0.7515482", "0.7515482", "0.7515482", "0.74856794", "0.748358", "0.74167246", "0.73449147", "0.72613204", "0.7255735", "0.7255735", "0.7255735", "0.72247577", "0.72247577", "0.7184815", "0.7093235", "0.6967521", "0.6953727", "0.69397014", "0.69260454", "0.6925608", "0.690559", "0.68811214", "0.68719757", "0.68719757", "0.68719757", "0.6845581", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.684087", "0.6835648", "0.6835648", "0.6826266", "0.67564744", "0.67564744", "0.67564744", "0.67564744", "0.67564744", "0.67564744", "0.67438745", "0.67388743", "0.6714396", "0.671064", "0.66438454", "0.66438454", "0.66438454", "0.66438454", "0.66438454", "0.66438454", "0.66438454" ]
0.70499736
22
Generates a new temp password for the user and emails it to them
public function ResetPassword() { $siteConfig = SiteConfig::current_site_config(); $this->NewTempPassword = $this->GeneratePassword(); $passwordData = $this->EncryptPassword($this->NewTempPassword); $this->TempPassword = $passwordData['Password']; $this->TempPasswordSalt = $passwordData['Salt']; $explode = array_reverse(explode('.',$_SERVER['HTTP_HOST'])); $domain = implode('.',array_reverse(array(array_shift($explode),array_shift($explode)))); Email::create() ->setTo($this->Email,$this->FirstName.' '.$this->LastName) ->setFrom($this->getAdminEmail()) ->setSubject($siteConfig->Title.' Password Reset') ->setHTMLTemplate('emails/email_PasswordReset') ->setData($this) ->send(); // write after email is sent so new password isn't lost $this->write(); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create_password() {\n\t\tif(!empty($this->request->params['named']['email'])){\n\t\t\t$email = $this->request->params['named']['email'];\n\t\t}\n\t\t\n\t\t$authUserData = $this->Auth->user();\n\t\tif(empty($authUserData)){\n\t\t\t$this->Session->setFlash(__('There was an error logging you in and setting up a password. Your temporary password has been sent to your email address.', true));\n\t\t\t//Send the temporary password to the user's email address\n\t\t\t$options = array(\n\t\t\t\t\t\t\t\t'layout'=>'temporary_password',\n\t\t\t\t\t\t\t\t'subject'=>'Your Temporary Password',\n\t\t\t\t\t\t\t\t'view'=>'default'\n\t\t\t\t\t\t\t\t);\n\t\t\t$viewVars = array('temp_password'=>$authUserData['User']['email'],'user'=>$user);\n\n\t\t\t//Send the email\n\t\t\t$this->_sendEmail($email,$options,$viewVars);\n\t\t\t$this->redirect(array('controller'=>'users','action'=>'login'));\n\t\t}\n\t\t\n\t\t$user = $this->User->find('first',array('conditions'=>array('email'=>$authUserData['User']['email'])));\n\t\tif (!empty($this->request->data)) {\n\t\t\t$this->request->data['User']['id'] = $user['User']['id']; //Get the logged in user's id\n\t\t\tif ($this->User->verifyNewPassword($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('Password created.', true));\n\t\t\t\t$this->redirect(array('controller'=>'uploads','action'=>'index'));\n\t\t\t}\n\t\t}\n\t}", "function send_tempPass($email){\n\n\n $temp_pass = generate_temp_pass();\n $insert_to_db_pass = md5($temp_pass);\n $username = $_SESSION['username'];\n $email = htmlspecialchars($email);\n \n change_to_temp($insert_to_db_pass,$_SESSION['email'],$username);\n $to = $_SESSION['email'];\n\n $subject = \"Temporary Password\";\n\n //message to the user!\n $message = \"\n <html>\n <body style='background: #3B653D;'>\n <div>\n <h1 style = 'color:#ffffff; font-size:32px; text-align: center;'> Here is your account temporary password info $email !<br></h1>\n \n <span style = 'color:#ffffff;' font-size:20px;'> Temporary Password: $temp_pass </span><br>\n <span><a style = 'color:#ffffff;' href =http://farvlu.farmingdale.edu/~foxrc/BCS350_Project/change_password_link.php> Click here to change password </a> </span>\n \n </div>\n </body>\n </html>\";\n $headers = \"MIME-Version: 1.0\" . PHP_EOL;\n $headers .= \"Content-type:text/html;charset=UTF-8\" . PHP_EOL;\n $headers .= \"From: [email protected]\". PHP_EOL;\n mail($to,$subject,$message,$headers);\n\n}", "function userSetTemporaryPassword($email) {\n\tqbLogin();\n\tglobal $qb;\n\tglobal $temp_password;\n\t$response = $qb->DoQuery(C_DBID_USERS, \"{'\".C_FID_USER_EMAIL.\"'.EX.'\".$email.\"'}\", 'a');\n\tif (isset($response[0]['3'])) {\n\t\t// Generate and encrypt a temporary password\n\t\t//$temp_password = random_string(10);\n\t\t$temp_password = random_str(10);\n\t\t//$temp_password = substr(bin2hex(openssl_random_pseudo_bytes(128)),0,10);\n\t\t$enc_temp_password = encrypt($temp_password);\n\t\t$fields = array(\n\t\t\tarray(\n\t\t\t\t'fid' => C_FID_USER_TEMPORARY_PASSWORD,\n\t\t\t\t'value' => $enc_temp_password\n\t\t\t)\n\t\t);\n\t\t$qb->EditRecord(C_DBID_USERS, $response[0]['3'], $fields); // Save the temporary password in QuickBase\n\t\tsendMail($email, null, 'forgot', $temp_password); // Send the user their temporary password\n\t}\n}", "public function generate_new_passwords() {\n // all users added with \"password\" will be automatically sent a welcome message\n // and new password\n $resetpassword = 'password'; \n // get users\n $user_list = $this->get_user->get_all_users();\n // go through users \n foreach($user_list as $user) {\n // check if password is \"password\"\n $user_id = $user->user_id;\n if ($this->get_user->check_password($user_id, $resetpassword) == 1) {\n // generate simple random password\n $newpassword = uniqid();\n // write new password to database\n $data = array(\n 'password' => $newpassword\n );\n $this->get_user->update('user_id', $user_id, $data);\n // email user new password \n $this->send_password_mail($user_id, $newpassword);\n }\n \n }\n \n \n }", "public function generateNewPassword($mail);", "public function generatePasswordResetToken()\n {\n $this->password = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generateResetPassword()\n {\n $this->setRules([ StringLiterals::EMAIL => 'required|max:100|email' ]);\n $this->_validate();\n $this->_customer = $this->_customer->where('email', $this->request->email)->first();\n if (isset($this->_customer) && is_object($this->_customer) && ! empty($this->_customer->id)) {\n $this->_customer->access_otp_token = mt_rand();\n $this->_customer->save();\n $this->email = $this->email->fetchEmailTemplate('password_reset_otp');\n $this->email->content = str_replace([ '##USERNAME##','##OTP##' ], [ $this->_customer->name,$this->_customer->access_otp_token ], $this->email->content);\n $this->notification->email($this->_customer, $this->email->subject, $this->email->content);\n return true;\n }\n return false;\n }", "public function forgotPassword()\n { \n $siteUrl = ($this->request->type)?env('WEB_SITE_AUDIO_URL'):env('WEB_SITE_URL');\n $this->setRules([ 'email' => 'required|exists:customers,email' ]);\n $this->setMessages('email.exists', trans('customer::customer.email_not_registered'));\n $this->_validate();\n $newPassword = str_random(8);\n $user = $this->_customer->where('email', $this->request->email)->first();\n $user->forgot_password = $newPassword;\n $user->save();\n if (!empty($user) && count($user->toArray()) > 0) {\n $this->email = $this->email->fetchEmailTemplate('forgot_password');\n $this->email->subject = str_replace(['##SITE_NAME##'], [config ()->get ( 'settings.general-settings.site-settings.site_name' )], $this->email->subject);\n $this->email->content = str_replace([ '##USERNAME##','##FORGOTPASSWORD##' ], [ $user->name, $siteUrl.'reset-password' . '/' . $user->forgot_password ], $this->email->content);\n $this->notification->email($user, $this->email->subject, $this->email->content);\n }\n return true;\n }", "public function forgot_pwd()\r\n {\r\n //provided the correct combination of user name and email address\r\n\r\n $username = htmlspecialchars($_POST['username']);\r\n $email = htmlspecialchars($_POST['email']);\r\n\r\n require_once 'database/profile.php';\r\n require_once 'database/session.php';\r\n\r\n $usernameId = getUserId($username);\r\n if (!$usernameId) {\r\n return \"Username does not exist.\";\r\n }\r\n\r\n $userInfo = getProfile($usernameId);\r\n if ($userInfo[\"email\"] != $email) {\r\n return \"Email doesn't match the one we have on file.\";\r\n }\r\n\r\n $password = getPassword($userId);\r\n return $this->send_forgotten_pwd($username, $password, $email);\r\n \r\n }", "public function forgotpasswordAction() {\n $form = new Admin_Form_ResendPassword();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n //check user is registered\n $values = $form->getValues();\n $siteUsersMapper = new Application_Model_Table_AdminUsers();\n $exists = $siteUsersMapper->fetchByUsername($values['email_address']);\n if($exists){\n //user exists\n $recoveryEmailsMapper = new Application_Model_Table_AdminUserRecoveryEmails();\n $recoveryEmail = $recoveryEmailsMapper->createRow();\n $recoveryEmail->admin_user_id = $exists->admin_user_id;\n $recoveryEmail->email_address = $exists->username;\n $recoveryEmail->hashActivationKey();\n $recoveryEmail->save();\n }\n $this->_helper->FlashMessenger->addMessage('You password has been reset, please check your email' , 'successful');\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-dashboard', true);\n }\n }\n $this->view->form = $form;\n }", "public function forgot_password() {\n $flash = null;\n // if the user has tried logging in\n if(isset($_POST['username'])){\n $email = $_POST['username'];\n $user = $this->User->getByEmail($email);\n $pass = rand(111111, 999999);\n if($this->User->setPassword($user['id'], $pass)) {\n $text = <<<END\nBecause of a request on our site, your password has been reset. To change your password, go to /users/change_password\nYour username is: {$email}\nYour password is: {$pass}\nEND;\n $email = self::getLib('email');\n $html = $email->text2html($text, email);\n $email->setSender('support');\n $email->setReplyTo('support');\n $email->setRecipients( array($recipient) );\n $email->setSubject(\"Your password has been reset\");\n $email->addMessagePart($text);\n $email->addMessagePart($html, \"html\");\n $email->send();\n $flash = \"An email with your new password has been sent to you. You should receive it shortly.\";\n } else {\n $flash = \"An error occured.\";\n }\n } else {\n $flash = \"Please enter a user name.\";\n }\n return array('flash' => $flash);\n }", "public function newPassword() {\n $this->form_validation->set_rules('email', 'Email', 'required');\n $this->form_validation->set_rules('temp_code', 'Temporärer Code', 'required');\n $this->form_validation->set_rules('password', 'Passwort', 'required');\n \n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n $this->loadUser();\n \n if ($this->user_model->getValue('temp_code') != $this->input->post('temp_code')) {\n \t$this->error(404, 'Verification error');\n }\n \n if ($this->user_model->getValue('temp_code_valid_until') < date('Y-m-d H:i:s')) {\n \t$this->error(408, 'Provided code not valid anymore');\n }\n \n $this->user_model->setValue(\n \t'hashed_password',\n \tpassword_hash($this->input->post('password'), PASSWORD_DEFAULT));\n \t\n if (! $this->user_model->updatePassword()) {\n \t$this->error(400, 'Error wail updating password');\n }\n \n $data['new password'] = 'set';\n $this->response($data);\n }", "public function reset_pass() {\n \t\t$email = $this->input->post('email');\n\n\t $pass = $this->generate_pass(16);\n\t $hash = password_hash($pass, B_CRYPT); // http://php.net/manual/en/function.password-hash.php\n\n\t $this->load->model('users_table');\n\t $this->users_table->update_password($email, $hash);\n\n\t $this->send_email($email, $pass, \"2\");\n \t}", "public static function password() {\n if ( !isset($_POST['email']) ) {\n return;\n }\n \n $password = substr(Helper::hash(rand(0,16^32).$_POST['email']),0,12);\n \n $result = Database::checkUser($_POST['email']);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzer!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n return;\n }\n \n $id = $result[0]['id'];\n $passwordold = $result[0]['password'];\n \n $pw = Helper::hash($password.$_POST['email']);\n \n $success = Database::setPassword($id,$passwordold,$pw);\n if ( $success !== false ) {\n self::passwordMail($_POST['email'],$password);\n self::setError('Ein neues Passwort wurde dir zugeschickt!<br>');\n } else {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n }\n }", "private function send_new_password_email( $email, $new_password ){\n\t\t\n\t\t$user = $this->mysqli->get_user( $email, md5( $new_password ) );\n\t\t\n\t\t$email_logo_url = get_option( 'ec_option_email_logo' );\n\t \t\n\t\t// Get receipt\n\t\tob_start();\n if( file_exists( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_retrieve_password_email.php' ) )\t\n\t\t\tinclude( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_retrieve_password_email.php' );\t\n\t\telse\n\t\t\tinclude( WP_PLUGIN_DIR . \"/\" . EC_PLUGIN_DIRECTORY . '/design/layout/' . get_option( 'ec_option_latest_layout' ) . '/ec_account_retrieve_password_email.php' );\n\t\t$message = ob_get_contents();\n\t\tob_end_clean();\n\t\t\n\t\t$headers = array();\n\t\t$headers[] = \"MIME-Version: 1.0\";\n\t\t$headers[] = \"Content-Type: text/html; charset=utf-8\";\n\t\t$headers[] = \"From: \" . get_option( 'ec_option_password_from_email' );\n\t\t$headers[] = \"Reply-To: \" . get_option( 'ec_option_password_from_email' );\n\t\t$headers[] = \"X-Mailer: PHP/\".phpversion();\n\t\t\n\t\t$email_send_method = get_option( 'ec_option_use_wp_mail' );\n\t\t$email_send_method = apply_filters( 'wpeasycart_email_method', $email_send_method );\n\t\t\n\t\tif( $email_send_method == \"1\" ){\n\t\t\twp_mail( $email, $GLOBALS['language']->get_text( \"account_forgot_password_email\", \"account_forgot_password_email_title\" ), $message, implode(\"\\r\\n\", $headers));\n\t\t\n\t\t}else if( $email_send_method == \"0\" ){\n\t\t\tmail( $email, $GLOBALS['language']->get_text( \"account_forgot_password_email\", \"account_forgot_password_email_title\" ), $message, implode(\"\\r\\n\", $headers));\n\t\t\t\n\t\t}else{\n\t\t\tdo_action( 'wpeasycart_custom_forgot_password_email', get_option( 'ec_option_password_from_email' ), $email, \"\", $GLOBALS['language']->get_text( \"account_forgot_password_email\", \"account_forgot_password_email_title\" ), $message );\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function regeneratePassword(string $email): void;", "function userRandomPassword()\n{\n\n global $errorSearch;\n\n $length = 20;\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+-._#!?%';\n $charactersLength = strlen($characters);\n $randomString = '';\n\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n $password_hash = password_hash($randomString, PASSWORD_DEFAULT);\n\n if (database::getConnections()->updateAdminRandomPassword(\"userdata\", $_POST[\"userId\"], $password_hash) == true) {\n $errorSearch = '<p class=\"success\">Erfolgreich das Passwort geändert. Dem User wurde ein Random Passwort per E-Mail zugeschickt!</p>';\n\n // ACHTUNG // ACHTUNG // ACHTUNG // ACHTUNG // ACHTUNG // ACHTUNG // ACHTUNG // ACHTUNG\n // SPÄTER ENTFERNEN NUR ZUM AUSPROBIEREN UND SCHAUEN, SOLANGE AUCH DIE MAIL NICHT AUFTAUCHT!\n echo 'Das Neue Passwort von dem User lautet (Ohne Leerzeichen und \"\") = \"' . $randomString . '\" !';\n } else {\n $errorSearch = '<p class=\"error\">Es ist ein Fehler aufgetreten und das Passwort des Users konnte nicht abgeändert werden. Bitte wende dich an den Besitzer und Backend Developer!</p>';\n }\n\n $newMail = new mail();\n $newMail->randomPasswordMail($_POST[\"userEmail\"], $randomString);\n}", "function procForgotPass() {\n global $database, $session, $mailer, $form;\n /* Username error checking */\n $subuser = $_POST['user'];\n $field = \"user\"; //Use field name for username\n if (!$subuser || strlen($subuser = trim($subuser)) == 0) {\n $form->setError($field, \"Username not entered<br>\");\n } else {\n /* Make sure username is in database */\n $subuser = stripslashes($subuser);\n if (strlen($subuser) < 5 || strlen($subuser) > 30 ||\n !eregi(\"^([0-9a-z])+$\", $subuser) ||\n (!$database->usernameTaken($subuser))) {\n $form->setError($field, \"Username does not exist<br>\");\n }\n }\n\n /* Errors exist, have user correct them */\n if ($form->num_errors > 0) {\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $form->getErrorArray();\n }\n /* Generate new password and email it to user */ else {\n /* Generate new password */\n $newpass = $session->generateRandStr(8);\n\n /* Get email of user */\n $usrinf = $database->getUserInfo($subuser);\n $email = $usrinf['email'];\n\n /* Attempt to send the email with new password */\n if ($mailer->sendNewPass($subuser, $email, $newpass)) {\n /* Email sent, update database */\n $database->updateUserField($subuser, \"password\", md5($newpass));\n $_SESSION['forgotpass'] = true;\n }\n /* Email failure, do not change password */ else {\n $_SESSION['forgotpass'] = false;\n }\n }\n\n header(\"Location: \" . $session->referrer);\n }", "function sendEmailPassword($user_id, $password){\n\t\n\t $result = $GLOBALS['db']->query(\"SELECT email1, email2, first_name, last_name FROM users WHERE id='$user_id'\");\n\t $row = $GLOBALS['db']->fetchByAssoc($result);\n\t \n\t if(empty($row['email1']) && empty($row['email2'])){\n\t \n\t $_SESSION['login_error'] = 'Please contact an administrator to setup up your email address associated to this account';\n\t return;\n\t }\n\t \n\t require_once(\"include/SugarPHPMailer.php\");\n\t\t$notify_mail = new SugarPHPMailer();\n\t\t$notify_mail->CharSet = AppConfig::setting('email.default_charset');\n\t\t$notify_mail->AddAddress(((!empty($row['email1']))?$row['email1']: $row['email2']), $row['first_name'] . ' ' . $row['last_name'] );\n \n\t\tif (empty($_SESSION['authenticated_user_language'])) {\n\t\t\t$current_language = AppConfig::setting('locale.defaults.language');\n\t\t}\n\t\telse {\n\t\t\t$current_language = $_SESSION['authenticated_user_language'];\n\t\t}\n\n\t\t$notify_mail->Subject = 'info@hand Token';\n\t\t$notify_mail->Body = 'Your info@hand session authentication token is: ' . $password;\n\t\tif(AppConfig::setting('email.send_type') == \"SMTP\") {\n\t\t\t$notify_mail->Mailer = \"smtp\";\n\t\t\t$notify_mail->Host = AppConfig::setting('email.smtp_server');\n\t\t\t$notify_mail->Port = AppConfig::setting('email.smtp_port');\n\t\t\tif (AppConfig::setting('email.smtp_auth_req')) {\n\t\t\t\t$notify_mail->SMTPAuth = TRUE;\n\t\t\t\t$notify_mail->Username = AppConfig::setting('email.smtp_user');\n\t\t\t\t$notify_mail->Password = AppConfig::setting('email.smtp_password');\n\t\t\t}\n\t\t}\n\n\t\t$notify_mail->From = 'no-reply@' . AppConfig::setting(array('email.from_host_name', 'site.host_name'));\n\t\t$notify_mail->FromName = 'info@hand Authentication';\n\n\t\tif(!$notify_mail->Send()) {\n\t\t\t$GLOBALS['log']->warn(\"Notifications: error sending e-mail (method: {$notify_mail->Mailer}), (error: {$notify_mail->ErrorInfo})\");\n\t\t}\n\t\telse {\n\t\t\t$GLOBALS['log']->info(\"Notifications: e-mail successfully sent\");\n\t\t}\n\t\n\t\t\t\n\t\t\n\t}", "public function forgotten_password() {\n $email = $this->input->post('email');\n if (!$this->users_model->fields(array('id'))->where('email', $email)->limit(1)->get()) {\n return $this->send_error('NOT_REGISTERED');\n }\n $this->load->helper('string');\n $this->load->library('email');\n $token = random_string('sha1');\n if (!$this->users_model->where('email', $email)->update(array('forgotten_password_code' => $token, 'forgotten_password_time' => time()))) {\n return $this->send_error('ERROR');\n }\n $this->email->from(config_item('email_from'), config_item('email_from_name'))\n ->to($email)\n ->subject('Passwrod reset | Go4Slam app')\n ->message('Hello, <br><br> Press the link below to set a new password. <br><br><a href=\"' . base_url() . 'user/reset_password/' . urlencode($email) . '/' . urlencode($token) . '\">Click here</a>')\n ->set_mailtype('html');\n if (!$this->email->send()) {\n return $this->send_error('UNABLE_TO_SEND_EMAIL');\n }\n return $this->send_success();\n }", "public function lostPassword() {\n $this->form_validation->set_rules('email', 'Email', 'required');\n\n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n $this->loadUser();\n \n $this->user_model->setValue(\n \t'temp_code', $this->generateTempCode());\n $this->user_model->setValue(\n \t'temp_code_valid_until', date('Y-m-d H:i:s', strtotime('+ 2 days')));\n \t\n if (! $this->user_model->updateTempCode()) {\n \t$this->error(400, 'Something went wrong');\n }\n\n\t\t$this->sendEmail(\n\t\t\t$this->input->post('email'), \n\t\t\t'Set New Password', \n\t\t\t$this->getLostPasswordMailBody($this->user_model->getValue('temp_code')));\n\t\t$data['msg'] = 'New password mail for ' . $this->input->post('email') . ' sent.';\n\t\t$this->response($data);\n }", "function forgotPassword(){\n\t\t\t$this->__dataDecode();\n\t\t\tif(!empty($this->data)){\n\t\t\t$data = $this->data;\n\t\t\t$username = $data['User']['userName'];\n\t\t\t$userDetail = $this->User->find('first',array('conditions'=>array(\"User.username \"=> $username)));\n\t\t\tif($username==null){\n\t\t\t\techo $username;\n\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t$response['response']['message']\t= 'please Enter userName';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\telse{ \n\t\t\t\t$userID = $userDetail['User']['id'];\n\t\t\t\t$data = $this->data;\n\t\t\t\t$email_to = $userDetail['User']['email'];\n\t\t\t\tif($userDetail['User']['username'] == ($username)){\n\t\t\t\t\t$password= $this->createRandomPassword();\n\t\t\t\t\t$new_password=md5($password);\n\t\t\t\t\t$this->User->id = $userID;\n\t\t\t\t\t$this->data['User']['password'] = trim($new_password);\n\t\t\t\t\tunset($this->User->validate['password']);\n \t\t\t\t\tunset($this->User->validate['confirm_password']);\n\t\t\t\t\tif($this->User->save($this->data)){\n\t\t\t\t\t\t//Default Mail component is called, to send mail. We are setting the variables for sending email\n\t\t\t\t\t\t$this->Email->to = $email_to;\n\t\t\t\t\t\t//$this->Email->bcc = array($adminEmail);\n\t\t\t\t\t\t$this->Email->subject = 'Your password here';\n\t\t\t\t\t\t$this->Email->replyTo = EMAIL_REPLY;\n\t\t\t\t\t\t$this->Email->from = \"iWrestled admin <\".EMAIL_REPLY.\">\";\n\t\t\t\t\t\t//Here, the element in /views/elements/email/html/ is called to create the HTML body\n\t\t\t\t\t\t$this->Email->template = 'simple_message'; // note no '.ctp'\n\t\t\t\t\t\t//Send as 'html', 'text' or 'both' (default is 'text')\n\t\t\t\t\t\t$this->Email->sendAs = 'both'; // because we like to send pretty mail\n\t\t\t\t\t\t//Set view variables as normal\n\t\t\t\t\t\t$this->set('userDetail', $userDetail);\n\t\t\t\t\t\t$this->set(\"password\", $password);\n\t\t\t\t\t\t//Do not pass any args to send()\n\t\t\t\t\t\tif($this->Email->send()){\n\t\t\t\t\t\t\t$response['error']\t\t\t= 0;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'success';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'Password send to your email id';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{ \n\t\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'Password Enter valid email id';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}", "public function p_emailpassword(){\n\n # if javascript is disabled this checks if user entered email and password to login\n if (!$_POST['email']) {\n Router::redirect(\"/users/emailpassword/error\"); \n }\n # proceed with checking if email exists\n else { \n $q= 'Select user_id \n From users \n WHERE email=\"'.$_POST['email'].'\"';\n \n $user_id= DB::instance(DB_NAME)->select_field($q);\n \n #email doesnt exists\n if(!$user_id){ \n \n Router::redirect(\"/users/emailpassword/error1\"); \n }\n # email exists , email the password that is generated using generate_random_string\n else{\n $password=Utils::generate_random_string(8); \n $new_password=sha1(PASSWORD_SALT.$password);\n $new_modified= Time::now();\n\n $data=Array('modified'=>$new_modified,\n 'password'=>$new_password \n );\n $success= DB::instance(DB_NAME)->update('users',$data,'WHERE user_id=' .$user_id); \n \n \n $to[] = Array(\"name\" => $_POST['email'], \"email\" => $_POST['email']);\n $from = Array(\"name\" => APP_NAME, \"email\" => APP_EMAIL);\n $subject = \"Password reset message from \".APP_NAME; \n \n $body = \"This is the password: \".$password ;\n # Send email\n $sent = Email::send($to, $from, $subject, $body, FALSE, '');\n # IF EMAIL IS SENT and password update is successful proceed to login \n if($sent AND $success)\n Router::redirect('/users/login');\n # else error out, either send email failed or couldnt update database \n else\n Router::redirect('/users/emailpassword/error2');\n }\n } # end of first else \n }", "public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "function sendEmail($newPassword){\n\t\tglobal $recoverPasswordInputs;\n\t $mail = new PHPMailer(); // create a new object\n\t $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = mess\n\t $mail->IsSMTP(); // enable SMTPages only\n\t $mail->SMTPAuth = true; // authentication enabled\n\t $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail\n\t $mail->Host = \"smtp.gmail.com\";\n\t $mail->Port = 465; // or 587\n\t $mail->IsHTML(true);\n\t $mail->Username = \"[email protected]\";//set the gmail into the here2help gmail\n\t $mail->Password = \"helpyhelp2\";//set the password to make a direct sign in\n\t $mail->SetFrom(\"[email protected]\");\n\t $mail->Subject = \"Recover Password - here2help\";\n\t $mail->Body = \"Hi \". $recoverPasswordInputs['fname'].\" \". $recoverPasswordInputs['lname'].\",<br><br> This is your temporary password: <b>\".$newPassword.\"</b> <br><br> To change your password, please login to here2help.com and access your manage account page. <br><br>Cheers, <br><br> The here2help team <br><br>website: here2help.com <br> email: [email protected] <br> phone: 3333 3333\";\n\t $mail->AddAddress( $recoverPasswordInputs['email']);\n\t $mail->Send();\n\t}", "public function activatenewpasswordAction()\n {\n $newKey = $this->getRequest()->getParam(self::ACTIVATION_KEY_PARAMNAME, null);\n $userId = $this->getRequest()->getParam(User::COLUMN_USERID, null);\n\n $user = $this->_getUserFromIdAndKey($userId, $newKey);\n if(!$user){\n Globals::getLogger()->info(\"New password activation: user retrieval failed - userId=$userId, key=$newKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::NO_SUCH_USER));\n }\n\n $user->{User::COLUMN_PASSWORD} = $user->newPassword;\n $user->newPassword = '';\n $user->activationKey = '';\n\n $id = $user->save();\n if($id != $user->{User::COLUMN_USERID}){\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::NEWPASSWORD_ACTIVATION_FAILED));\n }\n\n Utils::deleteCookie(User::COOKIE_MD5);\n Utils::deleteCookie(User::COOKIE_USERNAME);\n Utils::deleteCookie(User::COOKIE_REMEMBER);\n\n $this->_savePendingUserIdentity($userId);\n\n $this->_helper->redirectToRoute('userupdate',array('newPassword'=>true));\n }", "static function password_forgot() {\n $model = \\Auth::$model;\n\n # hash GET param exists\n if (!$hash = data('hash'))\n go('/');\n\n # user hash exists\n $user = $model::first(array(\n 'fields' => 'id, email, name',\n 'where' => \"hash_password_forgot = '$hash'\"\n ));\n\n if (empty($user))\n go('/');\n\n # POST passwords sent\n if ($model::data()) {\n $user->password = $model::data('password');\n $user->password_confirm = $model::data('password_confirm');\n\n # validate passwords\n if ($user->validate()) {\n $user->password = auth_encrypt($user->password);\n $user->hash_password_forgot = '';\n\n $user->edit() ?\n flash('Sua senha foi alterada com sucesso.') :\n flash('Algo ocorreu errado. Entre em contrato com a empresa.', 'error');\n\n go('/');\n }\n }\n\n globals('user', $user);\n }", "public function sendEmailGeneratePasswordNotification($password)\n {\n $this->notify(new SendMailNewPasswordNotification($password));\n }", "public function resetpassAction()\n\t{\n\t\t$email='[email protected]';\n\n\t\t$customer = Mage::getModel('customer/customer')\n ->setWebsiteId(Mage::app()->getStore()->getWebsiteId())\n ->loadByEmail($email);\n\t\t$customer->sendPasswordResetConfirmationEmail();\n\t}", "public function generatePasswordResetToken()\n {\n $this->pwd_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Security::instance()->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken(): void\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->passwordResetToken = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function postForgotPw(){\n\t\t//find user where email = input email\n\t\t$user = User::where('email','=',Str::lower(Input::get('email')));\n\n\t\t//if user found\n\t\tif($user->count()){\n\n\t\t\t//if match found\n\t\t\t$user \t\t\t\t\t= $user->first();\n\n\t\t\t//generate new activate code and new password\n\t\t\t$code \t\t\t\t\t= str_random(60);\n\t\t\t$password \t\t\t\t= str_random(10);\n\n\t\t\t//update value in db\n\t\t\t$user->activate_code\t= $code;\n\t\t\t$user->password_temp\t= Hash::make($password);\n\n\t\t\t//save to db\n\t\t\tif($user->save()){\n\n\t\t\t\t//send email to user with new password and activate link\n\t\t\t\tMail::send('emails.auth.forgot_mail',array('link' => URL::route('account-recover', $code), 'name' => $user->last_name, 'password'=>$password), function($message) use ($user){\n\t\t\t\t\t$message->to($user->email, $user->last_name)->subject(\"It's ok, it happens. Here is yours...\");\n\t\t\t\t});\t\t\t\t\n\t\t\t\t\n\t\t\t\t//return to forgot-pw page\n\t\t\t\treturn Redirect::route('account-forgot-pw')\n\t\t\t\t\t\t->with('global','<div class=\"alert alert-success\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-envelope\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\tNew password has been sent. Please check your mail.\n\t\t\t\t\t\t\t\t\t\t</div>');\n\t\t\t}\n\n\t\t}else{\n\n\t\t\t//return error msg wrong old password\n\t\t\treturn Redirect::route('account-forgot-pw')\n\t\t\t\t\t->with('global','<div class=\"alert alert-danger\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"sr-only\">Error:</span>\n\t\t\t\t\t\t\t\t\t\tIncorrect Email Address. Please try again.\n\t\t\t\t\t\t\t\t\t</div>');\n\t\t}\n\t}", "public function passwordEmail()\n {\n $this->shellshock(request(), [\n 'email' => 'required|email',\n 'g-recaptcha-response' => 'sometimes|recaptcha',\n ]);\n\n if (($user = app(config('turtle.models.user'))->where('email', request()->input('email'))->first())) {\n $token = Password::getRepository()->create($user);\n\n Mail::send(['text' => 'turtle::emails.password'], ['token' => $token], function (Message $message) use ($user) {\n $message->subject(config('app.name') . ' Password Reset Link');\n $message->to($user->email);\n });\n\n flash('success', 'Password reset link emailed!');\n\n return response()->json(['reload_page' => true]);\n }\n else {\n return response()->json(['errors' => ['email' => [trans('auth.failed')]]], 422);\n }\n }", "public function generatePasswordResetToken()\n {\n $security = new Security();\n $this->password_reset_token = $security->generateRandomKey() . '_' . time();\n }", "public function forgottenPassword()\n {\n\t\t// Load helpers and libraries\n\t\thelper(['form', 'url']);\n\t\t$M_User = new M_User();\n\n\t\t// Default return\n\t\t$ret = redirect()->to(base_url());\n\n $options = [\n\t\t\t'action' => 'Users/forgottenPassword' // Route\n ];\n \n\t\t$request = $this->request;\n \n\t\t// Retrieving the current step of the process\n\t\t$step = $request->getPostGet('step');\n\n switch ($step){\n\t\t\tcase 1:\n\t\t\t\t// Step 1: Display email form\n\t\t\t\t$ret = json_encode(view(FORM_FORGOTTEN_PWD_STEP_1, $options));\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t// Step 2: Send the email\n\t\t\t\t$postData = $request->getPostGet('forgottenPwd');\n\n\t\t\t\t$options['alert'] = 'Un problème est survenu lors de l\\'envoi de l\\'email.';\n\t\t\t\t$options['type'] = 'danger';\n\n\t\t\t\t$ret = json_encode(view(FORM_FORGOTTEN_PWD_STEP_1, $options));\n\n\t\t\t\tif(is_array($postData))\n {\n\t\t\t\t\t$email = $postData['email'];\n\t\t\t\t\t// Everything went well : sending the password reset email\n\t\t\t\t\tif ($M_User->sendPwdResetEmail($email) == SC_SUCCESS) {\n\t\t\t\t\t\t$options['alert'] = 'Un email vient de vous être envoyé. Merci de cliquer sur le lien qu\\'il contient.';\n $options['type'] = 'success';\n\t\t\t\t\t\t$ret = json_encode(view(FORM_FORGOTTEN_PWD_STEP_2, $options));\n }\n\t\t\t\t\t// TODO - User not found\n }\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t// Step 3 : Token verification\n\t\t\t\t$token = $request->getPostGet('token');\n\n\t\t\t\t$options = [\n\t\t\t\t\t'action' => 'Users/forgottenPassword', // Route\n\t\t\t\t\t'token' => $token, // Security token\n\t\t\t\t\t'script' => self::ENCRYPTION_URL // Script URL for SHA256 encryption\n\t\t\t\t];\n\n\t\t\t\tif ($M_User->findOneBy('securityToken', $token) != null) {\n\t\t\t\t\t// A corresponding security token has been found in the DB\n\t\t\t\t\t$ret = render(FORM_FORGOTTEN_PWD_STEP_3, $options);\n }\n\t\t\t\t// TODO - Token expired\n\t\t\t\t// TODO - Invalid Token\n\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t// Step 4 : Updating User password\n\t\t\t\t$postData = $request->getPostGet('pwdReset');\n\t\t\t\tif (is_array($postData)){\n\t\t\t\t\tif ($M_User->resetPassword($postData['token'],$postData['password']) != SC_SUCCESS){\n\t\t\t\t\t\t$options = [\n\t\t\t\t\t\t\t'action' => 'Users/forgottenPassword', // Route\n\t\t\t\t\t\t\t'token' => $postData['token'], // Security token\n\t\t\t\t\t\t\t'alert' => 'Une erreur interne est survenue', // Alert message\n\t\t\t\t\t\t\t'type' => 'danger' // Alert type\n\t\t\t\t\t\t];\n\n\t\t\t\t\t\t$ret = render(FORM_FORGOTTEN_PWD_STEP_3, $options);\n } \n }\n\t\t\t\tbreak;\n }\n \n\n return $ret;\n\t}", "function forgot_password()\n\t{\n\t\tif ($this->tank_auth->is_logged_in()) {\t\t\t\t\t\t\t\t\t// logged in\n\t\t\tredirect('');\n\n\t\t} elseif ($this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t// logged in, not activated\n\t\t\tredirect('/auth/send_again/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->forgot_password(\n\t\t\t\t\t\t$this->form_validation->set_value('email')))) {\n\n\t\t\t\t\t$data['site_name'] = $this->config->item('website_name', 'tank_auth');\n\n\t\t\t\t\t// Send email with password activation link\n\t\t\t\t\t$this->_send_email('forgot_password', $data['email'], $data);\n\n\t\t\t\t\t$this->_show_message($this->lang->line('auth_message_new_password_sent'));\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//$this->load->view('auth/forgot_password_form', $data);\n\t\t\tdisplay('forgot_password', $data);\n\t\t}\n\t}", "static function password_forgot() {\n parent::password_forgot();\n view_var('user', globals('user'));\n }", "public function generatePasswordResetToken() {\n $this->employer_password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function forgotpasswordAction()\n {\n $user_service = $this->getServiceLocator()->get('user');\n $email_sent = false;\n\n if ($this->getRequest()->isPost())\n {\n $data = $this->getRequest()->getPost();\n\n $email = trim($data['email']);\n $email = strtolower($email);\n $user_service->emailPassword($email);\n $email_sent = true;\n }\n\n return ['email_sent' => $email_sent];\n }", "public function forgetpasswordAction() {\n \n $modelPlugin = $this->modelplugin();\n $dynamicPath = $modelPlugin->dynamicPath();\n $phpprenevt = $this->phpinjectionpreventplugin(); \n $mailplugin = $this->mailplugin();\n $jsonArray = $modelPlugin->jsondynamic();\n $email = $phpprenevt->stringReplace($_POST['eid']);\n $publisheremailarray = array('email' => $email);\n $chkemail = $modelPlugin->getpublisherTable()->selectEmail($publisheremailarray);\n $currentDatetime = strtotime(date(\"Y-m-d h:i:s\"));\n $restpassallow = 0;\n if ($chkemail[0]['forgetpassTimestamp']) {\n $databaseDatetime = strtotime($chkemail[0]['forgetpassTimestamp']);\n $all = $currentDatetime - $databaseDatetime;\n $day = round(($all % 604800) / 86400);\n $hours = round((($all % 604800) % 86400) / 3600);\n $m = round(((($all % 604800) % 86400) % 3600) / 60);\n\n if ($day <= 0) {\n if ($hours <= 0) {\n if ($m <= 15) {\n $restpassallow = 1;\n $contentone['minutes'] = 15 - $m;\n }\n }\n }\n }\n if (count($chkemail) == 0) {\n $contentone['data'] = 0;\n } else if ($restpassallow == 1) {\n $contentone['data'] = 2;\n } else {\n $id = $chkemail[0][\"publisherId\"];\n $pass1 = password_hash($email, PASSWORD_BCRYPT);\n $arraypass = str_replace('/', '', $pass1);\n $buttonclick = $dynamicPath . \"/Gallery/galleryview/resetpassword/\" . $arraypass;\n $mail_link = \"<a href='\" . $buttonclick . \"' style='background-color: #04ad6a; border: medium none; border-radius: 19px; padding: 12px; color: #fff; text-align: center; text-decoration: none; text-transform: uppercase;'>Click here</a>\";\n $subject = \"[Smartfanpage] Set your password\";\n $from = $jsonArray['sendgridaccount']['addfrom'];\n $keyArray = array('mailCatagory' => 'F_MAIL');\n $getMailStructure = $modelPlugin->getconfirmMailTable()->fetchall($keyArray);\n $getmailbodyFromTable = $getMailStructure[0]['mailTemplate'];\n $mailLinkreplace = str_replace(\"|MAILLINK|\", $mail_link, $getmailbodyFromTable);\n $mailBody = str_replace(\"|DYNAMICPATH|\", $dynamicPath, $mailLinkreplace);\n $fogetPasswordMail = $mailplugin->confirmationmail($email, $from, $subject, $mailBody);\n $keyArray = array('publisherId' => $id);\n $dataForForget = array('forgetpassword' => $arraypass, 'forgetpassTimestamp' => date(\"Y-m-d h:i:s\"));\n $contentone1 = $modelPlugin->getpublisherTable()->updateuser($dataForForget, $keyArray);\n $contentone['data'] = $contentone1;\n $user_session->loginId = ($_SESSION['loginId']);\n $user_session = new \\Zend\\Session\\Container('loginId');\n $user_session->getManager()->destroy();\n }\n echo json_encode($contentone);\n exit;\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Security::generateRandomKey() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Security::generateRandomKey() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Security::generateRandomKey() . '_' . time();\n }", "public function forgotPassword()\n {\n $email = $this->input->post('email');\n $token = bin2hex(random_bytes(25));\n\n $user_id = $this->authentication_helper->checkEmail($email);\n\n if (isset($user_id) && !empty($user_id)) \n {\n $status = $this->authentication_worker->createToken($token, $user_id);\n if ($status) {\n $to_email = $email;\n $subject = \"Redefina sua senha\";\n $url = site_url('authentication/resetNewPassword' . \"?token=\" . $token);\n $message = \"Redefina sua senha da ZZjober clicando no link<br/><a href='\" . $url. \"'>\".$url.\"</a>\";\n $this->sendMail($to_email, $subject, $message);\n $this->session->set_flashdata('success_msg', 'Verifique seu e-mail para redefinir sua nova senha através do link');\n redirect('home/Entrar');\n }\n } else {\n $this->session->set_flashdata('error_msg', 'E-mail não encontrado');\n redirect('home/Entrar');\n }\n\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\r\n {\r\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\r\n }", "public function generatePasswordResetToken() {\n\t\t$this->txt_password_reset_token = Yii::$app->security->generateRandomString () . '_' . time ();\n\t}", "public static function generatePassword() {\r\n return StringGenerator::generateRandomAlphaAndNumbersAndSpecial(12);\r\n }", "static function password_expired_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n\n password_expired_email($user) ?\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você criar uma nova senha.\") :\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "public function generatePasswordResetToken()\n\t{\n\t\t$this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n\t}", "public function forget_password($username)\n {\n try\n {\n $stmt = $this->db->prepare(\"SELECT email FROM users WHERE email=:email LIMIT 1\");\n $stmt->execute(array(\n 'email'=> mb_strtolower($username, 'UTF-8')\n ));\n $userRow = $stmt->fetch(PDO::FETCH_ASSOC);\n if($stmt->rowCount() > 0)\n {\n $tokenreset = sha1(uniqid().$username);\n $linkreset = \"http://interminale.fr.nf/forget_password?email=\".$username.\"&token=\".$tokenreset;\n\n $addmdpoublie = $this->db->prepare(\"INSERT INTO forget_password(email,token) VALUES(:email, :token)\");\n $addmdpoublie->execute(array(\n 'email'=> mb_strtolower($username, 'UTF-8'),\n 'token' => $tokenreset\n ));\n\n require $_SERVER['DOCUMENT_ROOT'].'/app/controllers/phpmailer/PHPMailerAutoload.php';\n\n // Retrieve the email template required\n $msg_html = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/app/view/email-forgetpassword.template.html');\n\n // Replace the % with the actual information\n $msg_html = str_replace('%linkreset%', $linkreset, $msg_html);\n\n $mail = new PHPMailer;\n $mail->isSMTP();\n $mail->SMTPDebug = 0;\n $mail->Debugoutput = 'html';\n $mail->Host = 'smtp.gmail.com';\n $mail->Port = 587;\n $mail->SMTPSecure = 'tls';\n $mail->SMTPAuth = true;\n $mail->Username = \"[email protected]\";\n $mail->Password = \"~Py+Ai3j(O5g8!\";\n $mail->isHTML(true);\n $mail->CharSet = 'UTF-8';\n $mail->setFrom('[email protected]', 'Interminale');\n $mail->addReplyTo($username);\n $mail->addAddress($username);\n $mail->Subject = 'Réinitialisation mot de passe - Interminale';\n $mail->Body = $msg_html;\n\n $mail->AltBody = strip_tags($msg_html);\n\n //send the message, check for errors\n if (!$mail->send()) {\n $message = array('status' => 0, 'err' => \"L'email n'a pas pu être envoyé :/ Réessayez.\");\n return $message;\n } else {\n $message = array('status' => 1, 'err' => 'Un mail a été envoyé à '.$username.'.<br />Cliquez sur le lien reçu pour changer le mot de passe');\n return $message;\n }\n }\n else\n {\n $message = array('status' => 0, 'err' => 'L\\'adresse mail ne conrespond à aucun compte :/');\n return $message;\n }\n }\n catch(PDOException $e)\n {\n die('<h1>ERREUR LORS DE LA CONNEXION A LA BASE DE DONNEE. <br />REESAYEZ ULTERIEUREMENT</h1>');\n }\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = UsniAdaptor::app()->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\r\n {\r\n $this->password_reset_token = Yii::$app->getSecurity()->generateRandomString() . '_' . time();\r\n }", "private function generate_pass()\n {\n echo password_hash('admin', PASSWORD_BCRYPT);\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->getSecurity()->generateRandomString() . '_' . time();\n }", "public function resetAndUpdatePassword() {\n $this->validate ( $this->request, $this->getRules () );\n $user = User::where ( 'email', $this->request->email )->first ();\n \n if (!empty($user) && count ( $user->toArray() ) > 0) {\n $user->password = Hash::make ( (true) ? config()->get('app.user_password'): $this->generatePassword() );\n \n $user->save ();\n $this->email = $this->email->fetchEmailTemplate ( 'admin_forgot' );\n $this->email->subject = str_replace(['##SITE_NAME##'], [config ()->get ( 'settings.general-settings.site-settings.site_name' )], $this->email->subject);\n $this->email->content = str_replace (['##USERNAME##','##FORGOTPASSWORD##'],[$user->name,'admin123'],$this->email->content );\n $this->notification->email ( $user, $this->email->subject, $this->email->content );\n return true;\n } else {\n return false;\n }\n }", "public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken() {\n $this->password_reset_token = Security::generateRandomKey() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = (new Security)->generateRandomKey() . '_' . time();\n }", "public function validateForgotPassword($input){\n $userData = array();\n $error=array();\n\n\n if(empty($input['email'])){\n $error = array_merge($error,array('email' => 'This field is required.'));\n }\n else{\n $cleanData = $this->cleanInput($input['email']);\n require_once('../app/Core/Database.php');\n $db = new Database();\n $conn = $db->setConnection();\n if($conn !== null){\n $stmt = $conn->query(\"SELECT username,email FROM user where email='\".$cleanData.\"'\");\n if($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n $username = $row['username'];\n $newPassword = uniqid();\n require '../app/vendor/autoload.php';\n $mail = new PHPMailer(true);\n try{\n $mail->isSMTP();// set mailer to use smtp\n $mail->Host = 'smtp.gmail.com'; //specify the smtp server\n $mail->SMTPAuth = true; // enable smtp authenticatiion\n $mail->Username = \"[email protected]\"; // SMTP username\n $mail->Password = \"hello@there123HT\"; // SMTP pasword\n $mail->SMTPSecure = \"tls\"; // Enable TLS encryption\n $mail->Port = 587; // TCP port to connect to\n\n // recipient\n $mail->setFrom(\"[email protected]\",\"Seralance\");\n $mail->addAddress($row['email'],$row['email']);\n \n //content\n $mail->isHTML(true); // set email format to html\n $mail->Subject = \"Forgotten password\";\n $msg =<<<EOT\n <html>\n <body>\n <div style=\"text-align: center;\">\n <img src=\"{$_SESSION['baseurl']}public/assets/images/seralance-logo.png\" alt=\"Seralance\">\n </div>\n \n <p style=\"text-align: center;\">\n Your username is {$username}.\n </p>\n <p style=\"text-align: center;\">\n Your newly generated password is {$newPassword}.\n </p>\n </body>\n </html>\n EOT;\n\n $mail->Body =$msg;\n\n $mail->send();\n $this->updatePassword(array('email'=>$row['email'],'newpassword'=>$newPassword));\n\n }\n catch(Exception $e){\n $error = array_merge($error,array('email' => 'Sorry for the inconvenience! We could not send a new password. Please try again later.'));\n } \n }\n else{\n $error = array_merge($error,array('email' => 'Email does not exist.'));\n } \n } \n }\n \n if(empty($error)){\n return array('valid'=>1 ,'data'=>$userData);\n }\n else{\n return array('valid'=>0,'error'=>$error);\n }\n\n \n }", "public function send_password(){\n\t\t$tmpUsername = $_POST[\"txtUsername\"];\n\t\t$tmpEmail = $_POST[\"txtEmail\"];\n\t\t$inRepository = new InterfacePersonRepo;\n\t\t$tmpUser = $inRepository->getRepositoryByUsername($tmpUsername);\n\t\tif(count($tmpUser)>1){\n\t\t\texit();\n\t\t}\n\t\tif($tmpUser[0]->Email == $tmpEmail){\n\t\t\t$fgUser = new Person;\n\t\t\t$fgUser->setUsername($tmpUsername);\n\t\t\t$fgUser->setEmail($tmpEmail);\n\t\t\t$email = $inRepository->sendmailRepository($fgUser);\n\t\t\treturn View::make('alert/authen/alertEmail')->with('Email',$email);\n\t\t}else{\n\t\t\treturn View::make('alert/authen/alertEmail2');\n\t\t}\n\t}", "public function generatePasswordResetToken()\n {\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function generatePasswordResetToken()\n {\n $this->reset_token = \"P\" . Yii::$app->security->generateRandomString() . '_' . time();\n }", "function generatePW($email){\n $pw = password_hash($email,PASSWORD_DEFAULT);\n return $pw;\n }", "public function setNewPassword()\n {\n PasswordResetModel::setNewPassword(\n Request::post('user_name'), Request::post('user_password_reset_hash'),\n Request::post('user_password_new'), Request::post('user_password_repeat')\n );\n Redirect::to('index');\n }", "public function ResetPassword() {\n\t\t\t$strPassword = strtolower(substr(md5(microtime()), 4, 8));\n\t\t\t$this->SetPassword($strPassword);\n\t\t\t$this->PasswordResetFlag = true;\n\t\t\t$this->Save();\n\n\t\t\t// Setup Token Array\n\t\t\t$strTokenArray = array(\n\t\t\t\t'NAME' => $this->strFirstName . ' ' . $this->strLastName,\n\t\t\t\t'USERNAME' => $this->strUsername,\n\t\t\t\t'PASSWORD' => $strPassword\n\t\t\t);\n\n\t\t\t// Send Message\n\t\t\tQApplication::SendEmailUsingTemplate('forgot_password', 'Qcodo.com Credentials', QCODO_EMAILER,\n\t\t\t\t$this->SmtpEmailAddress, $strTokenArray, true);\n\t\t}", "public function generatePassword()\n {\n $a = $this->generateUsername();\n $b = random_int(0, 9);\n $c = random_int(0, 9);\n $d = random_int(0, 9);\n return \"$a$b$c$d\";\n }", "function sendUserForgotPassword($argArrPOST) {\n\n @extract($argArrPost);\n $objValid = new Validate_fields;\n $objCore = new Core();\n $objValid->check_4html = true;\n\n $objValid->add_text_field('Email', strip_tags($argArrPOST['frmUserLoginEmail']), 'email', 'y');\n\n if ($objValid->validation()) {\n $errorMsgFirst = 'Please enter valid email address!';\n } else {\n $errorMsg = $objValid->create_msg();\n }\n if ($errorMsg) {\n $objCore->setErrorMsg($errorMsg);\n return false;\n } else {\n $arrUserFlds = array('pkUserID', 'UserFirstName', 'UserEmail', 'UserPassword');\n $varUserWhere = ' 1 AND UserEmail = \\'' . trim($argArrPOST['frmUserLoginEmail']) . '\\'';\n $arrUserList = $this->select(TABLE_USERS, $arrUserFlds, $varUserWhere);\n if ($arrUserList) {\n //update the random key in the database\n\n $varRandomPassword = $this->generate_random_string(5); //die;\n\n\n $varRandomKey = md5(uniqid(microtime()));\n $arrUpdateArray = array('UserAuthorizationToken' => $varRandomKey, 'UserPassword' => md5($varRandomPassword));\n $varaffectedRecord = $this->update(TABLE_USERS, $arrUpdateArray, $varUserWhere);\n\n\n\n $argUserName = $arrUserList[0]['UserEmail'];\n //$argPassword = $arrUserList[0]['UserPassword'];\n $argPassword = $varRandomPassword;\n $argFirstName = $arrUserList[0]['UserFirstName'];\n\n //Send forget Password To User\n $varPath = '<img src=\"' . SITE_ROOT_URL . 'common/images/logo2.png' . '\"/>';\n\n $varToUser = $argArrPOST['frmUserLoginEmail'];\n $varFromUser = SITE_NAME . '<' . SITE_EMAIL_ADDRESS . '>';\n $varSubject = 'Venueset:Login Details';\n $varResetPasswordlink = '<a href=\"' . SITE_ROOT_URL . 'reset_password.php?userId=' . $arrUserList[0]['pkUserID'] . '&authorizationToken=' . base64_encode($varRandomKey) . '\">Reset Password</a>';\n $varOutput = file_get_contents(SITE_ROOT_URL . 'common/email_template/html/user_forget_password.html');\n $varUnsubscribeLink = 'Click <a href=\"' . SITE_ROOT_URL . 'unsubscribe.php?user=' . md5(trim($argArrPOST['frmUserLoginEmail'])) . '\" target=\"_blank\">here</a> to unsubscribe.';\n\n $arrBodyKeywords = array('{USER_FIRST_NAME}', '{USER_NAME}', '{USER_PASSWORD}', '{IMAGE_PATH}', '{SITE_NAME}', '{RESET_PASSWORD_LINK}', '{UNSUBSCRIBE_LINK}');\n\n $arrBodyKeywordsValues = array($argFirstName, $argUserName, $argPassword, $varPath, SITE_NAME, $varResetPasswordlink, $varUnsubscribeLink);\n $varBody = str_replace($arrBodyKeywords, $arrBodyKeywordsValues, $varOutput);\n //echo $varBody;die;\n $objCore->sendMail($varToUser, $varFromUser, $varSubject, $varBody);\n $objCore->setSuccessMsg(FRON_END_USER_FORGET_PASSWORD_SEND);\n return true;\n } else {\n $objCore->setErrorMsg(FRON_END_USER_EMAIL_EXIST_ERROR);\n return false;\n }\n }\n }", "public function generatePasswordResetToken() {\n $this->password_reset_token = Yii::$app->security->generateRandomString();\n }", "public static function generatePassword()\n {\n return bcrypt(str_random(35));\n }", "public function resetPasswordSendEmail()\n {\n // if user is logged in, do not let him access this page\n if( Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $studentEmail = SCMUtility::stripTags($_POST['forgot_password_email']);\n\n // create token\n $token = uniqid('',true);\n\n // start session reset password\n $this->resetPasswordSessionActivate($token);\n\n // get student\n $student = User::where('email',$studentEmail)->first();\n\n if( ! $student )\n {\n SCMUtility::setFlashMessage('Sorry, we cannot find any user associated with that email address.','danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n // send password reset link to email\n $studentMailerService = new StudentMailerService();\n $studentMailerService->sendResetPasswordLink($student->email,$token,$student->id);\n\n SCMUtility::setFlashMessage('A reset password link has been sent to your email. Open your email and follow the link to reset your account password. Please do not close this browser during the process. (If you are not receiving a password reset email, consider contacting me directly.)');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }", "public function forgotPassword()\n {\n if ($this->issetPostSperglobal('email') && !empty($this->getPostSuperglobal('email'))) {\n if ($this->users_manager->resetToken($this->getPostSuperglobal('email'))) {\n $this->session->writeFlash('success', \"Les instructions pour réinitialiser votre mot de passe vous ont été envoyées par email, vous avez 30 minutes pour le faire.\");\n } else {\n $this->session->writeFlash('danger', \"Aucun compte ne correspond à cet adresse mail : {$this->getPostSuperglobal('email')}.\");\n }\n } else {\n $this->session->writeFlash('danger', \"L'adresse mail n'est pas ou est mal renseignée.\");\n }\n $this->render('forgot-password', ['head'=>['title'=>'Mot de passe oublié', 'meta_description'=>'']]);\n }", "public function generatePasswordResetToken(){\n $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public static function generatePassword()\n {\n return bcrypt(str_random(35));\n }" ]
[ "0.78352356", "0.7566731", "0.75619286", "0.7478349", "0.7401241", "0.70478725", "0.6927625", "0.6879688", "0.68146867", "0.6776889", "0.6755246", "0.6752207", "0.6745269", "0.6724576", "0.67103565", "0.66854924", "0.6681211", "0.6624539", "0.6604537", "0.6597766", "0.6588387", "0.65789986", "0.65520185", "0.6547398", "0.65315574", "0.652341", "0.6520039", "0.6519805", "0.6519622", "0.6508306", "0.6508283", "0.65017813", "0.64974755", "0.6481697", "0.6480684", "0.6461143", "0.64524806", "0.6448584", "0.6442787", "0.6433306", "0.64323246", "0.64322495", "0.6422565", "0.6422565", "0.6422565", "0.6421985", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.6419832", "0.64196736", "0.6415356", "0.6415148", "0.6414769", "0.6410915", "0.64066076", "0.6402526", "0.6398127", "0.6397657", "0.63953286", "0.63952476", "0.6389177", "0.6389177", "0.6389177", "0.63795054", "0.63768315", "0.6371419", "0.636953", "0.63625133", "0.6357297", "0.6353629", "0.6351317", "0.6345807", "0.63405323", "0.63404316", "0.6339997", "0.63344544", "0.63315463", "0.63306224", "0.6327032", "0.63219637" ]
0.0
-1
Create new CrudIndexTable instance.
public function __construct($config) { $this->component = component($this->componentName)->prop('table', $this); $this->config = $config; $this->table = new CrudTable($config); $this->setDefaults(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createIndex(): void;", "abstract protected function makeIndex(string $table, DoctrineDBALIndex $index): Index;", "private function _createSearchIndexTable()\n\t{\n\t\tCraft::log('Creating the searchindex table.');\n\n\t\t// Taking the scenic route here so we can get to MysqlSchema's $engine argument\n\t\t$table = craft()->db->addTablePrefix('searchindex');\n\n\t\t$columns = array(\n\t\t\t'elementId' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Int, 'null' => false)),\n\t\t\t'attribute' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Varchar, 'maxLength' => 25, 'null' => false)),\n\t\t\t'fieldId' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Int, 'null' => false)),\n\t\t\t'locale' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Locale, 'null' => false)),\n\t\t\t'keywords' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Text, 'null' => false)),\n\t\t);\n\n\t\tcraft()->db->createCommand()->setText(craft()->db->getSchema()->createTable($table, $columns, null, 'MyISAM'))->execute();\n\n\t\t// Give it a composite primary key\n\t\tcraft()->db->createCommand()->addPrimaryKey('searchindex', 'elementId,attribute,fieldId,locale');\n\n\t\t// Add the FULLTEXT index on `keywords`\n\t\tcraft()->db->createCommand()->setText('CREATE FULLTEXT INDEX ' .\n\t\t\tcraft()->db->quoteTableName(craft()->db->getIndexName('searchindex', 'keywords')).' ON ' .\n\t\t\tcraft()->db->quoteTableName($table).' ' .\n\t\t\t'('.craft()->db->quoteColumnName('keywords').')'\n\t\t)->execute();\n\n\t\tCraft::log('Finished creating the searchindex table.');\n\t}", "protected function createIndex(): IndexInterface {\n return Index::create([\n 'name' => $this->getRandomGenerator()->string(),\n 'id' => $this->getRandomGenerator()->name(),\n 'status' => 1,\n 'datasource_settings' => [\n 'entity:entity_test' => [],\n ],\n 'tracker_settings' => [\n 'default' => [],\n ],\n 'server' => $this->server->id(),\n 'options' => ['index_directly' => TRUE],\n ]);\n }", "public static function createIndex()\n {\n $db = static::getDb();\n $command = $db->createCommand();\n $command->createIndex(static::index(), [\n // Empty php arrays are converted to JSON arrays. Elasticsearch expects JSON object literals.\n // Epmty arrays leads to Java exception: \"elasticsearch java.util.ArrayList cannot be cast to java.util.Map\".\n// 'settings' => [ /* ... */ ],\n 'mappings' => static::mapping(),\n //'warmers' => [ /* ... */ ],\n //'aliases' => [ /* ... */ ],\n 'creation_date' => date('Y-m-d H:i:s'),\n ]);\n }", "protected function setUpIndex()\n {\n $this->getOldTable()->createColumn('foo', Type::STRING, array('length' => 50));\n $this->getOldTable()->createColumn('bar', Type::STRING, array('length' => 50));\n\n $this->getOldTable()->createIndex(array('foo'), false, 'idx_foo');\n\n $this->createOldTable();\n }", "public function create()\n {\n return $this->index();\n }", "public function buildIndex();", "private function _createAssetTransformIndexTable()\n\t{\n\t\tCraft::log('Creating the Asset transform index table.');\n\n\t\tcraft()->db->createCommand()->createTable('assettransformindex', array(\n\t\t\t'fileId' => array('maxLength' => 11, 'column' => ColumnType::Int, 'required' => true),\n\t\t\t'filename' => array('maxLength' => 255, 'column' => ColumnType::Varchar, 'required' => false),\n\t\t\t'format' => array('maxLength' => 255, 'column' => ColumnType::Varchar, 'required' => false),\n\t\t\t'location' => array('maxLength' => 255, 'column' => ColumnType::Varchar, 'required' => true),\n\t\t\t'sourceId' => array('maxLength' => 11, 'column' => ColumnType::Int, 'required' => false),\n\t\t\t'fileExists' => array('column' => ColumnType::Bool),\n\t\t\t'inProgress' => array('column' => ColumnType::Bool),\n\t\t\t'dateIndexed' => array('column' => ColumnType::DateTime),\n\t\t));\n\n\t\tcraft()->db->createCommand()->createIndex('assettransformindex', 'sourceId, fileId, location');\n\t\tCraft::log('Finished creating the Asset transform index table.');\n\t}", "public function createTable()\n\t{\n\t\t$app = Factory::getApplication();\n\n\t\tif ($app->isSite())\n\t\t{\n\t\t\techo 'Error creating DB table - Need to run this in admin area';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$user = Factory::getUser();\n\n\t\tif (!$user->authorise('core.admin'))\n\t\t{\n\t\t\techo 'Error creating DB table - You need to be superadmin user to exeacute this task';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$jinput = $app->input;\n\t\t$context = $jinput->get->get('context', '', 'cmd');\n\n\t\tif (empty($context))\n\t\t{\n\t\t\techo 'Error creating DB table - No context is passed';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$model = $this->getModel('indexer');\n\t\t$model->createTable($context);\n\t}", "public function create()\n {\n return view(\"management.table.create\");\n }", "public function create()\n {\n parent::create();\n\n $sheet = $this->add_sheet();\n\n $this->add_table($sheet, $this->database, $this->generate_table());\n }", "public function createTable($index = null)\n {\n $sql = \"CREATE TABLE IF NOT EXISTS `$this->tableName` (\";\n foreach(static::FIELDS_TYPES as $field => $type) {\n $sql .= \"`$field` $type,\";\n }\n $sql = rtrim($sql, ',');\n $sql .= ') CHARACTER SET utf8 COLLATE utf8_general_ci';\n if (! empty($index)) {\n $sql .= '; ' . $index;\n }\n $this->db->query($sql);\n }", "public function createTable()\n\t{\n\t\t$table = $this->getTableName();\n\t\t$indexes = $this->defineIndexes();\n\t\t$columns = array();\n\n\t\t// Add any Foreign Key columns\n\t\tforeach ($this->getBelongsToRelations() as $name => $config)\n\t\t{\n\t\t\t$required = !empty($config['required']);\n\t\t\t$columns[$config[2]] = array('column' => ColumnType::Int, 'required' => $required);\n\n\t\t\t// Add unique index for this column?\n\t\t\t// (foreign keys already get indexed, so we're only concerned with whether it should be unique)\n\t\t\tif (!empty($config['unique']))\n\t\t\t{\n\t\t\t\t$indexes[] = array('columns' => array($config[2]), 'unique' => true);\n\t\t\t}\n\t\t}\n\n\t\t// Add all other columns\n\t\tforeach ($this->defineAttributes() as $name => $config)\n\t\t{\n\t\t\t$config = ModelHelper::normalizeAttributeConfig($config);\n\n\t\t\t// Add (unique) index for this column?\n\t\t\t$indexed = !empty($config['indexed']);\n\t\t\t$unique = !empty($config['unique']);\n\n\t\t\tif ($unique || $indexed)\n\t\t\t{\n\t\t\t\t$indexes[] = array('columns' => array($name), 'unique' => $unique);\n\t\t\t}\n\n\t\t\t$columns[$name] = $config;\n\t\t}\n\n\t\t// Create the table\n\t\tblx()->db->createCommand()->createTable($table, $columns);\n\n\t\t// Create the indexes\n\t\tforeach ($indexes as $index)\n\t\t{\n\t\t\t$columns = ArrayHelper::stringToArray($index['columns']);\n\t\t\t$unique = !empty($index['unique']);\n\t\t\t$name = \"{$table}_\".implode('_', $columns).($unique ? '_unique' : '').'_idx';\n\t\t\tblx()->db->createCommand()->createIndex($name, $table, implode(',', $columns), $unique);\n\t\t}\n\t}", "function createIndex()\n {\n try\n {\n $response = $this->elasticClient->indices()->create($this->mapping);\n }\n catch(Exception $e)\n {\n // print_r($e->getMessage());\n }\n\n }", "private function createNewTable() {\n //generate the create table statement\n $sql = \"create table $this->tableName(\";\n $comma = \"\";\n $keyNameList = [];\n foreach ($this->columns as $column /* @var $column DbColumn */) {\n $sql .= \" $comma $column->columnName $column->dataType $column->extraStuff\";\n $comma = \",\";\n if ($column->primaryKey === true) {\n $keyNameList[] = $column->columnName;\n }\n }\n //generate the primary key list, if any are present\n $primaryKeySql = \"\";\n if (count($keyNameList) > 0) {\n $primaryKeySql = \"primary key(\";\n $comma = \"\";\n foreach ($keyNameList as $keyName) {\n $primaryKeySql = \"$primaryKeySql $comma $keyName\";\n $comma = \",\";\n }\n $primaryKeySql = \",$primaryKeySql)\";\n }\n\n //constraints\n $cSql = \"\";\n //we are assuming that there is at least one table. otherwise, the query would fail anyway.\n $comma = \",\";\n foreach ($this->constraints as $c) {\n $cSql .= \" $comma\";\n switch ($c->constraintType) {\n case \"foreign key\":\n $cSql .= \" FOREIGN KEY($c->columnName) REFERENCES $c->referencesTableName($c->referencesColumnName)\";\n break;\n }\n }\n $sql = \"$sql $primaryKeySql $cSql)\";\n return DbManager::nonQuery($sql);\n }", "private function __createIndex() {\n $lock_file = $this->getTmpPath('lock.dat');\n\n if (file_exists($lock_file)) return false;\n file_put_contents($lock_file, '');\n\n\n\t\tif (function_exists('ignore_user_abort'))\n\t\t\tignore_user_abort();\n\t\tif (function_exists('set_time_limit'))\n\t\t\tset_time_limit(180);\n\n\n\t\t$this->Model->truncateTable();\n\t\tforeach ($this->tables as $table) {\n\t\t\t$className = $this->Register['ModManager']->getModelNameFromModule($table);\n\t\t\t$Model = new $className;\n\t\t\t\n\t\t\tfor ($i = 1; $i < 10000; $i++) {\n\t\t\t\t$records = $Model->getCollection(array(), array('limit' => 100, 'page' => $i));\n\t\t\t\tif (empty($records)) break;\n\n\n\t\t\t\tif (count($records) && is_array($records)) {\n\t\t\t\t\tforeach ($records as $rec) {\n\n\t\t\t\t\t\tswitch ($table) {\n\t\t\t\t\t\t\tcase 'news':\n\t\t\t\t\t\t\tcase 'stat':\n\t\t\t\t\t\t\tcase 'loads':\n\t\t\t\t\t\t\t\t$text = $rec->getTitle() . ' ' . $rec->getMain() . ' ' . $rec->getTags();\n\t\t\t\t\t\t\t\tif (mb_strlen($text) < $this->minInputStr || !is_string($text))\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t$entity_view = '/view/';\n\t\t\t\t\t\t\t\t$module = $table;\n\t\t\t\t\t\t\t\t$entity_id = $rec->getId();\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'posts':\n\t\t\t\t\t\t\t\t$text = $rec->getMessage();\n\t\t\t\t\t\t\t\t$entity_view = '/view_theme/';\n\t\t\t\t\t\t\t\t$module = 'forum';\n\t\t\t\t\t\t\t\t$entity_id = $rec->getId_theme();\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'themes':\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$text = $rec->gettitle() . ' ' . $rec->getMain() . ' ' . $rec->getTags();\n\t\t\t\t\t\t\t\tif (mb_strlen($text) < $this->minInputStr || !is_string($text))\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t$entity_view = '/view/';\n\t\t\t\t\t\t\t\t$module = $table;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t//we must update record if an exists\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t'index' => $text,\n\t\t\t\t\t\t\t'entity_id' => $entity_id,\n\t\t\t\t\t\t\t'entity_title' => $rec->getTitle(),\n\t\t\t\t\t\t\t'entity_table' => $table,\n\t\t\t\t\t\t\t'entity_view' => $entity_view,\n\t\t\t\t\t\t\t'module' => $module,\n\t\t\t\t\t\t\t'date' => new Expr('NOW()'),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$entity = new SearchEntity($data);\n\t\t\t\t\t\t$entity->save();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n unlink($lock_file);\n\t}", "function create()\n {\n $this->definitions['columns'] =& $this->columns;\n return $this->connection->create_table($this->name, $this->definitions);\n }", "public function _INDEX()\n\t{\n\t\t\n\t}", "public function create()\n {\n $data = Crud::all();\n return Datatables::of($data)\n ->addIndexColumn()\n ->addColumn('action', function($row){\n $btn = '';\n $btn = $btn.' <a href=\"'.route('crud.edit', $row->sapid) .'\" class=\"edit btn btn-primary btn-sm\">Edit</a>';\n $btn = $btn.' <a href=\"javascript:void(0);\" class=\"edit btn btn-danger btn-sm\" onclick=\"deleteclients('.$row->sapid.')\">Delete</a>';\n \n return $btn;\n })\n ->rawColumns(['delete' => 'delete','action' => 'action'])\n ->make(true);\n \n \n return view('cruds.index');\n }", "protected function table()\n {\n $table = new Table(new Client);\n\n $table->column('id', 'ID');\n $table->column('name', __('name'));\n $table->column('created_at', trans('admin.created_at'));\n $table->column('updated_at', trans('admin.updated_at'));\n\n return $table;\n }", "private function _get_crud_for_index() {\t\t\n\t\t$data = array(\n\t\t\t'insert' => array(\n\t\t\t\tarray ('name' => 'name', 'label' => t('Role name'), 'type' => 'input',\n\t\t\t\t\t'rules' => array('unique', 'required', array('max_length' => 30, 'min_length' => 3), 'trim'),),\n\t\t\t),\n\t\t\t'select' => array(\n\t\t\t\tarray('name' => 'id', 'label' => 'ID', 'rules' => array('key', 'hidden', 'trim'),),\n\t\t\t\tarray('name' => 'name',\t'label' => t('Role name'), 'link' => 'example1/acl/screens/{id}', \n\t\t\t\t\t'rules' => array('trim', 'htmlspecialchars'),),\n\t\t\t),\n\t\t\t'update' => array(\n\t\t\t\tarray('name' => 'name',\t'label' => t('Role name'), 'type' => 'input', \n\t\t\t\t\t'rules' => array('unique', 'required', array('max_length' => 30, 'min_length' => 3), 'trim'),),\n\t\t\t),\n\t\t\t'delete' => array(\n\t\t\t\tarray('name' => 'name', 'label' => t('Role name'),),\n\t\t\t),\n 'search' => array('name' => t('Role name')),\n\t\t\t'datasource' => array(\n\t\t\t\t'table' => 'oci_roles',\n\t\t\t),\n\t\t\t'properties' => array(\n\t\t\t\t'name' => 'roles',\n\t\t\t\t'uri' => 'example1/roles/index',\n\t\t\t\t'index_column' => TRUE,\n\t\t\t\t'index_column_start' => 1,\n 'pagination' => TRUE,\n\t\t\t\t'pagination_per_page' => 5,\n\t\t\t\t'insert' => TRUE,\n\t\t\t\t'update' => TRUE,\n\t\t\t\t'delete' => TRUE,\n\t\t\t\t'crud_title' => NULL,\n\t\t\t\t'crud_form_title' => '<h2>'.t('List of Roles').'</h2>',\n\t\t\t\t'insert_form_title' => '<h2>'.t('Insert Data').'</h2>',\n\t\t\t\t'update_form_title' => '<h2>'.t('Update Data').'</h2>',\n\t\t\t\t'delete_form_title' => '<h2>'.t('Delete Data').'</h2>',\n\t\t\t),\n\t\t);\n\t\t$this->crud->set_data($data);\n\t\treturn $this->crud->render();\n\t}", "protected abstract function createTestTable();", "protected function getIndex()\n\t{ \n /*\n $sm = $this->account->getServiceManager();\n $dbh = $sm->get(\"Db\");\n $this->dbh = $dbh;\n\t\treturn new \\Netric\\EntityQuery\\Index\\Pgsql($this->account, $dbh);\n * \n */\n $this->dbh = $this->account->getServiceManager()->get(\"Db\");\n return new \\Netric\\EntityQuery\\Index\\Pgsql($this->account);\n\t}", "public function testIndex()\n {\n $statement = (new CreateTable($this->mockConnection));\n $return = $statement->index('column');\n $array = $statement->toArray();\n\n $this->assertInstanceOf(CreateTable::class, $return);\n $this->assertEquals([\n 'constraints' => [\n [\n 'type' => 'index',\n 'name' => null,\n 'columns' => ['column']\n ]\n ],\n ], $array);\n }", "public function __construct(){\n \n $this->create_tables();\n \n }", "public function newTable($name, $attr) {\n $t= new DBTable($name);\n foreach ($attr as $key => $definitions) {\n $t->attributes[]= new DBTableAttribute(\n $key,\n $definitions[0], // Type\n TRUE,\n FALSE,\n $definitions[1] // Length\n );\n }\n $t->indexes[]= new DBIndex(\n 'PRIMARY',\n array('deviceinfo_id')\n );\n $t->indexes[0]->unique= TRUE;\n $t->indexes[0]->primary= TRUE;\n $t->indexes[]= new DBIndex(\n 'deviceinfo_I_serial',\n array('serial_number')\n );\n return $t;\n }", "public function index()\n {\n return parent::getTable($this->columns, $this->url, 'table', 'Data Penjualan');\n }", "public static function create($pathBase, $config){\n ZendT_Tool_Crud_Table::crudTable($pathBase, $config);\n ZendT_Tool_Crud_Table::developerTable($pathBase, $config);\n }", "public function testIndexComposite()\n {\n $statement = (new CreateTable($this->mockConnection));\n $return = $statement->index(['column1', 'column2']);\n $array = $statement->toArray();\n\n $this->assertInstanceOf(CreateTable::class, $return);\n $this->assertEquals([\n 'constraints' => [\n [\n 'type' => 'index',\n 'name' => null,\n 'columns' => ['column1', 'column2']\n ]\n ],\n ], $array);\n }", "function __construct() \n {\n // Creation de la table\n self::createTableIfNeeded();\n }", "public function create()\n {\n $model = Modul::query()->orderBy('created_at', 'desc');\n return Datatables::eloquent($model)->addIndexColumn()->toJson();\n }", "public function buildIndexCreator()\n {\n $indexCreator = $this->createIndexCreator();\n $indexCreator->setPath($this->path);\n $indexCreator->setFileName($this->filenamePrefix);\n $indexCreator->setLimit($this->limit);\n $indexCreator->setSitemapsCount($this->sitemapsCount);\n $indexCreator->useFormatCustom($this->format, $this->extension);\n\n return $indexCreator;\n }", "public function index()\n {\n return Datatables::of(Studentcsv::query())->make(true);\n }", "public function createSchemaTable();", "public function create()\n\t{\n\t\treturn $this->_adapter->createTable($this->_identifier, $this->_info, $this->_options);\n\t}", "public function testLoad()\r\n\t{\r\n\t\t// Load table\r\n\t\t$table = Table::model()->findByPk(array(\r\n\t\t\t'TABLE_SCHEMA' => 'indextest',\r\n\t\t\t'TABLE_NAME' => 'table1',\r\n\t\t));\r\n\r\n\t\t// Check index count\r\n\t\t$this->assertEquals(4, count($table->indices));\r\n\r\n\t\t// Check index 1\r\n\t\t$index = $table->indices[0];\r\n\t\t$this->assertEquals($table->TABLE_NAME, $index->table->TABLE_NAME);\r\n\t\t$this->assertEquals('PRIMARY', $index->INDEX_NAME);\r\n\t\t$this->assertEquals('PRIMARY', $index->getType());\r\n\r\n\t\t// Check index 2\r\n\t\t$index = $table->indices[1];\r\n\t\t$this->assertEquals('unique', $index->INDEX_NAME);\r\n\t\t$this->assertEquals('UNIQUE', $index->getType());\r\n\r\n\t\t// Check index 2\r\n\t\t$index = $table->indices[2];\r\n\t\t$this->assertEquals('index', $index->INDEX_NAME);\r\n\t\t$this->assertEquals('INDEX', $index->getType());\r\n\r\n\t\t// Check index 2\r\n\t\t$index = $table->indices[3];\r\n\t\t$this->assertEquals('fulltext', $index->INDEX_NAME);\r\n\t\t$this->assertEquals('FULLTEXT', $index->getType());\r\n\t}", "public static function generate_index_table() {\n global $PAGE;\n\n $headers = array(\n get_string('table_header_request', 'local_extension'),\n get_string('table_header_items', 'local_extension'),\n get_string('table_header_requestdate', 'local_extension'),\n get_string('table_header_statushead', 'local_extension'),\n );\n\n $columns = array('request', 'date', 'items', 'status');\n\n $table = new \\flexible_table('local_extension_summary');\n $table->define_columns($columns);\n $table->define_headers($headers);\n\n $table->define_baseurl($PAGE->url);\n $table->set_attribute('id', 'local_extension_table');\n $table->set_attribute('class', 'generaltable admintable');\n $table->setup();\n\n return $table;\n }", "private function createDummyTable() {}", "public function createTable(Table $table, array $columns = [], array $indexes = []);", "public function makeIndex()\n {\n //Admin panel\n if (!TTO_IS_ADMIN) {\n return;\n }\n\n //Index contents\n $count = $this->search->getEngine()->indexContents();\n\n //Update counter\n $index = Search::getIndex();\n TeaThemeOptions::setConfigs($index.'-count', $count);\n }", "public function createTable() {\n return $this->getActionByName('CreateTable');\n }", "public function buildCreateIndex(Query $query) {\n return $this->renderStatement(Query::CREATE_INDEX, [\n 'index' => $this->formatTable($query->getAlias()),\n 'table' => $this->formatTable($query->getTable()),\n 'fields' => $this->formatFields($query)\n ] + $this->formatAttributes($query->getAttributes()));\n }", "public function create()\n {\n return view('tables.create');\n }", "public function __construct()\n {\n parent::__construct(self::TABLE);\n }", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\t$table_name \t = $this->table_name;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$query = \"CREATE TABLE {$table_name} (\n\t\t\tid bigint(10) NOT NULL AUTO_INCREMENT,\n\t\t\tname text NOT NULL,\n\t\t\tdate_created datetime NOT NULL,\n\t\t\tdate_modified datetime NOT NULL,\n\t\t\tstatus text NOT NULL,\n\t\t\tical_hash text NOT NULL,\n\t\t\tPRIMARY KEY id (id)\n\t\t) {$charset_collate};\";\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $query );\n\n\t}", "public function create()\n {\n return view('AlambnaaaIndexing.create');\n\n }", "public function index()\n {\n return $this->getTable();\n }", "public function create_table($table, $definition, $index=array()){\n\t\t$create_sql = \"CREATE TABLE $table (\";\n\t\tif(!is_array($definition)){\n\t\t\tnew DbException(\"Definici&oacute;n invalida para crear la tabla '$table'\");\n\t\t\treturn false;\n\t\t}\n\t\t$create_lines = array();\n\t\t$index = array();\n\t\t$unique_index = array();\n\t\t$primary = array();\n\t\t$not_null = \"\";\n\t\t$size = \"\";\n\t\tforeach($definition as $field => $field_def){\n\t\t\tif(isset($field_def['not_null'])){\n\t\t\t\t$not_null = $field_def['not_null'] ? 'NOT NULL' : '';\n\t\t\t} else {\n\t\t\t\t$not_null = \"\";\n\t\t\t}\n\t\t\tif(isset($field_def['size'])){\n\t\t\t\t$size = $field_def['size'] ? '('.$field_def['size'].')' : '';\n\t\t\t} else {\n\t\t\t\t$size = \"\";\n\t\t\t}\n\t\t\tif(isset($field_def['index'])){\n\t\t\t\tif($field_def['index']){\n\t\t\t\t\t$index[] = \"INDEX($field)\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['unique_index'])){\n\t\t\t\tif($field_def['unique_index']){\n\t\t\t\t\t$index[] = \"UNIQUE($field)\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['primary'])){\n\t\t\t\tif($field_def['primary']){\n\t\t\t\t\t$primary[] = \"$field\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['auto'])){\n\t\t\t\tif($field_def['auto']){\n\t\t\t\t\t$field_def['type'] = \"SERIAL\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['extra'])){\n\t\t\t\t$extra = $field_def['extra'];\n\t\t\t} else {\n\t\t\t\t$extra = \"\";\n\t\t\t}\n\t\t\t$create_lines[] = \"$field \".$field_def['type'].$size.' '.$not_null.' '.$extra;\n\t\t}\n\t\t$create_sql.= join(',', $create_lines);\n\t\t$last_lines = array();\n\t\tif(count($primary)){\n\t\t\t$last_lines[] = 'PRIMARY KEY('.join(\",\", $primary).')';\n\t\t}\n\t\tif(count($index)){\n\t\t\t$last_lines[] = join(',', $index);\n\t\t}\n\t\tif(count($unique_index)){\n\t\t\t$last_lines[] = join(',', $unique_index);\n\t\t}\n\t\tif(count($last_lines)){\n\t\t\t$create_sql.= ','.join(',', $last_lines).')';\n\t\t}\n\t\treturn $this->query($create_sql);\n\n\t}", "public function create_table($table, $definition, $index=array()){\n\t\t$create_sql = \"CREATE TABLE $table (\";\n\t\tif(!is_array($definition)){\n\t\t\tnew DbException(\"Definici&oacute;n invalida para crear la tabla '$table'\");\n\t\t\treturn false;\n\t\t}\n\t\t$create_lines = array();\n\t\t$index = array();\n\t\t$unique_index = array();\n\t\t$primary = array();\n\t\t$not_null = \"\";\n\t\t$size = \"\";\n\t\tforeach($definition as $field => $field_def){\n\t\t\tif(isset($field_def['not_null'])){\n\t\t\t\t$not_null = $field_def['not_null'] ? 'NOT NULL' : '';\n\t\t\t} else {\n\t\t\t\t$not_null = \"\";\n\t\t\t}\n\t\t\tif(isset($field_def['size'])){\n\t\t\t\t$size = $field_def['size'] ? '('.$field_def['size'].')' : '';\n\t\t\t} else {\n\t\t\t\t$size = \"\";\n\t\t\t}\n\t\t\tif(isset($field_def['index'])){\n\t\t\t\tif($field_def['index']){\n\t\t\t\t\t$index[] = \"INDEX($field)\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['unique_index'])){\n\t\t\t\tif($field_def['unique_index']){\n\t\t\t\t\t$index[] = \"UNIQUE($field)\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['primary'])){\n\t\t\t\tif($field_def['primary']){\n\t\t\t\t\t$primary[] = \"$field\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['auto'])){\n\t\t\t\tif($field_def['auto']){\n\t\t\t\t\t$gen = $this->fetch_one(\"SELECT COUNT(*) FROM RDB\\$GENERATORS WHERE RDB\\$GENERATOR_NAME = UPPER('{$table}_{$field}_seq')\");\n\t\t\t\t\tif(!$gen[0]){\n\t\t\t\t\t\t$this->query(\"INSERT INTO RDB\\$GENERATORS (RDB\\$GENERATOR_NAME) VALUES (UPPER('{$table}_{$field}_seq'))\");\n\t\t\t\t\t}\n\t\t\t\t\t$this->query(\"SET GENERATOR {$table}_{$field}_seq TO 1;\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($field_def['extra'])){\n\t\t\t\t$extra = $field_def['extra'];\n\t\t\t} else {\n\t\t\t\t$extra = \"\";\n\t\t\t}\n\t\t\t$create_lines[] = \"$field \".$field_def['type'].$size.' '.$not_null.' '.$extra;\n\t\t}\n\t\t$create_sql.= join(',', $create_lines);\n\t\t$last_lines = array();\n\t\tif(count($primary)){\n\t\t\t$last_lines[] = 'PRIMARY KEY('.join(\",\", $primary).')';\n\t\t}\n\t\tif(count($index)){\n\t\t\t$last_lines[] = join(',', $index);\n\t\t}\n\t\tif(count($unique_index)){\n\t\t\t$last_lines[] = join(',', $unique_index);\n\t\t}\n\t\tif(count($last_lines)){\n\t\t\t$create_sql.= ','.join(',', $last_lines).')';\n\t\t}\n\t\treturn $this->query($create_sql);\n\n\t}", "public static function tableName()\n {\n return 'crawler_index';\n }", "protected function createTable() {\n $this->db->initializeQuery();\n $query = \"\nCREATE TABLE `items` (\n`id`INTEGER,\n`name`TEXT,\n`price`REAL,\nPRIMARY KEY(`id`)\n);\n\";\n\n $r = $this->db->q->Expr($query)->execute($this->db->c);\n \n }", "public static function createAllTableIndexes()\n {\n $result = true;\n \n // tdo_lists\n// if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_list_deleted_index on tdo_lists(deleted)\") == false)\n// $result = false;\n \n // tdo_list_memberships\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_list_membership_userid_index on tdo_list_memberships(userid(10))\") == false)\n $result = false;\n\n // tdo_user_sessions\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_user_sessions_userid_index on tdo_user_sessions(userid(10))\") == false)\n $result = false;\n\n \n // tdo_tasks\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tasks_listid_index on tdo_tasks(listid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tasks_parentid_index on tdo_tasks(parentid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tasks_duedate_index on tdo_tasks(duedate)\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tasks_timestamp_index on tdo_tasks(timestamp)\") == false)\n $result = false;\n\n \n //tdo_completed_tasks\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_completed_tasks_listid_index on tdo_completed_tasks(listid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_completed_tasks_parentid_index on tdo_completed_tasks(parentid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_completed_tasks_completiondate_index on tdo_completed_tasks(completiondate)\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_completed_tasks_timestamp_index on tdo_completed_tasks(timestamp)\") == false)\n $result = false;\n\n \n //tdo_deleted_tasks\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_deleted_tasks_listid_index on tdo_deleted_tasks(listid(10))\") == false)\n $result = false;\n\t\t\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_deleted_tasks_parentid_index on tdo_deleted_tasks(parentid(10))\") == false)\n $result = false;\n\n \n //tdo_archived_tasks\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_archived_tasks_listid_index on tdo_archived_tasks(listid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_archived_tasks_timestamp_index on tdo_archived_tasks(timestamp)\") == false)\n $result = false;\n\n \n // tdo_taskitos\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_taskitos_parentid_index on tdo_taskitos(parentid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_taskitos_timestamp_index on tdo_taskitos(timestamp)\") == false)\n $result = false;\n\n // tdo_archived_taskitos\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_archived_taskitos_parentid_index on tdo_archived_taskitos(parentid(10))\") == false)\n $result = false;\n \n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_archived_taskitos_timestamp_index on tdo_archived_taskitos(timestamp)\") == false)\n $result = false;\n \n // tdo_tag_assignments\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_tag_assignments_taskid_index on tdo_tag_assignments(taskid(10))\") == false)\n $result = false;\n \n // tdo_contexts\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_contexts_context_timestamp_index on tdo_contexts(context_timestamp)\") == false)\n $result = false;\n\n // tdo_context_assignments\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_context_assignments_userid_index on tdo_context_assignments(userid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_context_assignments_taskid_index on tdo_context_assignments(taskid(10))\") == false)\n $result = false;\n\n // tdo_comments\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_comments_itemid_index on tdo_comments(itemid(10))\") == false)\n $result = false;\n \n // tdo_task_notifications\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_task_notifications_taskid_index on tdo_task_notifications(taskid(10))\") == false)\n $result = false;\n\n // tdo_change_log\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_change_log_listid_index on tdo_change_log(listid(10))\") == false)\n $result = false;\n\n if(TDOTableManager::createGenericIndex(\"CREATE INDEX tdo_change_log_itemid_index on tdo_change_log(itemid(10))\") == false)\n $result = false;\n \n return $result;\n }", "public function actionCreateTableForRecord($args)\n\t{\n\t\t$record = $this->_getRecord($args[0]);\n\n\t\t$table = $record->getTableName();\n\t\t$indexes = $record->defineIndexes();\n\t\t$attributes = $record->getAttributeConfigs();\n\t\t$columns = array();\n\n\t\t// Add any Foreign Key columns\n\t\tforeach ($record->getBelongsToRelations() as $name => $config)\n\t\t{\n\t\t\t$columnName = $config[2];\n\n\t\t\t// Is the record already defining this column?\n\t\t\tif (isset($attributes[$columnName]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$required = !empty($config['required']);\n\t\t\t$columns[$columnName] = array('column' => ColumnType::Int, 'required' => $required);\n\n\t\t\t// Add unique index for this column? (foreign keys already get indexed, so we're only concerned with whether\n\t\t\t// it should be unique)\n\t\t\tif (!empty($config['unique']))\n\t\t\t{\n\t\t\t\t$indexes[] = array('columns' => array($columnName), 'unique' => true);\n\t\t\t}\n\t\t}\n\n\t\t// Add all other columns\n\t\t$dbConfigSettings = array('column', 'maxLength', 'length', 'decimals', 'values', 'unsigned', 'zerofill', 'required', 'null', 'default', 'primaryKey');\n\n\t\tforeach ($attributes as $name => $config)\n\t\t{\n\t\t\t// Add (unique) index for this column?\n\t\t\t$indexed = !empty($config['indexed']);\n\t\t\t$unique = !empty($config['unique']);\n\n\t\t\tif ($unique || $indexed)\n\t\t\t{\n\t\t\t\t$indexes[] = array('columns' => array($name), 'unique' => $unique);\n\t\t\t}\n\n\t\t\t// Filter out any settings that don't influence the table SQL\n\t\t\t$settings = array_keys($config);\n\n\t\t\tforeach ($settings as $setting)\n\t\t\t{\n\t\t\t\tif (!in_array($setting, $dbConfigSettings))\n\t\t\t\t{\n\t\t\t\t\tunset($config[$setting]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$columns[$name] = $config;\n\t\t}\n\n\t\t$pk = $record->primaryKey();\n\n\t\tif (isset($columns[$pk]))\n\t\t{\n\t\t\t$columns[$pk]['primaryKey'] = true;\n\t\t\t$addIdColumn = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$addIdColumn = true;\n\t\t}\n\n\t\t// Create the table\n\t\techo \"\\n// Create the craft_{$table} table\\n\";\n\n\t\techo 'craft()->db->createCommand()->createTable(' .\n\t\t\t$this->_varExport($table).\", array(\\n\";\n\n\t\t$colNameLength = max(array_map('strlen', array_keys($columns))) + 2;\n\n\t\tforeach ($columns as $name => $config)\n\t\t{\n\t\t\techo \"\\t\".str_pad(\"'{$name}'\", $colNameLength).' => '.$this->_varExport($config).\",\\n\";\n\t\t}\n\n\t\techo '), null, '.$this->_varExport($addIdColumn).\");\\n\";\n\n\t\t// Create the indexes\n\t\tif ($indexes)\n\t\t{\n\t\t\techo \"\\n// Add indexes to craft_{$table}\\n\";\n\t\t\tforeach ($indexes as $index)\n\t\t\t{\n\t\t\t\t$columns = ArrayHelper::stringToArray($index['columns']);\n\t\t\t\t$unique = !empty($index['unique']);\n\n\t\t\t\techo 'craft()->db->createCommand()->createIndex(' .\n\t\t\t\t\t$this->_varExport($table).', ' .\n\t\t\t\t\t\"'\".implode(',', $columns).\"', \" .\n\t\t\t\t\t$this->_varExport($unique).\");\\n\";\n\t\t\t}\n\t\t}\n\n\t\treturn 1;\n\t}", "public function index() {\n\t\tSearch::index($this->table)->insert(\n\t\t\t$this['slug'],\n\t\t\t[\n\t\t\t\t'title'\t\t=> $this['title'],\n\t\t\t\t'text'\t\t=> $this['text'],\n\t\t\t\t'category'\t=> $this->category->name,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'_type'\t\t=> $this->table,\n\t\t\t]\n\t\t);\n\t}", "public function __construct(Connection $connection, $index, $type)\n {\n $this->connection = $connection;\n $this->index = $index;\n $this->table = $type;\n }", "public function index()\n {\n return $this->create();\n }", "public function create_foreign_key_and_index()\n {\n $constrain = collect(DB::select(\"PRAGMA index_list(logs)\"))\n ->where('name', '=', 'logs_user_id_index')->first();\n\n $this->assertNotNull(\n $constrain\n );\n }", "private function createSearchesTable() {\n $fields = array(\n 'id'\t\t => array('type' => 'int', 'constraint' => '10', 'unsigned' => TRUE, 'auto_increment' => TRUE),\n 'site_id' => array('type' => 'int', 'constraint' => '10', 'unsigned' => TRUE),\n 'searched_at'\t => array('type' => 'datetime', 'null' => true),\n 'params' => array('type' => 'text', 'null' => true),\n 'short_code' => array('type' => 'varchar', 'constraint' => '250', 'null' => TRUE),\n 'all_servers' => array('type' => 'varchar', 'constraint' => '3', 'null' => TRUE),\n );\n\n ee()->dbforge->add_field($fields);\n ee()->dbforge->add_key('id', TRUE);\n\n ee()->dbforge->create_table('rets_rabbit_v2_searches');\n }", "public function create()\n {\n return 'patient index';\n //\n }", "public function index()\n\t{\n\t\t$data = $this->crud->select()->orderBy('crud_id', 'desc')->get();\n\t\t$this->template('crud/index', $data);\n\t}", "static public function createTable(Adapter $db, TableDef $tdef) {\n $defaultSchema = $tdef->getSchema();\n $tableName = $tdef->getName();\n /** bug fix -- Error duplicate primary key -- if a column has primary = true\n * and index also has a key type of 'PRIMARY' (even if they are the same).\n * DbIndex has no column information for things like 'autoIncrement'\n * and it is not part of index type either.\n * So single column index with Primary takes precedence, over index called 'PRIMARY'.\n * A multi-column index takes precedence over multiple columns with ('primary'=>true)\n */\n $plist = $tdef->getIndexNames();\n $allDefs = [];\n if (isset($plist['PRIMARY'])) {\n $primaryKey = $plist['PRIMARY'];\n if (count($primaryKey->getIndexColumns()) == 1) {\n $defs = $tdef->getColumnsByProperty('primary', true);\n if (count($defs)) {\n unset($plist['PRIMARY']);\n }\n } else {\n $defs = $tdef->getColumnsByProperty('primary', true);\n foreach ($defs as $cdef) {\n $cdef->unsetValue('primary');\n }\n $allDefs[] = $primaryKey;\n unset($plist['PRIMARY']);\n }\n foreach ($plist as $key => $object) {\n $allDefs[] = $object;\n }\n }\n $allIndexes = [];\n foreach ($allDefs as $idef) {\n $allIndexes[] = $idef->makeIndexClass();\n }\n\n\n $definition = [\n 'columns' => $tdef->getDbColumns(),\n 'indexes' => $allIndexes,\n 'options' => $tdef->getDbOptions()\n ];\n $db->createTable($tableName, $defaultSchema, $definition);\n return 'created table $tableName';\n }", "public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n\t\tif ( $wpdb->get_var( \"SHOW TABLES LIKE '$this->table_name'\" ) == $this->table_name ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$sql = \"CREATE TABLE \" . $this->table_name . \" (\n\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\tuser_id bigint(20) NOT NULL,\n\t\tusername varchar(50) NOT NULL,\n\t\temail varchar(50) NOT NULL,\n\t\tname mediumtext NOT NULL,\n\t\tproduct_count bigint(20) NOT NULL,\n\t\tsales_value mediumtext NOT NULL,\n\t\tsales_count bigint(20) NOT NULL,\n\t\tstatus mediumtext NOT NULL,\n\t\tnotes longtext NOT NULL,\n\t\tdate_created datetime NOT NULL,\n\t\tPRIMARY KEY (id),\n\t\tUNIQUE KEY email (email),\n\t\tKEY user (user_id)\n\t\t) CHARACTER SET utf8 COLLATE utf8_general_ci;\";\n\n\t\tdbDelta( $sql );\n\n\t\tupdate_option( $this->table_name . '_db_version', $this->version );\n\t}", "abstract public function createTable();", "public function createIndex($params)\n {\n return $this->elasticsearch->indices()->create(array_merge(['index' => $this->indexName], $params));\n }", "protected function table()\n {\n $table = new Table(new Image());\n\n $table->id('ID')->sortable();\n\n $table->created_at();\n $table->updated_at();\n\n $table->disableFilter();\n\n return $table;\n }", "public function addIndex($tableName, $schemaName, $index){ }", "protected function table()\n {\n $userModel = config('admin.database.users_model');\n $user = new $userModel();\n $table = new Table($user);\n // 禁用导出数据\n $table->disableExport();\n // 筛选\n $table->filter(function($filter){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n // 在这里添加字段过滤器\n $filter->like('username', __('auth.username'));\n $filter->like('name', __('auth.admin_name'));\n });\n $table->column('id', 'ID')->sortable();\n $table->column('username', trans('auth.username'));\n $table->column('name', trans('auth.admin_name'));\n $table->column('created_at', trans('admin.created_at'));\n $table->column('is_enable', trans('auth.status'))->using([0 => '禁用', 1 => '启用']);\n $adminId = $user->getRootAdminId();\n $table->actions(function (Table\\Displayers\\Actions $actions) use ($adminId) {\n if ($actions->getKey() == $adminId) {\n $actions->disableDelete();\n }\n $actions->add(new SetPermissions());\n });\n\n $table->tools(function (Table\\Tools $tools) {\n $tools->batch(function (Table\\Tools\\BatchActions $actions) {\n $actions->disableDelete();\n });\n });\n\n return $table;\n }", "public function getIndex()\n {\n return view('admin.data_table');\n }", "public function create($fields, $withId = false, $tableName = \"\", $typeText = false, $index = '')\n\t{\n\t\tif (!$tableName)\n\t\t{\n\t\t\t$tableName = uniqid();\n\t\t}\n\t\t$this->tableName = 'temp_' . $tableName;\n\t\n\t\t//sanitize columns\n\t\t$this->setColumns($fields, $withId, $typeText);\n\t\n\t\t$fieldString = \"\";\n\t\tforeach ($this->columns as $col => $type)\n\t\t{\n\t\t\t$fieldString .= \",$col $type\";\n\t\t}\n\t\n\t\t$sql = \"CREATE TEMPORARY TABLE IF NOT EXISTS $this->tableName (\" . substr($fieldString, 1) . ' )';\t\n\t\t\\DB::statement($sql);\n\t\n\t\tif($index)\n\t\t{\n\t\t\t$sql = \"ALTER TABLE {$this->tableName} ADD INDEX ({$index})\";\n\t\t\t\\DB::statement($sql);\n\t\t}\n\t\treturn $this->tableName;\n\t}", "public function initTable(){\n\t\t\t\n\t\t}", "private function getIndex($indexPath, $create = false)\n {\n $index = new Index($indexPath, $create);\n $index->setHideException($this->hideIndexException);\n\n return $index;\n }", "public function run()\n {\n $index = new Index();\n $index\n ->setIndexName(SearchEnum::INDEX_TYPE_MESSAGES)\n ->setIndexType(SearchEnum::INDEX_TYPE_MESSAGES)\n ->setIsDefault(true);\n\n $index->save();\n }", "public function createIndex(\n SugarBean $bean, \n $fieldDefs, \n $name, \n $unique = true\n )\n {\n $sql = $this->getHelper()->createIndexSQL($bean, $fieldDefs, $name, $unique);\n $this->tableName = $bean->getTableName();\n $msg = \"Error creating index $name on table: \".$this->tableName. \":\";\n $this->query($sql,true,$msg);\n }", "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "public function compileIndex(Blueprint $blueprint, Fluent $command)\n {\n $columns = $this->columnize ( $command->columns );\n $table = $this->wrapTable ( $blueprint );\n return \"create index {$command->index} on {$table} ({$columns})\";\n }", "public function create()\n {\n return view('users_tables.create');\n }", "public function crudIndex(Model $base)\n {\n// $models = $base->attributes->paginate();\n// $name = $this->view;\n// $route = $this->route;\n//\n// return view($this->view . '.index', compact('models', 'name', 'route'));\n }", "function mscaffolding_create_table($name, $data)\n\t{\n\t\t$query_string = \"CREATE TABLE `\" . lconf_get(\"db_name\") . \"`.`\" . $name . \"` (`id` INT NOT NULL AUTO_INCREMENT,\";\n\n\t\tfor ($i = 0; $i < count($data) / 2; $i++)\n\t\t{\n\t\t\t$query_string .= \"`\" . $data[\"name\" . $i] . \"`\" . mscaffolding_get_type($data[\"type\" . $i]);\n\t\t}\n\n\t\t$query_string .= \" PRIMARY KEY ( `id` )) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_slovenian_ci\";\n\n\t\treturn ldb_query($query_string);\n\t}", "function create_index()\n\t{\n\t\tinclude_once(dirname(__FILE__) . '/../../include/class/adodb/adodb.inc.php');\n\t\t$conn = &ADONewConnection($_SESSION['db_type']);\n\t\t$conn->PConnect($_SESSION['db_server'], $_SESSION['db_user'], $_SESSION['db_password'], $_SESSION['db_database']);\n\t\t$config['table_prefix'] = $_SESSION['table_prefix'] . $_SESSION['or_install_lang'] . '_';\n\t\t$config['table_prefix_no_lang'] = $_SESSION['table_prefix'];\n\n\t\t$sql_insert[] = \"CREATE INDEX idx_user_name ON \" . $config['table_prefix'] . \"userdb (userdb_user_name);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_active ON \" . $config['table_prefix'] . \"listingsdb (listingsdb_active);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_user ON \" . $config['table_prefix'] . \"listingsdb (userdb_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_name ON \" . $config['table_prefix'] . \"listingsdbelements (listingsdbelements_field_name);\";\n\t\t// CHANGED: blob or text fields can only index a max of 255 (mysql) and you have to specify\n\t\tif ($_SESSION['db_type'] == 'mysql') {\n\t\t\t$sql_insert[] = \"CREATE INDEX idx_value ON \" . $config['table_prefix'] . \"listingsdbelements (listingsdbelements_field_value(255));\";\n\t\t}else {\n\t\t\t$sql_insert[] = \"CREATE INDEX idx_value ON \" . $config['table_prefix'] . \"listingsdbelements (listingsdbelements_field_value);\";\n\t\t}\n\t\t$sql_insert[] = \"CREATE INDEX idx_images_listing_id ON \" . $config['table_prefix'] . \"listingsimages (listingsdb_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_searchable ON \" . $config['table_prefix'] . \"listingsformelements (listingsformelements_searchable);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_mlsexport ON \" . $config['table_prefix'] . \"listingsdb (listingsdb_mlsexport);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_listing_id ON \" . $config['table_prefix'] . \"listingsdbelements (listingsdb_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_field_type ON \" . $config['table_prefix'] . \"listingsformelements (listingsformelements_field_type);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_browse ON \" . $config['table_prefix'] . \"listingsformelements (listingsformelements_display_on_browse);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_field_name ON \" . $config['table_prefix'] . \"listingsformelements (listingsformelements_field_name);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_rank ON \" . $config['table_prefix'] . \"listingsformelements (listingsformelements_rank);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_search_rank ON \" . $config['table_prefix'] . \"listingsformelements (listingsformelements_search_rank);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_images_rank ON \" . $config['table_prefix'] . \"listingsimages (listingsimages_rank);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_forgot_email ON \" . $config['table_prefix_no_lang'] . \"forgot (forgot_email);\";\n\n\t\t$sql_insert[] = \"CREATE INDEX idx_classformelements_class_id ON \" . $config['table_prefix_no_lang'] . \"classformelements (class_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_classformelements_listingsformelements_id ON \" . $config['table_prefix_no_lang'] . \"classformelements (listingsformelements_id);\";\n\n\t\t$sql_insert[] = \"CREATE INDEX idx_classlistingsdb_class_id ON \" . $config['table_prefix_no_lang'] . \"classlistingsdb (class_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_classlistingsdb_listingsdb_id ON \" . $config['table_prefix_no_lang'] . \"classlistingsdb (listingsdb_id);\";\n\n\t\t$sql_insert[] = \"CREATE INDEX idx_class_rank ON \" . $config['table_prefix'] . \"class (class_rank);\";\n\t\t//Add indexes for userdbelements tables\n\t\t// CHANGED: blob or text fields can only index a max of 255 (mysql) and you have to specify\n\t\tif ($_SESSION['db_type'] == 'mysql') {\n\t\t\t$sql_insert[] = \"CREATE INDEX idx_user_field_value ON \" . $config['table_prefix'] . \"userdbelements (userdbelements_field_value(255));\";\n\t\t}else {\n\t\t\t$sql_insert[] = \"CREATE INDEX idx_user_field_value ON \" . $config['table_prefix'] . \"userdbelements (userdbelements_field_value);\";\n\t\t}\n\t\t$sql_insert[] = \"CREATE INDEX idx_user_field_name ON \" . $config['table_prefix'] . \"userdbelements (userdbelements_field_name);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_userdb_userid ON \" . $config['table_prefix'] . \"userdbelements (userdb_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_listfieldmashup ON \" . $config['table_prefix'] . \"listingsdb (listingsdb_id ,listingsdb_active,userdb_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_fieldmashup ON \" . $config['table_prefix'] . \"listingsdbelements (listingsdbelements_field_name,listingsdb_id);\";\n\t\t$sql_insert[] = \"CREATE INDEX idx_classfieldmashup ON \" . $config['table_prefix_no_lang'] . \"classlistingsdb (listingsdb_id ,class_id);\";\n\t\t// ADDED foreach to run through array with errorchecking to see if something went wrong\n\t\twhile (list($elementIndexValue, $elementContents) = each($sql_insert)) {\n\t\t\t$recordSet = $conn->Execute($elementContents);\n\t\t\tif ($recordSet === false) {\n\t\t\t\tif ($_SESSION['devel_mode'] == 'no') {\n\t\t\t\t\tdie (\"<strong><span style=\\\"red\\\">ERROR - $elementContents</span></strong><br />\");\n\t\t\t\t}else {\n\t\t\t\t\techo \"<strong><span style=\\\"red\\\">ERROR - $elementContents</span></strong><br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo 'Indexes Created<br />';\n\t}", "protected function _getTable()\n\t{\n\t\t$tableName = substr( get_class($this), strlen(self::PREFIX) );\n\t\t$tableClass = self::PREFIX . 'DbTable_' . $tableName;\n\t\t$table = new $tableClass();\n\t\treturn $table;\n\t}", "public function baseTable();", "public function index(){\n return Vista::crear(\"index\");\n }", "protected function setUpTable()\n {\n return new Table('foo', array($this->oldColumn));\n }", "public function createIndexAction(array $params): void\r\n {\r\n //for participant u need 500 depth\r\n list($model, $maxDepth, $nestedLimit) = $params + ['', 3, 75];\r\n\r\n if (!empty($model)) {\r\n // Get elasticsearch class handler instance\r\n $elasticsearch = new IndexBuilder();\r\n\r\n $elasticsearch->createIndices($model, $maxDepth, $nestedLimit);\r\n }\r\n }", "public function testCreateTable() {\n $tableDef = [\n 'name' => 'user',\n 'columns' => [\n 'userID' => ['dbtype' => 'int', 'primary' => true, 'autoIncrement' => true],\n 'name' => ['dbtype' => 'varchar(50)'],\n 'email' => ['dbtype' => 'varchar(255)'],\n 'fullName' => ['dbtype' => 'varchar(50)', 'allowNull' => true],\n 'banned' => ['dbtype' => 'tinyint', 'default' => 0],\n 'insertTime' => ['dbtype' => 'int'],\n 'num' => ['dbtype' => 'int', 'default' => 0]\n ],\n 'indexes' => [\n ['columns' => ['name'], 'type' => Db::INDEX_UNIQUE],\n ['columns' => ['email']],\n ['columns' => ['insertTime']]\n ]\n ];\n\n self::$db->defineTable($tableDef);\n\n $r = self::$db->fetchTableDef('user');\n $this->assertIsArray($r);\n\n return $r;\n }", "public function testIndexNamed()\n {\n $statement = (new CreateTable($this->mockConnection));\n $return = $statement->index('column', 'name');\n $array = $statement->toArray();\n\n $this->assertInstanceOf(CreateTable::class, $return);\n $this->assertEquals([\n 'constraints' => [\n [\n 'type' => 'index',\n 'name' => 'name',\n 'columns' => ['column']\n ]\n ],\n ], $array);\n }", "protected function tableModel()\n {\n }", "public function index(IndexableEntity $entity);", "public function createTable() {\n global $database;\n $SQL = \"CREATE TABLE IF NOT EXISTS `\".self::getTableName().\"` ( \".\n \"`trans_id` INT(11) NOT NULL AUTO_INCREMENT, \".\n \"`i18n_id` INT(11) NOT NULL DEFAULT '-1', \".\n \"`trans_language` VARCHAR(2) NOT NULL DEFAULT 'EN', \".\n \"`trans_translation` TEXT, \".\n \"`trans_usage` ENUM('TEXT','MESSAGE','ERROR','HINT','LABEL','BUTTON') NOT NULL DEFAULT 'TEXT', \".\n \"`trans_type` ENUM('REGULAR','CUSTOM') NOT NULL DEFAULT 'REGULAR', \".\n \"`trans_status` ENUM('ACTIVE','BACKUP') NOT NULL DEFAULT 'ACTIVE', \".\n \"`trans_author` VARCHAR(64) NOT NULL DEFAULT '- unknown -', \".\n \"`trans_quality` FLOAT NOT NULL DEFAULT '0', \".\n \"`trans_is_empty` TINYINT NOT NULL DEFAULT '0', \".\n \"`trans_timestamp` TIMESTAMP, \".\"PRIMARY KEY (`trans_id`), KEY (`i18n_id`, `trans_language`)\".\n \" ) ENGINE=MyIsam AUTO_INCREMENT=1 DEFAULT CHARSET utf8 COLLATE utf8_general_ci\";\n if (null == $database->query($SQL)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n return true;\n }", "private function createTables()\n {\n $this->createConfigsTable();\n $this->createServersTable();\n $this->createSearchesTable();\n }", "public function index(): Relation;", "protected function newIndex()\n {\n if (!isset($this->client)) {\n $this->client = $this->newClient();\n }\n\n return $this->client->getIndex($this->config['index']);\n }", "private function tableDataTable()\r\n\t{\r\n\t\t$source = $this->getSource();\r\n\r\n\t\t//$table = new TableExample\\DataTable();\r\n\t\t$table = new Model\\DataInsTable();\r\n\t\t$table->setAdapter($this->getDbAdapter())\r\n\t\t->setSource($source)\r\n\t\t->setParamAdapter(new AdapterDataTables($this->getRequest()->getPost()))\r\n\t\t;\r\n\t\treturn $table;\r\n\t}", "public function __construct(){\n\t\tparent::__construct($this->table);\n\t}", "public function __construct()\n {\n $this->currentId = Piwik_DataTable_Manager::getInstance()->addTable($this);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected static function initIndexes()\n {\n static::$indexes = [];\n foreach (static::$indexesConf as $name => &$index) {\n if (!isset($index['type'])) {\n $index['type'] = 'Generic';\n }\n $index['name'] = $name;\n $index['modelClass'] = static::class;\n\n $class = ClassFinder::getNamespace(\\Zer0\\Model\\Indexes\\AbstractIndex::class) . '\\\\' . $index['type'];\n\n static::$indexes[$name] = new $class($index);\n }\n }", "function generate_index_table()\n{\n $noforcelogin = 1;\n include(\"cdash/config.php\");\n require_once(\"cdash/pdo.php\");\n include('login.php');\n include_once('models/banner.php');\n\n $xml = begin_XML_for_XSLT();\n $xml .= add_XML_value(\"title\",\"CDash - Continuous Integration Made Easy\");\n\n $Banner = new Banner;\n $Banner->SetProjectId(0);\n $text = $Banner->GetText();\n if($text !== false)\n {\n $xml .= \"<banner>\";\n $xml .= add_XML_value(\"text\",$text);\n $xml .= \"</banner>\";\n }\n\n $xml .= \"<hostname>\".$_SERVER['SERVER_NAME'].\"</hostname>\";\n $xml .= \"<date>\".date(\"r\").\"</date>\";\n\n // Check if the database is up to date\n $dbField = \"TABLE_SCHEMA\";\n if($CDASH_DB_TYPE == 'pgsql')\n {\n $dbField = \"TABLE_CATALOG\";\n }\n $query =\n \"SELECT is_nullable FROM INFORMATION_SCHEMA.COLUMNS\n WHERE table_name = 'build' AND column_name = 'command' AND\n $dbField='$CDASH_DB_NAME'\";\n $dbTest = pdo_single_row_query($query);\n if ($dbTest['is_nullable'] != \"NO\")\n {\n $xml .= \"<upgradewarning>1</upgradewarning>\";\n }\n\n $xml .= \"<dashboard>\n <title>\".$CDASH_MAININDEX_TITLE.\"</title>\n <subtitle>\".$CDASH_MAININDEX_SUBTITLE.\"</subtitle>\n <googletracker>\".$CDASH_DEFAULT_GOOGLE_ANALYTICS.\"</googletracker>\";\n if(isset($CDASH_NO_REGISTRATION) && $CDASH_NO_REGISTRATION==1)\n {\n $xml .= add_XML_value(\"noregister\",\"1\");\n }\n $xml .= \"</dashboard> \";\n\n // User\n $userid = 0;\n if(isset($_SESSION['cdash']) && isset($_SESSION['cdash']['loginid']))\n {\n $xml .= \"<user>\";\n $userid = $_SESSION['cdash']['loginid'];\n $user = pdo_query(\"SELECT admin FROM \".qid(\"user\").\" WHERE id='$userid'\");\n $user_array = pdo_fetch_array($user);\n $xml .= add_XML_value(\"id\",$userid);\n $xml .= add_XML_value(\"admin\",$user_array[\"admin\"]);\n $xml .= \"</user>\";\n }\n\n $showallprojects = 0;\n if(isset($_GET['allprojects']) && $_GET['allprojects'] == 1)\n {\n $showallprojects = 1;\n }\n\n $projects = get_projects(!$showallprojects);\n $row=0;\n foreach($projects as $project)\n {\n $xml .= \"<project>\";\n $xml .= add_XML_value(\"name\",$project['name']);\n $xml .= add_XML_value(\"name_encoded\",urlencode($project['name']));\n $xml .= add_XML_value(\"description\",$project['description']);\n if($project['last_build'] == \"NA\")\n {\n $xml .= \"<lastbuild>NA</lastbuild>\";\n $xml .= \"<activitylevel>none</activitylevel>\";\n }\n else\n {\n $lastbuild = strtotime($project['last_build']. \"UTC\");\n $xml .= \"<lastbuild>\".date(FMT_DATETIMEDISPLAY,$lastbuild).\"</lastbuild>\";\n $xml .= \"<lastbuilddate>\".date(FMT_DATE,$lastbuild).\"</lastbuilddate>\";\n $xml .= \"<lastbuild_elapsed>\".time_difference(time()-$lastbuild,false,'ago').\"</lastbuild_elapsed>\";\n $xml .= \"<lastbuilddatefull>\".$lastbuild.\"</lastbuilddatefull>\";\n $xml .= \"<activitylevel>high</activitylevel>\";\n }\n\n $xml .= \"<activity>\";\n if(!isset($project['nbuilds']) || $project['nbuilds'] == 0)\n {\n $xml .= \"none\";\n }\n else if($project['nbuilds'] < 20) // 2 builds day\n {\n $xml .= \"low\";\n }\n else if($project['nbuilds'] < 70) // 10 builds a day\n {\n $xml .= \"medium\";\n }\n else if($project['nbuilds'] >= 70)\n {\n $xml .= \"high\";\n }\n\n $xml .= \"</activity>\";\n\n //$uploadsizeGB = round($project['uploadsize'] / (1024.0*1024.0*1024.0), 2);\n //$xml .= '<uploadsize>'.$uploadsizeGB.'</uploadsize>';\n $xml .= \"<row>\".$row.\"</row>\";\n $xml .= \"</project>\";\n if($row == 0)\n {\n $row = 1;\n }\n else\n {\n $row = 0;\n }\n }\n\n $xml .= '<allprojects>'.$showallprojects.'</allprojects>';\n $xml .= '<nprojects>'.get_number_public_projects().'</nprojects>';\n $xml .= \"</cdash>\";\n return $xml;\n}", "public function create()\n {\n return view(\"cursos.index\"); \n }" ]
[ "0.68727326", "0.660714", "0.6574684", "0.6465871", "0.6376907", "0.63482916", "0.6275401", "0.62445015", "0.61889666", "0.6094756", "0.60348326", "0.5963819", "0.59461755", "0.59338546", "0.58747023", "0.5825097", "0.5790299", "0.576983", "0.5767859", "0.56746536", "0.56640524", "0.5644453", "0.5636178", "0.5635226", "0.5615063", "0.56107527", "0.5588766", "0.5569071", "0.5567152", "0.55362874", "0.55252016", "0.55246055", "0.5511436", "0.5501237", "0.5482698", "0.54701656", "0.5465245", "0.5456335", "0.545369", "0.5446852", "0.5443065", "0.54416907", "0.54239583", "0.541456", "0.54037154", "0.5396888", "0.5389561", "0.5383838", "0.53788656", "0.53571445", "0.53566223", "0.5355863", "0.53532904", "0.5343441", "0.5331917", "0.5331474", "0.53235114", "0.5301527", "0.5281023", "0.527769", "0.5277009", "0.5267781", "0.5260171", "0.5256237", "0.5252871", "0.52452946", "0.52283007", "0.52128124", "0.52121466", "0.52036923", "0.5201974", "0.5201042", "0.5196033", "0.5191893", "0.5189788", "0.5170995", "0.51463056", "0.51359993", "0.5134812", "0.51295435", "0.51261675", "0.5123011", "0.5119746", "0.5105628", "0.51053256", "0.5102931", "0.51023453", "0.50993735", "0.50974965", "0.509015", "0.5089953", "0.50839084", "0.50796425", "0.5075936", "0.50734985", "0.50729054", "0.50719845", "0.50706697", "0.50671804", "0.50585383" ]
0.54439765
40
Get index table instance.
public function getTable() { return $this->table; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return $this->getTable();\n }", "protected function getIndex()\n\t{\n\t\tif (!$this->index) {\n\t\t\t$this->index = $this->getClient()->initIndex($this->name);\n\t\t}\n\t\t\n\t\treturn $this->index;\n\t}", "public function getIndex() {\n \treturn $this->index;\n }", "public function getIndex()\n {\n return $this->get(self::_INDEX);\n }", "public function getIndex()\n {\n return $this->index;\n }", "public function getIndex()\n {\n return $this->index;\n }", "public function getIndex()\n {\n return $this->index;\n }", "public function getIndex()\n {\n return $this->index;\n }", "public function getIndex() {\n return $this->index;\n }", "public function getIndex() {\n return $this->index;\n }", "public function getIndex() {\n return $this->index;\n }", "public function getIndex() {return $this->index;}", "public function getIndex() {\n\t\treturn $this->index;\n\t}", "public function getIndex() {\n\t\treturn $this->index;\n\t}", "public function getIndex() {\n\t\treturn $this->index;\n\t}", "public function getIndex() {\n\t\treturn $this->index;\n\t}", "public function getIndex() {\r\n\t\t\treturn $this->index;\r\n\t\t}", "public function getIndex() {\r\n\t\treturn $this->_index;\r\n\t}", "public function getIndex()\n {\n return isset($this->index) ? $this->index : null;\n }", "public function getIndex()\n\t\t{\n\t\t\treturn $this->_index;\n\t\t}", "public static function _index()\n\t{\n\t\treturn self::$_index;\n\t}", "abstract protected function makeIndex(string $table, DoctrineDBALIndex $index): Index;", "public function getTable()\r\n\t{\r\n\t\tif ($this->_table===null) {\r\n\t\t\t$this->_table=new $this->_tableClass;\r\n\t\t}\r\n\t\treturn $this->_table;\r\n\t}", "protected function getIndex()\n\t{ \n /*\n $sm = $this->account->getServiceManager();\n $dbh = $sm->get(\"Db\");\n $this->dbh = $dbh;\n\t\treturn new \\Netric\\EntityQuery\\Index\\Pgsql($this->account, $dbh);\n * \n */\n $this->dbh = $this->account->getServiceManager()->get(\"Db\");\n return new \\Netric\\EntityQuery\\Index\\Pgsql($this->account);\n\t}", "public static function getBllDynamiteIndex()\n {\n if (self::$_bllDynamiteIndex === null) {\n require_once 'Bll/Dynamite/Index.php';\n self::$_bllDynamiteIndex = new Bll_Dynamite_Index();\n }\n\n return self::$_bllDynamiteIndex;\n }", "protected function _getTable()\n {\n if (!$this->_table) {\n $this->_throwException('No table instance set.');\n }\n\n return $this->_table;\n }", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "protected function newIndex()\n {\n if (!isset($this->client)) {\n $this->client = $this->newClient();\n }\n\n return $this->client->getIndex($this->config['index']);\n }", "public function getTable(): Table;", "protected function createIndex(): IndexInterface {\n return Index::create([\n 'name' => $this->getRandomGenerator()->string(),\n 'id' => $this->getRandomGenerator()->name(),\n 'status' => 1,\n 'datasource_settings' => [\n 'entity:entity_test' => [],\n ],\n 'tracker_settings' => [\n 'default' => [],\n ],\n 'server' => $this->server->id(),\n 'options' => ['index_directly' => TRUE],\n ]);\n }", "public function index()\n {\n return $this->index;\n }", "protected function _getTable()\n\t{\n\t\t$tableName = substr( get_class($this), strlen(self::PREFIX) );\n\t\t$tableClass = self::PREFIX . 'DbTable_' . $tableName;\n\t\t$table = new $tableClass();\n\t\treturn $table;\n\t}", "public static function getTable();", "public function getTable()\r\n {\r\n if($this->_table === null){\r\n $this->_table = new SampleTable();\r\n }\r\n return $this->_table;\r\n }", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getIndex();", "public function getIndex();", "public function getIndex();", "public function get_table()\n {\n $this->process_frequency_table();\n return $this->table;\n }", "public function getTable() {}", "public function getTable() {}", "public function getTable() {}", "public function index()\n {\n return parent::getTable($this->columns, $this->url, 'table', 'Data Penjualan');\n }", "public function index()\n {\n return app(Index::class)($this);\n\n }", "public static function getTable()\n {\n return (new static)->model->getTable();\n }", "protected static function getTable()\n {\n if (static::$TABLE === null) {\n throw new NotImplementedException(_s('Missing table definition in Model ').get_called_class());\n }\n\n return static::$TABLE;\n }", "public static function generate_index_table() {\n global $PAGE;\n\n $headers = array(\n get_string('table_header_request', 'local_extension'),\n get_string('table_header_items', 'local_extension'),\n get_string('table_header_requestdate', 'local_extension'),\n get_string('table_header_statushead', 'local_extension'),\n );\n\n $columns = array('request', 'date', 'items', 'status');\n\n $table = new \\flexible_table('local_extension_summary');\n $table->define_columns($columns);\n $table->define_headers($headers);\n\n $table->define_baseurl($PAGE->url);\n $table->set_attribute('id', 'local_extension_table');\n $table->set_attribute('class', 'generaltable admintable');\n $table->setup();\n\n return $table;\n }", "public static function instance() {\n return Doctrine::getTable('DocumentTemplate');\n }", "protected function table()\n {\n $table = new Table(new Image());\n\n $table->id('ID')->sortable();\n\n $table->created_at();\n $table->updated_at();\n\n $table->disableFilter();\n\n return $table;\n }", "public function buildIndex();", "public function getTable();", "public function constantElasticSearchIndex()\n {\n return $this->elasticSearchIndex;\n }", "public function getTable()\n {\n if ($this->_table == null) {\n $this->_table = new Zend_Db_Table($this->_tableName);\n }\n\n return $this->_table;\n }", "protected function table()\n {\n $table = new Table(new Client);\n\n $table->column('id', 'ID');\n $table->column('name', __('name'));\n $table->column('created_at', trans('admin.created_at'));\n $table->column('updated_at', trans('admin.updated_at'));\n\n return $table;\n }", "public function index()\n {\n return $this->make('index');\n }", "public function getTable() { return( $this->_table ); }", "public function getTable() {\n return clone $this->table;\n }", "private function _createSearchIndexTable()\n\t{\n\t\tCraft::log('Creating the searchindex table.');\n\n\t\t// Taking the scenic route here so we can get to MysqlSchema's $engine argument\n\t\t$table = craft()->db->addTablePrefix('searchindex');\n\n\t\t$columns = array(\n\t\t\t'elementId' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Int, 'null' => false)),\n\t\t\t'attribute' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Varchar, 'maxLength' => 25, 'null' => false)),\n\t\t\t'fieldId' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Int, 'null' => false)),\n\t\t\t'locale' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Locale, 'null' => false)),\n\t\t\t'keywords' => DbHelper::generateColumnDefinition(array('column' => ColumnType::Text, 'null' => false)),\n\t\t);\n\n\t\tcraft()->db->createCommand()->setText(craft()->db->getSchema()->createTable($table, $columns, null, 'MyISAM'))->execute();\n\n\t\t// Give it a composite primary key\n\t\tcraft()->db->createCommand()->addPrimaryKey('searchindex', 'elementId,attribute,fieldId,locale');\n\n\t\t// Add the FULLTEXT index on `keywords`\n\t\tcraft()->db->createCommand()->setText('CREATE FULLTEXT INDEX ' .\n\t\t\tcraft()->db->quoteTableName(craft()->db->getIndexName('searchindex', 'keywords')).' ON ' .\n\t\t\tcraft()->db->quoteTableName($table).' ' .\n\t\t\t'('.craft()->db->quoteColumnName('keywords').')'\n\t\t)->execute();\n\n\t\tCraft::log('Finished creating the searchindex table.');\n\t}", "public function getTable()\r\n {\r\n }", "public function _INDEX()\n\t{\n\t\t\n\t}", "public function Table()\n {\n return $this->table;\n }", "function getIndexInfo($table)\n {\n $query = 'SELECT ' .\n '(SELECT relname FROM pg_class WHERE oid=indexrelid) AS key_name, ' .\n '* FROM pg_index ' .\n 'WHERE indrelid=(SELECT oid FROM pg_class WHERE relname=\\'%s\\') ' .\n 'AND indisprimary=\\'f\\' AND indisunique=\\'f\\' ' .\n 'ORDER BY indrelid, indexrelid';\n $sql = sprintf($query, $table);\n return $this->fetchQueryData($sql);\n }", "public function getIndex()\n {\n return view('admin.data_table');\n }", "public function getTable(): Table\n {\n $options = [];\n $options['CakephpFixtureFactoriesListeningModelEvents'] = $this->getListeningModelEvents() ?? [];\n $options['CakephpFixtureFactoriesListeningBehaviors'] = $this->getListeningBehaviors() ?? [];\n try {\n $table = FactoryTableRegistry::getTableLocator()->get($this->rootTableRegistryName, $options);\n } catch (\\RuntimeException $exception) {\n FactoryTableRegistry::getTableLocator()->clear();\n $table = FactoryTableRegistry::getTableLocator()->get($this->rootTableRegistryName, $options);\n }\n return $table;\n }", "public function getTable() {\n return $this->_table;\n }", "public function getTable() {\n return $this->_table;\n }", "public function getCurrentTable() {}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Horario_atencion');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('InvoiceParticularEntry');\n }", "public function index() {\n if ($this->_m_index !== null)\n return $this->_m_index;\n $this->_m_index = ($this->isIndexSeparate() ? $this->indexSeparate() : $this->indexInTag());\n return $this->_m_index;\n }", "private function getTable()\n\t{\n\t\treturn $this->_table;\n\t}", "public function getTable() {\n return $this->table;\n }", "public function getTable() {\n return $this->table;\n }", "protected function getIndexHandler()\n {\n return $this->objectManager->create(\n 'MeetMagentoPL\\AdminSearch\\Model\\IndexHandlerInterface',\n ['data' => $this->getData()]\n );\n }", "public function getTable() {\n\t\treturn $this->_table;\n\t}", "public function getTable() {\n\t\treturn $this->_table;\n\t}", "public function getTable() {\n\t\treturn $this->_table;\n\t}", "public function getMainTable(): Table\n {\n return $this->mainTable;\n }", "public function get_table()\n\t{\n\t\treturn $this->_table;\n\t}" ]
[ "0.691104", "0.666001", "0.66083765", "0.6588598", "0.6587844", "0.6587844", "0.6587844", "0.6587844", "0.65598625", "0.65598625", "0.65598625", "0.653594", "0.65140945", "0.65140945", "0.65140945", "0.65140945", "0.6486872", "0.64514464", "0.64154786", "0.64108074", "0.63708335", "0.6287831", "0.6271705", "0.62697446", "0.6233886", "0.622151", "0.6168436", "0.6168436", "0.6168146", "0.6168146", "0.6168146", "0.6167841", "0.6167735", "0.6167735", "0.6167735", "0.61532015", "0.61259294", "0.6111291", "0.6107111", "0.6036901", "0.60355216", "0.6031165", "0.59930104", "0.59930104", "0.59930104", "0.59930104", "0.59930104", "0.59930104", "0.5991979", "0.59871", "0.59871", "0.59871", "0.59871", "0.59871", "0.59871", "0.59871", "0.5985686", "0.5985686", "0.5985686", "0.5959997", "0.5940874", "0.59408444", "0.59404486", "0.5925848", "0.5907761", "0.58955425", "0.58714354", "0.58612716", "0.5838213", "0.58114517", "0.5799134", "0.57882124", "0.57691634", "0.5766548", "0.5760304", "0.5747157", "0.5743994", "0.5729514", "0.57251537", "0.57150584", "0.57092625", "0.5708348", "0.56819135", "0.5679509", "0.567804", "0.56584203", "0.56584203", "0.5652178", "0.564932", "0.56402135", "0.5639775", "0.56366795", "0.56366485", "0.56366485", "0.563192", "0.5626903", "0.5626903", "0.5626903", "0.5622777", "0.5619252" ]
0.0
-1
Set sort by default.
public function sortByDefault(string $key) { $this->setAttribute('sortByDefault', $key); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function applyDefaultSorting()\n\t{\n\t\tif (empty($this->order) && !empty($this->defaultOrder)) {\n\t\t\t$this->order = $this->defaultOrder;\n\t\t}\n\t}", "public function setSort($x) { $this->sort = $x; }", "public static function getDefaultSorting()\n {\n\n }", "function setSort($sort) {\n $this->sort = $sort;\n }", "public function defaultSort($sorts){\n\t\t$this->default_sort = $sorts;\n\t\treturn $this;//for chaining\n }", "public function _setSort($sort) {\n $this->sort = $sort;\n }", "public function setSort(string $sort): void\n {\n $this->_sort = $sort;\n }", "public function setSort($value)\n {\n $this->tpSort = (int) $value;\n }", "public function setSorted()\n {\n $this->isSorted = true;\n }", "public function removeDefaultSorting()\n\t{\n\t\tparse_str($this->getDataGrid()->defaultOrder, $list);\n\t\tif (isset($list[$this->getName()])) unset($list[$this->getName()]);\n\t\t$this->getDataGrid()->defaultOrder = http_build_query($list, '', '&');\n\n\t\treturn $this;\n\t}", "function init_sort(){\r\n\t\t$out='';\r\n\r\n\t\tif($this->sort===true or $this->sort==''){\r\n\t\t\tfor($i=0; $i<count($this->data[0]); $i++){\r\n\t\t\t\t$out.=($out ? '_' : '').'t';\r\n\t\t\t}\r\n\t\t\t$this->sort=$out;\r\n\t\t}\r\n\t}", "public static function getDefaultSorting()\n {\n return ['_sort'];\n }", "private function setSort($sort)\n {\n $this->sort = [];\n $orders = array_filter(explode(',', $sort));\n array_map([$this, 'appendSort'], $orders);\n }", "protected function getDefaultSort(): string {\n return 'score desc,sys_modified desc';\n }", "public function setSorting($arrSorting);", "public function setAsDefaultGridSortBy(string $direction='ASC'): self;", "protected function _setSortingParameters()\n {\n $sSortingParameters = $this->getViewParameter('sorting');\n if ($sSortingParameters) {\n list($sSortBy, $sSortDir) = explode('|', $sSortingParameters);\n $this->setItemSorting($this->getSortIdent(), $sSortBy, $sSortDir);\n }\n }", "public function setSort(?array $sort) : self\n {\n $this->initialized['sort'] = true;\n $this->sort = $sort;\n return $this;\n }", "public function scope_should_sort_by_default()\n {\n $this->assertEquals([1, 2, 3], ContentRating::all()->pluck('id')->toArray());\n\n ContentRating::swapOrder(ContentRating::find(1), ContentRating::find(3));\n\n $this->assertEquals([3, 2, 1], ContentRating::all()->pluck('id')->toArray());\n $this->assertEquals([1, 2, 3], ContentRating::withoutGlobalScopes()->get()->pluck('id')->toArray());\n }", "public function ClearSort()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n // Only the root can do this.\n if (null == $this->_my_root) {\n $this->sort_array = null;\n }\n }", "public function SetSort()\n\t\t{\n\t\t\tif (!isset($_GET['sort']) || empty($_GET['sort'])) {\n\t\t\t\t$_GET['sort'] = \"priceasc\";\n\t\t\t}\n\n\t\t\tswitch ($_GET['sort']) {\n\t\t\t\tcase \"featured\": {\n\t\t\t\t\t$GLOBALS['SortFeaturedSelected'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodsortorder desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"newest\": {\n\t\t\t\t\t$GLOBALS['SortNewestSelected'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.productid desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"bestselling\": {\n\t\t\t\t\t$GLOBALS['SortBestSellingSelected'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodnumsold desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"alphaasc\": {\n\t\t\t\t\t$GLOBALS['SortAlphaAsc'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodname asc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"alphadesc\": {\n\t\t\t\t\t$GLOBALS['SortAlphaDesc'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodname desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"avgcustomerreview\": {\n\t\t\t\t\t$GLOBALS['SortAvgReview'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"prodavgrating desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"pricedesc\": {\n\t\t\t\t\t$GLOBALS['SortPriceDesc'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodcalculatedprice desc\");\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t\t\tcase \"priceasc\":\n\t\t\t\tdefault:\n\t\t\t\t{\n\t\t\t\t\t$GLOBALS['SortPriceAsc'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodcalculatedprice asc\");\n\t\t\t\t\t$_GET['sort'] = \"priceasc\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->_pricesort = $_GET['sort'];\n\t\t}", "public static function setSorting(array $sorting) {\n self::$SORTING = $sorting;\n }", "function getSort() {\n return 999;\n }", "public function setSort($value)\n {\n return $this->set('Sort', $value);\n }", "public function setSort($value)\n {\n return $this->set('Sort', $value);\n }", "public function clearSort() {\n $this->sort = '';\n return $this;\n }", "public function setSort($sort=array())\n {\n $this->sort = is_array($sort) ? $sort : array();\n return $this;\n }", "function getSort(){\n return 999;\n }", "function getSort(){\n return 999;\n }", "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->identries); // identries\r\n\t\t\t$this->UpdateSort($this->titulo); // titulo\r\n\t\t\t$this->UpdateSort($this->id); // id\r\n\t\t\t$this->UpdateSort($this->islive); // islive\r\n\t\t\t$this->UpdateSort($this->tool_id); // tool_id\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "public function getDefaultSorting()\n {\n $aSorting = parent::getDefaultSorting();\n\n $oCategory = $this->getActiveCategory();\n\n if ($this->getListType() != 'search' && $oCategory && $oCategory instanceof oxCategory) {\n if ($sSortBy = $oCategory->getDefaultSorting()) {\n $sSortDir = ($oCategory->getDefaultSortingMode()) ? \"desc\" : \"asc\";\n $aSorting = array('sortby' => $sSortBy, 'sortdir' => $sSortDir);\n }\n }\n\n return $aSorting;\n }", "function SetUpSortOrder() {\r\n\t\tglobal $fs_multijoin_v;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$fs_multijoin_v->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$fs_multijoin_v->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->id); // id\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->mount); // mount\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->path); // path\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->parent); // parent\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->deprecated); // deprecated\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->name); // name\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->snapshot); // snapshot\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->tapebackup); // tapebackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->diskbackup); // diskbackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->type); // type\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT); // CONTACT\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT2); // CONTACT2\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->RESCOMP); // RESCOMP\r\n\t\t\t$fs_multijoin_v->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "protected function _getBrowseDefaultSort()\n {\n return array('added', 'd');\n }", "public function setSortField ($value)\r\n\t{\r\n\t\t$this->sortField = $value;\r\n\t}", "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->RazonSocial); // RazonSocial\r\n\t\t\t$this->UpdateSort($this->NombreContacto); // NombreContacto\r\n\t\t\t$this->UpdateSort($this->Poblacion); // Poblacion\r\n\t\t\t$this->UpdateSort($this->Id_Estado); // Id_Estado\r\n\t\t\t$this->UpdateSort($this->Telefonos); // Telefonos\r\n\t\t\t$this->UpdateSort($this->Celular); // Celular\r\n\t\t\t$this->UpdateSort($this->Maneja_Papeleta); // Maneja_Papeleta\r\n\t\t\t$this->UpdateSort($this->Maneja_Activacion_Movi); // Maneja_Activacion_Movi\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "function qw_default_sort_options( $sort_options ) {\n\n\t$sort_options['author_id'] = array(\n\t\t'title' => 'Author',\n\t\t'description' => 'The content author ID.',\n\t\t'type' => 'author',\n\t);\n\t$sort_options['comment_count'] = array(\n\t\t'title' => 'Comment Count',\n\t\t'description' => 'Total number of comments on a piece of content.',\n\t);\n\t$sort_options['menu_order'] = array(\n\t\t'title' => 'Menu Order (for Page post_types)',\n\t\t'description' => 'Menu Order of a Page.',\n\t);\n\t$sort_options['meta_value'] = array(\n\t\t'title' => 'Meta value',\n\t\t'description' => \"Note that a 'meta_key=keyname' filter must also be present in the query. Good for sorting words, but not numbers.\",\n\t);\n\t$sort_options['meta_value_num'] = array(\n\t\t'title' => 'Meta value number',\n\t\t'description' => \"Order by numeric meta value. Also note that a 'meta_key' filter must be present in the query. This value allows for numerical sorting as noted above in 'meta_value'.\",\n\t);\n\t$sort_options['none'] = array(\n\t\t'title' => 'None',\n\t\t'description' => 'No sort order.',\n\t\t'order_options' => array(\n\t\t\t'none' => 'None',\n\t\t)\n\t);\n\t$sort_options['post__in'] = array(\n\t\t'title' => 'Post__in order',\n\t\t'description' => 'Preserve post ID order given in the post__in array.',\n\t\t'order_options' => FALSE,\n\t);\n\t$sort_options['post_date'] = array(\n\t\t'title' => 'Date',\n\t\t'description' => 'The posted date of content.',\n\t\t'type' => 'date',\n\t);\n\t$sort_options['post_ID'] = array(\n\t\t'title' => 'Post ID',\n\t\t'description' => 'The ID of the content.',\n\t\t'type' => 'ID',\n\t);\n\t$sort_options['post_modified'] = array(\n\t\t'title' => 'Date Modified',\n\t\t'description' => 'Date content was last modified.',\n\t\t'type' => 'modified',\n\t);\n\t$sort_options['post_parent'] = array(\n\t\t'title' => 'Parent',\n\t\t'description' => 'The parent post for content.',\n\t\t'type' => 'parent',\n\t);\n\t$sort_options['post_title'] = array(\n\t\t'title' => 'Title',\n\t\t'description' => 'The title of the content.',\n\t\t'type' => 'title',\n\t);\n\t$sort_options['rand'] = array(\n\t\t'title' => 'Random',\n\t\t'description' => 'Random order.',\n\t);\n\n\treturn $sort_options;\n}", "public static function bootHasDefaultOrdering()\n {\n static::addGlobalScope(\n new OrderScope(self::$ordering)\n );\n }", "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->id, $bCtrl); // id\n\t\t\t$this->UpdateSort($this->detail_jenis_spp, $bCtrl); // detail_jenis_spp\n\t\t\t$this->UpdateSort($this->no_spp, $bCtrl); // no_spp\n\t\t\t$this->UpdateSort($this->tgl_spp, $bCtrl); // tgl_spp\n\t\t\t$this->UpdateSort($this->keterangan, $bCtrl); // keterangan\n\t\t\t$this->UpdateSort($this->no_spm, $bCtrl); // no_spm\n\t\t\t$this->UpdateSort($this->tgl_spm, $bCtrl); // tgl_spm\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function setDefaultOrderings(array $defaultOrderings): void;", "public function setSort_order( $sort_order ) {\n\t\t$this->sort_order = $sort_order;\n\t}", "function getSort(){\n return 100;\n }", "public function sortStrategy();", "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->created_time); // created_time\r\n\t\t\t$this->UpdateSort($this->message); // message\r\n\t\t\t$this->UpdateSort($this->link); // link\r\n\t\t\t$this->UpdateSort($this->type); // type\r\n\t\t\t$this->UpdateSort($this->caption); // caption\r\n\t\t\t$this->UpdateSort($this->description); // description\r\n\t\t\t$this->UpdateSort($this->name); // name\r\n\t\t\t$this->UpdateSort($this->source); // source\r\n\t\t\t$this->UpdateSort($this->from); // from\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "public function setSort(array $sort)\n {\n $sortables = [];\n \n foreach ($sort as $field => $order) {\n $sortables[] = $order == SORT_ASC ? $field : '-' . $field;\n }\n \n return $this->setArgs(['sort' => implode(\",\", $sortables)]);\n }", "protected function setOrder() {\r\n if( $this->sqlOrderBy ) {\r\n $this->sql .= ' ORDER BY ' . $this->sqlOrderBy;\r\n }\r\n }", "function SetUpSortOrder() {\n\t\tglobal $tbl_slide;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$tbl_slide->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$tbl_slide->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->title); // title\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->images); // images\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->order_by); // order_by\n\t\t\t$tbl_slide->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function addDefaultSorting($order = 'ASC')\n\t{\n\t\t$orders = array('ASC', 'DESC', 'asc', 'desc', 'A', 'D', 'a', 'd');\n\t\tif (!in_array($order, $orders)) {\n\t\t\tthrow new \\InvalidArgumentException(\"Order must be in '\" . implode(', ', $orders) . \"', '$order' given.\");\n\t\t}\n\n\t\tparse_str($this->getDataGrid()->defaultOrder, $list);\n\t\t$list[$this->getName()] = strtolower($order[0]);\n\t\t$this->getDataGrid()->defaultOrder = http_build_query($list, '', '&');\n\n\t\treturn $this;\n\t}", "public static function _init()\n\t{\n\t\t$config = \\Config::get('tablesort', array());\n\n\t\tstatic::set_config($config);\n\t}", "function SetupSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = @$_GET[\"order\"];\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->tanggal); // tanggal\n\t\t\t$this->UpdateSort($this->auc_number); // auc_number\n\t\t\t$this->UpdateSort($this->start_bid); // start_bid\n\t\t\t$this->UpdateSort($this->close_bid); // close_bid\n\t\t\t$this->UpdateSort($this->lot_number); // lot_number\n\t\t\t$this->UpdateSort($this->chop); // chop\n\t\t\t$this->UpdateSort($this->grade); // grade\n\t\t\t$this->UpdateSort($this->estate); // estate\n\t\t\t$this->UpdateSort($this->sack); // sack\n\t\t\t$this->UpdateSort($this->netto); // netto\n\t\t\t$this->UpdateSort($this->open_bid); // open_bid\n\t\t\t$this->UpdateSort($this->highest_bid); // highest_bid\n\t\t\t$this->UpdateSort($this->auction_status); // auction_status\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function SetupSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = @$_GET[\"order\"];\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->nombre_contacto); // nombre_contacto\n\t\t\t$this->UpdateSort($this->name); // name\n\t\t\t$this->UpdateSort($this->lastname); // lastname\n\t\t\t$this->UpdateSort($this->_email); // email\n\t\t\t$this->UpdateSort($this->address); // address\n\t\t\t$this->UpdateSort($this->phone); // phone\n\t\t\t$this->UpdateSort($this->cell); // cell\n\t\t\t$this->UpdateSort($this->created_at); // created_at\n\t\t\t$this->UpdateSort($this->id_sucursal); // id_sucursal\n\t\t\t$this->UpdateSort($this->tipoinmueble); // tipoinmueble\n\t\t\t$this->UpdateSort($this->tipovehiculo); // tipovehiculo\n\t\t\t$this->UpdateSort($this->tipomaquinaria); // tipomaquinaria\n\t\t\t$this->UpdateSort($this->tipomercaderia); // tipomercaderia\n\t\t\t$this->UpdateSort($this->tipoespecial); // tipoespecial\n\t\t\t$this->UpdateSort($this->email_contacto); // email_contacto\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "abstract public function prepareSort();", "public function setSorts(array $sorts = [])\r\n {\r\n $this->sorts = Transform::sorts($sorts);\r\n }", "public function setAllowSort(?bool $value): void {\n $this->getBackingStore()->set('allowSort', $value);\n }", "public function setSort($value)\n {\n if (is_array($value)) {\n $config = ['class' => Sort::className()];\n if ($this->id !== null) {\n $config['sortParam'] = $this->id . '-sort';\n }\n $this->_sort = Yii::createObject(array_merge($config, $value));\n } elseif ($value instanceof Sort || $value === false) {\n $this->_sort = $value;\n } else {\n throw new InvalidParamException('Only Sort instance, configuration array or false is allowed.');\n }\n }", "public function SetSort(\n $in_sort_fields_array = null,\n // An array of strings. The array will deliniate the sort order, by field name.\n // Array element [0] will be the highest priority, and it will descend from there.\n // If this is not specified, the sort will be cleared.\n $in_desc = false, ///< If this is set to true, the sort will be highest to lowest. Default is false.\n $in_max_sort_keys = 0 ///< A positive integer, specifying a new maximum sort depth. If it is not specified, the max will not be changed.\n ) {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n // Only the root can do this.\n if (null == $this->_my_root) {\n if (false != $in_desc) {\n $in_desc = true;\n }\n \n $this->sort_desc = $in_desc;\n\n if (0 < $in_max_sort_keys) {\n $this->sort_depth = $in_max_sort_keys;\n }\n \n if (null != $in_sort_fields_array) {\n $max = min($this->sort_depth, count($in_sort_fields_array));\n \n if ($max > 0) {\n $this->sort_array = array_slice($in_sort_fields_array, 0, $max);\n } else {\n $this->sort_array = null;\n }\n }\n }\n }", "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->userlevelid); // userlevelid\n\t\t\t$this->UpdateSort($this->userlevelname); // userlevelname\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function setSortOrder($sort_order)\r\n {\r\n $this->sort_order = $sort_order;\r\n }", "function SetupSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = @$_GET[\"order\"];\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->fecha_tamizaje, $bCtrl); // fecha_tamizaje\n\t\t\t$this->UpdateSort($this->id_centro, $bCtrl); // id_centro\n\t\t\t$this->UpdateSort($this->apellidopaterno, $bCtrl); // apellidopaterno\n\t\t\t$this->UpdateSort($this->apellidomaterno, $bCtrl); // apellidomaterno\n\t\t\t$this->UpdateSort($this->nombre, $bCtrl); // nombre\n\t\t\t$this->UpdateSort($this->ci, $bCtrl); // ci\n\t\t\t$this->UpdateSort($this->fecha_nacimiento, $bCtrl); // fecha_nacimiento\n\t\t\t$this->UpdateSort($this->dias, $bCtrl); // dias\n\t\t\t$this->UpdateSort($this->semanas, $bCtrl); // semanas\n\t\t\t$this->UpdateSort($this->meses, $bCtrl); // meses\n\t\t\t$this->UpdateSort($this->sexo, $bCtrl); // sexo\n\t\t\t$this->UpdateSort($this->discapacidad, $bCtrl); // discapacidad\n\t\t\t$this->UpdateSort($this->id_tipodiscapacidad, $bCtrl); // id_tipodiscapacidad\n\t\t\t$this->UpdateSort($this->resultado, $bCtrl); // resultado\n\t\t\t$this->UpdateSort($this->resultadotamizaje, $bCtrl); // resultadotamizaje\n\t\t\t$this->UpdateSort($this->tapon, $bCtrl); // tapon\n\t\t\t$this->UpdateSort($this->tipo, $bCtrl); // tipo\n\t\t\t$this->UpdateSort($this->repetirprueba, $bCtrl); // repetirprueba\n\t\t\t$this->UpdateSort($this->observaciones, $bCtrl); // observaciones\n\t\t\t$this->UpdateSort($this->id_apoderado, $bCtrl); // id_apoderado\n\t\t\t$this->UpdateSort($this->id_referencia, $bCtrl); // id_referencia\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function set_sort_mode($sort_mode)\r\n\t{\r\n\t\tif ($sort_mode && in_array($sort_mode, $this->_sort_modes))\r\n\t\t{\n\t\t\t$last_mode = $this->_sort_mode;\r\n\t\t\t$this->_sort_mode = $sort_mode;\n\t\t\treturn $last_mode;\r\n\t\t} \r\n\t\telse\r\n\t\t\treturn $this->_sort_mode;\r\n\t}", "function SetUpSortOrder() {\n\t\tglobal $patient_detail;\n\n\t\t// Check for an Order parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$patient_detail->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$patient_detail->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$patient_detail->UpdateSort($patient_detail->DetailNo); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->StudyID); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->PatientID); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->StudyDate); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->StudyTime); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->Modality); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->BodyPartExamined); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->ProtocolName); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->Status); // Field \n\t\t\t$patient_detail->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->getSqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->getSqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->id->setSort(\"DESC\");\n\t\t\t}\n\t\t}\n\t}", "function LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->getSqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->getSqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->tanggal->setSort(\"DESC\");\n\t\t\t\t$this->auc_number->setSort(\"DESC\");\n\t\t\t}\n\t\t}\n\t}", "function SetUpSortOrder() {\r\n\t\tglobal $rekeningju;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$rekeningju->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$rekeningju->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$rekeningju->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->id); // id\n\t\t\t$this->UpdateSort($this->name); // name\n\t\t\t$this->UpdateSort($this->_email); // email\n\t\t\t$this->UpdateSort($this->companyname); // companyname\n\t\t\t$this->UpdateSort($this->servicetime); // servicetime\n\t\t\t$this->UpdateSort($this->country); // country\n\t\t\t$this->UpdateSort($this->phone); // phone\n\t\t\t$this->UpdateSort($this->skype); // skype\n\t\t\t$this->UpdateSort($this->website); // website\n\t\t\t$this->UpdateSort($this->linkedin); // linkedin\n\t\t\t$this->UpdateSort($this->facebook); // facebook\n\t\t\t$this->UpdateSort($this->twitter); // twitter\n\t\t\t$this->UpdateSort($this->active_code); // active_code\n\t\t\t$this->UpdateSort($this->identification); // identification\n\t\t\t$this->UpdateSort($this->link_expired); // link_expired\n\t\t\t$this->UpdateSort($this->isactive); // isactive\n\t\t\t$this->UpdateSort($this->google); // google\n\t\t\t$this->UpdateSort($this->instagram); // instagram\n\t\t\t$this->UpdateSort($this->account_type); // account_type\n\t\t\t$this->UpdateSort($this->logo); // logo\n\t\t\t$this->UpdateSort($this->profilepic); // profilepic\n\t\t\t$this->UpdateSort($this->mailref); // mailref\n\t\t\t$this->UpdateSort($this->deleted); // deleted\n\t\t\t$this->UpdateSort($this->deletefeedback); // deletefeedback\n\t\t\t$this->UpdateSort($this->account_id); // account_id\n\t\t\t$this->UpdateSort($this->start_date); // start_date\n\t\t\t$this->UpdateSort($this->end_date); // end_date\n\t\t\t$this->UpdateSort($this->year_moth); // year_moth\n\t\t\t$this->UpdateSort($this->registerdate); // registerdate\n\t\t\t$this->UpdateSort($this->login_type); // login_type\n\t\t\t$this->UpdateSort($this->accountstatus); // accountstatus\n\t\t\t$this->UpdateSort($this->ispay); // ispay\n\t\t\t$this->UpdateSort($this->profilelink); // profilelink\n\t\t\t$this->UpdateSort($this->source); // source\n\t\t\t$this->UpdateSort($this->agree); // agree\n\t\t\t$this->UpdateSort($this->balance); // balance\n\t\t\t$this->UpdateSort($this->job_title); // job_title\n\t\t\t$this->UpdateSort($this->projects); // projects\n\t\t\t$this->UpdateSort($this->opportunities); // opportunities\n\t\t\t$this->UpdateSort($this->isconsaltant); // isconsaltant\n\t\t\t$this->UpdateSort($this->isagent); // isagent\n\t\t\t$this->UpdateSort($this->isinvestor); // isinvestor\n\t\t\t$this->UpdateSort($this->isbusinessman); // isbusinessman\n\t\t\t$this->UpdateSort($this->isprovider); // isprovider\n\t\t\t$this->UpdateSort($this->isproductowner); // isproductowner\n\t\t\t$this->UpdateSort($this->states); // states\n\t\t\t$this->UpdateSort($this->cities); // cities\n\t\t\t$this->UpdateSort($this->offers); // offers\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function asort()\n {\n }", "protected static function setValidSortTypes()\r\n {\r\n }", "public function set_sort(){\n \tsetcookie(\"sort_by\", addslashes($_POST['sort']), time()+(60*60*24*30), '/');\n }", "protected function get_sort_order() {\n return 111;\n }", "public function getSort() { return ''; }", "function SetUpSortOrder() {\n\t\tglobal $scholarship_package;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$scholarship_package->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$scholarship_package->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_package_id); // scholarship_package_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->start_date); // start_date\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->end_date); // end_date\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->status); // status\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->annual_amount); // annual_amount\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->grant_package_grant_package_id); // grant_package_grant_package_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->sponsored_student_sponsored_student_id); // sponsored_student_sponsored_student_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_type); // scholarship_type\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_type_scholarship_type); // scholarship_type_scholarship_type\n\t\t\t$scholarship_package->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function sort_flag() {\n return SORT_STRING;\n }", "public function setSortOrder($sortOrder = false) {\n\t\t\tglobal $db;\n\t\t\tif ($sortOrder) {\n\t\t\t\t$this->sort_order = $sortOrder;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$data = $db->get_var(\"SELECT sort_order FROM pages WHERE parent = '{$this->parent}' ORDER BY sort_order DESC LIMIT 1\");\n\t\t\t\t$this->sort_order = $data + 1;\n\t\t\t}\n\t\t}", "function LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->getSqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->getSqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->created_at->setSort(\"DESC\");\n\t\t\t}\n\t\t}\n\t}", "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->tgl, $bCtrl); // tgl\n\t\t\t$this->UpdateSort($this->no_spp, $bCtrl); // no_spp\n\t\t\t$this->UpdateSort($this->jns_spp, $bCtrl); // jns_spp\n\t\t\t$this->UpdateSort($this->kd_mata, $bCtrl); // kd_mata\n\t\t\t$this->UpdateSort($this->urai, $bCtrl); // urai\n\t\t\t$this->UpdateSort($this->jmlh, $bCtrl); // jmlh\n\t\t\t$this->UpdateSort($this->jmlh1, $bCtrl); // jmlh1\n\t\t\t$this->UpdateSort($this->jmlh2, $bCtrl); // jmlh2\n\t\t\t$this->UpdateSort($this->jmlh3, $bCtrl); // jmlh3\n\t\t\t$this->UpdateSort($this->jmlh4, $bCtrl); // jmlh4\n\t\t\t$this->UpdateSort($this->nm_perus, $bCtrl); // nm_perus\n\t\t\t$this->UpdateSort($this->alamat, $bCtrl); // alamat\n\t\t\t$this->UpdateSort($this->npwp, $bCtrl); // npwp\n\t\t\t$this->UpdateSort($this->pimpinan, $bCtrl); // pimpinan\n\t\t\t$this->UpdateSort($this->bank, $bCtrl); // bank\n\t\t\t$this->UpdateSort($this->rek, $bCtrl); // rek\n\t\t\t$this->UpdateSort($this->nospm, $bCtrl); // nospm\n\t\t\t$this->UpdateSort($this->tglspm, $bCtrl); // tglspm\n\t\t\t$this->UpdateSort($this->ppn, $bCtrl); // ppn\n\t\t\t$this->UpdateSort($this->ps21, $bCtrl); // ps21\n\t\t\t$this->UpdateSort($this->ps22, $bCtrl); // ps22\n\t\t\t$this->UpdateSort($this->ps23, $bCtrl); // ps23\n\t\t\t$this->UpdateSort($this->ps4, $bCtrl); // ps4\n\t\t\t$this->UpdateSort($this->kodespm, $bCtrl); // kodespm\n\t\t\t$this->UpdateSort($this->nambud, $bCtrl); // nambud\n\t\t\t$this->UpdateSort($this->nppk, $bCtrl); // nppk\n\t\t\t$this->UpdateSort($this->nipppk, $bCtrl); // nipppk\n\t\t\t$this->UpdateSort($this->prog, $bCtrl); // prog\n\t\t\t$this->UpdateSort($this->prog1, $bCtrl); // prog1\n\t\t\t$this->UpdateSort($this->bayar, $bCtrl); // bayar\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function GetSort() {\n\t\tglobal $dealers_reports;\n\n\t\t// Check for a resetsort command\n\t\tif (strlen(@$_GET[\"cmd\"]) > 0) {\n\t\t\t$sCmd = @$_GET[\"cmd\"];\n\t\t\tif ($sCmd == \"resetsort\") {\n\t\t\t\t$dealers_reports->setOrderBy(\"\");\n\t\t\t\t$dealers_reports->setStartGroup(1);\n\t\t\t\t$dealers_reports->Name->setSort(\"\");\n\t\t\t\t$dealers_reports->VatRegistrationNumber->setSort(\"\");\n\t\t\t\t$dealers_reports->Number_of_Deals->setSort(\"\");\n\t\t\t\t$dealers_reports->Commission->setSort(\"\");\n\t\t\t\t$dealers_reports->Premium->setSort(\"\");\n\t\t\t\t$dealers_reports->Total->setSort(\"\");\n\t\t\t}\n\n\t\t// Check for an Order parameter\n\t\t} elseif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$dealers_reports->CurrentOrder = ewrpt_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$dealers_reports->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$sSortSql = $dealers_reports->SortSql();\n\t\t\t$dealers_reports->setOrderBy($sSortSql);\n\t\t\t$dealers_reports->setStartGroup(1);\n\t\t}\n\n\t\t// Set up default sort\n\t\tif ($dealers_reports->getOrderBy() == \"\") {\n\t\t\t$dealers_reports->setOrderBy(\"dealer.Name ASC\");\n\t\t\t$dealers_reports->Name->setSort(\"ASC\");\n\t\t}\n\t\treturn $dealers_reports->getOrderBy();\n\t}", "public function getDefaultSorting()\n {\n $sort = null;\n\n $sorts = $this->_query->getSorts();\n if (null !== $sorts) {\n foreach ($sorts as $index => $direction) {\n $sort = array('index' => $index, 'direction' => $direction);\n\n // Ignore multiple sorts because jqGrid only supports single column sorting\n break;\n }\n }\n\n return $sort;\n }", "public function asort() {}", "function getSort(){\n return 188;\n }", "public function sort($sort) {\n\t\t$this->_body['sort'] = $sort;\n\t\treturn $this ;\n\t}", "public function setSortType($sort_type)\r\n {\r\n $this->sort_type = $sort_type == 'date' ? 'id' : $sort_type;\r\n }", "public function setSortMode($mode, $sortby = '')\n\t{\n\t\t$this->sort = $mode . ':' . $sortby;\n\t}", "function qw_form_default_sort_order_options( $sort ) {\n\tif ( ! empty( $sort['order_options'] ) ) { ?>\n\t\t<p>\n\t\t\t<!-- sort options -->\n\t\t\t<label class=\"qw-label\">Order by <?php print $sort['title']; ?>\n\t\t\t\t:</label>\n\t\t\t<select class='qw-js-title'\n\t\t\t name=\"<?php print $sort['form_prefix']; ?>[order_value]\">\n\t\t\t\t<?php\n\t\t\t\tforeach ( $sort['order_options'] as $value => $label ) {\n\t\t\t\t\t$selected = ( $sort['values']['order_value'] == $value ) ? 'selected=\"selected\"' : '';\n\t\t\t\t\t?>\n\t\t\t\t\t<option value=\"<?php print $value; ?>\"\n\t\t\t\t\t\t<?php print $selected; ?>>\n\t\t\t\t\t\t<?php print $label; ?>\n\t\t\t\t\t</option>\n\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</select>\n\t\t</p>\n\t\t<p class=\"description\">Select how to order the results.</p>\n\t<?php\n\t}\n}", "public function testTableSortDefaultSort() {\n $assert = $this->assertSession();\n\n $this->drupalGet('database_test/tablesort_default_sort');\n\n // Verify that the table was displayed. Just the header is checked for\n // because if there were any fatal errors or exceptions in displaying the\n // sorted table, it would not print the table.\n $assert->pageTextContains('Username');\n\n // Verify that the header links are built properly.\n $assert->linkByHrefExists('database_test/tablesort_default_sort');\n $assert->responseMatches('/\\<a.*title\\=\\\"sort by Username\\\".*\\>/');\n }", "function LoadSortOrder() {\r\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\r\n\t\tif ($sOrderBy == \"\") {\r\n\t\t\tif ($this->SqlOrderBy() <> \"\") {\r\n\t\t\t\t$sOrderBy = $this->SqlOrderBy();\r\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\r\n\t\t\t\t$this->created_time->setSort(\"DESC\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function initializeObject()\n {\n $this->setDefaultOrderings(\n [\n 'sorting' => \\TYPO3\\CMS\\Extbase\\Persistence\\QueryInterface::ORDER_ASCENDING,\n ]\n );\n }", "public function setDefaultOrder($order, $direction = 'asc')\n {\n $this->order = $order;\n $this->direction = $direction;\n }", "function getSort(){\n return 155;\n }", "function getSort(){\n return 155;\n }", "function getSort(){\n return 155;\n }", "function _sf_set_sort_cookie() {\n\t\tif(!isset($_COOKIE['sort'])){\n\t\t\t\n\t\t\t// SETS COOKIE\n\t\t\tsetcookie('sort', 'relevant', 0, '/');\n\t\t\t\n\t\t}\n\t\t\t\n\t\t//// IF OUR PER PAGE IS SET WE SET THE COOKIE AS WELL\n\t\tif(isset($_GET['sort'])) {\n\t\t\t\n\t\t\t$options = array('relevant', 'oldest', 'newest', 'closest');\n\t\t\n\t\t\t///// IF WE HAVE RATING\n\t\t\tif(ddp('rating') == 'on' && ddp('rating_sortby') == 'on') { $options[] = 'ratingdesc'; $options[] = 'ratingasc'; }\n\t\t\t\n\t\t\t///// MAKES SURE ITS A VALID OPTION\n\t\t\tif(in_array($_GET['sort'], $options)) {\n\t\t\t\t\n\t\t\t\t//// SAVES IT\n\t\t\t\tsetcookie('sort', $_GET['sort'], 0, '/');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "private function setCustomOrderBy()\n\t{\n\t\tif (!$this->useDataProvider && $this->customQuery->orderBy) {\n\t\t\t$this->orderBy = $this->customQuery->orderBy;\n\t\t} else {\n\t\t\t$this->sort = $this->customQuery->orderBy; //set $this->sort property for dataProvider sorting\n\t\t}\n\n\t\treturn $this;\n\t}", "function SetOrdering()\n {\n GLOBAL $_REQUEST;\n\n $sfid = 'sf' . $this->GetID();\n $srid = 'sr' . $this->GetID();\n $this->sf = $_REQUEST[$sfid];\n $this->sr = $_REQUEST[$srid];\n\n if ($this->sf != '') {\n $this->selectSQL->orders[] = $this->sf . \" \" . $this->sr;\n\n if ($this->sr == \"desc\") {\n $this->sr = \"asc\";\n $this->az = \"za\";\n } else {\n $this->sr = \"desc\"; //!< this is for the future \n $this->az = \"az\";\n } \n } else {\n $this->az = '';\n $this->sr = '';\n } \n }", "function LoadSortOrder() {\r\n\t\tglobal $fs_multijoin_v;\r\n\t\t$sOrderBy = $fs_multijoin_v->getSessionOrderBy(); // Get ORDER BY from Session\r\n\t\tif ($sOrderBy == \"\") {\r\n\t\t\tif ($fs_multijoin_v->SqlOrderBy() <> \"\") {\r\n\t\t\t\t$sOrderBy = $fs_multijoin_v->SqlOrderBy();\r\n\t\t\t\t$fs_multijoin_v->setSessionOrderBy($sOrderBy);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function setOrdering($ordering) {\n $this->ordering = $ordering;\n }", "public function getSort()\n {\n return 125;\n }", "public function setSortIndex($sortIndex);", "function custom_sort($sorted_by) {\r\n if (!sizeof($sorted_by->rules))\r\n $sorted_by->add(\"menuOrder\", \"ASC\");\r\n}", "public function onInitSortingComponent()\n {\n return new Sorting();\n }", "public function getDefaultSortColumns()\n\t{ return MyRecord::getDefaultSortColumns(); }", "public function setCustomOrderAsc()\n {\n $this->customOrder = \"asc\";\n }", "public function setSort(array $sort, callable|string $callback = null): self\n {\n $this->sort = [$sort, $callback];\n\n return $this;\n }" ]
[ "0.81317127", "0.76513386", "0.74474365", "0.7310472", "0.7153762", "0.71215135", "0.70772046", "0.703651", "0.6969249", "0.69180477", "0.6898007", "0.6887761", "0.6718344", "0.67091906", "0.66948193", "0.66786885", "0.66331106", "0.65701944", "0.65643907", "0.65216804", "0.64780486", "0.64685225", "0.64628446", "0.6455009", "0.6453452", "0.6447537", "0.6403217", "0.6394757", "0.6394757", "0.6392074", "0.6344329", "0.63245934", "0.6306476", "0.6295975", "0.62910736", "0.6260287", "0.62518436", "0.6232257", "0.61898017", "0.618722", "0.61858904", "0.6168836", "0.61640275", "0.6153776", "0.61520714", "0.6151462", "0.6150327", "0.61495006", "0.6141446", "0.6134547", "0.61299866", "0.6118405", "0.61160976", "0.6092809", "0.6089691", "0.6088782", "0.6087213", "0.60870904", "0.60771555", "0.6052268", "0.60436827", "0.60294306", "0.60199696", "0.6013571", "0.60106725", "0.60059214", "0.60017157", "0.5997037", "0.5994917", "0.59899205", "0.59882224", "0.59866095", "0.59862566", "0.597941", "0.5962033", "0.595612", "0.5951401", "0.59424126", "0.59277767", "0.59260076", "0.5918869", "0.59180015", "0.59107286", "0.591", "0.5898775", "0.58948034", "0.58714306", "0.58714306", "0.58714306", "0.5869997", "0.58587885", "0.58435875", "0.58402276", "0.58276194", "0.58208966", "0.5820449", "0.58102304", "0.58071244", "0.58055544", "0.5801937", "0.5795677" ]
0.0
-1
Render CrudIndexTable for Vue.
public function render(): array { return array_merge($this->attributes, [ 'cols' => $this->table->toArray() ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render()\n {\n return view('components.data-table');\n }", "public function getIndex()\n {\n return view('admin.data_table');\n }", "public function index()\n {\n return Datatables::of(Studentcsv::query())->make(true);\n }", "public function index()\n\t{\n\t\t$data = $this->crud->select()->orderBy('crud_id', 'desc')->get();\n\t\t$this->template('crud/index', $data);\n\t}", "public function render()\n {\n return view('components.table-view');\n }", "public function index()\n {\n return parent::getTable($this->columns, $this->url, 'table', 'Data Penjualan');\n }", "public function create()\n {\n $data = Crud::all();\n return Datatables::of($data)\n ->addIndexColumn()\n ->addColumn('action', function($row){\n $btn = '';\n $btn = $btn.' <a href=\"'.route('crud.edit', $row->sapid) .'\" class=\"edit btn btn-primary btn-sm\">Edit</a>';\n $btn = $btn.' <a href=\"javascript:void(0);\" class=\"edit btn btn-danger btn-sm\" onclick=\"deleteclients('.$row->sapid.')\">Delete</a>';\n \n return $btn;\n })\n ->rawColumns(['delete' => 'delete','action' => 'action'])\n ->make(true);\n \n \n return view('cruds.index');\n }", "public function index(): Response\n {\n return response()->view(\n 'livewire-crud::index',\n [\n 'datatable' => $this->getDataTableComponentName(),\n 'header' => $this->headerTitle,\n ]\n );\n }", "public function render()\n {\n return view('components.table-div-theader');\n }", "public function index()\n {\n return view('dashboard.pages.recep.rec_table');\n }", "public function indexApi(){\n return datatables(Categorie::query())\n ->setRowClass('filasTable')\n ->editColumn('slugCategoria','adminviews.categories.actions')\n ->rawColumns(['slugCategoria'])\n ->toJson();\n }", "private function _get_crud_for_index() {\t\t\n\t\t$data = array(\n\t\t\t'insert' => array(\n\t\t\t\tarray ('name' => 'name', 'label' => t('Role name'), 'type' => 'input',\n\t\t\t\t\t'rules' => array('unique', 'required', array('max_length' => 30, 'min_length' => 3), 'trim'),),\n\t\t\t),\n\t\t\t'select' => array(\n\t\t\t\tarray('name' => 'id', 'label' => 'ID', 'rules' => array('key', 'hidden', 'trim'),),\n\t\t\t\tarray('name' => 'name',\t'label' => t('Role name'), 'link' => 'example1/acl/screens/{id}', \n\t\t\t\t\t'rules' => array('trim', 'htmlspecialchars'),),\n\t\t\t),\n\t\t\t'update' => array(\n\t\t\t\tarray('name' => 'name',\t'label' => t('Role name'), 'type' => 'input', \n\t\t\t\t\t'rules' => array('unique', 'required', array('max_length' => 30, 'min_length' => 3), 'trim'),),\n\t\t\t),\n\t\t\t'delete' => array(\n\t\t\t\tarray('name' => 'name', 'label' => t('Role name'),),\n\t\t\t),\n 'search' => array('name' => t('Role name')),\n\t\t\t'datasource' => array(\n\t\t\t\t'table' => 'oci_roles',\n\t\t\t),\n\t\t\t'properties' => array(\n\t\t\t\t'name' => 'roles',\n\t\t\t\t'uri' => 'example1/roles/index',\n\t\t\t\t'index_column' => TRUE,\n\t\t\t\t'index_column_start' => 1,\n 'pagination' => TRUE,\n\t\t\t\t'pagination_per_page' => 5,\n\t\t\t\t'insert' => TRUE,\n\t\t\t\t'update' => TRUE,\n\t\t\t\t'delete' => TRUE,\n\t\t\t\t'crud_title' => NULL,\n\t\t\t\t'crud_form_title' => '<h2>'.t('List of Roles').'</h2>',\n\t\t\t\t'insert_form_title' => '<h2>'.t('Insert Data').'</h2>',\n\t\t\t\t'update_form_title' => '<h2>'.t('Update Data').'</h2>',\n\t\t\t\t'delete_form_title' => '<h2>'.t('Delete Data').'</h2>',\n\t\t\t),\n\t\t);\n\t\t$this->crud->set_data($data);\n\t\treturn $this->crud->render();\n\t}", "public function render()\n {\n return view('components.table.row');\n }", "public function render()\n {\n return view('components.transaction-table');\n }", "public function render()\n {\n return view('components.table-row');\n }", "public function indexData()\n {\n $tickets = Ticket::with('provider', 'client')->where('type', 'admin');\n $url = url('/backend/tickets/');\n return Datatables::of($tickets)\n ->addColumn('action', function ($ticket) use($url) {\n return '<a href=\"'.$url.'/'.$ticket->id.'\" class=\"btn btn-success m-btn m-btn--icon\">\n <span><i class=\"fa fa-eye\"></i><span>View</span></span></a>';\n })\n ->editColumn('status', function ($ticket) use($url) {\n if($ticket->status == 'opened'){\n return '<label class=\"m-badge m-badge--default m-badge--wide\">Opened</label>';\n }else{\n return '<label class=\"m-badge m-badge--success m-badge--wide\">Closed</label>';\n }\n })\n ->editColumn('client', function ($ticket) use($url) {\n if($ticket->client_id != null){\n return $ticket->client->first_name . ' ' . $ticket->client->last_name;\n }else{\n return '--';\n }\n })\n ->editColumn('provider', function ($ticket) use($url) {\n if($ticket->provider_id != null){\n return $ticket->provider->first_name . ' ' . $ticket->provider->last_name;\n }else{\n return '--';\n }\n })\n ->rawColumns(['action', 'status'])\n ->make(true);\n }", "public function index()\n\t{\n\t\t$class = $this->Model;\n\t\t$data = $class::paginate(Config::get('app.PAGE_SIZE','1'));\n\t\t$admin_config = $class::getConfig() ? : [];\n\t\t$template = isset($admin_config['template_index']) ? $admin_config['template_index'] : 'crud.index';\n\n\t\treturn View::make($template, [\n\t\t\t'page' => [],\n\t\t\t'data' => $data,\n\t\t\t'config' => $admin_config,\n\t\t]);\n\t}", "public function index()\n {\n // admin.dashboard.regulasi.dokumen\n $data = Regulasi::all();\n if (request()->ajax()) {\n return DataTables()->of($data)\n ->addColumn('link', function($link){\n return '<a target=\"_blank\" href=\"'. route('landing.regulasi.dokumen', $link->id) .'\">Lihat Dokumen</a>';\n })\n ->addColumn('action', function($row){\n $btn = '<a class=\"btn btn-xs btn-info mr-2 edit-regulasi\" href=\"'. route('regulasi.edit', $row->id) .'\" id=\"'. $row->id .'\">\n <i class=\"fa fa-edit\"></i> Edit </a>';\n $btn .= '<a class=\"btn btn-xs btn-info delete-confirm\" id=\"'. $row->id .'\" href=\"javascript:void(0)\">\n <i class=\"fa fa-trash\"></i> Hapus </a>';\n\n return $btn;\n })\n ->rawColumns(['action', 'link'])\n ->addIndexColumn()\n ->make(true);\n }\n return view('dashboard.admin.regulasi.index');\n }", "public function indexData() \n {\n return Datatables::of(LogPatron::select(['id', 'actor_id', 'action', 'role', 'patron_id', 'created_at', 'deactivated', 'firstname', 'middlename', 'lastname']))\n ->addColumn('issued_by', function($row) { return $row->actor_id . ' | ' . $row->userLogPatron->username; })\n ->orderColumn('issued_by', function ($query, $order) {\n $query->orderBy('id', $order);\n })\n ->addColumn('name', function($row) { return $row->lastname . ', ' . $row->firstname . ' ' . $row->middlename; })\n ->orderColumn('name', function ($query, $order) {\n $query->orderBy('lastname', $order)->orderBy('firstname', $order)->orderBy('middlename', $order);\n })\n ->editColumn('user_id', function($row) { return $row->user_id . ' | ' . $row->userLogPatron->username; })\n ->editColumn('deactivated', function($row) { \n if($row->deactivated == 1) return \"Deactivated\";\n else return \"Active\";\n })\n ->addColumn('actions', 'admin.logs.patron.action')\n ->rawColumns(['link', 'actions'])\n ->make(true); \n }", "public function index()\n {\n //\n\n\n $options = Option::get(['id', 'options_string']);\n\n return Datatables::of($options)->make(true);\n }", "public function index()\n {\n $statements = Statement::filter(Request::only('search', 'trashed'))\n ->orderBy('id', 'desc')\n ->paginate(5)\n ->transform(function ($statement) {\n return [\n 'id' => $statement->id,\n 'date' => $statement->date,\n 'soa_no' => $statement->soa_no,\n 'deleted_at' => $statement->deleted_at,\n 'client' => $statement->client ? $statement->client->only('name') : null,\n ];\n });\n\n return Inertia::render('Statements/Index', [\n 'filters' => Request::all('search', 'trashed'),\n 'statements' => $statements,\n ]);\n }", "public function index()\n {\n return datatables()->eloquent(Sector::with('voters','leaders','zone'))\n ->addColumn('votantes',function (Sector $sector){\n return count($sector->voters);\n })->addColumn('lideres',function (Sector $sector){\n return count($sector->leaders);\n })->toJson();\n }", "public function index()\n {\n //\n return view('cruds.index');\n }", "public function render()\n {\n return view('components.table', [\n 'format' => $this->format,\n 'data' => $this->data,\n ]);\n }", "public function indexTable()\n {\n $this->paginate = array('all', 'order' => array('modified' => 'desc'));\n $contentVariableTables = $this->paginate('ContentVariableTable');\n $this->set(compact('contentVariableTables', $contentVariableTables));\n }", "public function index()\n {\n $datas = Penerbit::orderBy('created_at','decs')->paginate(10);\n\t\treturn view('admin.penerbit.table',compact('datas'));\n }", "public function index()\n {\n if(request()->ajax()){\n return datatables()->of(Product::latest()->get())\n ->addColumn('action',function($data){\n $button = '<button type=\"button\" name=\"edit\" id=\"'.$data->id.'\" class=\"edit btn btn-primary btn-sm\">Edit</button>';\n $button .= '<button type=\"button\" name=\"delete\" id=\"'.$data->id.'\" class=\"delete btn btn-danger btn-sm\" data-toggle=\"modal\" data-target=\"#modal-delete\">Delete</button>';\n return $button;\n })\n ->rawColumns(['action'])\n ->addIndexColumn()\n ->make(true);\n }\n return view('back-end.products');\n }", "public function index()\n {\n return Row::all();\n }", "public function search()\n {\n $this->crud->hasAccessOrFail('list');\n\n // create an array with the names of the searchable columns\n $columns = collect($this->crud->columns)\n ->reject(function ($column, $key) {\n // the select_multiple, model_function and model_function_attribute columns are not searchable\n return isset($column['type']) && ($column['type'] == 'select_multiple' || $column['type'] == 'model_function' || $column['type'] == 'model_function_attribute');\n })\n ->pluck('name')\n // add the primary key, otherwise the buttons won't work\n ->merge($this->crud->model->getKeyName())\n ->toArray();\n\n // structure the response in a DataTable-friendly way\n $dataTable = new \\LiveControl\\EloquentDataTable\\DataTable($this->crud->query, $columns);\n\n // make the datatable use the column types instead of just echoing the text\n $dataTable->setFormatRowFunction(function ($entry) {\n // get the actual HTML for each row's cell\n $row_items = $this->crud->getRowViews($entry, $this->crud);\n\n // add the buttons as the last column\n if ($this->crud->buttons->where('stack', 'line')->count()) {\n $row_items[] = \\View::make('bcrud::inc.button_stack', ['stack' => 'line'])\n ->with('crud', $this->crud)\n ->with('entry', $entry)\n ->render();\n }\n\n // add the details_row buttons as the first column\n if ($this->crud->details_row) {\n array_unshift($row_items, \\View::make('bcrud::columns.details_row_button')\n ->with('crud', $this->crud)\n ->with('entry', $entry)\n ->render());\n }\n\n return $row_items;\n });\n\n return $dataTable->make();\n }", "public function index()\n {\n if(request()->ajax())\n {\n return DataTables::of(TipoItem::latest()->get())\n ->addColumn('action', function($data){\n $button = '<button type=\"button\" name=\"edit\" id=\"'.$data->id.'\" class=\"edit btn btn-primary btn-sm\">Editar</button>';\n $button .= '&nbsp;&nbsp;';\n $button .= '<button type=\"button\" name=\"delete\" id=\"'.$data->id.'\" class=\"delete btn btn-danger btn-sm\">Eliminar</button>';\n return $button;\n })->addColumn('flujoTrabajo',function($data){\n $flujoTrabajo=FlujoTrabajo::find($data->flujoTrabajo_id);\n \n if( $flujoTrabajo!=null){\n return $flujoTrabajo->nombre;\n }\n return 'Vacio';\n })->addColumn('categoria',function($data){\n $categoria=Categoria::find($data->categoria_id);\n if( $categoria!=null){\n return $categoria->nombre;\n }\n return 'Vacio';\n \n })->addColumn('medida',function($data){\n $medida=Medida::find($data->medida_id);\n \n if( $medida!=null){\n return $medida->nombre;\n }\n return 'Vacio';\n })\n ->rawColumns(['action'])\n ->make(true);\n }\n \n \n \n $medidas=Medida::all();\n $flujosTrabajos=FlujoTrabajo::all();\n $categorias=Categoria::all();\n \n \n return view('tipoItem.index',compact('medidas','flujosTrabajos','categorias'));\n }", "public function index()\n {\n $tables = table::orderby('id','desc')->get();\n return view('admin.table.index',compact('tables',));\n }", "public function render()\n {\n $this->createGridView();\n $this->restoreSortOrder();\n\n return view('rufaidulk::grid.index', ['grid' => $this]);\n }", "public function crudIndex(Model $base)\n {\n// $models = $base->attributes->paginate();\n// $name = $this->view;\n// $route = $this->route;\n//\n// return view($this->view . '.index', compact('models', 'name', 'route'));\n }", "public function index()\n {\n if(request()->ajax()) {\n $fuentes=Fuentes::all();\n return datatables()->of($fuentes)\n ->addColumn('action', function ($row) {\n $edit = '<a href=\"javascript:void(0);\" data-id=\"'.$row->id.'\" class=\"btn btn-warning btn-xs\" id=\"editFuente\"><i class=\"fa fa-pencil-alt\"></i></a>';\n $delete = ' <a href=\"javascript:void(0);\" id=\"delete-estado\" onClick=\"deleteFuente('.$row->id.')\" class=\"delete btn btn-danger btn-xs\"><i class=\"fa fa-trash\"></i></a>';\n return $edit . $delete;\n })->rawColumns(['action'])\n ->addIndexColumn()\n ->make(true);\n }\n return view('fuentes.index');\n }", "public function getIndex()\n {\n return view('datatables.index');\n }", "public function index()\n {\n $crud = Crud::all();\n\n return View('crud.index', compact('crud'));\n }", "public function render()\n {\n return view('components.table-view-action');\n }", "public function index(): Renderable\n {\n $databaseData = (object)app(DatabaseTraverser::class)->getAll();\n\n return view(\"Prequel::main\", [\n \"env\" => [\n \"connection\" => config(\"prequel.database.connection\"),\n \"database\" => config(\"prequel.database.database\"),\n \"host\" => config(\"prequel.database.host\"),\n \"port\" => config(\"prequel.database.port\"),\n \"user\" => config(\"prequel.database.username\"),\n 'baseUrl' => config(\"prequel.baseUrl\"),\n ],\n \"data\" => [\n \"collection\" => $databaseData->collection,\n \"flatTableCollection\" => $databaseData->flatTableCollection,\n ],\n \"lang\" => Lang::get(\n \"Prequel::lang\",\n [],\n (string)config(\"prequel.locale\")\n ),\n ]);\n }", "public function table()\n {\n return $this->getTable('comments')\n ->header([\n HeaderItem::label('编号')->prop('id')->width(50),\n\n HeaderItem::label('文章标题')->prop('title'),\n\n HeaderItem::label('评论')->prop('content'),\n\n HeaderItem::label('用户昵称')->prop('username'),\n\n HeaderItem::label('ip')->prop('ip'),\n\n HeaderItem::label('状态')->prop('status')->withSwitchComponent(),\n\n HeaderItem::label('创建时间')->prop('created_at'),\n\n HeaderItem::label('操作')->actions([\n Actions::delete(),\n ])\n ])\n ->withSearch([\n Search::input('title', '文章标题')->clearable(true),\n\n Search::input('username', '用户名称')->clearable(true),\n\n Search::label('状态')->status('请选择状态')->clearable(true),\n ])\n ->withBind()\n ->withApiRoute('/cms/comments')\n ->render();\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function index(ClueEnTableBuilder $table): Response\n {\n return $table->render();\n }", "public function getIndex()\n {\n return view('datatables-test');\n }", "public function index(VertueDataTable $vertueDataTable)\n {\n /*$vertues = Vertue::with('partieutilisee')->get();\n $vertues = Vertue::with('regionpratiquee')->get();\n $vertues = Vertue::with('plante')->get();*/\n return $vertueDataTable->render('vertues.index');\n }", "public function getIndex()\n\t{\n\t\tif (auth()->check()) {\n\t\t\t$resourceList = ResourceList::where('resource_list.reStatus', '审核通过')->where('resource_list.uid', '!=', auth()->user()->id);\n\t\t}\n\t\telse {\n\t\t\t$resourceList = ResourceList::where('resource_list.reStatus', '审核通过');\n\t\t}\n\t\t\n\t\tif (Input::get('dlTms') == 'desc') {\n\t\t\t$resourceList->orderby('resource_list.dlTms', 'desc');\n\t\t}\n\t\telseif (Input::get('dlTms') == 'asc') {\n\t\t\t$resourceList->orderby('resource_list.dlTms', 'asc');\n\t\t}\n\t\telse {\n\t\t\t$resourceList->orderby('resource_list.created_at', 'desc');\n\t\t}\n\t\tif (Input::get('action') == 'attention') \n\t\t\t$resourceList->leftJoin('res_attention_rel', 'resource_list.id', '=', 'res_attention_rel.rlid')->where('res_attention_rel.uid', auth()->user()->id)->select('resource_list.*', 'res_attention_rel.*', 'resource_list.id');\n\t\t$this->filter = \\DataFilter::source($resourceList);\n\t\t$this->filter->attributes(['class'=>'form-custom member-search mt20 mb20 clearfix']);\n\t\t$this->filter->add('coopManu')->attributes(['style'=>'display:none']);\n\t\t$this->filter->add('variety')->attributes(['style'=>'display:none']);\n\t\t$this->filter->add('cmpy')->attributes(['style'=>'display:none']);\n\t\t$this->filter->add('city')->attributes(['style'=>'display:none']);\n\t\t$this->filter->submit(trans('panel::fields.query'));\n\t\t$this->filter->build();\n\t\t\n\t\t$this->grid = \\DataGrid::source($this->filter);\n\t\t$this->setGridCommon();\n\t\t$this->grid->add('id');\n\t\t$this->grid->add('cmpy');\n\t\t$this->grid->add('contact');\n\t\t$this->grid->add('variety');\n\t\t$this->grid->add('coopManu');\n\t\t$this->grid->add('city');\n\t\t$this->grid->add('dlTms');\n\t\t$this->grid->add('annex');\n\t\t$this->grid->add('annexName');\n\t\t$this->grid->add('uid');\n\t\t$this->grid->add('isAttention');\n\t\t//$this->grid->paginate(1);\n\t\t$this->grid->row(function ($row) {\n\t\t\tif (auth()->check()) {\n\t\t\t\t$row->cell('isAttention')->value = ResAttentionRel::firstOrNew(['uid'=>auth()->user()->id, 'rlid'=>$row->cell('id')->value])->exists;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$row->cell('isAttention')->value = false;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t$this->grid->getGrid('rapyd::datagrid_custom_resource');\n\t\t\n\t\t/*\n\t\t * 资源单地区数据\n\t\t */\n\t\t$city = ResourceArea::lists('city', 'id')->all();\n\t\t/*\n\t\t * 厂商数据\n\t\t */\n\t\t$coopManu = $this->getOptionGroupData(new CoopManu(), 'cname');\n\t\t\n\t\treturn view('fore.resource', array(\n\t\t\t\t'grid' \t => $this->grid,\n\t\t\t\t'city' \t => $city,\n\t\t\t\t'coopManu' \t => $coopManu,\n\t\t\t\t'filter' \t => $this->filter,\n\t\t\t\t'import_message' => Input::get('import_message'),\n\t\t));\n\t}", "public function table()\n\t{\n\t\t$sql = '\n\t\t\tselect \n\t\t\t\tid, \n\t\t\t\tname, \n\t\t\t\tenable \n\t\t\tfrom \n\t\t\t\tfile \n\t\t\twhere \n\t\t\t\tuser = ?';\n\n\t\t$results = DB::select($sql, [Auth::id()]);\n\n\t\treturn Datatable::collection(new Collection($results))\n\t\t\t->showColumns('name')\n\t\t\t->addColumn('enable', function($model) \n\t\t\t{\n\t\t\t\treturn '<a href=\"'.url(\"/file/edit&ID=\".$model->id.\"&EN=\".$model->enable).'\">'.$model->enable.'</a>';\n\t\t\t})\n\t\t\t->addColumn('remove', function($model) \n\t\t\t{\n\t\t\t\treturn '<a href=\"'.url(\"/file/delete&ID=\".$model->id).'\"><i class=\"fa fa-times\"></i></a>';\n\t\t\t})\n ->searchColumns('name')\n ->orderColumns('enable', 'name')\n ->make();\n\t}", "public function index()\n {\n return view('admin.examples.datatables');\n }", "public function index_api()\n {\n $brands = Brand::withCount('product')->get();\n return datatables()->of($brands)\n ->addColumn('product_count', function ($brands) {\n return '<a role=\"button\" href=\"' . route('admin.product.index') . '?query='. $brands->name . '\">' . $brands->product_count . '</a>';\n })\n ->addColumn('action', function ($brands) {\n $edit = '<a href=\"javascript:void(0)\" onclick=\"editBrand(\\'' . route('admin.brand.update', $brands->id) . '\\', \\'' . $brands->name . '\\')\" class=\"text-warning-dark mr-3\"><i class=\"fa fa-pencil fa-lg\"></i></a>';\n $delete = '<a href=\"javascript:void(0)\" onclick=\"delBrand(\\'' . route('admin.brand.destroy', $brands->id) . '\\')\" class=\"text-danger\"><i class=\"fa fa-trash fa-lg\"></i></a>';\n return '<div class=\"btn-group\" role=\"group\" aria-label=\"Basic example\">' . $edit . $delete . '</div>';\n })->escapeColumns([])->toJson();\n }", "public function index(){\n\n $vouchers = SubscriptionVoucher::with('plan');\n\n if(request()->ajax()){\n return DataTables::of($vouchers)\n ->addIndexColumn()\n ->addColumn('link_by',function($row){\n if($row->link_by == 'linktoplan'){\n $html = '<p>Linked to plan:</p>';\n $html .= '<p class=\"badge badge-primary\"><b>'.$row->plan->name.'</b></p>';\n return $html;\n }else{\n return __('Linked to All plans');\n }\n })\n ->addColumn('status',function($row){\n if($row->status == 1){\n return '<span class=\"badge badge-success\">Active</span>\n ';\n }else{\n return '<span class=\"badge badge-danger\">Deactive</span>\n ';\n }\n })\n ->editColumn('action','admin.subscription.coupans.action')\n ->rawColumns(['link_by','status','action'])\n ->make(true);\n }\n\n return view('admin.subscription.coupans.index');\n\n }", "public function datatable()\n {\n $data = $this->model->query();\n\n return DataTables::of($data)\n ->addIndexColumn()\n ->addColumn(\"image_show\",function($data){\n return \"<center><img src='\".$data->image .\"' width='130px' > </center>\";\n })\n ->addColumn('action', function ($data) {\n return '<center>\n <button class=\"btn btn-circle btn-sm btn-success btn_edit_attachment\" data-size=\"md\" data-url=\"'. url(\"admin/doctor/$data->id/edit-attachment\").'\" data-toggle=\"tooltip\" title=\"Ubah Gambar\">\n <i class=\"fa fa-image\"> </i>\n </button>\n\n <button class=\"btn btn-circle btn-sm btn-warning btn_edit\" data-size=\"lg\" data-url=\"'. url(\"admin/doctor/$data->id/edit\").'\" data-toggle=\"tooltip\" title=\"Ubah Data\">\n <i class=\"fa fa-edit\"> </i>\n </button>\n \n \n <button class=\"btn btn-circle btn-sm btn-danger btn_delete\" data-url=\"'.url(\"admin/doctor/$data->id\").'\" data-text=\"\" data-toggle=\"tooltip\" title=\"Hapus Data\">\n <i class=\"fa fa-trash\"> </i>\n </button>\n </center>';\n })\n ->rawColumns([\"image_show\",\"action\"])\n ->make(true);\n }", "public function render()\n {\n $users = User::where(function ($query) {\n $query\n ->where('name', 'like', \"%{$this->search}%\")//A\n ->orWhere('email', 'like', \"%{$this->search}%\");//B\n })\n ->where('active', $this->filterByActive)//C\n ->when($this->sortField, function ($query) {\n $query->orderBy($this->sortField, $this->sortAsc ? 'asc' : 'desc');\n })\n ->paginate(10);\n return view('livewire.datatable', compact('users'));\n }", "function Render()\n\t{\n\t\t$strTableName = $this->_strName;\n\t\t$strVixenTable = \"Vixen.table.{$strTableName}\";\n\n\t\techo \"\n<script type='text/javascript'>\n\t{$strVixenTable} = Object();\n\t{$strVixenTable}.collapseAll = TRUE;\n\t{$strVixenTable}.linked = TRUE;\n\t{$strVixenTable}.totalRows = 0;\n\t{$strVixenTable}.row = Array();\n</script>\";\n\t\t\t\n\t\t\n\t\t$strPageSize = $this->_intPageSize > 0 ? \" page_size='{$this->_intPageSize}' \" : \"\";\n\n\t\techo \"<table border='0' cellpadding='3' cellspacing='0' class='Listing' width='100%' id='$strTableName'$strPageSize>\\n\";\n\t\t\n\t\t// Build headers\n\t\techo \"<tr class='First'>\\n\";\n\t\t$intHeaderCount = 0;\n\t\t$intSortLimit = ($this->_bolSortable && is_array($this->_arrSortFields)) ? count ($this->_arrSortFields) : -1;\n\t\tforeach ($this->_arrHeader AS $objField)\n\t\t{\n\t\t\t$strAlign = $this->_arrAlignments[$intHeaderCount];\n\t\t\t$strSortLabel = \"\";\n\t\t\tif ($intHeaderCount <= $intSortLimit)\n\t\t\t{\n\t\t\t\tif ($this->_arrSortFields[$intHeaderCount] !== NULL)\n\t\t\t\t{\n\t\t\t\t\t$strSortLabel = \" TABLE_SORT='\" . $this->_arrSortFields[$intHeaderCount] . \"' \";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$strSortLabel = \" NO_TABLE_SORT='1' \";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \" <th width='{$this->_arrWidths[$intHeaderCount]}' align='$strAlign'$strSortLabel>\". $objField .\"</th>\\n\";\n\t\t\t$intHeaderCount++;\n\t\t}\n\t\techo \"</tr>\\n\";\n\t\t\n\t\t// Build rows\n\t\t$intRow = -1;\n\t\tforeach ($this->_arrRows AS $objRow)\n\t\t{\n\t\t\t$intRow++;\n\t\t\t$strClass = ($intRow % 2) ? 'Odd' : 'Even';\n\t\t\t$strStyle = \"\";\n\t\t\t\n\t\t\tif (isset($objRow['OnClick']))\n\t\t\t{\n\t\t\t\t// Escape special chars\n\t\t\t\t$strOnClick = \"onclick='\". htmlspecialchars($objRow['OnClick'], ENT_QUOTES) .\"'\";\n\t\t\t\t$strStyle .= \"cursor:pointer;\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$strOnClick = \"\";\n\t\t\t}\n\t\t\t\n\t\t\techo \"<tr id='\" . $strTableName . \"_\" . $intRow . \"' class='$strClass' $strOnClick style='$strStyle'>\\n\";\n\t\t\t\n\t\t\t$intColCount = 0;\n\t\t\t// Build fields\n\t\t\tforeach ($objRow['Columns'] as $objField)\n\t\t\t{\n\t\t\t\t$strWidth = '';\n\t\t\t\t// Work out which width to use\n\t\t\t\t//TODO! After setting the widths once in the header, you shouldn't have to set them again, but we are anyway.\n\t\t\t\t//This could cut down the size of the html file generated\n\t\t\t\t/*if (isset($objRow['Widths']))\n\t\t\t\t{\n\t\t\t\t\t// Use the width specific to this row and column\n\t\t\t\t\t$strWidth = \"width='\". $objRow['Widths'][$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Use the general width of this column\n\t\t\t\t\t$strWidth = \"width='\". $this->_arrWidths[$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\t*/\n\n\t\t\t\t// Work out which alignment to use\n\t\t\t\tif (isset($objRow['Alignments']))\n\t\t\t\t{\n\t\t\t\t\t// Use the alignment specific to this row and column\n\t\t\t\t\t$strAlignment = \"align='\". $objRow['Alignments'][$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Use the general alignment of this column\n\t\t\t\t\t$strAlignment = \"align='\". $this->_arrAlignments[$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Work out how many columns, this column spans\n\t\t\t\t$strColSpan = \"\";\n\t\t\t\tif (isset($objRow['ColSpans']))\n\t\t\t\t{\n\t\t\t\t\t// colspan values have been declared for this row\n\t\t\t\t\t$strColSpan = \"colspan='\". $objRow['ColSpans'][$intColCount] .\"'\";\n\t\t\t\t\t\n\t\t\t\t\t// If using ColSpans do not use row widths\n\t\t\t\t\t$strWidth = \"\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo \"<td $strWidth $strAlignment $strColSpan>\";\n\t\t\t\techo \"$objField\";\n\t\t\t\techo \"</td>\\n\";\n\t\t\t\t$intColCount++;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Build detail\n\t\t\tif ($this->_bolDetails)\n\t\t\t{\n\t\t\t\techo \"</tr>\";\n\t\t\t\techo \"<tr>\";\n\t\t\t\techo \"<td colspan=\". count($this->_arrHeader) .\" style='padding: 0px 1px 1px 1px;'>\";\n\t\t\t\techo \"<div id='\" . $strTableName . \"_\" . $intRow . \"DIV-DETAIL' style='display: block; overflow:hidden;'>\";\n\t\t\t\techo $objRow['Detail'];\n\t\t\t\techo \"</div>\";\n\t\t\t\techo \"</td>\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t// Build tooltip\n\t\t\tif ($this->_bolToolTips)\n\t\t\t{\n\t\t\t\techo \"</tr>\";\n\t\t\t\techo \"<tr>\";\n\t\t\t\techo \"<td colspan=4 style='padding-top: 0px; padding-bottom: 0px'>\";\n\t\t\t\techo \"<div id='\" . $strTableName . \"_\" . $intRow . \"DIV-TOOLTIP' style='display: none;'>\";\n\t\t\t\techo $objRow['ToolTip'];\n\t\t\t\techo \"</div>\\n\";\n\t\t\t\techo \"</td>\";\n\t\t\t}\n\t\t\n\t\t\techo \"\\n<script type='text/javascript'>\";\n\t\t\techo \"objRow = Object();\\n\";\n\t\t\t\n\t\t\techo \"objRow.selected = false;\\n\";\n\t\t\techo \"objRow.up = true;\\n\";\n\n\t\t\tif ($this->_bolLinked)\n\t\t\t{\n\t\t\t\tif (is_array($objRow['Index']))\n\t\t\t\t{\n\t\t\t\t\t// add Indexes to objRow\n\t\t\t\t\techo \"objIndex = Object();\";\n\t\t\t\t\t\n\t\t\t\t\tforeach ($objRow['Index'] as $strIndexName=>$arrValues)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"objIndex.{$strIndexName} = Array();\";\n\t\t\t\t\t\tforeach ($arrValues as $strValue)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"objIndex.{$strIndexName}.push('$strValue');\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\techo \"objRow.index = objIndex;\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\techo \"{$strVixenTable}.row.push(objRow);\\n\";\n\t\t\techo \"</script>\\n\";\n\t\t\techo \"</tr>\\n\";\n\t\t}\n\t\t$intRowCount = $intRow + 1;\n\t\techo \"</table>\\n\";\n\t\t\n\t\techo \"<script type='text/javascript'>{$strVixenTable}.totalRows = $intRowCount;</script>\\n\";\t\n\t\t\n\t\tif ($this->_bolRowHighlighting)\n\t\t{\n\t\t\t// The following \"Vixen.AddCommand\" method breaks down when you try dynamicly inserting a VixenTable into\n\t\t\t// the DOM, because AddCommand only triggers the command when the body.onload event is triggered\n\t\t\t//echo \"<script type='text/javascript'>Vixen.AddCommand('Vixen.Highlight.Attach','\\'$strTableName\\'', $intRowCount);</script>\";\n\t\t\techo \"<script type='text/javascript'>Vixen.Highlight.Attach('$strTableName');</script>\";\n\t\t}\n\t\t\n\t\tif ($this->_bolToolTips)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>Vixen.Tooltip.Attach('$strTableName');</script>\";\n\t\t}\n\t\t\n\t\tif ($this->_bolDetails)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>Vixen.Slide.Attach('$strTableName', TRUE);</script>\\n\";\n\t\t}\n\t\t\n\t\tif ($this->_bolLinked)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"{$strVixenTable}.linked = TRUE;\";\n\t\t\t\n\t\t\techo \"objLink = Object();\\n\";\n\t\t\t\n\t\t\tforeach ($this->_arrLinkedTables AS $strTableName=>$arrIndexes)\n\t\t\t{\n\t\t\t\techo \"objLink.{$strTableName} = Array();\\n\";\n\t\t\t\tforeach ($arrIndexes AS $strIndex)\n\t\t\t\t{\n\t\t\t\t\techo \"objLink.{$strTableName}.push('$strIndex');\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"{$strVixenTable}.link = objLink;\\n\";\n\t\t\t\n\t\t\techo \"</script>\\n\";\n\t\t\t\t/*'link':\n\t\t\t{\n\t\t\t\t'AccountInvoices' :\n\t\t\t\t[\n\t\t\t\t\t'Invoice'\n\t\t\t\t]\n\t\t\t},*/\n\t\t}\n\t\t\n\t\tif ($this->_bolSortable)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>Vixen.TableSort.prepare('$strTableName');</script>\\n\";\n\t\t}\n\t}", "public function index()\n {\n $company = TruckCompany::select(array('id','company_trading_name','created_at','contact_email'));\n return \\Datatables::of($company)\n ->addColumn('actions','<a class=\"btn btn-xs btn-alt\" data-toggle=\"modal\" onClick=\"launchUpdateCompanyModal({{$id}});\" data-target=\".modalEditCompany\">Edit</a>\n\t\t\t\t\t\t\t\t\t\t\t<a class=\"btn btn-xs btn-alt\" data-toggle=\"modal\">Suspend</a>\n\t\t\t\t\t\t\t\t\t\t\t<a class=\"btn btn-xs btn-alt\" data-toggle=\"modal\">Print Permit</a>\t\t\n\t\t\t\t\t\t\t')\n\n ->make(true);\n }", "public function index(Request $request)\n {\n if($request->ajax()){\n $data = $this->Data->getData();\n return DataTables::of($data)\n ->addIndexColumn()\n ->addColumn('action', function($data){\n return '<a href=\"/v1/user/'.$data->id.'/edit\" class=\"btn btn-primary btn-sm\">Edit</a>&nbsp;<a href=\"#\" class=\"btn btn-danger btn-sm\" onclick=\"sweet('.$data->id.')\">Hapus</a>';\n })\n ->addColumn('status', function($data){\n if ($data->status == 1) {\n return '<a style=\"text-decoration:none;\" class=\"text-primary font-weight-bold\">AKTIF </a>&nbsp;<a href=\"/v1/user/'.$data->id.'/unapprove\" class=\"btn btn-danger btn-sm\">Non-Aktifkan</a>';\n } else{\n return '<a href=\"/v1/user/'.$data->id.'/approve\" class=\"btn btn-success btn-sm\">Aktifkan</a>&nbsp;<a style=\"text-decoration:none;\" class=\"text-danger font-weight-bold\"> NON-AKTIF</a>';\n }\n })\n ->addColumn('role', function($data){\n if ($data->pengurus_gudang_id != null) {\n return 'Karyawan Gudang';\n } elseif ($data->bank_id != null) {\n return 'Pihak Bank';\n } elseif ($data->pemasok_id != null) {\n return 'Pemasok';\n } elseif ($data->pelanggan_id != null) {\n return 'Pembeli';\n }\n })\n ->addColumn('foto_ktp', function($data){\n if ($data->pengurus_gudang_id != null) {\n if ($data->pengurusGudang->foto_ktp !=null) {\n return '<a data-toggle=\"modal\" data-target=\"#fotoKtpGudang\" onclick=\"detailFotoKtpPengurusGudang('.$data->id.')\" data-id=\"'.$data->id.'\" style=\"cursor: pointer;\" title=\"Detail\"><img src=\"'.asset($data->pengurusGudang->foto_ktp).'\" alt=\"\" height=\"50\" width=\"100\"></a>';\n } else {\n return '<center>No Foto !</center>';\n }\n } elseif ($data->bank_id != null) {\n return 'Tidak Mempunyai Foto KTP';\n } elseif ($data->pemasok_id != null) {\n if ($data->pemasok->foto_ktp !=null) {\n return '<a data-toggle=\"modal\" data-target=\"#fotoKtpPemasok\" onclick=\"detailFotoKtpPemasok('.$data->id.')\" data-id=\"'.$data->id.'\" style=\"cursor: pointer;\" title=\"Detail\"><img src=\"'.asset($data->pemasok->foto_ktp).'\" alt=\"\" height=\"50\" width=\"100\"></a>';\n } else {\n return '<center>No Foto !</center>';\n }\n } elseif ($data->pelanggan_id != null) {\n return 'Tidak Mempunyai Foto KTP';\n }\n })\n ->addColumn('foto_ktp_selfie', function($data){\n if ($data->pengurus_gudang_id != null) {\n if ($data->pengurusGudang->foto_ktp !=null) {\n return '<a data-toggle=\"modal\" data-target=\"#fotoKtpSelfieGudang\" onclick=\"detailFotoKtpSelfiePengurusGudang('.$data->id.')\" data-id=\"'.$data->id.'\" style=\"cursor: pointer;\" title=\"Detail\"><img src=\"'.asset($data->pengurusGudang->foto_ktp).'\" alt=\"\" height=\"50\" width=\"100\"></a>';\n } else {\n return '<center>No Foto !</center>';\n }\n } elseif ($data->bank_id != null) {\n return 'Tidak Mempunyai Foto KTP';\n } elseif ($data->pemasok_id != null) {\n if ($data->pemasok->foto_ktp !=null) {\n return '<a data-toggle=\"modal\" data-target=\"#fotoKtpSelfiePemasok\" onclick=\"detailFotoKtpSelfiePemasok('.$data->id.')\" data-id=\"'.$data->id.'\" style=\"cursor: pointer;\" title=\"Detail\"><img src=\"'.asset($data->pemasok->foto_ktp).'\" alt=\"\" height=\"50\" width=\"100\"></a>';\n } else {\n return '<center>No Foto !</center>';\n }\n } elseif ($data->pelanggan_id != null) {\n return 'Tidak Mempunyai Foto KTP';\n }\n })\n ->addColumn('nik', function($data){\n if ($data->pengurus_gudang_id != null) {\n if ($data->pengurusGudang->nik != null) {\n return $data->pengurusGudang->nik;\n } else {\n return 'Kosong';\n }\n } elseif ($data->bank_id != null) {\n if ($data->bank->nik != null) {\n return $data->bank->nik;\n } else {\n return 'Kosong';\n }\n } elseif ($data->pemasok_id != null) {\n if ($data->pemasok->nik != null) {\n return $data->pemasok->nik;\n } else {\n return 'Kosong';\n }\n } elseif ($data->pelanggan_id != null) {\n if ($data->pelanggan->nik != null) {\n return $data->pelanggan->nik;\n } else {\n return 'Kosong';\n }\n }\n })\n ->rawColumns(['action','status','role','foto_ktp','foto_ktp_selfie'])\n ->make(true);\n }\n return view($this->path.'index');\n }", "public function index()\n\t{\n\t\t$datas = Buku::orderBy('created_at','desc')->paginate(10);\n\t\treturn view('admin.buku.table',compact('datas'));\n\t}", "public function index ()\n {\n /* $cities = City::all();\n //\n return Inertia::render('Admin/Cities', [\n 'cities' => [$cities]\n ]);*/\n // return $cities->toJSON(JSON_PRETTY_PRINT);\n $cities = DB::table('cities')\n\n ->get();\n return $cities->toJSON(JSON_PRETTY_PRINT);//Inertia::render('Admin/Cities', [\n // 'cities' => [$cities]\n // ]);\n\n }", "public function index()\n {\n return $this->getTable();\n }", "public function html()\n {\n return $this->builder()\n ->setTableId('invoices-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->orderBy(1)\n ->destroy(true)\n ->responsive(true)\n ->serverSide(true)\n /* ->stateSave(true) */\n ->processing(true)\n ->language(__('app.datatable'))\n ->parameters([\n 'initComplete' => 'function () {\n window.LaravelDataTables[\"invoices-table\"].buttons().container()\n .appendTo( \"#table-actions\")\n }',\n 'fnDrawCallback' => 'function( oSettings ) {\n $(\"body\").tooltip({\n selector: \\'[data-toggle=\"tooltip\"]\\'\n })\n }',\n ])\n ->buttons(Button::make(['extend' => 'excel', 'text' => '<i class=\"fa fa-file-export\"></i> ' . trans('app.exportExcel')]));\n }", "public function index()\n {\n $data = Santri::get();\n if (request()->ajax()) {\n return datatables()->of($data)\n ->addColumn('aksi', function ($data) {\n $btn = \"<a href='#' class='btn btn-icon btn-primary mb-2 edit-data' id='\". $data->uid.\"' data-bs-toggle='modal' data-bs-target='#edit-modal'><i class='far fa-edit'></i></a>\";\n $btn .= \"<a href='#' class='btn btn-icon btn-danger delete-data' id='\". $data->uid.\"'><i class='far fa-trash-alt'></i></a>\";\n return $btn;\n })\n ->rawColumns(['aksi'])\n ->make(true);\n }\n return view('dashboard', compact('data', $data));\n }", "public function index()\n {\n if (request()->ajax()) {\n $data = $this->dproduct->all();\n return Datatables::of($data)\n ->addIndexColumn()\n ->addColumn('description', function ($row) {\n return $row->description;\n })\n ->addColumn('category',function($row){\n return $row->category->name;\n })\n ->rawColumns(['description', 'action'])\n ->escapeColumns(['description'])\n ->make(true);\n }\n return view('dproducts.browse');\n }", "public function index() // listado\n {\n $products = Product::all();\n //return view('products.index')->with(compact('products'));\n return Datatables::of(Product::query())->make(true);\n\n }", "public function index()\n {\n return new DatatableCollection(Datatable::latest()->paginate(10));\n }", "public function index()\n {\n // return Bookable::all();\n\n return BookableIndexResource::collection(Bookable::paginate(10));\n }", "public function index()\n {\n $user = Auth::user();\n\n $this->table\n ->model(Document::class)\n ->where([\n 'field' => 'user_id',\n 'operator' => '=',\n 'search' => $user->id\n ])\n ->columns([\n [\n 'label' => 'Perfil Pretendido',\n 'name' => 'role',\n 'order' => true //true, asc ou desc\n ],\n [\n 'label' => 'Portaria',\n 'name' => 'ordinance',\n 'order' => true //true, asc ou desc\n ],\n [\n 'label' => 'Declaração',\n 'name' => 'declaration',\n 'order' => true //true, asc ou desc\n ],\n [\n 'label' => 'Situação',\n 'name' => 'situation',\n 'order' => true\n ]\n\n ])\n ->filters([\n [\n 'name' => 'role',\n 'operator' => 'LIKE'\n ]\n ])\n ->addShowAction('documents.show')\n ->addEditAction('documents.edit')\n ->addDeleteAction('documents.destroy')\n //->addMoreAction([\n // [\n // 'label' => 'Grupos',\n // 'route' => 'admin.users.create'\n // ],\n // [\n // 'label' => 'Unidades',\n // 'route' => 'admin.users.update'\n // ]\n //])\n ->search();\n\n return view('adminlte::modules.register.finish.index', ['table' => $this->table]);\n\n\n }", "public function search()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->crud->applyUnappliedFilters();\n\n $totalRows = $this->crud->baseQuery->count();\n $filteredRows = $this->crud->count();\n $startIndex = request()->input('start') ?: 0;\n // if a search term was present\n if (request()->input('search') && request()->input('search')['value']) {\n // filter the results accordingly\n $this->crud->applySearchTerm(request()->input('search')['value']);\n // recalculate the number of filtered rows\n $filteredRows = $this->crud->count();\n }\n // start the results according to the datatables pagination\n if (request()->input('start')) {\n $this->crud->skip((int) request()->input('start'));\n }\n // limit the number of results according to the datatables pagination\n if (request()->input('length')) {\n $this->crud->take((int) request()->input('length'));\n }\n // overwrite any order set in the setup() method with the datatables order\n if (request()->input('order')) {\n $column_number = request()->input('order')[0]['column'];\n $column_direction = request()->input('order')[0]['dir'];\n $column = $this->crud->findColumnById($column_number);\n if ($column['tableColumn']) {\n // clear any past orderBy rules\n $this->crud->query->getQuery()->orders = null;\n // apply the current orderBy rules\n $this->crud->query->orderBy($column['name'], $column_direction);\n }\n\n // check for custom order logic in the column definition\n if (isset($column['orderLogic'])) {\n $this->crud->customOrderBy($column, $column_direction);\n }\n }\n\n // show newest items first, by default (if no order has been set for the primary column)\n // if there was no order set, this will be the only one\n // if there was an order set, this will be the last one (after all others were applied)\n $orderBy = $this->crud->query->getQuery()->orders;\n $hasOrderByPrimaryKey = false;\n collect($orderBy)->each(function ($item, $key) use ($hasOrderByPrimaryKey) {\n if (!isset($item['column'])) {\n return false;\n }\n\n if ($item['column'] == $this->crud->model->getKeyName()) {\n $hasOrderByPrimaryKey = true;\n\n return false;\n }\n });\n if (!$hasOrderByPrimaryKey) {\n $this->crud->query->orderByDesc($this->crud->model->getKeyName());\n }\n\n $entries = $this->crud->getEntries();\n\n return $this->crud->getEntriesAsJsonForDatatables($entries, $totalRows, $filteredRows,\n $startIndex);\n }", "public function render()\n {\n // $datas=tapel::all();\n // dd($datas);\n return view('components.table-tapel');\n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n DB::statement(DB::raw('set @rownum=0')); \n $data = self::$modelName::select(\n DB::raw('@rownum := @rownum +1 as rownum'),\n 'id',\n 'name'\n );\n return Datatables::of($data)\n ->addColumn('action', function($row){\n $btn = '\n <div class=\"dropdown dropdown-inline\">\n <a href=\"javascript:;\" class=\"btn btn-sm btn-clean btn-icon\" data-toggle=\"dropdown\">\n <i class=\"la la-cog\"></i>\n </a>\n <div class=\"dropdown-menu dropdown-menu-sm dropdown-menu-right\">\n <ul class=\"nav nav-hoverable flex-column\">\n <li class=\"nav-item\"><a class=\"nav-link\" href=\"'.self::$folderPath.'/'. $row->id .'/edit\"><i class=\"nav-icon la la-edit\"></i><span class=\"nav-text\">Edit Details</span></a></li>\n <li class=\"nav-item\"><a class=\"nav-link\" href=\"'.self::$folderPath.'/'. $row->id .'\"><i class=\"nav-icon la la-search\"></i><span class=\"nav-text\">Detail</span></a></li>\n <li class=\"nav-item\"><a class=\"nav-link btn-delete-record\" href=\"javascript:;\" data-url=\"' . self::$folderPath . '/' . $row->id . '\"><i class=\"nav-icon la la-trash \"></i><span class=\"nav-text\">Delete</span></a></li>\n </ul>\n </div>\n </div>\n ';\n // dd($row->id);\n return $btn;\n })\n ->make(true);\n }else{\n $pageTitle = self::$pageTitle;\n $pageDescription = self::$pageTitle . ' List Data';\n $pageBreadCrumbs = [\n url(self::$folderPath . '/') => \"List \" . self::$pageTitle\n ];\n $permissionName = self::$folderPath;\n $permissions = self::$permissionName; \n return view(self::$folderPath . '.index', compact('pageTitle', 'pageDescription', 'pageBreadCrumbs', 'permissionName','permissions'));\n }\n }", "public function index()\n {\n\n $datatable = datatables()->of(branches::latest()->get());\n\n if(request()->ajax())\n {\n\n return $datatable->addColumn('action', function(branches $branch) {\n $button = '<button type=\"button\" name=\"edit\" id=\"'.$branch->id.'\" onclick=\"window.location='.\"'branches/edit/$branch->id'\".'\" class=\"edit btn btn-primary btn-sm\">Edit</button>';\n $button .= '&nbsp;&nbsp;';\n $button .= '<button type=\"button\" name=\"delete\" id=\"'.$branch->id.'\" onclick=\"window.location='.\"'branches/delete/$branch->id'\".'\" class=\"delete btn btn-danger btn-sm\">Delete</button>';\n return $button;\n })\n\n ->rawColumns(['action'])\n ->make(true);\n }\n\n return view('branches.index');\n\n }", "public function index()\n {\n $trabajos = Trabajo::orderBy('id','desc')->get();\n return TrabajoResource::collection($trabajos);\n }", "public function index()\n {\n $borrowsRes = Borrow::orderBy(\"tanggal_peminjaman\", \"desc\")->paginate(10);\n\n return view('admin.borrow.table', compact('borrowsRes'));\n }", "public function index()\n {\n $user = new KegiatanMahasiswa();\n $data = $user->index(Auth::user()->id);\n\n return Datatables::of($data)\n ->addColumn('status', function ($data) {\n if ($data->status == 0) {\n return '<button type=\"button\" class=\"btn btn-dark\">not validated</button>';\n }\n\n return '<button type=\"button\" class=\"btn btn-success\">Validated</button>';\n })\n ->editColumn('anggaran', function ($data) {\n $hasil_rupiah = 'Rp ' . number_format($data->anggaran, 2, ',', '.');\n\n return $hasil_rupiah;\n })\n ->editColumn('tanggalAcara', function ($data) {\n return $data->tanggalAcara->format('d/M/Y');\n })\n ->addColumn('pathFile', function ($data) {\n return view('template.link', compact('data'));\n })\n ->rawColumns(['pathFile', 'status'])\n ->make(true);\n }", "public function index(Request $request)\n {\n $list = Category::orderBy('id','DESC')->get();\n if ($request->ajax()) {\n return Datatables::of($list)\n ->addIndexColumn()\n\n //for image\n ->addColumn('image', function($row){\n $src=asset('admin/category/'.$row->image);\n return '<img src=\"'.$src.'\" border=\"0\" width=\"40\" class=\"img-rounded\" align=\"center\" />';\n })\n\n // for status \n ->addColumn('status', function($row){\n if($row->status==1){\n $status='Active';\n }else{\n $status='Inactive';\n } \n return $status;\n })\n\n //for action column\n ->addColumn('action', function($row){\n $btn = '<a class=\"btn btn-primary btn-sm\" title=\"Edit Category\" href=\"'.route('categories.edit',$row->id).'\"> <i class=\"fa fa-edit\"></i></a>';\n return $btn;\n })\n\n ->rawColumns(['image','status','action'])\n\n ->make(true);\n }\n return view('admin.category.index');\n }", "public function index()\n\t{\n\t\t$table = Laratable::make(Variant::query(), [\n\t\t\t'#' => 'id',\n\t\t\t'Name' => 'admin_name',\n\t\t\t'Display Name' => 'name',\n\t\t\t'Values' => ['data', function($variant) {\n\t\t\t\t$values = [];\n\t\t\t\tforeach($variant->data['values'] as $value) {\n\t\t\t\t\t$values[] = $value['name'];\n\t\t\t\t}\n\n\t\t\t\treturn implode(', ', $values);\n\t\t\t}],\n\t\t]);\n\n\t\t$table->editable(true, url('admin/variants/{id}/edit'));\n\t\t$table->destroyable(true, url('admin/variants/{id}'));\n\n\t\t$table->filterable(true);\n\t\t$table->addFilter('name', 'search');\n\t\t$table->paginate(true, 13);\n\n\t\treturn $this->view('admin.variants_index')\n\t\t\t->with([\n\t\t\t\t'table' => $table->render(),\n\t\t\t\t'pagination' => $table->paginator->render(),\n\t\t\t\t'filters' => $table->buildFilters()->addClass('inline')\n\t\t\t]);\n\t}", "public function index(UserDataTable $dataTable){\n return $dataTable->render('user::index');\n }", "public function index(Request $request)\n {\n if ($request->ajax()) {\n $data = Bus::all();\n return DataTables::of($data)\n ->addIndexColumn()\n ->addColumn('action', function($row){\n $button = '<div class=\"btn-group btn-group-sm\" role=\"group\">';\n $button .= '<button href=\"javascript:void(0)\" data-toggle=\"tooltip\" data-id=\"'.$row->id.'\" data-original-title=\"Edit\" class=\"edit btn btn-info btn-sm edit-post\"><i class=\"fas fa-edit\"></i></button>';\n $button .= '<button type=\"button\" name=\"delete\" id=\"'.$row->id.'\" class=\"delete btn btn-danger btn-sm\"><i class=\"fas fa-trash\"></i></button>';\n $button .= '<button href=\"javascript:void(0)\" data-toggle=\"tooltip\" data-id=\"'.$row->id.'\" data-originial-title=\"Upload\" class=\"upload btn btn-sm btn-success shadow-sm upload-post\" id=\"tombol-upload\"><i class=\"fas fa-upload\"></i></button>';\n $button .= '<a href=\"javascript:void(0)\" data-target=\"#myModal\" data-url=\"'.route('bus_detail.show', $row->id).'\" data-toggle=\"modal\" data-id=\"'.$row->id.'\" data-original-title=\"View\" class=\"view btn btn btn-warning btn-sm view-post\"><i class=\"fas fa-eye\"></i></a>';\n $button .= '</div>';\n\n return $button;\n })\n ->editColumn('jenis_bus_id', function($row) {\n return $row->jenis_bus->nama_jenis;\n })\n ->rawColumns(['action'])\n ->make(true);\n }\n\n $jenis_bus = JenisBus::all();\n return view('bus.index', compact('jenis_bus'));\n }", "public function index()\n {\n $comunity = Comunity::all();\n return view('admin.modul-komunitas.komunitas-table',compact('comunity'));\n }", "public function index() {\n return view('admin.dorp.dcrud', ['dorpen' => Dorp::all()]);\n }", "public function datatable(Request $request) {\n \n // Autorizacao\n $this->repository->authorize('listing');\n\n // Grava Filtro para montar o formulario da proxima vez que o index for carregado\n $this->setFiltro([\n 'filtros' => $request['filtros'],\n 'order' => $request['order'],\n ]);\n \n // Ordenacao\n $columns[0] = 'codsubgrupoproduto';\n $columns[1] = 'inativo';\n $columns[2] = 'codsubgrupoproduto';\n $columns[3] = 'subgrupoproduto';\n $sort = [];\n if (!empty($request['order'])) {\n foreach ($request['order'] as $order) {\n $sort[] = [\n 'column' => $columns[$order['column']],\n 'dir' => $order['dir'],\n ];\n }\n }\n\n // Pega listagem dos registros\n $regs = $this->repository->listing($request['filtros'], $sort, $request['start'], $request['length']);\n\n // Monta Totais\n $recordsTotal = $regs['recordsTotal'];\n $recordsFiltered = $regs['recordsFiltered'];\n \n // Formata registros para exibir no data table\n $data = [];\n foreach ($regs['data'] as $reg) {\n $data[] = [\n url('sub-grupo-produto', $reg->codsubgrupoproduto),\n formataData($reg->inativo, 'C'),\n formataCodigo($reg->codsubgrupoproduto),\n $reg->subgrupoproduto,\n ];\n }\n \n // Envelopa os dados no formato do data table\n $ret = new Datatable($request['draw'], $recordsTotal, $recordsFiltered, $data);\n \n // Retorna o JSON\n return collect($ret);\n }", "public function index(Request $request)\n {\n if ($request->ajax()){\n $data = Project::orderBy('id', 'desc')->get();\n return DataTables::of($data)\n ->addColumn('invoice', function($data) {\n if($data->invoice)\n return $data->invoice->invoice_id;\n return '-';\n })->addColumn('status', function($data) {\n if($data->projectStatus)\n return $data->projectStatus->name;\n return '-';\n })->addColumn('create', function($data) {\n return $data->created_at->format('d/M/Y');\n })->addColumn('action', function($data) {\n return '<a href=\"'.route('project.edit', $data).'\" class=\"btn btn-info\"><i class=\"fa fa-edit\"></i> </a>\n <button class=\"btn btn-danger\" onclick=\"delete_function(this)\" value=\"'.route('project.destroy', $data).'\"><i class=\"fa fa-trash\"></i> </button>';\n })\n ->rawColumns(['invoice','status', 'create', 'action'])\n ->make(true);\n }else{\n return view('backend.project.index');\n }\n }", "public function index()\n {\n //\n $compras = Compras::select('c.id', 'c.valorcompra', 'c.verificada', 'c.created_at', 'u.name as nombre', 'u.email', 'u.cedula')\n ->from('compras as c')\n ->join('users as u', function ($join) {\n $join->on('u.id', '=', 'c.usuario');\n })\n //->where('c.verificada', '=', '0')\n ->orderBy('id', 'desc')\n ->get();\n //->paginate(20);\n return view('admin/compras.index', compact('compras'));\n }", "public function index()\n {\n /*\n $title = \"All\";\n $type = 1;\n $properties = array('title' => $title, 'type' => $type);\n return view('admin.signups.datatable')->with($properties);\n */\n return view('admin.signups.all-datatable');\n }", "public function index()\n {\n\n Gate::authorize('haveaccess','user.index');\n\n //$users = User::orderBy('id','Asc')->paginate(8);\n\n //return view('user.index',compact('users'));\n\n //$users = User::all();\n\n return datatables()\n ->eloquent(User::query())\n //->eloquent($users)\n ->addColumn('accion', 'user.adicionales' )\n ->rawColumns(['accion'])\n ->toJson();\n\n }", "public function index()\n {\n return view('userTable');\n }", "public function index(VehiculoDataTable $vehiculoDataTable)\n {\n return $vehiculoDataTable->render('vehiculos.index');\n }", "public function datatablesCatalogStatus()\n { \n DB::statement(DB::raw('set @rownum=0'));\n $tblCatalogStatus = TblCatalogStatus::select(\n [DB::raw('@rownum := @rownum + 1 AS rownum'),'id as tbl_catalog_status_id','status','description','created_at']);\n \n return Datatables::of($tblCatalogStatus)\n ->editColumn('description', '<span class=\"description\">{{$description}}</span><span style=\"right: 13px;position: absolute;\"><kbd class=\"kbd-danger hover cpointer delete-cs\" data-id=\"{{$tbl_catalog_status_id}}\">DELETE</kbd> <kbd class=\"kbd-primary hover cpointer edit-cs\" data-id=\"{{$tbl_catalog_status_id}}\">EDIT</kbd></span>')\n ->setRowId('tbl_catalog_status_id')\n ->make(true);\n }", "public function index()\n {\n $customers = Customers::sortable()->paginate(5);\n return view('backend.customers.customertable',['customers'=>$customers]);\n }", "public function html()\n {\n return $this->builder()\n ->setTableId('userdatatable-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->parameters([\n 'dom' =>'Blfrtip',\n 'buttons' => [\n ['text'=>'<i class=\"fa fa-plus\"></i> '.trans('admin.add'), 'className'=>'btn btn-info',\"action\"=>\"function () {\n window.location.href = '\".\\URL::Current().\"/create';\n }\"],\n\n ],\n\n 'language' => datatable_lang ()\n\n ]);\n\n /*->orderBy(1)\n ->buttons(\n Button::make('create'),\n Button::make('export'),\n Button::make('print'),\n Button::make('reset'),\n Button::make('reload')\n );*/\n }", "public function index()\n {\n return Inertia::render('Client/Index', ['clients' => Client::all()]);\n }", "public function index() {\n $result['cartrimResult'] = $this->cartrim->findAll();\n $result['carResult'] = $this->cars->findAll($flag=1);\n $result['page'] = 'cartrim';\n $result['page_number'] = (isset($_GET['page']) && $_GET['page']) ? $_GET['page'] : 0;\n if (RequestFacade::ajax()) {\n return view('admin.cartrim_table', $result);\n }\n return view('admin.cartrim', $result);\n }", "public function index(ConcursoDataTable $concursoDataTable)\n {\n return $concursoDataTable->render('concursos.index');\n }", "public function index()\n {\n $contacts = Contact::paginate(15);\n return view('admin.tables.contact')->with('contacts', $contacts);\n }", "public function index(TradmarkDataTable $datatable)\n {\n return $datatable->render('Admin.'.$this->path.'.index', ['title' => $this->path . ' Table']);\n }", "public function html()\n {\n return $this->builder()\n ->setTableId('users-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->orderBy(1)\n ->parameters([\n 'dom' => 'Bfrtip',\n 'responsive' => true,\n 'buttons' => ['csv', 'excel', 'print','reset'],\n 'language' => ['url' => '//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/Spanish.json']\n ]);\n }", "public function index()\n {\n return Banco::orderBy('nb_banco', 'asc')\n ->with(\n 'tipo:id_tipo_banco,nb_tipo_banco'\n )->get();\n }", "public function index()\n {\n return view('dashboard.pages.inhouse.inhouse_table');\n }", "public function index()\n {\n $test = DB::table('reservations')\n ->join('users','users.id','=','reservations.clientId') \n ->join('rooms','rooms.id','=','reservations.RoomId') \n ->join('categories','categories.id','=','rooms.catId') \n ->join('tarifs','tarifs.catId','=','categories.id') \n ->join('saisons','saisons.id','=','tarifs.saisonId')\n ->select('reservations.id as id','users.fullname','categories.libelle', 'rooms.number','reservations.date_debut as debut','reservations.date_fin as fin')\n \n ->get();\n if(request()->ajax())\n {\n return datatables()->of($test)\n ->addColumn('action', function($data){\n $button = '<button type=\"button\" name=\"delete\" id=\"'.$data->id.'\" class=\"delete btn btn-danger btn-sm\">Delete</button>';\n \n $button .= '&nbsp;&nbsp;';\n \n $button .= \"<a href=\\\"booking/create/\".$data->id.\"\\\"class='btn btn-sm btn-success'>\n \n Afficher\n </a>\" ;\n return $button;\n })\n ->rawColumns(['action'])\n ->make(true);\n }\n \n return view('booking/index');\n }", "public function html()\n {\n return $this->builder()\n ->setTableId('admindatatable-table')\n ->columns($this->getColumns())\n ->parameters([\n 'buttons' => [\n 'pageLength',\n //old way\n [\n 'text'=>\n '<i class=\"fa fa-trash\"></i> '.__('admin.admin_table_delete_all'),\n 'className'=>'dt-button buttons-collection delBtn buttons-page-length'\n ],\n //new way (names unique)\n 'export',\n 'print',\n 'reset',\n 'reload',\n 'create'\n ],\n 'lengthMenu' => [\n [ 10, 25, 50, -1 ],\n [ 10, 25, 50, __('admin.Show_all')]\n ],\n \"initComplete\"=> \"function () {\n this.api().columns([2,4]).every(function () {\n var column = this;\n var input = document.createElement('input');\n $(input).appendTo($(column.footer()).empty())\n .on('keyup', function () {\n column.search($(this).val(), false, false, true).draw();\n });\n });\n }\",\n\n\n 'language' => datatable_lang(),\n\n ])\n ->minifiedAjax()\n ->dom('Bfrtip')\n ->orderBy(1);\n }", "public function index()\n {\n return view('tables')->with([\n 'type' => 'tags',\n 'tags' => Tag::all(),\n ]);\n }", "public function ajax()\n {\n return $this->datatables->eloquent($this->query())// ->addColumn('action', 'path.to.action.view')\n ->editColumn('asset_id', function ($data) {\n\n return '<a href=' . route('samples.show', $data->asset_id) . '>' . $data->asset_id . '</a>';\n })\n ->editColumn('dealer.name', function ($data) {\n\n return '<a href=' . route('samples.out.dsr', $data->dealer_id) . '>' . $data->dealer->name . '</a>';\n })\n ->editColumn('user.name', function ($data) {\n\n return '<a href=' . route('samples.out.rep', $data->user_id) . '>' . $data->user->name . '</a>';\n })\n ->editColumn('created_at', function ($data) {\n\n return $data->created_at ? with(new Carbon($data->created_at))->format('m/d/Y') : '';\n })\n ->editColumn('expected_return_date', function ($data) {\n\n return $data->expected_return_date ? with(new Carbon($data->expected_return_date))->format('m/d/Y') : '';\n })->make(true);\n }", "public function show()\n {\n //need to change in future for filtering data by session year with current year data;or create a new view for current session year;\n $sections=Section::orderBy('id','DESC')->where('bId', Auth::guard('web')->user()->bId)->with('classes')->with('sessionYear')->get();\n\n $data_table_render = DataTables::of($sections)\n\n ->addColumn('action',function ($row){\n return '<button class=\"btn btn-info btn-sm\" onClick=\"editSection('.$row['id'].')\"><i class=\"fa fa-edit\"></i></button>'.\n '<button onClick=\"deleteSection('.$row['id'].')\" class=\"btn btn-danger btn-sm delete_section\"><i class=\"fa fa-trash-o\"></i></button>';\n })\n ->rawColumns(['action'])\n ->addIndexColumn()\n ->make(true);\n return $data_table_render;\n }", "public function html() {\n $table = $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '250px'])\n ->parameters([\n 'dom' => 'Bfrtip',\n 'buttons' => [\n ['extend' => 'create', 'className' => 'btn btn-success', 'text' => 'Create User', 'init' => 'function(api, node, config) {\n $(node).removeClass(\"dt-button buttons-create btn-default\")\n }']\n ],\n 'select' => true,\n 'initComplete' => 'function () {\n var r = $(\"#datatable-buttons tfoot tr\");\n $(\"#datatable-buttons thead\") . append(r);\n this.api().columns([0,1,2,3]).every(function () {\n var column = this; \n var input = document . createElement(\"input\");\n $(input).addClass(\"form-control input-lg col-xs-12\");\n $(input).appendTo($(column.footer()).empty())\n .on(\"change\", function () {\n\n column.search($(this).val(), false, false, true).draw();\n });\n });\n }',\n ]);\n return $table;\n }", "public function index()\n {\n return DB::table('contratos')\n ->join('imovels', 'contratos.id_imovel', '=', 'imovels.id')\n ->select('*','contratos.id as id_contrato')\n ->get();\n }" ]
[ "0.6756033", "0.6710518", "0.6612861", "0.65649676", "0.64368874", "0.63875073", "0.63641775", "0.63593477", "0.63298774", "0.63073444", "0.6262247", "0.6250651", "0.62238514", "0.6209545", "0.61749995", "0.6166301", "0.6165242", "0.615067", "0.61329484", "0.60994077", "0.6043983", "0.60203934", "0.6015976", "0.6014261", "0.6014015", "0.6010826", "0.5998313", "0.59926397", "0.59710675", "0.59552586", "0.5949936", "0.58939445", "0.5887562", "0.58808154", "0.588048", "0.5873858", "0.5870339", "0.5855312", "0.5852742", "0.5844722", "0.5821786", "0.5816914", "0.58120763", "0.58101517", "0.5806097", "0.57897043", "0.57807046", "0.5779185", "0.5778677", "0.5773351", "0.5772932", "0.5772791", "0.577078", "0.5770058", "0.5769268", "0.57689893", "0.57620335", "0.57581604", "0.575793", "0.574586", "0.5743273", "0.5736289", "0.57294226", "0.5727382", "0.5723641", "0.5711969", "0.5708724", "0.57080835", "0.5698657", "0.56986463", "0.56973755", "0.5681659", "0.5676526", "0.5674228", "0.5669122", "0.5668778", "0.5664972", "0.5661081", "0.5659864", "0.5659318", "0.56578076", "0.5656161", "0.565606", "0.56541145", "0.56536996", "0.5651516", "0.56495994", "0.5648015", "0.56404185", "0.5638582", "0.562937", "0.562119", "0.5620951", "0.5618313", "0.56181705", "0.5614968", "0.56144965", "0.5613927", "0.56138766", "0.5607719", "0.5604067" ]
0.0
-1
Run the database seeds.
public function run() { $adminEmail = '[email protected]'; $user = User::whereEmail($adminEmail)->firstOrfail(); $tags = Tag::whereVisibility(1)->get(); $user->tags()->attach($tags); }
{ "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
Return DB fields which ones are allowed
public function getAllowedFields(): array { return $this->allowedFields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllowedFields() {\n\t\treturn array('date', 'amount');\n\t}", "abstract public function supported_fields();", "protected function restrict_fields()\n {\n }", "private function getCheckableFields()\n {\n return ['index', 'city', 'countryIso', 'text', 'region'];\n }", "function SupportedFields($dataType) { return []; }", "public function getAllowedExcludeFields() {}", "public function action_allowed_fields() {\n return array();\n }", "public function getReadOnlyFields();", "private function _fields() {\n if ($this->_table() && empty($this->fields)) {\n $this->fields = $this->db->list_fields($this->_table());\n }\n return $this->fields;\n }", "public static function available_fields()\n {\n return self::$available_fields;\n }", "function getEnableFieldsToBeIgnored() ;", "public function getFields(){\n return $this->dbFields;\n }", "public static function fields()\n {\n return array_keys(Scholarship::validations());\n }", "public function getAllowedValues();", "public function getAllowedValues();", "private function checkFields()\r\n {\r\n $vars = array('user', 'pass', 'numbers', 'message', 'date', 'ids', 'data_start', 'data_end',\r\n 'lido', 'status', 'entregue', 'data_confirmacao', 'return_format'\r\n );\r\n\r\n $final = array();\r\n foreach ($vars as $key => $value) {\r\n if ($this->$value !== '') {\r\n $final[$value] = $this->$value;\r\n }\r\n }\r\n return $final;\r\n }", "public function getAllFields();", "abstract protected function getMandatoryModelsFields();", "abstract public function fields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "function _get_avail_fields() {\n\t\t$avail_fields = array();\n\t\tif ($this->MODE == \"SIMPLE\") {\n\t\t\t$avail_fields = $this->_get_fields_map_simple();\n\t\t} else {\n\t\t\t$avail_fields = $this->_get_fields_map_dynamic(true);\n\t\t}\n\t\treturn $avail_fields;\n\t}", "public function getFields()\n {\n return $this->fillable;\n }", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "protected function __fields() {\n $Fields = array_keys(get_object_vars($this));\n if (!empty ($this->__onlyFields)) {\n $Fields = $this->__onlyFields;\n }\n $NewFields = array();\n foreach ($Fields as $field) {\n if (in_array ($field, array ('__bound', '__Data', 'cleaned_data', 'label_suffix', 'required_suffix', 'is_editable', 'suppress_errors'))) continue;\n if (!is_object($this->$field)) continue;\n if (!empty ($this->disabled[$field])) continue;\n if (in_array ($field, $this->__Exclude)) continue;\n $NewFields[] = $field;\n }\n return $NewFields;\n }", "function validate_fields() {\n\t\treturn true;\n\t}", "public function validate_fields() {\n \n\t\t\n \n\t\t}", "public function getFrontEndRequiredFields();", "abstract protected function getFields();", "public static function getExcludeFields() {}", "function getIgnoreEnableFields() ;", "public function getFields() {\n\t\treturn true;\n\t\t// not yet used\n\t\t// if activated\n\t\t// return false;\n\t}", "protected function getExcludeFields() {}", "public function getEnableFieldsToBeIgnored() {}", "public function get_field_properties() {\n return array(PARAM_RAW, NULL_NOT_ALLOWED);\n }", "public function db_fields() {\n\t\treturn array('tid', 'title', 'template');\n\t}", "public function getListFields();", "function ae_check_db_fields( ) {\n\n $count = 0;\n $cols = ae_get_db_fields();\n $foo = ae_db_queries();\n if( $cols ){\n foreach($cols as $col) {\n\n if( isset($foo[$col->COLUMN_NAME]) ) {\n\n if(\n $col->DATA_TYPE != $foo[$col->COLUMN_NAME]['type'] ||\n $col->CHARACTER_MAXIMUM_LENGTH < $foo[$col->COLUMN_NAME]['numb']\n ) {\n $count++;\n }\n }\n }\n }\n\n return $count;\n}", "abstract public function getFields();", "abstract public function getFields();", "function variable_fields()\n\t{\n\t\t$vf=$this->variable_fields;\n\n\t\tif (!is_array($vf))\n\t\t{\n\t\t\t//default search field if nothing is selected\n\t\t\treturn array('labl,qstn,catgry');\n\t\t}\n\n\t\t$tmp=NULL;\n\t\tforeach($vf as $field)\n\t\t{\n\t\t\tif (in_array($field,$this->variable_allowed_fields))\n\t\t\t{\n\t\t\t\t$tmp[]=$field;\n\t\t\t}\n\t\t}\n\n\t\t//no allowed fields found\n\t\tif ($tmp==NULL)\n\t\t{\n\t\t\treturn array('labl');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $tmp;\n\t\t}\n\t}", "public function getFields() {}", "public function getFields() {}", "public function getFields() {}", "protected function getFilterableFields() {\n $fields = $this->config->getFilterableFields();\n\n if(count($fields) == 0) {\n return false;\n }\n\n return $fields;\n }", "abstract protected function fields();", "abstract protected function fields();", "abstract function fields();", "public function sensitiveFields(): array\n {\n return static::SENSITIVE_FIELDS;\n }", "public function getDefaultFields(){\n return $this->dbFields;\n }", "public static function getFilterableFields(): array\n {\n return ['name', 'accessCode'];\n }", "public function fieldsToProcess()\n {\n $arr = array_intersect($this->tableFields, array_keys($this->data));\n $this->fields = array_values($arr);\n return ($this->fields != null) ? $this->fields : false;\n }", "public static function get_fields()\n {\n }", "protected function getAvailableFields() \n {\n return array_merge(\n Fields::$spot,\n Fields::$mass,\n Fields::$location\n );\n }", "public function providedFields();", "protected function getValidFieldValues()\n {\n return [\n 'id' => [\n '1',\n '100'\n ]\n ];\n }", "function getFields();", "public function validate_fields() {\n \n\t\t//...\n \n }", "public static function getRequiredFields()\n\t{\n\t\t$requiredFields = [\n\t\t\t'url' => 'string',\n\t\t\t'name' => 'string',\n\t\t\t'price' => 'float',\n\t\t\t'devise' => 'string',\n\t\t\t'edition_idEdition' => 'int',\n\t\t];\n\n\t\treturn $requiredFields;\n\t}", "public static function getRequiredFields()\n\t{\n\t\t$requiredFields = [\n\t\t\t'report' => 'string',\n\t\t\t'date' => 'date',\n\t\t\t'user_name' => 'string',\n\t\t\t'note' => 'int',\n\t\t\t'console_idConsole' => 'int',\n\t\t];\n\n\t\treturn $requiredFields;\n\t}", "protected function getBareRequiredFieldList()\n {\n $requiredFields = array_keys(singleton('NewsletterSubscription')->stat('db'));\n\n $this->extend('updateBareRequiredFieldList', $requiredFields);\n\n return $requiredFields;\n }", "protected function additionalFieldsAllowed(): bool\n\t{\n\t\treturn true;\n\t}", "function GetFieldsList()\n\t{\n\t\tglobal $dal_info;\n\t\treturn array_keys( $dal_info[ $this->infoKey ] );\n\t}", "public function list_fields() {\n return $this->db->list_fields($this->_table());\n }", "public function getRequiredFields(){\n if(empty($this->tableFields)){\n $this->getTableInfo();\n }\n return $this->requiredFields;\n }", "public function getRequiredFields() {\n return $this->source->getRequiredFields($this->filter);\n }", "abstract public function filterFields();", "static public function fieldsGet()\n {\n return array_keys(static::$conditions);\n }", "public function fields(){\n\t\treturn array();\n\t}", "public function getFieldDescriptions()\n {\n return array(\n 'shipment.created_at' => 'Read only.',\n 'shipment.updated_at' => 'Read only.',\n 'shipment.order_increment_id' => 'Required to create a shipment.',\n 'shipment.items' => 'Required to create a shipment.',\n 'shipment.entity_id' => 'Read only.',\n 'shipment.external_order_id' => 'Read only.'\n );\n }", "public function fieldCreate()\n\t{\n\t\t$fields=array();\n\t\tforeach($this->getTable()->result_array() as $row)\n\t\t{\n\t\t\tif($row['Extra']!=='auto_increment')\n\t\t\t{\n\t\t\t\t$fields[]=array(\n\t\t\t\t\t'field'=>$row['Field'],\n\t\t\t\t\t'max_length'=>preg_match('/varchar/',$row['Type']) ? (preg_replace('/[A-Za-z()]/','',$row['Type'])!=='' ? '\\'maxlength\\'=>'.preg_replace('/[A-Za-z()]/','',$row['Type']).',' : false) : false,\n\t\t\t\t\t'type'=>preg_match('/text/',$row['Type']) ? 'Area' : 'Field',\n\t\t\t\t\t'required'=>$row['Null']=='NO' ? true : false,\n\t\t\t\t\t'input'=>preg_match('/^(password|pass|passwd|passcode)$/i',$row['Field']) ? 'password' : 'text',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $fields;\n\t}", "public function schemaFields() { \n return $this->allFieldsArray;\n }", "public function schemaFields() { \n return $this->allFieldsArray;\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [ \n ];\n }", "public function getAllowSpecific();", "public function getAllFields() {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t= false;\n\t\t\t// Query set up\t\n\t\t\t$table\t\t\t= 'tb_field';\n\t\t\t$select_what\t= 'id, vc_field AS vc_name';\n\t\t\t$conditions\t\t= \"1 ORDER BY vc_field ASC\";\n\t\t\t$return\t\t\t= $db->getAllRows_Arr($table, $select_what, $conditions);\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}", "public function fetchFields();", "public function getFields() {\n $modifiable_fields = [];\n $type = $this->getType();\n $bundle = $this->getBundle();\n // Get _all_ defined fields. This should return an associative array.\n $fields = Framework::instance()->fieldInfoFields();\n foreach ($fields as $field => $info) {\n if (isset($info['bundles'][$type]) && is_array($info['bundles'][$type]) && in_array($bundle, $info['bundles'][$type]) && $this->filter($field)) {\n $this->addModifier($modifiable_fields, 'field', $field);\n }\n }\n return $modifiable_fields;\n }", "public function getFields()\n\t{\n\t\treturn [];\n\t}", "function checkFields($fillable)\n {\n $fillable = array_merge(array('created_at','updated_at'),$fillable); //always include\n if(count($fillable)>0) {\n foreach ($this->posted as $key => $value) {\n if (!in_array($key, $fillable)) {\n $this->setError(\"$key is not allowed to be in the database. Please adjust the database accordingly.\");\n }\n }\n if (count($this->errors) > 0) {\n return false;\n }\n }\n return true;\n }", "public function getParameterFields()\n {\n return false;\n }", "function get_fields_in_table( ){\n\t\t\t\t $result = mysql_query(\"SHOW COLUMNS FROM \".$this->db.\".\".$this->table.\"\");\n\t\t\t\tif (!$result) {\n\t\t\t\t echo 'Could not run query: ' . mysql_error();\n\t\t\t\t exit;\n\t\t\t\t}\n\t\t\t\tif (mysql_num_rows($result) > 0) {\n\t\t\t\t while ($row = mysql_fetch_assoc($result)) {\n\t\t\t\t \n\t\t\t\t //$a_fields[]=$row;\n\t\t\t\t $a_fields[]=$row['Field'].\" | \".$row['Type'];\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\treturn $a_fields;\n\t\t\t }", "public function getFields() {\n $fields = $this->_fields;\n\n if ($this->getJoins() && !$fields && $this->getType() === self::SELECT) {\n return array_keys($this->getRepository()->getSchema()->getColumns());\n }\n\n return $fields;\n }", "public static function getRequiredFields()\n\t{\n\t\t$requiredFields = [\n\t\t\t'content' => 'string',\n\t\t\t'console_names' => 'string',\n\t\t\t'game_idGame' => 'int',\n\t\t];\n\n\t\treturn $requiredFields;\n\t}", "abstract public function getSettingsFields();", "public function getFields()\n {\n return $this->arr_defined_fields;\n }" ]
[ "0.7346014", "0.7345806", "0.71407634", "0.70482606", "0.6793651", "0.6772572", "0.67556065", "0.67540073", "0.6746757", "0.6739225", "0.6615205", "0.6556615", "0.6519847", "0.64847976", "0.64847976", "0.6460977", "0.6437222", "0.642702", "0.64126974", "0.6407382", "0.6407382", "0.6407382", "0.6407382", "0.6407382", "0.6407382", "0.6383469", "0.63821316", "0.6377034", "0.6377034", "0.6377034", "0.6377034", "0.6377034", "0.6373071", "0.635849", "0.63560486", "0.6354054", "0.6347306", "0.6341299", "0.63369477", "0.6334788", "0.63274336", "0.63082767", "0.63017625", "0.6287822", "0.62802714", "0.6264175", "0.62534934", "0.62534934", "0.62483567", "0.6246908", "0.6246908", "0.6246908", "0.62466335", "0.6237996", "0.6237996", "0.62343186", "0.6234314", "0.62292296", "0.62246466", "0.62211263", "0.61982924", "0.61981344", "0.6196222", "0.61859936", "0.61746097", "0.6166594", "0.61555904", "0.61546993", "0.6151878", "0.6150228", "0.6139672", "0.6138455", "0.6138288", "0.6134519", "0.613411", "0.6124801", "0.61112255", "0.61035264", "0.61006355", "0.60980153", "0.60980153", "0.6081451", "0.6081451", "0.6081451", "0.6081451", "0.6081451", "0.6079347", "0.6071984", "0.6063199", "0.6060661", "0.6056187", "0.60487574", "0.6044501", "0.60332966", "0.6027834", "0.6020394", "0.6017918", "0.6013661", "0.5992134" ]
0.69293123
5
returns the data curently attached to connection's session
public function GetSessionData( $entryName ) { if( !isset($_SESSION[SESSION_ENTRY]) ) return null; $sessionData = $_SESSION[SESSION_ENTRY]; if( !is_array( $sessionData ) ) return null; if( !isset($sessionData[$entryName]) ) return null; return $sessionData[$entryName]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFromSession() {\n $data = $this->_getSession();\n \n return $data;\n }", "public function fetchSessionData() {}", "public function getSessionData()\n {\n return $this->getSession()->get(\"FormInfo.{$this->FormName()}.data\");\n }", "private function getSessionData()\n {\n $session = Shopware()->Session();\n $sessionData = $session->getIterator()->getArrayCopy();\n $sessionData['id'] = Shopware()->SessionID();\n\n return $sessionData;\n }", "public function getConnectionData()\n {\n return $this->metadata;\n }", "public function getSession()\n\t{\n\t\tif (isset($_SESSION[$this->getKey()]))\n\t\t{\n\t\t\treturn unserialize($_SESSION[$this->getKey()]);\n\t\t}\n\t}", "function getSession() {\n\t\treturn $this->getSessionRelatedBySessionId();\n\t}", "public static function sessionData(): object {\n return Session::instance()->get(AccessControl::SESSION_AUTH_KEY);\n }", "public static function getConnexionData()\n {\n return SessionUser::getAll();\n }", "public function current()\n {\n return current($this->sessionData);\n }", "public function getSessionInfo()\n {\n return $this->execute('user/session', 'GET');\n }", "public function getSession()\n {\n return $this['session'];\n }", "public function getSession(){\r\n return $this->session;\r\n }", "protected function getSession () {\n\t\treturn $this->session;\n\t}", "protected function getCurrentData()\n {\n $this->currData = $this->getOrigin()->fetch_assoc();\n\n return $this->currData;\n }", "public function get_arrSession()\n {\n return $this->arrSession;\n }", "public function getStored()\n\t{\n\t\treturn $_SESSION[__CLASS__][$this->questionId];\n\t}", "function phpAds_SessionDataFetch()\n{\n global $session;\n $dal = new MAX_Dal_Admin_Session();\n\n // Guard clause: Can't fetch a session without an ID\n\tif (empty($_COOKIE['sessionRPID'])) {\n return;\n }\n\n $serialized_session = $dal->getSerializedSession($_COOKIE['sessionRPID']);\n // This is required because 'sessionRPID' cookie is set to new during logout.\n // According to comments in the file it is because some servers do not\n // support setting cookies during redirect.\n if (empty($serialized_session)) {\n return;\n }\n\n $loaded_session = unserialize($serialized_session);\n\tif (!$loaded_session) {\n // XXX: Consider raising an error\n return;\n }\n\t$session = $loaded_session;\n $dal->refreshSession($_COOKIE['sessionRPID']);\n}", "public function getSession() {\n return $this->session;\n }", "public function getSessionInfo()\n {\n $select = sprintf('\n SELECT\n session_id,\n session_timestamp,\n ip,\n success\n FROM\n %sfaquser\n WHERE\n user_id = %d',\n PMF_Db::getTablePrefix(),\n $this->getUserId()\n );\n\n $res = $this->config->getDb()->query($select);\n if (!$res or $this->config->getDb()->numRows($res) != 1) {\n return [];\n }\n\n return $this->config->getDb()->fetchArray($res);\n }", "public function getSession()\r\n {\r\n return $this->sessionID;\r\n }", "public function getUserSession(){\n return $this->getParam('user-data', 'auth');\n }", "protected function getSessionVars()\n {\n return $GLOBALS[\"BE_USER\"]->getSessionData($this->extensionName);\n }", "function getSession() {\n\t\treturn $this->get('_session', $this->get('session'));\n\t}", "public function session()\n\t\t{\n\t\t\treturn $this->get_session();\n\t\t}", "public function session() {\n return $this->session;\n }", "public function getCurrentObjectData() {}", "function retrieveSessionData($pid) {\n\t\treturn tx_wecassessment_sessiondata::fetchSessionData('tx_wecassessment_pi1:' . $pid);\n\t}", "public function getSession()\n {\n return $this->session;\n }", "public function getSession()\n {\n return $this->session;\n }", "protected function getSession() {\n return $this->_session;\n }", "public function getAllValues() {\n\n if (!$this->sessionData) {\n $this->startSession();\n $this->sessionData = isset($_SESSION) ? $_SESSION : array();\n session_write_close();\n }\n\n return $this->sessionData;\n }", "public function getSession()\n\t{\n\t\treturn $this->session;\n\t}", "public function sharedData()\r\n {\r\n return $this->shared_data;\r\n }", "static public function activeConnectionData()\n {\n if (!self::$activeConnectionName)\n throw new Exception\\RuntimeException(\"No database connection is active\");\n return array_merge(self::$_connection_data[self::$activeConnectionName], ['name' => self::$activeConnectionName]);\n }", "public function current() {\n\t\treturn current($this->session);\n\t}", "function getSession() {\n\t\treturn Cgn_Session::getSessionObj();\n\t}", "protected function getSession()\n {\n return $this->getMinkContext()->getSession();\n }", "public static function getSessionData($name) {\n if (isset(self::$_session)) {\n return isset(self::$_session[$name]) ? self::$_session[$name] : NULL;\n } else {\n return $_SESSION[$name];\n }\n }", "protected function _session() {\n\t\treturn $this->_crud()->Session;\n\t}", "public function retrieveData() {\n return $this->fetch();\n }", "public function getSession()\n\t{\n\t\treturn $this->getContext()->getSession();\n\t}", "static public function connections()\n {\n return self::$_connection_data;\n }", "function fetchSessionData($key)\t{\n\t\t$id = $GLOBALS['TSFE']->fe_user->id;\t\t\n\t\t// Gets SesData if any\n\t\tif ($id)\t{\n\t\t\t$dbres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'fe_session_data', 'hash=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($id, 'fe_session_data'));\n\t\t\tif ($sesDataRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbres))\t{\n\t\t\t\t$sesData = unserialize($sesDataRow['content']);\n\t\t\t}\n\t\t\t$GLOBALS['TYPO3_DB']->sql_free_result($dbres);\n\t\t}\n\t\t\t// delete old data:\n\t\tif ((rand()%100) <= 1) {\t\t// a possibility of 1 % for garbage collection.\n\t\t\t$GLOBALS['TYPO3_DB']->exec_DELETEquery('fe_session_data', 'tstamp < ' . intval(time()-3600*24));\t\t// all data older than 24 hours are deleted.\n\t\t}\n\t\t\n\t\treturn $sesData[$key];\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getData() {\n\t\treturn $this->_data;\n\t}", "public function getSession() \r\n\t{\t\t\t\r\n\t\t$this->url = $this->server . \"/X?op=login_request\" .\r\n\t\t\t\"&user_name=\" . $this->username .\r\n\t\t\t\"&user_password=\" . $this->password;\r\n\r\n\t\t// get login_response from Metalib\r\n\r\n\t\t$this->xml = $this->getResponse($this->url, $this->timeout);\r\n\t\t\r\n\t\t// extract session ID\r\n\t\t\r\n\t\t$objSession = $this->xml->getElementsByTagName(\"session_id\")->item(0);\r\n\t\treturn $objSession->nodeValue;\r\n\t}", "public function getUserData() {\n\t\treturn $this->_userData;\n\t}", "public function current()\n {\n return $this->channels[$this->key()];\n }", "function get_db_session_data()\r\n\t{\r\n\t\t$query = $this->mongo_db->select('user_data')->get('ci_sessions');\r\n\t\t$user = array(); /* array to store the user data we fetch */\r\n\t\tforeach ($query->result() as $row)\r\n\t\t{\r\n\t\t $udata = unserialize($row->user_data);\r\n\t\t /* put data in array using username as key */\r\n\t\t $user['user_name'] = $udata['user_name']; \r\n\t\t $user['is_logged_in'] = $udata['is_logged_in']; \r\n\t\t}\r\n\t\treturn $user;\r\n\t}", "public function data()\n {\n return $this->_data;\n }", "public function getData()\n\t\t{\n\t\t\treturn $this->_data;\n\t\t}", "public function data ()\n {\n return $this->_data;\n }", "public function getData() {\r\n\t\treturn $this->_data;\r\n\t}", "public function getData()\n\t{\n\t\treturn $this->_data;\n\t}", "public function data(){\r\n\t\treturn $this->_data;\r\n\t}", "public function getCurrentSessions()\n {\n return $this->getKey('CurrentSessions');\n }", "public function getDataFromSessionPostProcess($data = null)\n {\n return $this->_objData;\n }", "public function getData($key) {\r\n return (isset($_SESSION[$key])) ? $_SESSION[$key] : null;\r\n }", "public function getData()\n {\n return $this->data->reply;\n }", "function getDataSession()\r\n\t{\r\n\t\t$id = $this->Auth->user('id');\r\n\t\t$dataUser = $this->User->find('first', array('conditions' => array('User.id' => $id)));\r\n\t\t\r\n\t\treturn $dataUser;\r\n\t}", "public function sessions() {\n return $this->rich_model->get_sessions();\n // return $this->rich_model->get_mikrotik_sessions();\n }", "public function data(){\n\n\t\treturn $this->_data;\n\n\t}", "public static function Get()\r\n {\r\n $data = Session::Exists(self::NAME) ? Session::Get(self::NAME) : null;\r\n Session::Remove(self::NAME);\r\n return $data;\r\n }", "public function get_info() {\r\n if(!isset($_SESSION['info'])) {\r\n session_start();\r\n }\r\n\r\n if(isset($_SESSION['info'])){\r\n return $_SESSION['info'];\r\n \r\n }\r\n }", "public function retrieveConcurrentSessions()\n {\n $endpoint = self::$endpoint . '/statistics' . SessionEndpoint::$endpoint;\n return self::sendRequest(Method::GET, $endpoint);\n }", "public function viewCurrentSession(){\n\t\t\t$query = $this->connection()->prepare(\"SELECT MAX(name) as nam FROM sessionz\");\n\t\t\t$query->execute();\n\t\t\treturn $query->fetch();\n\t\t}", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData()\n {\n return $this->_data;\n }", "public function getData() {\n return $this->_data;\n }", "public function getData() {\n return $this->_data;\n }", "protected function collectSessionData() {\n\n\t\t$time_started = time();\n\t\t$time_ended = $time_started;\n\n\t\t$user_guid = elgg_get_logged_in_user_guid();\n\n\t\t$ip_address = $this->getIpAddress();\n\n\t\t$geolite = elgg_get_config('geolite_db');\n\t\tif (file_exists($geolite)) {\n\t\t\t$reader = new Reader($geolite);\n\t\t\t$geoip = $reader->get($ip_address);\n\t\t} else {\n\t\t\t$geoip = [];\n\t\t}\n\n\t\t$city = '';\n\t\tif (!empty($geoip['city']['names']['en'])) {\n\t\t\t$city = $geoip['city']['names']['en'];\n\t\t}\n\n\t\t$state = '';\n\t\tif (!empty($geoip['subdivisions'])) {\n\t\t\t$state = array_shift($geoip['subdivisions']);\n\t\t\tif (!empty($state['names']['en'])) {\n\t\t\t\t$state = $state['names']['en'];\n\t\t\t}\n\t\t}\n\n\t\t$country = '';\n\t\tif (!empty($geoip['country']['iso_code'])) {\n\t\t\t$country = $geoip['country']['iso_code'];\n\t\t}\n\n\t\t$latitude = '';\n\t\tif (!empty($geoip['location']['latitude'])) {\n\t\t\t$latitude = $geoip['location']['latitude'];\n\t\t}\n\n\t\t$longitude = '';\n\t\tif (!empty($geoip['location']['longitude'])) {\n\t\t\t$longitude = $geoip['location']['longitude'];\n\t\t}\n\n\t\t$timezone = '';\n\t\tif (!empty($geoip['location']['time_zone'])) {\n\t\t\t$timezone = $geoip['location']['time_zone'];\n\t\t}\n\n\t\treturn [\n\t\t\t'user_guid' => $user_guid,\n\t\t\t'time_started' => $time_started,\n\t\t\t'time_ended' => $time_ended,\n\t\t\t'ip_address' => $ip_address,\n\t\t\t'city' => $city,\n\t\t\t'state' => $state,\n\t\t\t'country' => $country,\n\t\t\t'latitude' => $latitude,\n\t\t\t'longitude' => $longitude,\n\t\t\t'timezone' => $timezone,\n\t\t];\n\t}", "public function getData()\n {\n return self::$data;\n }", "public function getSession() {\n\t\ttry {\n\n\t\t\t$sessionQuery = \"SELECT * FROM session\";\n\t\t\treturn DB::select($sessionQuery);\n\n\t\t} catch (\\Exception $ex) {\n\t\t\tprint_r($ex->getMessage());\n\n\t\t}\n\t}", "public function get_data()\n {\n return $this->_data;\n }", "public function getUserData()\n {\n return $this->userData;\n }", "public function getData() {\n\t\treturn $this->data;\n\t}", "public function getData() {\n\t\treturn $this->data;\n\t}", "function getData()\n {\n return $this->_data;\n }", "function getData() {\n\t\treturn $this->data;\n\t}", "public function getSession()\n {\n return isset($this->Session) ? $this->Session : null;\n }", "public function getSession()\n {\n return isset($this->Session) ? $this->Session : null;\n }", "public function get_current_connection()\n {\n }", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getSession(){\n if ($this->_session instanceof Session) {\n return $this->_session;\n }\n return $this->_createSession();\n }", "public function storeSessionData() {}", "public function storeSessionData() {}", "protected function getSession()\n {\n $session = Session::getInstance();\n\n $this->settings = $session->get('member-import-settings');\n $this->importData = $session->get('member-import-data');\n }", "public function getSession()\n {\n $session = $this->setSession(self::getHash($this->_optionsSession['session_name']));\n return $session;\n }", "public function data()\n {\n \tif (!isset($this->data)) {\n \t\t$this->setData();\n \t}\n \t\n \treturn $this->data->data();\n }", "public function getCollectedData();" ]
[ "0.7468663", "0.70372653", "0.6983256", "0.6916053", "0.6914173", "0.6851363", "0.66345346", "0.6634264", "0.65500677", "0.6517816", "0.6508811", "0.64969516", "0.64164686", "0.63562554", "0.63503236", "0.6344528", "0.6332158", "0.6329953", "0.6317244", "0.6315013", "0.6305693", "0.6305013", "0.6286687", "0.62646425", "0.6263796", "0.6261981", "0.62505084", "0.6229168", "0.6224957", "0.6224957", "0.6203988", "0.6203048", "0.6184967", "0.6177299", "0.61598223", "0.6128254", "0.61176515", "0.61133856", "0.6099965", "0.60959923", "0.607051", "0.6066055", "0.6055171", "0.60284215", "0.6018429", "0.6018429", "0.6018429", "0.6018429", "0.6018429", "0.60100174", "0.5995001", "0.59935814", "0.59907633", "0.5990585", "0.59887046", "0.59755635", "0.5970823", "0.596892", "0.5964753", "0.59637743", "0.59620607", "0.59554344", "0.5953814", "0.5952819", "0.5951333", "0.5949965", "0.594661", "0.5935932", "0.5934924", "0.5930336", "0.5923142", "0.5923142", "0.5923142", "0.5923142", "0.5923142", "0.5923142", "0.59221286", "0.59221286", "0.591868", "0.59065497", "0.58973575", "0.58967847", "0.5892897", "0.5889439", "0.5889439", "0.58782756", "0.5870659", "0.58606267", "0.58606267", "0.5850147", "0.5846445", "0.5846445", "0.5846445", "0.5846445", "0.5842196", "0.58398134", "0.58392364", "0.58329403", "0.58329254", "0.5832293", "0.58313906" ]
0.0
-1
sets the data attached to the connection's session. if no session is attached, a new one is created
public function SetSessionData( $entryName, $data ) { if( $data == null ) $this->CleanSessionData( $entryName ); else $_SESSION[SESSION_ENTRY][$entryName] = $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function storeSessionData() {}", "public function storeSessionData() {}", "protected function setSessionData()\n {\n $responseData = $this->response->getBody();\n if (strlen($responseData) > 0) {\n $contents = str_replace('$SID', $this->session->getName() . '=' . $this->session->getId(), $responseData);\n $contents = str_replace('$SESSION_NAME', $this->session->getName(), $contents);\n $this->response->replaceBody(str_replace('$SESSION_ID', $this->session->getId(), $contents));\n }\n }", "public function fillInAddedSessionData();", "public function setToSession($data) {\n $this->_setSession($data);\n }", "public function setSession()\n {\n $this->setShared('session', function() {\n $session = new SessionAdapter();\n $session->start();\n return $session;\n });\n }", "public function setSessionData(): void\n {\n $this->response->getSession()->set(\n config('form.session_key'),\n [\n $this->form->getID() => [\n 'data' => $this->body,\n 'messages' => $this->errors\n ]\n ]\n );\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 updateGameSession()\n {\n $this->getSession()->set('gameData', $this->getGame()->getGameData());\n }", "public function saveDataToSession()\n {\n $data = $this->getData();\n $data = Sanitizer::remove_from_data_array($data);\n $this->setSessionData($data);\n }", "public function storeDataInSession() {\n\t\t$_SESSION['Order__id'] = $this->insertedOrderId;\n\t\t$_SESSION['transactionAmount'] = $this->totalPrice;\n\t}", "private function _setSessionxxxx()\n {\n $this->_session = new Class_Session();\n\n if (!$this->_session instanceof Class_Session_Abstract) {\n require_once 'Class/User/SessionException.php';\n throw new Class_User_Exception('Invalid table data gateway provided');\n }\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 returnPreviouslySetData()\n {\n $_SESSION = ['foo' => 'bar', 'object' => new \\stdClass()];\n\n $serializedSession = serialize($_SESSION);\n\n $this->sessionEntity->setData($serializedSession);\n\n $this->assertEquals($serializedSession, $this->sessionEntity->getData());\n }", "protected function manageSession()\n {\n $this->session = new WebsiteSession();\n foreach ($this->eventRequest->getSession() as $key => $value) {\n\n if ($key == 'createdAt') {\n $value = time();\n }\n\n $method = 'set' . ucwords($key);\n if (method_exists($this->session, $method)) {\n $this->session->$method($value);\n }\n }\n }", "public function set(array $session_data) {\n $_SESSION = array_merge($_SESSION, $session_data);\n }", "public function fetchSessionData() {}", "public function setSession()\n\t{\n\t\t$this->session = Session::getInstance();\n\t\t$this->session->start();\n\t}", "public function storeSession() {}", "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}", "private function updateSession()\n {\n $_SESSION[$this->namespace] = $this->session;\n }", "protected abstract function loadSessionData();", "private function setSession()\n {\n try\n {\n # Get the Populator object and set it to a local variable.\n $populator=$this->getPopulator();\n # Get the User object and set it to a local variable.\n $user_obj=$populator->getUserObject();\n\n # Set the form URL's to a variable.\n $form_url=$populator->getFormURL();\n # Set the current URL to a variable.\n $current_url=FormPopulator::getCurrentURL();\n # Check if the current URL is already in the form_url array. If not, add the current URL to the form_url array.\n if(!in_array($current_url, $form_url)) $form_url[]=$current_url;\n\n # Create a session that holds all the POST data (it will be destroyed if it is not needed.)\n $_SESSION['form']['password']=\n array(\n 'EmailPassword'=>$populator->getEmailPassword(),\n 'FormURL'=>$form_url\n );\n }\n catch(Exception $e)\n {\n throw $e;\n }\n }", "protected function _loadFromSession()\n {\n if (isset($this->sessionData['_options']))\n {\n $this->_options = $this->sessionData['_options'];\n }\n else\n {\n $this->initDefaultOptions();\n }\n\n if (isset($this->sessionData['_selectedIndex'])) $this->_selectedIndex = $this->sessionData['_selectedIndex'];\n if (isset($this->sessionData['safeMode'])) $this->safeMode = $this->sessionData['safeMode'];\n }", "public function setConnectionData($data)\n {\n $this->metadata = $data;\n }", "public static function setSessionData($systemName, $dataKey, $data);", "public function setSessionData($data)\n {\n $this->getSession()->set(\"FormInfo.{$this->FormName()}.data\", $data);\n return $this;\n }", "public function setSession(){\n if( $this->status === True ){\n $_SESSION['username'] = $this->username;\n $_SESSION['userlvl'] = $this->userlevel;\n $_SESSION['status'] = True;\n }else{\n $_SESSION['status'] = False;\n }\n }", "protected function _initSessionData()\n {\n $this->_flash = isset($_SESSION['_flash']) ? $_SESSION['_flash'] : null;\n unset($_SESSION['_flash']);\n $this->_session = $_SESSION;\n }", "function set_session() {\n\t\t\t// Set cart and coupon session data\n\t\t\t$_SESSION['cart'] = $this->cart_contents;\n\t\t\t$_SESSION['coupons'] = $this->applied_coupons;\n\t\t\t\n\t\t\t// Cart contents change so reset shipping\n\t\t\tunset($_SESSION['_chosen_shipping_method']);\n\t\t\t\n\t\t\t// Calculate totals\n\t\t\t$this->calculate_totals();\n\t\t}", "public function setDataConnection(){\n \n \n }", "function setDataToModel(){\n if(isset($_SESSION[\"count\"])){\n $this->car_company=$_SESSION[\"car_company\"];\n $this->model=$_SESSION[\"model\"];\n $this->year=$_SESSION[\"year\"];\n $this->price=$_SESSION[\"price\"];\n $this->engine_power=$_SESSION[\"engine_power\"];\n $this->dors=$_SESSION[\"doors\"];\n $this->seats=$_SESSION[\"seats\"];\n $this->gearing_type=strtolower($_SESSION[\"gearing_type\"]);\n $this->fuel_type=strtolower($_SESSION[\"fuel_type\"]);\n $_SESSION[\"count\"]=$_SESSION[\"count\"]+1;\n }\n }", "private function persist() {\n $session = new Session();\n $items = $this->getItems();\n $session->set('inspiration_board', json_encode($items));\n }", "public function saveDataToSession()\n {\n $data = $this->getData();\n if (isset($data['MinimumPrice']) && !$data['MinimumPrice']) {\n unset($data['MinimumPrice']);\n }\n if (isset($data['MaximumPrice']) && !$data['MaximumPrice']) {\n unset($data['MaximumPrice']);\n }\n if (isset($data['ShortKeyword']) && $data['ShortKeyword']) {\n $data['Keyword'] = $data['ShortKeyword'];\n }\n if (isset($data['Keyword']) && $data['Keyword']) {\n $data['ShortKeyword'] = $data['Keyword'];\n }\n Session::set($this->Config()->get('form_data_session_variable'), $data);\n }", "protected function getSession()\n {\n $session = Session::getInstance();\n\n $this->settings = $session->get('member-import-settings');\n $this->importData = $session->get('member-import-data');\n }", "protected function _initialize_session()\n\t{\n\t\t$this->sdata = array(\n\t\t\t'session_id' \t\t=> 0,\n\t\t\t'fingerprint'\t\t=>\t0,\n\t\t\t'member_id' \t\t=> 0,\n\t\t\t'admin_sess' \t\t=> 0,\n\t\t\t'ip_address' \t\t=> ee()->input->ip_address(),\n\t\t\t'user_agent' \t\t=> substr(ee()->input->user_agent(), 0, 120),\n\t\t\t'last_activity'\t\t=> 0,\n\t\t\t'sess_start'\t\t=>\t0\n\t\t);\n\t}", "private function syncFromSession() {\n if (session_id() &&\n isset($this->company) &&\n isset($this->email) &&\n isset($_SESSION[self::SESSION_KEY]) &&\n isset($_SESSION[self::SESSION_KEY][$this->company]) &&\n isset($_SESSION[self::SESSION_KEY][$this->company][$this->email])\n ) {\n\n $data = $_SESSION[self::SESSION_KEY][$this->company][$this->email];\n foreach ($this->syncedProperties as $property) {\n if (isset($data[$property])) {\n $this->$property = $data[$property];\n }\n }\n }\n }", "public function addToSession() {\n $s = Session::getInstance();\n $key = $this->sessionId;\n $s->$key = $this->getId();\n if ($s->$key === null) {\n Log::warn(\"Adding null user ID to session\");\n }\n $this->setAuthed(true);\n }", "public static function setAsSessionHandler()\n {\n session_set_save_handler(array('Eb_MemcacheSession', 'sessionOpen'),\n array('Eb_MemcacheSession', 'sessionClose'),\n array('Eb_MemcacheSession', 'sessionRead'),\n array('Eb_MemcacheSession', 'sessionWrite'),\n array('Eb_MemcacheSession', 'sessionDestroyer'),\n array('Eb_MemcacheSession', 'sessionGc'));\n }", "public static function reloadSession(){\n $auth = App_Auth::getInstance();\n\n $userModel = new FrontendUser();\n $user = $userModel->findById(self::getSession()->id);\n $user->groups = $user->findManyToManyRowset('Group', 'FrontendUserGroup');\n $user->group = $user->groups[0];\n\n $session = new stdClass();\n foreach($user as $k => $v){\n $session->{$k} = $v;\n }\n $session->group->name = $user->get('group')->name;\n\n $auth->getStorage()->write($session);\n }", "public function set()\n\t{\n\t\t$this->created_at = date(TIMESTAMP_FORMAT);\n $user = new SessionUser();\n\t\t$this->created_by = $user->getID();\t\t\n\t}", "public function setDataToSession($data = null, $key = null, $path = '', $autocreate = true, $overwriteExistingVar = false)\n {\n if (!$data) {\n $data = $this->_objData;\n }\n if (!$key) {\n $key = $this->_objPath;\n }\n if (!$path) {\n $path = $this->_objSessionPath;\n }\n\n if (!$this->setDataToSessionPreProcess($data)) {\n return false;\n }\n\n SessionUtil::setVar($path, $data, $path, $autocreate, $overwriteExistingVar);\n $this->_objData = $data;\n return $this->_objData;\n }", "protected function _setConnectionsData()\n\t{\n\t\t// content of this function can be modified on demo account\n\t\t// variable names $data and $connectionsData are important\n\n\t\t$connectionsData = array();\n\t\tinclude 'ConnectionManagerConfig.php';\n\t\t$this->_connectionsData = $connectionsData;\n\t}", "private function loginWithSessionData()\n { \n $this->user_name = $_SESSION['user_name'];\n $this->user_email = $_SESSION['user_email'];\n\n // set logged in status to true, because we just checked for this:\n //if(!empty($_SESSION['user_name']) && ($_SESSION['user_logged_in'] == 1)\n // when we called this method (in the constructor)\n $this->user_is_logged_in = true;\n \n if($_SESSION['user_privileges'] == 1)\n $this->user_admin = true;\n }", "private function getSessionData()\n {\n $session = Shopware()->Session();\n $sessionData = $session->getIterator()->getArrayCopy();\n $sessionData['id'] = Shopware()->SessionID();\n\n return $sessionData;\n }", "public function updateSession(){\n # code...\n }", "protected function initializeSession() {}", "public function setFormSessionData(): void\n {\n $session = (array) $this->request->getSession()->get(config('form.session_key'));\n\n $formId = $this->form->getID();\n if (array_key_exists($formId, $session)) {\n $data = $session[$formId];\n\n $this->data = array_key('data', $data, []);\n $this->errors = array_key('messages', $data, []);\n }\n array_map(\n function ($name, $message) {\n $this->form->getField($name)->setErrorMessage($message);\n },\n array_keys($this->errors),\n $this->errors\n );\n \n array_key_unset(config('form.csrf_field_name'), $this->data);\n \n $this->form->setValues($this->data);\n $this->removeSessionData();\n }", "public function resetSessionData(){\n\t\t$_SESSION['Order__id'] = null;\n\t\t$_SESSION['transactionAmount'] = null;\n\t\t\n\t}", "function __data() {\n\t\tif ($data = $this->Session->read('data')) {\n\t\t\tforeach ($data as $k => $i) {\n\t\t\t\t$obj = ClassRegistry::init($k);\n\t\t\t\t$this->data[$k] = $i;\n\t\t\t}\n\t\t\t$this->Session->write('data', null);\n\t\t}\n\t\t// attempts to remember identity of commentor and prefill fields\n\t\tif (empty($this->data['Comment']) && $data = $this->Cookie->read('CommentUser')) {\n\t\t\t$this->data['Comment'] = $data;\n\t\t}\n\t}", "public function updateSession($data=[]) {\n\t\t$this->backup=$_SESSION;\n\t\t$_SESSION=self::MergeProperties($_SESSION,$data);\n\t\tlist($_SESSION['signature'],$t)=$this->calculateSignature();\n\t}", "protected function setCommandSession($sessionName){\n $obj = new \\stdClass;\n $obj->commandName = get_class($this);\n $obj->sessionName = $sessionName;\n if(!apcu_exists($this->getChatId())){\n apcu_add($this->getChatId(),json_encode($obj));\n }\n else{\n apcu_store($this->getChatId(),json_encode($obj));\n }\n }", "protected function _UpdateExportSession()\n\t{\n\t\t$exportSession = serialize($this->_exportSession);\n\t\t$query = sprintf(\"update [|PREFIX|]export_session set data='%s' where type='primary'\", $GLOBALS['ISC_CLASS_DB']->Quote($exportSession));\n\t\t$GLOBALS['ISC_CLASS_DB']->Query($query);\n\t}", "public static function setSessionData($name, $value) {\n if (isset(self::$_session)) {\n self::$_session[$name] = $value;\n } else {\n $_SESSION[$name] = $value;\n }\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}", "function setMockSession() {\n if (!class_exists('\\RightNow\\Libraries\\MockSession')) {\n Mock::generate('\\RightNow\\Libraries\\Session');\n }\n $session = new \\RightNow\\Libraries\\MockSession;\n $this->realSession = $this->CI->session;\n $this->CI->session = $session;\n $session->setSessionData(array('sessionID' => 'garbage'));\n }", "public function __set($name, $value) {\n $_SESSION[$this->myedb_session_key][$name] = $value;\n }", "protected function initialize()\n\t{\n\t\t$this->data =& $_SESSION;\n\t}", "public function saveToSession()\n {\n $_SESSION[PMF_SESSION_CURRENT_USER] = $this->getUserId();\n }", "public function update_session(){\n\n // Update any internal counters\n $this->update_variables();\n\n // Request parent robot object to update as well\n //$this->robot->update_session();\n\n // Update the session with the export array\n $this_data = $this->export_array();\n $_SESSION['ABILITIES'][$this->robot->robot_id][$this->ability_id] = $this_data;\n $this->battle->values['abilities'][$this->ability_id] = $this_data;\n //$this->player->values['abilities'][$this->ability_id] = $this_data;\n //$this->robot->values['abilities'][$this->ability_id] = $this_data;\n\n // Return true on success\n return true;\n\n }", "private function establishCaptchaData()\n {\n // If the same request-object is used in multiple forms of a page,\n // there might already be captchaData in the session.\n // If this is the case, we use that.\n // Otherwise we generate a new captcha-question and an answer.\n\n if (session()->has($this->sessionKey)) {\n $sessionData = session()->get($this->sessionKey);\n $this->question = $sessionData['question'];\n $this->answer = $sessionData['answer'];\n } else {\n $this->generateCaptchaData();\n }\n }", "protected function writeSession() {\n // write the session\n $session = null;\n if ($this->request->hasSession()) {\n $session = $this->request->getSession();\n if ($session->isChanged()) {\n $session->write();\n }\n\n if (!$session->getAll()) {\n $session = null;\n }\n }\n\n // log the session\n if (!$this->log) {\n return;\n }\n\n if ($session) {\n $this->log->logDebug('Current session:', $session->getId(), System::LOG_SOURCE);\n\n if ($this->valueDecorator) {\n $variables = $session->getAll();\n\n ksort($variables);\n\n foreach ($variables as $name => $value) {\n $this->log->logDebug('- ' . $name, $this->valueDecorator->decorate($value), System::LOG_SOURCE);\n }\n }\n } else {\n $this->log->logDebug('No session loaded', '', System::LOG_SOURCE);\n }\n }", "protected function _LoadExportSession()\n\t{\n\t\t$query = \"select data from [|PREFIX|]export_session where type='primary'\";\n\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t$this->_exportSession = @unserialize($GLOBALS['ISC_CLASS_DB']->FetchOne($result));\n\t}", "abstract public function resetSession();", "public function moveSessionToDatabase()\n {\n if ($this->hasSession() && $this->connection == 'database') {\n $session = \\Session::get($this->instanceName);\n \\Session::forget($this->instanceName);\n $session->each(function ($item) {\n $cart = $this->cart->where('cartable_id', $item['cartable_id'])->where('cartable_type', $item['cartable_type'])->first();\n if (!is_null($cart)) {\n $item['id'] = $cart['id'];\n $item['quantity'] += $cart['quantity'];\n $item['price'] = $cart['price'];\n }\n $this->cart->put($item['id'], $item);\n });\n $this->save();\n }\n\n return $this;\n }", "protected function setStorage($data)\n {\n Session::register(__NAMESPACE__, serialize($data));\n }", "public static function setSession($session) {\n self::$_session = $session;\n }", "function sessionFields($resultSet){\r\n\t\t$_SESSION['id'] = $resultSet[0]->id;\r\n\t\t$_SESSION['username'] = $resultSet[0]->username;\r\n\t\t$_SESSION['name'] = $resultSet[0]->name;\r\n\t\t$_SESSION['surname'] = $resultSet[0]->surname;\r\n\t\t$_SESSION['email'] = $resultSet[0]->email;\r\n\t\t$_SESSION['role'] = $resultSet[0]->role;\r\n\t\t$_SESSION['picture'] = $resultSet[0]->picture;\r\n\t}", "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}", "private function _setSession(Session $session)\n\t{\n\t\t$property = new \\ReflectionProperty('aik099\\\\PHPUnit\\\\BrowserTestCase', '_session');\n\t\t$property->setAccessible(true);\n\t\t$property->setValue($this, $session);\n\t}", "function saveSession() {}", "public function setDataToSessionPreProcess($data = null)\n {\n return $this->_objData;\n }", "function bdd2session() {\n\tif (!empty($_SESSION['dims']['userid'])) {\n\t\tinclude_once DIMS_APP_PATH.'/modules/catalogue/include/class_panier.php';\n\t\t$panier = new cata_panier();\n\t\t$panier->open($_SESSION['dims']['userid']);\n\n\t\tforeach ($panier->articles as $art) {\n\t\t\t$_SESSION['catalogue']['panier']['articles'][$art['ref']]['qte'] = $art['qte'];\n\n\t\t\tif (isset($art['forced_price'])) {\n\t\t\t\t$_SESSION['catalogue']['panier']['articles'][$art['ref']]['forced_price'] = $art['forced_price'];\n\t\t\t}\n\t\t}\n\t\t// update_montant_panier();\n\t}\n}", "function setSession() {\n $layout = $this->input->post('layout');\n $_SESSION['standingLayout'] = $layout;\n \n // gets value for order and stores in session variable\n $order = $this->input->post('order');\n $_SESSION['standingOrder'] = $order;\n \n // gets value for data source and stores in session variable\n $dataSource = $this->input->post('dataSource');\n $_SESSION['standingDataSource'] = $dataSource;\n \n redirect('/standing');\n }", "private function __setSession($email){\n $_SESSION['wifiGuardSharingEmail'] = $email;\n $sessionID = sha1(uniqid(mt_rand()).$_SERVER['REMOTE_ADDR']);\n $_SESSION[\"wifiGuardSharingID\"] = $sessionID; \n $arr = array(\n 'sessionID' => $sessionID\n );\n dibi::query('UPDATE `user` SET ', $arr, \n 'WHERE `email`=%s', $email);\n }", "public function saveSession(): void {\n\t\t$_SESSION[self::SESSION_NAME] = $this;\n\t}", "public function setSession($sName, $mData) {\n\n // Set the session\n $_SESSION[$this->loadConfigVar('systemSettings', 'nameSpace')][$sName] = $mData;\n\n // Return instance\n return $this;\n }", "protected function writeMetadata() {\n $_SESSION[self::METADATA_KEY] = $this->metadata;\n }", "protected function initSession()\n {\n $this->di->setShared('session', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $adapter = '\\Phalcon\\Session\\Adapter\\\\' . $config->get('session')->adapter;\n\n /** @var \\Phalcon\\Session\\AdapterInterface $session */\n $session = new $adapter;\n $session->start();\n\n return $session;\n });\n }", "public function sess_write()\r\r\n\t{\r\r\n\t\tif( ! $this->parent->check_write())\r\r\n\t\t{\r\r\n\t\t\t$_SESSION = array();\r\r\n\t\t\tforeach($this->parent->userdata as $key => $val)\r\r\n\t\t\t{\r\r\n\t\t\t\t$_SESSION[$key] = $val;\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$this->parent->track_write();\r\r\n\t\t}\r\r\n\t}", "private function setSESSIONvariables() {\n $_SESSION['pqz_configuration'] = $this->configuration;\n $_SESSION['pqz_question'] = $this->question;\n }", "private function set_session_data($post){\n //get all post data in an array\n $sent_data = array();\n //make the keys of the data its value\n foreach($post as $key => $value){\n $sent_data[$key]=$key;\n $value = $value;\n }\n //set the user's choice in an array\n $user_choice = '';\n if(preg_grep ('/option/', $sent_data)){\n $choice = preg_grep ('/option/', $sent_data);\n foreach($choice as $chosen => $chosen_value){\n $user_choice = $chosen_value;\n $chosen = $chosen;\n }\n }\n //set session variable\n $_SESSION['options']['question'.trim($this->input->post('qnum', TRUE))] = $user_choice;\n }", "public function getFromSession() {\n $data = $this->_getSession();\n \n return $data;\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 }", "public function setConnection( $v ){ if( $this->connection != $v ){ $this->dirty = true; } $this->connection = $v; }", "private function synchronize()\n {\n $_SESSION['user'] = $this->user;\n }", "protected function setPersistentData($key, $value)\n {\n $this->_sessionNamespace->{$key} = $value;\n }", "public function setSession($sessionID)\r\n {\r\n $this->$sessionID = $sessionID;\r\n }", "private function setupSQLStatement() {\r\n\r\n $tabella_sessioni = $this->db_name.\".\".$this->table_name_session;\r\n $tabella_variabili = $this->db_name.\".\".$this->table_name_variable;\r\n /*** SQL statement: count SID ***/\r\n $this->SQLStatement_CountSid = $this->connessione->prepare(\"SELECT count(*) FROM \".$tabella_sessioni.\" WHERE \".$this->table_column_sid.\" = :sid\");\r\n\r\n /*** SQL statement: Insert Session ***/\r\n $this->SQLStatement_InsertSession = $this->connessione->prepare(\"INSERT INTO \".$tabella_sessioni.\"(\".$this->table_column_sid.\",\".$this->table_column_exp.\",\".$this->table_column_fexp.\",\".$this->table_column_ua.\") VALUES (:sid,:expires,:forcedExpires,:ua)\");\r\n\r\n /*** SQL statement: Update Session Expires ***/\r\n $this->SQLStatement_UpdateSessionExpires = $this->connessione->prepare(\"UPDATE \".$tabella_sessioni.\" SET \".$this->table_column_exp.\" = :expires WHERE \".$this->table_column_sid.\" = :sid\");\r\n\r\n /*** SQL statement: Get Session Infos ***/\r\n $this->SQLStatement_GetSessionInfos = $this->connessione->prepare(\"SELECT * FROM \".$tabella_sessioni.\" WHERE \".$this->table_column_sid.\" = :sid\");\r\n\r\n /*** SQL statement: Get Session Vars ***/\r\n $this->SQLStatement_GetSessionVars = $this->connessione->prepare(\"SELECT \".$this->table_column_value.\" as value, \".$this->table_column_name.\" as name FROM \".$tabella_variabili.\" WHERE \".$this->table_column_sid.\" = :sid\");\r\n \r\n /*** SQL statement: Get Encrypted Session Vars ***/\r\n $this->SQLStatement_GetEncryptedSessionVars = $this->connessione->prepare(\"SELECT AES_DECRYPT(\".$this->table_column_value.\",'\".$this->encrypt_key.\"') as value,AES_DECRYPT(\".$this->table_column_name.\",'\".$this->encrypt_key.\"') as name FROM \".$tabella_variabili.\" WHERE \".$this->table_column_sid.\" = :sid\");\r\n\r\n /*** SQL statement: Delete Session Vars ***/\r\n $this->SQLStatement_DeleteSessionVars = $this->connessione->prepare(\"DELETE FROM \".$tabella_variabili.\" WHERE \".$this->table_column_sid.\" = :sid AND \".$this->table_column_name.\"= :name \");\r\n\r\n /*** SQL statement: Delete Encrypted Session Vars ***/\r\n $this->SQLStatement_DeleteEncryptedSessionVars = $this->connessione->prepare(\"DELETE FROM \".$tabella_variabili.\" WHERE \".$this->table_column_sid.\" = :sid AND \".$this->table_column_name.\"= AES_ENCRYPT(:name,'\".$this->encrypt_key.\"') \");\r\n\r\n /*** SQL statement: Insert Session Vars ***/\r\n $this->SQLStatement_InsertSessionVars = $this->connessione->prepare(\"INSERT INTO \".$tabella_variabili.\"(\".$this->table_column_sid.\",\".$this->table_column_name.\",\".$this->table_column_value.\") VALUE(:sid,:name,:value)\");\r\n\r\n /*** SQL statement: Insert Encrypted Session Vars ***/\r\n $this->SQLStatement_InsertEncryptedSessionVars = $this->connessione->prepare(\"INSERT INTO \".$tabella_variabili.\"(\".$this->table_column_sid.\",\".$this->table_column_name.\",\".$this->table_column_value.\") VALUE(:sid,AES_ENCRYPT(:name,'\".$this->encrypt_key.\"'),AES_ENCRYPT(:value,'\".$this->encrypt_key.\"'))\");\r\n\r\n /*** SQL statement: Delete Session ***/\r\n $this->SQLStatement_DeleteSession = $this->connessione->prepare(\"DELETE FROM \".$tabella_sessioni.\" WHERE \".$this->table_column_sid.\" = :sid \");\r\n\r\n /*** SQL statement: Delete Expired Session ***/\r\n $this->SQLStatement_DeleteExpiredSession = $this->connessione->prepare(\"DELETE FROM \".$tabella_sessioni.\" WHERE \".$this->table_column_fexp.\" < :time \");\r\n\r\n }", "public function setDrupalSessionData($data)\n {\n $this->_drupal->getSession()->set('_security.drupal_authentication', $data);\n $this->_drupal->setDefaultHeaders();\n }", "public function setSession($value)\n\t{\n\t\t$_SESSION[$this->getKey()] = serialize($value);\n\t}", "public function setUser()\n\t{\n\t\t$user = User::getInstance();\n\t\t\n\t\tif ( $this->session->get( 'user_id' ) ) {\n\t\t\t$user->set( 'id', $this->session->get( 'user_id' ) );\n\t\t\t$user->read();\n\t\t}\n\t}", "private function getSession() {\n\t\t//read session file and fill the array\n\t\tif (file_exists ( self::SESSION_FILE )) {\n\t\t\t$this->session = unserialize ( file_get_contents ( self::SESSION_FILE ) );\n\t\t}\n\t\t\n\t\t//If the last session has expired, remove the session\n\t\tif (isset ( $this->session ) && $this->session ['lastlogin'] + (10 * 60) <= time ()) {\n\t\t\tunset ( $this->session );\n\t\t\t$this->updateSession ();\n\t\t}\n\t}", "public function set_userdata($data, $value = NULL)\n\t{\n\t\tif (is_array($data))\n\t\t{\n\t\t\tforeach ($data as $key => &$value)\n\t\t\t{\n\t\t\t\t$_SESSION[$key] = $value;\n\t\t\t\t#$this->sess_name[$key] = $value;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t$_SESSION[$data] = $value;\n\t\t#$this->sess_name[$data] = $value;\n\t}", "private function _createSession(){\n return $this->_session = new Session();\n }", "private function store()\n {\n $this->session->set('sergsxm_form_'.$this->formId, $this->parameters);\n }", "public function initializeSession() {\n\t\t$this->objectContainer->initializeSession();\n\t\t$this->sessionInitialized = TRUE;\n\t}", "private function updateSession() {\n\t\t//update the login time.\n\t\tif (isset ( $this->session )) {\n\t\t\t$this->session ['lastlogin'] = time ();\n\t\t}\n\t\t\n\t\t//write $session['uid'], $session['name'], $session['lastlogin'] to file\n\t\tif (isset ( $this->session )) {\n\t\t\tfile_put_contents ( self::SESSION_FILE, serialize ( $this->session ) );\n\t\t} elseif (file_exists ( self::SESSION_FILE )) { //remove session information\n\t\t\tsession_destroy();\n\t\t\tunlink ( self::SESSION_FILE );\n\t\t}\n\t}", "public function setData($d){\r\n\t\t\t//ini_set('session.gc_maxlifetime',60);\r\n\t\t\tself::$datos = array($d[0], $d[1]);\r\n\t\t}", "function set($value) {\n\t\tif (!is_array($value))\n\t\t\t$value = array (\n\t\t\t\t$value => TRUE\n\t\t\t);\n\t\treturn (empty ($this->_session['data'])) ? \n\t\t\t$this->_session['data'] = $value : \n\t\t\t$this->_session['data'] = array_merge($this->_session['data'], $value);\n\t}" ]
[ "0.6780228", "0.6779332", "0.67427677", "0.65991414", "0.65979755", "0.65861464", "0.655019", "0.63786095", "0.6367639", "0.62753564", "0.62524724", "0.6181766", "0.61309737", "0.61140233", "0.6032705", "0.60093504", "0.5998264", "0.59921205", "0.5969451", "0.5928852", "0.59206766", "0.59000915", "0.58998746", "0.58842367", "0.58316916", "0.5820385", "0.58140445", "0.5781584", "0.5768728", "0.5762586", "0.575339", "0.5746574", "0.57447517", "0.57235205", "0.57052875", "0.57025886", "0.57024664", "0.5699641", "0.5683894", "0.56836367", "0.5661643", "0.5622041", "0.5609266", "0.5580956", "0.5570454", "0.5558468", "0.555719", "0.5551165", "0.55156016", "0.55058795", "0.5498618", "0.5495843", "0.5494873", "0.5493741", "0.5482054", "0.5475159", "0.54747176", "0.54734", "0.54710424", "0.54634905", "0.5462319", "0.5460737", "0.54291147", "0.542008", "0.54142255", "0.53991127", "0.5394118", "0.5393162", "0.5392861", "0.53899974", "0.53874314", "0.53766406", "0.53707373", "0.53703415", "0.5358778", "0.535373", "0.53528434", "0.53445596", "0.53346014", "0.5330165", "0.5329099", "0.5326504", "0.532596", "0.5315724", "0.5307572", "0.5305915", "0.530085", "0.5292268", "0.52787876", "0.52780116", "0.5252526", "0.5246828", "0.52461827", "0.5240986", "0.5240763", "0.5232633", "0.5231117", "0.52285117", "0.52261543", "0.5223118" ]
0.55549675
47
clears all data related to the connection's session and destroys the session
public function CleanSessionData( $entryName ) { if( !isset($_SESSION[SESSION_ENTRY]) ) return; if( isset($_SESSION[SESSION_ENTRY][$entryName]) ) unset($_SESSION[SESSION_ENTRY][$entryName]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearSession(){\n\t\t\n\t\t$this->dm->session->sess_destroy();\n }", "public function clear()\n {\n $this->session->sess_destroy();\n }", "protected function clearSession(): void\n {\n $this->get('session')->clear();\n $session = new Session();\n $session->invalidate();\n }", "public function clear(): void\n {\n $this->session->clear();\n }", "public function unsetSession();", "public function clearAll() {\n $this->startSession();\n $_SESSION = array();\n $this->sessionData = null;\n session_write_close();\n }", "public function clear()\n {\n $this->session = array();\n\n if (array_key_exists($this->namespace, $_SESSION)) {\n unset($_SESSION[$this->namespace]);\n }\n }", "function clear_session()\n\t{\n\t\t$fields = array('institution__institutions'=>'', 'role__jobroles'=>'', 'headline'=>'', 'summary'=>'', 'details'=>'', 'publishstart'=>'', 'publishend'=>'');\n\t\t$this->native_session->delete_all($fields);\n\t}", "public function clear(){\n @session_destroy();\n @session_start();\n }", "private function clear() {\n $_SESSION = array();\n\n // Destroy the session cookie and cookie header\n $sessionCookie = Cookie::loadCookie(session_name());\n $sessionCookie->unset();\n $sessionCookie->delete();\n\n // Clear out other possible values\n if (isset($_GET[session_name()]))\n unset($_GET[session_name()]);\n\n if (isset($_POST[session_name()]))\n unset($_POST[session_name()]);\n }", "function session_clean()\n {\n session_unset();\n }", "protected function cleanup() {\n $this->clearLocalSessionValues();\n }", "public function reset()\n\t{\n\t\tforeach ($_SESSION as $name=>$value)\n\t\t\tunset($_SESSION[$name]);\n\t\t\t\n\t\t$this->reset_db_sessions();\n\t}", "function payswarm_clear_session() {\n // clear existing stored session\n $session = payswarm_get_session();\n if($session !== false) {\n delete_transient('ps_sess_' . $session['id']);\n }\n\n // clear cookie\n payswarm_clear_session_cookie();\n}", "public function CleanSession()\n {\n unset($_SESSION[SESSION_ENTRY]);\n }", "public function destroySession() {}", "function clearConfigSession()\n {\n \t//clear session db info\n\t\t$this->setGeneralSession('db_name', '');\n\t\t$this->setGeneralSession('db_username', '');\n\t\t$this->setGeneralSession('db_password', '');\n\t\t$this->setGeneralSession('status', '');\n }", "public function logout() {\n $s = Session::getInstance();\n $key = $this->sessionId;\n unset($s->$key);\n $this->setAuthed(false);\n }", "public function clear()\n {\n $this->session->delete($this->storeNamespace);\n }", "public function purge()\n {\n $this->_session->purge();\n }", "public static function clear()\n\t{\n\t\tSession::instance()->delete(Message::SESSION_VAR);\n\t}", "public function reset_session() {\n\t\tSession::instance()\n\t\t\t->destroy();\n\t\tSession::$instances = array();\n\t}", "function phpAds_SessionDataDestroy()\n{\n $dal = new MAX_Dal_Admin_Session();\n\n\tglobal $session;\n $dal->deleteSession($_COOKIE['sessionRPID']);\n\n MAX_cookieAdd('sessionRPID', '');\n MAX_cookieFlush();\n\n\tunset($session);\n\tunset($_COOKIE['sessionRPID']);\n}", "public function sessionClear()\n {\n session()->forget('zipcode');\n session()->forget('addr_city');\n session()->forget('addr_area');\n session()->forget('addr_street');\n session()->forget('deliver');\n session()->forget('payment_method');\n session()->forget('invoice_type');\n }", "public static function destroy()\n {\n $_SESSION = [];\n session_destroy();\n }", "function destroySession(){\n\t\t//@session_destroy();\n\t\t//unset($_SESSION);\n\t\t$this->unsetSession('User');\n\t}", "public function destroy()\n {\n $this->session_open();\n $_SESSION = array();\n session_destroy();\n }", "public function destroy(): void\n {\n if (!empty($_SESSION)) {\n $_SESSION = [];\n session_unset();\n session_destroy();\n }\n }", "protected static function unsetSessionData() {\n if (isset(self::$_session)) {\n self::$_session = array();\n } else {\n unset($_SESSION['salesforce_wsdl']);\n unset($_SESSION['salesforce_location']);\n unset($_SESSION['salesforce_sessionId']);\n }\n }", "public static function destroy(){\n unset($_SESSION[self::$appSessionName]);\n }", "public function clear()\n {\n session()->flush();\n }", "public function logout()\n {\n $session = new SessionContainer($this->getStorage()->getNameSpace());\n $session->getManager()->destroy();\n $this->getStorage()->forgetMe();\n\n $storage = $this->getStorage()->read();\n\n if (isset($storage['identity'])) {\n unset($storage['identity']);\n }\n }", "function clear_session()\n{\n\tunset($_SESSION['username']);\n\tunset($_SESSION['session_logged_in']);\n\tunset($_SESSION['profile_id']);\n\tunset($_SESSION['initiated']);\n\tclear_session_permissions();\n}", "public static function destroy()\n {\n session_unset();\n session_destroy();\n }", "function destroy () {\r\n $_SESSION = array();\r\n session_destroy();\r\n }", "function clearSession(){\n\tsession_destroy();\n}", "public function logout()\n {\n $this->user = null;\n $this->synchronize();\n unset($_SESSION);\n }", "protected function clearSessionData()\n {\n $this->_checkoutSession\n ->unsetData('temando_consolidated_packaging')\n ->unsetData('selected_delivery_options')\n ->unsetData('destination_type');\n }", "private function destroySession () : void {\n unset($_SESSION);\n session_destroy();\n }", "public static function destroy(): void\n {\n Session::remove(self::SESSION_KEY);\n }", "public static function destroySession();", "public function delete() {\n $this->logger->debug(\"Deleting session\");\n $this->repository->removeByKey($this->getKeys());\n self::$instance = null;\n }", "function destroySession(){\n\t\tforeach ($_SESSION as $key => $value) {\n\t\t\t$_SESSION[$key] = \"\";\n\t\t}\n\t\tsession_unset();\n\t\tsession_destroy();\n\t}", "public static function clear(): void\n {\n $_SESSION = [];\n }", "static public function clearCurrentSession() {\n\t\t\n\t\t$session = self::getCurrentSession();\n\t\t\n\t\tif (!empty($session)) {\n\t\t\t\n\t\t\tself::deleteSession($session->SSOSessionId);\n\t\t}\n\t}", "public static function clear() {\n\t if(session_status() === PHP_SESSION_ACTIVE) {\n\t session_unset();\n\t }\n\t}", "public function destruir(){\n session_unset(); \n // destroy the session \n session_destroy(); \n }", "function closeConnec() {\r\n unset($_SESSION[\"login\"]) ;\r\n unset($_SESSION[\"pwd\"]) ;\r\n }", "function clearState()\n {\n $this->Session->write($this->sessionVariableName, null);\n }", "public function logout(){\n\t\t\t// remove all session variables\n\t\t\tsession_unset();\n\t\t\t// destroy the session\n\t\t\tsession_destroy(); \n\t\t}", "public function destroy(){\n\t\tsession_unset();\n\t\t$id = $this->getId();\n\t\tif (!empty($id)) {\n\t\t\tsession_destroy();\n\t\t}\n\t}", "public function resetSession() {}", "protected function destroy_all_sessions()\n {\n }", "protected function clearAllPersistentData()\n {\n foreach ($this->_sessionNamespace as $key => $value) {\n unset($this->_sessionNamespace->{$key});\n }\n }", "public static function DestroySession(){\n\t\tself::$_leuser=NULL; \n\t\t//unset(User::$_leuser);\n\t\tunset($_SESSION['user']);\n\t}", "public static function destroy()\r\n {\r\n if (self::isStarted())\r\n {\r\n session_unset();\r\n session_destroy();\r\n }\r\n }", "public static function destroy(): void\n {\n session_destroy();\n }", "public static function destroy(): void\n {\n session_destroy();\n }", "public function destroy() {\n $this->closeSession();\n\n $_SESSION = array();\n\n session_destroy();\n\n // Reset cookies\n setcookie(session_name(), '', time()-3600, Route::getDir());\n }", "static function destroy() {\n\t\tsession_unset();\n\t\tsession_destroy();\n\t\tsession_write_close();\n\t}", "public function reset() {\n foreach ($this->syncedProperties as $property) {\n unset($this->data[$property]);\n }\n\n if (session_id()) {\n unset($_SESSION[self::SESSION_KEY]);\n }\n }", "public static function sessionCleanHandler();", "function cleanSession ()\n{\n\t$_SESSION = array();\n\t\n\t// Finally, destroy the session.\n//\tsession_destroy();\n}", "function destroy()\r\n {\r\n unset($_SESSION[$this->_options['sessionVar']]);\r\n }", "public static function forceClearUserSession()\n {\n global $user;\n $uid = $user->uid;\n error_log(\"About to clear session via forceClearUserSession for user $uid\");\n unset($_SESSION['CREATED']); \n unset($_SESSION[CONST_NM_RAPTOR_CONTEXT]);\n\n $all_literalnames = self::getAllSessionValueNames();\n foreach($all_literalnames as $onename=>$onevalue)\n {\n unset($_SESSION[$onename]);\n }\n error_log(\"Cleared session via forceClearUserSession for user $uid\");\n }", "public function removeSessionData() {}", "public function deleteSession(): void {\n\t\tunset($_SESSION[self::SESSION_NAME]);\n\t}", "function clear() \n\t{\n\t\t//If there is no session to delete (not started)\n\t\tif (session_id() === '') return;\n\n\t\t// Get the session name\n\t\t$name = session_name();\n\n\t\t// Destroy the session\n\t\tsession_destroy();\n\n\t\t// Delete the session cookie (if exists)\n\t\tif (isset($_COOKIE[$name])) \n\t\t{\n\t\t\t//Get the current cookie config\n\t\t\t$params = session_get_cookie_params();\n\n\t\t\t// Delete the cookie from globals\n\t\t\tunset($_COOKIE[$name]);\n\n\t\t\t//Delete the cookie on the user_agent\n\t\t\tsetcookie($name, '', time()-43200, $params['path'], $params['domain'], $params['secure']);\n\t\t}\n\t}", "public static function clear() {\n FPCAuthentication_Result::startSession();\n unset($_SESSION[self::FPC_LOGIN_RESULT_KEY]);\n }", "public function destory()\n\t{\n\t\t$key = $this->getKey();\n\t\tif ( isset($_SESSION[$key]) ) unset($_SESSION[$key], $key);\n\t}", "public static function unsetAllSessionOnSite() {\n session_unset();\n session_destroy();\n }", "public function logout()\n {\n $this->deleteAllPersistentData();\n $this->accessToken = null;\n $this->user = null;\n $this->idToken = null;\n $this->refreshToken = null;\n }", "public static function drop_sessions()\n {\n }", "public static function drop_sessions()\n {\n }", "function clear(){\r\n\t\t$_SESSION[self::_KEY_][get_class($this)]->reset();\r\n\t}", "public function logout()\n\t{\n\t\t$this->user = null;\n\n\t\t$this->session->forget(static::$key);\n\t}", "protected abstract function destroy_all_sessions();", "public static function clearSession(){\n\t\t$params = session_get_cookie_params();\n\t\tsetcookie(session_name(), '', time() - 42000,\n\t\t\t$params[\"path\"], $params[\"domain\"],\n\t\t\t$params[\"secure\"], $params[\"httponly\"]\n\t\t);\n\t\tsession_destroy();\n\t\tsession_write_close();\n\t}", "public function destroy()\n {\n session_destroy();\n }", "function destroySessionData() {\n\t\tglobal $TSFE;\n\n\t\t$TSFE->fe_user->setKey ('ses', 'tx_frontendformslib', '');\n\t\tunset ($this->sessionData);\n\t}", "public function logout()\n {\n $this->deleteSession();\n }", "public function destroy()\n\t{\n\t\tif (!session_id())\n\t\t\tsession_start();\n\n\t\t$_SESSION = array();\n\t\tsession_destroy();\n\t}", "public function logoutxxx()\n {\n $this->getSession()->destroy();\n }", "public function destroy() {\n\t\t\t$this->session->unset('user');\n\t\t}", "public static function destroy() {\t\t\t\n\t\t\tself::start();\n\t\t\tsession_regenerate_id(true); \n\t\t\t\n\t\t\tunset($_SESSION);\n\t\t\tsession_destroy();\n\t\t}", "public function logout() {\r\n\t\tSession::delete($this->_sessionName);\r\n\t}", "public static function destroy_all()\n\t{\n\t\t$_SESSION['Session_Master'] = array();\n\t}", "public static function logout()\n {\n foreach ($_SESSION as $key => $value) {\n unset($_SESSION[$key]);\n }\n session_destroy();\n }", "public function logout()\n {\n session_unset();\n // deletes session file\n session_destroy();\n }", "public static function destroy()\n {\n if(!isset($_SESSION)){\n session_start();\n }\n session_destroy();\n }", "public function logout(){\n session_destroy();\n unset($_SESSION);\n }", "public function cleanup(){\n\t\n\t\t$this->_p->user->setSessionVal($this->_session_var_name);\n\t\n\t}", "public function forgetSession()\n\t{\n\t\tif (isset($_SESSION[$this->getKey()]))\n\t\t{\n\t\t\tunset($_SESSION[$this->getKey()]);\n\t\t}\n\t}", "public function destroy()\n {\n $_SESSION = [];\n setcookie(session_name(), '', 1);\n unset($_COOKIE[session_name()]);\n @session_destroy();\n }", "public function logout(){\n\t\t$_SESSION['ip'] = '';\n\t\t$_SESSION['username'] = '';\n\t\t$_SESSION['uid'] = '';\n\t\tsession_destroy();\n\t}", "public function clear_session_data() {\n\n\t\tunset( WC()->session->wc_braintree_paypal_cart_nonce );\n\t\tunset( WC()->session->wc_braintree_paypal_cart_customer_details );\n\t}", "function sess_destroy ()\n {\n if (isset($_COOKIE[session_name()])) {\n setcookie(session_name(), '', (time()-42000), '/');\n }\n\n //Destroy the Session Array\n $_SESSION = array();\n\n //Destroy the userdata array - in case any further calls after the destory session is called, \"stale\" information is not called upon.\n $this->userdata = array();\n\n //Complete the session destory process by calling PHP's native session_destroy() function\n session_destroy();\n }", "public static function destroy() {\n if ('' !== session_id()) {\n $_SESSION = array();\n // If it's desired to kill the session, also delete the session cookie.\n // Note: This will destroy the session, and not just the session data!\n if (ini_get(\"session.use_cookies\")) {\n $params = session_get_cookie_params();\n setcookie(session_name(), '', time() - 42000,\n $params[\"path\"], $params[\"domain\"],\n $params[\"secure\"], $params[\"httponly\"]\n );\n }\n session_destroy();\n }\n }", "public function logout(){\n session_unset();\n session_destroy();\n }", "function session_clear() {\n $exists = \"no\";\n $session_array = explode(\";\",session_encode());\n for ($x = 0; $x < count($session_array); $x++) {\n $name = substr($session_array[$x], 0, strpos($session_array[$x],\"|\")); \n\tif (session_is_registered($name)) {\n\t session_unregister($name);\n\t $exists = \"yes\";\n\t}\n }\n if ($exists != \"no\") {\n session_destroy();\n }\n}", "public function logout(){\n session_destroy();\n unset($_SESSION['user_session']);\n }" ]
[ "0.7940723", "0.7830903", "0.77556956", "0.77317315", "0.7730335", "0.7672953", "0.7653887", "0.7651752", "0.7562362", "0.7547149", "0.7489306", "0.74696475", "0.7466457", "0.74663126", "0.7446474", "0.7369593", "0.73605573", "0.7349785", "0.7326132", "0.7296969", "0.72937334", "0.7270888", "0.7257256", "0.7243075", "0.7242217", "0.7221308", "0.7214915", "0.7211488", "0.72077644", "0.71995676", "0.71932065", "0.71833473", "0.71752", "0.71745276", "0.7169602", "0.71652114", "0.7155867", "0.7152941", "0.7150272", "0.7146726", "0.7140369", "0.7139639", "0.713121", "0.7116522", "0.7114259", "0.7108415", "0.7103541", "0.70942986", "0.70918065", "0.7088685", "0.7071885", "0.7068038", "0.70551527", "0.70416754", "0.70305485", "0.70207757", "0.70206594", "0.70206594", "0.7005188", "0.7001912", "0.6997027", "0.69966614", "0.698696", "0.6983925", "0.6980949", "0.6977079", "0.69744307", "0.6972293", "0.69680876", "0.69666034", "0.6961343", "0.69478315", "0.6940244", "0.693997", "0.69312984", "0.69295895", "0.69272393", "0.69267213", "0.69246507", "0.6924198", "0.691273", "0.69011766", "0.68968445", "0.6894441", "0.6885186", "0.6884325", "0.6877512", "0.687422", "0.6873199", "0.6867196", "0.68641573", "0.68615705", "0.68557185", "0.68531066", "0.68499285", "0.6847324", "0.6846012", "0.68421805", "0.6840385", "0.68403774", "0.68401295" ]
0.0
-1
clears all data related to the connection's session and destroys the session
public function CleanSession() { unset($_SESSION[SESSION_ENTRY]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearSession(){\n\t\t\n\t\t$this->dm->session->sess_destroy();\n }", "public function clear()\n {\n $this->session->sess_destroy();\n }", "protected function clearSession(): void\n {\n $this->get('session')->clear();\n $session = new Session();\n $session->invalidate();\n }", "public function clear(): void\n {\n $this->session->clear();\n }", "public function unsetSession();", "public function clearAll() {\n $this->startSession();\n $_SESSION = array();\n $this->sessionData = null;\n session_write_close();\n }", "public function clear()\n {\n $this->session = array();\n\n if (array_key_exists($this->namespace, $_SESSION)) {\n unset($_SESSION[$this->namespace]);\n }\n }", "function clear_session()\n\t{\n\t\t$fields = array('institution__institutions'=>'', 'role__jobroles'=>'', 'headline'=>'', 'summary'=>'', 'details'=>'', 'publishstart'=>'', 'publishend'=>'');\n\t\t$this->native_session->delete_all($fields);\n\t}", "public function clear(){\n @session_destroy();\n @session_start();\n }", "private function clear() {\n $_SESSION = array();\n\n // Destroy the session cookie and cookie header\n $sessionCookie = Cookie::loadCookie(session_name());\n $sessionCookie->unset();\n $sessionCookie->delete();\n\n // Clear out other possible values\n if (isset($_GET[session_name()]))\n unset($_GET[session_name()]);\n\n if (isset($_POST[session_name()]))\n unset($_POST[session_name()]);\n }", "function session_clean()\n {\n session_unset();\n }", "protected function cleanup() {\n $this->clearLocalSessionValues();\n }", "public function reset()\n\t{\n\t\tforeach ($_SESSION as $name=>$value)\n\t\t\tunset($_SESSION[$name]);\n\t\t\t\n\t\t$this->reset_db_sessions();\n\t}", "function payswarm_clear_session() {\n // clear existing stored session\n $session = payswarm_get_session();\n if($session !== false) {\n delete_transient('ps_sess_' . $session['id']);\n }\n\n // clear cookie\n payswarm_clear_session_cookie();\n}", "public function destroySession() {}", "function clearConfigSession()\n {\n \t//clear session db info\n\t\t$this->setGeneralSession('db_name', '');\n\t\t$this->setGeneralSession('db_username', '');\n\t\t$this->setGeneralSession('db_password', '');\n\t\t$this->setGeneralSession('status', '');\n }", "public function logout() {\n $s = Session::getInstance();\n $key = $this->sessionId;\n unset($s->$key);\n $this->setAuthed(false);\n }", "public function clear()\n {\n $this->session->delete($this->storeNamespace);\n }", "public function purge()\n {\n $this->_session->purge();\n }", "public static function clear()\n\t{\n\t\tSession::instance()->delete(Message::SESSION_VAR);\n\t}", "public function reset_session() {\n\t\tSession::instance()\n\t\t\t->destroy();\n\t\tSession::$instances = array();\n\t}", "function phpAds_SessionDataDestroy()\n{\n $dal = new MAX_Dal_Admin_Session();\n\n\tglobal $session;\n $dal->deleteSession($_COOKIE['sessionRPID']);\n\n MAX_cookieAdd('sessionRPID', '');\n MAX_cookieFlush();\n\n\tunset($session);\n\tunset($_COOKIE['sessionRPID']);\n}", "public function sessionClear()\n {\n session()->forget('zipcode');\n session()->forget('addr_city');\n session()->forget('addr_area');\n session()->forget('addr_street');\n session()->forget('deliver');\n session()->forget('payment_method');\n session()->forget('invoice_type');\n }", "public static function destroy()\n {\n $_SESSION = [];\n session_destroy();\n }", "function destroySession(){\n\t\t//@session_destroy();\n\t\t//unset($_SESSION);\n\t\t$this->unsetSession('User');\n\t}", "public function destroy()\n {\n $this->session_open();\n $_SESSION = array();\n session_destroy();\n }", "public function destroy(): void\n {\n if (!empty($_SESSION)) {\n $_SESSION = [];\n session_unset();\n session_destroy();\n }\n }", "protected static function unsetSessionData() {\n if (isset(self::$_session)) {\n self::$_session = array();\n } else {\n unset($_SESSION['salesforce_wsdl']);\n unset($_SESSION['salesforce_location']);\n unset($_SESSION['salesforce_sessionId']);\n }\n }", "public static function destroy(){\n unset($_SESSION[self::$appSessionName]);\n }", "public function clear()\n {\n session()->flush();\n }", "public function logout()\n {\n $session = new SessionContainer($this->getStorage()->getNameSpace());\n $session->getManager()->destroy();\n $this->getStorage()->forgetMe();\n\n $storage = $this->getStorage()->read();\n\n if (isset($storage['identity'])) {\n unset($storage['identity']);\n }\n }", "function clear_session()\n{\n\tunset($_SESSION['username']);\n\tunset($_SESSION['session_logged_in']);\n\tunset($_SESSION['profile_id']);\n\tunset($_SESSION['initiated']);\n\tclear_session_permissions();\n}", "public static function destroy()\n {\n session_unset();\n session_destroy();\n }", "function destroy () {\r\n $_SESSION = array();\r\n session_destroy();\r\n }", "function clearSession(){\n\tsession_destroy();\n}", "public function logout()\n {\n $this->user = null;\n $this->synchronize();\n unset($_SESSION);\n }", "protected function clearSessionData()\n {\n $this->_checkoutSession\n ->unsetData('temando_consolidated_packaging')\n ->unsetData('selected_delivery_options')\n ->unsetData('destination_type');\n }", "private function destroySession () : void {\n unset($_SESSION);\n session_destroy();\n }", "public static function destroy(): void\n {\n Session::remove(self::SESSION_KEY);\n }", "public static function destroySession();", "public function delete() {\n $this->logger->debug(\"Deleting session\");\n $this->repository->removeByKey($this->getKeys());\n self::$instance = null;\n }", "function destroySession(){\n\t\tforeach ($_SESSION as $key => $value) {\n\t\t\t$_SESSION[$key] = \"\";\n\t\t}\n\t\tsession_unset();\n\t\tsession_destroy();\n\t}", "public static function clear(): void\n {\n $_SESSION = [];\n }", "static public function clearCurrentSession() {\n\t\t\n\t\t$session = self::getCurrentSession();\n\t\t\n\t\tif (!empty($session)) {\n\t\t\t\n\t\t\tself::deleteSession($session->SSOSessionId);\n\t\t}\n\t}", "public static function clear() {\n\t if(session_status() === PHP_SESSION_ACTIVE) {\n\t session_unset();\n\t }\n\t}", "public function destruir(){\n session_unset(); \n // destroy the session \n session_destroy(); \n }", "function closeConnec() {\r\n unset($_SESSION[\"login\"]) ;\r\n unset($_SESSION[\"pwd\"]) ;\r\n }", "function clearState()\n {\n $this->Session->write($this->sessionVariableName, null);\n }", "public function logout(){\n\t\t\t// remove all session variables\n\t\t\tsession_unset();\n\t\t\t// destroy the session\n\t\t\tsession_destroy(); \n\t\t}", "public function destroy(){\n\t\tsession_unset();\n\t\t$id = $this->getId();\n\t\tif (!empty($id)) {\n\t\t\tsession_destroy();\n\t\t}\n\t}", "public function resetSession() {}", "protected function destroy_all_sessions()\n {\n }", "protected function clearAllPersistentData()\n {\n foreach ($this->_sessionNamespace as $key => $value) {\n unset($this->_sessionNamespace->{$key});\n }\n }", "public static function DestroySession(){\n\t\tself::$_leuser=NULL; \n\t\t//unset(User::$_leuser);\n\t\tunset($_SESSION['user']);\n\t}", "public static function destroy()\r\n {\r\n if (self::isStarted())\r\n {\r\n session_unset();\r\n session_destroy();\r\n }\r\n }", "public static function destroy(): void\n {\n session_destroy();\n }", "public static function destroy(): void\n {\n session_destroy();\n }", "public function destroy() {\n $this->closeSession();\n\n $_SESSION = array();\n\n session_destroy();\n\n // Reset cookies\n setcookie(session_name(), '', time()-3600, Route::getDir());\n }", "static function destroy() {\n\t\tsession_unset();\n\t\tsession_destroy();\n\t\tsession_write_close();\n\t}", "public function reset() {\n foreach ($this->syncedProperties as $property) {\n unset($this->data[$property]);\n }\n\n if (session_id()) {\n unset($_SESSION[self::SESSION_KEY]);\n }\n }", "public static function sessionCleanHandler();", "function cleanSession ()\n{\n\t$_SESSION = array();\n\t\n\t// Finally, destroy the session.\n//\tsession_destroy();\n}", "function destroy()\r\n {\r\n unset($_SESSION[$this->_options['sessionVar']]);\r\n }", "public static function forceClearUserSession()\n {\n global $user;\n $uid = $user->uid;\n error_log(\"About to clear session via forceClearUserSession for user $uid\");\n unset($_SESSION['CREATED']); \n unset($_SESSION[CONST_NM_RAPTOR_CONTEXT]);\n\n $all_literalnames = self::getAllSessionValueNames();\n foreach($all_literalnames as $onename=>$onevalue)\n {\n unset($_SESSION[$onename]);\n }\n error_log(\"Cleared session via forceClearUserSession for user $uid\");\n }", "public function removeSessionData() {}", "public function deleteSession(): void {\n\t\tunset($_SESSION[self::SESSION_NAME]);\n\t}", "function clear() \n\t{\n\t\t//If there is no session to delete (not started)\n\t\tif (session_id() === '') return;\n\n\t\t// Get the session name\n\t\t$name = session_name();\n\n\t\t// Destroy the session\n\t\tsession_destroy();\n\n\t\t// Delete the session cookie (if exists)\n\t\tif (isset($_COOKIE[$name])) \n\t\t{\n\t\t\t//Get the current cookie config\n\t\t\t$params = session_get_cookie_params();\n\n\t\t\t// Delete the cookie from globals\n\t\t\tunset($_COOKIE[$name]);\n\n\t\t\t//Delete the cookie on the user_agent\n\t\t\tsetcookie($name, '', time()-43200, $params['path'], $params['domain'], $params['secure']);\n\t\t}\n\t}", "public static function clear() {\n FPCAuthentication_Result::startSession();\n unset($_SESSION[self::FPC_LOGIN_RESULT_KEY]);\n }", "public function destory()\n\t{\n\t\t$key = $this->getKey();\n\t\tif ( isset($_SESSION[$key]) ) unset($_SESSION[$key], $key);\n\t}", "public static function unsetAllSessionOnSite() {\n session_unset();\n session_destroy();\n }", "public function logout()\n {\n $this->deleteAllPersistentData();\n $this->accessToken = null;\n $this->user = null;\n $this->idToken = null;\n $this->refreshToken = null;\n }", "public static function drop_sessions()\n {\n }", "public static function drop_sessions()\n {\n }", "function clear(){\r\n\t\t$_SESSION[self::_KEY_][get_class($this)]->reset();\r\n\t}", "public function logout()\n\t{\n\t\t$this->user = null;\n\n\t\t$this->session->forget(static::$key);\n\t}", "protected abstract function destroy_all_sessions();", "public static function clearSession(){\n\t\t$params = session_get_cookie_params();\n\t\tsetcookie(session_name(), '', time() - 42000,\n\t\t\t$params[\"path\"], $params[\"domain\"],\n\t\t\t$params[\"secure\"], $params[\"httponly\"]\n\t\t);\n\t\tsession_destroy();\n\t\tsession_write_close();\n\t}", "public function destroy()\n {\n session_destroy();\n }", "function destroySessionData() {\n\t\tglobal $TSFE;\n\n\t\t$TSFE->fe_user->setKey ('ses', 'tx_frontendformslib', '');\n\t\tunset ($this->sessionData);\n\t}", "public function logout()\n {\n $this->deleteSession();\n }", "public function destroy()\n\t{\n\t\tif (!session_id())\n\t\t\tsession_start();\n\n\t\t$_SESSION = array();\n\t\tsession_destroy();\n\t}", "public function logoutxxx()\n {\n $this->getSession()->destroy();\n }", "public function destroy() {\n\t\t\t$this->session->unset('user');\n\t\t}", "public static function destroy() {\t\t\t\n\t\t\tself::start();\n\t\t\tsession_regenerate_id(true); \n\t\t\t\n\t\t\tunset($_SESSION);\n\t\t\tsession_destroy();\n\t\t}", "public function logout() {\r\n\t\tSession::delete($this->_sessionName);\r\n\t}", "public static function destroy_all()\n\t{\n\t\t$_SESSION['Session_Master'] = array();\n\t}", "public static function logout()\n {\n foreach ($_SESSION as $key => $value) {\n unset($_SESSION[$key]);\n }\n session_destroy();\n }", "public function logout()\n {\n session_unset();\n // deletes session file\n session_destroy();\n }", "public static function destroy()\n {\n if(!isset($_SESSION)){\n session_start();\n }\n session_destroy();\n }", "public function logout(){\n session_destroy();\n unset($_SESSION);\n }", "public function cleanup(){\n\t\n\t\t$this->_p->user->setSessionVal($this->_session_var_name);\n\t\n\t}", "public function forgetSession()\n\t{\n\t\tif (isset($_SESSION[$this->getKey()]))\n\t\t{\n\t\t\tunset($_SESSION[$this->getKey()]);\n\t\t}\n\t}", "public function destroy()\n {\n $_SESSION = [];\n setcookie(session_name(), '', 1);\n unset($_COOKIE[session_name()]);\n @session_destroy();\n }", "public function logout(){\n\t\t$_SESSION['ip'] = '';\n\t\t$_SESSION['username'] = '';\n\t\t$_SESSION['uid'] = '';\n\t\tsession_destroy();\n\t}", "public function clear_session_data() {\n\n\t\tunset( WC()->session->wc_braintree_paypal_cart_nonce );\n\t\tunset( WC()->session->wc_braintree_paypal_cart_customer_details );\n\t}", "function sess_destroy ()\n {\n if (isset($_COOKIE[session_name()])) {\n setcookie(session_name(), '', (time()-42000), '/');\n }\n\n //Destroy the Session Array\n $_SESSION = array();\n\n //Destroy the userdata array - in case any further calls after the destory session is called, \"stale\" information is not called upon.\n $this->userdata = array();\n\n //Complete the session destory process by calling PHP's native session_destroy() function\n session_destroy();\n }", "public static function destroy() {\n if ('' !== session_id()) {\n $_SESSION = array();\n // If it's desired to kill the session, also delete the session cookie.\n // Note: This will destroy the session, and not just the session data!\n if (ini_get(\"session.use_cookies\")) {\n $params = session_get_cookie_params();\n setcookie(session_name(), '', time() - 42000,\n $params[\"path\"], $params[\"domain\"],\n $params[\"secure\"], $params[\"httponly\"]\n );\n }\n session_destroy();\n }\n }", "public function logout(){\n session_unset();\n session_destroy();\n }", "function session_clear() {\n $exists = \"no\";\n $session_array = explode(\";\",session_encode());\n for ($x = 0; $x < count($session_array); $x++) {\n $name = substr($session_array[$x], 0, strpos($session_array[$x],\"|\")); \n\tif (session_is_registered($name)) {\n\t session_unregister($name);\n\t $exists = \"yes\";\n\t}\n }\n if ($exists != \"no\") {\n session_destroy();\n }\n}", "public function logout(){\n session_destroy();\n unset($_SESSION['user_session']);\n }" ]
[ "0.7940723", "0.7830903", "0.77556956", "0.77317315", "0.7730335", "0.7672953", "0.7653887", "0.7651752", "0.7562362", "0.7547149", "0.7489306", "0.74696475", "0.7466457", "0.74663126", "0.7369593", "0.73605573", "0.7349785", "0.7326132", "0.7296969", "0.72937334", "0.7270888", "0.7257256", "0.7243075", "0.7242217", "0.7221308", "0.7214915", "0.7211488", "0.72077644", "0.71995676", "0.71932065", "0.71833473", "0.71752", "0.71745276", "0.7169602", "0.71652114", "0.7155867", "0.7152941", "0.7150272", "0.7146726", "0.7140369", "0.7139639", "0.713121", "0.7116522", "0.7114259", "0.7108415", "0.7103541", "0.70942986", "0.70918065", "0.7088685", "0.7071885", "0.7068038", "0.70551527", "0.70416754", "0.70305485", "0.70207757", "0.70206594", "0.70206594", "0.7005188", "0.7001912", "0.6997027", "0.69966614", "0.698696", "0.6983925", "0.6980949", "0.6977079", "0.69744307", "0.6972293", "0.69680876", "0.69666034", "0.6961343", "0.69478315", "0.6940244", "0.693997", "0.69312984", "0.69295895", "0.69272393", "0.69267213", "0.69246507", "0.6924198", "0.691273", "0.69011766", "0.68968445", "0.6894441", "0.6885186", "0.6884325", "0.6877512", "0.687422", "0.6873199", "0.6867196", "0.68641573", "0.68615705", "0.68557185", "0.68531066", "0.68499285", "0.6847324", "0.6846012", "0.68421805", "0.6840385", "0.68403774", "0.68401295" ]
0.7446474
14
Widget para el filtro de nombres
public function configure() { // $this->widgetSchema['rut'] = new sfWidgetFormFilterInput(array('with_empty' => false)); // $this->validatorSchema['rut'] = new sfValidatorPass(array('required' => false)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filters() {\n\t\treturn array(\n\t\t 'name' => array(array('trim')),\n\t\t);\n\t}", "private static function _getFilter() {}", "public function filters()\n {\n return [\n 'name' => 'trim|capitalize|escape'\n ];\n }", "function iniciarFiltro(&$filtro) {\n\n if (isset($_GET['order']))\n $filtro->order($_GET['order']);\n $filtro->nombres[] = 'Nombre';\n $filtro->valores[] = array('input', 'nombre', $filtro->filtro('nombre'));\n $filtro->nombres[] = 'Descripci&oacute;n';\n $filtro->valores[] = array('input', 'descripcion', $filtro->filtro('descripcion'));\n }", "abstract public function getFilterName();", "function filter($request) {\n\t\t//$model = singleton($this->modelClass);\n\t\t$context = $this->dataObject->getDefaultSearchContext();\n\t\t$value = $request->getVar('q');\n\t\t$results = $context->getResults(array(\"Name\"=>$value));\n\t\theader(\"Content-Type: text/plain\");\n\t\tforeach($results as $result) {\n\t\t\techo $result->Name . \"\\n\";\n\t\t}\t\t\n\t}", "public function filtering(): string;", "public function getInputFilter();", "public function getFilter(): string;", "abstract protected function filterField(): string;", "public function filters()\n {\n return [\n 'team_name' => 'trim|escape'\n ];\n }", "public function filtrar(&$filtro)\n {\n parent::filtrar($filtro);\n $filtro_sql = '';\n if ($filtro->filtro('id'))\n $filtro_sql .= \" AND {$this->getTableName()}.id like '%{$filtro->filtro('id')}%' \";\n if ($filtro->filtro('nombre'))\n $filtro_sql .= \" AND {$this->getTableName()}.nombre like '%{$filtro->filtro('nombre')}%' \";\n if ($filtro->filtro('descripcion'))\n $filtro_sql .= \" AND {$this->getTableName()}.descripcion like '%{$filtro->filtro('descripcion')}%' \";\n return $filtro_sql;\n }", "private function filterTerm()\n {\n if(empty($this->term)) {\n return;\n }\n\n $this->query->andWhere(\n ['or',\n ['LIKE', 'message', $this->term],\n ['LIKE', 'category', $this->term],\n ]\n );\n }", "public function filtering();", "public function filters() {\n\t\treturn array(\n\t\t TRUE => array(array('trim')),\n\t\t);\n\t}", "public function getFilterInput();", "public function filter($input);", "public static function getFilterList()\n {\n return ['nospaces'];\n }", "public function buildFilters()\n {\n $this->addFilter('name', new ORM\\StringFilterType('name'), 'kuma_menu.menu.adminlist.filter.name');\n }", "public function filter();", "function filtrele($isim){\n return $isim . \" \" . 'Bayrak';\n }", "public function getFilterName()\n {\n return $this->_('NOT ANY (XOR) combination filter');\n }", "function f_filtro($cadena)\n {\n return $this->conexion->real_escape_string($cadena);\n }", "private function arreglarFiltro($fil) {\n if ($fil == 'S' || $fil == 's') {\n $fil = 'S';\n } elseif ($fil == 'N' || $fil == 'n') {\n $fil = 'N';\n } else {\n $fil = '';\n }\n return $fil;\n }", "function filterName($field) {\n // Limpiar el nombre del usuario\n $sanitizeField = filter_var(trim($field), FILTER_SANITIZE_STRING);\n\n // Validate user name\n if (filter_var($sanitizeField, FILTER_VALIDATE_REGEXP, array(\"options\" => array(\"regexp\" => \"/^[a-zA-Z\\s]+$/\")))) {\n return $sanitizeField;\n } else {\n return false;\n }\n}", "function build_html_filter($clase, $filtro, $nombre, $valor = SIN_FILTRO){\n $f = '';\n $f .= \"<label for='filters[$filtro]'>\n $nombre</label>&nbsp;\n <select name='filters[$filtro]' onchange='this.parentNode.submit()'>\";\n\n $f.= \"<option value='\".SIN_FILTRO.\"'>--</option>\\n\";\n// <option value='0'>-- Sin $nombre --</option>\\n\";\n\n $instancias = $clase::find('all'); // TODO sustituir por index($filtros)\n // usort TODO\n usort($instancias, function($a, $b){\n return $a->_name > $b->_name;\n });\n foreach ($instancias as $i){\n $selected = '';\n\n if ($valor == $i->id){\n $selected = ' selected=\"selected\"';\n }\n\n $f.= \"<option value='\".$i->id.\"' $selected>\". $i->_name.'</option>';\n }\n $f.= \"</select>\\n\";\n return $f;\n}", "abstract public function filters();", "public function getInputFilter()\n {\n if (!$this->inputFilter) {\n $this->inputFilter = new InputFilter();\n\n $this->inputFilter->add(\n [\n 'name' => 'slug',\n 'required' => 'true',\n 'filters' => [\n ['name' => 'StringTrim'],\n ],\n 'validators' => [\n [\n 'name' => 'Regex',\n 'options' => [\n 'pattern' => '/^[a-z0-9-]+$/'\n ]\n ],\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 3,\n 'max' => 64\n ]\n ]\n ]\n ]\n );\n\n $this->inputFilter->add(\n [\n 'name' => 'title',\n 'required' => true,\n 'filters' => [\n [\n 'name' => 'StringTrim',\n 'name' => 'StripTags',\n ]\n ],\n 'validators' => [\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 3,\n 'max' => 64\n ]\n ]\n ]\n ]\n );\n\n $this->inputFilter->add(\n [\n 'name' => 'views',\n 'required' => false\n ]\n );\n\n $this->inputFilter->add(\n [\n 'name' => 'preview',\n 'required' => true,\n ]\n );\n\n $this->inputFilter->add(\n [\n 'name' => 'body',\n 'required' => true,\n ]\n );\n }\n\n return $this->inputFilter;\n }", "public function getFilterValue(): string;", "function play_filter( $id_field, $value = FALSE, $label = FALSE, $field_prefix = FALSE, $other_after = '', $other_before = '', $field_special = FALSE ) {\n\n\t\treturn '';\n\t}", "function ssSearchRegexFilter( $where ) {\n if( !empty( $this->ss_input_post_title ) ) {\n $where .= \" AND wp_posts.post_title != '\" . $this->ss_input_post_title_origin . \"' AND wp_posts.post_title REGEXP '.[[:<:]]\" . implode( '[[:>:]]|.[[:<:]]', $this->ss_input_post_title ) . \"[[:>:]]' \"; \n }\n\n return $where;\n }", "public function addTextFilter()\n\t{\n\t\t$this->_addFilter(new DataGrid\\Filters\\TextFilter());\n\t\treturn $this->getFilter();\n\t}", "function FilterTitle($text) {\n\t\t\treturn ucfirst(trim($text));\n\t\t}", "public static function getFiltername(): string\n {\n return self::FILTERNAME;\n }", "public function getFilter();", "public function getFilter();", "function filterName($field){\n // Sanitize user name\n $field = filter_var(trim($field), FILTER_SANITIZE_STRING);\n\n // Validate user name\n if(filter_var($field, FILTER_VALIDATE_REGEXP, array(\"options\"=>array(\"regexp\"=>\"/^[a-zA-Z\\s]+/\")))){\n return $field;\n }else{\n return FALSE;\n }\n}", "protected function scanFilter()\n {\n return $this->scanInput('/^:(\\w+)/', 'filter');\n }", "public function getInputFor($nome);", "private function addInputFilter() \n {\n // Create main input filter\n \n //$inputFilter = new InputFilter(); \n \n $inputFilter = $this->getInputFilter(); \n $this->setInputFilter($inputFilter);\n \n // Add input for \"usuario\" field\n $inputFilter->add([\n 'name' => 'nombre',\n 'required' => true,\n 'filters' => [ \n ['name' => 'StringTrim'],\n ], \n 'validators' => [\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 1,\n 'max' => 512\n ],\n ],\n ],\n ]);\n \n // Add input for \"telefono\" field\n $inputFilter->add([\n 'name' => 'telefono',\n 'required' => false,\n 'filters' => [ \n ['name' => 'StringTrim'],\n ], \n 'validators' => [\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 1,\n 'max' => 512\n ],\n ],\n ],\n ]);\n \n // Add input for \"email\" field\n $inputFilter->add([\n 'name' => 'email',\n 'required' => false,\n 'filters' => [ \n ['name' => 'StringTrim'],\n ], \n 'validators' => [\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 1,\n 'max' => 512\n ],\n ],\n ],\n ]);\n \n // Add input for \"email\" field\n $inputFilter->add([\n 'name' => 'skype',\n 'required' => false,\n 'filters' => [ \n ['name' => 'StringTrim'],\n ], \n 'validators' => [\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 1,\n 'max' => 512\n ],\n ],\n ],\n ]);\n \n }", "function LocalidadFilter( $Filter )\n {\n if( !empty($Filter->Loc) ) \n {\n $Loc = $Filter->Loc;\n return 'AND pLoc=\"'.$Loc.'\" ';\n }\n \n if( isset( $Filter->Prov ) ) \n return 'AND pProv='.$Filter->Prov.' ';\n\n return ''; \n }", "abstract protected function filterFieldvalue();", "public function getInputFilter()\n\t{\n\t\tif (!$this->inputFilter) {\n\t\t\t$inputFilter = new InputFilter();\n\t\t\t$factory = new InputFactory();\n\t\n\t\t\t$inputFilter->add($factory->createInput(array(\n\t\t\t\t'name' => 'description',\n\t\t\t\t'required' => true,\n\t\t\t\t'filters' => array(\n\t\t\t\t\tarray('name' => 'StripTags'),\n\t\t\t\t\tarray('name' => 'StringTrim'),\n\t\t\t\t),\n\t\t\t)));\n\t\n\t\t\t$this->inputFilter = $inputFilter;\n\t\t}\n\t\n\t\treturn $this->inputFilter;\n\t}", "public function getFilter(string $name);", "public function getClientByNameOrSurnameOrDni() {\n $term = Request::input('term', '');\n $results = array();\n $queries = User::where('role_id', 6)\n ->where(function($query) use ($term){\n $query->where('name', 'LIKE', '%'.$term.'%');\n $query->orWhere('surname', 'LIKE', '%'.$term.'%');\n $query->orWhere('dni', 'LIKE', '%'.$term.'%');\n })\n ->take(10)->get();\n foreach ($queries as $query)\n $results[] = ['id' => $query->id,\n 'value' => $query->fullname().' ['.$query->dni.']'];\n return response()->json($results);\n }", "public function getSearchText();", "public function nome($nome = '')\n\t{\n\t\treturn $this->builder->where('nome', 'like', \"%$nome%\");\n\t}", "public function nombre_filtro($id){\n\t\treturn Filtro::where('id', $id)->select('nombre')->get();\n\t}", "public function getInputFilter() {\r\n if (!$this->_inputFilter) {\r\n $inputFilter = new InputFilter();\r\n\r\n $factory = new InputFactory();\r\n\r\n $inputFilter->add($factory->createInput(array(\r\n 'name' => 'id',\r\n 'required' => true,\r\n 'filters' => array(\r\n array('name' => 'Int'),\r\n ),\r\n )));\r\n\r\n $inputFilter->add($factory->createInput(array(\r\n 'name' => 'artist',\r\n 'required' => true,\r\n 'filters' => array(\r\n array('name' => 'StripTags'),\r\n array('name' => 'StringTrim'),\r\n ),\r\n 'validators' => array(\r\n array(\r\n 'name' => 'StringLength',\r\n 'options' => array(\r\n 'encoding' => 'UTF-8',\r\n 'min' => 1,\r\n 'max' => 100,\r\n ),\r\n ),\r\n ),\r\n )));\r\n\r\n $inputFilter->add($factory->createInput(array(\r\n 'name' => 'title',\r\n 'required' => true,\r\n 'filters' => array(\r\n array('name' => 'StripTags'),\r\n array('name' => 'StringTrim'),\r\n ),\r\n 'validators' => array(\r\n array(\r\n 'name' => 'StringLength',\r\n 'options' => array(\r\n 'encoding' => 'UTF-8',\r\n 'min' => 1,\r\n 'max' => 100,\r\n ),\r\n ),\r\n ),\r\n )));\r\n\r\n $this->_inputFilter = $inputFilter;\r\n }\r\n \r\n return $this->_inputFilter;\r\n }", "public function getInputFilter()\n {\n if (!$this->inputFilter){\n $inputFilter = new InputFilter();\n $factory = new InputFactory();\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'id',\n 'required' => true,\n 'filters' => array(\n array('name' => 'Int')\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'ano',\n 'required' => true,\n 'filters' => array(\n array('name' => 'Int')\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'andamento',\n 'required' => false,\n 'filters' => array(\n array('name' => 'Int')\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'ativo',\n 'required' => false,\n 'filters' => array(\n array('name' => 'Int')\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'turmasPorAno',\n 'required' => false,\n 'filters' => array(\n array('name' => 'Int')\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'escola',\n 'required' => true,\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'anoLetivoModulos',\n 'required' => true,\n 'validators' => array(\n array(\n //'name' => new \\Escola\\Validator\\AnoLetivoModulo(),\n 'name' => 'Escola\\Validator\\AnoLetivoModulo',\n// 'options' => array(\n// 'messages' => array(\n// //'dataInicioEmpty' => 'teste'\n// )\n// )\n ),\n ),\n )));\n\n $this->inputFilter = $inputFilter;\n }\n return $this->inputFilter;\n }", "public function scopeNombre($query,$name){\n\n // if(trim($name) != \"\") {\n\n $query->where('nom_requisito',\"LIKE\", \"%$name%\")->where('municipio_id_municipio',\"=\",NULL);\n\n // }\n }", "private function setFilter()\n {\n $this->filter['value'] = $this->getParameter('value') == null ? '' : $this->getParameter('value');\n }", "protected abstract function filter();", "public function createFilter();", "function Solicitar_Nom_ali($Value){\n echo \"<label for='Nombre'><b>Nombre</b></label>\";\n echo \"<input type='text' placeholder='Nombre del alimento' name='Nombre' required maxlength='50' value='\".$Value.\"'\";\n echo \"title='Ingrse un nombre solo con letras, numeros o simbolos permitidos( _ - )' pattern='^([\\w_ÑñÁÉÍÓÚáéíóú]+( *|))+$'>\";\n echo \"<br><br>\";\n}", "function getFilter() {\n\t\tif (isset($_POST['value'])){\n\t\t\tif ($_POST['value'] != \"all\"){\n\t\t\t\t$categoryName = $_POST['value'];\n\t\t\t\treturn $categoryName;\n\t\t\t}\n\t\t}\n\t\treturn 'all';\n\t}", "private function addInputFilters()\n {\n $inputFilter = new InputFilter();\n\n $author = (new Input())->setName('author')->setRequired(true);\n $author->getFilterChain()->attach(new StringTrim());\n $author->getValidatorChain()->attach((new StringLength())->setMin(1)->setMax(128));\n $inputFilter->add($author);\n\n $comment = (new Input())->setName('comment')->setRequired(true);\n $comment->getFilterChain()->attach(new StripTags());\n $comment->getValidatorChain()->attach((new StringLength())->setMin(1)->setMax(4096));\n $inputFilter->add($author)->add($comment);\n\n $this->setInputFilter($inputFilter);\n }", "public function filter($data);", "public function getInputFilter() {\n\n if (!$this->inputFilter) {\n\n $inputFilter = new InputFilter();\n $factory = new Factory();\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'id',\n 'required' => true,\n 'filter' => array(\n array('name' => 'Int')\n )\n )\n )\n );\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'username',\n 'required' => true,\n 'filters' => array(\n array('name' => 'StripTags'),\n array('name' => 'StringTrim'),\n ),\n 'validators' => array(\n array(\n 'name' => 'StringLength',\n 'options' => array(\n 'encoding' => 'UTF-8',\n 'min' => 1,\n 'max' => 100,\n ),\n ),\n )\n )\n )\n );\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'name',\n 'required' => true,\n 'filters' => array(\n array('name' => 'StripTags'),\n array('name' => 'StringTrim'),\n ),\n 'validators' => array(\n array(\n 'name' => 'StringLength',\n 'options' => array(\n 'encoding' => 'UTF-8',\n 'min' => 1,\n 'max' => 100,\n ),\n ),\n )\n )\n )\n );\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'token',\n 'required' => false,\n 'validators' => array(\n array(\n 'name' => 'StringLength',\n 'options' => array(\n 'encoding' => 'UTF-8',\n 'min' => 1,\n 'max' => 100,\n ),\n ),\n )\n )\n )\n );\n\n $this->inputFilter = $inputFilter;\n }\n\n return $this->inputFilter;\n }", "protected function getFiltersForm(){\n $table = ORM::getTable('word');\n $name = $table->getField('name');\n $value = $table->getField('value');\n\n $pseudo = new OrmTable('pseudo_languages');\n $pseudo->addField($name);\n $pseudo->addField($value);\n $form = UI::getFormForTable($pseudo, array(), UI::LAYOUT_BLOCK);\n $form['id'] = 'word_filters';\n $form['fields']['value']['tag'] = UI::TAG_INPUT;\n unset($form['fields']['value']['title']);\n unset($form['fields']['name']['title']);\n $form['fields']['name']['attributes']['onblur'] ='Word.filterTerms()';\n $form['fields']['name']['attributes']['placeholder'] = Word::get('admin','word_name_filter');\n $form['fields']['value']['attributes']['onblur'] = 'Word.filterTerms()';\n $form['fields']['value']['attributes']['placeholder'] = Word::get('admin','word_value_filter');\n return $form;\n }", "public function getName()\n {\n return \"MJanssen_Filters_LikeFilter\";\n }", "function filter($value){\n return htmlspecialchars($value);\n }", "private function addInputFilter() \n {\n \n $inputFilter = new InputFilter(); \n $this->setInputFilter($inputFilter);\n \n $inputFilter->add([\n 'name' => 'nom_parent',\n 'required' => true,\n 'filters' => [\n ['name' => 'StringTrim'],\n ['name' => 'StripTags'],\n ['name' => 'StripNewlines'],\n ], \n 'validators' => [\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 2,\n 'max' => 100\n ],\n ],\n ],\n ]);\n \n $inputFilter->add([\n 'name' => 'prenom_parent',\n 'required' => true,\n 'filters' => [\n ['name' => 'StringTrim'],\n ['name' => 'StripTags'],\n ['name' => 'StripNewlines'],\n ], \n 'validators' => [\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 2,\n 'max' => 100\n ],\n ],\n ],\n ]);\n \n $inputFilter->add([\n 'name' => 'email_parent',\n 'required' => true,\n 'filters' => [\n ['name' => 'StringTrim'], \n ], \n 'validators' => [\n [\n 'name' => 'EmailAddress',\n 'options' => [\n 'allow' => \\Zend\\Validator\\Hostname::ALLOW_DNS,\n 'useMxCheck' => false, \n ],\n ],\n ],\n ]);\n \n }", "public function search(Request $request)\n\t{\n\t\tif ($request->input(\"action\")==\"person_name\")\n\t\t{\t\n\t\t\t$name=PersonInfo::where('nationalid','LIKE', '%' . $request->input(\"person_name\"). '%')->orWhere('name','LIKE', '%' . $request->input(\"person_name\"). '%')->get();\n\t\n\t\t\treturn $name;\n\t\t}\n\t}", "public function getInputFilter()\n {\n if (!$this->inputFilter) {\n $inputFilter = new InputFilter();\n\n $inputFilter->add(array(\n 'name' => 'deduction_id',\n 'required' => true,\n 'filters' => array(\n array('name' => 'Int'),\n ),\n ));\n\n $inputFilter->add(array(\n 'name' => 'deduction_name',\n 'required' => true,\n 'filters' => array(\n array('name' => 'StripTags'),\n array('name' => 'StringTrim'),\n ),\n 'validators' => array(\n array(\n 'name' => 'Regex',\n 'options' => array(\n 'pattern' => '/^[A-Za-z]+(\\s*|\\s+[0-9]*|\\s+[A-Za-z]*|[A-Za-z\\s]*)$/',\n ),\n ),\n\n array(\n 'name' => 'StringLength',\n 'options' => array(\n 'encoding' => 'UTF-8',\n 'min' => 1,\n 'max' => 100,\n ),\n ),\n ),\n ));\n\n\n\n\n $this->inputFilter = $inputFilter;\n }\n\n return $this->inputFilter;\n }", "public function searchByFilter($filter)\n {\n }", "private function filters() {\n\n\n\t}", "protected function getNameInput(): string\n {\n $name = trim($this->argument('name'));\n\n if (! Str::endsWith($name, 'Filter')) {\n $name .= 'Filter';\n }\n\n $this->type = ucfirst($name);\n\n return $this->type;\n }", "public function filterByName($filter) {\n if (strlen($filter) > 0) {\n $this->calcData = array_filter($this->calcData, function($item) use ($filter) {\n if (strpos($item['name'], $filter) !== false) {\n return $item;\n }\n });\n }\n }", "public function getFilter(){ }", "function search( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_SEARCH,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t null,\n\t Form::DATA_STRING\n );\n\t}", "public function addFilterFormInput(): void;", "function filterUsername($username) {\r\n \treturn $username;\r\n }", "function formFilter()\r\n\t{\r\n\t\tglobal $langs;\r\n\r\n\t\t$s='';\r\n\t\t$s.='<input type=\"text\" name=\"xinputuser\" class=\"flat minwidth300\" value=\"'.GETPOST(\"xinputuser\").'\">';\r\n\t\treturn $s;\r\n\t}", "private function get_filter_search($filter) {\n $names = array();//assume no mod names\n $modnames = get_module_types_names(); //get all the names avaliable\n $mods = $filter->mods;//get all mods in this filter\n\n //go through each mod in the filter and and keep its name\n foreach ($mods as $mod) {\n array_push($names, $modnames[$mod]);\n }\n\n //convert list of names into a comma deliminated string of names\n return implode(\",\", $names);\n }", "public function getInputFilter(){\n\t\t/*\n\t\t * validate data:\n\t\t * -id\n\t\t * -svg1\n\t\t * -image1\n\t\t * -svg2\n\t\t * -image2\n\t\t * -svg3\n\t\t * -image3\n\t\t **/\n\n\t\tif(!$this->inputFilter){\n\t\t\t$inputFilter = new InputFilter();\n\n\t\t\t//id\n $inputFilter->add(array(\n 'name' => 'id',\n 'required' => true,\n 'filters' => array(\n array('name' => 'Int'),\n ),\n ));\n\n\n\t\t}\n\t}", "function filterUsername($username)\r\n {\r\n return $username;\r\n }", "public function getInputFilter()\n {\n if (!$this->inputFilter){\n $inputFilter = new InputFilter();\n $factory = new InputFactory();\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'id',\n 'required' => true,\n 'filters' => array(\n array('name' => 'Int')\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'nome',\n 'required' => true,\n 'filters'\t=>\tarray(\n array('name'\t=>\t'StripTags'),\n array('name'\t=>\t'StringTrim'),\n ),\n 'validators' => array(\n array(\n 'name' => 'StringLength',\n 'options' => array(\n 'encoding' => 'UTF-8',\n 'min' => 1,\n 'max' => 255,\n ),\n ),\n ),\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'etapaCurso',\n 'required' => true,\n 'filters' => array(\n array('name' => 'Int')\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'concluinte',\n 'required' => true,\n 'filters' => array(\n array('name' => 'Int')\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'cargaHoraria',\n 'required' => true,\n 'validators' => array(\n array(\n 'name' => 'Float',\n 'options' => array(\n 'min' => 1,\n 'locale' => 'en_US'\n )\n )\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'ativo',\n 'required' => false,\n 'filters' => array(\n array('name' => 'Int')\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'intervalo',\n 'required' => true,\n 'filters' => array(\n array('name' => 'Int')\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'idadeInicial',\n 'required' => false,\n 'validators' => array(\n array(\n 'name' => 'Digits'\n )\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'idadeFinal',\n 'required' => false,\n 'validators' => array(\n array(\n 'name' => 'Digits'\n )\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'observacaoHistorico',\n 'required' => false,\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'diasLetivos',\n 'required' => true,\n 'filters' => array(\n array('name' => 'Int')\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'curso',\n 'required' => true,\n 'filters' => array(\n array('name' => 'Int')\n )\n )));\n\n $inputFilter->add($factory->createInput(array(\n 'name' => 'regraAvaliacao',\n 'required' => false,\n 'filters'=> array(\n array('name' => 'Int')\n )\n )));\n\n $this->inputFilter = $inputFilter;\n }\n\n return $this->inputFilter;\n }", "private function addInputFilter() \n {\n // Create main input filter\n $inputFilter = new InputFilter(); \n $this->setInputFilter($inputFilter);\n \n // Add input for \"email\" field\n $inputFilter->add([\n 'name' => 'title',\n 'required' => true,\n 'filters' => [\n ['name' => 'StringTrim'], \n ], \n 'validators' => [\n [\n 'name' => 'StringLength',\n 'options' => [\n 'min' => 1,\n 'max' => 128\n ],\n ],\n \n \n ],\n ]); \n\n\n \n // Add input for \"status\" field\n $inputFilter->add([\n 'name' => 'status',\n 'required' => true,\n 'filters' => [ \n ['name' => 'ToInt'],\n ], \n 'validators' => [\n ['name'=>'InArray', 'options'=>['haystack'=>[1, 2]]]\n ],\n ]); \n }", "public function filter() {\n\t\t$args = func_get_args();\n\t\t$r = Core_Types::reflection_for($this->sets[':default']);\n\t\t$m = $r->getMethod('filter');\n\t\treturn $m->invokeArgs($this->sets[':default'],$args);\n\t}", "public function addFilter()\n\t{\n\t\treturn $this->addTextFilter();\n\t}", "public static function nameRecibo($userdata)\n{\n$nombre=$userdata['nombre'];\n\n\n if(trim($nombre)!=\"\")\n{\n$estudiantes = DB::table('Estudiante')\n ->join('grado', 'grado.idGrado', '=', 'estudiante.idGrado') \n ->select('grado.grado')\n ->Where(DB::raw(\"CONCAT(estudiante.nombre,' ', estudiante.apellido)\"),'LIKE' ,\"%\".$nombre.\"%\") \n ->get();\n }\n\n \nreturn $estudiantes;\n\n}", "abstract public function filterFields();", "private function setSearchstring(){\n $search_req = $this->main->getArrayFromSearchString($_GET['content_search']);\n\n $searchstring = '';\n\n foreach($search_req as $key => $val){\n if(strlen($val) > 0){\n $searchstring .= \"`name` LIKE '%\".DB::quote($val).\"%' OR \";\n };\n };\n\n $searchstring .= \"`name` LIKE '%\".DB::quote($_GET['content_search']).\"%'\";\n\n return $searchstring;\n }", "private function setNome($nomecompleto){\t\t\n\t\tif($nomecompleto = filter_var($nomecompleto, FILTER_SANITIZE_STRING)){\n\t\t\t$this->nomecompleto = $nomecompleto; \n\t\t} \n\t}", "public function search()\n\t{\n\t\tif(isset($_GET['term']))\n\t\t{\n\t\t\t$result = $this->Busca_Model->pesquisar($_GET['term']);\n\t\t\tif(count($result) > 0) {\n\t\t\tforeach ($result as $pr)$arr_result[] = $pr->nome;\n\t\t\t\techo json_encode($arr_result);\n\t\t\t}\n\t\t}\n\t}", "function tmpl_sort_by_character($where){\r\n\tglobal $wpdb;\t\r\n\tif(isset($_REQUEST['sortby']) && $_REQUEST['sortby']!=''){\r\n\t\t$where .= \" AND $wpdb->posts.post_title like '\".$_REQUEST['sortby'].\"%'\";\r\n\t}\r\n\treturn $where;\r\n}", "function parseName($value){\n $name=explode(' ',$value);\n $genName=\"\";\n $len= count($name);\n if($len > 0){\n for($i=0;$i<$len;$i++){\n if(trim($name[$i])!=\"\"){\n if($genName!=\"\"){\n $genName =$genName .\" \".$name[$i];\n }\n else{\n $genName =$name[$i];\n } \n }\n }\n }\n if($genName!=\"\"){\n $genName=\" OR CONCAT(TRIM(s.firstName),' ',TRIM(s.lastName)) LIKE '\".$genName.\"%'\";\n } \n \n return $genName;\n}", "function parseName($value){\n $name=explode(' ',$value);\n $genName=\"\";\n $len= count($name);\n if($len > 0){\n for($i=0;$i<$len;$i++){\n if(trim($name[$i])!=\"\"){\n if($genName!=\"\"){\n $genName =$genName .\" \".$name[$i];\n }\n else{\n $genName =$name[$i];\n } \n }\n }\n }\n if($genName!=\"\"){\n $genName=\" OR CONCAT(TRIM(s.firstName),' ',TRIM(s.lastName)) LIKE '\".$genName.\"%'\";\n } \n \n return $genName;\n}", "function parseName($value){\n $name=explode(' ',$value);\n $genName=\"\";\n $len= count($name);\n if($len > 0){\n for($i=0;$i<$len;$i++){\n if(trim($name[$i])!=\"\"){\n if($genName!=\"\"){\n $genName =$genName .\" \".$name[$i];\n }\n else{\n $genName =$name[$i];\n } \n }\n }\n }\n if($genName!=\"\"){\n $genName=\" OR CONCAT(TRIM(s.firstName),' ',TRIM(s.lastName)) LIKE '\".$genName.\"%'\";\n } \n \n return $genName;\n}", "public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }", "function filter($param)\r\n\t{\r\n\r\n\t\t$this->view = false;\r\n\t\t$this->layout_name = false;\r\n\r\n\t\t$_SQL = Singleton::getInstance(SQL_DRIVER);\r\n\r\n\t\t$sql = \"SELECT `\" . $param[1] . \"` FROM `\" . $param[0] . \"` WHERE `\" . $param[1] . \"` LIKE '\" . $_SQL->sql_real_escape_string($_GET['q']) . \"%' \r\n\t\t ORDER BY `\" . $param[1] . \"` LIMIT 0,100\";\r\n\t\t$res = $_SQL->sql_query($sql);\r\n\r\n\t\twhile ( $ob = $_SQL->sql_fetch_object($res) )\r\n\t\t{\r\n\t\t\techo $ob->$param[1] . \"\\n\";\r\n\t\t}\r\n\t}", "public static function text_filters() {\n\t\t\treturn self::$text_filters;\n\t\t}", "function filter_method_name()\r\n\t{\r\n\t\t// TODO:\tDefine your filter method here\r\n\t}", "function learn_press_get_students_list_filter() {\n\t$filter = array(\n\t\t'all' => esc_html__( 'All', 'learnpress' ),\n\t\t'in-progress' => esc_html__( 'In Progress', 'learnpress' ),\n\t\t'finished' => esc_html__( 'Finished', 'learnpress' )\n\t);\n\n\treturn apply_filters( 'learn_press_get_students_list_filter', $filter );\n}", "public function filter ( $name ) {\n\t\t$this->opts['filter'] = $name;\n\t\treturn $this;\n\t}", "public function scanNames(callable $filter = null): Generator\n {\n /**\n * @var Generator<string>\n */\n return $this->scanRaw(true, true, $filter, null);\n }", "function parse_search_field() {\n return '';\n }", "public function getCreateFormFilter()\n\t{\n\n\t\t$inputFilter = new InputFilter\\InputFilter();\n\t\t$factory = new InputFilter\\Factory();\n\n\t\t# filter and validate username input field\n\t\t$inputFilter->add(\n\t\t\t$factory->createInput(\n\t\t\t\t[\n\t\t\t\t\t'name' => 'username',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'filters' => [\n\t\t\t\t\t\t['name' => Filter\\StripTags::class], # stips html tags\n\t\t\t\t\t\t['name' => Filter\\StringTrim::class], # removes empty spaces\n\t\t\t\t\t\t['name' => I18n\\Filter\\Alnum::class], # allows only [a-zA-Z0-9] characters\n\t\t\t\t\t],\n\t\t\t\t\t'validators' => [\n\t\t\t\t\t\t['name' => Validator\\NotEmpty::class],\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => Validator\\StringLength::class,\n\t\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t'min' => 2,\n\t\t\t\t\t\t\t\t'max' => 25,\n\t\t\t\t\t\t\t\t'messages' => [\n\t\t\t\t\t\t\t\t\tValidator\\StringLength::TOO_SHORT => 'Tên người dùng phải có ít nhất 2 ký tự',\n\t\t\t\t\t\t\t\t\tValidator\\StringLength::TOO_LONG => 'Tên người dùng phải có tối đa 25 ký tự',\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t], \n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => I18n\\Validator\\Alnum::class,\n\t\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t'messages' => [\n\t\t\t\t\t\t\t\t\tI18n\\Validator\\Alnum::NOT_ALNUM => 'Tên người dùng chỉ được bao gồm các ký tự chữ và số',\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => Validator\\Db\\NoRecordExists::class,\n\t\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t'table' => $this->table, \n\t\t\t\t\t\t\t\t'field' => 'username',\n\t\t\t\t\t\t\t\t'adapter' => $this->adapter,\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# filter and validate gender select field\n\t\t$inputFilter->add(\n\t\t\t$factory->createInput(\n\t\t\t\t[\n\t\t\t\t\t'name' => 'gender',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'filters' => [\n\t\t\t\t\t\t['name' => Filter\\StripTags::class], # stips html tags\n\t\t\t\t\t\t['name' => Filter\\StringTrim::class], # removes empty spaces\n\t\t\t\t\t],\n\t\t\t\t\t'validators' => [\n\t\t\t\t\t\t['name' => Validator\\NotEmpty::class], \n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => Validator\\InArray::class,\n\t\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t'haystack' => ['Female', 'Male', 'Other'],\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# filter and validate email input field\n\t\t$inputFilter->add(\n\t\t\t$factory->createInput(\n\t\t\t\t[\n\t\t\t\t\t'name' => 'email',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'filters' => [\n\t\t\t\t\t\t['name' => Filter\\StripTags::class],\n\t\t\t\t\t\t['name' => Filter\\StringTrim::class], \n\t\t\t\t\t\t#['name' => Filter\\StringToLower::class], comment this line out\n\t\t\t\t\t],\n\t\t\t\t\t'validators' => [\n\t\t\t\t\t\t['name' => Validator\\NotEmpty::class],\n\t\t\t\t\t\t['name' => Validator\\EmailAddress::class],\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => Validator\\StringLength::class,\n\t\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t'min' => 6,\n\t\t\t\t\t\t\t\t'max' => 128,\n\t\t\t\t\t\t\t\t'messages' => [\n\t\t\t\t\t\t\t\t\tValidator\\StringLength::TOO_SHORT => 'Địa chỉ email phải có ít nhất 6 ký tự',\n\t\t\t\t\t\t\t\t\tValidator\\StringLength::TOO_LONG => 'Địa chỉ email phải có tối đa 128 ký tự',\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => Validator\\Db\\NoRecordExists::class,\n\t\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t'table' => $this->table,\n\t\t\t\t\t\t\t\t'field' => 'email',\n\t\t\t\t\t\t\t\t'adapter' => $this->adapter,\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t]\n\t\t\t)\n\t\t);\n\n\t\t# filter and validate confirm_email input field\n\t\t$inputFilter->add(\n\t\t\t$factory->createInput(\n\t\t\t\t[\n\t\t\t\t\t'name' => 'confirm_email',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'filters' => [\n\t\t\t\t\t\t['name' => Filter\\StripTags::class], # stips html tags\n\t\t\t\t\t\t['name' => Filter\\StringTrim::class], # removes empty spaces\n\t\t\t\t\t\t#['name' => Filter\\StringToLower::class], as well as this one\n\t\t\t\t\t],\n\t\t\t\t\t'validators' => [\n\t\t\t\t\t\t['name' => Validator\\NotEmpty::class],\n\t\t\t\t\t\t['name' => Validator\\EmailAddress::class],\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => Validator\\StringLength::class,\n\t\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t'min' => 6,\n\t\t\t\t\t\t\t\t'max' => 128,\n\t\t\t\t\t\t\t\t'messages' => [\n\t\t\t\t\t\t\t\t\tValidator\\StringLength::TOO_SHORT => 'Địa chỉ email phải có ít nhất 6 ký tự',\n\t\t\t\t\t\t\t\t\tValidator\\StringLength::TOO_LONG => 'Địa chỉ email phải có tối đa 128 ký tự',\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => Validator\\Db\\NoRecordExists::class,\n\t\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t'table' => $this->table,\n\t\t\t\t\t\t\t\t'field' => 'email',\n\t\t\t\t\t\t\t\t'adapter' => $this->adapter,\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => Validator\\Identical::class,\n\t\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t'token' => 'email', # field to compare against\n\t\t\t\t\t\t\t\t'messages' => [ \n\t\t\t\t\t\t\t\t\tValidator\\Identical::NOT_SAME => 'Email không trùng!',\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t]\n\t\t\t)\n\t\t);\n\n\t\t# filter and validate birthday dateselect field\n\t\t$inputFilter->add(\n\t\t\t$factory->createInput(\n\t\t\t\t[\n\t\t\t\t\t'name' => 'birthday',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'filters' => [\n\t\t\t\t\t\t['name' => Filter\\StripTags::class], # stips html tags\n\t\t\t\t\t\t['name' => Filter\\StringTrim::class], # removes empty spaces\n\t\t\t\t\t],\n\t\t\t\t\t'validators' => [\n\t\t\t\t\t\t['name' => Validator\\NotEmpty::class],\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => Validator\\Date::class,\n\t\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t'format' => 'Y-m-d',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\t\n\t\t\t\t]\n\t\t\t)\n\t\t);\n\t\t# filter and validate password input field\n\t\t$inputFilter->add(\n\t\t\t$factory->createInput(\n\t\t\t\t[\n\t\t\t\t\t'name' => 'password',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'filters' => [\n\t\t\t\t\t\t['name' => Filter\\StripTags::class], # stips html tags\n\t\t\t\t\t\t['name' => Filter\\StringTrim::class], # removes empty spaces\n\t\t\t\t\t],\n\t\t\t\t\t'validators' => [\n\t\t\t\t\t\t['name' => Validator\\NotEmpty::class],\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => Validator\\StringLength::class,\n\t\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t'min' => 8,\n\t\t\t\t\t\t\t\t'max' => 25,\n\t\t\t\t\t\t\t\t'messages' => [\n\t\t\t\t\t\t\t\t\tValidator\\StringLength::TOO_SHORT => 'Mật khẩu phải có ít nhất 8 ký tự',\n\t\t\t\t\t\t\t\t\tValidator\\StringLength::TOO_LONG => 'Mật khẩu phải có nhiều nhất 25 ký tự',\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t]\n\t\t\t)\n\t\t);\n\n\t\t# filter and validate confirm_password field\n\t\t$inputFilter->add(\n\t\t\t$factory->createInput(\n\t\t\t\t[\n\t\t\t\t\t'name' => 'confirm_password',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'filters' => [\n\t\t\t\t\t\t['name' => Filter\\StripTags::class], # stips html tags\n\t\t\t\t\t\t['name' => Filter\\StringTrim::class], # removes empty spaces\n\t\t\t\t\t],\n\t\t\t\t\t'validators' => [\n\t\t\t\t\t\t['name' => Validator\\NotEmpty::class], \n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => Validator\\StringLength::class,\n\t\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t'min' => 8,\n\t\t\t\t\t\t\t\t'max' => 25,\n\t\t\t\t\t\t\t\t'messages' => [\n\t\t\t\t\t\t\t\t\tValidator\\StringLength::TOO_SHORT => 'Mật khẩu phải có ít nhất 8 ký tự',\n\t\t\t\t\t\t\t\t\tValidator\\StringLength::TOO_LONG => 'Mật khẩu phải có nhiều nhất 25 ký tự',\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => Validator\\Identical::class,\n\t\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t'token' => 'password',\n\t\t\t\t\t\t\t\t'messages' => [\n\t\t\t\t\t\t\t\t\tValidator\\Identical::NOT_SAME => 'Mật khẩu không hợp lệ!',\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t]\n\t\t\t)\n\t\t);\t\n\t\t# csrf field\n\t\t$inputFilter->add(\n\t\t\t$factory->createInput(\n\t\t\t\t[\n\t\t\t\t\t'name' => 'csrf',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'filters' => [\n\t\t\t\t\t\t['name' => Filter\\StripTags::class], # stips html tags\n\t\t\t\t\t\t['name' => Filter\\StringTrim::class], # removes empty spaces\n\t\t\t\t\t],\n\t\t\t\t\t'validators' => [\n\t\t\t\t\t\t['name' => Validator\\NotEmpty::class],\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => Validator\\Csrf::class,\n\t\t\t\t\t\t\t'options' => [\n\t\t\t\t\t\t\t\t'messages' => [\n\t\t\t\t\t\t\t\t\tValidator\\Csrf::NOT_SAME => 'Oops! Hãy điền vào nào.',\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t]\n\t\t\t)\n\t\t);\n\n\t\treturn $inputFilter;\t\n\t}", "public function testDoubleName()\n {\n $filter = new Name();\n\n $this->assertSame([\n 'forename' => 'Ian',\n 'surname' => 'Chadwick'\n ], $filter->filter('Ian Chadwick'));\n\n $this->assertSame([\n 'forename' => 'Dave',\n 'surname' => 'Jones'\n ], $filter->filter('dave jones'));\n }", "function wp_list_filter($input_list, $args = array(), $operator = 'AND')\n {\n }" ]
[ "0.6683667", "0.6528622", "0.6489438", "0.63472134", "0.6338782", "0.6286164", "0.62306213", "0.61663496", "0.61116076", "0.6083822", "0.5952454", "0.5924744", "0.5833442", "0.5823506", "0.58113575", "0.5768213", "0.57403064", "0.57189184", "0.56808156", "0.56592405", "0.56260103", "0.55932575", "0.55887437", "0.5586153", "0.55783707", "0.5570697", "0.5566538", "0.5564124", "0.5555132", "0.5541032", "0.553693", "0.55302453", "0.5490997", "0.5469043", "0.5465683", "0.5465683", "0.5463658", "0.54548746", "0.5448686", "0.5446134", "0.5441102", "0.54359126", "0.54355776", "0.54208225", "0.5420627", "0.5415802", "0.54107624", "0.5394446", "0.53905606", "0.5387949", "0.5382014", "0.53786236", "0.53750294", "0.5374044", "0.53709584", "0.536236", "0.53550476", "0.5342377", "0.53365725", "0.53319967", "0.5331857", "0.53242755", "0.53182966", "0.53152066", "0.53014696", "0.53002137", "0.52995104", "0.5285487", "0.52782536", "0.5273493", "0.5261984", "0.5257516", "0.5255956", "0.5253991", "0.5250495", "0.52464986", "0.52250147", "0.52076095", "0.5206494", "0.51974505", "0.51921165", "0.51881254", "0.5184441", "0.5182543", "0.51819575", "0.5180709", "0.51787764", "0.51771265", "0.51771265", "0.51771265", "0.5172917", "0.51727384", "0.5167659", "0.516704", "0.51540124", "0.5153206", "0.51407593", "0.5138942", "0.51365465", "0.51282376", "0.51266456" ]
0.0
-1
begin here; enter into a directory and recursively look into it.
function dir_enter($entry_dir='/', $depth=0) { $found = 0; # Remove the last trailing slash and void dual writing $entry_dir = preg_replace('/\/$/i', '', $entry_dir); $skip_list = array( '.', # self '..', # parent ); if($dir_handle = opendir($entry_dir)) { while(false !== ($filename = readdir($dir_handle))) { if(in_array($filename, $skip_list)) { continue; } $full_file_path = "{$entry_dir}/{$filename}"; if(is_dir($full_file_path)) { # Need to loop here inside the directory fecho(str_repeat(' ', $depth)); # depth marker #fecho("{$full_file_path}"); fecho("{$filename}"); # Recurse through the file $function = __FUNCTION__; $found += $function($full_file_path, $depth+1); } else { #fecho(str_repeat(' ', $depth)); # depth marker #fecho("{$full_file_path}"); #fecho("{$filename}"); ++$found; process_file($full_file_path, $depth); } } closedir($dir_handle); } return $found; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}", "protected function pushd($dir) {\n array_push($this->pwd_stack, getcwd());\n chdir($dir);\n }", "function searchFolder( $current_folder, $folder_to_find, &$matches )\n{\n if ( !( $handle = opendir( $current_folder ) ) ) die( \"Cannot open $current_folder.\" );\n\n while ( $entry = readdir( $handle ) ) {\n if ( is_dir( \"$current_folder/$entry\" ) ) {\n if ( $entry != \".\" && $entry != \"..\" ) {\n\n // This entry is a valid folder\n // If it matches our folder name, add it to the list of matches\n if ( $entry == $folder_to_find ) $matches[] = \"$current_folder/$entry\";\n\n // Search this folder\n searchFolder( \"$current_folder/$entry\", $folder_to_find, $matches );\n }\n }\n }\n closedir( $handle );\n}", "function fs_get_tree($dir_path) {\n #echo \"top of fs_get_tree, dir_path=$dir_path\\n\";\n { $old_cwd = getcwd();\n chdir($dir_path);\n #echo \" did chdir to '$dir_path'\\n\";\n\n {\n $fh = opendir('.');\n #echo \" opendir\\n\";\n\n $results = array();\n $n = 0;\n $dirs_to_crawl = array();\n while (true) {\n #echo \" loop\\n\";\n if ($n > 500) {\n #echo \"--- n > LIMIT (n=$n), break\\n\";\n break;\n }\n $n++;\n $file = readdir($fh);\n #echo \" file = '$file'\\n\";\n if (!$file) {\n break;\n }\n if ($file == '.'\n || $file == '..'\n || $file == '.git' #todo #fixme don't assume\n ) {\n #echo \"--- . or .., continuing\\n\";\n continue;\n }\n if (is_dir($file)) {\n #echo \"--- adding $file to dirs, n=$n\\n\";\n $dirs_to_crawl[] = $file;\n }\n $results[$file] = null;\n }\n closedir($fh);\n }\n\n #echo \"\\nnow looping thru dirs_to_crawl\\n\";\n foreach ($dirs_to_crawl as $dir) {\n #echo \" dir = $dir\\n\";\n $results[$dir] = fs_get_tree($dir);\n }\n\n chdir($old_cwd);\n }\n\n return $results;\n }", "function include_dir($dir){\n if ( ( $dh = opendir( $dir ) ) !== false ){\n while ( ( $entry = readdir( $dh ) ) !== false ){\n if ( $entry != \".\" && $entry != \"..\" ){\n if ( is_file( $dir.$entry ) ){\n require_once ( $dir.$entry );\n }\n }\n }\n }else{\n echo \"BAD DIRECTORY\";\n }\n }", "function recurseDir($dir) {\r\n if(is_dir($dir)) {\r\n if($dh = opendir($dir)){\r\n while($file = readdir($dh)){\r\n if($file != '.' && $file != '..' && $file != \"Thumbs.db\"){\r\n //This builds the complete file path\r\n $filePath = $dir . \"/\" . $file;\r\n //if statement to see if its a directory or file\r\n if(is_dir($filePath)){\r\n //This splits the file path and returns and array\r\n $parentDirPath = explode(\"/\",$filePath);\r\n //this figures out what the parent directory is\r\n $parentDir = count($parentDirPath) -2;\r\n //This figures out waht the current directory is most like to be removed\r\n //$curDir = count($parentDirPath) -2;\r\n //This gets the last part of the file path and sets the name of the directory or file\r\n $name = end($parentDirPath);\r\n //This is test code to tell what the code is doing will be removed for actual db population\r\n echo $name . \" Is a Directory and its parent directory is \" . $parentDirPath[$parentDir] . \"<br / >\";\r\n //This escapes all characters for the db queries\r\n $name = mysql_real_escape_string($name);\r\n //This escapes the parent dir for the query below\r\n $parentDir = mysql_real_escape_string($parentDirPath[$parentDir]);\r\n //$parentDir = $parentDirPath[$parentDir];\r\n $dir = mysql_real_escape_string($dir);\r\n //Build the query to get the parent directory id\r\n $getParentDirId = mysql_query(\"SELECT id FROM directories WHERE name = '$parentDir' \")\r\n or die(mysql_error());\r\n //While loop to set the parent id for use\r\n while($row = mysql_fetch_array($getParentDirId)){\r\n $parentDirId = $row[id];\r\n }\r\n echo \"parent id \" . $parentDirId;\r\n //Build the query to check if the file already exists in the dg\r\n $checkExists = mysql_query(\"SELECT COUNT(id) AS 'exists' FROM directories WHERE name = '$name' AND parent = '$parentDirId' AND path = '$dir'\")\r\n or die(mysql_error());\r\n //While loop to set the exists variable\r\n while($row = mysql_fetch_array($checkExists)){\r\n $exists = $row[exists];\r\n echo \" This is the $exists\";\r\n\r\n //If statment that checks the exists variable to see if it needs to add the current information to the db\r\n if($exists <1){\r\n //Query to insert data into database\r\n $result = mysql_query(\"INSERT INTO directories (id,path, name, parent) VALUES (NULL,'$dir', '$name', '$parentDirId]') \") or die(mysql_error());\r\n }\r\n }\r\n //Since this is a directory this calls the function again to loop back through a subfolder\r\n recurseDir($filePath);\r\n\r\n }elseif(is_file($filePath)){\r\n //This splits the filepath and returns and array\r\n $parentDirPath = explode(\"/\",$filePath);\r\n //This gets the paretnt dir to the file might not be needed\r\n $parentDir = count($parentDirPath) -3;\r\n //This gets the directory that the file is located\r\n $curDir = count($parentDirPath) -2;\r\n //This gets the last part of the file path and sets the name of the directory or file\r\n $name = end($parentDirPath);\r\n //This returns the filesize in MB need to write function to have it do gb & kb depending on size\r\n $fileSize = round(filesize($filePath) /1048576);\r\n //This splits the filename from the extension and returns and array\r\n $getExtentsion = explode(\".\", $name);\r\n //This sets the extension\r\n $extenstion = $getExtentsion[1];\r\n //This sets the filename\r\n $fileName = $getExtentsion[0];\r\n //This is test code to tell what the code is doing will be removed for actual db population\r\n /* echo \"<br />\\t\\t\" . $fileName . \" Is a file Located in \" . $parentDirPath[$curDir] . \" The parent directory is \" . $parentDirPath[$parentDir] .\r\n \" and a file size of \" . $fileSize . \" MB and an extenstion of \" . $extenstion . \"<br />\";*/\r\n /*echo \"<br />\\t\\t\" . $fileName . \" Is Located in \" . $parentDirPath[$curDir] . \" parent directory is \" . $parentDirPath[$parentDir] .\r\n \" size of \" . $fileSize . \" MB extenstion \" . $extenstion . \"<br />\";*/\r\n //echo \"this is what you are trying to echo \" . $directory_tree_file['pDir'];\r\n\r\n }else{\r\n //echo $filePath . \" WTF?<br />\";\r\n }\r\n\r\n }\r\n }//End while\r\n }\r\n closedir($dh);\r\n }\r\n}", "protected static function _scanForPlugins(){\n\t\t$directory = __DIR__ . Config::$pluginsDirectory;\n\t\t$handle = opendir( $directory );\n\n\t\t// check to make sure we could open the directory handle\n\t\tif( !$handle )\n\t\t\treturn;\n\n\t\t// now begin looping through all of the contents of the plugin directory\n\t\twhile( ( $dir = readdir( $handle ) ) !== false ){\n\t\t\tif( $dir === '.' || $dir === '..' )\n\t\t\t\tcontinue;\n\n\t\t\t// now we need to verify that the current \"file\" is a directory before continuing\n\t\t\tif( !is_dir( $directory . $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// expect a class file to exist in the format \"class-<DirectoryName>.php\"\n\t\t\t$classFile = $directory . $dir . '/' . $dir . '.php';\n\t\t\tif( !file_exists( $classFile ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now actually include the code\n\t\t\trequire_once( $classFile );\n\n\t\t\t// now expect the class name to match whatever the $dir name was\n\t\t\tif( !class_exists( $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now we can instantiate the class name and store it now\n\t\t\tself::$_plugins[] = new $dir();\n\t\t}\n\t}", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "protected function scanDir()\n {\n $this->moduleList = [];\n foreach ($this->getVendorList() as $vendorName) {\n $this->moduleList[$vendorName] = [];\n }\n\n $this->readModules();\n }", "function scan_directory_recursively($directory, $filter=FALSE)\n{\n\tif(substr($directory,-1) == '/')\n\t{\n\t\t$directory = substr($directory,0,-1);\n\t}\n\tif(!file_exists($directory) || !is_dir($directory))\n\t{\n\t\treturn FALSE;\n\t}elseif(is_readable($directory))\n\t{\n\t\t$directory_list = opendir($directory);\n\t\twhile($file = readdir($directory_list))\n\t\t{\n\t\t\tif($file != '.' && $file != '..' && $file != '.DS_Store' && $file != '.svn')\n\t\t\t{\n\t\t\t\t$path = $directory.'/'.$file;\n\t\t\t\tif(is_readable($path))\n\t\t\t\t{\n\t\t\t\t\t$subdirectories = explode('/',$path);\n\t\t\t\t\tif(is_dir($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => end($subdirectories),\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'kind' => 'directory',\n\t\t\t\t\t\t\t'content' => scan_directory_recursively($path, $filter));\n\t\t\t\t\t}elseif(is_file($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extension = end(explode('.',end($subdirectories)));\n\t\t\t\t\t\tif($filter === FALSE || $filter == $extension)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get metadata and image dimensions\n\t\t\t\t\t\t\t$size = getimagesize($path, $info);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Get containing directory of file\n\t\t\t\t\t\t\t$directory_array = explode('/', $path);\n\t\t\t\t\t\t\t$parent_folder = min($directory_array);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Reset title, caption, tags\n\t\t\t\t\t\t\t$title = $caption = $taglist = $tags = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path'\t\t=> dirname($path),\n\t\t\t\t\t\t\t'group'\t\t=> $parent_folder,\n\t\t\t\t\t\t\t'file'\t\t=> end($subdirectories),\n\t\t\t\t\t\t\t'extension' => $extension,\n\t\t\t\t\t\t\t'size'\t\t=> filesize($path),\n\t\t\t\t\t\t\t'width'\t\t=> $size[0],\n\t\t\t\t\t\t\t'height'\t=> $size[1],\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'title'\t\t=> $title,\n\t\t\t\t\t\t\t'caption'\t=> $caption,\n\t\t\t\t\t\t\t'tags'\t\t=> $tags,\n\t\t\t\t\t\t\t'kind'\t\t=> 'file');\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\tclosedir($directory_list); \n\t\treturn $directory_tree;\n\t}else{\n\t\treturn FALSE;\t\n\t}\n}", "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function print_dir_contents($dir_path, $parent_dir)\r\n{\r\n if (is_null($parent_dir)) {\r\n $dir_contents = glob(\"*\");\r\n } else {\r\n $dir_contents = glob(\"$dir_path/*\");\r\n }\r\n\r\n foreach ($dir_contents as $item) {\r\n if (is_dir($item)): ?>\r\n <li><a href=\"<?=$item?>\"><?=$item?>/</a></li>\r\n <ul>\r\n <?php print_dir_contents($item, $dir_path); ?>\r\n </ul>\r\n <?php else: ?>\r\n <li><a href=\"<?=$item?>\"><?=str_replace($dir_path . '/', '', $item)?></a></li>\r\n <?php endif;\r\n }\r\n}", "public function taskContinue(): void\n {\n $directory = $this->getDirectory();\n if (!$directory) {\n throw new RuntimeException('Not Found', 404);\n }\n\n if ($directory->getObject() instanceof PageInterface) {\n $this->continuePages($directory);\n } else {\n $this->continue($directory);\n }\n }", "static function AJAX_Scan() {\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list, \"strnatcasecmp\");\n\t\t\n\t\t// No files?\n\t\tif (!$list || !count($list)) die(\"No .php files located in this<br />folder and/or subfolders\");\n\t\t\n\t\t// For each file we'll present something nice\n\t\t$out = \"\";\n\t\tforeach($list as $file) {\n\t\t\t\n\t\t\t// If Mode is set to 1, we need to parse the file and check the completion\n\t\t\t$analysis = \"\";\n\t\t\tif ($_POST['Mode']) {\n\t\t\t\t$analysis = DocBlock::AnalyzeFile($file);\n\t\t\t}\n\t\t\t\n\t\t\t$out .= \"\n\t\t\t\t$analysis<a href='#' data-filename='\".rawurlencode($file).\"' class='filelink'>$file</a><br />\n\t\t\t\";\n\t\t}\n\t\t\n\t\t// Ouptut\n\t\techo $out;\n\t\t\n\t\t// Exit \"Gracefully\"\n\t\texit(0);\n\t}", "function dir_recursive($dir,$username) {\r\n \r\n echo \"<ul id='tree'>\";\r\n $n =0;\r\n foreach(scandir($dir) as $file) {\r\n \r\n $n++;\r\n if ('.' === $file || '..' === $file || '.DS_Store' === $file) continue;\r\n \r\n if (is_dir($dir.'/'.$file)) {\r\n\r\n\r\n //echo $dir.'/'.$file.'<br>';\r\n \r\n echo \"<li id='\".$file.\"' class='treeLi' title='\".$dir.'/'.$file.\"' onclick='getFolderNode(this.title,this.id)'><i class='fas fa-folder mr-2 iconNav'></i>$file</li>\";\r\n\r\n dir_recursive($dir.'/'.$file,$username);\r\n\r\n } else {\r\n //echo $file.'<br>';\r\n }\r\n\r\n }\r\n echo \"</ul>\"; \r\n}", "function dir_list($file)\n{\n $file_list = scandir($file);\n foreach($file_list as $item)\n {\n if($item == '.' || $item == '..')continue;\n \n $file_path = $file . '/' . $item;\n if(is_dir($file_path))\n {\n echo \"<font color='red'>$file_path</font><br/>\";\n dir_list($file_path);\n }\n else{\n echo $file_path . \"<br>\";\n }\n }\n}", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "function m_walk_dir( $root, $callback, $recursive = true, $level = 0 ) {\r\n $dh = @opendir( $root );\r\n if( false === $dh ) {\r\n return false;\r\n }\r\n while( $file = readdir( $dh )) {\r\n if( \".\" == $file || \"..\" == $file ){\r\n continue;\r\n }\r\n //echo \"## DEBUG:$level - $file<br/>\"; \r\n\r\n //echo \"Level: $level\";\r\n call_user_func( $callback,$level, \"{$root}/{$file}\", $file );\r\n if( false !== $recursive && is_dir( \"{$root}/{$file}\" )) {\r\n m_walk_dir( \"{$root}/{$file}\", $callback, $recursive, $level+1 );\r\n }\r\n }\r\n closedir( $dh );\r\n return true;\r\n}", "function CheckDir($dir, $startWith = '')\n{\n global $count;\n global $pruned;\n $count++;\n \n echo \"\\r$count ($pruned): Checking $dir \";\n \n $started = false;\n if( !strlen($startWith) )\n $started = true;\n\n // see if this is a directory we need to prune\n if( $started && is_dir(\"$dir/video_2\") )\n {\n PruneDir($dir);\n }\n else\n {\n // recurse into any directories\n $f = scandir($dir);\n foreach( $f as $file )\n {\n if( !$started && $file == $startWith )\n $started = true;\n \n if( $started && is_dir(\"$dir/$file\") && $file != '.' && $file != '..' )\n CheckDir(\"$dir/$file\");\n }\n unset($f);\n }\n}", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "function check_dir($dir)\n {\n global $docdir, $lang;\n \n // Collect files and diretcories in these arrays\n $directories = array();\n $files = array();\n \n // Open and traverse the directory\n $handle = @opendir($dir);\n while ($file = @readdir($handle)) {\n if (preg_match(\"/^\\.{1,2}/\",$file) || $file == 'CVS')\n continue;\n\n // Collect files and directories\n if (is_dir($dir.$file)) { $directories[] = $file; }\n else { $files[] = $file; }\n\n }\n @closedir($handle);\n \n // Sort files and directories\n sort($directories);\n sort($files);\n \n // Files first...\n $file_cnt = 0;\n foreach ($files as $file) {\n if (check_file($dir.$file, $file_cnt)) { $file_cnt++; }\n }\n\n // than the subdirs\n foreach ($directories as $file) {\n check_dir($dir.$file.\"/\");\n }\n }", "function GetContents($dir,$files=array()) \n{\n if(!($res=opendir($dir))) exit(\"$dir doesn't exist!\");\n while(($file=readdir($res))==TRUE) \n if($file!=\".\" && $file!=\"..\")\n if(is_dir(\"$dir/$file\")) $files=GetContents(\"$dir/$file\",$files);\n else array_push($files,\"$dir/$file\");\n \n closedir($res);\n return $files;\n}", "protected function _Recusive_Load_Dir($dir) {\r\n if (!is_dir($dir)) { return; }\r\n // Load each of the field shortcodes\r\n foreach (new DirectoryIterator($dir) as $FileInfo) {\r\n // If this is a directory dot\r\n if ($FileInfo->isDot()) { continue; }\r\n // If this is a directory\r\n if ($FileInfo->isDir()) { \r\n // Load the directory\r\n $this->_Recusive_Load_Dir($FileInfo->getPathname());\r\n } // Otherwise load the file\r\n else {\r\n // If this is not false\r\n if (stripos($FileInfo->getFilename(),'.tpl') !== false) { continue; } \r\n // If this is not false\r\n if (stripos($FileInfo->getFilename(),'.php') === false) { continue; } \r\n // Include the file\r\n require_once($FileInfo->getPathname());\r\n }\r\n }\r\n }", "static public function scan_dir($dir = '', $partial = '')\n\t\t{\n\t\t$d = dir($dir);\n\t\twhile ($file = $d->read())\n\t\t\t{\n\t\t\t$full = \"$dir/$file\";\n\t\t\tif (preg_match(\"/^\\./\", $file)) continue;\n\t\t\tif (is_dir($full)) self::scan_dir($full, $partial);\n\t\t\telse {\n\t\t\t\t$class = str_replace('.php', '', $full);\n\t\t\t\t$class = str_replace($partial, '', $class);\n\t\t\t\t$class = str_replace('/', '\\\\', $class);\n\n\t\t\t\tif ($class != \"\\\\Model\\\\Model\"\n\t\t\t\t\t&& strpos($class, 'Model') !== false\n\t\t\t\t\t&& class_exists($class)\n\t\t\t\t\t&& get_parent_class($class) == 'Model'\n\t\t\t\t\t) {\n\t\t\t\t\techo \"\\n\\nFound $class.\";\n\t\t\t\t\t$model = new $class();\n\t\t\t\t\t\\Model\\Create::create($model->my_table(), $model->my_columns());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "function list_dir($chdir,$id_item_parent1,$mon_dir=\"\")\r\n{\r\n\t global $id_item,$mon_path,$rep;\r\n\r\n\t $var_retour = \"\"; \r\n\t unset($sdirs);\r\n\t unset($sfiles);\r\n\t chdir($chdir);\r\n \r\n\t $self = basename($_SERVER['PHP_SELF']);\r\n\t $handle = opendir('.');\r\n\t while ($file = readdir($handle))\r\n\t {\r\n //echo($file.\"<br>\");\r\n\t \tif(is_dir($file) && $file != \".\" && $file != \"..\")\r\n\t \t{ $sdirs[] = $file; }\r\n\t\telseif (is_file($file))\r\n\t\t{ $sfiles[] = $file; }\r\n\t }\r\n\t \r\n\t $dir = getcwd();\r\n\t $dir1 = str_replace($root, \"\", $dir);\r\n\t $count = substr_count($dir1, \"/\") + substr_count($dir1, \"\\\\\");\r\n \r\n\t if(is_array($sdirs))\r\n\t {\r\n\t\t sort($sdirs);\r\n\t \t reset($sdirs);\r\n\t\t \r\n\t \t for($y=0; $y<sizeof($sdirs); $y++)\r\n\t \t {\r\n\t\t\t $id_item++;\r\n\t\t\t // on n'affiche pas les répertoires\r\n\t\t\t //echo htmlentities($sdirs[$y]);\r\n \r\n\t\t\t $cwd1[0] = $dir;\r\n\t \t\t $cwd1[1] = $sdirs[$y];\r\n\t\t\t $chdir = join(\"/\", $cwd1);\r\n\t\t\t \r\n\t\t\t $var_retour = $var_retour.list_dir($chdir,$id_item,$chdir);\r\n\t\t }\r\n\t }\r\n\t \t\t \r\n\t chdir($chdir);\r\n\t \r\n\t if(is_array($sfiles))\r\n\t {\r\n\t \t sort($sfiles);\r\n\t \t reset($sfiles);\r\n\t\t \r\n\t\t $sizeof = sizeof($sfiles);\r\n\t\t \r\n\t\t for($y=0; $y<$sizeof; $y++)\r\n\t\t {\r\n\t\t\t $id_item++;\r\n\t\t\t if ($mon_dir) {\r\n\t\t\t\t $nom_path = str_replace($mon_path,\"\",$mon_dir).\"/\";\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t $nom_path = $rep;\r\n\t\t\t }\r\n\r\n\t\t\t$var_retour = $var_retour.\"<option value=\\\"\".$sfiles[$y].\"\\\">\".$sfiles[$y].\"</option>\"; \r\n\t\t }\r\n\t }\r\n\r\n\t return $var_retour;\r\n}", "function browse($dir) {\nglobal $filenames;\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file != \".\" && $file != \"..\" && is_file($dir.'/'.$file)) {\n $filenames[] = $dir.'/'.$file;\n }\n else if ($file != \".\" && $file != \"..\" && is_dir($dir.'/'.$file)) {\n browse($dir.'/'.$file);\n }\n }\n closedir($handle);\n }\n return $filenames;\n}", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "public function in_default_dir($src)\n {\n }", "public function in_default_dir($src)\n {\n }", "private function _runParse( $path = NULL )\n {\n $startLevels = $this->_getRealLevel( $this->_rootPath );\n $endLevels = $startLevels + $this->levels;\n $currentLevel = 0;\n\n if ( NULL !== $path )\n {\n $this->_dirs[ ] = $path;\n }\n\n do\n {\n $dir = array_shift( $this->_dirs );\n $currentLevel = $this->_getRealLevel( $dir );\n\n if ( $currentLevel < $endLevels )\n {\n $this->_parse( $dir );\n }\n } while ( count( $this->_dirs ) > 0 );\n }", "function recursiveDirectory($directory){\n foreach(glob(\"{$directory}/*\") as $file)\n {\n //echo \"recorriendo el FICHERO $file<br>\";\n\n if(is_dir($file)) {\n //echo \"directorio $directory fichero $file<br>\";\n anadirImagen($file);\n recursiveDirectory($file);\n } else {\n\n anadirImagen($file);\n\n }\n }\n anadirImagen($directory);\n $parent = dirname($directory);\n while (strcmp($parent, 'Repositorio') != 0) {\n anadirImagen($parent);\n $parent = dirname($parent);\n }\n}", "public function run() {\r\n\t\t$i = 1;\r\n\t\twhile ($i < self::NBR_OF_FILES) {\r\n\t\t\t$this->explore_path[0] = $this->get_path(0, $i);\r\n\t\t\t$j = 0;\r\n\t\t\twhile ($j < self::NBR_OF_FILES) {\r\n\t\t\t\t$this->explore_path[1] = $this->get_path(1, $j);\r\n\t\t\t\t$k = 0;\r\n\t\t\t\twhile ($k < self::NBR_OF_FILES) {\r\n\t\t\t\t\t$this->explore_path[2] = $this->get_path(2, $k);\r\n\t\t\t\t\tif (is_numeric(file_get_contents(self::FULL_URL.implode(\"\", $this->explore_path).'README')[0])) {\r\n\t\t\t\t\t\techo \"flag : \".file_get_contents(self::FULL_URL.implode(\"\", $this->explore_path).'README'). \"was found at path \".self::FULL_URL.implode(\"\", $this->explore_path);\r\n\t\t\t\t\t\treturn (0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$k++;\r\n\t\t\t\t}\r\n\t\t\t\t$j++;\r\n\t\t\t}\r\n\t\t\t$i++;\r\n\t\t}\r\n\t}", "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "function scan(SplFileInfo $fileInfo, $repository)\n{\n $baseName = $fileInfo->getBasename();\n if ($baseName === '.' || $baseName === '..') {\n return;\n }\n\n $file = new File($fileInfo);\n $repository->save($file);\n if ($fileInfo->isDir()) {\n foreach (new RecursiveDirectoryIterator($fileInfo) as $child) {\n scan($child, $repository);\n }\n }\n}", "function expand()\r\n\t{\r\n\t\t$this->subfoldersCollection = new Collection ( );\r\n\r\n\t\tif( $handle = opendir( $this->path ) )\r\n\t\t{\r\n\r\n\t\t\twhile($file = readdir($handle))\r\n\t\t\t{\r\n\t\t\t\tif( !is_file( $this->path . \"/\" . $file ) && $file!='.' && $file!='..' )\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\t$this->subfoldersCollection->add( new Folder( $this->path . '/' . $file ) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttrigger_error( \"houve algum erro na tentativa de abrir a pasta para manipulação\" );\r\n\t\t}\r\n\t}", "public function scanIniDir($dir) {\n\n //prevent ../../../ attach\n $full_data_dir = realpath($this->configuration['base_ini_dir']);\n $full_dir_unsafe = realpath($full_data_dir . '/' . $dir);\n $full_dir = $full_data_dir . str_replace($full_data_dir, '', $full_dir_unsafe);\n\n $a_out = array();\n if (!is_dir($full_dir_unsafe)) {\n die(\"pqz.class.php: Directory $dir Not Found / full dir $full_dir\");\n }\n\n $scanned_directory = array_diff(scandir($full_dir), array('..', '.'));\n $index = 0;\n foreach ($scanned_directory as $entry) {\n\n if (is_dir(\"$full_dir/$entry\")) {\n $a_out[$index]['type'] = \"dir\";\n $a_out[$index]['path'] = $dir . $entry . '/';\n $a_out[$index]['name'] = $entry;\n $index ++;\n } else {\n // is a file\n\n $filename = $full_dir . '/' . $entry;\n\n $file_parts = pathinfo($filename);\n if (strtolower($file_parts['extension']) == 'ini') {\n \n } else {\n if ($this->debug) {\n echo \"$filename NOT an ini file\";\n }\n }\n $ini_array = parse_ini_file($filename);\n\n if (isset($ini_array['title'])) {\n $a_out[$index] = $ini_array;\n $a_out[$index]['type'] = \"file\";\n $a_out[$index]['path'] = $dir . $entry;\n $a_out[$index]['name'] = $entry;\n $index ++;\n }\n }\n }\n\n // --- sort the multidimensional array ---\n // Obtain a list of columns\n foreach ($a_out as $key => $row) {\n $type[$key] = $row['type'];\n $name[$key] = $row['name'];\n $path[$key] = $row['path'];\n }\n\n// Sort the data with volume descending, edition ascending\n// Add $data as the last parameter, to sort by the common key\n array_multisort($type, SORT_ASC, $name, SORT_ASC, $path, SORT_ASC, $a_out);\n\n return $a_out;\n }", "function open_dir($dir, $newdir) {\n\t\tif( file_exists( $dir ) && file_exists( $newdir ) ) {\n\t\t\t$open_dir = opendir( $dir );\n\t\t\twhile ( false !== ($file = readdir( $open_dir )) ) {\n\t\t\t\tif( $file != \".\" && $file != \"..\" ) {\n\t\t\t\t\tif( @filetype( $dir . \"/\" . $file . \"/\" ) == \"dir\" ) {\n\t\t\t\t\t\tif( ! file_exists( $newdir . \"/\" . $file . \"/\" ) ) {\n\t\t\t\t\t\t\tmkdir( $newdir . \"/\" . $file . \"/\" );\n\t\t\t\t\t\t\t@chmod( $newdir . \"/\" . $file, 0777 );\n\t\t\t\t\t\t\topen_dir( $dir . \"/\" . $file . \"/\", $newdir . \"/\" . $file . \"/\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcopy( $dir . \"/\" . $file, $newdir . \"/\" . $file );\n\t\t\t\t\t\t@chmod( $newdir . \"/\" . $file, 0666 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "function ft_hook_dirlist() {}", "private function parse_directory_level($current_depth, $name, $tc_index, $test_node, $parent_id)\r\n {\r\n // first view directory_array, because import generally do in batches\r\n $dic_node_id = null;\r\n \r\n $find_in_dic = false;\r\n foreach ($this->directory_array[$current_depth] as $id => $dic_node)\r\n {\r\n if ($name == $dic_node->get_name() &&\r\n ($parent_id == $dic_node->get_parent() || $parent_id == null))\r\n {\r\n $dic_node_id = $dic_node->get_id();\r\n $find_in_dic = true;\r\n break;\r\n }\r\n }\r\n \r\n if (!$find_in_dic)\r\n {\r\n // then view the existed directory\r\n $find_in_existed = false;\r\n $parent_nh_id = null;\r\n \r\n if ($current_depth > 1)\r\n {\r\n $parent_node = $this->directory_array[$current_depth - 1][$parent_id];\r\n $parent_nh_id = $parent_node->get_nh_id();\r\n \r\n foreach ($this->existed_directory_array[$current_depth] as $exist_id => $exist_dic)\r\n {\r\n if ($name == $exist_dic['name'] && $parent_nh_id == $exist_dic['parent_id'])\r\n {\r\n $dic_new = new DicNode($this->directory_index[$current_depth], $name);\r\n $dic_new->set_nh_id($exist_dic['id']);\r\n $dic_new->set_parent($parent_id);\r\n $dic_node_id = $dic_new->get_id();\r\n $this->directory_array[$current_depth][$this->directory_index[$current_depth]] = $dic_new;\r\n $this->directory_index[$current_depth]++;\r\n $find_in_existed = true;\r\n break;\r\n }\r\n }\r\n }\r\n else \r\n {\r\n foreach ($this->existed_directory_array[$current_depth] as $exist_id => $exist_dic)\r\n {\r\n if ($name == $exist_dic['name'])\r\n {\r\n $dic_new = new DicNode($this->directory_index[$current_depth], $name);\r\n $dic_new->set_nh_id($exist_dic['id']);\r\n $dic_new->set_parent($parent_id);\r\n $dic_node_id = $dic_new->get_id();\r\n $this->directory_array[$current_depth][$this->directory_index[$current_depth]] = $dic_new;\r\n $this->directory_index[$current_depth]++;\r\n $find_in_existed = true;\r\n break;\r\n }\r\n }\r\n }\r\n \r\n \r\n if (!$find_in_existed)\r\n {\r\n $dic_new = new DicNode($this->directory_index[$current_depth], $name);\r\n $dic_new->set_parent($parent_id);\r\n $this->directory_array[$current_depth][$this->directory_index[$current_depth]] = $dic_new;\r\n $this->directory_index[$current_depth]++;\r\n $dic_node_id = $dic_new->get_id();\r\n }\r\n }\r\n \r\n return $dic_node_id;\r\n }", "private function _readDirRecursiv( $path, $prefix = '', &$seen = array() ) {\n\t\t$struct = array();\n\t\tif ( ( $dir = opendir( $path ) ) !== false ) {\n\t\t\twhile( ( $file = readdir( $dir ) ) !== false ) {\n\t\t\t\t\n\t\t\t\t// ignore curent and upper dir and all hidden files\n\t\t\t\tif ( preg_match( '/^\\./', $file ) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t// get abs path\n\t\t\t\t$abs = $path . '/'. $file;\n\t\t\t\t/*print( \"READING '$abs'\\n\" );*/\n\t\t\t\t\n\t\t\t\t// seen ?\n\t\t\t\tif ( isset( $seen[ $abs ] ) )\n\t\t\t\t\tcontinue;\n\t\t\t\t$seen[ $abs ] = true;\n\t\t\t\t\n\t\t\t\t// ignore snippets folders and admin files\n\t\t\t\tif ( $abs == ZC_CONTENTS. '/snippets' || preg_match( '/^admin-/', $file ) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t// we will determine title later one\n\t\t\t\t$title_file = $abs;\n\t\t\t\t$title = $file;\n\t\t\t\t$struct_name = null;\n\t\t\t\t\n\t\t\t\t// found tx file\n\t\t\t\tif ( is_file( $abs ) && preg_match( '/^(.+)\\.tx$/', $file, $match ) ) {\n\t\t\t\t\t$struct_name = $prefix. $match[1];\n\t\t\t\t\t$struct_name = preg_replace( '#/index$#', '', $struct_name );\n\t\t\t\t\tif ( ! isset( $struct[ $struct_name ] ) ) {\n\t\t\t\t\t\t$title = $match[1];\n\t\t\t\t\t\t$struct[ $struct_name ] = array(\n\t\t\t\t\t\t\t'title' => $title,\n\t\t\t\t\t\t\t'file'\t=> $abs,\n\t\t\t\t\t\t\t'pos'\t=> 99999,\n\t\t\t\t\t\t\t'sub'\t=> array()\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// found dir -> recurse\n\t\t\t\telseif ( is_dir( $abs ) ) {\n\t\t\t\t\t$title_file = \"$abs/index.tx\";\n\t\t\t\t\t$struct_name = $prefix. $file;\n\t\t\t\t\t$struct[ $struct_name ] = array(\n\t\t\t\t\t\t'title' => $title,\n\t\t\t\t\t\t'file'\t=> $title_file,\n\t\t\t\t\t\t'pos'\t=> 99999,\n\t\t\t\t\t);\n\t\t\t\t\t$struct[ $struct_name ][ 'sub' ]\n\t\t\t\t\t\t= $this->_readDirRecursiv( $abs, $prefix. $file . '/', $seen );\n\t\t\t\t\tif ( isset( $struct[ $struct_name ][ 'sub' ][ $struct_name ] ) )\n\t\t\t\t\t\tunset( $struct[ $struct_name ][ 'sub' ][ $struct_name ] );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// determine title and index\n\t\t\t\tif ( file_exists( $title_file ) && ( $fh = fopen( $title_file, 'r' ) ) !== false ) {\n\t\t\t\t\twhile ( ( $line = fgets( $fh ) ) !== false ) {\n\t\t\t\t\t\tif ( preg_match( '/^###title\\s+(?:(\\d+):\\s*)?([^\\n\\r]+)/ms', $line, $mtitle ) ) {\n\t\t\t\t\t\t\t$struct[ $struct_name ][ 'title' ] = $mtitle[2];\n\t\t\t\t\t\t\tif ( ! @empty( $mtitle[1] ) )\n\t\t\t\t\t\t\t\t$struct[ $struct_name ][ 'pos' ] = $mtitle[1];\n\t\t\t\t\t\t\tfclose( $fh );\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}\n\t\t\tclosedir( $dir );\n\t\t}\n\t\t\n\t\treturn $struct;\n\t}", "function showFileViewerContent() {\r\n global $currentPath;\r\n global $root;\r\n global $directory;\r\n global $parentPath;\r\n\r\n echo \"Path: \" . $currentPath . \"<br>\";\r\n\r\n addExitButton(); // Exit button directs the user to the home page.\r\n\r\n /* If parent path is the root path, we don't show the \"Back\" button, because if we do so, the user will see\r\n other users' folders and have access to them. */\r\n if ($parentPath != $root) {\r\n addBackButton($parentPath);\r\n }\r\n\r\n echo \"<hr>\";\r\n\r\n listFilesAndFolders($directory);\r\n}", "function checkDirectory($dir){\r\n\t\t\t\t\t\t\tif (is_dir($dir)) {\r\n\t\t\t\t\t\t\t\tif ($dh = opendir($dir)) {\r\n\t\t\t\t\t\t\t\t\twhile (($file = readdir($dh)) !== false) {\r\n\t\t\t\t\t\t\t\t\t\t if ($file == '.' || $file == '..') {\r\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t$file_path = $dir . DIRECTORY_SEPARATOR . $file;\r\n\t\t\t\t\t\t\t\t\t\tif(is_dir($file_path)){\r\n\t\t\t\t\t\t\t\t\t\t\techo \"<p class='content_title'>$file <p>\";\r\n\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\techo \"<p>$file <p>\";\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tclosedir($dh);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}", "function find($dir, $pattern){\n // escape any character in a string that might be used to trick\n // a shell command into executing arbitrary commands\n $dir = escapeshellcmd($dir);\n // get a list of all matching files in the current directory\n $files = glob(\"$dir/$pattern\");\n // find a list of all directories in the current directory\n // directories beginning with a dot are also included\n foreach (glob(\"$dir/{.[^.]*,*}\", GLOB_BRACE|GLOB_ONLYDIR) as $sub_dir){\n $arr = find($sub_dir, $pattern); // resursive call\n $files = array_merge($files, $arr); // merge array with files from subdirectory\n }\n // return all found files\n return $files;\n}", "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "function dirtree($dir, $f, &$ret, $search=null, $directory=null)\n\t{\n\t\t\n\t\t$tree = array();\n\t\t$uri = $dir.'/'.$f;\n\t\t$uri = str_replace(\"//\", \"/\", $uri);\n\t\t$handler = @opendir($uri);\n\t\t//open all directories\n\t\twhile ($file = @readdir($handler)) \n\t\t{\n \tif ($file != '.' && $file != '..')\n \t{\n \t\t$items = $dir.'/'.$f;\n \t\tif(is_dir($items.'/'.$file))\n \t\t{\n \t\t\tif($file[0] !='.')\n \t\t\t{\n\t \t\t\tif($search == null)\n\t \t\t\t\tdirtree($items, $file, $tree);\n\t \t\t\telse\n\t \t\t\t{\n\t \t\t\t\tif($directory != '')\n\t \t\t\t\t\t$src = $directory.'/'.$file;\n\t \t\t\t\telse\n\t \t\t\t\t\t$src = $file;\n\t \t\t\t\tdirtree($items, $file, &$ret,$search, $src);\n\t \t\t\t}\n \t\t\t}\n \t\t}\n \t\telse if($search != null) // If search mode true\n \t\t{\n \t\t\t$file_parts = pathinfo($file);\n\t \t\tif(strstr(strtolower($file),strtolower($search))) // If search string is in file name\n\t \t\t{\n\t \t\t\tif($directory != '') // If root dir\n \t\t\t\t\t$src = $directory.'/'.$file;\n \t\t\t\telse\n \t\t\t\t\t$src = $file;\n\t \t\t\t$item = array( 'src' => $src, 'file' => $file); \n\t \t\t\tif(isset($param))\n\t \t\t\t$param=\"\";\n\t \t\t\tif( @!is_dir($param.$file)) // If not dir and is picture file.\n\t \t\t\t{\n\t \t\t\t\t\n\t \t\t\t\tif(strtolower($file_parts['extension']) == 'jpeg' || strtolower($file_parts['extension']) == 'jpg' || strtolower($file_parts['extension']) == 'png' || strtolower($file_parts['extension']) == 'gif' || strtolower($file_parts['extension']) == 'bmp')\n\t \t\t\t\t{\t\n\t \t\t\t\t\t$uri = $dir.'/'.$f.'/'.$file;\n\t\t\t\t\t\t\t\t$uri = str_replace(\"//\", \"/\", $uri);\n\t \t\t\t\t\t@$size = getimagesize($uri);\n\t \t\t\t\t\t@$item['x'] = $size[0];\n\t \t\t\t\t\t@$item['y'] = $size[1];\n\t \t\t\t\t\tarray_push($ret, $item);\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n \t\t}\n \t}\n \t}\n \tif($search === null) // Add dir to aray\n \t{\n \t\t$it = array('name' => $f,'items' => $tree);\n \t\tarray_push($ret,$it);\n \t}\n\t}", "function dir_tree($dir,$search_string=\"0000\") {\r\n global $debug_jon,$dir_to_search;\r\n if($string_to_search==\"000\") return \"NoFile\";\r\n $path = '';\r\n $stack[] = $dir;\r\n while ($stack) {\r\n $thisdir = array_pop($stack);\r\n if ($dircont = scandir($thisdir)) {\r\n $i=0;\r\n while (isset($dircont[$i])) {\r\n if ($dircont[$i] !== '.' && $dircont[$i] !== '..') {\r\n $current_file = \"{$thisdir}/{$dircont[$i]}\";\r\n\t\t\t\t \r\n if (is_file($current_file)) {\r\n\t\t\t\t\t\t//$current_file=mb_convert_encoding($current_file,\"utf8\",\"8859-1\");\r\n\t\t\t\t\t\t$current_file= iconv( \"iso-8859-7\",\"utf-8\", $current_file );\r\n\t\t\t\t\t\t$dircont[$i]= iconv( \"iso-8859-7\",\"utf-8\", $dircont[$i] );\r\n\t\t\t\t\t if (strpos($current_file,$search_string)) {\r\n\t\t\t\t\t\t\t\techo \"<h3><a href='$current_file' target=_blank >$dircont[$i]</a></h3>\";\r\n\t\t\t\t\t\t\t\t//if($debug_jon) \r\n\t\t\t\t\t\t\t\t//echo \"<h2>smartDOWNLOADFILE ONLY<a href='../$dir_to_search/download.php?f=\". urlencode(\"$current_file\").\"' target=_blank >$dircont[$i]</a></h2>\";\r\n\t\t\t\t\t\t}\t\t\t\t \r\n $path[] = \"{$thisdir}/{$dircont[$i]}\";\r\n\t\t\t\t\t \r\n } elseif (is_dir($current_file)) {\r\n $path[] = \"{$thisdir}/{$dircont[$i]}\";\r\n $stack[] = $current_file;\r\n }\r\n }\r\n $i++;\r\n }\r\n }\r\n }\r\n return $path;\r\n}", "public function runOnDirectories(): bool;", "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "function browse_dir($initialpath, $showextensions = \"*\", $linktofile = true, $relativeto = \"\", $columns = \"f;u;g;s;m\", $dateformat = \"M d, G:i\", $showhidden = false, $shownoextension = false, $showparents = true)\n{\n\t\n\t\n\tglobal $rootpath;\n\tglobal $default_folder;\n\t\n\t$extensions = explode(\";\",$showextensions);\t// determine which extensions are to be shown\n\t$viewcolumns = explode(\";\",$columns);\t\t// determine which columns should be shown\n\t\n\t$filenames[0] = \"\"; // initialize an empty array to contain the filenames\n\t\n\t/*\n\t\tviewcolumns possible values:\n\t\t\tf: file/icon\n\t\t\tu: user information\n\t\t\tg: group information\n\t\t\ts: size\n\t\t\tm: modification date\n\t*/\n\t\n\tif ($dirhandle = @opendir($initialpath))\n\t{\n\t\t// the directory is open...\n\t\tif ($rootpath == $initialpath)\n\t\t{\n\t\t\techo \"<table id=\\\"root\\\" class=\\\"directory\\\" width=\\\"600\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\">\\n\";\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"<table class=\\\"directory\\\" width=\\\"100%\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\">\\n\";\n\t\t}\n\t\t\n\t\techo in_array(\"f\",$viewcolumns) ? \"\\t<th colspan=\\\"2\\\">/$initialpath</th>\\n\" : \"\";\n\t\techo in_array(\"u\",$viewcolumns) ? \"\\t<th class=\\\"user\\\">Owner</th>\\n\" : \"\";\n\t\techo in_array(\"g\",$viewcolumns) ? \"\\t<th class=\\\"group\\\">Group</th>\\n\" : \"\";\n\t\techo in_array(\"s\",$viewcolumns) ? \"\\t<th class=\\\"size\\\">Size</th>\\n\" : \"\";\n\t\techo in_array(\"m\",$viewcolumns) ? \"\\t<th class=\\\"modified\\\">Modified</th>\\n\" : \"\";\n\n\t\t$i = 0;\n\t\t// read all the filenames into an array, with the correct preceding path\n\t\twhile (false !== ($file = @readdir($dirhandle)))\n\t\t{\n\t\t\t$filenames[$i++] = $initialpath . \"/\". $file;\n\t\t}\n\t\t// sort this array according to file type\n\t\tusort($filenames, \"filetype_sort\");\n\t\t// split the array into directories and files\n\t\t/*\n\t\t$i = 0;\n\t\twhile (filetype($filenames[$i]) == \"dir\")\n\t\t{\n\t\t\t$dirnames[$i] = $filenames[$i];\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t$j = 0;\n\t\twhile (filetype($filenames[$i]) == \"file\")\n\t\t{\n\t\t\t$onlyfilenames[$j] = $filenames[$i];\n\t\t\t$i++;\n\t\t\t$j++;\n\t\t}\n\t\t\n\t\t$filenames = array_merge($dirnames, $onlyfilenames);\n\t\t\n\t\t//sort($filenames);\n\t\t*/\n\t\tfor ($i=0;$i<count($filenames);$i++)\n\t\t{\n\t\t\t// for each file...\n\t\t\t// work out just the filename part for checking later on\n\t\t\t$forwardslashparts = explode(\"/\",$filenames[$i]);\n\n\t\t\tswitch (filetype($filenames[$i]))\n\t\t\t{\n\t\t\t\tcase \"dir\":\n\t\t\t\t\t// show the parent dir stuff\n\t\t\t\t\tif (($filenames[$i] == $initialpath . \"/.\" || $filenames[$i] == $initialpath . \"/..\") && $showparents)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"\\t<tr>\\n\";\n\t\t\t\t\t\techo in_array(\"f\",$viewcolumns) ? \"\\t\\t<td class=\\\"icon\\\"><img src=\\\"$default_folder\\\" height=\\\"16\\\" width=\\\"16\\\" alt=\\\"\\\" /></td>\\n\\t\\t<td class=\\\"filename\\\">\".$forwardslashparts[count($forwardslashparts)-1].\"</td>\\n\" : \"\";\n\t\t\t\t\t\techo in_array(\"u\",$viewcolumns) ? \"\\t\\t<td class=\\\"user\\\">-</td>\\n\" : \"\";\n\t\t\t\t\t\techo in_array(\"g\",$viewcolumns) ? \"\\t\\t<td class=\\\"group\\\">-</td>\\n\" : \"\";\n\t\t\t\t\t\techo in_array(\"s\",$viewcolumns) ? \"\\t\\t<td class=\\\"filesize\\\">-</td>\\n\" : \"\";\n\t\t\t\t\t\techo in_array(\"m\",$viewcolumns) ? \"\\t\\t<td class=\\\"modified\\\">-</td>\\n\" : \"\";\n\t\t\t\t\t\techo \"\\t</tr>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\t// otherwise recurse the directory, assuming either it's not hidden or hidden files are being shown\n\t\t\t\t\telse if (substr($forwardslashparts[count($forwardslashparts)-1],0,1) != \".\" || $showhidden)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"\\t<tr>\\n\";\n\t\t\t\t\t\techo \"\\t\\t<td class=\\\"icon\\\"><a href=\\\"#\\\" onclick=\\\"toggleTableView('{$filenames[$i]}')\\\" title=\\\"collapse\\\\expand this directory (/{$filenames[$i]})\\\"><img src=\\\"$default_folder\\\" height=\\\"16\\\" width=\\\"16\\\" alt=\\\"\\\" /></a>\\n\";\n\t\t\t\t\t\techo \"\\t\\t<td id=\\\"{$filenames[$i]}\\\" class=\\\"subdir\\\" colspan=\\\"\".(count($viewcolumns)).\"\\\">\\n\";\n\t\t\t\t\t\techo \"\\t\\t<span><a href=\\\"#\\\" onclick=\\\"toggleTableView('{$filenames[$i]}')\\\" title=\\\"collapse\\\\expand this directory (/{$filenames[$i]})\\\">{$forwardslashparts[count($forwardslashparts)-1]}</a></span>\\n\";\n\t\t\t\t\t\tbrowse_dir($filenames[$i], $showextensions, $linktofile, $relativeto, $columns, $showhidden, $shownoextension);\n\t\t\t\t\t\techo \"\\t\\t</td>\\n\";\n\t\t\t\t\t\techo \"\\t</tr>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"file\":\n\t\t\t\t\t// if the file is of the right type then display it...\n\t\t\t\t\t$filenameparts = explode(\".\",$forwardslashparts[count($forwardslashparts)-1]);\n\t\t\t\t\tif (count($filenameparts) == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t// filename with no extension\n\t\t\t\t\t\tif ($shownoextension)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// show this file...\n\t\t\t\t\t\t\techo \"\\t<tr>\\n\";\n\t\t\t\t\t\t\techo in_array(\"f\",$viewcolumns) ? \"\\t\\t<td class=\\\"icon\\\"><img src=\\\"\".geticon(\"\").\"\\\" height=\\\"16\\\" width=\\\"16\\\" alt=\\\"\\\" /></td>\\n\\t\\t<td class=\\\"filename\\\">\".($linktofile ? \"<a href=\\\"$relativeto{$filenames[$i]}\\\" title=\\\"View /{$filenames[$i]}\\\">{$forwardslashparts[count($forwardslashparts)-1]}</a>\" : $forwardslashparts[count($forwardslashparts)-1]).\"</td>\\n\" : \"\";\n\t\t\t\t\t\t\tif (in_array(\"u\",$viewcolumns))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$fileowner_info = posix_getpwuid(fileowner($filenames[$i]));\n\t\t\t\t\t\t\t\techo \"\\t\\t<td class=\\\"user\\\">{$fileowner_info['name']}</td>\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (in_array(\"g\",$viewcolumns))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$filegroup_info = posix_getgrgid(filegroup($filenames[$i]));\n\t\t\t\t\t\t\t\techo \"\\t\\t<td class=\\\"group\\\">{$filegroup_info['name']}</td>\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (in_array(\"s\",$viewcolumns))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$filesizekb = round(filesize($filenames[$i])/1024,1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo \"\\t\\t<td class=\\\"filesize\\\">\";\n\t\t\t\t\t\t\t\techo $filesizekb > 999 ? round($filesizekb/1024,1) . \" Mb\" : $filesizekb . \" Kb\";\n\t\t\t\t\t\t\t\techo \"</td>\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo in_array(\"m\",$viewcolumns) ? \"\\t\\t<td class=\\\"modified\\\">\".date($dateformat,filectime($filenames[$i])).\"</td>\\n\" : \"\";\n\t\t\t\t\t\t\techo \"\\t</tr>\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// otherwise skip it...\n\t\t\t\t\t}\n\t\t\t\t\telse if ((in_array($filenameparts[count($filenameparts)-1],$extensions) || $showextensions == \"*\") && ($showhidden || substr($forwardslashparts[count($forwardslashparts)-1],0,1) != \".\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t// show this file...\n\t\t\t\t\t\t\n\t\t\t\t\t\techo \"\\t<tr>\\n\";\n\t\t\t\t\t\techo in_array(\"f\",$viewcolumns) ? \"\\t\\t<td class=\\\"icon\\\"><img src=\\\"\".geticon($filenameparts[count($filenameparts)-1]).\"\\\" height=\\\"16\\\" width=\\\"16\\\" alt=\\\"\\\" /></td>\\n\\t\\t<td class=\\\"filename\\\">\".($linktofile ? \"<a href=\\\"$relativeto{$filenames[$i]}\\\" title=\\\"View /{$filenames[$i]}\\\">{$forwardslashparts[count($forwardslashparts)-1]}</a>\" : $forwardslashparts[count($forwardslashparts)-1]).\"</td>\\n\" : \"\";\n\t\t\t\t\t\tif (in_array(\"u\",$viewcolumns))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$fileowner_info = posix_getpwuid(fileowner($filenames[$i]));\n\t\t\t\t\t\t\techo \"\\t\\t<td class=\\\"user\\\">{$fileowner_info['name']}</td>\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (in_array(\"g\",$viewcolumns))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$filegroup_info = posix_getgrgid(filegroup($filenames[$i]));\n\t\t\t\t\t\t\techo \"\\t\\t<td class=\\\"group\\\">{$filegroup_info['name']}</td>\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (in_array(\"s\",$viewcolumns))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$filesizekb = round(filesize($filenames[$i])/1024,1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo \"\\t\\t<td class=\\\"filesize\\\">\";\n\t\t\t\t\t\t\techo $filesizekb > 999 ? round($filesizekb/1024,1) . \" Mb\" : $filesizekb . \" Kb\";\n\t\t\t\t\t\t\techo \"</td>\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo in_array(\"m\",$viewcolumns) ? \"\\t\\t<td class=\\\"modified\\\">\".date($dateformat,filectime($filenames[$i])).\"</td>\\n\" : \"\";\n\t\t\t\t\t\techo \"\\t</tr>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"link\":\n\t\t\t\tcase \"block\":\n\t\t\t\tcase \"fifo\":\n\t\t\t\tcase \"char\":\n\t\t\t\tcase \"unknown\":\n\t\t\t\t\t// do absolutely nothing with these\n\t\t\t\t\t;\n\t\t\t}\n\t\t}\n\t\techo \"</table>\\n\";\n\t\tclosedir($dirhandle);\n\t}\n}", "protected function load($parentDirectory)\n {\n while (false !== ($entry = $parentDirectory->read())) {\n if ($entry !== '.' && $entry !== '..') {\n if (is_dir($entry)) {\n $tmpD = dir($entry);\n $this->load($tmpD);\n $tmpD->close();\n } else \n if (substr($entry, - strlen('.php')) === '.php') {\n $this[substr($entry, 0, - strlen('.php'))] = include $this->getPath() . $entry;\n }\n }\n }\n }", "public abstract function dir();", "function cd($changePath) {\n\t\t$this->intoArray = explode('/', $this->currentPath);\n\t\tarray_pop($this->intoArray);\n\t\t$this->newPath = implode('/', $this->intoArray); \n\n\t\t// go back one folder to a parent and change to a new dir (use ../ convention)\n\t\tif (substr($changePath, 0, strlen($this->cd)) == $this->cd) { // check for ../ convention..\n \t\t$changePath = substr($changePath, strlen($this->cd)); // keep folder name after ../\n \t\t$this->newPath .= '/' . $changePath; // and join parent path with a new folder\n\t\t\techo $this->newPath; // display new path\n\t\t\t// $this->currentPath = $this->newPath; // enable if if you want current path to be changed to a new one\n \t} else { // if user entered invalid path format, i.e. without ../\n\t\t\techo 'Entered path is not valid';\n\t\t}\n\t}", "function check_dir($dir, $entity)\n{\n // Collect files and directories in these arrays\n $directories = [];\n $files = [];\n \n // Skip old and unused functions directories (theoretically\n // it should only be in the English tree, but we are smart\n // and check for other language trees too...)\n if (preg_match(\"!/([a-z]{2}|pt_BR)/functions!\", $dir)) {\n return;\n }\n \n // Open and traverse the directory\n $handle = @opendir($dir);\n while ($file = @readdir($handle)) {\n \n // Collect directories and XML files\n if ($file != 'CVS' && $file != '.' &&\n $file != '..' && is_dir($dir.$file)) {\n $directories[] = $file;\n }\n elseif (strstr($file, \".xml\")) {\n $files[] = $file;\n }\n\n }\n @closedir($handle);\n \n // Sort files and directories\n sort($directories);\n sort($files);\n \n // Files first...\n foreach ($files as $file) {\n check_file($dir.$file, $entity);\n }\n\n // then the subdirs\n foreach ($directories as $file) {\n check_dir($dir.$file.\"/\", $entity);\n }\n}", "private function recSearchFiles($dir)\n {\n $ffs = scandir($dir);\n\n foreach ($ffs as $ff) {\n\n if ($ff != '.' && $ff != '..') {\n\n if (is_dir($dir . '/' . $ff)) {\n $this->recSearchFiles($dir . $ff . '/');\n } else if (strlen($ff) >= 5) {\n $this->searchedFiles[] = $dir . $ff;\n }\n }\n }\n }", "private function _parse( $dir )\n {\n foreach ( scandir( $dir ) as $file )\n {\n if ( '.' === $file || '..' === $file )\n {\n continue;\n }\n\n if ( is_dir( $dir . DS . $file ) )\n {\n $this->_dirs[ ] = $dir . DS . $file;\n\n $this->dirHandles[ ] = $dir . DS . $file;\n }\n elseif ( 'file' === filetype( $dir . DS . $file ) )\n {\n $this->fileHandles[ ] = $dir . DS . $file;\n }\n elseif ( 'link' === filetype( $dir . DS . $file ) )\n {\n $this->linkHandles[ ] = $dir . DS . $file;\n }\n }\n }", "function thescandir($dir, $level){\n\t$is_dir = true;\n\t\n\tif( !($files = @scandir($dir)) ) // s'il y a une erreur au scandir c'est que c'est un fichier.\n\t{\n\t\t$basename = pathinfo($dir,PATHINFO_BASENAME);\n\t\t$is_dir = false;\n\t\t\n\t\t// si c'est bien un fichier PHP\n\t\tif( substr(strtolower(strrchr(basename($basename), \".\")), 1) == 'php' ){\n\t\t\t// On ajoute le fichier au listing\n\t\t\t$offset = count( $_SESSION['Listing_Fichiers'] );\n\t\t\t$_SESSION['Listing_Fichiers'][$offset] = $dir;//$basename;\n\t\t\t//echo \"base : \".$basename.\" | dir : \".$dir.\"<br/>\";\n\t\t}\n\t}\n\telse\n\t{\n\t\tif($dir != \".\" and $dir != \"..\" )\n\t\t{\n\n\t\t}\n\t\t$is_dir = true;\n\t\t$level ++;\n\t}\n\t\n\tif($dir != \".\" and $dir != \"..\" )\n\t{\n\t\t$extension = pathinfo($dir,PATHINFO_EXTENSION);\n\t\t$basename = pathinfo($dir,PATHINFO_BASENAME);\n\t\t\n\t}\n\t\n\t// recursivité\n\t$i=0;\n\twhile( @$files[$i] )\n\t{\n\t\tif($files[$i] != \".\" and $files[$i] != \"..\")\n\t\t{\t\t\t\t\n\t\t\t$newdir = $dir.\"/\".$files[$i];//concatène les noms de dossiers\n\t\t\t\t\n\t\t\tif($dir == \".\")\n\t\t\t\t$newdir = $files[$i];\n\t\t\t\t\n\t\t\tthescandir($newdir, $level); \n\t\t}\n\t\t\n\t\t$i++;\n\t}\n\n\t\n}", "public function dir_readdir() {}", "public function recursivelyIterateDirectory()\n\t{\n\t\treturn new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->getPath()));\n\t}", "private function recurseThroughDirectory($baseDir, $lookingFor = \"/(.*)\\.php$/i\")\n {\n $results = array();\n $di = new RecursiveDirectoryIterator($baseDir);\n\n $this->output->writeLn(\"Scanning $baseDir...\");\n\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n if (preg_match($lookingFor, $filename)) {\n $results[] = $this->extractFrom($filename);\n }\n }\n\n return $results;\n }", "function find_file ($dirname, $fname, &$file_path) {\n $dir = opendir($dirname);\n\n while ($file = readdir($dir)) {\n if (empty($file_path) && $file != '.' && $file != '..') {\n if (is_dir($dirname.'/'.$file)) {\n find_file($dirname.'/'.$file, $fname, $file_path);\n }\n else {\n if (file_exists($dirname.'/'.$fname)) {\n $file_path = $dirname.'/'.$fname;\n return;\n }\n }\n }\n }\n\n}", "private function parse_directory_tree()\r\n {\r\n foreach ($this->tc_step_data_list as $tc_index => $testcase_node)\r\n {\r\n $first_level = $testcase_node->get_first_level();\r\n $first_id = null;\r\n $second_level = $testcase_node->get_second_level();\r\n $second_id = null;\r\n $third_level = $testcase_node->get_third_level();\r\n $third_id = null;\r\n $fourth_level = $testcase_node->get_fourth_level();\r\n $fourth_id = null;\r\n $fifth_level = $testcase_node->get_fifth_level();\r\n $fifth_id = null;\r\n \r\n if ($first_level != null && $first_level != \"\" && trim($first_level) != \"\")\r\n {\r\n $first_id = $this->parse_directory_level(1, $first_level, \r\n $tc_index, $testcase_node, null);\r\n }\r\n \r\n if ($second_level != null && $second_level != \"\" && trim($second_level) != \"\")\r\n {\r\n $second_id = $this->parse_directory_level(2, $second_level,\r\n $tc_index, $testcase_node, $first_id);\r\n }\r\n else \r\n {\r\n // no second level dic, means testcase in first dic\r\n $tc_parent = $this->directory_array[1][$first_id];\r\n $tc_parent->add_tc_step($tc_index);\r\n continue;\r\n }\r\n \r\n if ($third_level != null && $third_level != \"\" && trim($third_level) != \"\")\r\n {\r\n $third_id = $this->parse_directory_level(3, $third_level,\r\n $tc_index, $testcase_node, $second_id);\r\n }\r\n else\r\n {\r\n // no third level dic, means testcase in second dic\r\n $tc_parent = $this->directory_array[2][$second_id];\r\n $tc_parent->add_tc_step($tc_index);\r\n continue;\r\n }\r\n \r\n if ($fourth_level != null && $fourth_level != \"\" && trim($fourth_level) != \"\")\r\n {\r\n $fourth_id = $this->parse_directory_level(4, $fourth_level,\r\n $tc_index, $testcase_node, $third_id);\r\n }\r\n else\r\n {\r\n // no fourth level dic, means testcase in third dic\r\n $tc_parent = $this->directory_array[3][$third_id];\r\n $tc_parent->add_tc_step($tc_index);\r\n continue;\r\n }\r\n \r\n if ($fifth_level != null && $fifth_level != \"\" || trim($fifth_level) != \"\")\r\n {\r\n // the last level dic\r\n $fifth_id = $this->parse_directory_level(5, $fifth_level,\r\n $tc_index, $testcase_node, $fourth_id);\r\n $tc_parent = $this->directory_array[5][$fifth_id];\r\n $tc_parent->add_tc_step($tc_index);\r\n }\r\n else\r\n {\r\n // no fifth level dic, means testcase in fourth dic\r\n $tc_parent = $this->directory_array[4][$fourth_id];\r\n $tc_parent->add_tc_step($tc_index);\r\n }\r\n }\r\n }", "function scan_students()\n {\n $current_students = [];\n $di = new RecursiveDirectoryIterator('students/');\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n $path_info = pathinfo($filename);\n if($path_info['extension']=='json'){\n array_push($current_students,$path_info['filename']);\n }\n }\n // echo print_r($current_students);\n return $current_students;\n }", "private function scan_registry_dir($directory, &$message = '') {\n \tglobal $dbKITregistryFiles;\n \tglobal $dbKITregistryCfg;\n\n \t$sub_dirs = $dbKITregistryCfg->getValue(dbKITregistryCfg::cfgRegistryListTabs);\n\n $handle = opendir($directory);\n while ($file = readdir($handle)) {\n if ($file != \".\" && $file != \"..\") {\n if (is_dir($directory.$file)) {\n // Erneuter Funktionsaufruf, um das aktuelle Verzeichnis auszulesen\n $this->scan_registry_dir($directory.$file.'/');\n }\n else {\n // Wenn Verzeichnis-Eintrag eine Datei ist, diese ausgeben\n $actual_file = page_filename(utf8_encode($file));\n $actual_file = $directory.$actual_file;\n $where = array(dbKITregistryFiles::field_filepath_registry => $actual_file);\n $data = array();\n if (!$dbKITregistryFiles->sqlSelectRecord($where, $data)) {\n \t$this->setError($dbKITregistryFiles->getError());\n \treturn false;\n }\n if (count($data) > 0) {\n \t// Datensatz existiert\n \t$data = $data[0];\n \t$update = array();\n \t// Vergleichen, ob sich etwas veraendert hat\n \tif (filemtime($actual_file) != $data[dbKITregistryFiles::field_filemtime]) {\n \t\t$update[dbKITregistryFiles::field_filemtime] = filemtime($actual_file);\n \t}\n \tif (filesize($actual_file) != $data[dbKITregistryFiles::field_filesize]) {\n \t\t$update[dbKITregistryFiles::field_filesize] = filesize($actual_file);\n \t}\n \tif ($data[dbKITregistryFiles::field_status] == dbKITregistryFiles::status_deleted) {\n \t\t$update[dbKITregistryFiles::field_status] = dbKITregistryFiles::status_active;\n \t\t$message .= sprintf(reg_msg_registry_file_undeleted, $data[dbKITregistryFiles::field_filename_registry]);\n \t}\n \tif (count($update) > 0) {\n \t\t$where = array(dbKITregistryFiles::field_id => $data[dbKITregistryFiles::field_id]);\n \t\tif (!$dbKITregistryFiles->sqlUpdateRecord($update, $where)) {\n \t\t\t$this->setError($dbKITregistryFiles->getError());\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_updated, $data[dbKITregistryFiles::field_filename_registry]);\n \t}\n }\n else {\n \t// es existiert noch kein Eintrag\n \tif (!file_exists($actual_file)) {\n \t\t// Datei muss noch umbenannt werden\n \t\tif (!rename($directory.$file, $actual_file)) {\n \t\t\t$this->setError(sprintf(reg_error_rename_file, basename($directory.$file), basename($actual_file)));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_renamed, basename($directory.$file), basename($actual_file));\n \t}\n \t$sub_dir = substr(basename($actual_file), 0, 1);\n \tif (!in_array($sub_dir, $sub_dirs)) $sub_dir = '#';\n \tif (!file_exists($this->registry_path.$sub_dir)) {\n \t\tif (!mkdir($this->registry_path.$sub_dir)) {\n \t\t\t$this->setError(sprintf(reg_error_mkdir, $this->registry_path.$sub_dir));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_mkdir, '/'.$sub_dir);\n \t}\n \t$check_file = page_filename(utf8_encode($file));\n \t$check_file = $this->registry_path.$sub_dir.'/'.$check_file;\n \t// pruefen, ob sich die Datei im richtigen Verzeichnis befindet\n \tif ($actual_file != $check_file) {\n \t\tif (!rename($actual_file, $check_file)) {\n \t\t\t$this->setError(sprintf(reg_error_rename_file, basename($actual_file), '/'.$sub_dir.'/'.basename($check_file)));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_moved, basename($actual_file), $sub_dir);\n \t\t$actual_file = $check_file;\n \t}\n \t$data = array(\n \t\tdbKITregistryFiles::field_filename_original\t\t\t=> utf8_encode(basename($directory.$file)),\n \t\tdbKITregistryFiles::field_filename_registry\t\t\t=> basename($actual_file),\n \t\tdbKITregistryFiles::field_filepath_registry\t\t\t=> $actual_file,\n \t\tdbKITregistryFiles::field_filemtime\t\t\t\t\t\t\t=> filemtime($actual_file),\n \t\tdbKITregistryFiles::field_filesize\t\t\t\t\t\t\t=> filesize($actual_file),\n \t\tdbKITregistryFiles::field_filetype\t\t\t\t\t\t\t=> pathinfo($actual_file, PATHINFO_EXTENSION),\n \t\tdbKITregistryFiles::field_status\t\t\t\t\t\t\t\t=> dbKITregistryFiles::status_active,\n \t\tdbKITregistryFiles::field_sub_dir\t\t\t\t\t\t\t\t=> $sub_dir\n \t);\n \t$id = -1;\n \tif (!$dbKITregistryFiles->sqlInsertRecord($data, $id)) {\n \t\t$this->setError($dbKITregistryFiles->getError());\n \t\treturn false;\n \t}\n \t$message .= sprintf(reg_msg_registry_file_added, $data[dbKITregistryFiles::field_filename_registry]);\n }\n }\n }\n }\n closedir($handle);\n }", "abstract public function directoryLocation();", "function svn_fs_dir_entries($fsroot, $path)\n{\n}", "private function readFolder($path, $parent, $depth)\n {\n // Remove . and ..\n\n// $files = array_diff(scandir($path), array('.', '..'));\n $files = scandir(($path)) ? array_diff(scandir($path), array('.', '..')) : null;\n\n// $files = scandir($this->path);\n\n if ($this->isDebug) {\n echo '<h2>Contents of ' . $path . '</h2><pre>';\n print_r($files);\n echo '</pre>';\n }\n\n if ($files == null) {\n return;\n }\n\n $count = 0;\n foreach ($files as $file) {\n\n // Instantiate classes and store their filenames and titles in an array\n\n\n $filePath = $path . $file;\n if ($this->isDebug) {\n echo 'readFolder() | filePath = ' . $filePath . '<br>';\n }\n\n if (is_dir($filePath)) {\n if ($this->isDebug) {\n echo $count++ . ' | Site readFolder() | ' . $filePath . ' is a directory with a depth of ' . $depth . '<br>';\n }\n\n switch ($depth) {\n\n // Is a course\n case 0:\n\n // Add the directory path to the courses array\n array_push($this->courses, $this->stripClassNameFromFilePath($filePath));\n\n $this->structure[$parent][$this->stripClassNameFromFilePath($filePath, true)] = array();\n\n break;\n\n // Is a Topic\n case 1:\n\n // Add the directory path to the topics array\n array_push($this->topics, $this->stripClassNameFromFilePath($filePath));\n\n $this->structure['Courses'][$parent][$this->stripClassNameFromFilePath($filePath, true)] = array();\n\n break;\n }\n if ($this->isDebug) {\n echo '<br>$filePath = ' . $filePath . '<hr>';\n }\n\n $this->readFolder($filePath . '/', $this->stripClassNameFromFilePath($filePath, true), $this->directoryLevel + 1);\n } elseif (is_file($filePath)) {\n if ($this->isDebug) {\n echo $count++ . ' | Site readFolder() | ' . $filePath . ' is a file with a depth of ' . $depth . '<br>';\n }\n\n // Break the filePath into an array on the '/'\n $array = explode(\n '/',\n $filePath\n );\n\n $page = $this->stripExtFromFile($array[count($array) - 1]);\n $module = $array[count($array) - 2];\n $course = $array[count($array) - 3];\n $temp = [\n $module,\n $course]\n ;\n $this->allPages[$page] = $temp;\n\n// array_push($this->allPages, $temp);\n\n $className = $this->stripClassNameFromFilePath($filePath);\n\n // Add the file to the modules array\n\n array_push($this->modules, $className);\n\n $this->createNavbarArray($filePath);\n\n $this->modulesAssoc[$className] = $filePath;\n }\n }\n }", "function setDir()\n{\n\t// This script is sometimes called from the other directories - for auto sending, so we need to change the directory\n\t$pos = strrpos(__FILE__, '/');\n\tif ($pos === false)\n\t{\n\t\t$pos = strrpos(__FILE__, '\\\\');\n\t\tif ($pos === false)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}\n\t$dir = substr(__FILE__, 0, $pos);\n\tchdir($dir);\n}", "function list_dir($chdir) {\r\n\t/* some globals, some cleaning */\r\n\tglobal $root, $prefix, $PHP_SELF, $SERVER_NAME, $showsize, $display, $excludedir, $excludefile;\r\n\tunset($sdirs);\r\n\tunset($sfiles);\r\n\tchdir($chdir);\r\n\t$self = basename($PHP_SELF);\r\n\r\n\t/* open current directory */\r\n\t$handle = opendir('.');\r\n\t/* read directory. If the item is a directory, place it in $sdirs, if it's a filetype we want\r\n\t * and not this file, put it in $sfiles */\r\n\twhile ($file = readdir($handle))\r\n\t{\r\n\t\tif(is_dir($file) && $file != \".\" && $file != \"..\" && !in_array($file, $excludedir))\r\n\t\t{ $sdirs[] = $file; }\r\n\t\telseif(is_file($file) && $file != \"$self\" && array_key_exists(get_extension($file), $display)\r\n\t\t\t&& !in_array($file, $excludefile))\r\n\t\t{ $sfiles[] = $file; }\r\n\t}\r\n\r\n\t/* count the slashes to determine how deep we're in the directory tree and how many\r\n\t * nice bars we need to add */\r\n\t$dir = getcwd();\r\n\t$dir1 = str_replace($root, \"\", $dir.\"/\");\r\n\t$count = substr_count($dir1, \"/\") + substr_count($dir1, \"\\\\\") - (substr_count($root, \"/\")-1);\r\n\r\n\t/* display directory names and recursively list all of them */\r\n\tif(isset($sdirs) && is_array($sdirs)) {\r\n\t\tsort($sdirs);\r\n\t\treset($sdirs);\r\n\r\n\t\tfor($y=0; $y<sizeof($sdirs); $y++) {\r\n\t\t\techo \"<tr><td>\";\r\n\t\t\tfor($z=1; $z<=$count; $z++)\r\n\t\t \t{ echo \"<img align=absmiddle src=comu/sitemap/vertical.gif>&nbsp;&nbsp;&nbsp;\"; }\r\n\t\t\tif((isset($sfiles) && is_array($sfiles)) || $y<sizeof($sdirs)-1)\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/verhor.gif>\"; }\r\n\t\t\telse\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/verhor1.gif>\"; }\r\n\t\t\techo \"<img align=absmiddle src=comu/sitemap/folder.gif> <a href=\\\"http://$SERVER_NAME$prefix/$dir1$sdirs[$y]\\\" target=\\\"_blank\\\" class=\\\"blau10b\\\">$sdirs[$y]</a>\";\r\n\t\t\tlist_dir($dir.\"/\".$sdirs[$y]);\r\n\t\t}\r\n\t}\r\n\r\n\tchdir($chdir);\r\n\r\n\t/* iterate through the array of files and display them */\r\n\tif(isset($sfiles) && is_array($sfiles)) {\r\n\t\tsort($sfiles);\r\n\t\treset($sfiles);\r\n\r\n\t\t$sizeof = sizeof($sfiles);\r\n\r\n\t\t/* what file types shall be displayed? */\r\n\t\tfor($y=0; $y<$sizeof; $y++) {\r\n\t\t\techo \"<tr><td>\";\r\n\t\t\tfor($z=1; $z<=$count; $z++)\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/vertical.gif>&nbsp;&nbsp;&nbsp;\"; }\r\n\t\t\tif($y == ($sizeof -1))\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/verhor1.gif>\"; }\r\n\t\t\telse\r\n\t\t\t{ echo \"<img align=absmiddle src=comu/sitemap/verhor.gif>\"; }\r\n\t\t\techo \"<img align=absmiddle src=comu/sitemap/\";\r\n\t\t\techo $display[get_extension($sfiles[$y])];\r\n\t\t\techo \"> \";\r\n\r\n\r\n\t\t\t\t$valorlink=\"$prefix/$dir1$sfiles[$y]\";\r\n\t\t\t\t//echo \"<a href=\\\"$valorlink\\\" class=\\\"blau10\\\" target=\\\"_blank\\\">$sfiles[$y]</a>\";\r\n\t\t\t\techo '<a href=\"#\" class=\"blau10\" onclick=\"OpenFile(\\''.$valorlink.'\\');return false;\">'.$sfiles[$y].'</a>';\r\n\r\n\t\t\t/*if (!isset($_GET['nocopy'])) {\r\n\t\t\t\t//per copiar link\r\n\t\t\t\techo \"<input type=hidden name=\\\"$dir1$sfiles[$y]\\\" id=\\\"$dir1$sfiles[$y]\\\" value=\\\"$valorlink\\\">\";\r\n\t\t\t\techo \"&nbsp;&nbsp;&nbsp;<a href=\\\"javascript:CopyClipboard('$dir1$sfiles[$y]')\\\" title=\\\"copiar el vincle al portapapers\\\">copiar vincle</a>\";\r\n\t\t\t\t//fi\r\n\t\t\t}*/\r\n\r\n\t\t\tif($showsize) {\r\n\t\t\t\t$fsize = @filesize($sfiles[$y])/1024;\r\n\t\t\t\tprintf(\" (%.2f kB)\", $fsize);\r\n\t\t\t}\r\n\t\t\techo \"</td></tr>\";\r\n\r\n\r\n\r\n\t\t}\r\n\t\techo \"<tr><td>\";\r\n\t\tfor($z=1; $z<=$count; $z++)\r\n\t\t{ echo \"<img align=absmiddle src=comu/sitemap/vertical.gif>&nbsp;&nbsp;&nbsp;\"; }\r\n\t\techo \"</td></tr>\\n\";\r\n\t}\r\n}", "public function traverse($path = '.')\n {\n $path_list = glob($path.'/*', GLOB_ONLYDIR);\n \n $this->_dirlist[$path] = glob($path.'/*'); \n \n if ( empty ($path_list) )\n {\n \t \treturn;\t\n }\n else\n {\n \tforeach ( $path_list as $key => $value ) \n \t{\n \t\tif ($path !== '.') \n \t\t{\n \t\t\t//just the child dirs\n \t\t\t$this->traverse($path.'/'. substr($value, strlen($path)+1 ) );\n \t\t} \n \t\telse \n \t\t{\n \t\t\t$this->traverse($value);\n \t\t}\n \t} \t\n } \t\n }", "function process_category_directory($dir,$categoryname) {\n \n echo \"<h3>Processing Directory '$categoryname'</h3>\";\n flush();\n \n //add trailing slash\n if ($dir[strlen($dir)-1] != '/') {\n $dir .= '/';\n }\n //is this a directory\n if (!is_dir($dir)) {\n return;\n }\n \n //add this category\n $category = new stdClass;\n $category->qtype = 'category';\n $category->name = trim($categoryname);\n $category->category['text'][0]['#'] = $category->name;\n $this->questions[] = $category; \n //data arrays\n $categorydirs = array();\n $questionfiles = array();\n $setfiles = array();\n $questiondirs = array();\n $otherfiles = array();\n \n echo \"---Loaded Files: \";\n flush();\n \n //categorize the stuff in this directory into arrays\n $dir_handle = opendir($dir);\n while ($filename = readdir($dir_handle)) {\n if (!in_array($filename, array('.','..','CVS','.svn','__MACOSX','.DS_STORE'))) {\n $filepath = $dir . $filename;\n $type = filetype($filepath);\n \n //divide the entities in this directory\n if($type == 'dir') {\n array_push($categorydirs,$filename);\n } elseif ($type == 'file') {\n if ((is_file($filepath)) && (is_readable($filepath))) {\n if($this->is_problem_file($filename)) {\n array_push($questionfiles,$filename);\n } elseif($this->is_set_file($filename)) {\n array_push($setfiles,$filename);\n }\n }\n } else {\n array_push($otherfiles,$filename);\n }\n echo \".\";\n flush();\n }\n }\n echo \"Done<br>\";\n flush();\n \n \n \n //deal with the question files\n echo \"---Processing Simple Questions: \";\n flush();\n foreach($questionfiles as $questionfile) {\n $codefile = $dir . $questionfile;\n $this->process_question($codefile);\n echo \".\";\n flush();\n }\n echo \"Done<br>\";\n flush();\n \n //deal with the set definition files\n echo \"---Processing Set Definitions: \";\n flush();\n foreach($setfiles as $setfilename) {\n $thefile = $dir . '/'. $setfilename;\n $this->process_set_definition($thefile);\n echo \".\";\n flush();\n \n }\n echo \"Done<br>\";\n flush();\n \n //deal with nested directories\n foreach($categorydirs as $categorydir) {\n $categorypath = $dir . $categorydir;\n $this->process_category_directory($categorypath,$categoryname.'/'.$categorydir);\n }\n }", "function open_and_scan($SCAN_DIRECTORY,$prev_files){\n\tglobal $files,$exempt_files,$prev_files,$exempt_directory;\n\t$changed_files = '';\n\t$file_details = stat($SCAN_DIRECTORY);\n\t$dt = array();\n\tforeach($file_details as $key=>$info){\n\t\t$dt[$key] = $info;\n\t}\n\t$data = array(\n\t\t'file'=>$SCAN_DIRECTORY,\n\t\t'info'=>$dt\n\t);\n\tarray_push($files,$data);\n\t$changed_files .= get_prev_stats($SCAN_DIRECTORY,$prev_files);\n\t\t\t\t\t\n\t$handle = opendir($SCAN_DIRECTORY);\n\twhile($f = readdir($handle)){\n\t\tif($f != '.' && $f != '..'){\n\t\t\tif(!is_dir($SCAN_DIRECTORY.$f)){\n\t\t\t\t$file_array = explode('.',$f);\n\t\t\t\t$count = count($file_array);\n\t\t\t\t$extension = $file_array[$count-1];\n\t\t\t\tif($count > 1 && !in_array($extension,$exempt_files)){\n\t\t\t\t\t$file_details = stat($SCAN_DIRECTORY.$f);\n\t\t\t\t\t$dt = array();\n\t\t\t\t\tforeach($file_details as $key=>$info){\n\t\t\t\t\t\t$dt[$key] = $info;\n\t\t\t\t\t}\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'file'=>$SCAN_DIRECTORY.$f,\n\t\t\t\t\t\t'info'=>$dt\n\t\t\t\t\t);\n\t\t\t\t\tarray_push($files,$data);\n\t\t\t\t\t$changed_files .= get_prev_stats($SCAN_DIRECTORY.$f,$prev_files);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!in_array($f,$exempt_directory)){\n\t\t\t\t\topen_and_scan($SCAN_DIRECTORY.$f.'/',$prev_files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn array(\n\t\t'changed'=>$changed_files,\n\t\t'files'=>$files\n\t);\n}", "function wp_find_hierarchy_loop($callback, $start, $start_parent, $callback_args = array())\n {\n }", "private function checkDir()\n {\n $this->init = $this->url[0].'/';\n\n for ($i=0; $i < $this->count; $i++) { \n if (is_dir($this->init)) {\n if ($i == 0) {\n $this->dir .= $this->init;\n } elseif (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n } else {\n if ($i == 0) {\n $this->dir .= 'views/';\n }\n \n if (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n \n }\n }\n\n $this->dir = str_replace(\"//\", \"/\", $this->dir);\n $this->checkFile();\n }", "abstract function changedir($path = '', $supress_debug = FALSE);", "function l10n_drupal_files_scan($source = NULL, $automated = FALSE) {\n\n // We look for projects in the working directory.\n $workdir = variable_get('l10n_server_connector_l10n_drupal_files_directory', '');\n\n if (!is_dir($workdir)) {\n drupal_set_message(t('The configured directory (%workdir) cannot be found. <a href=\"@configure\">Check your configuration</a>.', array('%workdir' => $workdir, '@configure' => url('admin/l10n_server/connectors/config/l10n_drupal/files'))));\n }\n else {\n // define a list of allowed extensions, we will use it later on file_scan_directory\n // and further regular expression buildung processing. Thanks to EugenMayer\n $allowed_file_extensions = array('.tar.gz', '.tgz');\n // build the regular expression\n foreach($allowed_file_extensions as $key => $extension) {\n // escape the file extensions for later regular expression usage\n $allowed_file_extensions[$key] = preg_quote($extension);\n }\n $file_extension_pattern = '(' . implode('|', $allowed_file_extensions) . ')$';\n\n // Packages are always .tar.gz files.\n $files = file_scan_directory($workdir, $file_extension_pattern);\n if (count($files)) {\n foreach ($files as $path => $file) {\n\n if (!l10n_drupal_is_supported_version($path)) {\n // Skip files for unsupported versions.\n continue;\n }\n\n // Get rid of $workdir prefix on file names, eg.\n // drupal-6.x-6.19.tar.gz\n // Drupal/drupal-4.6.7.tar.gz or\n // files/Ubercart/ubercart-5.x-1.0-alpha8.tar.gz.\n $path = $package = trim(preg_replace('!(^' . preg_quote($workdir, '!') . ')(.+)\\.tar\\.gz!', '\\2', $path), '/');\n\n // split the filename into parts to $filename_splitted\n // [0] = the full string\n // [1] = the subdirectory and filename with extension\n // [1] = the subdirectory and filename without extension\n // [2] = the extension .tar.gz or .tgz\n $file_splitted = array(); // ensure to be a array....\n // the regular expression pattern (i put it in a var because i can better handle it with dpm for debugging, move if you want...)\n $file_split_pattern = '!^'. preg_quote($workdir, '!') .'((.+)'. $file_extension_pattern .')!';\n preg_match( $file_split_pattern, $path, $file_splitted );\n // put the result in vars for better handling\n list($file_fullpath, $file_subpath_ext, $file_subpath, $file_extension) = $file_splitted;\n\n // redefine the path to subpath without slash at beginning\n $path = trim($file_subpath, '/');\n // same on package\n $package = trim($file_subpath, '/');\n $project_title = '';\n if (strpos($path, '/')) {\n // We have a slash, so this package is in a subfolder.\n // Eg. Drupal/drupal-4.6.7 or Ubercart/ubercart-5.x-1.0-alpha8.\n // Grab the directory name as project title.\n list($project_title, $package) = explode('/', $path);\n }\n if (strpos($package, '-')) {\n // Only remaining are the project uri and release,\n // eg. drupal-4.6.7 or ubercart-5.x-1.0-alpha8.\n list($project_uri, $release_version) = explode('-', $package, 2);\n\n l10n_drupal_save_data($project_uri, ($project_title ? $project_title : $project_uri), $release_version, trim($file_subpath_ext, '/'), filemtime($file->filename));\n }\n else {\n // File name not formatted properly.\n $result['error'] = t('File name should have project codename and version number included separated with hyphen, such as drupal-5.2.tar.gz.');\n }\n }\n }\n }\n\n $user_feedback = FALSE;\n $results = db_query_range(\"SELECT * FROM {l10n_server_release} WHERE pid IN (SELECT pid FROM {l10n_server_project} WHERE connector_module = 'l10n_drupal_files' AND status = 1) ORDER BY last_parsed ASC\", 0, variable_get('l10n_server_connector_l10n_drupal_files_limit', 1));\n while ($release = db_fetch_object($results)) {\n\n // Only parse file if something changed since we last parsed it.\n $file_name = $workdir . '/' . $release->download_link;\n\n if (file_exists($file_name)) {\n if (filemtime($file_name) > $release->last_parsed) {\n $result = l10n_drupal_parse_package($file_name, $release);\n\n // User feedback, if not automated. Log messages are already done.\n if (isset($result['error']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['error'], 'error');\n }\n elseif (isset($result['message']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['message']);\n }\n }\n else {\n if (!$automated) {\n $user_feedback = TRUE;\n drupal_set_message(t('@release was already parsed, no need to scan again.', array('@release' => $release->download_link)));\n }\n }\n }\n // Hackish update of last parsed time so other tarballs will get into the queue too.\n // @todo: work on something better for this.\n db_query(\"UPDATE {l10n_server_release} SET last_parsed = %d WHERE rid = %d\", time(), $release->rid);\n }\n if (!$automated && !$user_feedback) {\n drupal_set_message(t('No (new) local Drupal files found to scan in %workdir.', array('%workdir' => $workdir)));\n }\n\n // Ensure that a Drupal page will be displayed with the messages.\n return '';\n}", "function recurseFind($dir, $pattern, $depthRemaining )\n{\n\tglobal $filesep;\n\t$subFiles = array();\n\t$subDirs = array();\n\n\t$dh = opendir($dir);\n\twhile ( false != ($file = readdir($dh)) ) { \n\t\tif ( $file != '.' && $file != '..' ) {\n\n\t\t\t$fullFile = $dir . DIRECTORY_SEPARATOR . $file;\n\n\t\t\tif ( is_dir($fullFile) ) { \n\t\t\t\tarray_push($subDirs, $fullFile);\n\t\t\t} else {\n\t\t\t\tif ( preg_match($pattern, $fullFile) ) { \n\t\t\t\t\tarray_push($subFiles, $fullFile);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tclosedir($dh);\n\n\t// 2016-Aug-28 -- Limiting the recursion\n\tif ( $depthRemaining > 0 ) { \n\n\tforeach ( $subDirs as $subDir ) { \n\t\tforeach ( recurseFind($subDir, $pattern, $depthRemaining-- ) as $subsubFile ) {\n\t\t\tarray_push($subFiles, $subsubFile );\n\t\t}\n\t}\n\n\t}\n\n\treturn $subFiles;\n}", "function walk_and_encode($dirs = null,$directory = null) {\n global $allowed_ext;\n if (!is_array($dirs) && $directory == null) {\n return false;\n }\n echo \"Scanning \".$directory.\"\\n\";\n foreach($dirs as $dir) {\n switch ($dir) {\n // We shall not check this\n case \".\":\n break;\n case \"..\";\n break;\n case \"encodings.php\":\n break;\n // Convert\n default:\n if (is_dir($directory.\"/\".$dir)) {\n echo \"$directory/$dir\\n\";\n walk_and_encode(scandir($directory.\"/\".$dir),$directory.\"/\".$dir);\n } elseif(is_file($directory.\"/\".$dir)) {\n $file_info = pathinfo($directory.\"/\".$dir);\n if (isset($file_info['extension']) && in_array($file_info['extension'],$allowed_ext)) {\n $item = file_get_contents($directory.\"/\".$dir);\n $item = preg_split('//', $item, -1, PREG_SPLIT_NO_EMPTY);\n $item = encoding($item);\n\n if (is_array($item)) {\n $item = implode('',$item);\n }\n if ($item != '') {\n file_put_contents($directory.\"/\".$dir,$item);\n echo \"Written \".$directory.\"/\".$dir.\"\\n\";\n } else {\n echo \"Empty content, ignore\\n\";\n }\n\n } else {\n echo \"Ignored \".$directory.\"/\".$dir.\"\\n\";\n }\n }\n break;\n }\n }\n}", "public function searchDir($dir) {\r\n\t\t$pages = array();\r\n\t\t// array to hold directories to recurse into\r\n\t\t$dirs = array();\r\n\t\t// mark this directory as seen so we don't look in it again\r\n\t\t$this->seen[realpath($dir)] = true;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tforeach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir)) as $file) {\r\n\t\t\t\tif($file->isFile() && $file->isReadable() && (!isset($this->seen[$file->getPathname()]))) {\r\n\t\t\t\t\t/*mark this as seen so we skip it if we come to it again*/\r\n\t\t\t\t\t$this->seen[$file->getPathname()] = true;\r\n\t\t\t\t\t// load the contents of the file into $text\r\n\t\t\t\t\t$text = file_get_contents($file->getPathname());\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if the search term is inside the body delimiters\r\n\t\t\t\t\tif(preg_match($this->bodyRegex, $text)) {\r\n\t\t\t\t\t\t/*construct the relative URI of the file by removing\r\n\t\t\t\t\t\tthe document root from the full path*/\r\n\t\t\t\t\t\t$uri = substr_replace($file->getPathname(), '', 0, strlen($_SERVER['DOCUMENT_ROOT']));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if the page has a title, find it\r\n\t\t\t\t\tif(preg_match('#<title>(.*?)</title>#Sis', $text, $match)) {\r\n\t\t\t\t\t\t// and add the title and URI to $pages\r\n\t\t\t\t\t\tarray_push($pages, array($uri, $match[1]));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarray_push($pages, array($uri, $uri));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception $e) {\r\n\t\t\t// There was a problem opening the directory\r\n\t\t}\r\n\t\t\r\n\t\treturn $pages;\r\n\t}", "function directory_scan($directory, $withfiles) {\n\t$scanned_directory = array_diff(scandir($directory), array(\"..\", \".\")); //This removes all of the unessesary results\n\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == true; $i = $i + 1) {\n\t\tif (isset($scanned_directory[$i]) && (is_dir($directory . \"/\" . $scanned_directory[$i]) == FALSE)) { // If current item is a file, make it a download link\n\t\t\techo \"<div class='fileDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/file.svg' class='foldersvg'/>\";\n\t\t\techo \"<p class='fileLink'>\" . $scanned_directory[$i] . \"</p>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='fileinfo'><b>Type</b>: \" . mime_content_type($directory. \"/\" . $scanned_directory[$i]) . \" <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 0) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\t\t\t\n\t\t\techo \"</div>\";\n\t\t} else if (isset($scanned_directory[$i]) && $directory . \"/\" . $scanned_directory[$i] != \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") { // Makes this a special dir box if a item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\"; \n\t\t}\n\t}\n\t\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == false; $i = $i + 1) { //$withfiles only outputs files when true. when false, it will output files and folders. This is for the right-side of the page\n\t\tif ($i==0 && $directory != \"uploads/\" . $_SESSION[\"username\"]) { //when $i gets to its first iteration, output the \"back a directory\" folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[../]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='../' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Info</b>: Selecting this will move your selection back a folder.</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t\t\n\t\tif (isset($scanned_directory[$i]) && is_dir($directory . \"/\" . $scanned_directory[$i])) { // Makes this a special dir box if an item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\tif ($directory . \"/\" . $scanned_directory[$i] == \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") {\n\t\t\t\techo \"<img src='Assets/SVG/bin.svg' class='foldersvg'/>\";\n\t\t\t} else {\n\t\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\t}\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t}\n\n}", "function start_lvl( &$output, $depth = 0, $args = array() ) { //phpcs:ignore\n\t\t\t$GLOBALS['comment_depth'] = $depth + 1; //phpcs:ignore\n\t\t\t?>\n\n\t\t\t\t\t<ul class=\"children\">\n\t\t\t<?php\n\t\t}", "function start_lvl( &$output, $depth = 0, $args = array() ) {}", "function getRootLevelFolder() ;", "abstract protected function yieldSearchPaths(): Generator;", "function include_user_files($dir=G_USER_PHP_FILES)\r\n{\r\n log_debug(\"include_user_files( {$dir} )\");\r\n\r\n if (file_exists($dir) && is_dir($dir))\r\n {\r\n $usr = opendir($dir);\r\n\r\n if ($usr)\r\n {\r\n while (false !== ($f = readdir($usr)))\r\n {\r\n if ($f == '.' || $f == '..')\r\n {\r\n continue;\r\n }\r\n\r\n $fn = \"{$dir}/{$f}\";\r\n\r\n if (is_dir($fn))\r\n {\r\n include_user_files($fn);\r\n }\r\n else if (is_file($fn))\r\n {\r\n log_debug(\"Including file {$fn}\");\r\n include_once($fn);\r\n }\r\n }\r\n\r\n closedir($usr);\r\n }\r\n }\r\n}", "protected function processFileTree () {\n\t\t$files = $this->populateFileTree();\n\t\tforeach ($files as $file) {\n\t\t\t$this->processFile($file);\n\t\t}\n\t}", "function RecursiveScanDir($dir, $prefix = '') {\n\t$dir = rtrim($dir, '\\\\/');\n\t$result = array();\n\tforeach (scandir($dir) as $f) {\n if (\n preg_match('`/tmp/`', \"$dir/$f\")\n || preg_match('`/fpdf.php$`', \"$dir/$f\")\n || preg_match('`/libs/pi_barcode.php$`', \"$dir/$f\")\n || preg_match('`/libs/phpmailer/`', \"$dir/$f\")\n || preg_match('`/libs/securimage/`', \"$dir/$f\")\n || preg_match('`/libs/Smarty/`', \"$dir/$f\")\n )\n continue;\n\t\tif ($f !== '.' and $f !== '..') {\n\t\t\tif (is_dir(\"$dir/$f\")) {\n\t\t\t\t$result = array_merge($result, RecursiveScanDir(\"$dir/$f\", \"$prefix$f/\"));\n\t\t\t} else {\n\t\t\t\tif ( strtolower(substr(pathinfo($f,PATHINFO_EXTENSION),0,3)) == \"php\" && pathinfo(__FILE__,PATHINFO_BASENAME ) != pathinfo($f,PATHINFO_BASENAME ) )\n\t\t\t\t\t$result[] = $prefix.$f;\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "function rd_do_dir($dir)\n{\n\t$out=array();\n\t$_dir=($dir=='')?'.':$dir;\n\t$dh=@opendir($_dir);\n\tif ($dh!==false)\n\t{\n\t\twhile (($file=readdir($dh))!==false)\n\t\t{\n\t\t\tif (!in_array($file,array('.','..','git','.svn','CVS','_vti_cnf')))\n\t\t\t{\n\t\t\t\tif (is_file($_dir.'/'.$file))\n\t\t\t\t{\n\t\t\t\t\t$path=$dir.(($dir!='')?'/':'').$file;\n\t\t\t\t\t$out[]=$path;\n\t\t\t\t} elseif (is_dir($_dir.'/'.$file))\n\t\t\t\t{\n\t\t\t\t\t$out=array_merge($out,rd_do_dir($dir.(($dir!='')?'/':'').$file));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $out;\n}", "function rootOperations()\r\n{\r\n \r\n do\r\n {\r\n # displaying root menu\r\n rootMenu();\r\n $choice = readline(\"\\nEnter your root option :\");\r\n\r\n # performing operations based on the choice entered\r\n switch ($choice)\r\n {\r\n case 1:\r\n # creating a admin \r\n $GLOBALS['obj']->addAdmin();\r\n break;\r\n case 2:\r\n # updating address of the company\r\n $GLOBALS['obj']->updateAddress();\r\n break;\r\n case 3:\r\n # updating about section of the company\r\n $GLOBALS['obj']->updateAbout();\r\n break;\r\n case \"exit\":\r\n echo \"Successfully logged out from root\";\r\n break;\r\n default:\r\n echo \"Enter a valid option from ROOT MENU\\n\";\r\n break;\r\n\r\n }\r\n }while ($choice != \"exit\");\r\n\r\n}", "function getSubfolders() ;", "function listDir($fullDirectory, $directory) {\n //Scan the current directory, but we don't want '.' or '..' in the returned list.\n $files = array_diff(scandir($fullDirectory), array('.', '..'));\n\n //Don't make a list if the directory is empty:\n if(empty($files)) return; //We don't need to waste any more time here if it's empty.\n //Otherwise, time for a new list:\n echo '<ul class=\"pages-ul\">';\n //Don't make a nested list until all the directories are out of the way:\n foreach($files as $file) {\n //If it's a folder, list it and scan inside it for more folders:\n if(is_dir($fullDirectory . '/' . $file)) {\n echo '<li>' . $file . '</li>';\n listDir($fullDirectory . '/' . $file, $directory . '/' . $file);\n }\n }\n echo '</ul>'; //Done scanning through directories now.\n\n //Now that there are no more directories in the way, list the directory's files:\n echo '<ul class=\"pages-ul\">';\n foreach($files as $file) {\n //We'll want to check its extension and get its filename without its path or extension.\n $fileName = pathinfo($file);\n //If it's a php file, then list it with a link to its path.\n if(isset($fileName['extension']) && $fileName['extension'] == 'php') { //Not sure why, but $fileName['extension'] isn't always set.\n echo '<li><a href=\"' . $directory . '/' . $fileName['basename'] . '\">' . $fileName['filename'] . '</a></li>';\n }\n }\n echo '</ul>'; //Done listing the php webpages now.\n }", "function listFilesAndFolders(Array $directory) {\r\n global $currentPath;\r\n\r\n removeElement('.', $directory);\r\n removeElement('..', $directory);\r\n\r\n if (count($directory) == 0) {\r\n echo '(Folder is empty)';\r\n } else {\r\n foreach ($directory as $key => $fileOrFolderName) {\r\n $targetPath = $currentPath . \"/\" . $fileOrFolderName;\r\n if (is_file($targetPath)) {\r\n echo \"<a href=$fileOrFolderName>\" . $fileOrFolderName . \"</a>\" . \"<br>\";\r\n } else {\r\n echo $fileOrFolderName . ' ';\r\n addForwardButton($targetPath); // A button is added next to each folder to enable us to go into the folder.\r\n }\r\n }\r\n }\r\n}", "function getDirContents($dir){\r\n foreach(scandir($dir) as $key => $value){\r\n print \"$value<BR>\";\r\n }\r\n\r\n\r\n }", "function include_all_php($folder)\n{\n foreach (glob(\"{$folder}/*.php\") as $filename)\n {\n require_once $filename;\n }\n\n foreach (glob(\"{$folder}/*\") as $foldername)\n {\n \tif(is_dir($foldername))\n \t{\n\t\t\tinclude_all_php($foldername);\n \t}\n }\n}", "public function scanSourceFolders() {\n $this->addons = [];\n foreach ($this->sources as $sourceDir) {\n $this->scanSource($sourceDir);\n }\n }", "private function listFolderFiles($dir){\n $children = false;\n $isRoot = false;\n if($dir==$this->file_storage){\n $isRoot = true;\n }\n\n $folderName = $this->getFolderName($dir);\n if(!$isRoot){\n //$this->info('Directory Name: '.$folderName['child']);\n //$this->info('Parent Name: '.$folderName['parent']);\n }\n\n //$this->info('Folder: '.$dir);\n\n foreach (new \\DirectoryIterator($dir) as $fileInfo) {\n if (!$fileInfo->isDot()) {\n if ($fileInfo->isDir()) {\n $this->listFolderFiles($fileInfo->getPathname());\n }else{\n $rename = false;\n //$this->info('File: '.$fileInfo->getFilename());\n //$info = new SplFileInfo($dir.'/'.$fileInfo->getFilename());\n $ext = \".\".pathinfo($fileInfo->getFilename(), PATHINFO_EXTENSION);\n //$ext = \".\"$info->getExtension();\n //$this->info('File: extension '.$ext);\n $filebreak = str_replace($ext,\"\",$fileInfo->getFilename());\n if (strpos($filebreak, '.') !== false || strpos($filebreak, \"'\") !== false || strpos($filebreak, \"#\") !== false) {\n $rename = true;\n }\n if($rename){\n $replace = array(\".\", \"'\", \"#\", \";\", \"/\", \"?\", \":\", \"@\", \"=\", \"&\", \",\");\n //“;”, “/”, “?”, “:”, “@”, “=” and “&\n $fileraw = str_replace($replace,\" \",$filebreak);\n //$this->info('File: raw '.$fileraw);\n $newfilename = $fileraw . $ext;\n //$this->info('File: new '.$newfilename);\n $prod_filename = $newfilename;\n rename($dir.'/'.$fileInfo->getFilename(),$dir.'/'.$newfilename);\n }else{\n $prod_filename = $fileInfo->getFilename();\n }\n $this->checkFileExtension($dir.'/'.$prod_filename, $prod_filename, $dir);\n }\n $children = true;\n }else{\n $children = false;\n }\n }\n //$this->info('Children: '.$children);\n\n if(!$isRoot){\n $this->folders[$this->count]['name'] \t\t\t= $folderName['child'];\n $this->folders[$this->count]['parent'] \t\t= $folderName['parent'];\n $this->folders[$this->count]['full_path']\t= $dir;\n $this->folders[$this->count]['children']\t= $children;\n $this->count++;\n }\n //$this->info('#################');\n }", "public static function run_tests($directory_path){\n $arguments = $GLOBALS['arguments'];\n # open particular directory\n $dir_handle = opendir($directory_path);\n \n # reads file from the current directory\n while($current_file = readdir($dir_handle)){\n # just skip the . and .. files\n if($current_file == \".\" or $current_file == \"..\"){\n continue;\n }\n \n # check whether it is directory, if yes, check for the recursive parameter\n if(is_dir(\"$directory_path\" . \"/\" . \"$current_file\") and $arguments['--recursive']){\n self::run_tests(\"$directory_path\" . \"/\" . \"$current_file\"); # resursiveley call this function\n } # we found a file\n elseif(is_file(\"$directory_path\" . \"/\" . \"$current_file\")){\n $full_path = \"$directory_path\" . \"/\" . \"$current_file\";\n $extension = pathinfo($full_path, PATHINFO_EXTENSION);\n if($extension == \"src\"){ # our file has the appropriate extension\n self::prepare_files(pathinfo($full_path, PATHINFO_FILENAME), $directory_path);\n self::run_test($directory_path, pathinfo($full_path, PATHINFO_FILENAME), $arguments['--parse-only'], $arguments['--int-only']);\n }\n }\n }\n }", "public function load()\n {\n $this->rootDir = '';\n\n /** @var string $arg */\n while ($arg = array_shift($this->arguments)) {\n\n if ($this->stringStartsWith('--directory=', $arg)) {\n $this->rootDir = str_replace('--directory=', '', $arg);\n }\n }\n }" ]
[ "0.5582389", "0.5535926", "0.5441885", "0.5426914", "0.5365969", "0.536421", "0.5345124", "0.52839905", "0.527695", "0.52621114", "0.5251651", "0.52430516", "0.52245325", "0.5203092", "0.5202012", "0.5191469", "0.5188438", "0.5171857", "0.5151295", "0.5150924", "0.5150247", "0.5147414", "0.51338124", "0.5118906", "0.5096912", "0.5095318", "0.5073724", "0.50716263", "0.507117", "0.5070087", "0.5070087", "0.50700694", "0.5066548", "0.50606805", "0.50440174", "0.5033727", "0.5027526", "0.5022605", "0.5010294", "0.50061804", "0.4993082", "0.49902663", "0.4989082", "0.49706694", "0.49619874", "0.4948944", "0.4941769", "0.4936298", "0.4934152", "0.49294785", "0.4923511", "0.4917854", "0.4916531", "0.49156868", "0.49035525", "0.488732", "0.48807016", "0.48775595", "0.48763013", "0.4860023", "0.48580194", "0.48544022", "0.48517406", "0.4843974", "0.4840006", "0.48378748", "0.48344752", "0.4825637", "0.48205203", "0.4814187", "0.48125684", "0.48055583", "0.48050466", "0.48048833", "0.48048714", "0.48031425", "0.48008844", "0.47969246", "0.4795043", "0.4793426", "0.4793048", "0.4791233", "0.4784377", "0.47830924", "0.47825322", "0.47800016", "0.47782487", "0.47782356", "0.47722235", "0.4771136", "0.4762847", "0.4762442", "0.47532585", "0.4747935", "0.4742865", "0.4718854", "0.47183058", "0.47119755", "0.47101617", "0.4708419" ]
0.71078455
0
====================== Panel Display ======================
public function config($templatify = false) { $config = parent::config($templatify); $config['options']['class'] = $config['options']['class'] . ' model-report-item-panel'; // ---------------------------------------------------------------------- // PANEL // ---------------------------------------------------------------------- $panelId = strtolower(htmlentities(\Yii::$app->t::getModelClassName($config['model']) . $config['reportItemName'] . '-' . $config['id'])); $config['panelId'] = $panelId; $this->outputJsData([ 'panelId' => $panelId, 'reportItem' => ArrayHelper::getValue($config, 'reportItem.widgetConfig', []), 'modelName' => $config['modelName'], 'title' => ArrayHelper::getValue($config, 'reportItem.title', null), 'reportItemName' => $config['reportItemName'], 'apiEndpoint' => \Yii::$app->reportsManager->apiEndpoint, ]); return $config; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function panels()\n {\n }", "public function display() {\n\t\t$this->prepareForDisplay();\n\n\t\techo '<div class=\"panel-heading\">';\n\t\t$this->displayHeader($this->Header, $this->getNavigation());\n\t\techo '</div>';\n\t\techo '<div class=\"panel-content statistics-container\">';\n\t\t$this->displayContent();\n\t\techo '</div>';\n\t}", "public function panel()\n {\n $panel = new \\Shieldon\\Firewall\\Panel();\n $panel->entry();\n }", "function show_panel()\n\t{\n\t\tglobal $template, $errors, $Cl_root_path;\n\t\t\n\t\t$template->assign_files( array(\n\t\t\t'ACP_MoreContent' => 'ACP/MoreContent' . tplEx\n\t\t) );\n\t\t\n\t\t// get the subsubmode\n\t\t$sub = ( isset( $_GET[ 's' ] ) ) ? strval( $_GET[ 's' ] ) : 'add';\n\t\t\n\t\t\t\n\t\tswitch( $sub )\n\t\t{\n\t\t\tcase 'manage':\n\t\t\t\t$this->manage();\n\t\t\t\tbreak;\n\t\t\tcase 'manage2':\n\t\t\t\t$this->manage2();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_mode' ], CRITICAL_ERROR );\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function show_in_panel() {\n\t\treturn false;\n\t}", "function show_panel()\n\t{\n\t\tglobal $errors, $template;\n\t\t\n\t\t// get the mode\n\t\t$s = ( isset( $_GET[ 's' ] ) ) ? strval( $_GET[ 's' ] ) : '';\n\t\t\n\t\t// fire the template\n\t\t$template->assign_files( array(\n\t\t\t'ACP_advance' => 'ACP/advance' . tplEx\n\t\t) );\n\t\t\n\t\t// act upon it\n\t\tswitch( $s )\n\t\t{\n\t\t\tcase 'settings':\n\t\t\t\t$this->settings();\n\t\t\t\tbreak;\n\t\t\tcase 'settings_real':\n\t\t\t\t$this->settings_real();\n\t\t\t\tbreak;\n\t\t\tcase 'browser':\n\t\t\t\t$this->browser();\n\t\t\t\tbreak;\n\t\t\tcase 'clearcache':\n\t\t\t\t$this->clearcache();\n\t\t\t\tbreak;\n\t\t\tcase 'console':\n\t\t\t\t$this->console();\n\t\t\t\tbreak;\n\t\t\tcase 'key':\n\t\t\t\t$this->key();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_mode' ], CRITICAL_ERROR );\n\t\t\t\tbreak;\n\t\t}\n\t}", "function show_panel()\n\t{\n\t\tglobal $template, $errors, $Cl_root_path;\n\t\t\n\t\t$template->assign_files( array(\n\t\t\t'ACP_pages' => 'ACP/pages' . tplEx\n\t\t) );\n\t\t\n\t\t// get the subsubmode\n\t\t$sub = ( isset( $_GET[ 's' ] ) ) ? strval( $_GET[ 's' ] ) : 'add';\n\t\t\n\t\t\t\n\t\tswitch( $sub )\n\t\t{\n\t\t\tcase 'add':\n\t\t\t\t$this->adding();\n\t\t\t\tbreak;\n\t\t\tcase 'edit':\n\t\t\t\t$this->editting();\n\t\t\t\tbreak;\n\t\t\tcase 'add_bar':\n\t\t\t\t$mode = ( isset( $_POST[ 'MODE' ] ) ) ? strval( $_POST[ 'MODE' ] ) : '';\n\t\t\t\tswitch( $mode )\n\t\t\t\t{\n\t\t\t\t\tcase 'create':\n\t\t\t\t\t\t$this->add_page();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'edit':\n\t\t\t\t\t\t$this->edit_page();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_form' ], CRITICAL_ERROR );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'convert':\n\t\t\t\tinclude( $Cl_root_path . 'kernel/config/static_pages' . phpEx );\n\t\t\t\tif ( isset( $pages ) )\n\t\t\t\t{\n\t\t\t\t\t$this->pages_array = $pages;\n\t\t\t\t}\n\t\t\t\t$this->save_pages();\n\t\t\t\t$errors->report_error( $this->lang[ 'Converted' ], MESSAGE );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_mode' ], CRITICAL_ERROR );\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function displayAdminPanel() {}", "public function actionControlPanel()\n {\n $this->render('controlPanel');\n }", "public function init() {\n //echo CHtml::openTag('div', array('class' => $this->cssClass, 'style' => 'width:'.$this->width.'px;height:'.$this->height.'px;'));\n echo '<div class=\"ax-panel\">';\n if ($this->showHeader)\n $this->renderHeader();\n $wd = $this->width-10;\n if(!empty($this->height)){\n $hg = $this->height-49;\n echo '<div class=\"'.$this->cssBodyClass.'\" style=\"height: '.$hg.'px;overflow-y:auto;\">';\n }\n else\n echo '<div class=\"'.$this->cssBodyClass.'\">';\n //echo '<div style=\"padding: 5px 5px 0px; width: '.$wd.'px; left: 0px; top: 26px; height: '.$hg.'px; overflow:auto;\" class=\"x-panel-body x-panel-body-default-framed x-docked-noborder-top x-docked-noborder-right x-docked-noborder-bottom x-docked-noborder-left\">';\n }", "public function panel() {\n if(Auth::isLoggedIn()) {\n $this->view->render('admin/module/liveEdit/panel', [\n 'nodes' => $this->get($this->route),\n 'user' => $this->user,\n 'route' => $this->route,\n 'template' => $this->template,\n 'languages' => $this->em->all(Language::class),\n 'current_language' => $this->em->findBy(Language::class ,[\n 'code' => $_SESSION['Lampion']['language']\n ])[0],\n 'name' => $this->routeNames[$this->route] ?? null\n ]);\n }\n }", "public function render_panel_templates()\n {\n }", "function ncurses_panel_window($panel)\n{\n}", "function print_panel() {\t\n\t\tif ( isset($_REQUEST['saved']) && $_REQUEST['saved'] ) {\n\t\t\t$this->print_saved_message();\n\t\t}\n\t\tif ( isset($_REQUEST['reset']) && $_REQUEST['reset'] ) {\n\t\t\t$this->print_reset_message();\n\t\t}\n\t\n\t\t$this->print_heading();\n\t\t$this->print_options();\n\t\t$this->print_footer();\n\t}", "public function getPanel()\n {\n if (class_exists('\\SqlFormatter')) {\n \\SqlFormatter::$pre_attributes = 'style=\"color: black;\"';\n }\n $queries = $this->pdo->getLog();\n $html = '<h1 '.$this->title_attributes.'>'.$this->title.'</h1>';\n $html .= '<div class=\"tracy-inner tracy-InfoPanel\">';\n if (count($queries) > 0) {\n $html .= '<table class=\"tracy-sortable\">';\n $html .= '<tr>';\n $html .= '<th>Time(ms)</td>';\n $html .= '<th>Statement</td>';\n $html .= '</tr>';\n foreach ($queries as $query) {\n $html .= '<tr>';\n $html .= '<td><span '.$this->time_attributes.'>'.round($query['time'], 4).'</span></td>';\n if (class_exists('\\SqlFormatter')) {\n $html .= '<td>'.\\SqlFormatter::highlight($query['statement']).'</td>';\n } else {\n $html .= '<td '.$this->query_attributes.'>'.$query['statement'].'</td>';\n }\n $html .= '</tr>';\n }\n $html .= '</table>';\n } else {\n $html .= '<p style=\"font-size:1.2em;font-weigt:bold;padding:10px\">No queries were executed!</p>';\n }\n $html .= '</div>';\n\n return $html;\n }", "function display() {\r\n\t\tparent::display ();\r\n\t}", "public function display()\n\t{\n\t\tparent::display();\n\t}", "function _add_panels ()\n {\n parent::_add_panels ();\n\n $panel =& $this->panel_at ('folder');\n $panel->rows = 10;\n $panel->columns = 2;\n }", "private function composeControlPanel()\n {\n $this->composeControlPanelSideMenu();\n $this->composeControlPanelImagesBrowser();\n }", "function checkPanelMode()\n\t{\n\t\tswitch ($this->display_mode)\n\t\t{\n\t\t\tcase \"view\":\n\t\t\t\t$this->displayStatusPanel();\n\t\t\t\tbreak;\n\n\t\t\tcase \"setup\":\n\t\t\t\t$this->displayProcessPanel();\n\t\t\t\tbreak;\n\t\t}\n\t}", "function display()\r\n\t {\r\n\t parent::display();\r\n\t }", "public function getPanel()\n {\n $html = '';\n foreach ($this->_count as $count) {\n $html .= $count['name']. ' - '.$count['total'].' ('.$count['users'].')'.'<br/>';\n }\n \n $body = Zend_Controller_Front::getInstance()->getResponse()->getBody();\n $panel = '<h4>К-во пользователей онлайн:</h4>'.$html;\n return $panel;\n }", "function display() {\r parent::display();\r }", "public function drawStartOptionsPanel()\r\n {\r\n echo '\r\n <div class=\"panel-body\">\r\n <ul class=\"list-group\">';\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 }", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "function display()\n {\n parent::display();\n }", "public abstract function display();", "private function showPanels()\r\n {\r\n if ($this->claimType == \"repair-warranty\" || $this->claimType == \"repair-no-warranty\" ||\r\n $this->claimType == \"repair-no-transaction\")\r\n {\r\n // show the information panel\r\n $newInformationPanel = new InformationPanel($this->keycodeResult, $this->transactionResult);\r\n\r\n // create form form to process a repair claim\r\n //echo \"<form action=\\\"CustomerClaim.php\\\" method=\\\"post\\\" name=\\\"submit-repair-claim\\\">\";\r\n\r\n // create form for repair panel\r\n $newRepairOptionsPanel = new RepairOptionsPanel($this->claimType);\r\n\r\n // create customer details panel object and create the blank fields\r\n $newCustomerDetailsPanel = new CustomerDetailsPanel();\r\n $newCustomerDetailsPanel->createCustomerFields();\r\n\r\n // create repair options panel object and create the blank html fields\r\n $newfinaliseRepairPanel = new FinaliseRepairPanel();\r\n $newfinaliseRepairPanel->createFinaliseRepairFields();\r\n \r\n // object has hidden inputs for keycode and transaction ID so they can be retrieved from \r\n // second form on the page, as the first form contains the first inputs for them\r\n $newHiddenInputsPanel = new HiddenInputsPanel($this->claimType);\r\n\r\n }\r\n \r\n // finanical claim show information panel and set form to finanical claim\r\n else if($this->claimType == \"finanical-warranty\" || $this->claimType == \"finanical-outside-warranty\" || \r\n $this->claimType == \"finanical-no-transaction\")\r\n {\r\n // show the information panel\r\n $newInformationPanel = new InformationPanel($this->keycodeResult, $this->transactionResult);\r\n \r\n // create form to process a finanical claim\r\n //echo \"<form action=\\\"CustomerClaim.php\\\" method=\\\"post\\\" name=\\\"submit-repair-claim\\\">\";\r\n \r\n // object has hidden inputs for keycode and transaction ID so they can be retrieved from \r\n // second form on the page, as the first form contains the first inputs for them\r\n $newHiddenInputsPanel = new HiddenInputsPanel($this->claimType);\r\n \r\n }\r\n \r\n // if product is not claimable but exists show information panel\r\n else if ($this->claimType != \"keycode-not-found\" && $this->keycode != null)\r\n {\r\n // create a form that does nothing - used to make html vaild as </form> is used later\r\n //echo \"<form>\";\r\n \r\n // if vaild product is found show the information about it\r\n $newInformationPanel = new InformationPanel($this->keycodeResult, $this->transactionResult);\r\n }\r\n }", "public function getPanelContent()\n {\n $sqlLogs = $this->getLogs();\n\n // Add table uses summary\n // Sort table uses\n $idTables = array();\n $counts = array();\n $i = 0;\n foreach(self::$tables as $table => $nbUse)\n {\n $counts[$table] = $nbUse;\n $idTables[$table] = $i++;\n }\n \n $tableSummary = array();\n \n if(is_array($counts))\n {\n arsort($counts, SORT_NUMERIC);\n \n // Build summary of table uses\n foreach($counts as $table => $nbUse)\n {\n $tableSummary[] = sprintf('<div style=\"float: left; margin-right: 10px; line-height: 15px;\"><a href=\"#\" onclick=\"jQuery(\\'#sfWebDebugBarCancelLink\\').show(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li\\').hide(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li.info\\').show(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li.table-'.$table.'\\').show(); return false;\" title=\"Only display queries on this table\"><span style=\"color: blue;\"> %s</span> (%s)</a></div>', $table, $nbUse);\n }\n }\n\n // Add color legend\n $legend = '<div style=\"float: left; font-weight: bold; padding: 2px; margin: 2px 2px 2px 0;\">SQL status legend :</div>';\n foreach($this->colors as $min => $content)\n {\n $legend .= '<div style=\"background-color: '.$content[0].'; color: white; float: left; margin: 2px; padding: 2px;\">&gt;= '.$min.' queries ('.$content[1].')</div>';\n }\n\n $liStyle= ' style=\"line-height: 120% !important;\n padding: 5px 0px !important;\n border-bottom: 1px solid silver !important;\n list-style-type: decimal !important;\n margin-bottom:0\"';\n\n $liInfoStyle= ' style=\"line-height: 120% !important;\n padding: 5px 0px !important;\n border-bottom: 1px solid silver !important;\n list-style-type: decimal !important;\n background: #CCC; text-indent: 10px;\n text-shadow:1px 1px 1px rgba(0, 0, 0, 0.2);\"';\n\n\n\n // Build information and query rows\n $queries = array();\n foreach($sqlLogs as $i => $log)\n {\n $table = $log['table'];\n\n $message = '';\n if(array_key_exists($i, $this->info))\n {\n foreach($this->info[$i] as $mess)\n {\n $message .= '<li'.$liInfoStyle.' class=\"info\" style=\"\"><b>'.$mess['message'].' queries:</b></li>';\n }\n }\n \n $link = '';\n if(strstr($log['log'],'SELECT') > 0)\n {\n $link = '<a href=\"#\" style=\"color: blue;\" onclick=\"jQuery(this).parent().children(\\'span.select\\').show(); jQuery(this).hide(); return false;\">(View select content)</a>';\n }\n $message .= '<li'.$liStyle.' class=\"table-'.$table.' sfWebDebugDatabaseQuery\">'.$log['log'].' '.$link.'</li>';\n $queries[] = $message;\n }\n\n return '\n <div id=\"sfWebDebugAdvancedDatabaseLogs\">\n <div style=\"overflow: auto; margin-bottom: 10px;\">'.$legend.'</div>\n <b>Table call summary (click on a table to filter queries)</b>\n <div style=\"overflow: auto; margin-bottom: 10px;\">'.implode(\"\\n\", $tableSummary).'</div>\n <b>SQL queries <span id=\"sfWebDebugBarCancelLink\" style=\"display: none;\">(<a href=\"#\" style=\"color: blue\" onclick=\"jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li\\').show(); jQuery(this).parent().hide(); return false;\">Cancel table filters</a>)</a></span></b>\n <ol style=\"margin-left: 20px\">'.implode(\"\\n\", $queries).'</ol>\n </div>\n ';\n }", "public function displayComponent() {\n\t\t\n\t\t\t$this->outputLine($this->_content);\n\t\t\t\n\t\t}", "public function render()\n {\n\n $this->setUp();\n \n $html = '';\n \n // $html .= $this->panelTitle();\n $html .= $this->panelMenu();\n // $html .= $this->panelButtons();\n \n if ($this->subPannel) {\n foreach ($this->subPannel as $subPanel) {\n if (is_string($subPanel))\n $html .= $subPanel;\n else\n $html .= $subPanel->render();\n }\n }\n \n return $html;\n \n }", "public function show()\n {\n return view('panel::show');\n }", "public function show()\n {\n return view('panel::show');\n }", "abstract function display();", "abstract function display();", "public function getPanelContent()\n {\n return null;\n }", "public function show()\n {\n echo $this->constructGrid();\n }", "public function display(){}", "public function getPanel()\n {\n $html = '<h4>Log Information</h4>';\n \n $events = $this -> _log -> getEvents();\n \n foreach ($events as $event) {\n\t $html .= sprintf('<div class=\"pre\"><pre><div title=\"%s\">%s</div></pre><hr /></div>', htmlspecialchars($event['label']), Zend_Debug::dump($event['message'], null, false));\n }\n \n if (Zend_Controller_Front::getInstance()->getResponse()->isException()) {\n $full = false;\n } elseif (!empty($events)) {\n \t$full = true;\n } else {\n \t$full = false;\n }\n \n $full && empty($_COOKIE['ZFDebugCollapsed']) && $html .= '<script type=\"text/javascript\" charset=\"utf-8\">jQuery(function(){$(\"div#ZFDebug_log\").slideDown()})</script>';\n \n return $html;\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function getPanelContent()\n {\n $types = array('previous' => 'previous sessions', 'current' => \"current session\");\n\n $html = '';\n foreach(XHProfRunPool::getRunsByNamespace(true) as $namespace => $allRuns)\n {\n $html .= sprintf('<h2>Namespace : %s<a href=\"#\" onclick=\"sfWebDebugToggle(\\'pmsipilotWebDebugXHProf-%s\\'); return false;\"><img src=\"'.$this->webDebug->getOption('image_root_path').'/toggle.gif\"/></a></h2>', $namespace, md5($namespace));\n $html .= sprintf('<div id=\"pmsipilotWebDebugXHProf-%s\" style=\"display: none;\">', md5($namespace));\n\n foreach($allRuns as $type => $runs)\n {\n $links = array();\n $html .= sprintf(\"<h3>Runs from %s</h3>\", $types[$type]);\n foreach($runs as $run)\n {\n $links[] = sprintf('<input type=\"checkbox\" name=\"runs-%s\" id=\"run-%s\"><a href=\"%s\" target=\"_blank\">Run %s (%s)</a>', md5($namespace), $run->getId(), $run->getUrl(), $run->getId(), date('Y-m-d H:i:s', $run->getDate()));\n }\n if(count($links))\n {\n $html .= sprintf('<ol style=\"margin-left: 0px; list-style-type: none;\" class=\"runs-container-%s\"><li>%s</li></ol>', md5($namespace), implode('</li><li>', $links));\n }\n else\n {\n $html .= \"No run\";\n }\n }\n $html .= sprintf('<input type=\"button\" id=\"runs-%s\" value=\"Compare\" onclick=\"xhprofCompare(this, \\'%s\\', \\'%s\\')\">', md5($namespace), md5($namespace), addslashes($namespace));\n $html .= '</div>';\n }\n \n sfContext::getInstance()->getConfiguration()->loadHelpers('Asset');\n $baseUrl = _compute_public_path('index.php', 'elXHProfPlugin', 'php');\n $html .=<<<EOF\n<script type=\"text/javascript\">\nfunction xhprofCompare(button, namespaceId, namespace) {\n var groupId = button.id;\n var groupNamespace = button.id.split('-')[1];\n \n var checkedElements = [];\n var runContainers = sfWebDebugGetElementsByClassName('runs-container-'+namespaceId);\n for(var i = 0; i<runContainers.length; i++)\n {\n var runCheckboxes = runContainers[i].getElementsByTagName('input');\n for(var j = 0; j<runCheckboxes.length; j++)\n {\n if(runCheckboxes[j].checked)\n {\n checkedElements.push(runCheckboxes[j]);\n }\n }\n }\n \n if(checkedElements.length==2) {\n var run1 = checkedElements[1].id.split('-')[1];\n var run2 = checkedElements[0].id.split('-')[1];\n window.open(\"$baseUrl?run1=\"+run1+\"&run2=\"+run2+\"&source=\"+namespace);\n }\n else\n {\n alert(\"We can only compare 2 runs.\");\n }\n}\n</script>\nEOF;\n \n return $html;\n }", "private function showDisplay() {\n\t\twp_enqueue_style('pokamodule-settings');\n//\t\twp_enqueue_script('pokamodule-settings');\n\t\t\n\t\trequire_once $this->sPath . '/tpl/template/display.php';\n\t}", "abstract public function getPanelName();", "public function getDisplay();", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function getPanel() {\n $isAdditionalBar = \\TracyDebugger::isAdditionalBar();\n $out = \"<h1>{$this->icon} {$this->label}\" . ($isAdditionalBar ? \" (\".$isAdditionalBar.\")\" : \"\") . \"</h1>\";\n\n $out .= '<span class=\"tracy-icons\"><span class=\"resizeIcons\"><a href=\"#\" title=\"Maximize / Restore\" onclick=\"tracyResizePanel(\\'' . $this->className . '\\')\">+</a></span></span>';\n\n // panel body\n $out .= '<div class=\"tracy-inner\">';\n\n $numOrphanFiles = count($this->orphanFiles);\n\n if($numOrphanFiles > 0) {\n $out .= '\n <form style=\"display:inline\" method=\"post\" action=\"'.\\TracyDebugger::inputUrl(true).'\" onsubmit=\"return confirm(\\'Do you really want to delete all the orange highlighted orphan files?\\');\">\n <input type=\"hidden\" name=\"orphanPaths\" value=\"'.implode('|', $this->orphanFiles).'\" />\n <input type=\"submit\" style=\"color:'.\\TracyDebugger::COLOR_WARN.' !important; color: #FFFFFF\" name=\"deleteOrphanFiles\" value=\"Delete '.$numOrphanFiles.' orphan'._n('', 's', $numOrphanFiles).'\" />\n </form>&nbsp&nbsp;';\n }\n\n if($this->numMissingFiles > 0) {\n $out .= '\n <form style=\"display:inline\" method=\"post\" action=\"'.\\TracyDebugger::inputUrl(true).'\" onsubmit=\"return confirm(\\'Do you really want to delete all the red highlighted missing pagefiles?\\');\">\n <input type=\"hidden\" name=\"missingPaths\" value=\"'.urlencode(json_encode($this->missingFiles)).'\" />\n <input type=\"submit\" style=\"color:'.\\TracyDebugger::COLOR_ALERT.' !important; color: #FFFFFF\" name=\"deleteMissingFiles\" value=\"Delete '.$this->numMissingFiles.' missing pagefile'._n('', 's', $this->numMissingFiles).'\" />\n </form>';\n }\n\n if($numOrphanFiles > 0 || $this->numMissingFiles > 0) {\n $out .= '<br /><br />';\n }\n\n $out .= '<div id=\"tracyPageFilesList\">'.$this->filesListStr.'</div>';\n\n $out .= \\TracyDebugger::generatePanelFooter($this->name, \\Tracy\\Debugger::timer($this->name), strlen($out));\n $out .= '</div>';\n\n return parent::loadResources() . $out;\n }", "public function panel()\n {\n $data = array('redirect' => Request::get('redirect') ? Request::get('redirect') : NULL);\n \n if (Session::userIsLoggedIn()) {\n $this->View->render('user/myProfile');\n } else {\n $this->View->render('user/smalllogin', $data);\n }\n }", "public function panel (\\stdClass $param);", "public function getPanel()\n\t{\n\t\t$items = $this->items;\n\t\tob_start();\n\t\trequire_once __DIR__ . \"/Callback.phtml\";\n\t\treturn ob_get_clean();\n\t}", "public function indexAction() {\n $panelsModel = new Datasource_Cms_Panels();\n $panels = $panelsModel->getAll();\n\n $this->view->panelsList = $this->view->partialLoop('/partials/panels-row.phtml', $panels);\n }", "private function tabs_panels() {\n\t\t\tforeach ( $this->tabs as $key => $tab ) {\n\t\t\t\t$active = ( $key === 0 );\n\n\t\t\t\t$panel_class = [ 'wpseo-local-meta-section' ];\n\t\t\t\tif ( $active ) {\n\t\t\t\t\t$panel_class[] = 'active';\n\t\t\t\t}\n\n\t\t\t\techo '<div role=\"tabpanel\" id=\"wpseo-local-tab-' . $tab['id'] . '\" class=\"' . implode( ' ', $panel_class ) . '\">';\n\t\t\t\techo '<div class=\"wpseo-local-metabox-content\">';\n\t\t\t\tdo_action( 'wpseo-local-panel-content-' . $tab['id'] );\n\t\t\t\techo '</div>';\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t}", "public function display_items() {\n\t\t$wrap_class = str_replace( '_', '-', $this->parant_plugin_slug );\n\t\t?>\n\t\t<div id=\"wpaddons-io-wrap\" class=\"wrap <?php echo $wrap_class; ?>-wrap\">\n\n\t\t\t<?php\n\t\t\t// Get addon\n\t\t\t$addons = $this->get_addons();\n\n\t\t\t// Load the display template\n\t\t\tinclude_once( $this->view );\n\t\t\t?>\n\n\t\t</div>\n\t\t<?php\n\t}", "public function getPanel() {\n\t\treturn $this->panel;\n\t}", "private function viewPanelSequent($data)\n\t{\n\t\t$this->panel($data,'-sequent');\t\t\n\t}", "function display() {\r\n\t\tJRequest::setVar('view', 'charts');\r\n\t\tJRequest::setVar('layout', 'charts');\r\n\t\tparent::display();\t\r\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "function showContent()\n {\n $this->showForm();\n\n $this->elementStart('div', array('id' => 'notices_primary'));\n\n\n $sharing = null;\n $sharing = $this->getSharings();\n $cnt = 0;\n\n if (!empty($sharing)) {\n $profileList = new SharingsList(\n $sharing,\n $this\n );\n\n $cnt = $profileList->show();\n $sharing->free();\n\n if (0 == $cnt) {\n $this->showEmptyListMessage();\n }\n }\n\n $this->elementEnd('div');\n\n }", "abstract protected function show();", "public function display() {}", "public function display() {}", "public function __construct(){\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }", "public function display(){\n\t\t\n\t\t\n\t\tJRequest::setVar('view','wbsdirmgr');\n\t\tJRequest::setVar('layout','default');\n\t\tparent::display();\t\t\t\t\n\t}", "function displayTools()\n\t{\n\t\t$this->checkDisplayMode();\n\n\t\t// output\n\t\tilUtil::sendInfo();\n\n\t\t// use property forms and add the settings type switch\n\t\t$ctrl_structure_form = $this->initControlStructureForm();\n\t\t$settings_type_form = $this->initSettingsTypeForm();\n\t\t$mp_ns_form = $this->initTreeImplementationForm();\n\n\t\t$this->tpl->setVariable(\"SETUP_CONTENT\",\n\t\t\t$ctrl_structure_form->getHTML() . \"<br />\" .\n\t\t\t$settings_type_form->getHTML().'<br />'.\n\t\t\t$mp_ns_form->getHTML());\n\n\t}", "public function display() {\n\n\t\t// Register WP built-in Thickbox for popup.\n\t\tadd_thickbox();\n\n\t\tparent::display();\n\t}", "public function getPanel(): PanelInterface;", "public function display() {\n\t}", "function show_full_control_panel_end( $out )\n\t{\n\t\tglobal $EXT, $IN, $PREFS, $LOC, $SESS;\n\n\t\tif($EXT->last_call !== FALSE)\n\t\t{\n\t\t\t$out = $EXT->last_call;\n\t\t}\n\n\t\tif($this->settings['enable'] == 'y')\n\t\t{\n\t\t\t// replace {site_name} in the setting\n\t\t\t$site_name = stripslashes($PREFS->ini('site_name'));\n\n\t\t\t$xhtml = '';\n\n\t\t\tif($this->settings['show_time'] == 'y')\n\t\t\t{\n\t\t\t\t$xhtml = \"<div id='server-time'>\";\n\t\t\t\t$xhtml .= \"Server Time: \" . date(\"D M j G:i:s T Y\") . \" <!-- \" . time() .\" --><br/>\";\n\t\t\t\t$xhtml .= \"EE UTC Time: \" . date(\"D M j G:i:s \\U\\T\\C Y\", $LOC->now) . \" <!-- \" . $LOC->now . \" --><br/>\";\n\t\t\t\t$xhtml .= \"PHP UTC Time: \" . gmdate(\"D M j G:i:s \\U\\T\\C Y\") . \"<br />\";\n\t\t\t\t$xhtml .= \"Localised Time: \" . date(\"D M j G:i:s Y\", $LOC->set_localized_time()) . \"<br />\";\n\t\t\t\t$xhtml .= \"Localised EE Human Time: \" . $LOC->set_human_time();\n\t\t\t\t$xhtml .= \"</div>\";\n\t\t\t}\n\n\t\t\t$fields = array(\n\t\t\t\t'xhtml' => $xhtml . $this->settings['xhtml'],\n\t\t\t\t'head_additions' => $this->settings['head_additions'],\n\t\t\t\t'foot_additions' => $this->settings['foot_additions'],\n\t\t\t\t'body_additions' => $this->settings['body_additions'],\n\t\t\t);\n\n\t\t\t$fields['xhtml'] = str_replace(\"{sitename}\", $PREFS->core_ini['site_name'], $fields['xhtml']);\n\t\t\t$fields['xhtml'] = str_replace(\"{site_name}\", $PREFS->core_ini['site_name'], $fields['xhtml']);\n\t\t\t$fields['xhtml'] = str_replace(\"{site_description}\", $PREFS->core_ini['site_description'], $fields['xhtml']);\n\t\t\t$fields['xhtml'] = str_replace(\"{site_url}\", $PREFS->core_ini['site_url'], $fields['xhtml']);\n\t\t\t$fields['xhtml'] = str_replace(\"{screen_name}\", $SESS->userdata['screen_name'], $fields['xhtml']);\n\t\t\t$fields['xhtml'] = str_replace(\"{username}\", $SESS->userdata['username'], $fields['xhtml']);\n\n\t\t\t// we just check if this is set for updates\n\t\t\tif(isset($this->settings['enable_super_replacements']) && $this->settings['enable_super_replacements'] == 'y')\n\t\t\t{\n\t\t\t\tforeach ($fields as $field => $field_contents)\n\t\t\t\t{\n\t\t\t\t\t$replacements = array_merge($PREFS->core_ini, $SESS->userdata);\n \t\t\t\t\tforeach($replacements as $key => $value)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(is_array($value) === FALSE && strpos($field_contents, LD . $key . RD) !== FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$fields[$field] = str_replace(LD.$key.RD, $value, $fields[$field]);\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\t$patterns[0] = \"#</head>#\";\n\t\t\t$replacements[0] = \"\\n\" . $fields['head_additions'] . \"\\n\" . '<style type=\"text/css\" media=\"screen\">'.$this->settings['css'].\"</style>\\n</head>\";\n\n\t\t\t$patterns[1] = \"#<body>#\";\n\t\t\t$replacements[1] = \"\\n<body>\" . $fields['body_additions'];\n\n\t\t\t$patterns[2] = \"#</body>#\";\n\t\t\t$replacements[2] = \"\\n\" . $fields['foot_additions'] . \"\\n</body>\";\n\n\t\t\t// CP head html\n\t\t\t$patterns[3] = \"/(<div class='helpLinksLeft' >)/\";\n\t\t\t$replacements[3] = \"<div class='helpLinksLeft' >\" . $fields['xhtml'];\n\t\t\t\n\t\t\tif(isset($this->settings['enable_page_title_replacement']) === TRUE && $this->settings['enable_page_title_replacement'] == 'y')\n\t\t\t{\n\t\t\t\t$patterns[4] = \"/ExpressionEngine<\\/title>/\";\n\t\t\t\t$replacements[4] = str_replace(\"{site_name}\", $PREFS->core_ini['site_name'], $this->settings['page_title_replacement_value']) . \"</title>\";\n\t\t\t}\n\n\t\t\tif(isset($SESS->cache['Morphine']['cp_styles_included']) === FALSE)\n\t\t\t{\n\t\t\t\t$patterns['morphine'] = \"#</head>#\";\n\t\t\t\t$replacements['morphine'] = \"\\n<link rel='stylesheet' type='text/css' media='screen' href='\" . $PREFS->ini('theme_folder_url', 1) . \"cp_themes/\".$PREFS->ini('cp_theme').\"/Morphine/css/MOR_screen.css' /></head>\";\n\t\t\t\t$SESS->cache['Morphine']['cp_styles_included'] = TRUE;\n\t\t\t}\n\n\n\t\t\t// the new output\n\t\t\t$out = preg_replace($patterns, $replacements, $out);\n\t\t}\n\n\t\treturn $out;\n\t}", "function showThreadsObject()\n\t{\n\t\t$this->tpl->setRightContent($this->getRightColumnHTML());\n\t\t$this->getCenterColumnHTML();\n\t}", "public function LogsPanel() {\n\t\treturn $this->renderWith('KapostBridgeLogViewer_Logs');\n\t}", "public function show()\n\t{\n\t\t\n\t}", "function infoScreen()\n\t{\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreenForward();\n\t}", "public function panelButtons()\n {\n\n $i18n = $this->getI18n();\n $html = '';\n \n if ($this->buttons || $this->filterButtons) {\n $html .= '<div class=\"wgt-panel\" >';\n \n if ($this->buttons) {\n $html .= '<div class=\"left\" >';\n $html .= $this->buildButtons();\n $html .= '</div>';\n }\n \n if ($this->filterButtons) {\n $html .= '<div class=\"right\" ><div class=\"left\" ><strong>'.$i18n->l('Filters', 'wbf.label').'&nbsp;|&nbsp;</strong></div>';\n $html .= $this->buildButtons($this->filterButtons);\n $html .= '</div>';\n }\n \n if ($this->filterPanel) {\n $html .= $this->filterPanel->render();\n }\n \n $html .= '</div>';\n }\n \n return $html;\n \n }", "public function panel() {\n require 'modelos/usuariosModelo.php';\n\n //Creamos una instancia de nuestro \"modelo\"\n $usuarios = new usuarioModelo();\n\n //Le pedimos al modelo todos los datos del usuario para desplegarlos en el panel\n $datosUsuario = $usuarios->datosUsuario($_SESSION['userid']);\n \n $this->vista->desplegar(\"panel\", \"panelDeUsuarios.php\"/* , $data */);\n }", "public function get_panel($id)\n {\n }", "function display () {\n\t\t// So that if we're displaying a list of reports that are\n\t\t// available for editing, it's accurate.\n\t\t$this->_update_locked();\n\t\n\t\t$data = $this->_get_data_by_recent ();\n\t\t\n\t\t$this->render($data);\n\t\n\t}", "function display($tpl = null) \n {\n \t$this->config = JComponentHelper::getParams('com_convertforms');\n $this->latestleads = ConvertForms\\Helper::getLatestLeads();\n\n \tJHTML::_('behavior.modal');\n JHtml::_('bootstrap.popover');\n JHtml::stylesheet('jui/icomoon.css', array(), true);\n\n JToolBarHelper::title(JText::_('COM_CONVERTFORMS'));\n\n // Display the template\n parent::display($tpl);\n }", "public function drawEndHeaderPanel()\r\n {\r\n echo '</div>';\r\n }", "public function __construct() {\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }", "public function render() {\n\t\techo $this->header->toString();\n\t\techo $this->panel->toString();\n\t\techo $this->page->toString();\n\t\tif( $this->getMessages() != null ) {\n\t\t\techo $this->messages->toString();\n\t\t}\n\t\techo $this->footer->toString();\n\t}", "private function viewPanelIndependent($data)\n\t{\n\t\t$this->panel($data,'',true);\n\t}", "public function show();", "public function show();", "public function show();", "public function show();", "function displayMenu()\n\t{\n\t\tshowInfo();\n\t\tshowActions();\n\t}", "public function display() {\n echo $this->render();\n }", "protected function render() {\n\t\t$settings = $this->get_settings_for_display();\n\t\t\n\t\techo '<div class = \"selector-demo\">';\n\t\techo '<div class=\"title div33 el\">';\n\t\techo $settings['title'];\n\t\techo '<div class = \"box\" style=\"background-color:blue; width: ' . $settings['width']['size'] . $settings['width']['unit'] . '\">';\n\t\techo 'Hello';\n\t\techo '</div>';\n\t\techo '</div>';\n\t\t\n\t\techo '<div class = \"wrapper\">\n\t\tHello Circle\n\t\t</div>';\n\t\t\n if ( 'yes' === $settings['show_title'] ) {\n\t\techo '<div class=\"title div34 el\">';\n\t\techo $settings['Subtitle'];\n\t\techo '</div>';\n\t\techo '<div class=\"title2 div35 el\">';\n\t\techo $settings['Subtitle'];\n\t\techo '</div>';\n\t\t}\n \n\t\tforeach ( $settings['gallery'] as $image ) {\n\t\t\techo '<img class = \"siva_image_drag\" src=\"' . $image['url'] . '\">';\n\t\t}\n\t\t\n\t\techo '</div>';\n\t\techo '<div class=\"selector-demo\">';\n\t\techo '<div class = \"div33 el\"> Anime Demo</div> <div class = \"div34 el\"> Anime Demo</div> <div class = \"div35 el\"> Anime Demo</div>';\n\t\techo $settings['class'];\n\t\techo '</div>';\n\t\t\n\t\t\n\t\t\n\t}", "public function render_screen_layout()\n {\n }", "function DisplayFeatures()\r\n\t{\r\n\t\tif (! $this->m_news->GetID ())\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$newsID = $this->m_news->GetID ();\r\n\t\t// language strings \r\n\t\t$doneS = $this->GetNameString ( 'done' );\r\n\t\t$optionsS = $this->GetNameString ( 'options' );\r\n\t\t\r\n\t\t$NameS = 'Tab Name'; //$this->GetNameString('Name');\r\n\t\t\r\n\r\n\t\t// values\r\n\t\t$NameV = $this->m_news->GetName ();\r\n\t\t\r\n\t\t//Display title\r\n\t\t$name = $this->m_news->GetName ();\r\n\t\t$this->DisplayTitle ( $name, null, false );\r\n\t\t//////////////////////////////////////\r\n\t\t$panelIndex = 0;\r\n\t\t\r\n\t\tprint ( \"<div class='someGTitleBox'>$optionsS</div>\" );\r\n\t\tprint ( '<div class=\"someGBox\">' );\r\n\t\t\r\n\t\t//Forms\r\n\t\t$updating = true;\r\n\t\t$reading = false;\r\n\t\t\r\n\t\tif (CMSObject::$controller)\r\n\t\t{\r\n\t\t\t$reading = CMSObject::$controller->IsRecReadable ( $this->m_news, 'name' );\r\n\t\t\t$updating = CMSObject::$controller->IsRecUpdatable ( $this->m_news, 'name' );\r\n\t\t}\r\n\t\t\r\n\t\tif ($reading || $updating)\r\n\t\t{\r\n\t\t\t// tab header\r\n\t\t\t$this->DisplayTabHeader ( ++ $panelIndex, $NameS );\r\n\t\t\t\r\n\t\t\tif ($updating)\r\n\t\t\t{\r\n\t\t\t\t$this->DisplayFormHeadr ( 'changeName' );\r\n\t\t\t\t$this->DisplayHidden ( 'newsID', $newsID );\r\n\t\t\t\tprint ( \"<input type='text' value='$NameV' name='Name' id='Name' size='40' maxlength='32' />\\n\" );\r\n\t\t\t\t$this->DisplayFormFooter ( $doneS );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tprint ( $NameV );\r\n\t\t\t}\r\n\t\t\t// tab footer\r\n\t\t\t$this->DisplayTabFooter ();\r\n\t\t}\r\n\t\tprint ( '</div>' );\r\n\t\t\r\n\t\t// display javascript\r\n\t\tprint ( '<script type=\"text/javascript\"><!--' );\r\n\t\t\r\n\t\tfor($index = 0; $index <= $panelIndex; $index ++)\r\n\t\t\tprint ( \"var CollapsiblePanel$index = new Spry.Widget.CollapsiblePanel(\\\"CollapsiblePanel$index\\\", {contentIsOpen:false});\\n\" );\r\n\t\tprint ( '//--></script>' );\r\n\t}", "public function listPanel()\n {\n $solarPanel = DB::table('solar_panels')\n ->join('solar_panel_types','solar_panel_types.id','solar_panels.solarPanelType')\n ->get();\n // return $solarPanel;\n return view('stock.product',[\n 'panels' => $solarPanel\n ]);\n }", "public function display($tpl = null) {\r\n\t\tjimport ( 'joomla.html.pane' );\r\n\t\t$doc = JFactory::getDocument ();\r\n\t\t$doc->addStylesheet ( JURI::root ( true ) . '/administrator/components/com_jmap/css/help.css' );\r\n\t \r\n\t\t$pane = JPane::getInstance ( 'sliders' );\r\n\t\t// Assign reference variables\r\n\t\t$this->assignRef ( 'pane', $pane ); \r\n\t\t\r\n\t\t// Aggiunta toolbar\r\n\t\t$this->addDisplayToolbar();\r\n\t\t\r\n\t\t// Output del template\r\n\t\tparent::display ();\r\n\t}", "public function getPanel()\n {\n $this->_request = Zend_Controller_Front::getInstance()->getRequest();\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\n $viewVars = $viewRenderer->view->getVars();\n $vars = '';\n if ($this->_request->isPost())\n {\n $vars .= '<h4>$_POST</h4>'\n . '<div id=\"ZFDebug_post\">' . $this->_cleanData($this->_request->getPost()) . '</div>';\n }\n \n if (isset($_SESSION)) {\n \t$vars .= '<h4>$_SESSION</h4>'\n\t\t\t\t. '<div id=\"ZFDebug_cookie\">' . $this->_cleanData($_SESSION) . '</div>';\n }\n\n $vars .= '<h4>$_COOKIE</h4>'\n . '<div id=\"ZFDebug_cookie\">' . $this->_cleanData($this->_request->getCookie()) . '</div>'\n . '<h4>Request</h4>'\n . '<div id=\"ZFDebug_requests\">' . $this->_cleanData($this->_request->getParams()) . '</div>'\n . '<h4>View vars</h4>'\n . '<div id=\"ZFDebug_vars\">' . $this->_cleanData($viewVars) . '</div>';\n return $vars;\n }", "public function buildPanels() {\n return array($this);\n }" ]
[ "0.7467281", "0.738621", "0.71024907", "0.691988", "0.67751735", "0.6739799", "0.67290086", "0.67144597", "0.6699651", "0.6682468", "0.65935904", "0.65916866", "0.65675694", "0.6551103", "0.6542473", "0.6540349", "0.6524116", "0.64848644", "0.6474223", "0.64242697", "0.6392073", "0.63677317", "0.63658655", "0.635469", "0.6354132", "0.63406825", "0.63406825", "0.63406825", "0.63224477", "0.63151866", "0.63047993", "0.6302436", "0.63008535", "0.6299585", "0.6299585", "0.6278583", "0.6278583", "0.62507576", "0.624419", "0.6228874", "0.6225562", "0.6222153", "0.6222153", "0.6221564", "0.6221564", "0.6189027", "0.6178642", "0.6143666", "0.6133706", "0.6096436", "0.6082659", "0.6075582", "0.6054936", "0.6050688", "0.60434043", "0.6037264", "0.60263526", "0.6012179", "0.60108155", "0.6006021", "0.6003862", "0.60012287", "0.60012287", "0.60012287", "0.59953547", "0.59938645", "0.59882706", "0.59882706", "0.5988155", "0.5981735", "0.5980447", "0.5968901", "0.5965059", "0.59454733", "0.59321964", "0.5926738", "0.59155834", "0.5907112", "0.5904139", "0.5903792", "0.5898131", "0.589109", "0.58559346", "0.5855157", "0.5854499", "0.58502215", "0.5833095", "0.5832399", "0.58297765", "0.58297765", "0.58297765", "0.58297765", "0.58155096", "0.5807839", "0.5807664", "0.5804009", "0.58007896", "0.5799255", "0.57986695", "0.5798537", "0.5796476" ]
0.0
-1
$Id: date_tools.wizard.inc,v 1.1.2.3 2010/04/13 19:32:28 karens Exp $
function date_tools_wizard_form() { $form = array(); $form['type'] = array( '#type' => 'fieldset', '#title' => t('Content type'), ); $form['type']['type_name'] = array( '#type' => 'textfield', '#default_value' => 'date', '#title' => t('Content type name'), '#description' => t('Machine-readable name. Allowed values: (a-z, 0-9, _). If this is not an existing content type, the content type will be created.'), ); $form['type']['name'] = array( '#type' => 'textfield', '#default_value' => t('Date'), '#title' => t('Content type label'), '#description' => t('The human-readable name for this content type. Only needed when creating a new content type.'), ); $form['type']['type_description'] = array( '#type' => 'textarea', '#default_value' => t('A date content type that is linked to a Views calendar.'), '#title' => t('Content type description'), '#description' => t('A description for the content type. Only needed when creating a new content type.'), ); $form['field'] = array( '#type' => 'fieldset', '#title' => t('Date field'), ); $form['field']['field_name'] = array( '#type' => 'textfield', '#default_value' => 'date', '#field_prefix' => 'field_', '#title' => t('Date field name'), '#description' => t('Machine-readable name. Allowed values: (a-z, 0-9, _) Must not be an existing field name.'), ); $form['field']['label'] = array( '#tree' => TRUE, '#type' => 'textfield', '#default_value' => t('Date'), '#title' => t('Date field label'), '#description' => t('The human-readable label for this field.'), ); $form['field']['widget_type'] = array( '#type' => 'select', '#options' => date_tools_wizard_widget_types(), '#default_value' => 'date_select', '#title' => t('Date widget type'), ); $form['field']['repeat'] = array( '#type' => 'select', '#default_value' => 0, '#options' => array(0 => t('No'), 1 => t('Yes')), '#title' => t('Show repeating date options'), ); $form['field']['advanced'] = array( '#type' => 'fieldset', '#collapsible' => TRUE, '#collapsed' => TRUE, '#title' => t('Advanced options'), ); $form['field']['advanced']['field_type'] = array( '#type' => 'select', '#options' => date_tools_wizard_field_types(), '#default_value' => 'datetime', '#title' => t('Date field type'), '#description' => t("The recommend type is Datetime, except for historical dates or dates with only year or month granularity. Older or incomplete dates should use the Date type (an ISO date)."), ); $form['field']['advanced']['granularity'] = array( '#type' => 'select', '#options' => date_granularity_names(), '#default_value' => array('month', 'day', 'year', 'hour', 'minute'), '#title' => t('Granularity'), '#multiple' => TRUE, ); $form['field']['advanced']['tz_handling'] = array( '#type' => 'select', '#options' => date_tools_wizard_tz_handling(), '#default_value' => 'site', '#title' => t('Date timezone handling'), '#description' => t("Timezone handling should be set to 'none' for granularity without time elements.") ); $form['calendar'] = array( '#type' => 'select', '#default_value' => 1, '#options' => array(0 => t('No'), 1 => t('Yes')), '#title' => t('Create a calendar for this date field'), ); $form['blocks'] = array( '#type' => 'select', '#options' => array(0 => t('No'), 1 => t('Yes')), '#default_value' => 0, '#title' => t('Add calendar blocks to the current theme'), ); $form['submit'] = array( '#type' => 'submit', '#value' => t('Save'), ); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildCalendarMenu($automated, &$year, &$day, &$month, &$hour, &$min)\n{\n $today = getdate();\n $tday = $today['mday'];\n if ($tday < 10){\n $tday = \"0$tday\";\n }\n $tmonth = $today['month'];\n $ttmon = $today['mon'];\n if ($ttmon < 10){\n $ttmon = \"0$ttmon\";\n }\n $tyear = $today['year'];\n $thour = $today['hours'];\n if ($thour < 10){\n $thour = \"0$thour\";\n }\n $tmin = $today['minutes'];\n if ($tmin < 10){\n $tmin = \"0$tmin\";\n }\n $tsec = $today['seconds'];\n if ($tsec < 10){\n $tsec = \"0$tsec\";\n }\n $date = \"$tmonth $tday, $tyear @ $thour:$tmin:$tsec\"; /* ML get the language from the queue table */\n $formatted_date = ml_ftime(_DATETIMELONG, mktime($today['hours'],$today['minutes'],$today['seconds'],$today['mon'],$today['mday'],$today['year']));\n if(!$automated){\n echo _NOWIS.': '.pnVarPrepForDisplay($formatted_date).'<br />';\n echo _HOUR.': <select name=\"hour\">';\n $hour = 0;\n $cero = '0';\n while ($hour <= 23) {\n $dummy = $hour;\n if ($hour < 10) {\n $hour = \"$cero$hour\";\n }\n echo '<option>'.pnVarPrepForDisplay($hour).'</option>';\n $hour = $dummy;\n $hour++;\n }\n echo \"</select>&nbsp;\";\n echo \": <select name=\\\"min\\\">\";\n $min = 0;\n while ($min <= 59) {\n if (($min == 0) OR ($min == 5)) {\n $min = \"0$min\";\n }\n echo \"<option>\".pnVarPrepForDisplay($min).\"</option>\";\n $min = $min + 5;\n }\n echo \"</select>&nbsp;&nbsp;\";\n $day = 1;\n echo _DAY.': <select name=\"day\">';\n while ($day <= 31) {\n if ($tday==$day) {\n $sel = 'selected=\"selected\"';\n } else {\n $sel = '';\n }\n echo '<option '.$sel.'>'.pnVarPrepForDisplay($day).'</option>';\n $day++;\n }\n echo '</select>&nbsp;&nbsp;';\n $month = 1;\n echo _MONTH.': <select name=\"month\">';\n while ($month <= 12) {\n if ($ttmon==$month) {\n $sel = 'selected=\"selected\"';\n } else {\n $sel = '';\n }\n echo '<option '.$sel.'>'.pnVarPrepForDisplay($month).'</option>';\n $month++;\n }\n echo '</select>&nbsp;&nbsp;';\n $date = getdate();\n $formatted_date = ml_ftime(_DATETIMELONG, mktime($date['hours'],$date['minutes'],$date['seconds'],$date['mon'],$date['mday'],$date['year']));\n $year = $date['year'];\n echo _YEAR.': <input type=\"text\" name=\"year\" value=\"'.pnVarPrepForDisplay($year).'\" size=\"5\" maxlength=\"4\" /><br />';\n } else {\n echo _NOWIS.': '.pnVarPrepForDisplay($formatted_date).'<br />';\n echo _HOUR.': <select name=\"hour\">';\n $xhour = 0;\n $cero = '0';\n while ($xhour <= 23) {\n $dummy = $xhour;\n if ($xhour < 10) {\n $xhour = \"$cero$xhour\";\n }\n if ($xhour == $hour) {\n $sel = 'selected=\"selected\"';\n } else {\n $sel = '';\n }\n echo '<option '.$sel.'>'.pnVarPrepForDisplay($xhour).'</option>';\n $xhour = $dummy;\n $xhour++;\n }\n echo '</select>&nbsp;';\n echo ': <select name=\"min\">';\n $xmin = 0;\n while ($xmin <= 59) {\n if (($xmin == 0) OR ($xmin == 5)) {\n $xmin = \"0$xmin\";\n }\n if ($xmin == $min) {\n $sel = 'selected=\"selected\"';\n } else {\n $sel = '';\n }\n echo '<option '.$sel.'>'.pnVarPrepForDisplay($xmin).'</option>';\n $xmin = $xmin + 5;\n }\n echo '</select>&nbsp;';\n $xday = 1;\n echo _DAY.': <select name=\"day\">';\n while ($xday <= 31) {\n if ($xday == $day) {\n $sel = 'selected=\"selected\"';\n } else {\n $sel = '';\n }\n echo '<option '.$sel.'>'.pnVarPrepForDisplay($xday).'</option>';\n $xday++;\n }\n echo '</select>&nbsp;';\n $xmonth = 1;\n echo _MONTH.': <select name=\"month\">';\n while ($xmonth <= 12) {\n if ($xmonth == $month) {\n $sel = 'selected=\"selected\"';\n } else {\n $sel = '';\n }\n echo '<option '.$sel.'>'.pnVarPrepForDisplay($xmonth).'</option>';\n $xmonth++;\n }\n echo '</select>&nbsp;';\n echo _YEAR.': <input type=\"text\" name=\"year\" value=\"'.pnVarPrepForDisplay($year).'\" size=\"5\" maxlength=\"4\" /><br />';\n }\n}", "function the_date_xml()\n {\n }", "function dms_get_date($var_name, $current_value = -1)\n\t{\n\tif($current_value != -1)\n\t\t{\n\t\t$month = (int)strftime(\"%m\",$current_value);\n\t\t$day = (int)strftime(\"%d\",$current_value);\n\t\t$year = (int)strftime(\"%Y\",$current_value);\n\t\t}\n\t\t\n// Get Month\n\tprint \"<select name='slct_\".$var_name.\"_month'>\\r\";\n\tfor($index = 1;$index <= 12; $index++)\n\t\t{\n\t\t$selected = \"\";\n\t\tif( ($current_value != -1) && ($index == $month) ) $selected = \"SELECTED\";\n\t\tprint \" <option \".$selected.\">\".$index.\"</option>\\r\";\n\t\t}\n\tprint \"</select>\\r\";\n\n\tprint \"/&nbsp;\";\n\t\n// Get Day\n\tprint \"<select name='slct_\".$var_name.\"_day'>\\r\";\n\tfor($index = 1;$index <= 31; $index++)\n\t\t{\n\t\t$selected = \"\";\n\t\tif( ($current_value != -1) && ($index == $day) ) $selected = \"SELECTED\";\n\t\tprint \" <option \".$selected.\">\".$index.\"</option>\\r\";\n\t\t}\n\tprint \"</select>\\r\";\n\n\tprint \"/&nbsp;\";\n\t\n// Get Year\n\tprint \"<select name='slct_\".$var_name.\"_year'>\\r\";\n\tfor($index = 2007;$index <= 2030; $index++)\n\t\t{\n\t\t$selected = \"\";\n\t\tif( ($current_value != -1) && ($index == $year) ) $selected = \"SELECTED\";\n\t\tprint \" <option \".$selected.\">\".$index.\"</option>\\r\";\n\t\t}\n\tprint \"</select>\\r\";\n\t}", "function date_tools_wizard_required_modules($options = array()) {\n $options = date_tools_wizard_options($options);\n $modules = array(\n 'date_timezone', 'date_api', 'content', 'date', \n 'calendar', 'views', 'views_ui',\n );\n if (in_array('popups', $options)) {\n $modules = array_merge($modules, array('date_popup', 'jcalendar'));\n }\n if (in_array('repeat', $options)) {\n $modules = array_merge($modules, array('date_repeat'));\n }\n return $modules;\n}", "private function _init_date()\n\t{\n\t\t$this->date->init($this->EE->TMPL->fetch_param('date'));\n\t\t$this->_log(sprintf(\"Working date set to %s %s\", $this->date->date(), $this->date->time()));\n\t}", "function print_date_selection_set( $p_name, $p_format, $p_date = 0, $p_default_disable = false, $p_allow_blank = false, $p_year_start = 0, $p_year_end = 0, $p_input_css = \"input-sm\" ) {\n\tif( $p_date != 0 ) {\n\t\t$t_date = date( $p_format, $p_date );\n\t} else {\n\t\t$t_date = '';\n\t}\n\n\t$t_disable = '';\n\tif( $p_default_disable == true ) {\n\t\t$t_disable = ' readonly=\"readonly\"';\n\t}\n\n \techo '<input ' . helper_get_tab_index() . ' type=\"text\" name=\"' . $p_name . '_date\" ' .\n\t\t' class=\"datetimepicker ' . $p_input_css . '\" ' . $t_disable .\n\t\t' data-picker-locale=\"' . lang_get_current_datetime_locale() . '\"' .\n\t\t' data-picker-format=\"' . convert_date_format_to_momentjs( $p_format ) . '\"' .\n\t\t' size=\"16\" maxlength=\"20\" value=\"' . $t_date . '\" />';\n\techo '<i class=\"fa fa-calendar fa-xlg datetimepicker\"></i>';\n}", "function selectDateEntry($display,$namePre,$month,$day,$year,$errors)\n{\n\t$returnVal = \"<tr>\n\t\t<td>$display:</td>\n\t\t<td>\n\t\t\t<select name='$namePre\" . \"Month'>\";\n\t\t\tfor ($i=1; $i<=12; $i++)\n\t\t\t{\n\t\t\t\tif ($i == $month)\n\t\t\t\t{\n\t\t\t\t\t$returnVal .= \"<option value='$i' selected>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$returnVal .= \"<option value='$i'>\";\n\t\t\t\t}\n\t\t\t\t$returnVal .= monthAsString($i) . \"</option>\";\n\t\t\t}\n\t\t\t$returnVal .= \"</select>\n\t\t\t<select name='$namePre\" . \"Day'>\";\n\t\t\tfor ($i=1; $i<=31; $i++)\n\t\t\t{\n\t\t\t\tif ($i == $day)\n\t\t\t\t{\n\t\t\t\t\t$returnVal .= \"<option value='$i' selected>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$returnVal .= \"<option value='$i'>$i</option>\";\n\t\t\t\t}\n\t\t\t\t$returnVal .= \"$i</option>\";\n\t\t\t}\n\t\t\t$returnVal .= \"</select>\n\t\t\t<select name='$namePre\" . \"Year'>\";\n\t\t\tfor ($i=date('Y'); $i>=1900; $i=$i-1)\n\t\t\t{\n\t\t\t\tif ($i == $year)\n\t\t\t\t{\n\t\t\t\t\t$returnVal .= \"<option value='$i' selected>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$returnVal .= \"<option value='$i'>$i</option>\";\n\t\t\t\t}\n\t\t\t\t$returnVal .= \"$i</option>\";\n\t\t\t}\n\t\t\t$returnVal .= \"</select>\n\t\t</td>\n\t</tr>\";\n\n\tif (array_key_exists($namePre . 'Date',$errors))\n\t{\n\t\t$returnVal .= addErrorRow($namePre . 'Date',$errors);\n\t}\n\treturn $returnVal;\n}", "function page_dates() {\r\n \t\tglobal $admin_lang, $extern_action, $extern_sure, $extern_topic, $extern_date, $extern_place, $extern_id, $_SERVER, $actual_user_id, $actual_user_showname;\r\n\t\t\r\n\t\tif(!isset($extern_action))\r\n\t\t\t$extern_action = '';\r\n\t\t\r\n\t\t$out = \"\\t\\t\\t<h3>\" . $admin_lang['dates'] . \"</h3><hr />\\r\\n\";\r\n\t\t\r\n\t\t//\r\n\t\t// delete the selected entrie\r\n\t\t//\r\n\t\tif($extern_action == \"delete\") {\r\n\t\t\tif(isset($extern_sure)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tif($extern_sure == 1)\r\n\t\t\t\t\tdb_result(\"DELETE FROM \" . DB_PREFIX . \"dates WHERE date_id=\" . $extern_id);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$result = db_result(\"SELECT * FROM \" . DB_PREFIX . \"dates WHERE date_id=\" . $extern_id);\r\n\t\t\t\t$row = mysql_fetch_object($result);\r\n\t\t\t\t$out .= \"Den News Eintrag &quot;\" . $row->date_topic . \"&quot; wirklich löschen?<br />\r\n\t\t\t<a href=\\\"admin.php?page=dates&amp;action=delete&amp;id=\" . $extern_id . \"&amp;sure=1\\\" title=\\\"Wirklich Löschen\\\">ja</a> &nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t<a href=\\\"admin.php?page=dates\\\" title=\\\"Nicht Löschen\\\">nein</a>\";\r\n\t\t\t\r\n\t\t\t\treturn $out;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//\r\n\t\t// add a new entrie\r\n\t\t//\r\n\t\telseif($extern_action == \"new\") {\r\n\t\t\tif($extern_topic != \"\" && $extern_place != \"\" && $extern_date != \"\") {\r\n\t\t\t\t$date = explode(\".\", $extern_date);\r\n\t\t\t\tdb_result(\"INSERT INTO \".DB_PREFIX.\"dates (date_topic, date_place, date_date, date_creator) VALUES ('\".$extern_topic.\"', '\".$extern_place.\"', '\".mktime(0, 0, 0, $date[1], $date[0], $date[2]).\"', '$actual_user_id')\");\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t//\r\n\t\t// update the selected entrie\r\n\t\t//\r\n\t\telseif($extern_action == \"update\") { \r\n\t\t\tif($extern_topic != \"\" && $extern_place != \"\" && $extern_date != \"\" && $extern_id != 0) {\r\n\t\t\t\t$date = explode(\".\", $extern_date);\r\n\t\t\t\tdb_result(\"UPDATE \".DB_PREFIX.\"dates SET date_topic= '\".$extern_topic.\"', date_place= '\".$extern_place.\"', date_date='\".mktime(0, 0, 0, $date[1], $date[0], $date[2]).\"' WHERE date_id=\".$extern_id);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($extern_action != \"edit\") {\r\n\t\t\t$out .= \"\\t\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"dates\\\" />\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"new\\\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['date'] . \": <span class=\\\"info\\\">Dies ist das Datum, an dem die Veranstaltung stattfindet (Format: TT.MM.YYYY, Beispiel: 05.11.2005)</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"date\\\" maxlength=\\\"10\\\" value=\\\"\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['location'] . \": <span class=\\\"info\\\">Gemeint ist hier der Ort an welchem die Veranstaltung stattfindet.</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"place\\\" maxlength=\\\"60\\\" value=\\\"\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['topic'] . \": <span class=\\\"info\\\">Dies ist die Beschreibung des Termins</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"topic\\\" maxlength=\\\"150\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Eingelogt als \" . $actual_user_showname . \" &nbsp;</td><td><input type=\\\"submit\\\" class=\\\"button\\\" value=\\\"Senden\\\" />&nbsp;<input type=\\\"reset\\\" class=\\\"button\\\" value=\\\"Zurücksetzen\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t<br />\r\n\t\t\t</form>\\r\\n\";\r\n\t\t}\r\n\t\t\t$out .= \"\\t\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"dates\\\" />\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"update\\\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['date'] . \":</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['location'] . \":</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['topic'] . \":</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['creator'] . \":</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['actions'] . \":</td>\r\n\t\t\t\t\t</tr>\\r\\n\";\r\n\t\t//\r\n\t\t// write all news entries\r\n\t\t//\r\n\t\t$result = db_result(\"SELECT * FROM \" . DB_PREFIX . \"dates ORDER BY date_date ASC\");\r\n\t\twhile($row = mysql_fetch_object($result)) {\r\n\t\t\t//\r\n\t\t\t// show an editform for the selected entrie\r\n\t\t\t//\r\n\t\t\tif($extern_id == $row->date_id && $extern_action == \"edit\") {\r\n\t\t\t\t$out .= \"\\t\\t\\t\\t\\t<tr id=\\\"dateid\" . $row->date_id . \"\\\">\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"id\\\" value=\\\"\".$row->date_id.\"\\\" />\r\n\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"date\\\" maxlength=\\\"10\\\" value=\\\"\" . date(\"d.m.Y\", $row->date_date) . \"\\\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"place\\\" maxlength=\\\"60\\\" value=\\\"\" . $row->date_place . \"\\\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"topic\\\" value=\\\"\" . $row->date_topic . \"\\\" maxlength=\\\"150\\\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . getUserByID($row->date_creator) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input type=\\\"submit\\\" value=\\\"Speichern\\\" class=\\\"button\\\" />\r\n\t\t\t\t\t\t\t&nbsp;<a href=\\\"admin.php?page=dates&amp;action=delete&amp;id=\".$row->date_id.\"\\\" title=\\\"Löschen\\\">Löschen</a>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\";\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\t// show only the entrie\r\n\t\t\t//\r\n\t\t\telse {\r\n\t\t\t\t$out .= \"\\t\\t\\t\\t\\t<tr ID=\\\"dateid\" . $row->date_id . \"\\\">\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . date(\"d.m.Y\", $row->date_date) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . $row->date_place . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . nl2br($row->date_topic) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . getUserByID($row->date_creator) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t\t<a href=\\\"admin.php?page=dates&amp;action=edit&amp;id=\".$row->date_id.\"#dateid\".$row->date_id.\"\\\" title=\\\"Bearbeiten\\\">Bearbeiten</a>\r\n\t\t\t\t\t\t\t&nbsp;<a href=\\\"admin.php?page=dates&amp;action=delete&amp;id=\".$row->date_id.\"\\\" title=\\\"Löschen\\\">Löschen</a>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\\r\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$out .= \"\\t\\t\\t\\t</table>\r\n\t\t\t</form>\";\r\n\t\r\n\t\treturn $out;\r\n \t}", "function wc_marketplace_date2() {\n global $wmp;\n $wmp->output_report_date2();\n }", "public function stdWrap_dateDataProvider() {}", "function wp_checkdate($month, $day, $year, $source_date)\n {\n }", "function DateDropDowns($name,$sel,$attr,$class_time,$class_date,$showdate,$tag_between,$p=array(),$return=false) {\n\tif (!is_array($p)) {\n\t\t$p = array();\t\n\t}\n\tif (is_array($sel)) {\n\t\t$sel = sprintf('%04d-%02d-%02d %02d:%02d:00', $sel['Year'],$sel['Month'],$sel['Day'],$sel['Hour'],$sel['Minute']);\n\t}\n\telseif (is_numeric($sel)) {\n\t\t$sel = Date::td($sel);\n\t}\n\t$tag_sep = ' ';\n\tif (is_array($tag_between)) {\n\t\t$tag_sep = $tag_between[1];\n\t\t$tag_between = $tag_between[0];\t\n\t}\n\tif (!isset($p['hour_next'])) $p['hour_next'] = 0;\n\tif (!isset($p['minute_next'])) $p['minute_next'] = 0;\n\n\t\n\tif (!isset($p['empty'])) $p['empty'] = false;\n\t\n\tif (!$sel || $sel=='0000-00-00 00:00:00') {\n\t\tif (!$p['empty']) {\n\t\t\t$sel = Date::now($p['year_next'],$p['month_next'],$p['day_next'],$p['hour_next'],$p['minute_next']);\n\t\t}\n\t}\n\t$year_sel = $month_sel = $day_sel = $minute_sel = $hour_sel = '';\n\t$l = strlen($sel);\n\tif ($l==19 || $l==10) {\n\t\t$year_sel = (int)substr($sel, 0, 4);\n\t\t$month_sel = (int)substr($sel, 5, 2);\n\t\t$day_sel = (int)substr($sel, 8, 2);\n\t\tif ($l!=10) {\n\t\t\t$hour_sel = (int)substr($sel, 11, 2);\n\t\t\t$minute_sel = (int)substr($sel, 14, 2);\n\t\t}\n\t} elseif ($l==8) {\n\t\t$hour_sel = (int)substr($sel, 0, 2);\n\t\t$minute_sel = (int)substr($sel, 3, 2);\n\t}\n\tif (!$p['empty']) {\n\t\tif (!$day_sel) $day_sel = Date::day();\n\t\tif (!$month_sel) $day_sel = date('m');\n\t\tif (!$year_sel) $year_sel = date('Y');\n\t\tif (!$hour_sel) $hour_sel = Date::hour();\n\t\tif (!$minute_sel) $minute_sel = Date::minute();\n\t}\n\telseif ($l!=19 && $l!=10) {\n\t\t$hour_sel = -1;\n\t\t$minute_sel = -1;\n\t}\n\t$time = $date = '';\t\n\t$attr = ' style=\"width:auto\"'.$attr;\n\t\n\tif (!$p['hour_from']) $p['hour_from'] = 0;\n\tif (!$p['hour_to']) $p['hour_to'] = 23;\n\tif (!$p['minute_from']) $p['minute_from'] = 0;\n\tif (!$p['minute_to']) $p['minute_to'] = 59;\n\tif (!$p['month_from']) $p['month_from'] = 1;\n\tif (!$p['month_to']) $p['month_to'] = 12;\n\tif (!$p['day_from']) $p['day_from'] = 1;\n\t\n\tif (!$p['day_to']) {\n\t\tif (!$p['day_to']) $p['day_to'] = 31;\n\t}\n\t$e = '';\n\t\n\tif (strpos($name,'[')) $e = ']';\n\tif ($showdate=='front' || $showdate=='left' || $showdate=='end' || $showdate=='right' || $showdate=='no_date') {\n\t\t// Hours\n\t\t$time .= '<select name=\"'.$name.'Hour'.$e.'\" id=\"'.name2id($name.'Hour'.$e).'\" class=\"'.$class_time.' select-hour\"'.$attr.'>';\n\t\tif ($p['empty']) $time .= '<option value=\"\"></option>';\n\t\t$time .= dateToOpts($p['hour_from'],$p['hour_to'],$p['hour_step'],0,23,$hour_sel,'hour',false,@$p['now']);\n\t\t$time .= '</select>';\n\t\t// Minutes\n\t\t$time .= ' <select name=\"'.$name.'Minute'.$e.'\" id=\"'.name2id($name.'Minute'.$e).'\" class=\"'.$class_time.' select-minute\"'.$attr.'>';\n\t\tif ($p['empty']) $time .= '<option value=\"\"></option>';\n\t\t$time .= dateToOpts($p['minute_from'],$p['minute_to'],$p['minute_step'],0,59,$minute_sel,'minute',false,@$p['now']);\n\t\t$time .= '</select>';\n\t}\n\t\n\tif ($showdate!='no_date') {\n\t\tif ($showdate=='front' || $showdate=='left') $date .= $tag_between;\n\t\t// Days\n\t\t$date .= '<select name=\"'.$name.'Day'.$e.'\" id=\"'.name2id($name.'Day'.$e).'\" class=\"'.$class_date.' select-day\"'.$attr.'>';\n\t\tif ($p['empty']) $date .= '<option value=\"\"'.(!$day_sel?' selected disabled':'').'>'.lang('_Day').'</option>';\n\t\t$date .= dateToOpts($p['day_from'],$p['day_to'],$p['day_step'],0,$p['day_to'],$day_sel,'day');\n\t\t$date .= '</select>';\n\t\t// Months\n\t\t$date .= $tag_sep.'<select name=\"'.$name.'Month'.$e.'\" id=\"'.name2id($name.'Month'.$e).'\" class=\"'.$class_date.' select-month\"'.$attr.'>';\n\t\tif ($p['empty']) $date .= '<option value=\"\"'.(!$month_sel?' selected disabled':'').'>'.lang('_Month').'</option>';\n\t\tif (!isset($p['months']) || !$p['months']) $p['months'] = Data::getArray('arr:months_med');\n\t\t$date .= dateToOpts($p['month_from'],$p['month_to'],$p['month_step'],1,12,$month_sel,'month',$p['months']);\n\t\t$date .= '</select>';\n\t\t// Years\n\t\tif ($p['year_from']-$p['year_to']<>0) {\n\t\t\t$date .= $tag_sep.'<select name=\"'.$name.'Year'.$e.'\" id=\"'.name2id($name.'Year'.$e).'\" class=\"'.$class_date.' select-year\"'.$attr.'>';\n\t\t\tif ($p['empty']) $date .= '<option value=\"\"'.(!$year_sel?' selected disabled':'').'>'.lang('_Year').'</option>';\n\t\t\t$date .= dateToOpts($p['year_from'],$p['year_to'],$p['year_step'],date('Y')-TOTAL_YEARS,date('Y')+TOTAL_YEARS,$year_sel,'year');\n\t\t\t$date .= '</select>';\n\t\t}\n\t\tif ($showdate=='end' || $showdate=='right') $date .= $tag_between;\n\t}\n\t\n\tif ($showdate=='front') $ret = $time.$date; else $ret = $date.$time;\n\tif ($return) return $ret; else echo $ret;\n}", "function form_date($variable='date', $date='', $nopop = false) {\n\n\tglobal $request;\n\n\t/***********\n\t* Select the current date\n\t***********/\n\n\t// use now\n\tif ($date == 'NOW') {\n\n\t\t$date = convert_gmt_timestamp_to_local_input(TIMENOW);\n\n\t// use the value submitted by form\n\t} elseif ($date == 'FORM') {\n\n\t\t$date = $request->getArrayString($variable);\n\n\t// use a numeric\n\t} elseif (is_numeric($date) AND $date > 0) {\n\t\t$date = convert_gmt_timestamp_to_local_input($date);\n\t}\n\n\t// the other option is an array for $date; which all the others are converted to so it is covered\n\tif (dpcheckdate($date)) {\n\t\t$month = $date['month'];\n\t\t$day = $date['day'];\n\t\t$year = $date['year'];\n\t}\n\n\t// we load the javascript & css if this is first time here\n\tif (!defined('DESKPRO_JSLOADED_DATA')) {\n\t\t$html .= get_javascript('./../3rdparty/selectcalendar/calendar.js');\n\t\t$html .= get_javascript('./../3rdparty/selectcalendar/lang/calendar-en.js');\n\t\t$html .= get_javascript('./../3rdparty/selectcalendar/calendar-setup.js');\n\t\t$html .= get_css('./../3rdparty/selectcalendar/calendar-win2k-cold-1.css');\n\t\tdefine('DESKPRO_JSLOADED_DATA', 1);\n\t}\n\n\t// random button link\n\t$button = 'data' . dp_rand(1,1000000);\n\n\t// the html for creating the calendar\n\t$html .= \"\n\t<table cellspacing=\\\"0\\\" cellpadding=\\\"0\\\"><tr>\n\t\t<td style=\\\"padding-right:4px\\\">\" . form_select_day($variable . '[day]', $day, $variable . '_day') . \"</td>\n\t\t<td style=\\\"padding-right:4px\\\">\" . form_select_month($variable . '[month]', $month, $variable . '_month'). \"</td>\n\t\t<td style=\\\"padding-right:4px\\\">\" . form_select_year($variable . '[year]', $year, $variable . '_year') . \"</td>\n\t\t<td style=\\\"padding-right:4px\\\">\n\n\t<input style=\\\"display:none\\\" type=\\\"text\\\" value=\\\"$current\\\" name=\\\"$variable\" . \"_selector\\\" id=\\\"$variable\\\" /></td>\";\n\n\tif (!$nopop) {\n\n\t\t$html .= \"<td>\" . html_image('icons/view_calendar.gif', '', \"id=\\\"$button\\\" title=\\\"Date selector\\\"\n onmouseover=\\\"this.style.background='red';\\\" onmouseout=\\\"this.style.background=''\\\"\");\n\n\t\tif ($time) {\n\n\t\t\t$html .= \"\n\t\t\t<script type=\\\"text/javascript\\\">\n\t\t\t\tCalendar.setup({\n\t\t\t\t\tinputField : \\\"$variable\" . \"_selector\\\",\n\t\t\t\t\tifFormat : \\\"%Y-%m-%d %H:%M\\\",\n\t\t\t\t\tshowsTime : true,\n\t\t\t\t\tbutton : \\\"$button\\\",\n\t\t\t\t\tsingleClick : true,\n\t\t\t\t\talign\t\t\t:\t'Bl',\n\t\t\t\t\tstep : 1,\n\t\t\t\t\tonSelect : onSelect\n\t\t\t\t});\n\t\t\t</script>\n\t\t\t\";\n\n\t\t} else {\n\n\t\t\t$html .= \"\n\t\t\t<script type=\\\"text/javascript\\\">\n\t\t\t\tCalendar.setup({\n\t\t\t\t\tinputField : \\\"$variable\\\",\n\t\t\t\t\tifFormat : \\\"%Y-%m-%d\\\",\n\t\t\t\t\tshowsTime : false,\n\t\t\t\t\tbutton : \\\"$button\\\",\n\t\t\t\t\tsingleClick : true,\n\t\t\t\t\talign\t\t\t:\t'Bl',\n\t\t\t\t\tstep : 1,\n\t\t\t\t\tonSelect : onSelect\n\t\t\t\t});\n\t\t\t</script>\n\t\t\t\";\n\n\t\t}\n\n\t\t$html .= \"</td>\";\n\n\t}\n\n\t$html .= \"</tr></table>\";\n\n\treturn $html;\n}", "function wc_marketplace_date() {\n global $wmp;\n $wmp->output_report_date();\n }", "function action_date_title()\n{\n\treturn time();\n}", "function calendar($url,$class='') {\n\n\tglobal $width;\n\tglobal $cell_width;\n\tglobal $legend_height;\n\tglobal $entry_color;\n\tglobal $entry_background_color;\n\tglobal $today_color;\n\tglobal $today_background_color;\n\tglobal $l_calendar;\n\tglobal $blog_script;\n\tglobal $lang;\n\tglobal $mysql_table;\n\t\n\tif ($_GET['date'] != '') {\n\t\t$MyDate = intval($_GET['date']);\n\t\t$year = substr($MyDate,0,4);\n\t\t$month = substr($MyDate,4,-2);\n\t} else {\n\t\t$month = date(\"n\");\n\t\t$year = date(\"Y\");\n\t}\n\t\n\t$prev = $month - 1;\n\t$next = $month + 1;\n\t$yearP = $year;\n\t$yearN = $year;\n\tif ($prev == \"0\") { $yearP--; $prev = \"12\"; }\n\tif ($prev < 10) $prev = '0'.$prev;\n\tif ($next == \"13\") { $yearN++; $next = \"1\"; }\n\tif ($next < 10) $next = '0'.$next;\n\n\t$transform_month = array(\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\");\n\t$into_month = array('Janvier','F&eacute;vrier','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','D&eacute;cembre');\n\t\n\tfor ($l = 0; $l < 12; $l++) {\n\t\tif ($month == $transform_month[$l]) {\n\t\t\t$month_word = $into_month[$l];\n\t\t}\n\t}\n\n\t$output .= '<table style=\"width: '.$width.'; height: '.$legend_height.'\" class=\"'.$class.'\">\n\t<tr>\n\t\t<!--<td style=\"width: 10%; text-align: left;\"><a href=\"'.$url.'&date='.$yearP.$prev.'00\">&laquo;</a></td>-->\n\t\t<td colspan=\"7\"><b>'.strtoupper($month_word).' '.$year.'</b></td>\n\t\t<!--<td style=\"width: 10%; text-align: right;\"><a href=\"'.$url.'&date='.$yearN.$next.'00\">&raquo;</a></td>-->\n\t</tr>\n\t<tr align=\"center\">\n\t\t<td><b>L</b></td>\n\t\t<td><b>M</b></td>\n\t\t<td><b>M</b></td>\n\t\t<td><b>J</b></td>\n\t\t<td><b>V</b></td>\n\t\t<td><b>S</b></td>\n\t\t<td><b>D</b></td>\n\t</tr>\n\t<tr align=\"center\">';\n\t\n\t$no_days = date(\"t\", mktime(0, 0, 0, $month, 1, $year));\n\t$first_day = date(\"w\", mktime(0, 0, 0, $month, 1, $year));\n\t$today_day = date(\"j\");\n\t$today_month = date(\"n\");\n\t$today_year = date(\"Y\");\n\t\n\tif ($first_day == \"0\") $first_day = \"7\";\n\t\n\tfor ($i = 0; $i < $first_day-1; $i++) $output .= '<td style=\"width:'.$cell_width.';\">&nbsp;</td>';\n\n\tfor ($i = 1; $i <= $no_days; $i++) {\n\t\t//$result = mysql_query(\"SELECT id FROM blog WHERE DAYOFMONTH(timestamp)='$i' AND MONTH(timestamp) = '$month' AND YEAR(timestamp) = '$year' ORDER BY id DESC;\");\n\t\t$selectDate = $year.$month.($i<10?'0'.$i:$i);\n\t\t$result = mysql_query(\"SELECT id FROM blog WHERE datepubli='$selectDate' LIMIT 1 \");\n\t\t$num = mysql_num_rows($result);\n\t\t//$res = mysql_fetch_array($result);\n\t\n\t\tif ($first_day == \"8\") { $first_day = \"1\"; $output .= '<tr style=\"width: '.$width.';\" align=\"center\">'; }\n\t\tif ($i < 10) $space = ' '; else $space = '';\n\t\n\t\tif ($i == $today_day && $month == $today_month && $year == $today_year) \n\t\t\t$style = 'background-color: '.$today_background_color.'; color: '.$today_color.'; font-weight: bold;';\n\t\telse $style = '';\n\t\tif (intval($_GET['date']) == $selectDate) $style .= 'border:1px solid #000000;';\n\t\t\n\t\tif ($num < 1) $output .= '<td style=\"'.$style.' width: '.$cell_width.';\">'.$i.'</td>';\n\t\telse $output .= '<td style=\"background-color:'.$entry_background_color.';'.$style.'width: '.$cell_width.';color: '.$entry_color.';\"><a href=\"'.$url.'&date='.$selectDate.'\" style=\"color: '.$today_color.'\" title=\"Voir le sujet posté à cette date\">'.$i.'</a></td>';\n\t\t\n\t\tif ($first_day == \"7\") $output .= '</tr>';\n\t\t$first_day++;\n\t}\n\t\n\t$output .= '</table>';\n\t\n\treturn $output;\n\n}", "function BeforeShowEdit(&$xt, &$templatefile, $values, &$pageObject)\n{\n\n\t\t$dbDate = db2time( $values[\"DateField\"] );\n$dbEndDate = db2time( $values[\"EndDate\"] );\n$recur = 0; \nif (comparedates( $dbEndDate, $dbDate) != 0) {\n\t\t\t$recur = 1;\n}\n$eid=$_REQUEST[\"editid1\"];\n$xt->assign(\"delete_button\",true);\n$xt->assign(\"hshow\",false);\n$xt->assign(\"deleteAttr\",\"recid=\".$eid.\" days=\".$_SESSION[\"days\"].\" mon=\".$_SESSION[\"mon\"].\" yr=\".$_SESSION[\"yr\"].\" recur=\".$recur);\n\n;\t\t\n}", "function cfdef_input_date( $p_field_def, $p_custom_field_value ) {\n\tprint_date_selection_set( 'custom_field_' . $p_field_def['id'], config_get( 'short_date_format' ), $p_custom_field_value, false, true );\n}", "function validate_date_picker_field($field)\n {\n }", "function _field_date($fval) \n {\n // if $fval is not already split up, we assume std. date string // YYYY-MM-DD\n if (is_array($fval)) {\n $f_date = &$fval;\n }\n elseif ($fval) {\n $f_date = split('-', $fval, 3);\n }\n else {\n $f_date = array('','','');\n }\n\n $res = \"<span id=\\\"\" . $this->name . \"\\\">\";\n\n for ($i=1; $i<32; $i++) { $days[sprintf(\"%02d\", $i)] = $i; }\n\n $months_abbr = array(\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\");\n for ($i=1; $i<13; $i++) { $months[sprintf(\"%02d\", $i)] = $months_abbr[$i-1]; }\n\n $fmonths = new formex_field($this->fex, $this->name.'_month', array('Months', 'select', $months));\n $res .= $fmonths->get_html($f_date[1]);\n\n if (isset($this->attribs) and !isset($this->attribs['suppress_day'])) {\n $fdays = new formex_field($this->fex, $this->name.'_day', array('Dates', 'select', $days));\n $res .= $fdays->get_html($f_date[2]);\n }\n\n $year_range = null;\n $this_year = date('Y');\n if (isset($this->opts) and is_numeric($this->opts)) { // int val will be this year +\n $year_range = $this->_array_stringify(range($this_year, $this_year+$this->opts));\n }\n elseif (isset($this->attribs) && is_array($this->attribs)) { // exact range specified\n $begin = (isset($this->attribs['year_begin']))? $this->attribs['year_begin'] : $this_year;\n $end = $this_year;\n if (isset($this->attribs['year_end'])) {\n if (substr($this->attribs['year_end'], 0, 4) == 'now+') {\n $end = $this_year + intval(substr($this->attribs['year_end'], 4));\n }\n elseif (substr($this->attribs['year_end'], 0, 4) == 'now-') {\n $end = $this_year - intval(substr($this->attribs['year_end'], 4));\n }\n elseif (substr($this->attribs['year_end'], 0, 1) == '+') {\n $end = $begin + intval(substr($this->attribs['year_end'], 1));\n }\n elseif (substr($this->attribs['year_end'], 0, 1) == '-') {\n $end = $begin - intval(substr($this->attribs['year_end'], 1));\n }\n else {\n $end = intval($this->attribs['year_end']);\n }\n }\n\n if ($begin != $end) {\n $year_range = $this->_array_stringify(range($begin, $end));\n }\n }\n\n if ($year_range) { // dropdown w/ that range\n $fyears = new formex_field($this->fex, $this->name.'_year', array('Years', 'select', $year_range));\n }\n else { // 4-space text field\n $fyears = new formex_field($this->fex, $this->name.'_year', array('Years', 'text', null, array('size'=>4)));\n }\n $res .= $fyears->get_html($f_date[0]);\n unset($fmonths, $fdays, $fyears);\n $res .= \"</span>\";\n\n return $res;\n }", "function TableRowDateOptionBox($date, $action, $dictionary, $fieldname=\"date\", $dateformat=\"Y-m-d H:i\", $title=\"\",\n\t\t$classtdTitle=\"inputParamName\", $classtdValue=\"inputParamValue\")\n{\n $stringUtils = new StringUtils ();\n $dateUtils = new DateUtils ();\n $result = '';\n\n if (isset($action))\n {\n\t \t$result = '<tr>';\n\t\t// First field contains the name\n\t\t$result .= '<td class=\"'.$classtdTitle.'\">'.$stringUtils->urlEncodeQuotes($title).':</td>';\n\t\t// Second field contains the value\n\t\t$result .= '<td class=\"'.$classtdValue.'\">';\n\t switch ($action)\n\t {\n\t \tcase 'add':\n\t \t\t$date = date ('Y-m-d');\n\t \tcase 'modify':\n\t $result .= '<select name=\"'.$fieldname.'_Month\">';\n\t\t\t\t$result .= monthOptionBox ($dictionary, $dateUtils->getMonthFromDate($date));\n\t\t\t\t$result .= '</select>';\n\t\t\t\t$result .= '<select name=\"'.$fieldname.'_Day\">';\n\t\t\t\t$result .= dayOptionBox ($dictionary, $dateUtils->getDayInMonthFromDate($date));\n\t\t\t\t$result .= '</select>';\n\t\t\t\t$result .= '<select name=\"'.$fieldname.'_Year\">';\n\t\t\t\t$result .= yearOptionBox($dateUtils->getYearFromDate($date), 10, 10);\n\t\t\t\t$result .= '</select>';\n\t \t\tbreak;\n\t\t\tcase 'show':\n\t\t\t\t$result .= date($dateformat, strtotime($date));\n\t\t}\n\t\t$result .= '</td>';\n\t\t$result .= '</tr>';\n\t}\n\n\treturn $result;\n}", "function _addMetadataFields()\n {\n $config =& NDB_Config::singleton();\n $this->dateOptions = array(\n 'language' => 'en',\n 'format' => 'YMd',\n 'minYear' => $config->getSetting('startYear'),\n 'maxYear' => $config->getSetting('endYear'),\n 'addEmptyOption' => true,\n 'emptyOptionValue' => null\n );\n\n $this->form->addElement('date', 'Date_taken', 'Date of Administration', $this->dateOptions);\n\n $examiners = $this->_getExaminerNames();\n $this->form->addElement('select', 'Examiner', 'Radiologist', $examiners);\n\n \t$this->form->addGroupRule('Date_taken', 'Date of Administration is required', 'required');\n\n $this->form->registerRule('checkdate', 'callback', '_checkDate');\n $this->form->addRule('Date_taken', 'Date of Administration is invalid', 'checkdate');\n\n $this->form->addRule('Examiner', 'Examiner is required', 'required');\n }", "function turnitintooltwo_generate_part_dates($renewdates, $datetype, $part, $i) {\n if ($renewdates) {\n switch ($datetype) {\n case 'start':\n return gmdate(\"Y-m-d\\TH:i:s\\Z\", time());\n case 'due':\n case 'post':\n return gmdate(\"Y-m-d\\TH:i:s\\Z\", strtotime(\"+1 week\"));\n default:\n return NULL;\n }\n } else {\n $attribute = \"dt\".$datetype.$i;\n return gmdate(\"Y-m-d\\TH:i:s\\Z\", $part->$attribute);\n }\n}", "function wpsp_tour_valid_date( $valid_from, $valid_end ) {\n \n printf( '%1$s %2$s <strong>%3$s</strong> %4$s <strong>%5$s</strong>',\n sprintf( '<span class=\"label\">%s</span>', esc_html__( 'Valid date:', 'discovertravel' ) ),\n sprintf( '%s', esc_html__( 'From', 'discovertravel' ) ),\n date(\"d F Y\", strtotime($valid_from)),\n sprintf( '%s ', esc_html__( 'to', 'discovertravel' ) ),\n date(\"d F Y\", strtotime($valid_end))\n );\n}", "function enableDatePicker($startYear=false,$endYear=false,$link=false,$button=false){\n\tif ($link) $this->urlPicker=$link;\n\telse $this->urlPicker=$_SERVER['PHP_SELF'];\n\tif ($startYear && $endYear){\n\t\tif ($startYear>=$this->startYear && $startYear<$this->endYear) $this->startYear=$startYear;\n\t\tif ($endYear>$this->startYear && $endYear<=$this->endYear) $this->endYear=$endYear;\n\t}\n\tif ($button) $this->selBtn=$button;\n$this->datePicker=true;\n}", "function cp_v2_framework_datepicker_admin_styles( $hook ) {\r\n\r\n\t$cp_page = strpos( $hook, CP_PRO_SLUG );\r\n\t$dev_mode = get_option( 'cp_dev_mode' );\r\n\tif ( '1' === $dev_mode ) {\r\n\t\twp_enqueue_script( 'cp-datetime-script', plugins_url( 'datetimepicker.js', __FILE__ ), array( 'cp-datetimepicker-script' ), '1.0.0', true );\r\n\t}\r\n\r\n}", "function drawFieldStartDate() {\r\n global $projectDate,$startDate; ?> \r\n <div dojoType=\"dijit.form.DateTextBox\"\r\n \t<?php if (sessionValueExists('browserLocaleDateFormatJs')) {\r\n\t\t\techo ' constraints=\"{datePattern:\\''.getSessionValue('browserLocaleDateFormatJs').'\\'}\" ';\r\n\t\t}?>\r\n id=\"startDatePlanView\" name=\"startDatePlanView\"\r\n invalidMessage=\"<?php echo i18n('messageInvalidDate')?>\"\r\n type=\"text\" maxlength=\"10\" \r\n <?php if ($projectDate) {echo 'disabled'; } ?> \r\n style=\"width:100px; text-align: center;\" class=\"input roundedLeft\"\r\n hasDownArrow=\"true\"\r\n value=\"<?php if(sessionValueExists('startDatePlanView') and !$projectDate){ echo getSessionValue('startDatePlanView'); }else{ echo $startDate; } ?>\" >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveDataToSession('startDatePlanView',formatDate(dijit.byId('startDatePlanView').get(\"value\")), true);\r\n refreshJsonPlanning();\r\n </script>\r\n </div>\r\n<?php \r\n}", "function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $first_day = 0, $prev_link, $next_link)\n{\n\n\t$first_of_month = gmmktime(0,0,0,$month,1,$year);\n\t#remember that mktime will automatically correct if invalid dates are entered\n\t# for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998\n\t# this provides a built in \"rounding\" feature to generate_calendar()\n\n\t$day_names = array(); #generate all the day names according to the current locale\n\tfor($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400) #January 4, 1970 was a Sunday\n\t\t$day_names[$n] = ucfirst(gmstrftime('%A',$t)); #%A means full textual day name\n\n\tlist($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month));\n\t$weekday = ($weekday + 7 - $first_day) % 7; #adjust for $first_day\n\t$title = htmlentities(ucfirst($month_name)).'&nbsp;'.$year; #note that some locales don't capitalize month and day names\t\n\t\n\n\n\t#Begin calendar. Uses a real <caption>. See http://diveintomark.org/archives/2002/07/03\n\t\n\t$calendar = '<div id=\"calendar-box\"><table class=\"calendar\">'.\"\\n\".\n\t\t'<caption class=\"calendar-month\">'.$prev_link.'&nbsp;&nbsp;&nbsp;&nbsp;';\n\n\t$calendar .= '<form class=\"cal-select\" method=\"GET\" action=\"manage.php\">\n\t\t\t\t\t<input type=\"hidden\" name=\"display\" value=\"month\" />\n\t\t\t\t\t<select name=\"month\">';\n\t$months = 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');\n\t\n\tfor ($x = 1; $x <= 12; $x++)\n\t{\n\t\tif (isset($_GET['month']) || isset($_SESSION['lastMonthViewMonth']))\n\t\t{\n\t\t\tif (isset($_GET['month'])) { $m = $_GET['month']; } else { $m = $_SESSION['lastMonthViewMonth']; }\n\t\t\tif ($m == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$months[$x].'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$months[$x].'</option>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (date('n', time()) == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$months[$x].'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$months[$x].'</option>';\n\t\t}\n\t\t\n\t}\n\t$calendar .= '</select> <select name=\"year\">';\n\tfor ($x = 2010; $x <= 2070; $x++)\n\t{\t\n\t\tif (isset($_GET['year']) || isset($_SESSION['lastMonthViewYear']))\n\t\t{\n\t\t\tif (isset($_GET['year'])) { $y = $_GET['year']; } else { $y = $_SESSION['lastMonthViewYear']; }\n\t\t\tif ($y == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$x.'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$x.'</option>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (date('Y', time()) == $x)\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\" SELECTED>'.$x.'</option>';\n\t\t\telse\n\t\t\t\t$calendar .= '<option value=\"'.$x.'\">'.$x.'</option>';\n\t\t}\n\t}\n\t$calendar .= '</select> <input type=\"submit\" value=\"view\" /></form>';\n\t\n\t$calendar .= '&nbsp;&nbsp;&nbsp;&nbsp;'.$next_link.\"</caption>\\n<tr class=\\\"day-names-row\\\">\";\n\n\tif($day_name_length){ #if the day names should be shown ($day_name_length > 0)\n\t\t#if day_name_length is >3, the full name of the day will be printed\n\t\tforeach($day_names as $d)\n\t\t\t$calendar .= '<th abbr=\"'.htmlentities($d).'\">'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'</th>';\n\t\t$calendar .= \"</tr>\\n<tr class=\\\"day-row\\\">\";\n\t}\n\t\n\t// begin calendar days\n\tif($weekday > 0) $calendar .= '<td colspan=\"'.$weekday.'\">&nbsp;</td>'; #initial 'empty' days\n\tfor($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){\n\t\tif($weekday == 7){\n\t\t\t$weekday = 0; #start a new week\n\t\t\t$calendar .= \"</tr>\\n<tr class=\\\"day-row\\\">\";\n\t\t}\n\t\tif(isset($days[$day]) and is_array($days[$day]))\n\t\t{\n\t\t\t@list($classes, $content) = $days[$day];\n\t\t\tif(is_null($content)) $content = $day;\n\t\t\t$calendar .= '<td'.($classes ? ' class=\"'.htmlspecialchars($classes).'\">' : '>').\n\t\t\t\t($content).'</td></a>';\n\t\t}\n\t\telse $calendar .= '<td>'.$day.'</td>';\n\t}\n\tif($weekday != 7) $calendar .= '<td colspan=\"'.(7-$weekday).'\">&nbsp;</td>'; #remaining \"empty\" days\n\n\treturn $calendar.\"</tr>\\n</table></div>\\n\";\n}", "function drawOptionSaveDates() {\r\n global $projectDate, $saveDates; ?>\r\n <span title=\"<?php echo i18n('saveDates')?>\" dojoType=\"dijit.form.CheckBox\"\r\n type=\"checkbox\" id=\"listSaveDates\" name=\"listSaveDates\" class=\"whiteCheck\"\r\n <?php if ($projectDate) {echo 'disabled'; } ?> \r\n <?php if ( $saveDates) {echo 'checked=\"checked\"'; } ?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n refreshJsonPlanning();\r\n </script>\r\n </span>\r\n <span for=\"listSaveDates\"><?php echo i18n(\"saveDates\");?></span>\r\n<?php \r\n}", "function form_date($field, $options){\n $defaults = array(\n 'wrap' => true,\n 'label' => true,\n 'class' => array('date', 'input'),\n 'minYear' => date('Y') - 10,\n 'maxYear' => date('Y') + 10,\n 'months' => array(\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 'days' => array(\n 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8,\n 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15,\n 16 => 16, 17 => 17, 18 => 18, 19 => 19, 20 => 20, 21 => 21, 22 => 22,\n 23 => 23, 24 => 24, 25 => 25, 26 => 26, 27 => 27, 28 => 28, 29 => 29,\n 30 => 30, 31 => 31\n ),\n 'separator' => '-'\n );\n\n $options = array_merge($defaults, $options);\n\n $years = array();\n for($i = $options['minYear']; $i <= $options['maxYear']; $i++) {\n $years[$i] = $i;\n }\n\n if(empty($_POST[$field . '[day]'])) {\n $today = date('j');\n if(!empty($options['days'][$today])) {\n $_POST[$field . '[day]'] = $today;\n }\n }\n\n $output = form_select(\n $field . '[day]',\n array(\n 'wrap' => false,\n 'label' => false,\n 'options' => $options['days']\n )\n );\n\n $output .= $options['separator'];\n\n if(empty($_POST[$field . '[month]'])) {\n $today = date('n');\n if(!empty($options['months'][$today])) {\n $_POST[$field . '[month]'] = $today;\n }\n }\n\n $output .= form_select(\n $field . '[month]',\n array(\n 'wrap' => false,\n 'label' => false,\n 'options' => $options['months']\n )\n );\n\n $output .= $options['separator'];\n\n if(empty($_POST[$field . '[year]'])) {\n $today = date('Y');\n if(!empty($years[$today])) {\n $_POST[$field . '[year]'] = $today;\n }\n }\n\n $output .= form_select(\n $field . '[year]',\n array(\n 'wrap' => false,\n 'label' => false,\n 'options' => $years\n )\n );\n\n if($options['wrap']) {\n $options['field'] = $field;\n $output = form__wrap($output, $options);\n }\n\n $error = form_error_message($field);\n if(!empty($error)) {\n $output .= $error;\n }\n\n return html__output($output);\n}", "function input_date($errors, $name, $label) {\n //create div belonging to the class 'required_field'\n echo '<div class=\"required_field\">';\n //create the label for the input\n label($name, $label);\n //get the value from previous post\n $value = posted_value($name);\n //store today's date under $today\n $today = date(\"Y-m-d\");\n //create date field matching the parameters and a maximum possible date of $today and minimum date in the year 1900\n echo \"<input type=\\\"Date\\\" name=\\\"$name\\\" value=\\\"$value\\\" placeholder='dd/mm/yyyy'\".\n \" max=\\\"$today\\\" min=\\\"1900-12-12\\\" onchange=\\\"hide_error_message('$name')\\\" required>\";\n //create error message span\n error_label($errors, $name);\n //close the div\n echo '</div>';\n}", "function sw_the_date_ddp($format='Y-m-d', $before = '', $after = '', $echo = true){\n\tthe_date($format, $before, $after, $echo);\n}", "public function getDateDebut();", "function action_date()\n{\n\n\t// Return the rendered theme.\n\treturn theme('test_theme');\n}", "function the_date($format = '', $before = '', $after = '', $display = \\true)\n {\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}", "function wp_localize_jquery_ui_datepicker()\n {\n }", "function jtpl_modifier_common_dateLong ($_zInputDate)\n{\n\n\t\t $tab1 = explode(\" \",$_zInputDate) ;\n\t\t $tab2 = explode(\"-\",$tab1[0]);\n\t\t $tab3 = explode(\":\",$tab1[1]);\n\t\t $zOutputDate = $tab2[2].\"/\".$tab2[1].\"/\".$tab2[0].\" - \".$tab3[0].\":\".$tab3[1];\n \n return $zOutputDate ;\n\n}", "function BeforeShowPrint(&$xt, &$templatefile, &$pageObject)\n{\n\n\t\tglobal $dal;\n$strWhereClause=$_SESSION[\"strWhereClause\"];\n//**********************************************\n\n//\tread settings\nif ($_SESSION[\"calendar_FirstDayOfWeek\"]) {\n\t// we need 0-Monday, 6-Sunday\n\t$firstWeekDay = ( $_SESSION[\"calendar_FirstDayOfWeek\"] + 6 ) % 7; \n}\nelse \n\t$firstWeekDay = 6; //\t6 - sunday\n\nif ($_SESSION[\"calendar_EditInPast\"]) {\n\t$allowEditInPast = $_SESSION[\"calendar_EditInPast\"];\n}\nelse \n\t$allowEditInPast = 0; //edit events in past 0 - No, 1 - Yes\n\n$thisMoment = db2time(now());\n\n$currentDate = array( $_SESSION[\"yr\"], $_SESSION[\"mon\"], $_SESSION[\"days\"], 0, 0, 0 );\n\n$monthStart = array( $_SESSION[\"yr\"], $_SESSION[\"mon\"], 1, 0, 0, 0 );\n$monthDays = calendar_getMonthDays($_SESSION[\"yr\"], $_SESSION[\"mon\"]);\n$monthEnd = calendar_adddays($monthStart, $monthDays);\n$monthFirstDay = getdayofweek($monthStart);\n \n\n$rawevents = calendar_getListOfEventsInRange( $monthStart, $monthEnd, $strWhereClause, $pageObject->connection );\n$events = calendar_sortEvents($monthStart, $monthEnd, $rawevents );\n\n//output header Monday Tuesday ...\n$xt->assign(\"Monthly_month_year\",calendar_format_datetime_custom( $currentDate, \" MMMM yyyy\" ));\nif ($firstWeekDay==6){\n\t$monthFirstDay++;\n\t$xt->assign(\"row00sdname1\", getDayNameByNumber(7,\"dddd\"));\n\tfor($j=2; $j<=7; $j++){\n\t\t$xt->assign(\"row00sdname\".($j), getDayNameByNumber($j-1,\"dddd\"));\n\t}\n}\nelse {\n\tfor($j=1; $j<=7; $j++){\n\t\t$xt->assign(\"row00sdname\".($j), getDayNameByNumber($j,\"dddd\"));\n\t}\n}\n//\tassign events\n\n$today = getDatePart( db2time( now() ) );\n$monthDay = $monthStart;\n\t\nfor ($i=$monthFirstDay; $i<$monthDays+$monthFirstDay; $i++) \n{\n\t$eventsHTML = \"\";\n\t//input events\n\t$monthDayKey = date2db( $monthDay );\n\t\n\tif( isset( $events[ $monthDayKey ] ) )\n\t{\n\t\tforeach( $events[ $monthDayKey ] as $event )\n\t\t{\n\t\t\t$eventsHTML .= calendar_getEventHTML( $event, $monthDayKey, $allowEditInPast, $pageObject->pageType );\n\t\t}\n\t\n\t}\n\t\n\t$xt->assign(\"row00\".$i.\"Datevisible\",true);\n\t$xt->assign(\"row00\".$i.\"Datevalue\", calendar_format_datetime_custom( $monthDay, \"d\" ) );\n\t$xt->assign(\"row00\".$i.\"Dayvalue\", $eventsHTML );\n\n\t$monthDay = calendar_adddays( $monthDay, 1 );\n}\n\n\n;\t\t\n}", "function DateSelector($SelectedDate, $StartDate, $Prefix = 'date', $Years = 10) {\n\t \t\t// The selcted year\n\t \t\t$selectedYear = date('Y', $SelectedDate);\n\t \t\t// The 'maximum'-year (StartDate->Year + Years)\n\t \t\t$endYear = date('Y', $StartDate) + $Years;\n\t \t\t// The selected day\n\t \t\t$selectedDay = date('j', $SelectedDate);\n\t \t\t// The selected month\n\t \t\t$selectedMonth = date('n', $SelectedDate);\n\t \t\t// The selected hour\n\t \t\t$selectedHour = date('G', $SelectedDate);\n\t \t\t// The selected minute\n\t \t\t$selectedMinute = date('i', $SelectedDate);\n\t \t\t\t \t\t\t \t\t\n\t \t\t$out = \"<select id=\\\"{$Prefix}Day\\\" name=\\\"{$Prefix}Day\\\">\";\n\t \t\t// print all possible days of a month\n\t \t\tfor($i = 1; $i <= 31; $i++) {\n\t \t\t\tif($i == $selectedDay)\n\t \t\t\t\t$out .= \"<option selected=\\\"selected\\\" value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t\telse\n\t \t\t\t\t$out .= \"<option value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t}\n\t \t\t$out .= \"</select>\\r\\n\n\t\t\t\t<select id=\\\"{$Prefix}Month\\\" name=\\\"{$Prefix}Month\\\">\";\n\t\t\t// print all months\n\t \t\tfor($i = 1; $i <= 12; $i++) {\n\t \t\t\tif($i == $selectedMonth)\n\t \t\t\t\t$out .= \"<option selected=\\\"selected\\\" value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t\telse\n\t \t\t\t\t$out .= \"<option value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t}\n\t \t\t$out .= \"</select>\\r\\n\n\t \t\t\t<select id=\\\"{$Prefix}Year\\\" name=\\\"{$Prefix}Year\\\">\";\n\t \t\t// print all selectable years, but make sure that the year is greater than 1970 (lower years will make trouble in windows environments)\n\t \t\tfor($i = ($selectedYear - $Years < 1970) ? 1970 : ($selectedYear - $Years); $i <= $endYear; $i++) {\n\t \t\t\tif($i == $selectedYear)\n\t \t\t\t\t$out .= \"<option selected=\\\"selected\\\" value=\\\"$i\\\">$i</option>\\r\\n\";\n\t \t\t\telse\n\t \t\t\t\t$out .= \"<option value=\\\"$i\\\">$i</option>\\r\\n\";\n\t \t\t}\n\t \t\t$out .= \"</select>\\r\\n\n\t\t\t\t<select id=\\\"{$Prefix}Hour\\\" name=\\\"{$Prefix}Hour\\\">\";\n\t \t\t// print all hours\n\t \t\tfor($i = 0; $i <= 23; $i++) {\n\t \t\t\tif($i == $selectedHour)\n\t \t\t\t\t$out .= \"<option selected=\\\"selected\\\" value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t\telse\n\t \t\t\t\t$out .= \"<option value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t}\n\t \t\t$out .= \"</select>\\r\\n\n\t\t\t\t<select id=\\\"{$Prefix}Minute\\\" name=\\\"{$Prefix}Minute\\\">\";\n\t \t\t// print all minutes\n\t \t\tfor($i = 0; $i <= 59;$i++) {\n\t \t\t\tif($i == $selectedMinute)\n\t \t\t\t\t$out .= \"<option selected=\\\"selected\\\" value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t\telse\n\t \t\t\t\t$out .= \"<option value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t}\n\t \t\t$out .= \"</select>\";\n\t \t\treturn $out;\n\t \t}", "function date_modif_manuelle_autoriser() {\n}", "function mkDatePicker($yearpicker=false){\n\tif ($yearpicker) $pickerSpan=$this->rowCount;\n\telse $pickerSpan=$this->monthSpan;\n\tif ($this->datePicker){\n\t\t$out=\"<tr><td class=\\\"\".$this->cssPicker.\"\\\" colspan=\\\"\".$pickerSpan.\"\\\">\\n\";\n\t\t$out.=\"<form name=\\\"\".$this->cssPickerForm.\"\\\" class=\\\"\".$this->cssPickerForm.\"\\\" action=\\\"\".$this->urlPicker.\"\\\" method=\\\"get\\\">\\n\";\n\t\tif (!$yearpicker){\n\t\t\t$out.=\"<select name=\\\"\".$this->monthID.\"\\\" class=\\\"\".$this->cssPickerMonth.\"\\\">\\n\";\n\t\t\tfor ($z=1;$z<=12;$z++){\n\t\t\t\tif ($z==$this->actmonth) $out.=\"<option value=\\\"\".$z.\"\\\" selected=\\\"selected\\\">\".$this->getMonthName($z).\"</option>\\n\";\n\t\t\t\telse $out.=\"<option value=\\\"\".$z.\"\\\">\".$this->getMonthName($z).\"</option>\\n\";\n\t\t\t}\n\t\t\t$out.=\"</select>\\n\";\n\t\t}\n\t\t$out.=\"<select name=\\\"\".$this->yearID.\"\\\" class=\\\"\".$this->cssPickerYear.\"\\\">\\n\";\n\t\tfor ($z=$this->startYear;$z<=$this->endYear;$z++){\n\t\t\tif ($z==$this->actyear) $out.=\"<option value=\\\"\".$z.\"\\\" selected=\\\"selected\\\">\".$z.\"</option>\\n\";\n\t\t\telse $out.=\"<option value=\\\"\".$z.\"\\\">\".$z.\"</option>\\n\";\n\t\t}\n\t\t$out.=\"</select>\\n\";\n\t\t$out.=\"<input type=\\\"submit\\\" value=\\\"\".$this->selBtn.\"\\\" class=\\\"\".$this->cssPickerButton.\"\\\"></input>\\n\";\n\t\t$out.=\"</form>\\n\";\n\t\t$out.=\"</td></tr>\\n\";\n\t}\n\telse $out=\"\";\nreturn $out;\n}", "function dx_write_deploy_date() {\n\n\t// And some inline style. Its not needed to hook it in wp_head at all for just 4-5 properties.\n\t$style = \"position:fixed; bottom:0; right:0; display: block; padding: 0px 2px; font-family: 'Courier New'; font-size: 10px; margin: 0; background: black; color: white;line-height:1em\";\n\n // Print the end result\n if(isset($_COOKIE['dx_deploy_timer_cooke'])) {\n\t\techo '<p class=\"deploy-date\" style=\"'.$style.'\">Deployed: '.$_COOKIE['dx_deploy_timer_cooke'].' GMT +0</p>';\n\t} else {\n\t\t$cur_date = get_date_mod();\n\t\techo '<p class=\"deploy-date\" style=\"'.$style.'; background: blue\">Deployed: '.$cur_date.' GMT +0 (Cookies updated)</p>';\n\t}\n}", "function calendar_files()\n\t{\t\t\n\t\techo '\n\t\t\t\t<link type=\"text/css\" href=\"'.SITEPATH.'/administrator/calendar/themes/base/jquery.ui.all.css\" rel=\"stylesheet\" />\n\t\t\t\t<script type=\"text/javascript\" src=\"'.SITEPATH.'/administrator/calendar/jquery-1.4.2.js\"></script>\n\t\t\t\t<script type=\"text/javascript\" src=\"'.SITEPATH.'/administrator/calendar/ui/jquery.ui.core.js\"></script>\n\t\t\t\t<script type=\"text/javascript\" src=\"'.SITEPATH.'/administrator/calendar/ui/jquery.ui.widget.js\"></script>\n\t\t\t\t<script type=\"text/javascript\" src=\"'.SITEPATH.'/administrator/calendar/ui/jquery.ui.datepicker.js\"></script>\n\t\t\t\t<link type=\"text/css\" href=\"'.SITEPATH.'/administrator/calendar/demos.css\" rel=\"stylesheet\" />\n\t\t';\n\t}", "function makeDatePicker($idChamp, $defaut='') {\n\t$fJquery = '$(\"#'.$idChamp.'\").datetimepicker({';\n\t$fJquery.= '\tlang:\"'._LG_.'\",';\n\t//$fJquery.= '\tdatepicker:false,';\t\t\t\t\t\t//pas de selection date\n\t$fJquery.= '\ttimepicker:false,';\t\t\t\t\t\t//pas de selection time\n\t$fJquery.= '\tformat:\"'._FORMAT_DATE_.'\",';\t\t\t//format d'affichage\n\t$fJquery.= '\tformatDate:\"'._FORMAT_DATE_.'\",';\t\t//format d'affichage maxDate / minDate\n\t$fJquery.= '\tformatTime:\"H:i:s\",';\t\t\t\t\t//format d'affichage maxTime / minTime\n\t//$fJquery.= '\tallowTimes:[\"12:00\", \"13:00\"],';\n\t$fJquery.= '\tstep:1,';\n\tif ($defaut != '') {\n\t\t$fJquery.= '\tdefaultDate: \"'.$defaut.'\",';\n\t\t$fJquery.= '\tdefaultTime: \"'.date('H:i:s').'\",';\n\t}\n\t//$fJquery.= '\tyearStart: 2015,';\n\t//$fJquery.= '\tyearEnd: 2030,';\n\t$fJquery.= '\tvalidateOnBlur:false,';\n\t$fJquery.= '\tmask:false';\t\t\t\t\t\t\t\t//affichage masque de saisie\n\t$fJquery.= '});';\n\treturn $fJquery;\n}", "private function _consolideDate(){\n\t\t$this->_mktime();\n\t\t$this->_setDate();\n\t}", "function AttribDate( $id, $value, $name )\n\t{\n\t\t$success = JHTML::calendar( $value, $name, $name, '%Y-%m-%d' );\n\t\treturn $success;\n\t}", "private function set_date()\r\n\t{\r\n\t\tif ($this->month > 12)\r\n\t\t{\r\n\t\t\t$this->month=1;\r\n\t\t\t$this->year++;\r\n\t\t}\r\n\r\n\t\tif ($this->month < 1)\r\n\t\t{\r\n\t\t\t$this->month=12;\r\n\t\t\t$this->year--;\r\n\t\t}\r\n\r\n\t\tif ($this->year > 2037) $this->year = 2037;\r\n\t\tif ($this->year < 1971) $this->year = 1971;\r\n\t}", "function olc_draw_date_selector($prefix, $date='') {\n\t$month_array = array();\n\t$month_array[1] =_JANUARY;\n\t$month_array[2] =_FEBRUARY;\n\t$month_array[3] =_MARCH;\n\t$month_array[4] =_APRIL;\n\t$month_array[5] =_MAY;\n\t$month_array[6] =_JUNE;\n\t$month_array[7] =_JULY;\n\t$month_array[8] =_AUGUST;\n\t$month_array[9] =_SEPTEMBER;\n\t$month_array[10] =_OCTOBER;\n\t$month_array[11] =_NOVEMBER;\n\t$month_array[12] =_DECEMBER;\n\t$usedate = getdate($date);\n\t$day = $usedate['mday'];\n\t$month = $usedate['mon'];\n\t$year = $usedate['year'];\n\t$date_selector = '<select name=\"'. $prefix .'_day\">';\n\tfor ($i=1;$i<32;$i++){\n\t\t$date_selector .= '<option value=\"' . $i . QUOTE;\n\t\tif ($i==$day) $date_selector .= 'selected';\n\t\t$date_selector .= '>' . $i . '</option>';\n\t}\n\t$date_selector .= '</select>';\n\t$date_selector .= '<select name=\"'. $prefix .'_month\">';\n\tfor ($i=1;$i<13;$i++){\n\t\t$date_selector .= '<option value=\"' . $i . QUOTE;\n\t\tif ($i==$month) $date_selector .= 'selected';\n\t\t$date_selector .= '>' . $month_array[$i] . '</option>';\n\t}\n\t$date_selector .= '</select>';\n\t$date_selector .= '<select name=\"'. $prefix .'_year\">';\n\tfor ($i=2001;$i<2019;$i++){\n\t\t$date_selector .= '<option value=\"' . $i . QUOTE;\n\t\tif ($i==$year) $date_selector .= 'selected';\n\t\t$date_selector .= '>' . $i . '</option>';\n\t}\n\t$date_selector .= '</select>';\n\treturn $date_selector;\n}", "function preprocess(){\n\t\t$this->title = \"Fannie : Product Movement\";\n\t\t$this->header = \"Product Movement Report\";\n\t\t$this->report_cache = 'none';\n\n\t\tif (isset($_REQUEST['date1'])){\n\t\t\t/**\n\t\t\t Form submission occurred\n\n\t\t\t Change content function, turn off the menus,\n\t\t\t set up headers\n\t\t\t*/\n\t\t\t$this->content_function = \"report_content\";\n\t\t\t$this->has_menus(False);\n\t\t\t$this->report_headers = array('Date','UPC','Description','Qty','$');\n\t\t\n\t\t\t/**\n\t\t\t Check if a non-html format has been requested\n\t\t\t*/\n\t\t\tif (isset($_REQUEST['excel']) && $_REQUEST['excel'] == 'xls')\n\t\t\t\t$this->report_format = 'xls';\n\t\t\telseif (isset($_REQUEST['excel']) && $_REQUEST['excel'] == 'csv')\n\t\t\t\t$this->report_format = 'csv';\n\t\t}\n\t\telse \n\t\t\t$this->add_script(\"../../src/CalendarControl.js\");\n\n\t\treturn True;\n\t}", "function template_date_select($params,&$smarty)\n {\n extract($params);\n \n if (empty($name)) {\n return;\n }\n \n $buffer = '<input type=\"text\" size=\"12\" maxlength=\"12\" name=\"'.$name.'\" value=\"'.$value.'\" /> (Format: mm/dd/yyyy)';\n return $buffer;\n }", "protected function _parse_date( $date = null )\n\t{\n\t\tif( ! $date )\n\t\t\t$date = date( 'Y-m-d', current_time( 'timestamp', false ) ); \n \n\t\t// Jour selectionné\n\t\t$this->selected\t= new \\DateTime( $date );\n\t\t// Aujourd'hui\n\t\t$this->today \t= new \\DateTime();\n\t\t// Premier jour du mois\n\t\t$this->first\t= new \\DateTime( $this->selected->format( 'Y-m-d' ) ); \n\t\t$this->first \t= $this->first->modify( 'first day of this month' );\n\t\t// Dernier jour du mois\n\t\t$this->last\t\t= new \\DateTime( $this->selected->format( 'Y-m-d' ) );\n\t\t$this->last \t= $this->last->modify( 'last day of this month' );\n\t\t// Premier jour du calendrier\n\t\t$this->start\t= new \\DateTime( $this->first->format( 'Y-m-d' ) );\n\t\tif( ! $this->start->format( 'w' ) ) \n\t\t\t$this->start->modify( 'monday last week' );\t\n\t\telse \n\t\t\t$this->start->modify( 'monday this week' );\t\n\n\t\t// Dernier jour du calendrier\t\n\t\t$this->end \t\t= new \\DateTime( $this->last->format( 'Y-m-d' ) );\n\t\tif( $this->end->format( 'w' ) ) \n\t\t\t$this->end->modify( 'sunday this week' );\n\t\t// Mois précédent\n\t\t$this->prev \t= new \\DateTime( $this->selected->format( 'Y-m-d' ) );\n\t\t$this->prev->modify( '-1 month' )->modify( 'first day of this month' );\n\t\t// Mois suivant\n\t\t$this->next \t= new \\DateTime( $this->selected->format( 'Y-m-d' ) );\n\t\t$this->next->modify( '+1 month' )->modify( 'first day of this month' );\n\t}", "function setup_meta_dates() {\n\t\t\tglobal $post, $wpdb;\n\t\t\t$post_id = $post->ID;\n\t\t\t$_IPCDateCount = get_post_meta($post_id, \"_IPCDateCount\", true);\n\t\t\tif(empty($_IPCDateCount))\n\t\t\t\t$_IPCDateCount = 1;\n\t\t\t\t\t\t\n\t\t\t$the_post = get_post($post_id);\n\t\t\t\n\t\t\tinclude(dirname(__FILE__).'/views/ipc-meta-box-meta-data.php');\n\t\t}", "function get_calendar($initial = \\true, $display = \\true)\n {\n }", "function genDate() {\n\n\t\t$month = strftime(\"%m\");\n\n\t\t$day = strftime(\"%d\");\n\t\t\t\n\t\t$year = strftime(\"%Y\");\n\n\t\t$currentDate = $year . $month . $day;\n\t\t$currentDate = (integer) $currentDate;\n\n\t\treturn $currentDate;\n\t}", "function calendar1($date){ //get \"from\" date\r\n\t\t\t$myCalendar = new tc_calendar(\"date1\", true, false);\r\n\t\t\t$myCalendar->setIcon(\"calendar/images/iconCalendar.gif\");\r\n\t\t\t$myCalendar->setPath(\"calendar/\");\r\n\t\t\t$myCalendar->setYearInterval(1970, 2020);\r\n\t\t\t$myCalendar->setAlignment('left', 'bottom');\r\n\t\t\tif($date!=\"\"){\r\n\t\t\t\t$myCalendar->setDate(Date(\"d\",strtotime($date)),Date(\"m\",strtotime($date)),Date(\"Y\",strtotime($date)));\r\n\t\t\t}\r\n\t\t\t$myCalendar->setOnChange(\"calculate()\");\t\r\n\t\t\t$myCalendar->writeScript();\r\n\t}", "public function save_dates() {\n\t\t// Nothing to do here.\n\t}", "function embed_date_scripts() {\n\techo '<script>{';\n\t$suffix = 'min.js';\n\tif ( defined( 'WP_DEBUG' ) && WP_DEBUG === true ) {\n\t\t$suffix = 'js';\n\t}\n\tinclude __DIR__ . '/js/frontend/date.' . $suffix;\n\techo '}</script>';\n}", "function calendar ($whereto=\"./index.php\") {\n global $_GET, $_SERVER;\n $currMonth = ($_GET['month']) ? $_GET['month'] : date(\"n\"); # numeric calendar month\n $currYear = ($_GET['year']) ? $_GET['year'] : date(\"Y\");\n $tm = mktime(0, 0, 0, ($currMonth +$shifted), 1, $currYear);\n $dim = date(\"t\", $tm); # days in month\n $dow = date(\"w\", $tm); # day of week month starts on\n $txm = date(\"F\", $tm); # text name of month\n $pMon = date(\"M\", mktime(0, 0, 0, $currMonth-1, 1, $currYear));\n $nMon = date(\"M\", mktime(0, 0, 0, $currMonth+1, 1, $currYear));\n $cal .= \" <tr><td><br/></td></tr>\\n<tr><th>$txm $currYear</th></tr>\\n<tr><td>\";\n $cal .= \"<table class='cal' width='15%'>\\n <tr>\";\n foreach (array(\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\") as $k => $v) { $cal .= \"<th>$v</th>\"; }\n $cal .= \"</tr>\\n\";\n $day = \" \";\n for ($row=0; $row<6; $row++) {\n $cal .= \" <tr>\";\n for ($col=0; $col<7; $col++) {\n if (($row == 0) && ($col == $dow)) { $day = 1; }\n if (is_numeric($day)) {\n $dday = ($day < 10) ? \"0$day\" : $day;\n $link = \"?date=$currYear-\".(($currMonth<10)?\"0\":\"\").\"$currMonth-$dday\";\n $cal .= \"<td><a href='$link'>$dday</a></td>\";\n $day++;\n } else {\n $cal .= \"<td>&nbsp;</td>\";\n }\n if ($day > $dim) { $day = \"&nbsp;\"; }\n }\n $cal .= \"</tr>\\n\";\n if ($day >= $dim) { break; }\n }\n $cal .= \" <tr>\\n <td colspan='7' nowrap>\\n\";\n $cal .= \" <a href='?year=\".($currYear-1).\"'>\".substr(($currYear-1),2).\"</a>&nbsp;\\n\";\n $cal .= \" <a href='?month=\".((($currMonth -1) < 1)?12:$currMonth -1).\"&year=\" .((($currMonth -1) < 1)?$currYear -1:$currYear).\"'>$pMon</a>\";\n if (!(($currMonth == date(\"n\")) && ($currYear == date(\"Y\")))) {\n $cal .= \"&nbsp;<a href='?month=\".date(\"n\").\"&year=\".date(\"Y\").\"'>Home</a>\";\n } else {\n $cal .= \"&nbsp;&nbsp;--&nbsp;&nbsp;\";\n }\n $cal .= \"&nbsp;\\n <a href='?month=\".((($currMonth +1) > 12)?1:$currMonth +1).\"&year=\".((($currMonth +1) > 12)?$currYear +1:$currYear).\"'>$nMon</a>&nbsp;\\n\";\n $cal .= \" <a href='?year=\".($currYear+1).\"'>\".substr(($currYear+1),2).\"</a>\\n\";\n $cal .= \" </td>\\n </tr>\\n</table>\\n\";\n $cal .= \"<!-- end calendar -->\\n\";\n return $cal;\n}", "public function hideStartDay()\n\t{\n\t\treturn '\n <script>\n var enableStartDay = function() {\n var e1 = $(\"ctrl_news_startDay\").getParent(\"div\");\n var e2 = $(\"ctrl_news_order\").getParent(\"div\");\n if ($(\"ctrl_news_format\").value == \"news_day\") {\n e1.setStyle(\"display\", \"block\");\n e2.setStyle(\"display\", \"none\");\n\t } else {\n e1.setStyle(\"display\", \"none\");\n e2.setStyle(\"display\", \"block\");\n\t }\n };\n window.addEvent(\"domready\", function() {\n if ($(\"ctrl_news_startDay\")) {\n enableStartDay();\n $(\"ctrl_news_format\").addEvent(\"change\", enableStartDay);\n }\n });\n </script>';\n\t}", "function form_date_multi($variable, $start='', $end='') {\n\n\tglobal $request;\n\n\t// timestamps get converted to dates (treat as in GMT)\n\tif (is_numeric($start)) {\n\t\t$start = array(\n\t\t\t'day' => fetch_day($start),\n\t\t\t'month' => fetch_month($start),\n\t\t\t'year' => fetch_year($start)\n\t\t);\n\t}\n\n\t// timestamps get converted to dates (treat as in GMT)\n\tif (is_numeric($end)) {\n\t\t$end = array(\n\t\t\t'day' => fetch_day($end),\n\t\t\t'month' => fetch_month($end),\n\t\t\t'year' => fetch_year($end)\n\t\t);\n\t}\n\n\tif (!is_array($start)) {\n\t\t$start = array();\n\t}\n\n\tif (!is_array($end)) {\n\t\t$end = array();\n\t}\n\n\tif ($start['year'] AND !$start['day']) $start['day'] = 1;\n\tif ($start['year'] AND !$start['month']) $start['month'] = 1;\n\n\tif ($end['year'] AND !$end['day']) $end['day'] = 1;\n\tif ($end['year'] AND !$end['month']) $end['month'] = 1;\n\n\tif ($start['day'] AND $end['day']) {\n\t\t$visno = \"showCalendar('$variable', 1);\";\n\t} elseif ($start['day']) {\n\t\t$visno = \"showCalendar('$variable');\";\n\t} elseif ($start['number'] AND $end['number']) {\n\t\t$visno = \"showTime('$variable', 1);\";\n\t} elseif ($start['number']) {\n\t\t$visno = \"showTime('$variable');\";\n\t} else {\n\t\t$visno = \"showCalendar('$variable');\";\n\t}\n\n\t$time = \"\n\t\t<table id=\\\"\" . $variable . \"_time\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\"><tr>\n\t\t\t<td style=\\\"padding-right:5px\\\">\" . html_image('icons/todays_tasks.gif', '', \"onclick=\\\"showCalendar('$variable');\\\"\") . \"</td>\n\n\t\t\t<td>From \" . form_time_options($variable . '_start', $start['number'], $start['datetype']) . \" ago until\n\t\t\t\t<span id=\\\"\" . $variable . \"_time_closed\\\"><a onclick=\\\"showTime('$variable', 1);\\\">now</a>.</span>\n\t\t\t</td>\n\n\t\t\t<td>\n\t\t\t\t<span id=\\\"\" . $variable . \"_time_open\\\">&nbsp;\" . form_time_options($variable . '_end', $end['number'], $end['datetype']) . \" ago [<a onclick=\\\"showTime('$variable');\\\">X</a>]</span>\n\t\t\t</td>\n\n\t\t</tr></table>\n\t\";\n\n\t$calendar = \"\n\t\t<table id=\\\"\" . $variable . \"_date\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\"><tr>\n\n\t\t\t<td style=\\\"padding-right:5px\\\">\" . html_image('icons/view_calendar.gif', '', \"onclick=\\\"showTime('$variable');\\\"\") . \"</td>\n\t\t\t<td>From&nbsp;</td>\n\t\t\t<td style=\\\"padding-right:4px\\\">\" . form_date($variable . '_start', $start) . \"</td>\n\t\t\t<td> ago until\n\t\t\t\t<span id=\\\"\" . $variable . \"_date_closed\\\"><a onclick=\\\"showCalendar('$variable', 1, document.form);\\\">now</a>.</span></td>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<td>\n\t\t\t\t<span id=\\\"\" . $variable . \"_date_open\\\">\" . form_date($variable . '_end', $end) . \"</span></td>\n\t\t\t<td>\n\t\t\t\t<span id=\\\"\" . $variable . \"_date_open2\\\">&nbsp; ago [<a onclick=\\\"showCalendar('$variable');\\\">X</a>]</td></span>\n\t\t\t</td>\n\n\t\t</tr></table>\n\t\";\n\n\treturn \"<div style=\\\"width:545px\\\">\" . $time . $calendar . \"<script>$visno</script></div>\";\n\n}", "function wp_maybe_decline_date($date, $format = '')\n {\n }", "function the_modified_date($format = '', $before = '', $after = '', $display = \\true)\n {\n }", "function mkDay($var){\n$eventContent=$this->mkEventContent($var);\n$linkstr=$this->mkUrl($this->actyear,$this->actmonth,$var);\n\tif ($this->javaScriptDay) $linkstr=\"<a href=\\\"javascript:\".$this->javaScriptDay.\"(\".$this->actyear.\",\".$this->actmonth.\",\".$var.\")\\\">\".$var.\"</a>\";\n\tif ($this->isEvent($var)){\n\t\tif ($this->eventUrl){\n\t\t\t$out=\"<td class=\\\"\".$this->eventID.\"\\\"><a href=\\\"\".$this->eventUrl.\"\\\">\".$var.\"</a>\".$eventContent.\"</td>\";\n\t\t\t$this->eventUrl=false;\n\t\t}\n\t\telseif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->eventID.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->eventID.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($var==$this->selectedday && $this->actmonth==$this->selectedmonth && $this->actyear==$this->selectedyear){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSelecDay.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSelecDay.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($var==$this->daytoday && $this->actmonth==$this->monthtoday && $this->actyear==$this->yeartoday){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssToday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssToday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($this->getWeekday($var)==0 && $this->crSunClass){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSunday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSunday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telseif ($this->getWeekday($var)==6 && $this->crSatClass){\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssSaturday.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssSaturday.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\n\telse{\n\t\tif (!$this->dayLinks) $out=\"<td class=\\\"\".$this->cssMonthDay.\"\\\">\".$var.$eventContent.\"</td>\";\n\t\telse $out=\"<td class=\\\"\".$this->cssMonthDay.\"\\\">\".$linkstr.$eventContent.\"</td>\";\n\t}\nreturn $out;\n}", "function minorite_date_popup_process_alter(&$element, &$form_state, $context) {\n $element['date']['#attributes']['class'][] = 'has-datepicker';\n $element['date']['#title_display'] = 'none';\n}", "function drawFieldEndDate() {\r\n global $projectDate,$endDate; ?> \r\n <div dojoType=\"dijit.form.DateTextBox\"\r\n <?php if (sessionValueExists('browserLocaleDateFormatJs')) {\r\n\t\t\t\techo ' constraints=\"{datePattern:\\''.getSessionValue('browserLocaleDateFormatJs').'\\'}\" ';\r\n\t\t\t}?>\r\n id=\"endDatePlanView\" name=\"endDatePlanView\"\r\n invalidMessage=\"<?php echo i18n('messageInvalidDate')?>\"\r\n type=\"text\" maxlength=\"10\"\r\n <?php if ($projectDate) {echo 'disabled'; } ?> \r\n style=\"width:100px; text-align: center;\" class=\"input roundedLeft\"\r\n hasDownArrow=\"true\"\r\n value=\"<?php if(sessionValueExists('endDatePlanView') and !$projectDate){ echo getSessionValue('endDatePlanView'); }else{ echo $endDate; } ?>\" >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveDataToSession('endDatePlanView',formatDate(dijit.byId('endDatePlanView').get(\"value\")), false);\r\n refreshJsonPlanning();\r\n </script>\r\n </div>\r\n<?php \r\n}", "function date_i18n( $date ) {\n\t\treturn preg_replace( '/(\\s|^)1\\s/', '1<sup>er</sup> ', $date );\n\t}", "function show_edit()\n\t{\n\t\t$this->tpl->set_var('name', '_f_'.$this->name);\n\t\t$this->tpl->set_var('description', $this->description);\n\t\t$this->tpl->set_var('error', $this->error);\n\t\t$this->tpl->set_var('select', html_build_date($this->name, $this->value));\n\t\t\n\n\t\t$out = $this->tpl->process('temp', 'avcDate_edit');\n\n\t\t$this->tpl->drop_var('name');\n\t\t$this->tpl->drop_var('description');\n\t\t$this->tpl->drop_var('select');\n\t\t$this->tpl->drop_var('error');\n\n\t\treturn $out;\n\t}", "function options_form(&$form, &$form_state) {\r\n parent::options_form($form, $form_state);\r\n $options = $this->date_handler->date_parts();\r\n unset($options['second'], $options['minute']);\r\n $options += array('week' => date_t('Week', 'datetime'));\r\n $form['granularity'] = array(\r\n '#title' => t('Granularity'),\r\n '#type' => 'radios',\r\n '#options' => $options,\r\n '#default_value' => $this->options['granularity'],\r\n '#multiple' => TRUE,\r\n '#description' => t(\"Select the type of date value to be used in defaults, summaries, and navigation. For example, a granularity of 'month' will set the default date to the current month, summarize by month in summary views, and link to the next and previous month when using date navigation.\"),\r\n );\r\n\r\n $form['year_range'] = array(\r\n '#title' => t('Date year range'),\r\n '#type' => 'textfield',\r\n '#default_value' => $this->options['year_range'],\r\n '#description' => t(\"Set the allowable minimum and maximum year range for this argument, either a -X:+X offset from the current year, like '-3:+3' or an absolute minimum and maximum year, like '2005:2010'. When the argument is set to a date outside the range, the page will be returned as 'Page not found (404)'.\"),\r\n );\r\n \r\n $fields = date_api_fields($this->definition['base']);\r\n $options = array();\r\n foreach ($fields['name'] as $name => $field) {\r\n $options[$name] = $field['label'];\r\n }\r\n $form['date_fields'] = array(\r\n '#title' => t('Date field(s)'),\r\n '#type' => 'checkboxes',\r\n '#options' => $options,\r\n '#default_value' => $this->options['date_fields'],\r\n '#multiple' => TRUE,\r\n '#description' => t(\"Select one or more date fields to filter with this argument. Do not select both the 'From date' and 'To date' for CCK date fields, only one of them is needed.\"),\r\n );\r\n $form['date_method'] = array(\r\n '#title' => t('Method'),\r\n '#type' => 'radios',\r\n '#options' => array('OR' => t('OR'), 'AND' => t('AND')),\r\n '#default_value' => $this->options['date_method'],\r\n '#description' => t('Method of handling multiple date fields in the same query. Return items that have any matching date field (date = field_1 OR field_2), or only those with matches in all selected date fields (date = field_1 AND field_2).'),\r\n );\r\n \r\n }", "function get_day_combo($selectedday, $month, $year, $required)\n{\n\t$option_string = '';\n\t#get last day of the month\n\tif(trim($month) != '' && trim($year) != '')\n\t{\n\t\t$lastday = date('d', strtotime('last day of '.$month.', '.$year));\n\t}\n\telse\n\t{\n\t\t$lastday = 31;\n\t}\n\t\n\t# Returning data for a drop down\n\tif($required == 'combo')\n\t{\n\t\tif(trim($selectedday) == '')\n\t\t{\n\t\t\t$option_string .= \"<option value='' selected>- Day -</option>\";\n\t\t}\n\t\n\t\tfor($i=1; $i<($lastday+1); $i++)\n\t\t{\n\t\t\t$option_string .= \"<option value='\".$i.\"'\";\n\t\t\tif($selectedday == $i)\n\t\t\t{\n\t\t\t\t$option_string .= \" selected\";\n\t\t\t}\n\t\t\t\n\t\t\t$option_string .= \">\".$i.\"</option>\";\n\t\t}\n\t} \n\telse if($required == 'lastday')\n\t{\n\t\t$option_string = $lastday;\n\t}\n\t\n\treturn $option_string;\n}", "function uiToDBdate() {\r\n\r\n\t\t$month = (int) substr($this->date, -10, 2);\r\n\t\t$day = (int) substr($this->date, -7, 2);\r\n\t\t$year = (int) substr($this->date, -4, 4);\r\n\r\n\t\t$formattedDate = $year . \"-\" . $month . \"-\" . $day;\r\n\r\n\t\t$this->date = $formattedDate;\r\n\t}", "function thematic_date_classes( $t, &$c, $p = '' ) {\n\t$t = $t + ( get_option('gmt_offset') * 3600 );\n\t$c[] = $p . 'y' . gmdate( 'Y', $t ); // Year\n\t$c[] = $p . 'm' . gmdate( 'm', $t ); // Month\n\t$c[] = $p . 'd' . gmdate( 'd', $t ); // Day\n\t$c[] = $p . 'h' . gmdate( 'H', $t ); // Hour\n}", "function writeDateQuestion ($id, $name, $label, $message, $placeholder, $branchExit) {\n\tglobal $datetimes;\n\tif (!empty($branchExit)) {\n\t\techo '<div class=\"step\" data-state=\"'.$branchExit.'\">';\n\t}\n\telse {\n\t\techo '<div class=\"step\" id=\"'.$id.'\">';\n\t}\n\techo '<div class=\"section\"><div class=\"card-header m-b-0\">\n\t\t\t<label for=\"'.$id.'\">'.$label.'</label>';\n\t\t\tif (!empty($message)) {\n\t\t\t\techo '<p>'.$message.'</p>';\n\t\t\t}\n\t\t\t\techo '<hr class=\"card-line\" align=\"left\">\n\t\t</div><div class=\"card-body m-b-30\">\n\t\t\t\t<input type=\"tel\" name=\"'.$name.'\" id=\"input'.$id.'\" class=\"form-control\" placeholder=\"'.$placeholder.'\" ';\n\t\t\t\tif (isset($datetimes[$id])) {\n \techo 'value=\"'.date('m/d/Y', strtotime($datetimes[$id])).'\">';\n }\n else {\n \techo '>';\n }\n\techo '</div></div></div>';\n\techo '<script>\n\t\tvar cleave'.$id.' = new Cleave(\"#input'.$id.'\", {\n\t date: true,\n \tdelimiter: \"/\",\n \tdatePattern: [\"m\", \"d\", \"Y\"]\n\t\t});\n\t</script>';\n}", "function sandbox_date_classes( $t, &$c, $p = '' ) {\n\t$t = $t + ( get_option('gmt_offset') * 3600 );\n\t$c[] = $p . 'y' . gmdate( 'Y', $t ); // Year\n\t$c[] = $p . 'm' . gmdate( 'm', $t ); // Month\n\t$c[] = $p . 'd' . gmdate( 'd', $t ); // Day\n\t$c[] = $p . 'h' . gmdate( 'H', $t ); // Hour\n}", "function metabox_date_time($post){\n\t\tglobal $postmec;\n\t\tinclude $postmec->get_postmec_dir() . 'metaboxes/event_start_end_defining.php';\n\t}", "function Date_Metabox() {\n\t\n\t$x_options = get_option('date_metabox_options');\n\t$datepicker_post_types = $x_options['post_type'];\n\n\t$datepicker_mb = new WPAlchemy_MetaBox(array\n\t(\n\t\t'id' => '_date_meta',\n\t\t'title' => 'Datepicker Meta',\n\t\t'template' => dirname(__FILE__) . '/date_meta.php',\n\t\t'types' => $datepicker_post_types,\n\t\t'mode' => WPALCHEMY_MODE_EXTRACT,\n\t\t'prefix' => '_my_'\n\t));\n\t\n\tglobal $pagenow, $typenow;\n\t$dir = get_bloginfo('template_directory');\n\t\n\tif (is_admin() && $pagenow=='post-new.php' OR $pagenow=='post.php') {\n\t\twp_enqueue_script('admin-jquery-ui', plugins_url('/js/jquery-ui.js',__FILE__), 'jquery');\n\t\twp_enqueue_script('admin-jquery-ui-timepicker', plugins_url('/js/timepicker.js',__FILE__), 'jquery');\n\t\twp_enqueue_script('admin-date-picker', plugins_url('/js/condiment_date_picker.js',__FILE__), 'jquery');\n\t}\n\t\n\tinclude_once dirname(__FILE__) . '/helpers.php';\n\t\n}", "function validateDate(&$errors, $field_list, $field_day, $field_month, $field_year)\n{\n\t//check if a field has been missed\n\t//$errors[$field_day] = \"$field_list[$field_day] $field_list[$field_month] $field_list[$field_year]\";\n\tif ((!isset($field_list[$field_day])|| empty($field_list[$field_day])) || (!isset($field_list[$field_month])|| empty($field_list[$field_month])) || (!isset($field_list[$field_year])|| empty($field_list[$field_year])))\n\t\t$errors[$field_day] = ' Required';\n\n\t//check February dates\n\telse if (($field_list[$field_month] == 2) && ($field_list[$field_day] == 29) && (date(\"L\", mktime(0, 0, 0, 2, 29, $field_list[$field_year])) == 0))\n\t\t\t$errors[$field_day] = ' Invalid Date: no 29th in '.$field_list[$field_year];\t\n\telse if (($field_list[$field_month] == 2) && ($field_list[$field_day] >= 30)) \n\t\t\t$errors[$field_day] = ' Invalid Date: day not in February';\n\t//check 30 Day months i.e September, April, etc\n\telse if (($field_list[$field_day] == 31) && (($field_list[$field_month] == 9) || ($field_list[$field_month] == 4) || ($field_list[$field_month] == 6) || ($field_list[$field_month] == 11)))\n\t\t$errors[$field_day] = ' Invalid Date: no 31st in'.$field_list[$field_year];\n}", "function week_of() {\n\n\n\t// Make the week of pull-down menu:\n\tprint 'week of: ';\n\tprint '<select name=\"monday\">';\n\t//print '<option value=\\\"-28dayslastMonday\\\">'; print date('l, F j Y', strtotime('-28 days last Monday')); print '</option>';\n\t//print '<option value=\\\"-21dayslastMonday\\\">'; print date('l, F j Y', strtotime('-21 days last Monday')); print '</option>';\n\t//print '<option value=\\\"-14dayslastMonday\\\">'; print date('l, F j Y', strtotime('-14 days last Monday')); print '</option>';\n\t//print '<option value=\\\"-7dayslastMonday\\\">'; print date('l, F j Y', strtotime('-7 days last Monday')); print '</option>';\n\tprint '<option value=\\\"lastMonday\\\">'; print date('l, F j Y', strtotime('last Monday')); print '</option>';\n\tprint '<option value=\\\"firstMonday\\\">'; print date('l, F j Y', strtotime('first Monday')); print '</option>';\n\tprint '<option value=\\\"secondMonday\\\">'; print date('l, F j Y', strtotime('second Monday')); print '</option>';\n\tprint '<option value=\\\"thirdMonday\\\">'; print date('l, F j Y', strtotime('third Monday')); print '</option>';\n\tprint '<option value=\\\"fourthMonday\\\">'; print date('l, F j Y', strtotime('fourth Monday')); print '</option>';\n\tprint '<option value=\\\"+7daysfourthMonday\\\">'; print date('l, F j Y', strtotime('+7 days fourth Monday')); print '</option>';\n\tprint '<option value=\\\"+14daysfourthMonday\\\">'; print date('l, F j Y', strtotime('+14 days fourth Monday')); print '</option>';\n\tprint '<option value=\\\"+21daysfourthMonday\\\">'; print date('l, F j Y', strtotime('+21 days fourth Monday')); print '</option>';\n\tprint '<option value=\\\"+28daysfourthMonday\\\">'; print date('l, F j Y', strtotime('+28 days fourth Monday')); print '</option>';\n\tprint '<option value=\\\"+28daysfourthMonday\\\">'; print date('l, F j Y', strtotime('+35 days fourth Monday')); print '</option>';\n\tprint '<option value=\\\"pastdates\\\">...past dates...</option>';\n\tprint '</select>';\n\t\n}", "function BeforeEdit(&$values, $where, &$oldvalues, &$keys, &$message, $inline, &$pageObject)\n{\n\n\t\t\n\n$fh=$values[\"FirstHalf\"];\n$sh=$values[\"SecondHalf\"];\n$fd=$values[\"FromDate\"];\n$td=$values[\"ToDate\"];\n\n$fd1=strtotime($fd);\n$td1= strtotime($td);\n\nif ($fd1>$td1) {\n\n$message = \"FromDate should be equal less than ToDate.\";\n\n$message;\n\nreturn false;\n\n\n}\n\n\nelseif ($fh!=1 and $sh!=1) {\n\n$message = \"Please select one or both FirstHalf or SecondHalf\";\n\n$message;\n\nreturn false;\n\n}\n\nelse\n{\nreturn True;\n};\n\n\n\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n\n\n;\t\t\n}", "function changeDateFromPageCombosToMySQLFormat($day, $month, $year) {\t\n\t\t$pagedate = $day.\"-\".$month.\"-\".$year;\n\t\t//There is no day, month or year selected\n\t\tif (trim($day)== \"\" || trim($month)== \"\" || trim($year)== \"\") {\n\t\t\t$mysqldate = \"0000-00-00\";\n\t\t} else {\n\t\t\t$mysqldate = \"'\".date(\"Y-m-d\", strtotime($pagedate)).\"'\";\n\t\t}\t\t\n\t\treturn $mysqldate;\t\n\t}", "function setDateHtmlOptions( $html, $ctrlName, $date = \"\", $format = \"Y-m-d h:i:s\")\n\t{\n\t\tif($format == \"\")\n\t\t\t$format = \"Y-m-d h:i:s\";\n\t\tif($date == \"\")\n\t\t\t$date = date($format);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Day>\", \"</soo:datarepeater:\".$ctrlName.\"Day>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 1; $i < 32; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Day}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"DayDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Day}\", ($i == date(\"d\", strtotime( $date ) ) ) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Month>\", \"</soo:datarepeater:\".$ctrlName.\"Month>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 1; $i < 13; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Month}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"MonthDisplay}\", SoondaUtil::getMonthName( $i), $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Month}\", ($i == date(\"m\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Year>\", \"</soo:datarepeater:\".$ctrlName.\"Year>\");\n\t\t$sOptions = \"\";\n\t\t$currentYear = date(\"Y\");\n\t\tfor($i = $currentYear - 20; $i < $currentYear + 20; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Year}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"YearDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Year}\", ($i == date(\"Y\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Hour>\", \"</soo:datarepeater:\".$ctrlName.\"Hour>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 0; $i < 24; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Hour}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"HourDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Hour}\", ($i == date(\"h\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\t\t\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Minute>\", \"</soo:datarepeater:\".$ctrlName.\"Minute>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 0; $i < 60; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Minute}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"MinuteDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Minute}\", ($i == date(\"i\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\t\t\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Second>\", \"</soo:datarepeater:\".$ctrlName.\"Second>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 0; $i < 60; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Second}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"SecondDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Second}\", ($i == date(\"s\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\t\t\t\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\t\t$html = str_replace( \"{SOO.FUNCTION:SELECTEDDATE:\".$ctrlName.\"}\", date($format, strtotime($date) ), $html);\n\t\treturn $html;\n\t}", "function sysHumanDate($date) { # $date = date in format '2000-01-01'\r\n\tswitch ($date) {\r\n\tcase date(\"Y-m-d\"):\r\n\t\t$date = \"Idag\";\r\n\t\tbreak;\r\n\tcase date(\"Y-m-d\", strtotime(\"-1 day\")):\r\n\t\t$date = \"Igår\";\r\n\t\tbreak;\r\n\t}\r\n\treturn $date;\r\n}", "function __construct($value=\"0000-00-00\"){\n\t\tparent::__construct();\n\t\t\n\t\tif(!is_string($value)){\n\t\t\tthrow new IllegalArgumentException(\"Argument 1 to \" . __METHOD__ . \" must be a string\");\n\t\t}\n\t\t$this->_a = new NumberOnlyAction();\n\t\t$year = substr($value, 0, 4);\n\t\t$month = substr($value, 5, 2);\n\t\t$day = substr($value, 8, 2);\n\t\t\n\t\t$this->_year = new SmallTextInput($year);\n\t\t$this->_month = new SmallTextInput($month);\n\t\t$this->_day = new SmallTextInput($day);\n\t\t\n\t\t$this->_year->setMaxLength(4);\n\t\t$this->_year->setSize(4);\n\t\t$this->_year->getStyle()->setBorderWidth(0);\n\t\t$this->_year->addKeyPressAction($this->_a);\n\t\t$if = new CompareIntBoxAction($this->_year, 2030, \">\");\n\t\t$then = new SetValueAction($this->_year, \"2030\");\n\t\t$a = new IfThenAction($if,$then);\n\t\t$this->_year->addChangeAction($a);\n\t\t$if = new CompareIntBoxAction($this->_year, 1960, \"<\");\n\t\t$then = new SetValueAction($this->_year, \"1960\");\n\t\t$a = new IfThenAction($if,$then);\n\t\t$this->_year->addChangeAction($a);\n\t\t\n\t\t$this->_month->setMaxLength(2);\n\t\t$this->_month->setSize(2);\n\t\t$this->_month->getStyle()->setBorderWidth(0);\n\t\t$this->_month->addKeyPressAction($this->_a);\n\t\t$if = new CompareIntBoxAction($this->_month, 1, \"<\");\n\t\t$then = new SetValueAction($this->_month, \"1\");\n\t\t$a = new IfThenAction($if,$then);\n\t\t$this->_month->addChangeAction($a);\n\t\t$if = new CompareIntBoxAction($this->_month, 12, \">\");\n\t\t$then = new SetValueAction($this->_month, \"12\");\n\t\t$a = new IfThenAction($if,$then);\n\t\t$this->_month->addChangeAction($a);\n\t\t\n\t\t$this->_day->setMaxLength(2);\n\t\t$this->_day->setSize(2);\n\t\t$this->_day->getStyle()->setBorderWidth(0);\n\t\t$this->_day->addKeyPressAction($this->_a);\n\t\t$if = new CompareIntBoxAction($this->_day, 1, \"<\");\n\t\t$then = new SetValueAction($this->_day, \"1\");\n\t\t$a = new IfThenAction($if,$then);\n\t\t$this->_day->addChangeAction($a);\n\n\t\t$a = new VerifyDOMAction($this->_year, $this->_month, $this->_day);\n\t\t$this->_day->addChangeAction($a);\n\t\t$this->_month->addChangeAction($a);\n\t\t$this->_year->addChangeAction($a);\n\t\t\n\t\t$this->getStyle()->setBorderWidth(1);\n\t\t$this->getStyle()->setBorderColor(\"black\");\n\t\t$this->getStyle()->setBorderStyle(\"solid\");\n\t\t$this->getStyle()->setBackground(\"white\");\n\n\n\t\t$dow_array = array(\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\");\n\t\ttry{\n\t\t\t$dow = $dow_array[date(\"w\",mktime(0,0,0,$month,$day,$year))];\n\t\t}catch(Exception $e){\n\t\t\t$dow = \"Er\";\n\t\t}\n\t\t$this->_dow = new SmallTextInput($dow);\n\t\t$this->_dow->setReadOnly(true);\n\t\t$this->_dow->setMaxLength(2);\n\t\t$this->_dow->setSize(2);\n\t\t$this->_dow->getStyle()->setBorderWidth(0);\n\t\t$this->addChangeAction($this->getChangeAction());\n\t}", "function form_calendar($forms){\r\n\t$name = isset($forms['name']) ? $forms['name'] : rand(1000 , 9999 ) ;\r\n\t$class \t= isset( $forms['class'] ) ? $forms['class'] : $forms['name'] ;\r\n\t$value \t= isset( $forms['value'] ) ? $forms['value'] : \"\" ; \r\n\t\r\n\treturn \"<script>DateInput('\".$name.\"', true, 'YYYY-MM-DD', '\".$value.\"')</script> \";\r\n}", "function BeforeAdd(&$values, &$message, $inline, &$pageObject)\n{\n\n\t\t$fh=$values[\"FirstHalf\"];\n$sh=$values[\"SecondHalf\"];\n$fd=$values[\"FromDate\"];\n$td=$values[\"ToDate\"];\n\n$fd1=strtotime($fd);\n$td1= strtotime($td);\n\nif ($fd1>$td1) {\n\n$message = \"FromDate should be equal less than ToDate.\";\n\n$message;\n\nreturn false;\n\n\n}\n\n\nelseif ($fh!=1 and $sh!=1) {\n\n$message = \"Please select one or both FirstHalf or SecondHalf\";\n\n$message;\n\nreturn false;\n\n}\n\nelse\n{\nreturn True;\n};\n\n\n\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n\n\n;\t\t\n}", "function recommends_req_wizard_next_submit($form, &$form_state) {\n\n $current_step = &$form_state['step'];\n $form_state['step_information'][$current_step]['stored_values'] = $form_state['values'];\n \n/////////////// \nif ($form_state['step'] == 1) {\n \n $format = variable_get('date_format_long', 'l, F j, Y - H:i');\n date_default_timezone_set('America/New_York');\n $date = date(\"c\") ;\n $timestamp = substr($date,0,19); \n \n $form_state['prefix'] = $form_state['values']['prefix'];\n $form_state['firstname'] = $form_state['values']['first_name'] ;\n $form_state['lastname'] = $form_state['values']['last_name'];\n $form_state['initial'] = $form_state['values']['initial'];\n $form_state['suffix'] = $form_state['values']['suffix'] ;\n $form_state['s_email'] = $form_state['values']['email'];\n $form_state['s_school'] = \"Clayton\";\n $form_state['s_req_date'] = $timestamp;\n $form_state['s_master_doc'] = $form_state['values']['reqby'] ;\n $form_state['s_comments'] = $form_state['values']['comments'] ;\n $form_state['s_timestamp'] = $timestamp;\n }\n \n if ($form_state['step'] == 2) {\n \n for ($i = 1; $i <= $form_state['num_schools']; $i++) {\n \n \t\t$form_state['schoolname'][$i] = $form_state['values']['schname'][$i]['schoolname'];\n \t\t$form_state['schoolprogram'][$i] = $form_state['values']['schname'][$i]['schoolprogram'];\n \t\t\n \t\t$form_state['r_school_contact_email'][$i] = $form_state['values']['schname'][$i]['school_contact_email'];\n \t\t$form_state['r_school_contact_postal'][$i] = $form_state['values']['schname'][$i]['school_contact_postal'];\n \t\t\n \t\t$form_state['r_date_due'][$i]['month'] = $form_state['values']['schname'][$i]['r_date_due']['month'];\n \t\t\n \t\t$form_state['r_date_due'][$i]['day'] = $form_state['values']['schname'][$i]['r_date_due']['day'];\n \t\t$form_state['r_date_due'][$i]['year'] = $form_state['values']['schname'][$i]['r_date_due']['year'];\n \t\t\n \t\t\n };\n }\n \n if ($form_state['step'] == 3) {\n if ($form_state['num_courses'] == 0) {\n drupal_goto('recommends_req/wizard/intro');\n }\n \n for ($i = 1; $i <= $form_state['num_courses']; $i++) {\n \t\t$pid = $form_state['step_information'][3]['stored_values']['crsname'][$i]['i_pid'];\n \t\t\n \t\n \t\t\n \t\tif (in_array($pid, $form_state['entries'])) {\n \t\t\n \t\t\n \t\t $form_state['coursenum'][$i] = $form_state['entries'][$pid]->i_course;\n \t\t $form_state['coursesemester'][$i] = $form_state['entries'][$pid]->i_semester;\n \t\t $form_state['courseyear'][$i] = $form_state['entries'][$pid]->i_year;\n \t\t $form_state['courseother'][$i] = \" \";\n \t\t} else\n \t\t{\n \t\t $form_state['coursenum'][$i] = $form_state['complete form']['crsname'][1]['i_pid']['#options'][$pid];\n \t\t $form_state['coursesemester'][$i] = \"NA\";\n \t\t $form_state['courseyear'][$i] = \"NA\";\n \t\t $form_state['courseother'][$i] = $form_state['step_information'][3]['stored_values']['crsname'][$i]['i_other']; \n \t\t}\n \t\t\n \t\t\n };\n }\n \n if ($current_step < count($form_state['step_information'])) {\n $current_step++;\n if (!empty($form_state['step_information'][$current_step]['stored_values'])) {\n $form_state['values'] = $form_state['step_information'][$current_step]['stored_values'];\n }\n else {\n $form_state['values'] = array();\n }\n $form_state['rebuild'] = TRUE; // Force rebuild with next step.\n return;\n }\n}", "function preSeeTariff($ar){\n $this->browseTable(array('boid'=>$this->dstaticket->getBoid(), 'tplentry'=>'brticket', 'options'=>array('tapool'=>array('target_fields'=>array('talabel', 'poolno')))));\n $this->browseTable(array('boid'=>$this->dstaperson->getBoid(), 'tplentry'=>'brperson'));\n $fd = new XDateDef();\n $fd->field = 'validfrom';\n $r = array('ovalidfrom'=>$fd->edit(date('Y-m-d')));\n XShell::toScreen1('br', $r);\n\n }", "function widget_date($inputname, $defaultdate=NULL) {\n\t\treturn '<div data-date-viewmode=\"years\" data-date-format=\"dd-mm-yyyy\" data-date=\"'.$defaultdate.'\" id=\"'.$inputname.'-container\" class=\"input-append date\">\n\t\t\t\t<input type=\"text\" value=\"'.$defaultdate.'\" name=\"'.$inputname.'\" size=\"16\" class=\"span\">\n\t\t\t\t<span class=\"add-on\"><i class=\"icon-calendar\"></i></span>\n\t\t\t</div>\n\t\t\t<script>$(\"#'.$inputname.'-container\").datepicker({\n\t\t\t\t\t\t\t\t\"setValue\": \"'.$defaultdate.'\",\n\t\t\t\t\t\t\t\t\"format\": \"dd/mm/yyyy\"\n\t\t\t});</script>\n\t\t\t';\n\t}", "function non_breaking_date() {\r\n\t\t$english_months_array = array(\r\n\t\t// month => variations\r\n\t\t'January' => array('Jan.', 'Jan'),\r\n\t\t'February' => array('Feb.', 'Feb'),\r\n\t\t'March' => array('Mar.', 'Mar'),\r\n\t\t'April' => array('Apr.', 'Apr'),\r\n\t\t'May' => array(),\r\n\t\t'June' => array('Jun.', 'Jun'),\r\n\t\t'July' => array('Jul.', 'Jul'),\r\n\t\t'August' => array('Aug.', 'Aug'),\r\n\t\t'September' => array('Sept.', 'Sept'),\r\n\t\t'October' => array('Oct.', 'Oct'),\r\n\t\t'November' => array('Nov.', 'Nov'),\r\n\t\t'December' => array('Dec.', 'Dec'),\r\n\t\t);\r\n\t\t$french_months_array = array(\r\n\t\t// month => variations\r\n\t\t'janvier' => array('jan.', 'jan'),\r\n\t\t'février' => array('fév.', 'fév', 'f&#233;vrier', 'f&#233;v.', 'f&#233;v', 'f&#xe9;vrier', 'f&#xe9;v.', 'f&#xe9;v', 'f&eacute;vrier', 'f&eacute;v.', 'f&eacute;v'),\r\n\t\t'mars' => array('mar.', 'mar'),\r\n\t\t'avril' => array('avr.', 'avr'),\r\n\t\t'mai' => array(),\r\n\t\t'juin' => array(),\r\n\t\t'juillet' => array('juil.', 'juil'),\r\n\t\t'août' => array('ao&#251;t', 'ao&#xfb;t', 'ao&ucirc;t'),\r\n\t\t'septembre' => array('sept.', 'sept'),\r\n\t\t'octobre' => array('oct.', 'oct'),\r\n\t\t'novembre' => array('nov.', 'nov'),\r\n\t\t'décembre' => array('déc.', 'déc', 'd&#233;cembre', 'd&#233;c.', 'd&#233;c', 'd&#xe9;cembre', 'd&#xe9;c.', 'd&#xe9;c', 'd&eacute;cembre', 'd&eacute;c.', 'd&eacute;c'),\r\n\t\t);\r\n\t\t$english_seasons_array = array(\r\n\t\t'Spring',\r\n\t\t'Summer',\r\n\t\t'Fall',\r\n\t\t'Winter',\r\n\t\t);\r\n\t\t$french_seasons_array = array(\r\n\t\t'printemps',\r\n\t\t'été', '&#233;t&#233;', '&#xe9;t&#xe9;', '&eacute;t&eacute;',\r\n\t\t'automne',\r\n\t\t'hiver',\r\n\t\t);\r\n\t\t$time_periods_array = array();\r\n\t\tforeach($english_months_array as $month => $variations_array) {\r\n\t\t\t$time_periods_array[] = $month;\r\n\t\t\tforeach($variations_array as $variation) {\r\n\t\t\t\t$time_periods_array[] = $variation;\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach($french_months_array as $month => $variations_array) {\r\n\t\t\t$time_periods_array[] = $month;\r\n\t\t\tforeach($variations_array as $variation) {\r\n\t\t\t\t$time_periods_array[] = $variation;\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach($english_seasons_array as $season) {\r\n\t\t\t$time_periods_array[] = $season;\r\n\t\t}\r\n\t\tforeach($french_seasons_array as $season) {\r\n\t\t\t$time_periods_array[] = $season;\r\n\t\t}\r\n\t\tif($this->config['non_breaking_type'] === 'noWrap') {\r\n\t\t\tif(ReTidy::is_clf2()) {\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,2},*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span class=\"noWrap\">$1 $3 $5</span>', $this->code, -1, $a);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span class=\"noWrap\">$1 $3 $5</span>', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,4},*)/is', '<span class=\"noWrap\">$1 $3</span>', $this->code, -1, $c);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)/is', '<span class=\"noWrap\">$1 $3</span>', $this->code, -1, $d);\r\n\t\t\t} else {\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,2},*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1 $3 $5</span>', $this->code, -1, $a);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '<span style=\"white-space: nowrap;\">$1 $3 $5</span>', $this->code, -1, $b);\r\n\t\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,4},*)/is', '<span style=\"white-space: nowrap;\">$1 $3</span>', $this->code, -1, $c);\r\n\t\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)/is', '<span style=\"white-space: nowrap;\">$1 $3</span>', $this->code, -1, $d);\r\n\t\t\t}\r\n\t\t} else { // default to nbsp\r\n\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,2},*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '$1&nbsp;$3&nbsp;$5', $this->code, -1, $a);\r\n\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)(' . $this->spaceRegex . ')+([0-9]{4})/is', '$1&nbsp;$3&nbsp;$5', $this->code, -1, $b);\r\n\t\t\t$this->code = preg_replace('/(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{1,4},*)/is', '$1&nbsp;$3', $this->code, -1, $c);\r\n\t\t\t$this->code = preg_replace('/([0-9]{1,2})(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ',*)/is', '$1&nbsp;$3', $this->code, -1, $d);\r\n\t\t\t\r\n\t\t}\r\n\t\tif(ReTidy::is_clf2()) {\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2&ndash;$4&ndash;$6</span>$7', $this->code, -1, $e);\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2&nbsp;$4&nbsp;&ndash;&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2$3$4$5$6</span>$7', $this->code, -1, $e);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span class=\"noWrap\">$2&nbsp;$4&nbsp;$6&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t} else {\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2&ndash;$4&ndash;$6</span>$7', $this->code, -1, $e);\r\n\t\t\t//$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2&nbsp;$4&nbsp;&ndash;&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})(' . implode(\"|\", $this->dashes_array) . ')([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2$3$4$5$6</span>$7', $this->code, -1, $e);\r\n\t\t\t$this->code = preg_replace('/([^;0-9])(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})(' . $this->spaceRegex . ')+(' . implode(\"|\", $this->dashes_array) . ')(' . $this->spaceRegex . ')+(' . implode(\"|\", $time_periods_array) . ')(' . $this->spaceRegex . ')+([0-9]{2,4})([^;0-9])/is', '$1<span style=\"white-space: nowrap;\">$2&nbsp;$4&nbsp;$6&nbsp;$8&nbsp;$10</span>$11', $this->code, -1, $f);\r\n\t\t}\r\n\t\t//$this->logMsgIf(\"non_breaking_year_range\", $count);\r\n\t\t$count = $a + $b + $c + $d + $e + $f;\r\n\t\t//var_dump($a, $b, $c, $d, $e, $f);\r\n\t\t$this->logMsgIf(\"non_breaking_date\", $count);\r\n\t}", "function timezones_admin_print_scripts() {\r\n\twp_enqueue_script('prototype');\r\n\twp_enqueue_script('scriptaculous-dragdrop');\r\n\twp_enqueue_script('scriptaculous-effects');\r\n\twp_enqueue_script('datepicker', TIMEZONECALCULATOR_PLUGINURL.'date-picker/js/datepicker.js');\r\n}", "function export_date_options($post_type = 'post')\n {\n }", "function drawDateRange($function,$default,$hook_id)\n{\n $post_draw_focus=\"\\\"\\\"\";\n $html_str=\"<div class='date_ranger'>\";\n\n $html_str.=\"\n <label for='min'>From </label>\n <input \n type='text' \n id='min' \n name='min' \n value='\".$default['min'].\"'\n />\n\n <label for='max'> To </label>\n <input \n type='text' \n id='max' \n name='max' \n value='\".$default['max'].\"'\n />\n\n <input \n type='button' \n id='get_range' \n onclick='${function}(\\\"${hook_id}\\\",${post_draw_focus});' \n value='Select Range'\n />\n \";\n\n $html_str.=\"</div>\";\n\n return $html_str;\n}\n\n// 0.1.3\n// draws the html form elements for one entry of the ledger, returning the string.\n// $alternate is the class for the entry's div, which alternates classes. $row \n// is the sql query object for the row that the data comes from. $bal_class \n// is the class for the balance field, which depends on if it's positive or \n// negative, so that it receives different styles for each. $balance is the \n// balance value itself in cents.\nfunction buildLedgerElements($alternate,$row,$bal_class,$balance)\n{\n $id=$row[\"PTR\"];\n\n // doesn't always catch the quotes, but it helps\n $src_quot=array(\"\\\"\",\"'\",\"\\x98\",\"\\x99\",\"\\x8c\",\"\\x9d\");\n $print_quot=array(\"&quot;\",\"&apos;\",\"&apos;\",\"&apos;\",\"&quot;\",\"&quot;\");\n $row[\"SERIAL\"]=str_replace($src_quot,$print_quot,$row[\"SERIAL\"]);\n $row[\"COMMENTS\"]=str_replace($src_quot,$print_quot,$row[\"COMMENTS\"]);\n\n $html_str=\"\n <div class='${alternate}' >\".\n\n \"<input type='text' field='ledger_date' id=${id} value='\".\n $row[\"DATE\"].\"' />\".\n \n \"<input type='text' field='ledger_serial' id=${id} value='\". \n $row[\"SERIAL\"].\"' />\".\n\n \"<input type='text' field='ledger_amount' id=${id} value='\".\n asCurrency($row[\"AMOUNT\"]).\"' />\".\n\n \"<span type='text' field='${bal_class}' id=${id} >\".\n asCurrency($balance).\n \"</span>\".\n\n \"<input type='text' field='ledger_com' id=${id} value='\".\n $row[\"COMMENTS\"].\"' />\".\n\n \"</div>\";\n\n return $html_str;\n}", "function day($ask,$da,$mo,$ye,$next,$prev){\nglobal $maand,$week,$language,$m,$d,$y,$viewdayok,$searchdayok,$popupevent,$popupeventwidth,$popupeventheight;\n\nif (!isset($yda))\n $yda = '';\n\nif ($viewdayok == 1){\n// als er geen dag is, dan is het vandaag\nif (!$da){\n $da = $d;\n $mo = $m;\n $ye = $y;\n}\n\n$we = mktime(0,0,0,$mo,$da,$ye);\n$we = strftime(\"%w\",$we);\n$we++;\necho \"<h3>\".translate(\"askedday\").\": \".$week[$we].\" \".$da.\" \".$maand[$mo].\" \".$ye.\"</h3>\";\n\n// eerst alle items zoeken (anders serieuze mix-up van vars)\n$query = \"select id,title,description,url,cat_name,day,month,year from events left join calendar_cat on events.cat=calendar_cat.cat_id where day='$da' and month='$mo' and year='$ye' and approved='1' order by title ASC\";\n$result = mysql_query($query);\n\n// als ask = volgende dag...\nif (!$ask || $ask == \"nd\"){\n // bepaal maand en jaar voor previous (moet nu al, anders mix up !)\n $ymo = $mo;\n $yy = $ye;\n // als next is, optellen\n if ($next){\n $ok = 86400*$next;\n $da = date(\"j\",time()+ $ok);\n $next++;\n }\n // geen next, dag is vandag, dus maar 1 keer vermenigvuldigen\n else {\n $da = date(\"j\",time()+86400);\n $next = '2';\n }\n\n // vars voor volgende dag\n // nieuwe dag = 1, maand stijgt\n if ($da == \"1\")\n $mo++;\n // nieuwe maand = dertien, jaar stijgt\n if ($mo == \"13\"){\n $mo = '1';\n $ye += 1;\n }\n // vars voor vorige dag (als die er is natuurlijk)\n // dag\n if ($prev){\n if ($prev != \"O\"){\n $ok = 86400*$prev;\n $yda = date(\"j\",time()+$ok);\n $prev++;\n }\n else {\n $yda = date(\"j\");\n $prev = '1';\n }\n }\n else {\n $prev = 'O';\n }\n // nieuwe dag = 2, maand stijgt\n if ($da == \"2\")\n $ymo--;\n if ($ymo == \"0\")\n $ymo = '12';\n //als nieuwe dag gelijk aan 2 en nieuwe maand gelijk aan 1: jaar +1 pd-vars +1\n if ($da == \"2\" && $ymo == \"1\"){\n $yy -= 1;\n }\n // dag 31 & maand 12 = jaar beneden\n if ($yda == \"31\" && $ymo == \"12\")\n $yy -= 1;\n\n // vorige dag link, als next 2 is = vandaag op scherm, dus geen vorige dag (what's the use eh :)\n if ($next != \"2\")\n echo \"<a href=\\\"calendar.php?op=day&ask=pd&da=$yda&mo=$ymo&ye=$yy&next=$next&prev=$prev\\\"><== \".translate(\"prevday\").\"</a> - \";\n // link naar volgende dag\n echo \"<a href=\\\"calendar.php?op=day&ask=nd&da=$da&mo=$mo&ye=$ye&next=$next&prev=$prev\\\">\".translate(\"nextday\").\" ==></a><br><br>\";\n\n}\n\n// als ask = vorige dag ...\nif ($ask == \"pd\"){\n\n // bepaal maand en jaar voor previous (moet nu al, anders mix up !)\n $ymo = $mo;\n $yy = $ye;\n // next -> optellen\n $next -= 2;\n $ok = 86400*$next;\n $da = date(\"j\",time()+ $ok);\n $next++;\n // vars voor volgende dag\n // nieuwe dag = 1, maand daalt\n if ($da == \"2\")\n $mo--;\n // nieuwe maand = dertien, jaar daalt\n if ($mo == \"0\"){\n $mo = '12';\n $ye -= 1;\n }\n if ($da == \"2\" && $mo == \"13\")\n $mo = \"1\";\n // vars voor vorige dag (als die er is natuurlijk)\n // dag\n $prev -=2;\n if ($prev == \"0\")\n $prev == \"1\";\n $ok = 86400*$prev;\n $yda = date(\"j\",time()+$ok);\n $prev++;\n // nieuwe dag = 2, maand daalt\n if ($da == \"2\"){\n $ymo--;\n $mo++;\n }\n if ($da == \"1\")\n $mo++;\n if ($ymo == \"13\"){\n $ymo = '1';\n $yy -= 1;\n }\n if ($ymo == \"0\")\n $ymo = '12';\n // nieuwe maand = twaalf, jaar daalt\n if ($yda == \"31\" && $ymo == \"12\"){\n $yy -= 1;\n $mo = '1';\n $ye += 1;\n }\n if ($yda == \"30\" && $ymo == \"12\"){\n $mo = '1';\n $ye += 1;\n }\n // als next gelijk is aan twee, dan is prev = O\n if ($next == \"2\")\n $prev ='O';\n\n // vorige dag link, als next 2 is = vandaag op scherm, dus geen vorige dag (what's the use eh :)\n if ($next != \"2\")\n echo \"<a href=\\\"calendar.php?op=day&ask=pd&da=$yda&mo=$ymo&ye=$yy&next=$next&prev=$prev\\\"><== \".translate(\"prevday\").\"</a> - \";\n\t\t// link naar volgende dag\n\t\techo \"<a href=\\\"calendar.php?op=day&ask=nd&da=$da&mo=$mo&ye=$ye&next=$next&prev=$prev\\\">\".translate(\"nextday\").\" ==></a><br><br>\";\n\n}\n// beeld de zaken af van de gevraagde dag\n while ($row = mysql_fetch_object($result)){\n echo \"<li><b><U>\".$row->title.\"</u></b><br>\";\n echo translate(\"cat\").\" : \".$row->cat_name.\"<br>\";\n $de = str_replace(\"<br>\",\"\",$row->description);\n $de = str_replace(\"<br />\",\"\",$row->description);\n echo substr(stripslashes($de),0,100).\" ...\";\n echo \"<br>\";\n if ($popupevent == 1)\n echo \"<a href=\\\"#\\\" onclick=\\\"MM_openBrWindow('cal_popup.php?op=view&id=\".$row->id.\"','Calendar','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=\".$popupeventwidth.\",height=\".$popupeventheight.\"')\\\">\";\n else\n echo \"<a href=calendar.php?op=view&id=\".$row->id.\">\";\n echo translate(\"readmore\").\"</a>\";\n echo \"<br><br>\";\n }\nif ($searchdayok == 1)\n\tsearch();\n}\nelse{\n echo translate(\"disabled\");\n}\n}", "function admin_summary() {\r\n $fields = date_api_fields($this->definition['base']);\r\n if (!empty($this->options['date_fields'])) {\r\n $output = array();\r\n foreach ($this->options['date_fields'] as $field) {\r\n $output[] = $fields['name'][$field]['label'];\r\n }\r\n return implode('<br />'. $this->options['date_method'] .' ', $output);\r\n }\r\n else {\r\n return parent::admin_summary();\r\n }\r\n }", "function modifyDate($mode, $date, $amount);", "function fecha($name, $boton, $obligatorio, $mensaje) {\n echo \"<script type='text/javascript'>\";\n echo \"\n\t\t\tCalendar.setup({\n inputField : '\" . $name . \"', // id of the input field\n ifFormat : '%d-%m-%Y', // format of the input field\n button : '\" . $boton . \"', // trigger for the calendar (button ID)\n align : 'B2', // alignment (defaults to 'Bl')\n singleClick : true\n \t});\n\t\t\";\n echo \"var \" . $name . \" = new LiveValidation('\" . $name . \"');\";\n if ($obligatorio):\n echo \"$name.add( Validate.Presence);\";\n endif;\n if (empty($mensaje)):\n echo \"$name.add( Validate.Fecha );\";\n else:\n echo \"$name.add( Validate.Fecha, {failureMessage: '$mensaje!'} );\"; //asi es komo se ponen mensajes personalizados\n endif;\n echo \"</script>\";\n }", "public function run() {\n\t\tlist($name, $id) = $this->resolveNameID();\n\t\tif($this->hasModel()){\n\t\t\t$dateTime = $this->model->getAttribute($this->attribute);\n\t\t}else{\n\t\t\t$dateTime = $this->value;\n\t\t}\n\t\t$dateTime = explode(' ',$dateTime);\n\t\t$inputDate = $dateTime[0];\n\n\t\t$dateDay = $dateMonth = $dateYear = null;\n\t\t// Explodes the date into its various parts.\n\t\tif ($inputDate && $inputDate != '0000-00-00') {\n\t\t\t$date = explode('-', $inputDate);\n\t\t\t$dateDay = $date[2];\n\t\t\t$dateMonth = $date[1];\n\t\t\t$dateYear = $date[0];\n\t\t}\n\n\t\t// The visible part of the application.\n\n\t\t$day_field = CHtml::textField($id . '_day', $dateDay, array(\n\t\t\t\t\t'class' => $id . ' datePickerDay',\n\t\t\t\t\t'maxlength' => 2,\n\t\t\t\t\t'style' => 'width:20px;margin-right:4px;',\n\t\t\t\t\t'placeholder'=>'DD',\n\t\t\t\t));\n\t\t$month_field = CHtml::textField($id . '_month', $dateMonth, array(\n\t\t\t\t\t'class' => $id . ' datePickerMonth',\n\t\t\t\t\t'maxlength' => 2,\n\t\t\t\t\t'style' => 'width:25px;;margin-right:4px;',\n\t\t\t\t\t'placeholder'=>'MM',\n\t\t\t\t));\n\t\t$year_field = CHtml::textField($id . '_year', $dateYear, array(\n\t\t\t\t\t'class' => $id . ' datePickerYear',\n\t\t\t\t\t'size' => 6,\n\t\t\t\t\t'maxlength' => 4,\n\t\t\t\t\t'style' => 'width:35px;',\n\t\t\t\t\t'placeholder'=>'YYYY',\n\t\t\t\t));\n\n\t\techo '<div id=\"' . $id . '_box\" style=\"overflow:hidden\">';\n\t\techo '<div style=\"float:left;margin-right:4px;\">' . $day_field . '<span>/</span></div>';\n\t\techo '<div style=\"float:left;margin-right:4px;\">' . $month_field . '<span>/</span></div>';\n\t\techo '<div style=\"float:left;margin-right:5px;\"\">' . $year_field . '</div>';\n\t\techo '<a href=\"#\" style=\"display:inline-block;margin-top:4px\" id=\"' . $id . '_btn\"><span class=\"icon fam-calendar\"></span></a>';\n\t\techo '</div>';\n\n\t\t$this->widget('zii.widgets.jui.CJuiDatePicker', array(\n\t\t\t'name' => $name,\n\t\t\t// additional javascript options for the date picker plugin\n\t\t\t'options' => array(\n\t\t\t\t'showAnim' => $this->showAmim,\n\t\t\t\t'dateFormat' => 'yy-mm-dd',\n\t\t\t\t'onSelect' => 'js:function(dateText) {\n\t\t\t\t\tvar fullDate = $(\"#' . $id . '\").datepicker(\"getDate\");\n\t\t\t\t\tvar day1 = nii.leadingZeros(fullDate.getDate(),2);\n\t\t\t\t\tvar month1 = nii.leadingZeros(fullDate.getMonth() + 1,2);\n\t\t\t\t\tvar year1 = fullDate.getFullYear();\n\t\t\t\t\t$(\"#' . $id . '_day\").val(day1);\n\t\t\t\t\t$(\"#' . $id . '_month\").val(month1);\n\t\t\t\t\t$(\"#' . $id . '_year\").val(year1);\n\t\t\t\t\t//$(\"#' . $id . '_box label.inFieldLabel\").hide();\n\t\t\t\t}',\n\t\t\t),\n\t\t\t'htmlOptions' => array(\n\t\t\t\t'style' => 'visibility:hidden;height:0px;margin:-10px 0 0;display:block',\n\t\t\t\t'class' => $id,\n\t\t\t),\n\t\t\t'value' => $inputDate\n\t\t));\n\n\n\t\tYii::app()->clientScript->registerScript($this->getId(), '$(\".' . $id . '\").change(function() {\n\t\t\t\tvar day = $(\"#' . $id . '_day\").val();\n\t\t\t\tvar month = $(\"#' . $id . '_month\").val();\n\t\t\t\tvar year = $(\"#' . $id . '_year\").val();\n\t\t\t\tif (day && month && year) {\n\t\t\t\t\tvar newDate = year+\"-\"+month+\"-\"+day;\n\t\t\t\t\t$(\"#' . $id . '\").datepicker(\"setDate\",newDate);\n\t\t\t\t} else if (!day && !month && !year) {\n\t\t\t\t\t$(\"#' . $id . '\").datepicker(\"setDate\",null);\n\t\t\t\t}\n\t\t\t});\n\t\t\t$(\"#' . $id . '_btn\").click(function(){\n\t\t\t\t$(\"#' . $id . '\").datepicker(\"show\");\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\t$(\"#' . $id . '_day\").keyup( function(e) {\n\t\t\t\tvar limit = $(this).attr(\"maxlength\");\n\t\t\t\tvar text = $(this).val();\n\t\t\t\tvar chars = text.length;\n\t\t\t\tif(chars >= limit){\n\t\t\t\t\tif (e.keyCode == 16 || e.keyCode == 9) { return false; }\n\t\t\t\t\t$(\"#' . $id . '_month\").focus();\n\t\t\t\t}\n\t\t\t});\n\t\t\t$(\"#' . $id . '_month\").keyup( function(e) {\n\t\t\t\tvar limit = $(this).attr(\"maxlength\");\n\t\t\t\tvar text = $(this).val();\n\t\t\t\tvar chars = text.length;\n\t\t\t\tif(chars >= limit){\n\t\t\t\t\tif (e.keyCode == 16 || e.keyCode == 9) { return false; }\n\t\t\t\t\t$(\"#' . $id . '_year\").focus();\n\t\t\t\t}\n\t\t\t});\n\t\t\t'\n\t\t);\n\t}", "function InterpretCalendarFunctions(){\n //clean our inputs\n $this->CleanInputs();\n if(array_key_exists('presentmonth',$this->arrPOST) && array_key_exists('monthaction',$this->arrPOST)){\n //we're changing the month\n if($this->arrPOST['monthaction'] == 'next'){\n if($this->arrPOST['presentmonth'] == 12){\n $this->intMonth = 1;\n $this->intYear = ($this->arrPOST['presentyear'] + 1);\n }\n else\n $this->intMonth = ($this->arrPOST['presentmonth'] + 1);\n }\n else if($this->arrPOST['monthaction'] == 'previous'){\n if($this->arrPOST['presentmonth'] == 1){\n $this->intMonth = 12;\n $this->intYear = ($this->arrPOST['presentyear'] - 1);\n }\n else\n $this->intMonth = ($this->arrPOST['presentmonth'] - 1);\n }\n else{\n //load our previous values\n if((int)$this->arrPOST['presentmonth'] > 0)\n $this->intMonth = ($this->arrPOST['presentmonth']);\n if((int)$this->arrPOST['presentyear'] > 0)\n $this->intYear = ($this->arrPOST['presentyear']);\n }\n }\n else{//make our defaults\n if($this->intMonth === 0)\n $this->intMonth = date('m') ;\n if($this->intDay === 0)\n $this->intDay = date('j') ;\n }\n //execute our calendar actions\n if(array_key_exists('calendaraction',$this->arrPOST)){\n $arrCalendarData = json_decode($this->arrPOST['actiondata'],TRUE);\n //clean up our data\n $arrCalendarData = $this->CleanActionData($arrCalendarData);\n //execute\n if($this->arrPOST['calendaraction'] == 'comparedates'){\n $this->CompareDates($arrCalendarData);\n }\n if($this->arrPOST['calendaraction'] == 'adddates'){\n $this->AddSelectedDates($arrCalendarData);\n }\n if($this->arrPOST['calendaraction'] == 'nowtillthen'){\n $this->GetTheTillNow($arrCalendarData);\n }\n }\n }", "function CIR_setDateAndTimeTemorarily()\n{\n\t$date = date('mdHiY.s');\n\techo(\"\\ndate $date\\n\");\n}", "function drawOptionAllProject() { \r\n global $projectDate;?> \r\n <span title=\"<?php echo i18n(\"projectDate\")?>\" dojoType=\"dijit.form.CheckBox\"\r\n type=\"checkbox\" id=\"projectDate\" name=\"projectDate\" class=\"whiteCheck\"\r\n <?php if ($projectDate) {echo 'checked=\"checked\"'; } ?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('projectDate',((this.checked)?'1':'0'));\r\n var now = formatDate(new Date());\r\n if (this.checked == false) {\r\n //dojo.setAttr('startDatePlanView', 'value', date.toLocaleDateString());\r\n dijit.byId('startDatePlanView').set(\"value\",now);\r\n enableWidget(\"startDatePlanView\");\r\n enableWidget(\"endDatePlanView\");\r\n enableWidget(\"listSaveDates\");\r\n } else {\r\n dijit.byId('startDatePlanView').reset();\r\n dijit.byId('endDatePlanView').reset();\r\n dijit.byId('listSaveDates').set('checked', false);\r\n disableWidget(\"startDatePlanView\");\r\n disableWidget(\"endDatePlanView\");\r\n disableWidget(\"listSaveDates\");\r\n }\r\n refreshJsonPlanning();\r\n </script>\r\n </span>\r\n <span for=\"projectDate\"><?php echo i18n(\"projectDate\");?></span>\r\n<?php \r\n}" ]
[ "0.5917911", "0.580177", "0.5774291", "0.5772451", "0.5765203", "0.57464576", "0.56581205", "0.5607564", "0.5486344", "0.548297", "0.54729545", "0.5466339", "0.54312253", "0.54105157", "0.5367814", "0.5366112", "0.53398126", "0.53395337", "0.53387785", "0.53224725", "0.53220177", "0.53189677", "0.53140664", "0.5307944", "0.5293031", "0.529062", "0.52905905", "0.52897835", "0.5284945", "0.5270801", "0.52659345", "0.5257698", "0.5247124", "0.52455026", "0.52362037", "0.522086", "0.52172214", "0.5213866", "0.5209905", "0.51991946", "0.5155499", "0.51470107", "0.5144956", "0.5143917", "0.51408273", "0.513951", "0.51364803", "0.5124404", "0.5111153", "0.51082295", "0.50717753", "0.50673735", "0.5056368", "0.50495774", "0.5047713", "0.5032452", "0.5030048", "0.502562", "0.5025535", "0.5023685", "0.50062436", "0.50039965", "0.5000282", "0.4990724", "0.49893686", "0.4973198", "0.4971274", "0.49709156", "0.49653822", "0.4963266", "0.49603307", "0.49590552", "0.49574104", "0.49555057", "0.49554437", "0.49453655", "0.49451837", "0.4942255", "0.49411488", "0.49410972", "0.49295527", "0.49031994", "0.4902471", "0.48993316", "0.48992348", "0.48980877", "0.48968107", "0.48953155", "0.48946518", "0.48858032", "0.4883813", "0.48824275", "0.48818842", "0.48814768", "0.48811853", "0.4879359", "0.4879084", "0.48768482", "0.48620296", "0.48567444" ]
0.6345225
0
Return an array of the modules needed by this wizard.
function date_tools_wizard_required_modules($options = array()) { $options = date_tools_wizard_options($options); $modules = array( 'date_timezone', 'date_api', 'content', 'date', 'calendar', 'views', 'views_ui', ); if (in_array('popups', $options)) { $modules = array_merge($modules, array('date_popup', 'jcalendar')); } if (in_array('repeat', $options)) { $modules = array_merge($modules, array('date_repeat')); } return $modules; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModules()\n {\n return array();\n }", "public function getModules();", "public function getModules();", "public function getModules() {\n }", "public function getModules() : array\n {\n if ($this->checkModules()) {\n return $this->modules();\n }\n\n return [];\n }", "public function getLoadedModules() {}", "public function getModules() {\n return $this->modules;\n }", "public function getModules()\n {\n return $this['module.list'];\n }", "public function getModules()\n {\n return $this->modules;\n }", "public function getModules()\n {\n return $this->modules;\n }", "public function getModules()\n {\n return $this->modules;\n }", "protected function getModuleComponents() {\n\t return [\n\t ];\n\t}", "public static function getModules()\n {\n $modules = [];\n $modules[] = new D2UModule('20-1',\n 'D2U Adressen - Adressausgabe',\n 10);\n $modules[] = new D2UModule('20-2',\n 'D2U Adressen - Kontaktbox',\n 5);\n $modules[] = new D2UModule('20-3',\n 'D2U Adressen - Weltkarte',\n 1);\n return $modules;\n }", "public function getModulesList();", "function forminator_get_modules() {\n\t$forminator = Forminator_Core::get_instance();\n\n\treturn $forminator->modules;\n}", "protected function installedModules()\n {\n $model = Pi::model('module');\n $select = $model->select()\n ->columns(array('dir' => new Expression('DISTINCT directory')));\n $rowset = $model->selectWith($select);\n $modules = array();\n foreach ($rowset as $row) {\n $modules[] = $row->dir;\n }\n\n return $modules;\n }", "public function getAllModules()\n\t{\n\t\treturn $this->modules;\n\t}", "public static function getAllModules()\n\t\t{\n\n\t\t\t$modules = array();\n\n\t\t\treturn apply_filters( 'studiorum_modules', $modules );\n\n\t\t}", "public static function availableModules() {\n\t\t$children = array();\n\t\tforeach(get_declared_classes() as $class){\n\t\t if(is_subclass_of((string)$class, 'WorkflowCategory')) {\n\t\t\t\t$children[] = $class;\n\t\t\t}\n\t\t}\n\t\t//This was the old method we shouldn't need this any longer\n\t\t$modules = self::$registeredModules;\n\t\t$children = $modules;\n\t\t//print_r($children);\n\t\treturn $children;\n\t}", "public function getIncludedModules ();", "public function getModules()\n {\n $oxidConfig = oxConfig::getInstance();\n $modules = $oxidConfig->getShopConfVar('aModules');\n $moduleList = array();\n foreach ($modules as $oxidClass => $module) {\n $moduleList[$oxidClass] = explode('&', $module);\n }\n\n return $moduleList;\n }", "public function getLoadedModules()\n\t{\n\t\treturn $this->loadedModules;\n\t}", "function qa_list_modules_info()\n{\n\tglobal $qa_modules;\n\treturn $qa_modules;\n}", "private function listModules() {\n\t\t\n\t\t$tabModules = array ();\n\t\t\n\t\t# search for modules in {appPath}/lib/modules/{module_name}/{module_name}.class.php\n\t\t$res = opendir(LIB_MOD);\n\t\t$i = 0;\n\t\twhile (false !== ($fModule = readdir($res))) {\n\t\t\tif (is_dir(LIB_MOD . $fModule) && $fModule != '.' && $fModule != '..') {\n\t\t\t\tif (is_file(LIB_MOD . $fModule .'/'. $fModule .'.class.php')) {\n\t\t\t\t\t$tabModules[$i]['name'] = $fModule;\n\t\t\t\t\t$tabModules[$i]['link'] = $this->conf['general']['appURL'] .'?action='. $fModule .'.show';\n\t\t\t\t\t++$i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($res);\n\t\t$ret = array (\n\t\t\t'modules'\t=> $tabModules\n\t\t);\n\t\t\n\t\treturn $ret;\n\t}", "function getModules() {\n // transverse component directory\n $files = scandir($this->componentDir, 1);\n $dirs = [];\n\n // find all directories\n foreach ($files as $file) {\n if (($file != \".\") && ($file != \"..\") && is_dir($this->componentDir . DIRECTORY_SEPARATOR . $file)) {\n array_push($dirs, $this->getModule($file));\n }\n }\n\n // remember the structure within the module\n $this->modules = $dirs;\n\n return $dirs;\n }", "public function listModules(): array\n {\n if ($this->listModulesCache !== null) {\n return $this->listModulesCache;\n }\n\n // Check manifest\n if (Manifest::has(self::MANIFEST_MODULES)) {\n return (array) Manifest::get(self::MANIFEST_MODULES);\n }\n\n $loadModules = Config::get('system.load_modules');\n\n // Lazy\n if (!$loadModules) {\n $foundModules = [];\n foreach (File::directories(base_path('modules')) as $dir) {\n $foundModules[] = ucfirst(basename($dir));\n }\n\n $result = $foundModules;\n }\n // Eager\n elseif (is_array($loadModules)) {\n $result = $loadModules;\n }\n else {\n $result = array_map('trim', explode(',', (string) $loadModules));\n }\n\n // System comes first\n $result = array_unique(array_merge(['System'], $result));\n\n // Store result\n Manifest::put(self::MANIFEST_MODULES, $result);\n\n return $this->listModulesCache = $result;\n }", "public function all()\n {\n return $this->modules;\n }", "public function getLoadedModules() {\n return $this->modules_loaded;\n }", "function getModules()\n\t{\n\t\t $this->loadModel('Module'); \n\n\t\t $sections = $this->Module->query(\"SELECT * FROM modules WHERE enable = '1'\");\n\t\t return $sections;\n\t}", "public function getModuleDependencies()\n {\n return [\n 'Core42',\n 'Admin42',\n ];\n }", "public static function getModules(){ \n $db = new db();\n $db->connect();\n $modules = $db->selectAll('modules');\n return self::getModulesInfo($modules);\n }", "public function\n\tgetAvailableModules() : array\n\t{\n\t\t$moduleList_core \t= [];\n\t\t$moduleList_mantle \t= [];\n\n\t\t$procPath = CMS_SERVER_ROOT . DIR_CORE . DIR_MODULES;\n\n\t\tif(file_exists($procPath))\n\t\t{ \n\t\t\t$_dirIterator \t= new DirectoryIterator($procPath);\n\t\t\tforeach($_dirIterator as $_dirItem)\n\t\t\t{\n\t\t\t\tif($_dirItem -> isDot() || $_dirItem -> getType() !== 'dir')\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$directory = $_dirItem -> getFilename();\n\n\t\t\t\tif($directory[0] === '.')\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$moduleFilepath = $procPath . $directory .'/module.json'; \n\n\t\t\t\t$moduleConfig\t= file_get_contents($moduleFilepath);\n\n\t\t\t\tif($moduleConfig === false)\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$moduleConfig = json_decode($moduleConfig);\n\n\t\t\t\t// Determine Scheme\n\n\t\t\t\t$pModulesInstall = new CModulesInstall;\n\n\t\t\t\t$moduleData = $pModulesInstall -> getModuleData($moduleConfig, $directory, 'core');\n\n\t\t\t\tif($moduleData === false)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$moduleData = json_decode(json_encode($moduleData));\n\n\t\t\t\t$moduleData -> module -> module_location = $directory;\n\n\t\t\t\t$moduleList_core[]\t= $moduleData;\n\t\t\t}\n\t\t}\n\n\t\t$procPath = CMS_SERVER_ROOT . DIR_MANTLE . DIR_MODULES;\n\n\t\tif(file_exists($procPath))\n\t\t{ \n\t\t\t$_dirIterator \t= new DirectoryIterator($procPath);\n\t\t\tforeach($_dirIterator as $_dirItem)\n\t\t\t{\n\t\t\t\tif($_dirItem -> isDot() || $_dirItem -> getType() !== 'dir')\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$directory = $_dirItem -> getFilename();\n\n\t\t\t\tif($directory[0] === '.')\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$moduleFilepath = $procPath . $directory .'/module.json'; \n\n\t\t\t\t$moduleConfig\t= file_get_contents($moduleFilepath);\n\n\t\t\t\tif($moduleConfig === false)\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$moduleConfig = json_decode($moduleConfig);\n\n\t\t\t\t// Determine Scheme\n\n\t\t\t\t$pModulesInstall = new CModulesInstall;\n\n\t\t\t\t$moduleData = $pModulesInstall -> getModuleData($moduleConfig, $directory, 'mantle');\n\n\t\t\t\tif($moduleData === false)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$moduleData = json_decode(json_encode($moduleData));\n\n\t\t\t\t$moduleData -> module -> module_location = $directory;\n\n\t\t\t\t$moduleList_mantle[]\t= $moduleData;\n\t\t\t}\n\t\t}\n\n\t\t$availableList = [];\n\n\t\tforeach($moduleList_core as $dirModuleKey => $dirModuleItem)\n\t\t{\n\t\t\t$moduleInstalled = false;\n\n\n\t\t\tif(!isset($dirModuleItem -> module -> module_controller))\n\t\t\t{\n\t\t\t\t#tk::dbug($dirModuleItem);\n\n\t\t\t\t// aaaooohhh well ... this should not be\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach($this -> modulesList as $listItem)\n\t\t\t{\n\t\t\t\tif($listItem -> module_controller === $dirModuleItem -> module -> module_controller)\n\t\t\t\t{\n\t\t\t\t\t$moduleInstalled = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($moduleInstalled)\n\t\t\t\tcontinue;\n\n\t\t#\t$dirModuleItem -> module_type = \"core\";\n\n\t\t\t$availableList[] = $dirModuleItem;\n\t\t}\n\n\t\tforeach($moduleList_mantle as $dirModuleKey => $dirModuleItem)\n\t\t{\n\t\t\t$moduleInstalled = false;\n\n\t\t\tforeach($this -> modulesList as $listItem)\n\t\t\t{\n\t\t\t\tif($listItem -> module_controller === $dirModuleItem -> module -> module_controller)\n\t\t\t\t{\n\t\t\t\t\t$moduleInstalled = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($moduleInstalled)\n\t\t\t\tcontinue;\n\n\t\t#\t$dirModuleItem -> module_type \t\t= \"mantle\";\n\n\t\t\t$availableList[] = $dirModuleItem;\n\t\t}\n\n\n\t\treturn $availableList;\n\t}", "private function getInstalledModules()\n\t{\n\t\t$modules = [];\n\t\t$moduleManager = $this->modelManager(Module::class);\n\t\t$builder = $moduleManager->builder();\n\n\t\t$query = $builder->select()\n\t\t\t->from('modules');\n\t\t$installedModules = $builder->execute($query);\n\t\t$installedModules = array_map(function ($class) {\n\t\t\t$class['module_class'] = str_replace('::class', '', $class['module_class']);\n\t\t\treturn $class;\n\t\t}, $installedModules);\n\n\t\tforeach ($installedModules as $installedModule) {\n\t\t\t$module = Module::hydrate($installedModule);\n\t\t\t$modules[] = $module;\n\t\t}\n\t\treturn $modules;\n\t}", "public function getModuleDependencies()\n {\n // See open bug (https://github.com/omeka/omeka-s/issues/868)\n // return ['ZfcTwig'];\n return [];\n }", "public function getEnabledModules()\n {\n return array_filter($this->definitions, [$this, 'filterEnabled']);\n }", "protected function getAllModules()\n {\n return Hook::getHookModuleExecList('displayHeader');\n }", "protected function getModules() {\n\t\t$modules = parent::getModules();\n\t\t\n\t\t// Get only modules with translations\n\t\treturn array_filter($modules, function(Module $module) {\n\t\t\t// Automatically skip un-translateable modules\n\t\t\treturn $module->isTranslatable();\n\t\t});\n\t}", "public static function getLoadedModules()\n {\n return self::$_loadedModules;\n }", "public function publicGetWizards(): array\n {\n return $this->getWizards();\n }", "public static function getModules()\n\t{\n\t\treturn (new \\App\\Db\\Query())->select(['vtiger_tab.tabid', 'vtiger_tab.tablabel', 'tabname' => 'vtiger_tab.name'])->from('vtiger_field')\n\t\t\t->innerJoin('vtiger_tab', 'vtiger_field.tabid = vtiger_tab.tabid')->where(['uitype' => [15, 16, 33, 115], 'vtiger_field.presence' => [0, 2], 'vtiger_tab.presence' => 0])\n\t\t\t->distinct('vtiger_tab.tabid')->orderBy(['vtiger_tab.tabid' => SORT_ASC])->createCommand()->queryAllByGroup(1);\n\t}", "public function getExistingModules() {\n if($this->cache->load(\"existingModules\") !== NULL) {\n return $this->cache->load(\"existingModules\");\n }\n else {\n $existingClasses = $this->getClasses();\n $existingModules = array();\n foreach($existingClasses as $fullName => $path)\n {\n $explode = explode(\"\\\\\", $fullName);\n if($explode[0] == \"AdminModule\" && !in_array($explode[1], $existingModules) && preg_match(\"~[a-zA-Z]+Module~\",$explode[1]) !== 0) {\n $path = pathinfo($path, PATHINFO_DIRNAME);\n $path = str_replace(\"/presenters\", \"\", $path);\n $path = str_replace(\"\\presenters\", \"\", $path);\n $existingModules[$path] = $explode[1];\n }\n }\n $this->cache->save(\"existingModules\", $existingModules);\n return $existingModules;\n }\n }", "public function getModulesInMigrationOrder(): array;", "static function get_all_available_modules()\n {\n $result = array();\n\n $categories = self::get_all_available_categories();\n\n foreach ($categories as $nome_categoria)\n {\n $names = self::get_all_available_by_category($nome_categoria);\n\n if (is_array($names))\n foreach ($names as $nome_modulo)\n {\n $def = self::get_available_module_definition($nome_categoria,$nome_modulo);\n \n $mod = array();\n $mod[\"show\"] = $def->get_show();\n $mod[\"nome_categoria\"] = $nome_categoria;\n $mod[\"nome_modulo\"] = $nome_modulo;\n $version = $def->get_current_version();\n $mod[\"properties\"] = $version;\n $result[] = $mod;\n \n }\n else echo \"Errore per la categoria : \".$nome_categoria;\n\n }\n\n return $result;\n }", "public function getAllModules()\n {\n $modules = array();\n $query = 'SELECT m.id, m.name, t.name AS theme FROM tl_module m LEFT JOIN tl_theme t ON m.pid=t.id';\n\n if (\\Input::get('table') == 'tl_module' && \\Input::get('act') == 'edit') {\n $query .= ' WHERE m.id != ?';\n }\n\n $query .= ' ORDER BY t.name, m.name';\n $result = \\Database::getInstance()\n ->prepare($query)\n ->execute(\\Input::get('id'));\n\n while ($result->next()) {\n $modules[$result->theme][$result->id] = $result->name . ' (ID ' . $result->id . ')';\n }\n\n return $modules;\n }", "public function get_installed_modules()\n\t{\n\t\tif ( ! is_array($this->installed_modules))\n\t\t{\n\t\t\t$this->installed_modules = array();\n\n\t\t\tee()->db->select('LOWER(module_name) AS name');\n\t\t\tee()->db->order_by('module_name');\n\t\t\t$query = ee()->db->get('modules');\n\n\t\t\tif ($query->num_rows())\n\t\t\t{\n\t\t\t\tforeach($query->result_array() as $row)\n\t\t\t\t{\n\t\t\t\t\t$this->installed_modules[$row['name']] = $row['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->installed_modules;\n\t}", "public function getModules() {\n if($this->_Modules === NULL) {\n $this->_Modules = array();\n $dir = opendir('modules');\n while ($cnt = readdir($dir)) {\n if ($cnt == '.' || $cnt == '..') {\n continue;\n }\n $configFile = \"modules/$cnt/module.json\";\n if (!is_file($configFile)) {\n continue;\n }\n $json_data = file_get_contents($configFile);\n $config = json_decode($json_data, true);\n $config[\"folder\"] = \"modules/$cnt\";\n $config[\"config\"] = file_exists(\"modules/$cnt/config.php\") === true;\n $this->_Modules[$config['code']] = $config;\n }\n closedir($dir); \n }\n return $this->_Modules;\n }", "public function workflowModules() {\n \t$out = '';\n \t$modules = Application::availableModules();\n \tforeach($modules as $module) {\n \t\t$out .= \"[\\\"\".$module.\"\\\"], \";\n \t}\n \treturn substr($out, 0, -2);\n }", "final public function moduleNames(): array {\n\t\treturn $this->modules->keys();\n\t}", "public function getSupportedModules()\n {\n return $this->supportedModules;\n }", "public function getModules(){\n $qb = $this->createQueryBuilder();\n $qb->module('system')->query('modulelist');\n return $this->execute($qb);\n }", "public function getDirectoryModules();", "public static function modules()\n {\n return static::$modules ?: static::$modules = new Modules;\n }", "protected function blankModule(): array\n {\n return [\n BswModule\\Menu\\Module::class => ['sort' => Abs::MODULE_MENU_SORT],\n BswModule\\Header\\Module::class => ['sort' => Abs::MODULE_HEADER_SORT],\n BswModule\\Crumbs\\Module::class => ['sort' => Abs::MODULE_CRUMBS_SORT, 'crumbs' => $this->crumbs],\n BswModule\\Tabs\\Module::class => ['sort' => Abs::MODULE_TABS_SORT],\n BswModule\\Welcome\\Module::class => ['sort' => Abs::MODULE_WELCOME_SORT],\n BswModule\\Operate\\Module::class => ['sort' => Abs::MODULE_OPERATE_SORT],\n BswModule\\Footer\\Module::class => ['sort' => Abs::MODULE_FOOTER_SORT],\n BswModule\\Modal\\Module::class => ['sort' => Abs::MODULE_MODAL_SORT],\n BswModule\\Drawer\\Module::class => ['sort' => Abs::MODULE_DRAWER_SORT],\n BswModule\\Result\\Module::class => ['sort' => Abs::MODULE_RESULT_SORT],\n ];\n }", "public function get_act_modules()\n {\n return $this->active_modules;\n }", "public function getAvailableModules(string $module): array;", "public function getDependencies()\n {\n return array(\n new ModuleDependency('files'),\n new ModuleDependency('user'),\n new ModuleDependency('db'),\n new ModuleDependency('orm'),\n new ModuleDependency('scriptcollector'),\n new ModuleDependency('search'),\n new ModuleDependency('word')\n );\n }", "public function getModules()\n {\n return [\n new LayoutModule(DefaultLayout::class)\n ];\n }", "function qa_list_modules($type)\n{\n\t$modules = qa_list_modules_info();\n\treturn is_array(@$modules[$type]) ? array_keys($modules[$type]) : array();\n}", "public static function modules() {\n\t\tif (!isset(self::$_modules)) {\n//\t\t\tif(\\GO::user()){\n//\t\t\t\n//\t\t\tCaching caused more problems than benefits\n//\t\t\t\n//\t\t\t\tif(isset(\\GO::session()->values['modulesObject']) && !isset($GLOBALS['GO_CONFIG'])){\n//\t\t\t\t\tself::$_modules=\\GO::session()->values['modulesObject'];\n//\t\t\t\t}else{\n//\t\t\t\t\tself::$_modules=\\GO::session()->values['modulesObject']=new \\GO\\Base\\ModuleCollection();\n//\t\t\t\t}\n//\t\t\t}else\n//\t\t\t{\n//\t\t\t\tself::$_modules=new \\GO\\Base\\ModuleCollection();\n//\t\t\t}\n\t\t\t\n\t\t\tself::$_modules=new \\GO\\Base\\ModuleCollection();\n\t\t}\n\t\treturn self::$_modules;\n\t}", "public function getModuleNames()\r\n {\r\n return $this->_moduleNames;\r\n }", "public function getRequireJsModules(): array\n {\n return $this->requireJsModules;\n }", "private function getAllModulesOfProject()\n {\n return $this->modulesRegistry->getModules();\n }", "public function getReaderModules()\n {\n $arrModules = [];\n $objModules = $this->Database->execute(\n \"SELECT m.id, m.name, t.name AS theme FROM tl_module m LEFT JOIN tl_theme t ON m.pid=t.id WHERE m.type LIKE 'newsreader%' ORDER BY t.name, m.name\"\n );\n\n while ($objModules->next())\n {\n $arrModules[$objModules->theme][$objModules->id] = $objModules->name . ' (ID ' . $objModules->id . ')';\n }\n\n return $arrModules;\n }", "public function getAll()\n {\n $this->_modules['core'][] = array (\n 'module' => 'Magento',\n 'codePool' => 'core',\n 'active' => 'true',\n 'version' => Mage::getVersion()\n );\n\n foreach (Mage::getConfig()->getModuleConfig() as $node) {\n foreach ($node as $module => $data) {\n if (!isset($data->codePool)) {\n continue;\n }\n $codePool = $data->codePool->asArray();\n if (empty($codePool)) {\n continue;\n }\n if (is_array($codePool)) {\n $codePool = implode('.', $codePool);\n }\n\n $this->_modules[$codePool][] = array (\n 'module' => $module,\n 'codePool' => $codePool,\n 'active' => $data->active,\n 'version' => $data->version\n );\n }\n }\n\n return $this->_modules;\n }", "protected function getModulesData() {}", "public function getExcludedModules ();", "public function getModule()\n\t{\n\t\t$arrReturn = array();\n\t\t$objThemes = $this->Database->query('SELECT * FROM tl_theme');\n\t\t\n\t\twhile ($objThemes->next())\n\t\t{\n\t\t\t$objThemeModules = $this->Database->prepare('SELECT id,name,type FROM tl_module WHERE pid=?')\n\t\t\t\t\t\t\t\t\t\t\t ->executeUncached($objThemes->id);\n\n\t\t\t$arrTemp = array();\n\t\t\twhile($objThemeModules->next())\n\t\t\t{\n\t\t\t\t$arrTemp[$objThemeModules->id] = $objThemeModules->name . ' <span style=\"color:#b3b3b3; padding-left:3px;\">[' . $GLOBALS['TL_LANG']['FMD'][$objThemeModules->type][0] . ']</span>';\n\t\t\t}\n\n\t\t\t$arrReturn[$objThemes->name] = $arrTemp;\n\t\t\tunset($arrTemp);\n\t\t}\n\t\t\n\t\treturn $arrReturn;\n\t}", "public function availableAction()\n {\n $modules = array();\n //$modulesInstalled = $this->installedModules();\n $iterator = new \\DirectoryIterator(Pi::path('module'));\n foreach ($iterator as $fileinfo) {\n if (!$fileinfo->isDir() || $fileinfo->isDot()) {\n continue;\n }\n $directory = $fileinfo->getFilename();\n if (preg_match('/[^a-z0-9_]/i', $directory)) {\n continue;\n }\n $meta = Pi::service('module')->loadMeta($directory, 'meta');\n if (empty($meta)) {\n continue;\n }\n $author = Pi::service('module')->loadMeta($directory, 'author');\n //$clonable = isset($meta['clonable']) ? $meta['clonable'] : false;\n //$meta['installed'] = in_array($directory, $modulesInstalled);\n $meta['installed'] = Pi::registry('module')\n ->read($directory) ? true : false;\n if (empty($meta['clonable']) && $meta['installed']) {\n continue;\n }\n $meta['logo'] = !empty($meta['logo'])\n ? Pi::url('script/browse.php') . '?'\n . sprintf('module/%s/asset/%s', $directory, $meta['logo'])\n : Pi::url('static/image/module.png');\n $modules[$directory] = array(\n 'meta' => $meta,\n 'author' => $author,\n );\n }\n\n $this->view()->assign('modules', $modules);\n $this->view()->assign('title', __('Modules ready for installation'));\n }", "public function getLoadedModularName() : array\n {\n return $this->loadedModular;\n }", "public function getDefaultModules() {\n\t\t$modules = parent::getDefaultModules();\n\t\t// flush unnecessary modules\n\t\t$modules['content'] = [];\n\n\t\t$modules['top'] = 'skins.minerva.scripts.top';\n\t\t// Define all the modules that should load on the mobile site and their dependencies.\n\t\t// Do not add mobules here.\n\t\t$modules['stable'] = 'skins.minerva.scripts';\n\n\t\t// Doing this unconditionally, prevents the desktop watchstar from ever leaking into mobile view.\n\t\t$modules['watch'] = [];\n\n\t\t$modules['context'] = $this->getContextSpecificModules();\n\n\t\tif ( $this->getSkinOption( self::OPTION_TOGGLING ) ) {\n\t\t\t$modules['toggling'] = [ 'skins.minerva.toggling' ];\n\t\t}\n\t\t$modules['site'] = 'mobile.site';\n\n\t\t// FIXME: Upstream?\n\t\tHooks::run( 'SkinMinervaDefaultModules', [ $this, &$modules ] );\n\t\treturn $modules;\n\t}", "function qa_list_module_types()\n{\n\treturn array_keys(qa_list_modules_info());\n}", "public function installed()\n {\n return $this->installedModules;\n }", "public function getWizardItems() {}", "function getStaticModules () {\n return $this->templateParser->getStaticModules();\n }", "public function getDesignModules()\n {\n $iterator = $this->createFinder()\n ->in($this->getAbsoluteDesignFolder())\n ->directories();\n\n $modules = [];\n foreach ($iterator as $file) {\n \tif(file_exists($file->getRealPath().'/index.ss')) {\n \t$modules[] = new DesignModule($file->getRealPath());\n \t}\n }\n\n return $modules;\n }", "public function loadModules();", "function enabledModules() {\n\n\t\t// get user course\n\t\t$myCourse = Course::whereHas('users', function($query) {\n\t\t\t$query->where('course_role', '1')->where('user_id',$this->id);\n\t\t})->first();\n\n\t\t// gather module list and init array\n\t\t$allModules = Module::all();\n\t\t$modulesList = array();\n\n\t\t// return array of 1s if user is not registered to a course\n\t\tif ($myCourse == null) {\n\t\t\t$modulesList = array_fill(0,count($allModules)+1,1);\n\t\t\treturn $modulesList;\n\t\t}\n\n\t\t// gather list of enabled modules for user course\n\t\t$enabledModules = Module::select(array('id'))->whereHas('courses', function($q) use ($myCourse) {\n\t\t\t$q->where('course_id',$myCourse->id)->where('enabled',1);\n\t\t})->get();\n\n\t\t// generate a full list of modules and \n\t\t$modulesList = array_fill(0,count($allModules),0);\n\t\tforeach ($allModules as $mod) {\n\t\t\t// check if current mod is present in modules\n\t\t\tforeach($enabledModules as $eMod) {\n\t\t\t\tif ($eMod->id == $mod->id) {\n\t\t\t\t\t// add to modules list as 1\n\t\t\t\t\t$modulesList[$mod->id] = 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn $modulesList;\n\n\t}", "public static function getModuleScripts() {\n\t\treturn self::$moduleScripts;\n\t}", "public function getFilterModules()\n {\n $arrModules = [];\n $objModules = $this->Database->execute(\n \"SELECT m.id, m.name, t.name AS theme FROM tl_module m LEFT JOIN tl_theme t ON m.pid=t.id WHERE m.type='newsfilter' ORDER BY t.name, m.name\"\n );\n\n while ($objModules->next())\n {\n $arrModules[$objModules->theme][$objModules->id] = $objModules->name . ' (ID ' . $objModules->id . ')';\n }\n\n return $arrModules;\n }", "public static function get_modules(){\n $parent_modules = self::where('parent','=',0)->get();\n\n $modules = array();\n\n foreach($parent_modules as $p) {\n\n $modules[] = array(\n 'id' => $p->id,\n 'name' => $p->name,\n 'kids' => self::where('parent','=',$p->id)->get()\n );\n\n }//endforeach\n\n \n return $modules;\n \n }", "public function getReaderModules()\n\t{\n\t\t$arrModules = array();\n\t\t$objModules = $this->Database->execute(\"SELECT m.id, m.name, t.name AS theme FROM tl_module m LEFT JOIN tl_theme t ON m.pid=t.id WHERE m.type='newsreader' ORDER BY t.name, m.name\");\n\n\t\twhile ($objModules->next())\n\t\t{\n\t\t\t$arrModules[$objModules->theme][$objModules->id] = $objModules->name . ' (ID ' . $objModules->id . ')';\n\t\t}\n\n\t\treturn $arrModules;\n\t}", "final public function availableConfiguration(): array {\n\t\t$module_paths = $this->application->modulePath();\n\t\t$files = [];\n\t\t/* Walk all non-dot directories, looking for .module.json files */\n\t\t$options = [\n\t\t\tDirectory::LIST_RULE_FILE => [\n\t\t\t\t'#\\.module\\.json$#' => true, false,\n\t\t\t], Directory::LIST_RULE_DIRECTORY_WALK => [\n\t\t\t\t'#/\\.#' => false, true,\n\t\t\t], Directory::LIST_RULE_DIRECTORY => false, Directory::LIST_ADD_PATH => true,\n\t\t];\n\t\tforeach ($module_paths as $module_path) {\n\t\t\ttry {\n\t\t\t\t$files[$module_path] = Directory::listRecursive($module_path, $options);\n\t\t\t} catch (ParameterException) {\n\t\t\t}\n\t\t}\n\t\t$available = [];\n\t\tforeach ($files as $module_files) {\n\t\t\tforeach ($module_files as $module_file) {\n\t\t\t\t$module = trim(StringTools::removePrefix(dirname($module_file), $module_paths), '/');\n\t\t\t\t$available[$module] = $module_file;\n\t\t\t}\n\t\t}\n\t\treturn $available;\n\t}", "public static function getSupportedModules()\n\t{\n\t\treturn Vtiger_Module_Model::getAll([0], ['SMSNotifier', 'OSSMailView', 'Dashboard', 'ModComments', 'Notification'], true);\n\t}", "protected function readModules()\n {\n foreach ($this->moduleList as $vendorName => &$modulesArray) {\n $directoryIterator = new \\DirectoryIterator(\n $this->getAppCodeAbsolutePath() . DIRECTORY_SEPARATOR . $vendorName\n );\n foreach ($directoryIterator as $element) {\n if ($element->isDir()\n && $this->isBaseNameValid($element->getBasename())\n ) {\n $modulesArray[] = $element->getBasename();\n }\n }\n }\n }", "public function getContextSpecificModules() {\n\t\t$modules = [];\n\t\t$user = $this->getUser();\n\t\t$req = $this->getRequest();\n\t\t$action = $req->getVal( 'article_action' );\n\t\t$campaign = $req->getVal( 'campaign' );\n\t\t$title = $this->getTitle();\n\n\t\tif ( !$title->isSpecialPage() ) {\n\t\t\tif ( $this->isAllowedPageAction( 'watch' ) ) {\n\t\t\t\t// Explicitly add the mobile watchstar code.\n\t\t\t\t$modules[] = 'skins.minerva.watchstar';\n\t\t\t}\n\t\t\tif ( $this->isCurrentPageContentModelEditable() ) {\n\t\t\t\t$modules[] = 'skins.minerva.editor';\n\t\t\t}\n\t\t}\n\n\t\tif ( $user->isLoggedIn() ) {\n\t\t\tif ( $this->useEcho() ) {\n\t\t\t\t$modules[] = 'skins.minerva.notifications';\n\t\t\t}\n\n\t\t\tif ( $this->isCurrentPageEditableByUser() ) {\n\t\t\t\tif ( $action === 'signup-edit' || $campaign === 'leftNavSignup' ) {\n\t\t\t\t\t$modules[] = 'skins.minerva.newusers';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// TalkOverlay feature\n\t\tif (\n\t\t\t$this->isUserPage ||\n\t\t\t( $this->isTalkAllowed() || $title->isTalkPage() ) &&\n\t\t\t$this->isWikiTextTalkPage()\n\t\t) {\n\t\t\t$modules[] = 'skins.minerva.talk';\n\t\t}\n\n\t\tif ( $this->hasCategoryLinks() ) {\n\t\t\t$modules[] = 'skins.minerva.categories';\n\t\t}\n\n\t\tif ( $this->getSkinOption( self::OPTION_FONT_CHANGER ) ) {\n\t\t\t$modules[] = 'skins.minerva.fontchanger';\n\t\t}\n\n\t\tif ( $this->getSkinOption( self::OPTION_BACK_TO_TOP ) ) {\n\t\t\t$modules[] = 'skins.minerva.backtotop';\n\t\t}\n\n\t\treturn $modules;\n\t}", "function get_all_modules() {\n return \\melt\\internal\\get_all_modules();\n}", "public static function getModules()\n \t{\n \t\t// Define & init static variables\n \t\tstatic\t$arrModules\t\t\t= NULL;\n \t\tstatic\t$selModules;\n \t\tstatic\t$selModuleConfig;\n \t\tstatic\t$arrCustomerGroups;\n \t\tif (!isset($arrModules))\n \t\t{\n\t \t\t$selModules\t\t\t= new StatementSelect(\"billing_charge_module\", \"*\", \"active_status_id = \".ACTIVE_STATUS_ACTIVE, \"ISNULL(customer_group_id) DESC\");\n\t \t\t$selModuleConfig\t= new StatementSelect(\"billing_charge_module_config\", \"*\", \"billing_charge_module_id = <id>\");\n\t \t\t\n\t \t\t$arrModules\t= Array();\n\t \t\t\n\t \t\t// Get list of CustomerGroups\n\t \t\t$selCustomerGroups\t= new StatementSelect(\"CustomerGroup\", \"Id\", \"1\");\n\t \t\tif ($selCustomerGroups->Execute() === FALSE)\n\t \t\t{\n\t \t\t\tthrow new Exception_Database(\"DB Error: \".$selCustomerGroups->Error());\n\t \t\t}\n\t \t\twhile ($arrCustomerGroup = $selCustomerGroups->Fetch())\n\t \t\t{\n\t \t\t\t$arrModules[$arrCustomerGroup['Id']]['Billing_Charge_Account']\t= Array();\n\t \t\t\t$arrModules[$arrCustomerGroup['Id']]['Billing_Charge_Service']\t= Array();\n\t \t\t\t\n\t \t\t\t$arrCustomerGroups[]\t= $arrCustomerGroup;\n\t \t\t}\n \t\t\t\n\t \t\t// Retrieve all Billing Charge Modules\n\t \t\tif ($selModules->Execute() !== FALSE)\n\t \t\t{\n\t \t\t\twhile ($arrModule = $selModules->Fetch())\n\t \t\t\t{\n\t \t\t\t\t// Instanciate the Class\n\t \t\t\t\t$modModule\t= new $arrModule['class']($arrModule['id']);\n\t \t\t\t\t\n\t \t\t\t\t// Is this Module for All CustomerGroups, or just one?\n\t \t\t\t\tif ($arrModule['customer_group_id'] === NULL)\n\t \t\t\t\t{\n\t \t\t\t\t\t// All CustomerGroups, although this can be overridden later\n\t \t\t\t\t\tforeach ($arrCustomerGroups as $arrCustomerGroup)\n\t \t\t\t\t\t{\n\t \t\t\t\t\t\t$arrModules[$arrCustomerGroup['Id']][get_parent_class($modModule)][get_class($modModule)]\t= $modModule;\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t\telse\n\t \t\t\t\t{\n\t \t\t\t\t\t// Just One CustomerGroup. If there is already an \"All\" Module defined, then override it\n\t \t\t\t\t\t$arrModules[$arrModule['customer_group_id']][get_parent_class($modModule)][get_class($modModule)]\t= $modModule;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tthrow new Exception_Database(\"DB ERROR: \".$selModules->Error());\n\t \t\t}\n \t\t}\n\t \t\n\t\t// Return array of Billing Charge Modules\n\t\treturn $arrModules;\n \t}", "public function getRequiredPlugins() {}", "private function getModules() {\n // @todo Only do a full rebuild of the module cache every 1 at the most\n $modules = system_rebuild_module_data();\n uasort($modules, 'system_sort_modules_by_info_name');\n\n $result = array();\n $keys_to_send = array('name', 'version', 'package', 'core', 'project');\n foreach ($modules as $module) {\n $info = array();\n $info['status'] = $module->status;\n foreach ($keys_to_send as $key) {\n $info[$key] = isset($module->info[$key]) ? $module->info[$key] : '';\n }\n $info['filename'] = $module->getPathname();\n if (empty($info['project']) && $module->origin == 'core') {\n $info['project'] = 'drupal';\n }\n\n // Determine which files belong to this module and hash them.\n $module_path = explode('/', $info['filename']);\n array_pop($module_path);\n\n // We really only care about this module if it is in 'sites' or in\n // 'modules' folder.\n // Otherwise it is covered by the hash of the distro's modules.\n if ($module_path[0] == 'sites' || $module_path[0] == 'modules') {\n $contrib_path = implode('/', $module_path);\n\n // Get a hash for this module's files. If we nest into another module,\n // we'll return. and that other module will be covered by it's entry in\n // the system table.\n //\n // !! At present we aren't going to do a per module hash, but rather a\n // per-project hash. The reason being that it is too hard to tell an\n // individual module apart from a project.\n list($info['module_data']['hashes'], $info['module_data']['fileinfo']) = self::generateHashesHelper($contrib_path);\n }\n else {\n $info['module_data']['hashes'] = array();\n $info['module_data']['fileinfo'] = array();\n }\n\n $result[] = $info;\n }\n return $result;\n }", "public function getModules(DataContainer $dc)\n\t{\n\t\t$arrReturn = array();\n\t\t\n\t\t$objModules = $this->Database->execute(\"SELECT * FROM tl_module WHERE type IN('onepagewebsiteregular','onepagewebsitecustom')\");\n\t\t\n\t\tif($objModules->numRows < 1)\n\t\t{\n\t\t\treturn array(); \n\t\t}\n\t\t\n\t\twhile($objModules->next())\n\t\t{\n\t\t\t$arrReturn[$objModules->id] = $objModules->name. ' <span style=\"color:#b3b3b3\">[id:'.$objModules->id.']</span>';\n\t\t}\n\t\t\n\t\treturn $arrReturn;\n\t}", "public function\n\tgetModules(bool $_onlyFrontend = false) : array\n\t{\n\t\tif($_onlyFrontend)\n\t\t{\n\t\t\t$modulesList = [];\n\n\t\t\tforeach($this -> modulesList as $module)\n\t\t\t{\n\t\t\t\tif(!$module -> is_frontend)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif(!property_exists($module, 'user_rights'))\n\t\t\t\t\t$module -> user_rights = $this -> m_pUserRights -> getModuleRights($module -> module_id);\n\n\t\t\t\tif(!$this -> m_pUserRights -> existsRight($module -> module_id, 'create'))\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$modulesList[] = $module;\n\t\t\t}\n\n\t\t\treturn $modulesList;\n\t\t}\n\n\t\treturn $this -> modulesList;\n\t}", "public function getLoadedModules($loadModules);", "private function findComponentsWhichNeedMigrated(): array\n {\n $aModules = Components::available(false);\n $aOut = [];\n\n foreach ($aModules as $oModule) {\n $oState = $this->determineModuleState($oModule);\n if ($oState->start !== $oState->end) {\n $aOut[] = $oState;\n }\n }\n\n // Shift the app migrations onto the end so they are executed last\n if (!empty($aOut)) {\n $oFirst = reset($aOut);\n if ($oFirst->slug === Components::$sAppSlug) {\n $oApp = array_shift($aOut);\n $aOut = array_merge($aOut, [$oApp]);\n $aOut = array_filter($aOut);\n $aOut = array_values($aOut);\n }\n }\n\n return $aOut;\n }", "public function getModules()\n {\n $orgid = isset($_REQUEST['orgid']) ? decode5t($_REQUEST['orgid']) : '0';\n $data = array();\n try {\n $query = $this->db->query(\"SELECT ModuleId AS module,ViewPermission as permission FROM OrgPermission WHERE OrgId= ? and ModuleId in (5,31,66,171,186,187,2)\", array(\n $orgid\n ));\n $data['permission'] = $query->result();\n }\n catch (Exception $a) {\n $data['permission'] = '0';\n }\n return $data;\n \n }", "function getModules(){\n global $adb;\n $query=\"select vtiger_tab.tabid,vtiger_tab.tablabel as modulename,linklabel from vtiger_tab left join vtiger_links on vtiger_tab.tabid=vtiger_links.tabid and linklabel='WYSIWYG'\nwhere isentitytype=1 and tablabel!='Comments'\";\n $result=$adb->pquery($query,array());\n while($resultrow = $adb->fetch_array($result)) {\n $modulelist[$resultrow['modulename']]=array('enabled'=>$resultrow['linklabel']==\"WYSIWYG\",'tabid'=>$resultrow['tabid']);\n }\n return $modulelist;\n }", "public function getModules()\n {\n\n if ($this->_modules !== null) {\n return $this->_modules;\n }\n\n $url = Yii::app()->getModule('admin')->marketplaceApiUrl . \"list?version=\" . urlencode(HVersion::VERSION) . \"&installId=\" . HSetting::Get('installationId', 'admin');\n\n try {\n\n $this->_modules = Yii::app()->cache->get('onlineModuleManager_modules');\n if ($this->_modules === null || !is_array($this->_modules)) {\n\n $http = new Zend_Http_Client($url, array(\n 'adapter' => 'Zend_Http_Client_Adapter_Curl',\n 'curloptions' => $this->getCurlOptions(),\n 'timeout' => 30\n ));\n\n $response = $http->request();\n $json = $response->getBody();\n\n $this->_modules = CJSON::decode($json);\n Yii::app()->cache->set('onlineModuleManager_modules', $this->_modules, HSetting::Get('expireTime', 'cache'));\n }\n } catch (Exception $ex) {\n throw new CHttpException('500', Yii::t('AdminModule.libs_OnlineModuleManager', 'Could not fetch module list online! (%error%)', array('%error%' => $ex->getMessage())));\n }\n return $this->_modules;\n }", "public function getModuleManager();", "private function getAdminThemeComponetsModules()\n { \n $variables = \"\";\n\n foreach($this->adminComponetsModules as $com => $c){\n $variables.=(\"modules.\".$com.\"='\".URL::to($c).\"';\");\n }\n\n return $variables;\n }", "public function getModuleList(){\n $qb = $this->createQueryBuilder();\n $qb->module('system')->query('modulelistnames');\n return $this->execute($qb);\n }", "public static function getDependencies()\n {\n // This plugin does not depend on others so return an empty array.\n return array();\n }" ]
[ "0.79403245", "0.7780458", "0.7780458", "0.76723033", "0.7446117", "0.7374631", "0.7343683", "0.7321266", "0.7301738", "0.7301738", "0.7301738", "0.7294334", "0.72662383", "0.7234942", "0.71781874", "0.71529174", "0.7071171", "0.7066417", "0.7048411", "0.7025145", "0.7004351", "0.6989561", "0.69875693", "0.6977435", "0.6959382", "0.6932301", "0.69312763", "0.69203705", "0.68487185", "0.68278885", "0.68256223", "0.6819265", "0.6817443", "0.6793944", "0.6791427", "0.6758553", "0.67080766", "0.6693284", "0.6668613", "0.6667633", "0.6651905", "0.66486675", "0.6637107", "0.66253334", "0.6622166", "0.658943", "0.65767676", "0.65733373", "0.65702194", "0.65537107", "0.6544962", "0.6533171", "0.6532376", "0.6520701", "0.6514605", "0.6481566", "0.6463533", "0.64279747", "0.6401344", "0.6391218", "0.63885486", "0.63859415", "0.638348", "0.6348938", "0.6334317", "0.6318741", "0.6311402", "0.62921876", "0.6284972", "0.6282152", "0.62800705", "0.6279417", "0.6278605", "0.62525433", "0.6250711", "0.6240631", "0.6234522", "0.62251705", "0.6220055", "0.62168723", "0.62088436", "0.6207467", "0.61985403", "0.6195355", "0.6194838", "0.6180841", "0.61752635", "0.6173478", "0.61644685", "0.6147104", "0.6133487", "0.61296743", "0.6109759", "0.61073995", "0.6081742", "0.607718", "0.6061523", "0.60569835", "0.60515034", "0.60372096" ]
0.6796312
33